diff --git a/.gitignore b/.gitignore index 808a8c707..cc3355c6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store .idea .ignore/ +.vscode/* bower_components/ node_modules/ **/node_modules/ diff --git a/README.md b/README.md index df8f2d91a..15be971a2 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@

English | Español | + Français | Pусский | 中文 | 한국어 @@ -16,14 +17,14 @@ --- -![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.8-brightgreen.svg) +![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.9-brightgreen.svg) [![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) [![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)    **|**   *7Kb gziped*   **|**   *Created by [@imac2](https://twitter.com/imac2)* - [Demo online](http://alvarotrigo.com/fullPage/) | [Codepen](https://codepen.io/alvarotrigo/pen/NxyPPp) -- [Wordpress plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) +- [Wordpress plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) and [WordPress pluging fo Elementor](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) - [Wordpress theme](http://alvarotrigo.com/fullPage/utils/wordpress.html) - [fullpage.js Extensions](http://alvarotrigo.com/fullPage/extensions/) - [Frequently Answered Questions](https://github.com/alvarotrigo/fullPage.js/wiki/FAQ---Frequently-Answered-Questions) @@ -424,7 +425,7 @@ It requires the file `vendors/easings.min.js` or [jQuery UI](http://jqueryui.com - `fitToSectionDelay`: (default 1000). If `fitToSection` is set to true, this delays the fitting by the configured milliseconds. -- `scrollBar`: (default `false`) Determines whether to use scrollbar for the site or not. In case of using scroll bar, the `autoScrolling` functionality will still work as expected. The user will also be free to scroll the site with the scroll bar and fullPage.js will fit the section in the screen when scrolling finishes. +- `scrollBar`: (default `false`) Determines whether to use scroll bar for the **vertical sections** on site or not. In case of using scroll bar, the `autoScrolling` functionality will still work as expected. The user will also be free to scroll the site with the scroll bar and fullPage.js will fit the section in the screen when scrolling finishes. - `paddingTop`: (default `0`) Defines the top padding for each section with a numerical value and its measure (paddingTop: '10px', paddingTop: '10em'...) Useful in case of using a fixed header. @@ -434,7 +435,7 @@ the fitting by the configured milliseconds. - `normalScrollElements`: (default `null`) [Demo](https://codepen.io/alvarotrigo/pen/RmVazM) If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the Javascript selectors for those elements. (For example: `normalScrollElements: '#element1, .element2'`). This option should not be applied to any section/slide element itself. -- `bigSectionsDestination`: (default `null`) Defines how to scroll to a section which size is bigger than the viewport. By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are `top`, `bottom`, `null`. +- `bigSectionsDestination`: (default `null`) [Demo](https://codepen.io/alvarotrigo/pen/vYLdMrx) Defines how to scroll to a section which height is bigger than the viewport and when not using `scrollOverflow:true`. (Read [how to create smaller or bigger sections](https://github.com/alvarotrigo/fullPage.js#creating-smaller-or-bigger-sections)). By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are `top`, `bottom`, `null`. - `keyboardScrolling`: (default `true`) Defines if the content can be navigated using the keyboard. @@ -963,7 +964,7 @@ To see the list of recent changes, see [Releases section](https://github.com/alv Want to build fullpage.js distribution files? Please see [Build Tasks](https://github.com/alvarotrigo/fullPage.js/wiki/Build-tasks) # Resources -- [Wordpress Plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) +- Wordpress Plugin [for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) and [for Elementor](https://alvarotrigo.com/fullPage/wordpress-plugin-elementor/). - [Wordpress theme](https://alvarotrigo.com/fullPage/utils/wordpress.html) - [Official Vue.js wrapper component](https://github.com/alvarotrigo/vue-fullpage.js) - [Official React.js wrapper component](https://github.com/alvarotrigo/react-fullpage) diff --git a/dist/fullpage.css b/dist/fullpage.css index a329cd165..bab1cb666 100644 --- a/dist/fullpage.css +++ b/dist/fullpage.css @@ -1,5 +1,5 @@ /*! - * fullPage 3.0.8 + * fullPage 3.0.9 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only @@ -98,10 +98,11 @@ html.fp-enabled, #fp-nav { position: fixed; z-index: 100; - margin-top: -32px; top: 50%; opacity: 1; - -webkit-transform: translate3d(0,0,0); + transform: translateY(-50%); + -ms-transform: translateY(-50%); + -webkit-transform: translate3d(0,-50%,0); } #fp-nav.fp-right { right: 17px; @@ -233,4 +234,4 @@ html.fp-enabled, clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; -} \ No newline at end of file +} diff --git a/dist/fullpage.extensions.min.js b/dist/fullpage.extensions.min.js index 73665a044..5cd0b3cfc 100755 --- a/dist/fullpage.extensions.min.js +++ b/dist/fullpage.extensions.min.js @@ -1,8 +1,8 @@ /*! - * fullPage 3.0.8 - Extensions 0.1.9 + * fullPage 3.0.9 - Extensions 0.1.9 * https://github.com/alvarotrigo/fullPage.js * @license http://alvarotrigo.com/fullPage/extensions/#license * * Copyright (C) 2018 alvarotrigo.com - A project by Alvaro Trigo */ -!function(e,t,n,o,r){"function"==typeof define&&define.amd?define(function(){return e.fullpage=o(t,n),e.fullpage}):"object"==typeof exports?module.exports=o(t,n):t.fullpage=o(t,n)}(this,window,document,function(rn,ln){"use strict";var an="fullpage-wrapper",sn="."+an,cn="fp-responsive",un="fp-notransition",fn="fp-destroyed",dn="fp-enabled",vn="fp-viewing",pn="active",hn="."+pn,gn="fp-completely",mn="fp-section",Sn="."+mn,bn=Sn+hn,wn="fp-tableCell",yn="."+wn,En="fp-auto-height",xn="fp-normal-scroll",An="fp-nav",Ln="#"+An,Mn="fp-tooltip",Tn="fp-slide",On="."+Tn,kn=On+hn,Cn="fp-slides",Hn="."+Cn,Rn="fp-slidesContainer",In="."+Rn,zn="fp-table",Bn="fp-slidesNav",Nn="."+Bn,jn=Nn+" a",e="fp-controlArrow",Pn="."+e,Wn="fp-prev",Dn=Pn+".fp-prev",Yn=Pn+".fp-next";function Vn(e,t){rn.console&&rn.console[e]&&rn.console[e]("fullPage: "+t)}function Zn(e,t){return(t=1'+Oe(r,"Section")+"";var l=g.navigationTooltips[r];void 0!==l&&""!==l&&(o+='

'+l+"
"),o+=""}Zn("ul",n)[0].innerHTML=o,Qn(Zn(Ln),{"margin-top":"-"+Zn(Ln)[0].offsetHeight/2+"px"}),ro(Zn("a",Zn("li",Zn(Ln)[0])[eo(Zn(bn)[0],Sn)]),pn)}(),Zn('iframe[src*="youtube.com/embed/"]',w).forEach(function(e){var t,n,o;n="enablejsapi=1",o=(t=e).getAttribute("src"),t.setAttribute("src",o+(/\?/.test(o)?"&":"?")+n)}),Qt("fadingEffect","apply"),Qt("cards","init"),g.scrollOverflow&&(p=g.scrollOverflowHandler.init(g))}(),se(!0),ce(!0),oe(g.autoScrolling,"internal"),At(),Wt(),"complete"===ln.readyState&&st(),rn.addEventListener("load",st),g.scrollOverflow||ke(),function(){for(var e=1;e<4;e++)C=setTimeout(xe,350*e)}(),B||lt("l"),rn.addEventListener("scroll",Ce),rn.addEventListener("hashchange",ct),rn.addEventListener("blur",gt),rn.addEventListener("resize",Et),ln.addEventListener("keydown",ft),ln.addEventListener("keyup",dt),["click","touchstart"].forEach(function(e){ln.addEventListener(e,we)}),g.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){ye(e,!1)}),["mouseleave","touchend"].forEach(function(e){ye(e,!0)})),Qt("dragAndMove","turnOffTouch"));var G,F,U,Q=!1,_=0,J=0,K=0,$=0,q=(new Date).getTime(),ee=0,te=0,ne=y;return S}function oe(e,t){e||Zt(0),Kt("autoScrolling",e,t);var n=Zn(bn)[0];if(g.autoScrolling&&!g.scrollBar)Qn(r,{overflow:"hidden",height:"100%"}),re(Y.recordHistory,"internal"),Qn(w,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&Zt(n.offsetTop);else if(Qn(r,{overflow:"visible",height:"initial"}),re(!!g.autoScrolling&&Y.recordHistory,"internal"),Qn(w,{"-ms-touch-action":"","touch-action":""}),Ft(w),null!=n){var o=Fe(n.offsetTop);o.element.scrollTo(0,o.options)}So(w,"setAutoScrolling",e)}function re(e,t){Kt("recordHistory",e,t)}function ie(e,t){"internal"!==t&&Ut("fadingEffect")&&S.fadingEffect.update(e),Ut("cards")&&S.cards.update(e),Kt("scrollingSpeed",e,t)}function le(e,t){Kt("fitToSection",e,t)}function ae(e){e?(function(){var e,t="";rn.addEventListener?e="addEventListener":(e="attachEvent",t="on");var n="onwheel"in ln.createElement("div")?"wheel":void 0!==ln.onmousewheel?"mousewheel":"DOMMouseScroll",o=!!j&&{passive:!1};"DOMMouseScroll"==n?ln[e](t+"MozMousePixelScroll",Pe,o):ln[e](t+n,Pe,o)}(),w.addEventListener("mousedown",vt),w.addEventListener("mouseup",pt)):(ln.addEventListener?(ln.removeEventListener("mousewheel",Pe,!1),ln.removeEventListener("wheel",Pe,!1),ln.removeEventListener("MozMousePixelScroll",Pe,!1)):ln.detachEvent("onmousewheel",Pe),w.removeEventListener("mousedown",vt),w.removeEventListener("mouseup",pt))}function se(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Gt(t,e,"m")}):Gt(t,"all","m"),So(w,"setAllowScrolling",{value:t,directions:e})}function ce(e){e?(ae(!0),function(){if(i||u){g.autoScrolling&&(m.removeEventListener(I.touchmove,Ie,{passive:!1}),m.addEventListener(I.touchmove,Ie,{passive:!1}));var e=g.touchWrapper;e.removeEventListener(I.touchstart,Ne),e.removeEventListener(I.touchmove,ze,{passive:!1}),e.addEventListener(I.touchstart,Ne),e.addEventListener(I.touchmove,ze,{passive:!1})}}()):(ae(!1),function(){if(i||u){g.autoScrolling&&(m.removeEventListener(I.touchmove,ze,{passive:!1}),m.removeEventListener(I.touchmove,Ie,{passive:!1}));var e=g.touchWrapper;e.removeEventListener(I.touchstart,Ne),e.removeEventListener(I.touchmove,ze,{passive:!1})}}())}function ue(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Gt(t,e,"k")}):(Gt(t,"all","k"),g.keyboardScrolling=t)}function fe(){var e=_n(Zn(bn)[0],Sn);e||!g.loopTop&&!g.continuousVertical||(e=qn(Zn(Sn))),null!=e&&Ve(e,null,!0)}function de(){var e=Jn(Zn(bn)[0],Sn);e||!g.loopBottom&&!g.continuousVertical||(e=Zn(Sn)[0]),null!=e&&Ve(e,null,!1)}function ve(e,t){ie(0,"internal"),pe(e,t),ie(Y.scrollingSpeed,"internal")}function pe(e,t){var n=It(e);void 0!==t?zt(e,t):null!=n&&Ve(n)}function he(e){We("right",e)}function ge(e){We("left",e)}function me(e){if(!Gn(w,fn)){E=!0,y=Fn(),f=Un();for(var t=Zn(Sn),n=0;n'),yo('
')],fo(Zn(Hn,l)[0],a),"#fff"!==g.controlArrowColor&&(Qn(Zn(Yn,l),{"border-color":"transparent transparent transparent "+g.controlArrowColor}),Qn(Zn(Dn,l),{"border-color":"transparent "+g.controlArrowColor+" transparent transparent"})),g.loopHorizontal||to(Zn(Dn,l))),g.slidesNavigation&&function(e,t){lo(yo('
'),e);var n=Zn(Nn,e)[0];ro(n,"fp-"+g.slidesNavPosition);for(var o=0;o'+Oe(o,"Slide")+""),Zn("ul",n)[0]);Qn(n,{"margin-left":"-"+n.innerWidth/2+"px"}),ro(Zn("a",Zn("li",n)[0]),pn)}(e,n)),t.forEach(function(e){Qn(e,{width:r+"%"}),g.verticalCentered&&Ct(e)});var c=Zn(kn,e)[0];null!=c&&(0!==eo(Zn(bn),Sn)||0===eo(Zn(bn),Sn)&&0!==eo(c))?(Vt(c,"internal"),ro(c,"fp-initial")):ro(t[0],pn)}function Me(e){return g.offsetSections&&S.offsetSections?Math.round(S.offsetSections.getWindowHeight(e)):Fn()}function Te(e,t){t||null!=Zn(bn)[0]||ro(e,pn),o=Zn(bn)[0],Qn(e,{height:Me(e)+"px"}),g.paddingTop&&Qn(e,{"padding-top":g.paddingTop}),g.paddingBottom&&Qn(e,{"padding-bottom":g.paddingBottom}),void 0!==g.sectionsColor[t]&&Qn(e,{"background-color":g.sectionsColor[t]}),void 0!==g.anchors[t]&&e.setAttribute("data-anchor",g.anchors[t])}function Oe(e,t){return g.navigationTooltips[e]||g.anchors[e]||t+" "+(e+1)}function ke(){var e,t,n=Zn(bn)[0];ro(n,gn),Je(n),_e(),$e(n),g.scrollOverflow&&g.scrollOverflowHandler.afterLoad(),e=ut(),t=It(e.section),e.section&&t&&(void 0===t||eo(t)!==eo(o))||!mo(g.afterLoad)||Ze("afterLoad",{activeSection:n,element:n,direction:null,anchorLink:n.getAttribute("data-anchor"),sectionIndex:eo(n,Sn)}),mo(g.afterRender)&&Ze("afterRender"),So(w,"afterRender")}function Ce(){var e;if(So(w,"onScroll"),(!g.autoScrolling||g.scrollBar||Ut("dragAndMove"))&&!Jt()){var t=Ut("dragAndMove")?Math.abs(S.dragAndMove.getCurrentScroll()):po(),n=0,o=t+Fn()/2,r=(Ut("dragAndMove")?S.dragAndMove.getDocumentHeight():m.offsetHeight-Fn())===t,i=Zn(Sn);if(r)n=i.length-1;else if(t)for(var l=0;lMath.abs(_-K)?!a&&Math.abs(J-$)>Un()/100*g.touchSensitivity&&($rn.innerHeight/100*g.touchSensitivity&&(K<_?Re("down"):_>4,n=(15&r)<<4|(i=c.indexOf(e.charAt(s++)))>>2,o=(3&i)<<6|(l=c.indexOf(e.charAt(s++))),a+=String.fromCharCode(t),64!=i&&(a+=String.fromCharCode(n)),64!=l&&(a+=String.fromCharCode(o));return a=function(e){for(var t,n="",o=0,r=0,i=0;ote&&v.m.down&&de()),te=e.pageY)}function St(e,t,n){var o=uo(e,Sn),r={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:eo(t),section:o,sectionIndex:eo(o,Sn),anchorLink:o.getAttribute("data-anchor"),slidesNav:Zn(Nn,o)[0],slideAnchor:Pt(t),prevSlide:Zn(kn,o)[0],prevSlideIndex:eo(Zn(kn,o)[0]),localIsResizing:E};r.xMovement=kt(r.prevSlideIndex,r.slideIndex),r.direction=r.direction?r.direction:r.xMovement,r.localIsResizing||(x=!1),Qt("parallax","applyHorizontal",r),Qt("cards","apply",r),g.onSlideLeave&&!r.localIsResizing&&"none"!==r.xMovement&&mo(g.onSlideLeave)&&!1===Ze("onSlideLeave",r)?a=!1:(ro(t,pn),io(ho(t),pn),r.localIsResizing||(et(r.prevSlide),Je(t)),bt(r),Gn(o,pn)&&!r.localIsResizing&&Nt(r.slideIndex,r.slideAnchor,r.anchorLink,r.sectionIndex),S.continuousHorizontal&&S.continuousHorizontal.apply(r),Jt()?wt(r):yt(e,r,!0),g.interlockedSlides&&S.interlockedSlides&&(Ut("continuousHorizontal")&&void 0!==n&&n!==r.xMovement||S.interlockedSlides.apply(r)))}function bt(e){!g.loopHorizontal&&g.controlArrows&&(wo(Zn(Dn,e.section),0!==e.slideIndex),wo(Zn(Yn,e.section),null!=$n(e.destiny)))}function wt(e){var t,n;S.continuousHorizontal&&S.continuousHorizontal.afterSlideLoads(e),t=e.slidesNav,n=e.slideIndex,g.slidesNavigation&&null!=t&&(io(Zn(hn,t),pn),ro(Zn("a",Zn("li",t)[n]),pn)),e.localIsResizing||(Qt("parallax","afterSlideLoads"),Qt("scrollOverflowReset","setPrevious",e.prevSlide),Qt("scrollOverflowReset","reset"),mo(g.afterSlideLoad)&&Ze("afterSlideLoad",e),x=!0,$e(e.destiny)),a=!1,Ut("interlockedSlides")&&S.interlockedSlides.apply(e)}function yt(e,t,n){var o=t.destinyPos;if(g.css3){var r="translate3d(-"+Math.round(o.left)+"px, 0px, 0px)";S.test.translate3dH[t.sectionIndex]=r,Qn(Lt(Zn(In,e)),Xt(r)),M=setTimeout(function(){n&&wt(t)},g.scrollingSpeed)}else S.test.left[t.sectionIndex]=Math.round(o.left),qt(e,Math.round(o.left),g.scrollingSpeed,function(){n&&wt(t)})}function Et(){clearTimeout(h),h=setTimeout(function(){for(var e=0;e<4;e++)A=setTimeout(xt,200*e)},200)}function xt(){if(So(w,"onResize"),At(),i){var e=ln.activeElement;if(!bo(e,"textarea")&&!bo(e,"input")&&!bo(e,"select")){var t=Fn();Math.abs(t-ne)>20*Math.max(ne,t)/100&&(me(!0),ne=t)}}else xe()}function At(){var e=g.responsive||g.responsiveWidth,t=g.responsiveHeight,n=e&&rn.innerWidth'+ke(r,"Section")+"";var l=g.navigationTooltips[r];void 0!==l&&""!==l&&(o+='
'+l+"
"),o+=""}Gn("ul",n)[0].innerHTML=o,lo(Gn("a",Gn("li",Gn(Tn)[0])[no(Gn(yn)[0],wn)]),gn)}(),Gn('iframe[src*="youtube.com/embed/"]',w).forEach(function(e){var t,n,o;n="enablejsapi=1",o=(t=e).getAttribute("src"),t.setAttribute("src",o+(/\?/.test(o)?"&":"?")+n)}),Jt("fadingEffect","apply"),Jt("cards","init"),g.scrollOverflow&&(p=g.scrollOverflowHandler.init(g))}(),ce(!0),ue(!0),re(g.autoScrolling,"internal"),Mt(),Yt(),"complete"===sn.readyState&&ct(),an.addEventListener("load",ct),g.scrollOverflow||Ce(),function(){for(var e=1;e<4;e++)C=setTimeout(Ae,350*e)}(),B||at("l"),an.addEventListener("scroll",He),an.addEventListener("hashchange",ut),an.addEventListener("focus",mt),an.addEventListener("blur",St),an.addEventListener("resize",At),sn.addEventListener("keydown",dt),sn.addEventListener("keyup",vt),["click","touchstart"].forEach(function(e){sn.addEventListener(e,ye)}),g.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){Ee(e,!1)}),["mouseleave","touchend"].forEach(function(e){Ee(e,!0)})),Jt("dragAndMove","turnOffTouch"));var F,U,Q,_=!1,J=0,K=0,$=0,q=0,ee=(new Date).getTime(),te=0,ne=0,oe=y;return S}function re(e,t){e||Gt(0),qt("autoScrolling",e,t);var n=Gn(yn)[0];if(g.autoScrolling&&!g.scrollBar)Jn(r,{overflow:"hidden",height:"100%"}),ie(V.recordHistory,"internal"),Jn(w,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&Gt(n.offsetTop);else if(Jn(r,{overflow:"visible",height:"initial"}),ie(!!g.autoScrolling&&V.recordHistory,"internal"),Jn(w,{"-ms-touch-action":"","touch-action":""}),Qt(w),null!=n){var o=Ue(n.offsetTop);o.element.scrollTo(0,o.options)}wo(w,"setAutoScrolling",e)}function ie(e,t){qt("recordHistory",e,t)}function le(e,t){"internal"!==t&&_t("fadingEffect")&&S.fadingEffect.update(e),_t("cards")&&S.cards.update(e),qt("scrollingSpeed",e,t)}function ae(e,t){qt("fitToSection",e,t)}function se(e){e?(function(){var e,t="";an.addEventListener?e="addEventListener":(e="attachEvent",t="on");var n="onwheel"in sn.createElement("div")?"wheel":void 0!==sn.onmousewheel?"mousewheel":"DOMMouseScroll",o=!!j&&{passive:!1};"DOMMouseScroll"==n?sn[e](t+"MozMousePixelScroll",We,o):sn[e](t+n,We,o)}(),w.addEventListener("mousedown",pt),w.addEventListener("mouseup",ht)):(sn.addEventListener?(sn.removeEventListener("mousewheel",We,!1),sn.removeEventListener("wheel",We,!1),sn.removeEventListener("MozMousePixelScroll",We,!1)):sn.detachEvent("onmousewheel",We),w.removeEventListener("mousedown",pt),w.removeEventListener("mouseup",ht))}function ce(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Ut(t,e,"m")}):Ut(t,"all","m"),wo(w,"setAllowScrolling",{value:t,directions:e})}function ue(e){e?(se(!0),function(){if((l||u)&&(!_t("dragAndMove")||"mouseonly"===g.dragAndMove)){g.autoScrolling&&(m.removeEventListener(I.touchmove,ze,{passive:!1}),m.addEventListener(I.touchmove,ze,{passive:!1}));var e=g.touchWrapper;e.removeEventListener(I.touchstart,je),e.removeEventListener(I.touchmove,Be,{passive:!1}),e.addEventListener(I.touchstart,je),e.addEventListener(I.touchmove,Be,{passive:!1})}}()):(se(!1),function(){if(l||u){g.autoScrolling&&(m.removeEventListener(I.touchmove,Be,{passive:!1}),m.removeEventListener(I.touchmove,ze,{passive:!1}));var e=g.touchWrapper;e.removeEventListener(I.touchstart,je),e.removeEventListener(I.touchmove,Be,{passive:!1})}}())}function fe(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Ut(t,e,"k")}):(Ut(t,"all","k"),g.keyboardScrolling=t)}function de(){var e=Kn(Gn(yn)[0],wn);e||!g.loopTop&&!g.continuousVertical||(e=to(Gn(wn))),null!=e&&Ze(e,null,!0)}function ve(){var e=$n(Gn(yn)[0],wn);e||!g.loopBottom&&!g.continuousVertical||(e=Gn(wn)[0]),null!=e&&Ze(e,null,!1)}function pe(e,t){le(0,"internal"),he(e,t),le(V.scrollingSpeed,"internal")}function he(e,t){var n=Bt(e);void 0!==t?Nt(e,t):null!=n&&Ze(n)}function ge(e){De("right",e)}function me(e){De("left",e)}function Se(e){if(!Un(w,vn)){E=!0,y=Qn(),f=_n();for(var t=Gn(wn),n=0;n'),xo('
')],po(Gn(In,l)[0],a),"#fff"!==g.controlArrowColor&&(Jn(Gn(Zn,l),{"border-color":"transparent transparent transparent "+g.controlArrowColor}),Jn(Gn(Vn,l),{"border-color":"transparent "+g.controlArrowColor+" transparent transparent"})),g.loopHorizontal||oo(Gn(Vn,l))),g.slidesNavigation&&function(e,t){so(xo('
    '),e);var n=Gn(Pn,e)[0];lo(n,"fp-"+g.slidesNavPosition);for(var o=0;o'+ke(o,"Slide",r)+""),Gn("ul",n)[0])}Jn(n,{"margin-left":"-"+n.innerWidth/2+"px"}),lo(Gn("a",Gn("li",n)[0]),gn)}(e,n)),t.forEach(function(e){Jn(e,{width:r+"%"}),g.verticalCentered&&Rt(e)});var c=Gn(Hn,e)[0];null!=c&&(0!==no(Gn(yn),wn)||0===no(Gn(yn),wn)&&0!==no(c))?(Xt(c,"internal"),lo(c,"fp-initial")):lo(t[0],gn)}function Te(e){return g.offsetSections&&S.offsetSections?Math.round(S.offsetSections.getWindowHeight(e)):Qn()}function Oe(e,t){t||null!=Gn(yn)[0]||lo(e,gn),o=Gn(yn)[0],Jn(e,{height:Te(e)+"px"}),g.paddingTop&&Jn(e,{"padding-top":g.paddingTop}),g.paddingBottom&&Jn(e,{"padding-bottom":g.paddingBottom}),void 0!==g.sectionsColor[t]&&Jn(e,{"background-color":g.sectionsColor[t]}),void 0!==g.anchors[t]&&e.setAttribute("data-anchor",g.anchors[t])}function ke(e,t,n){var o="Section"===t?g.anchors[e]:n.getAttribute("data-anchor");return g.navigationTooltips[e]||o||t+" "+(e+1)}function Ce(){var e,t,n=Gn(yn)[0];lo(n,Sn),Ke(n),Je(),qe(n),g.scrollOverflow&&g.scrollOverflowHandler.afterLoad(),e=ft(),t=Bt(e.section),e.section&&t&&(void 0===t||no(t)!==no(o))||!bo(g.afterLoad)||Xe("afterLoad",{activeSection:n,element:n,direction:null,anchorLink:n.getAttribute("data-anchor"),sectionIndex:no(n,wn)}),bo(g.afterRender)&&Xe("afterRender"),wo(w,"afterRender")}function He(){var e;if(wo(w,"onScroll"),(!g.autoScrolling||g.scrollBar||_t("dragAndMove"))&&!$t()){var t=_t("dragAndMove")?Math.abs(S.dragAndMove.getCurrentScroll()):go(),n=0,o=t+Qn()/2,r=(_t("dragAndMove")?S.dragAndMove.getDocumentHeight():m.offsetHeight-Qn())===t,i=Gn(wn);if(r)n=i.length-1;else if(t)for(var l=0;lMath.abs(J-$)?!a&&Math.abs(K-q)>_n()/100*g.touchSensitivity&&(qan.innerHeight/100*g.touchSensitivity&&($>4,n=(15&r)<<4|(i=c.indexOf(e.charAt(s++)))>>2,o=(3&i)<<6|(l=c.indexOf(e.charAt(s++))),a+=String.fromCharCode(t),64!=i&&(a+=String.fromCharCode(n)),64!=l&&(a+=String.fromCharCode(o));return a=function(e){for(var t,n="",o=0,r=0,i=0;one&&v.m.down&&ve()),ne=e.pageY)}function wt(e,t,n){var o=vo(e,wn),r={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:no(t),section:o,sectionIndex:no(o,wn),anchorLink:o.getAttribute("data-anchor"),slidesNav:Gn(Pn,o)[0],slideAnchor:Dt(t),prevSlide:Gn(Hn,o)[0],prevSlideIndex:no(Gn(Hn,o)[0]),localIsResizing:E};r.xMovement=Ht(r.prevSlideIndex,r.slideIndex),r.direction=r.direction?r.direction:r.xMovement,r.localIsResizing||(x=!1),Jt("parallax","applyHorizontal",r),Jt("cards","apply",r),g.onSlideLeave&&!r.localIsResizing&&"none"!==r.xMovement&&bo(g.onSlideLeave)&&!1===Xe("onSlideLeave",r)?a=!1:(lo(t,gn),ao(mo(t),gn),r.localIsResizing||(tt(r.prevSlide),Ke(t)),yt(r),Un(o,gn)&&!r.localIsResizing&&Pt(r.slideIndex,r.slideAnchor,r.anchorLink,r.sectionIndex),S.continuousHorizontal&&S.continuousHorizontal.apply(r),$t()?Et(r):xt(e,r,!0),g.interlockedSlides&&S.interlockedSlides&&(_t("continuousHorizontal")&&void 0!==n&&n!==r.xMovement||S.interlockedSlides.apply(r)))}function yt(e){!g.loopHorizontal&&g.controlArrows&&(Eo(Gn(Vn,e.section),0!==e.slideIndex),Eo(Gn(Zn,e.section),null!=eo(e.destiny)))}function Et(e){var t,n;S.continuousHorizontal&&S.continuousHorizontal.afterSlideLoads(e),t=e.slidesNav,n=e.slideIndex,g.slidesNavigation&&null!=t&&(ao(Gn(mn,t),gn),lo(Gn("a",Gn("li",t)[n]),gn)),e.localIsResizing||(Jt("parallax","afterSlideLoads"),Jt("scrollOverflowReset","setPrevious",e.prevSlide),Jt("scrollOverflowReset","reset"),bo(g.afterSlideLoad)&&Xe("afterSlideLoad",e),x=!0,qe(e.destiny)),a=!1,_t("interlockedSlides")&&S.interlockedSlides.apply(e)}function xt(e,t,n){var o=t.destinyPos;if(g.css3){var r="translate3d(-"+Math.round(o.left)+"px, 0px, 0px)";S.test.translate3dH[t.sectionIndex]=r,Jn(Tt(Gn(Bn,e)),Ft(r)),M=setTimeout(function(){n&&Et(t)},g.scrollingSpeed)}else S.test.left[t.sectionIndex]=Math.round(o.left),tn(e,Math.round(o.left),g.scrollingSpeed,function(){n&&Et(t)})}function At(){E=!0,clearTimeout(h),h=setTimeout(function(){for(var e=0;e<4;e++)A=setTimeout(Lt,200*e)},200)}function Lt(){if(wo(w,"onResize"),Mt(),l){var e=sn.activeElement;if(!yo(e,"textarea")&&!yo(e,"input")&&!yo(e,"select")){var t=Qn();Math.abs(t-oe)>20*Math.max(oe,t)/100&&(Se(!0),oe=t)}}else Ae()}function Mt(){var e=g.responsive||g.responsiveWidth,t=g.responsiveHeight,n=e&&an.innerWidth'+ getBulletLinkName(i, 'Slide') +''), $('ul', nav)[0] ); + var slide = $(SLIDE_SEL, section)[i]; + appendTo(createElementFromHTML('
  • '+ getBulletLinkName(i, 'Slide', slide) +'
  • '), $('ul', nav)[0] ); } //centering it @@ -3272,7 +3306,8 @@ scrollId, scrollId2, g_doubleCheckHeightId, - resizeHandlerId + resizeHandlerId, + g_transitionLapseId ].forEach(function(timeoutId){ clearTimeout(timeoutId); }); @@ -3612,7 +3647,7 @@ } /** - * Equivalent or jQuery function $(). + * Equivalent of jQuery function $(). */ function $(selector, context){ context = arguments.length > 1 ? context : document; diff --git a/dist/fullpage.min.css b/dist/fullpage.min.css index 99a5bfbb7..2f0a27e59 100644 --- a/dist/fullpage.min.css +++ b/dist/fullpage.min.css @@ -1,5 +1,5 @@ /*! - * fullPage 3.0.8 + * fullPage 3.0.9 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only @@ -7,5 +7,5 @@ * http://alvarotrigo.com/fullPage/pricing/ * * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo - */.fp-enabled body,html.fp-enabled{margin:0;padding:0;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fp-section{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fp-slide{float:left}.fp-slide,.fp-slidesContainer{height:100%;display:block}.fp-slides{z-index:1;height:100%;overflow:hidden;position:relative;-webkit-transition:all .3s ease-out;transition:all .3s ease-out}.fp-section.fp-table,.fp-slide.fp-table{display:table;table-layout:fixed;width:100%}.fp-tableCell{display:table-cell;vertical-align:middle;width:100%;height:100%}.fp-slidesContainer{float:left;position:relative}.fp-controlArrow{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;position:absolute;z-index:4;top:50%;cursor:pointer;width:0;height:0;border-style:solid;margin-top:-38px;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.fp-controlArrow.fp-prev{left:15px;width:0;border-width:38.5px 34px 38.5px 0;border-color:transparent #fff transparent transparent}.fp-controlArrow.fp-next{right:15px;border-width:38.5px 0 38.5px 34px;border-color:transparent transparent transparent #fff}.fp-scrollable{overflow:hidden;position:relative}.fp-scroller{overflow:hidden}.iScrollIndicator{border:0!important}.fp-notransition{-webkit-transition:none!important;transition:none!important}#fp-nav{position:fixed;z-index:100;margin-top:-32px;top:50%;opacity:1;-webkit-transform:translate3d(0,0,0)}#fp-nav.fp-right{right:17px}#fp-nav.fp-left{left:17px}.fp-slidesNav{position:absolute;z-index:4;opacity:1;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0!important;right:0;margin:0 auto!important}.fp-slidesNav.fp-bottom{bottom:17px}.fp-slidesNav.fp-top{top:17px}#fp-nav ul,.fp-slidesNav ul{margin:0;padding:0}#fp-nav ul li,.fp-slidesNav ul li{display:block;width:14px;height:13px;margin:7px;position:relative}.fp-slidesNav ul li{display:inline-block}#fp-nav ul li a,.fp-slidesNav ul li a{display:block;position:relative;z-index:1;width:100%;height:100%;cursor:pointer;text-decoration:none}#fp-nav ul li a.active span,#fp-nav ul li:hover a.active span,.fp-slidesNav ul li a.active span,.fp-slidesNav ul li:hover a.active span{height:12px;width:12px;margin:-6px 0 0 -6px;border-radius:100%}#fp-nav ul li a span,.fp-slidesNav ul li a span{border-radius:50%;position:absolute;z-index:1;height:4px;width:4px;border:0;background:#333;left:50%;top:50%;margin:-2px 0 0 -2px;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#fp-nav ul li:hover a span,.fp-slidesNav ul li:hover a span{width:10px;height:10px;margin:-5px 0 0 -5px}#fp-nav ul li .fp-tooltip{position:absolute;top:-2px;color:#fff;font-size:14px;font-family:arial,helvetica,sans-serif;white-space:nowrap;max-width:220px;overflow:hidden;display:block;opacity:0;width:0;cursor:pointer}#fp-nav ul li:hover .fp-tooltip,#fp-nav.fp-show-active a.active+.fp-tooltip{-webkit-transition:opacity .2s ease-in;transition:opacity .2s ease-in;width:auto;opacity:1}#fp-nav ul li .fp-tooltip.fp-right{right:20px}#fp-nav ul li .fp-tooltip.fp-left{left:20px}.fp-auto-height .fp-slide,.fp-auto-height .fp-tableCell,.fp-auto-height.fp-section{height:auto!important}.fp-responsive .fp-auto-height-responsive .fp-slide,.fp-responsive .fp-auto-height-responsive .fp-tableCell,.fp-responsive .fp-auto-height-responsive.fp-section{height:auto!important}.fp-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} + */.fp-enabled body,html.fp-enabled{margin:0;padding:0;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fp-section{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fp-slide{float:left}.fp-slide,.fp-slidesContainer{height:100%;display:block}.fp-slides{z-index:1;height:100%;overflow:hidden;position:relative;-webkit-transition:all .3s ease-out;transition:all .3s ease-out}.fp-section.fp-table,.fp-slide.fp-table{display:table;table-layout:fixed;width:100%}.fp-tableCell{display:table-cell;vertical-align:middle;width:100%;height:100%}.fp-slidesContainer{float:left;position:relative}.fp-controlArrow{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;position:absolute;z-index:4;top:50%;cursor:pointer;width:0;height:0;border-style:solid;margin-top:-38px;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.fp-controlArrow.fp-prev{left:15px;width:0;border-width:38.5px 34px 38.5px 0;border-color:transparent #fff transparent transparent}.fp-controlArrow.fp-next{right:15px;border-width:38.5px 0 38.5px 34px;border-color:transparent transparent transparent #fff}.fp-scrollable{overflow:hidden;position:relative}.fp-scroller{overflow:hidden}.iScrollIndicator{border:0!important}.fp-notransition{-webkit-transition:none!important;transition:none!important}#fp-nav{position:fixed;z-index:100;top:50%;opacity:1;transform:translateY(-50%);-ms-transform:translateY(-50%);-webkit-transform:translate3d(0,-50%,0)}#fp-nav.fp-right{right:17px}#fp-nav.fp-left{left:17px}.fp-slidesNav{position:absolute;z-index:4;opacity:1;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0!important;right:0;margin:0 auto!important}.fp-slidesNav.fp-bottom{bottom:17px}.fp-slidesNav.fp-top{top:17px}#fp-nav ul,.fp-slidesNav ul{margin:0;padding:0}#fp-nav ul li,.fp-slidesNav ul li{display:block;width:14px;height:13px;margin:7px;position:relative}.fp-slidesNav ul li{display:inline-block}#fp-nav ul li a,.fp-slidesNav ul li a{display:block;position:relative;z-index:1;width:100%;height:100%;cursor:pointer;text-decoration:none}#fp-nav ul li a.active span,#fp-nav ul li:hover a.active span,.fp-slidesNav ul li a.active span,.fp-slidesNav ul li:hover a.active span{height:12px;width:12px;margin:-6px 0 0 -6px;border-radius:100%}#fp-nav ul li a span,.fp-slidesNav ul li a span{border-radius:50%;position:absolute;z-index:1;height:4px;width:4px;border:0;background:#333;left:50%;top:50%;margin:-2px 0 0 -2px;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#fp-nav ul li:hover a span,.fp-slidesNav ul li:hover a span{width:10px;height:10px;margin:-5px 0 0 -5px}#fp-nav ul li .fp-tooltip{position:absolute;top:-2px;color:#fff;font-size:14px;font-family:arial,helvetica,sans-serif;white-space:nowrap;max-width:220px;overflow:hidden;display:block;opacity:0;width:0;cursor:pointer}#fp-nav ul li:hover .fp-tooltip,#fp-nav.fp-show-active a.active+.fp-tooltip{-webkit-transition:opacity .2s ease-in;transition:opacity .2s ease-in;width:auto;opacity:1}#fp-nav ul li .fp-tooltip.fp-right{right:20px}#fp-nav ul li .fp-tooltip.fp-left{left:20px}.fp-auto-height .fp-slide,.fp-auto-height .fp-tableCell,.fp-auto-height.fp-section{height:auto!important}.fp-responsive .fp-auto-height-responsive .fp-slide,.fp-responsive .fp-auto-height-responsive .fp-tableCell,.fp-responsive .fp-auto-height-responsive.fp-section{height:auto!important}.fp-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} /*# sourceMappingURL=fullpage.min.css.map */ diff --git a/dist/fullpage.min.css.map b/dist/fullpage.min.css.map index 1ce5a17cd..3d5c75d89 100644 --- a/dist/fullpage.min.css.map +++ b/dist/fullpage.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["fullpage.css"],"names":[],"mappings":"AAAA;;;;;;;;;AAWA,iBADA,gBAEI,OAAQ,EACR,QAAS,EACT,SAAS,OAGT,4BAA6B,cAEjC,YACI,SAAU,SACV,mBAAoB,WACpB,gBAAiB,WACjB,WAAY,WAEhB,UACI,MAAO,KAEX,UAAW,oBACP,OAAQ,KACR,QAAS,MAEb,WACI,QAAQ,EACR,OAAQ,KACR,SAAU,OACV,SAAU,SACV,mBAAoB,IAAI,IAAK,SAC7B,WAAY,IAAI,IAAK,SAEzB,qBAAsB,mBAClB,QAAS,MACT,aAAa,MACb,MAAO,KAEX,cACI,QAAS,WACT,eAAgB,OAChB,MAAO,KACP,OAAQ,KAEZ,oBACI,MAAO,KACP,SAAU,SAEd,iBACI,oBAAqB,KACrB,iBAAkB,KAClB,mBAAoB,KACpB,gBAAiB,KACjB,SAAU,SACV,QAAS,EACT,IAAK,IACL,OAAQ,QACR,MAAO,EACP,OAAQ,EACR,aAAc,MACd,WAAY,MACZ,kBAAmB,mBACnB,cAAe,mBACf,UAAW,mBAEf,yBACI,KAAM,KACN,MAAO,EACP,aAAc,OAAO,KAAK,OAAO,EACjC,aAAc,YAAY,KAAK,YAAY,YAE/C,yBACI,MAAO,KACP,aAAc,OAAO,EAAE,OAAO,KAC9B,aAAc,YAAY,YAAY,YAAY,KAEtD,eACI,SAAU,OACV,SAAU,SAEd,aACI,SAAU,OAEd,kBACI,OAAQ,YAEZ,iBACI,mBAAoB,eACpB,WAAY,eAEhB,QACI,SAAU,MACV,QAAS,IACT,WAAY,MACZ,IAAK,IACL,QAAS,EACT,kBAAmB,mBAEvB,iBACI,MAAO,KAEX,gBACI,KAAM,KAEV,cACI,SAAU,SACV,QAAS,EACT,QAAS,EACT,kBAAmB,mBACnB,cAAe,mBACf,UAAW,mBACX,KAAM,YACN,MAAO,EACP,OAAQ,EAAE,eAEd,wBACI,OAAQ,KAEZ,qBACI,IAAK,KAET,WACA,iBACE,OAAQ,EACR,QAAS,EAEX,cACA,oBACI,QAAS,MACT,MAAO,KACP,OAAQ,KACR,OAAQ,IACR,SAAS,SAEb,oBACI,QAAS,aAEb,gBACA,sBACI,QAAS,MACT,SAAU,SACV,QAAS,EACT,MAAO,KACP,OAAQ,KACR,OAAQ,QACR,gBAAiB,KAErB,4BAEA,kCADA,kCAEA,wCACI,OAAQ,KACR,MAAO,KACP,OAAQ,KAAK,EAAE,EAAE,KACjB,cAAe,KAEnB,qBACA,2BACI,cAAe,IACf,SAAU,SACV,QAAS,EACT,OAAQ,IACR,MAAO,IACP,OAAQ,EACR,WAAY,KACZ,KAAM,IACN,IAAK,IACL,OAAQ,KAAK,EAAE,EAAE,KACjB,mBAAoB,IAAI,IAAK,YAC7B,gBAAiB,IAAI,IAAK,YAC1B,cAAe,IAAI,IAAK,YACxB,WAAY,IAAI,IAAK,YAEzB,2BACA,iCACI,MAAO,KACP,OAAQ,KACR,OAAQ,KAAK,EAAI,EAAI,KAEzB,0BACI,SAAU,SACV,IAAK,KACL,MAAO,KACP,UAAW,KACX,YAAa,KAAK,CAAE,SAAS,CAAE,WAC/B,YAAa,OACb,UAAW,MACX,SAAU,OACV,QAAS,MACT,QAAS,EACT,MAAO,EACP,OAAQ,QAEZ,gCACA,4CACI,mBAAoB,QAAQ,IAAK,QACjC,WAAY,QAAQ,IAAK,QACzB,MAAO,KACP,QAAS,EAEb,mCACI,MAAO,KAEX,kCACI,KAAM,KAGV,0BACA,8BAFA,2BAGI,OAAQ,eAIZ,oDACA,wDAFA,qDAGI,OAAQ,eAIZ,YACI,SAAU,SACV,MAAO,IACP,OAAQ,IACR,QAAS,EACT,SAAU,OACV,KAAM,cACN,YAAa,OACb,OAAQ","file":"fullpage.min.css","sourcesContent":["/*!\r\n * fullPage 3.0.8\r\n * https://github.com/alvarotrigo/fullPage.js\r\n *\r\n * @license GPLv3 for open source use only\r\n * or Fullpage Commercial License for commercial use\r\n * http://alvarotrigo.com/fullPage/pricing/\r\n *\r\n * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo\r\n */\r\nhtml.fp-enabled,\r\n.fp-enabled body {\r\n margin: 0;\r\n padding: 0;\r\n overflow:hidden;\r\n\r\n /*Avoid flicker on slides transitions for mobile phones #336 */\r\n -webkit-tap-highlight-color: rgba(0,0,0,0);\r\n}\r\n.fp-section {\r\n position: relative;\r\n -webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */\r\n -moz-box-sizing: border-box; /* <=28 */\r\n box-sizing: border-box;\r\n}\r\n.fp-slide {\r\n float: left;\r\n}\r\n.fp-slide, .fp-slidesContainer {\r\n height: 100%;\r\n display: block;\r\n}\r\n.fp-slides {\r\n z-index:1;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n -webkit-transition: all 0.3s ease-out; /* Safari<=6 Android<=4.3 */\r\n transition: all 0.3s ease-out;\r\n}\r\n.fp-section.fp-table, .fp-slide.fp-table {\r\n display: table;\r\n table-layout:fixed;\r\n width: 100%;\r\n}\r\n.fp-tableCell {\r\n display: table-cell;\r\n vertical-align: middle;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.fp-slidesContainer {\r\n float: left;\r\n position: relative;\r\n}\r\n.fp-controlArrow {\r\n -webkit-user-select: none; /* webkit (safari, chrome) browsers */\r\n -moz-user-select: none; /* mozilla browsers */\r\n -khtml-user-select: none; /* webkit (konqueror) browsers */\r\n -ms-user-select: none; /* IE10+ */\r\n position: absolute;\r\n z-index: 4;\r\n top: 50%;\r\n cursor: pointer;\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n margin-top: -38px;\r\n -webkit-transform: translate3d(0,0,0);\r\n -ms-transform: translate3d(0,0,0);\r\n transform: translate3d(0,0,0);\r\n}\r\n.fp-controlArrow.fp-prev {\r\n left: 15px;\r\n width: 0;\r\n border-width: 38.5px 34px 38.5px 0;\r\n border-color: transparent #fff transparent transparent;\r\n}\r\n.fp-controlArrow.fp-next {\r\n right: 15px;\r\n border-width: 38.5px 0 38.5px 34px;\r\n border-color: transparent transparent transparent #fff;\r\n}\r\n.fp-scrollable {\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n.fp-scroller{\r\n overflow: hidden;\r\n}\r\n.iScrollIndicator{\r\n border: 0 !important;\r\n}\r\n.fp-notransition {\r\n -webkit-transition: none !important;\r\n transition: none !important;\r\n}\r\n#fp-nav {\r\n position: fixed;\r\n z-index: 100;\r\n margin-top: -32px;\r\n top: 50%;\r\n opacity: 1;\r\n -webkit-transform: translate3d(0,0,0);\r\n}\r\n#fp-nav.fp-right {\r\n right: 17px;\r\n}\r\n#fp-nav.fp-left {\r\n left: 17px;\r\n}\r\n.fp-slidesNav{\r\n position: absolute;\r\n z-index: 4;\r\n opacity: 1;\r\n -webkit-transform: translate3d(0,0,0);\r\n -ms-transform: translate3d(0,0,0);\r\n transform: translate3d(0,0,0);\r\n left: 0 !important;\r\n right: 0;\r\n margin: 0 auto !important;\r\n}\r\n.fp-slidesNav.fp-bottom {\r\n bottom: 17px;\r\n}\r\n.fp-slidesNav.fp-top {\r\n top: 17px;\r\n}\r\n#fp-nav ul,\r\n.fp-slidesNav ul {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n#fp-nav ul li,\r\n.fp-slidesNav ul li {\r\n display: block;\r\n width: 14px;\r\n height: 13px;\r\n margin: 7px;\r\n position:relative;\r\n}\r\n.fp-slidesNav ul li {\r\n display: inline-block;\r\n}\r\n#fp-nav ul li a,\r\n.fp-slidesNav ul li a {\r\n display: block;\r\n position: relative;\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n cursor: pointer;\r\n text-decoration: none;\r\n}\r\n#fp-nav ul li a.active span,\r\n.fp-slidesNav ul li a.active span,\r\n#fp-nav ul li:hover a.active span,\r\n.fp-slidesNav ul li:hover a.active span{\r\n height: 12px;\r\n width: 12px;\r\n margin: -6px 0 0 -6px;\r\n border-radius: 100%;\r\n }\r\n#fp-nav ul li a span,\r\n.fp-slidesNav ul li a span {\r\n border-radius: 50%;\r\n position: absolute;\r\n z-index: 1;\r\n height: 4px;\r\n width: 4px;\r\n border: 0;\r\n background: #333;\r\n left: 50%;\r\n top: 50%;\r\n margin: -2px 0 0 -2px;\r\n -webkit-transition: all 0.1s ease-in-out;\r\n -moz-transition: all 0.1s ease-in-out;\r\n -o-transition: all 0.1s ease-in-out;\r\n transition: all 0.1s ease-in-out;\r\n}\r\n#fp-nav ul li:hover a span,\r\n.fp-slidesNav ul li:hover a span{\r\n width: 10px;\r\n height: 10px;\r\n margin: -5px 0px 0px -5px;\r\n}\r\n#fp-nav ul li .fp-tooltip {\r\n position: absolute;\r\n top: -2px;\r\n color: #fff;\r\n font-size: 14px;\r\n font-family: arial, helvetica, sans-serif;\r\n white-space: nowrap;\r\n max-width: 220px;\r\n overflow: hidden;\r\n display: block;\r\n opacity: 0;\r\n width: 0;\r\n cursor: pointer;\r\n}\r\n#fp-nav ul li:hover .fp-tooltip,\r\n#fp-nav.fp-show-active a.active + .fp-tooltip {\r\n -webkit-transition: opacity 0.2s ease-in;\r\n transition: opacity 0.2s ease-in;\r\n width: auto;\r\n opacity: 1;\r\n}\r\n#fp-nav ul li .fp-tooltip.fp-right {\r\n right: 20px;\r\n}\r\n#fp-nav ul li .fp-tooltip.fp-left {\r\n left: 20px;\r\n}\r\n.fp-auto-height.fp-section,\r\n.fp-auto-height .fp-slide,\r\n.fp-auto-height .fp-tableCell{\r\n height: auto !important;\r\n}\r\n\r\n.fp-responsive .fp-auto-height-responsive.fp-section,\r\n.fp-responsive .fp-auto-height-responsive .fp-slide,\r\n.fp-responsive .fp-auto-height-responsive .fp-tableCell {\r\n height: auto !important;\r\n}\r\n\r\n/*Only display content to screen readers*/\r\n.fp-sr-only{\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}"]} \ No newline at end of file +{"version":3,"sources":["fullpage.css"],"names":[],"mappings":"AAAA;;;;;;;;;AAWA,iBADA,gBAEI,OAAQ,EACR,QAAS,EACT,SAAS,OAGT,4BAA6B,cAEjC,YACI,SAAU,SACV,mBAAoB,WACpB,gBAAiB,WACjB,WAAY,WAEhB,UACI,MAAO,KAEX,UAAW,oBACP,OAAQ,KACR,QAAS,MAEb,WACI,QAAQ,EACR,OAAQ,KACR,SAAU,OACV,SAAU,SACV,mBAAoB,IAAI,IAAK,SAC7B,WAAY,IAAI,IAAK,SAEzB,qBAAsB,mBAClB,QAAS,MACT,aAAa,MACb,MAAO,KAEX,cACI,QAAS,WACT,eAAgB,OAChB,MAAO,KACP,OAAQ,KAEZ,oBACI,MAAO,KACP,SAAU,SAEd,iBACI,oBAAqB,KACrB,iBAAkB,KAClB,mBAAoB,KACpB,gBAAiB,KACjB,SAAU,SACV,QAAS,EACT,IAAK,IACL,OAAQ,QACR,MAAO,EACP,OAAQ,EACR,aAAc,MACd,WAAY,MACZ,kBAAmB,mBACnB,cAAe,mBACf,UAAW,mBAEf,yBACI,KAAM,KACN,MAAO,EACP,aAAc,OAAO,KAAK,OAAO,EACjC,aAAc,YAAY,KAAK,YAAY,YAE/C,yBACI,MAAO,KACP,aAAc,OAAO,EAAE,OAAO,KAC9B,aAAc,YAAY,YAAY,YAAY,KAEtD,eACI,SAAU,OACV,SAAU,SAEd,aACI,SAAU,OAEd,kBACI,OAAQ,YAEZ,iBACI,mBAAoB,eACpB,WAAY,eAEhB,QACI,SAAU,MACV,QAAS,IACT,IAAK,IACL,QAAS,EACT,UAAW,iBACX,cAAe,iBACf,kBAAmB,sBAEvB,iBACI,MAAO,KAEX,gBACI,KAAM,KAEV,cACI,SAAU,SACV,QAAS,EACT,QAAS,EACT,kBAAmB,mBACnB,cAAe,mBACf,UAAW,mBACX,KAAM,YACN,MAAO,EACP,OAAQ,EAAE,eAEd,wBACI,OAAQ,KAEZ,qBACI,IAAK,KAET,WACA,iBACE,OAAQ,EACR,QAAS,EAEX,cACA,oBACI,QAAS,MACT,MAAO,KACP,OAAQ,KACR,OAAQ,IACR,SAAS,SAEb,oBACI,QAAS,aAEb,gBACA,sBACI,QAAS,MACT,SAAU,SACV,QAAS,EACT,MAAO,KACP,OAAQ,KACR,OAAQ,QACR,gBAAiB,KAErB,4BAEA,kCADA,kCAEA,wCACI,OAAQ,KACR,MAAO,KACP,OAAQ,KAAK,EAAE,EAAE,KACjB,cAAe,KAEnB,qBACA,2BACI,cAAe,IACf,SAAU,SACV,QAAS,EACT,OAAQ,IACR,MAAO,IACP,OAAQ,EACR,WAAY,KACZ,KAAM,IACN,IAAK,IACL,OAAQ,KAAK,EAAE,EAAE,KACjB,mBAAoB,IAAI,IAAK,YAC7B,gBAAiB,IAAI,IAAK,YAC1B,cAAe,IAAI,IAAK,YACxB,WAAY,IAAI,IAAK,YAEzB,2BACA,iCACI,MAAO,KACP,OAAQ,KACR,OAAQ,KAAK,EAAI,EAAI,KAEzB,0BACI,SAAU,SACV,IAAK,KACL,MAAO,KACP,UAAW,KACX,YAAa,KAAK,CAAE,SAAS,CAAE,WAC/B,YAAa,OACb,UAAW,MACX,SAAU,OACV,QAAS,MACT,QAAS,EACT,MAAO,EACP,OAAQ,QAEZ,gCACA,4CACI,mBAAoB,QAAQ,IAAK,QACjC,WAAY,QAAQ,IAAK,QACzB,MAAO,KACP,QAAS,EAEb,mCACI,MAAO,KAEX,kCACI,KAAM,KAGV,0BACA,8BAFA,2BAGI,OAAQ,eAIZ,oDACA,wDAFA,qDAGI,OAAQ,eAIZ,YACI,SAAU,SACV,MAAO,IACP,OAAQ,IACR,QAAS,EACT,SAAU,OACV,KAAM,cACN,YAAa,OACb,OAAQ","file":"fullpage.min.css","sourcesContent":["/*!\r\n * fullPage 3.0.9\r\n * https://github.com/alvarotrigo/fullPage.js\r\n *\r\n * @license GPLv3 for open source use only\r\n * or Fullpage Commercial License for commercial use\r\n * http://alvarotrigo.com/fullPage/pricing/\r\n *\r\n * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo\r\n */\r\nhtml.fp-enabled,\r\n.fp-enabled body {\r\n margin: 0;\r\n padding: 0;\r\n overflow:hidden;\r\n\r\n /*Avoid flicker on slides transitions for mobile phones #336 */\r\n -webkit-tap-highlight-color: rgba(0,0,0,0);\r\n}\r\n.fp-section {\r\n position: relative;\r\n -webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */\r\n -moz-box-sizing: border-box; /* <=28 */\r\n box-sizing: border-box;\r\n}\r\n.fp-slide {\r\n float: left;\r\n}\r\n.fp-slide, .fp-slidesContainer {\r\n height: 100%;\r\n display: block;\r\n}\r\n.fp-slides {\r\n z-index:1;\r\n height: 100%;\r\n overflow: hidden;\r\n position: relative;\r\n -webkit-transition: all 0.3s ease-out; /* Safari<=6 Android<=4.3 */\r\n transition: all 0.3s ease-out;\r\n}\r\n.fp-section.fp-table, .fp-slide.fp-table {\r\n display: table;\r\n table-layout:fixed;\r\n width: 100%;\r\n}\r\n.fp-tableCell {\r\n display: table-cell;\r\n vertical-align: middle;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n.fp-slidesContainer {\r\n float: left;\r\n position: relative;\r\n}\r\n.fp-controlArrow {\r\n -webkit-user-select: none; /* webkit (safari, chrome) browsers */\r\n -moz-user-select: none; /* mozilla browsers */\r\n -khtml-user-select: none; /* webkit (konqueror) browsers */\r\n -ms-user-select: none; /* IE10+ */\r\n position: absolute;\r\n z-index: 4;\r\n top: 50%;\r\n cursor: pointer;\r\n width: 0;\r\n height: 0;\r\n border-style: solid;\r\n margin-top: -38px;\r\n -webkit-transform: translate3d(0,0,0);\r\n -ms-transform: translate3d(0,0,0);\r\n transform: translate3d(0,0,0);\r\n}\r\n.fp-controlArrow.fp-prev {\r\n left: 15px;\r\n width: 0;\r\n border-width: 38.5px 34px 38.5px 0;\r\n border-color: transparent #fff transparent transparent;\r\n}\r\n.fp-controlArrow.fp-next {\r\n right: 15px;\r\n border-width: 38.5px 0 38.5px 34px;\r\n border-color: transparent transparent transparent #fff;\r\n}\r\n.fp-scrollable {\r\n overflow: hidden;\r\n position: relative;\r\n}\r\n.fp-scroller{\r\n overflow: hidden;\r\n}\r\n.iScrollIndicator{\r\n border: 0 !important;\r\n}\r\n.fp-notransition {\r\n -webkit-transition: none !important;\r\n transition: none !important;\r\n}\r\n#fp-nav {\r\n position: fixed;\r\n z-index: 100;\r\n top: 50%;\r\n opacity: 1;\r\n transform: translateY(-50%);\r\n -ms-transform: translateY(-50%);\r\n -webkit-transform: translate3d(0,-50%,0);\r\n}\r\n#fp-nav.fp-right {\r\n right: 17px;\r\n}\r\n#fp-nav.fp-left {\r\n left: 17px;\r\n}\r\n.fp-slidesNav{\r\n position: absolute;\r\n z-index: 4;\r\n opacity: 1;\r\n -webkit-transform: translate3d(0,0,0);\r\n -ms-transform: translate3d(0,0,0);\r\n transform: translate3d(0,0,0);\r\n left: 0 !important;\r\n right: 0;\r\n margin: 0 auto !important;\r\n}\r\n.fp-slidesNav.fp-bottom {\r\n bottom: 17px;\r\n}\r\n.fp-slidesNav.fp-top {\r\n top: 17px;\r\n}\r\n#fp-nav ul,\r\n.fp-slidesNav ul {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n#fp-nav ul li,\r\n.fp-slidesNav ul li {\r\n display: block;\r\n width: 14px;\r\n height: 13px;\r\n margin: 7px;\r\n position:relative;\r\n}\r\n.fp-slidesNav ul li {\r\n display: inline-block;\r\n}\r\n#fp-nav ul li a,\r\n.fp-slidesNav ul li a {\r\n display: block;\r\n position: relative;\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n cursor: pointer;\r\n text-decoration: none;\r\n}\r\n#fp-nav ul li a.active span,\r\n.fp-slidesNav ul li a.active span,\r\n#fp-nav ul li:hover a.active span,\r\n.fp-slidesNav ul li:hover a.active span{\r\n height: 12px;\r\n width: 12px;\r\n margin: -6px 0 0 -6px;\r\n border-radius: 100%;\r\n }\r\n#fp-nav ul li a span,\r\n.fp-slidesNav ul li a span {\r\n border-radius: 50%;\r\n position: absolute;\r\n z-index: 1;\r\n height: 4px;\r\n width: 4px;\r\n border: 0;\r\n background: #333;\r\n left: 50%;\r\n top: 50%;\r\n margin: -2px 0 0 -2px;\r\n -webkit-transition: all 0.1s ease-in-out;\r\n -moz-transition: all 0.1s ease-in-out;\r\n -o-transition: all 0.1s ease-in-out;\r\n transition: all 0.1s ease-in-out;\r\n}\r\n#fp-nav ul li:hover a span,\r\n.fp-slidesNav ul li:hover a span{\r\n width: 10px;\r\n height: 10px;\r\n margin: -5px 0px 0px -5px;\r\n}\r\n#fp-nav ul li .fp-tooltip {\r\n position: absolute;\r\n top: -2px;\r\n color: #fff;\r\n font-size: 14px;\r\n font-family: arial, helvetica, sans-serif;\r\n white-space: nowrap;\r\n max-width: 220px;\r\n overflow: hidden;\r\n display: block;\r\n opacity: 0;\r\n width: 0;\r\n cursor: pointer;\r\n}\r\n#fp-nav ul li:hover .fp-tooltip,\r\n#fp-nav.fp-show-active a.active + .fp-tooltip {\r\n -webkit-transition: opacity 0.2s ease-in;\r\n transition: opacity 0.2s ease-in;\r\n width: auto;\r\n opacity: 1;\r\n}\r\n#fp-nav ul li .fp-tooltip.fp-right {\r\n right: 20px;\r\n}\r\n#fp-nav ul li .fp-tooltip.fp-left {\r\n left: 20px;\r\n}\r\n.fp-auto-height.fp-section,\r\n.fp-auto-height .fp-slide,\r\n.fp-auto-height .fp-tableCell{\r\n height: auto !important;\r\n}\r\n\r\n.fp-responsive .fp-auto-height-responsive.fp-section,\r\n.fp-responsive .fp-auto-height-responsive .fp-slide,\r\n.fp-responsive .fp-auto-height-responsive .fp-tableCell {\r\n height: auto !important;\r\n}\r\n\r\n/*Only display content to screen readers*/\r\n.fp-sr-only{\r\n position: absolute;\r\n width: 1px;\r\n height: 1px;\r\n padding: 0;\r\n overflow: hidden;\r\n clip: rect(0, 0, 0, 0);\r\n white-space: nowrap;\r\n border: 0;\r\n}\r\n"]} \ No newline at end of file diff --git a/dist/fullpage.min.js b/dist/fullpage.min.js index 7e9386ba1..7429ce112 100644 --- a/dist/fullpage.min.js +++ b/dist/fullpage.min.js @@ -1,5 +1,5 @@ /*! - * fullPage 3.0.8 + * fullPage 3.0.9 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only @@ -8,5 +8,5 @@ * * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo */ -!function(e,t,n,o,r){"function"==typeof define&&define.amd?define(function(){return e.fullpage=o(t,n),e.fullpage}):"object"==typeof exports?module.exports=o(t,n):t.fullpage=o(t,n)}(this,window,document,function(Rt,Nt){"use strict";var zt="fullpage-wrapper",jt="."+zt,Pt="fp-responsive",Dt="fp-notransition",Vt="fp-destroyed",Wt="fp-enabled",Yt="fp-viewing",Ft="active",Ut="."+Ft,Xt="fp-completely",Kt="fp-section",_t="."+Kt,$t=_t+Ut,qt="fp-tableCell",Qt="."+qt,Gt="fp-auto-height",Jt="fp-normal-scroll",Zt="fp-nav",en="#"+Zt,tn="fp-tooltip",nn="fp-slide",on="."+nn,rn=on+Ut,ln="fp-slides",an="."+ln,sn="fp-slidesContainer",cn="."+sn,un="fp-table",fn="fp-slidesNav",dn="."+fn,vn=dn+" a",e="fp-controlArrow",pn="."+e,hn="fp-prev",gn=pn+".fp-prev",mn=pn+".fp-next";function Sn(e,t){Rt.console&&Rt.console[e]&&Rt.console[e]("fullPage: "+t)}function wn(e,t){return(t=1'+be(r,"Section")+"";var l=E.navigationTooltips[r];void 0!==l&&""!==l&&(o+='
    '+l+"
    "),o+=""}wn("ul",n)[0].innerHTML=o,xn(wn(en),{"margin-top":"-"+wn(en)[0].offsetHeight/2+"px"}),Bn(wn("a",wn("li",wn(en)[0])[Cn(wn($t)[0],_t)]),Ft)}(),wn('iframe[src*="youtube.com/embed/"]',d).forEach(function(e){var t,n,o;n="enablejsapi=1",o=(t=e).getAttribute("src"),t.setAttribute("src",o+(/\?/.test(o)?"&":"?")+n)}),E.scrollOverflow&&(m=E.scrollOverflowHandler.init(E))}(),oe(!0),re(!0),J(E.autoScrolling,"internal"),at(),yt(),"complete"===Nt.readyState&&_e(),Rt.addEventListener("load",_e),E.scrollOverflow||ye(),function(){for(var e=1;e<4;e++)C=setTimeout(Se,350*e)}(),Rt.addEventListener("scroll",Ee),Rt.addEventListener("hashchange",$e),Rt.addEventListener("blur",tt),Rt.addEventListener("resize",it),Nt.addEventListener("keydown",Qe),Nt.addEventListener("keyup",Ge),["click","touchstart"].forEach(function(e){Nt.addEventListener(e,he)}),E.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){ge(e,!1)}),["mouseleave","touchend"].forEach(function(e){ge(e,!0)})));var Y=!1,F=0,U=0,X=0,K=0,_=0,$=(new Date).getTime(),q=0,Q=0,G=A;return h}function J(e,t){e||xt(0),kt("autoScrolling",e,t);var n=wn($t)[0];if(E.autoScrolling&&!E.scrollBar)xn(r,{overflow:"hidden",height:"100%"}),Z(P.recordHistory,"internal"),xn(d,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&xt(n.offsetTop);else if(xn(r,{overflow:"visible",height:"initial"}),Z(!!E.autoScrolling&&P.recordHistory,"internal"),xn(d,{"-ms-touch-action":"","touch-action":""}),null!=n){var o=je(n.offsetTop);o.element.scrollTo(0,o.options)}}function Z(e,t){kt("recordHistory",e,t)}function ee(e,t){kt("scrollingSpeed",e,t)}function te(e,t){kt("fitToSection",e,t)}function ne(e){e?(function(){var e,t="";Rt.addEventListener?e="addEventListener":(e="attachEvent",t="on");var n="onwheel"in Nt.createElement("div")?"wheel":void 0!==Nt.onmousewheel?"mousewheel":"DOMMouseScroll",o=!!R&&{passive:!1};"DOMMouseScroll"==n?Nt[e](t+"MozMousePixelScroll",Ce,o):Nt[e](t+n,Ce,o)}(),d.addEventListener("mousedown",Je),d.addEventListener("mouseup",Ze)):(Nt.addEventListener?(Nt.removeEventListener("mousewheel",Ce,!1),Nt.removeEventListener("wheel",Ce,!1),Nt.removeEventListener("MozMousePixelScroll",Ce,!1)):Nt.detachEvent("onmousewheel",Ce),d.removeEventListener("mousedown",Je),d.removeEventListener("mouseup",Ze))}function oe(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Tt(t,e,"m")}):Tt(t,"all","m")}function re(e){e?(ne(!0),function(){if(o||l){E.autoScrolling&&(L.removeEventListener(I.touchmove,Ae,{passive:!1}),L.addEventListener(I.touchmove,Ae,{passive:!1}));var e=E.touchWrapper;e.removeEventListener(I.touchstart,Oe),e.removeEventListener(I.touchmove,Te,{passive:!1}),e.addEventListener(I.touchstart,Oe),e.addEventListener(I.touchmove,Te,{passive:!1})}}()):(ne(!1),function(){if(o||l){E.autoScrolling&&(L.removeEventListener(I.touchmove,Te,{passive:!1}),L.removeEventListener(I.touchmove,Ae,{passive:!1}));var e=E.touchWrapper;e.removeEventListener(I.touchstart,Oe),e.removeEventListener(I.touchmove,Te,{passive:!1})}}())}function ie(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Tt(t,e,"k")}):(Tt(t,"all","k"),E.keyboardScrolling=t)}function le(){var e=An(wn($t)[0],_t);e||!E.loopTop&&!E.continuousVertical||(e=Mn(wn(_t))),null!=e&&Be(e,null,!0)}function ae(){var e=Tn(wn($t)[0],_t);e||!E.loopBottom&&!E.continuousVertical||(e=wn(_t)[0]),null!=e&&Be(e,null,!1)}function se(e,t){ee(0,"internal"),ce(e,t),ee(P.scrollingSpeed,"internal")}function ce(e,t){var n=ht(e);void 0!==t?gt(e,t):null!=n&&Be(n)}function ue(e){He("right",e)}function fe(e){He("left",e)}function de(e){if(!yn(d,Vt)){g=!0,A=En(),s=Ln();for(var t=wn(_t),n=0;n'),qn('
    ')],Vn(wn(an,l)[0],a),"#fff"!==E.controlArrowColor&&(xn(wn(mn,l),{"border-color":"transparent transparent transparent "+E.controlArrowColor}),xn(wn(gn,l),{"border-color":"transparent "+E.controlArrowColor+" transparent transparent"})),E.loopHorizontal||Hn(wn(gn,l))),E.slidesNavigation&&function(e,t){Nn(qn('
      '),e);var n=wn(dn,e)[0];Bn(n,"fp-"+E.slidesNavPosition);for(var o=0;o'+be(o,"Slide")+""),wn("ul",n)[0]);xn(n,{"margin-left":"-"+n.innerWidth/2+"px"}),Bn(wn("a",wn("li",n)[0]),Ft)}(e,n)),t.forEach(function(e){xn(e,{width:r+"%"}),E.verticalCentered&&dt(e)});var c=wn(rn,e)[0];null!=c&&(0!==Cn(wn($t),_t)||0===Cn(wn($t),_t)&&0!==Cn(c))?Lt(c,"internal"):Bn(t[0],Ft)}function be(e,t){return E.navigationTooltips[e]||E.anchors[e]||t+" "+(e+1)}function ye(){var e,t,n=wn($t)[0];Bn(n,Xt),We(n),Ve(),Fe(n),E.scrollOverflow&&E.scrollOverflowHandler.afterLoad(),e=qe(),t=ht(e.section),e.section&&t&&(void 0===t||Cn(t)!==Cn(f))||!Xn(E.afterLoad)||Re("afterLoad",{activeSection:n,element:n,direction:null,anchorLink:n.getAttribute("data-anchor"),sectionIndex:Cn(n,_t)}),Xn(E.afterRender)&&Re("afterRender")}function Ee(){var e,t,n,o,r,i;if(!E.autoScrolling||E.scrollBar){var l=Yn(),a=(i=F<(r=l)?"down":"up",q=F=r,i),s=0,c=l+En()/2,u=L.offsetHeight-En()===l,f=wn(_t);if(u)s=f.length-1;else if(l)for(var d=0;d=Yn()+En())&&(yn(wn($t)[0],Xt)||(Bn(wn($t)[0],Xt),Rn(Fn(wn($t)[0]),Xt))),!yn(e=f[s],Ft)){Y=!0;var v,p,h=wn($t)[0],g=Cn(h,_t)+1,m=ft(e),S=e.getAttribute("data-anchor"),w=Cn(e,_t)+1,b=wn(rn,e)[0],y={activeSection:h,sectionIndex:w-1,anchorLink:S,element:e,leavingSection:g,direction:m};b&&(p=b.getAttribute("data-anchor"),v=Cn(b)),T&&(Bn(e,Ft),Rn(Fn(e),Ft),Xn(E.onLeave)&&Re("onLeave",y),Xn(E.afterLoad)&&Re("afterLoad",y),Xe(h),We(e),Fe(e),ut(S,w-1),E.anchors.length&&(x=S),St(v,p,S)),clearTimeout(k),k=setTimeout(function(){Y=!1},100)}E.fitToSection&&(clearTimeout(O),O=setTimeout(function(){E.fitToSection&&wn($t)[0].offsetHeight<=A&&Le()},E.fitToSectionDelay))}}function Le(){T&&(g=!0,Be(wn($t)[0]),g=!1)}function xe(e){if(p.m[e]){var t="down"===e?ae:le;if(E.scrollOverflow){var n=E.scrollOverflowHandler.scrollable(wn($t)[0]),o="down"===e?"bottom":"top";if(null!=n){if(!E.scrollOverflowHandler.isScrolled(o,n))return!0;t()}else t()}else t()}}function Ae(e){E.autoScrolling&&ke(e)&&p.m.up&&Un(e)}function Te(e){var t=Dn(e.target,_t)||wn($t)[0];if(ke(e)){E.autoScrolling&&Un(e);var n=Et(e);K=n.y,_=n.x,wn(an,t).length&&Math.abs(X-_)>Math.abs(U-K)?!a&&Math.abs(X-_)>Ln()/100*E.touchSensitivity&&(_Rt.innerHeight/100*E.touchSensitivity&&(KQ&&p.m.down&&ae()),Q=e.pageY)}function ot(e,t,n){var o,r,i=Dn(e,_t),l={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:Cn(t),section:i,sectionIndex:Cn(i,_t),anchorLink:i.getAttribute("data-anchor"),slidesNav:wn(dn,i)[0],slideAnchor:bt(t),prevSlide:wn(rn,i)[0],prevSlideIndex:Cn(wn(rn,i)[0]),localIsResizing:g};l.xMovement=(o=l.prevSlideIndex,r=l.slideIndex,o==r?"none":r20*Math.max(G,t)/100&&(de(!0),G=t)}}else Se()}function at(){var e=E.responsive||E.responsiveWidth,t=E.responsiveHeight,n=e&&Rt.innerWidth'+ye(r,"Section")+"";var l=E.navigationTooltips[r];void 0!==l&&""!==l&&(o+='
      '+l+"
      "),o+=""}yn("ul",n)[0].innerHTML=o,Nn(yn("a",yn("li",yn(nn)[0])[In(yn(Qt)[0],qt)]),Xt)}(),yn('iframe[src*="youtube.com/embed/"]',d).forEach(function(e){var t,n,o;n="enablejsapi=1",o=(t=e).getAttribute("src"),t.setAttribute("src",o+(/\?/.test(o)?"&":"?")+n)}),E.scrollOverflow&&(g=E.scrollOverflowHandler.init(E))}(),re(!0),ie(!0),Z(E.autoScrolling,"internal"),ct(),Lt(),"complete"===jt.readyState&&$e(),zt.addEventListener("load",$e),E.scrollOverflow||Ee(),function(){for(var e=1;e<4;e++)C=setTimeout(we,350*e)}(),zt.addEventListener("scroll",Le),zt.addEventListener("hashchange",qe),zt.addEventListener("focus",nt),zt.addEventListener("blur",ot),zt.addEventListener("resize",at),jt.addEventListener("keydown",Ge),jt.addEventListener("keyup",Je),["click","touchstart"].forEach(function(e){jt.addEventListener(e,ge)}),E.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){me(e,!1)}),["mouseleave","touchend"].forEach(function(e){me(e,!0)})));var F=!1,U=0,X=0,K=0,_=0,$=0,q=(new Date).getTime(),Q=0,G=0,J=A;return h}function Z(e,t){e||Tt(0),Mt("autoScrolling",e,t);var n=yn(Qt)[0];if(E.autoScrolling&&!E.scrollBar)Tn(r,{overflow:"hidden",height:"100%"}),ee(D.recordHistory,"internal"),Tn(d,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&Tt(n.offsetTop);else if(Tn(r,{overflow:"visible",height:"initial"}),ee(!!E.autoScrolling&&D.recordHistory,"internal"),Tn(d,{"-ms-touch-action":"","touch-action":""}),null!=n){var o=Pe(n.offsetTop);o.element.scrollTo(0,o.options)}}function ee(e,t){Mt("recordHistory",e,t)}function te(e,t){Mt("scrollingSpeed",e,t)}function ne(e,t){Mt("fitToSection",e,t)}function oe(e){e?(function(){var e,t="";zt.addEventListener?e="addEventListener":(e="attachEvent",t="on");var n="onwheel"in jt.createElement("div")?"wheel":void 0!==jt.onmousewheel?"mousewheel":"DOMMouseScroll",o=!!R&&{passive:!1};"DOMMouseScroll"==n?jt[e](t+"MozMousePixelScroll",He,o):jt[e](t+n,He,o)}(),d.addEventListener("mousedown",Ze),d.addEventListener("mouseup",et)):(jt.addEventListener?(jt.removeEventListener("mousewheel",He,!1),jt.removeEventListener("wheel",He,!1),jt.removeEventListener("MozMousePixelScroll",He,!1)):jt.detachEvent("onmousewheel",He),d.removeEventListener("mousedown",Ze),d.removeEventListener("mouseup",et))}function re(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Ot(t,e,"m")}):Ot(t,"all","m")}function ie(e){e?(oe(!0),function(){if(o||l){E.autoScrolling&&(L.removeEventListener(I.touchmove,Te,{passive:!1}),L.addEventListener(I.touchmove,Te,{passive:!1}));var e=E.touchWrapper;e.removeEventListener(I.touchstart,Me),e.removeEventListener(I.touchmove,ke,{passive:!1}),e.addEventListener(I.touchstart,Me),e.addEventListener(I.touchmove,ke,{passive:!1})}}()):(oe(!1),function(){if(o||l){E.autoScrolling&&(L.removeEventListener(I.touchmove,ke,{passive:!1}),L.removeEventListener(I.touchmove,Te,{passive:!1}));var e=E.touchWrapper;e.removeEventListener(I.touchstart,Me),e.removeEventListener(I.touchmove,ke,{passive:!1})}}())}function le(t,e){void 0!==e?(e=e.replace(/ /g,"").split(",")).forEach(function(e){Ot(t,e,"k")}):(Ot(t,"all","k"),E.keyboardScrolling=t)}function ae(){var e=kn(yn(Qt)[0],qt);e||!E.loopTop&&!E.continuousVertical||(e=Hn(yn(qt))),null!=e&&Re(e,null,!0)}function se(){var e=On(yn(Qt)[0],qt);e||!E.loopBottom&&!E.continuousVertical||(e=yn(qt)[0]),null!=e&&Re(e,null,!1)}function ce(e,t){te(0,"internal"),ue(e,t),te(D.scrollingSpeed,"internal")}function ue(e,t){var n=mt(e);void 0!==t?St(e,t):null!=n&&Re(n)}function fe(e){Ie("right",e)}function de(e){Ie("left",e)}function ve(e){if(!Ln(d,Yt)){T=!0,A=xn(),s=An();for(var t=yn(qt),n=0;n'),Gn('
      ')],Yn(yn(cn,l)[0],a),"#fff"!==E.controlArrowColor&&(Tn(yn(wn,l),{"border-color":"transparent transparent transparent "+E.controlArrowColor}),Tn(yn(Sn,l),{"border-color":"transparent "+E.controlArrowColor+" transparent transparent"})),E.loopHorizontal||Bn(yn(Sn,l))),E.slidesNavigation&&function(e,t){jn(Gn('
        '),e);var n=yn(pn,e)[0];Nn(n,"fp-"+E.slidesNavPosition);for(var o=0;o'+ye(o,"Slide",r)+""),yn("ul",n)[0])}Tn(n,{"margin-left":"-"+n.innerWidth/2+"px"}),Nn(yn("a",yn("li",n)[0]),Xt)}(e,n)),t.forEach(function(e){Tn(e,{width:r+"%"}),E.verticalCentered&&pt(e)});var c=yn(an,e)[0];null!=c&&(0!==In(yn(Qt),qt)||0===In(yn(Qt),qt)&&0!==In(c))?At(c,"internal"):Nn(t[0],Xt)}function ye(e,t,n){var o="Section"===t?E.anchors[e]:n.getAttribute("data-anchor");return E.navigationTooltips[e]||o||t+" "+(e+1)}function Ee(){var e,t,n=yn(Qt)[0];Nn(n,_t),Ye(n),We(),Ue(n),E.scrollOverflow&&E.scrollOverflowHandler.afterLoad(),e=Qe(),t=mt(e.section),e.section&&t&&(void 0===t||In(t)!==In(f))||!_n(E.afterLoad)||Ne("afterLoad",{activeSection:n,element:n,direction:null,anchorLink:n.getAttribute("data-anchor"),sectionIndex:In(n,qt)}),_n(E.afterRender)&&Ne("afterRender")}function Le(){var e,t,n,o,r,i;if(!T&&(!E.autoScrolling||E.scrollBar)){var l=Un(),a=(i=U<(r=l)?"down":"up",Q=U=r,i),s=0,c=l+xn()/2,u=L.offsetHeight-xn()===l,f=yn(qt);if(u)s=f.length-1;else if(l)for(var d=0;d=Un()+xn())&&(Ln(yn(Qt)[0],_t)||(Nn(yn(Qt)[0],_t),zn(Xn(yn(Qt)[0]),_t))),!Ln(e=f[s],Xt)){F=!0;var v,p,h=yn(Qt)[0],g=In(h,qt)+1,m=vt(e),S=e.getAttribute("data-anchor"),w=In(e,qt)+1,b=yn(an,e)[0],y={activeSection:h,sectionIndex:w-1,anchorLink:S,element:e,leavingSection:g,direction:m};b&&(p=b.getAttribute("data-anchor"),v=In(b)),k&&(Nn(e,Xt),zn(Xn(e),Xt),_n(E.onLeave)&&Ne("onLeave",y),_n(E.afterLoad)&&Ne("afterLoad",y),Ke(h),Ye(e),Ue(e),dt(S,w-1),E.anchors.length&&(x=S),bt(v,p,S)),clearTimeout(O),O=setTimeout(function(){F=!1},100)}E.fitToSection&&(clearTimeout(M),M=setTimeout(function(){E.fitToSection&&yn(Qt)[0].offsetHeight<=A&&xe()},E.fitToSectionDelay))}}function xe(){k&&(T=!0,Re(yn(Qt)[0]),T=!1)}function Ae(e){if(p.m[e]){var t="down"===e?se:ae;if(E.scrollOverflow){var n=E.scrollOverflowHandler.scrollable(yn(Qt)[0]),o="down"===e?"bottom":"top";if(null!=n){if(!E.scrollOverflowHandler.isScrolled(o,n))return!0;t()}else t()}else t()}}function Te(e){E.autoScrolling&&Oe(e)&&p.m.up&&Kn(e)}function ke(e){var t=Wn(e.target,qt)||yn(Qt)[0];if(Oe(e)){E.autoScrolling&&Kn(e);var n=xt(e);_=n.y,$=n.x,yn(cn,t).length&&Math.abs(K-$)>Math.abs(X-_)?!a&&Math.abs(K-$)>An()/100*E.touchSensitivity&&($zt.innerHeight/100*E.touchSensitivity&&(_G&&p.m.down&&se()),G=e.pageY)}function it(e,t,n){var o,r,i=Wn(e,qt),l={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:In(t),section:i,sectionIndex:In(i,qt),anchorLink:i.getAttribute("data-anchor"),slidesNav:yn(pn,i)[0],slideAnchor:Et(t),prevSlide:yn(an,i)[0],prevSlideIndex:In(yn(an,i)[0]),localIsResizing:T};l.xMovement=(o=l.prevSlideIndex,r=l.slideIndex,o==r?"none":r20*Math.max(J,t)/100&&(ve(!0),J=t)}}else we()}function ct(){var e=E.responsive||E.responsiveWidth,t=E.responsiveHeight,n=e&&zt.innerWidth -1;\r\n\r\n // cache common elements\r\n var $htmlBody = $('html, body');\r\n var $html = $('html')[0];\r\n var $body = $('body')[0];\r\n\r\n //only once my friend!\r\n if(hasClass($html, ENABLED)){ displayWarnings(); return; }\r\n\r\n var FP = {};\r\n\r\n // Creating some defaults, extending them with any options that were provided\r\n options = deepExtend({\r\n //navigation\r\n menu: false,\r\n anchors:[],\r\n lockAnchors: false,\r\n navigation: false,\r\n navigationPosition: 'right',\r\n navigationTooltips: [],\r\n showActiveTooltip: false,\r\n slidesNavigation: false,\r\n slidesNavPosition: 'bottom',\r\n scrollBar: false,\r\n hybrid: false,\r\n\r\n //scrolling\r\n css3: true,\r\n scrollingSpeed: 700,\r\n autoScrolling: true,\r\n fitToSection: true,\r\n fitToSectionDelay: 1000,\r\n easing: 'easeInOutCubic',\r\n easingcss3: 'ease',\r\n loopBottom: false,\r\n loopTop: false,\r\n loopHorizontal: true,\r\n continuousVertical: false,\r\n continuousHorizontal: false,\r\n scrollHorizontally: false,\r\n interlockedSlides: false,\r\n dragAndMove: false,\r\n offsetSections: false,\r\n resetSliders: false,\r\n fadingEffect: false,\r\n normalScrollElements: null,\r\n scrollOverflow: false,\r\n scrollOverflowReset: false,\r\n scrollOverflowHandler: window.fp_scrolloverflow ? window.fp_scrolloverflow.iscrollHandler : null,\r\n scrollOverflowOptions: null,\r\n touchSensitivity: 5,\r\n touchWrapper: typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector,\r\n bigSectionsDestination: null,\r\n\r\n //Accessibility\r\n keyboardScrolling: true,\r\n animateAnchor: true,\r\n recordHistory: true,\r\n\r\n //design\r\n controlArrows: true,\r\n controlArrowColor: '#fff',\r\n verticalCentered: true,\r\n sectionsColor : [],\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n fixedElements: null,\r\n responsive: 0, //backwards compabitility with responsiveWiddth\r\n responsiveWidth: 0,\r\n responsiveHeight: 0,\r\n responsiveSlides: false,\r\n parallax: false,\r\n parallaxOptions: {\r\n type: 'reveal',\r\n percentage: 62,\r\n property: 'translate'\r\n },\r\n cards: false,\r\n cardsOptions: {\r\n perspective: 100,\r\n fadeContent: true,\r\n fadeBackground: true\r\n },\r\n\r\n //Custom selectors\r\n sectionSelector: SECTION_DEFAULT_SEL,\r\n slideSelector: SLIDE_DEFAULT_SEL,\r\n\r\n //events\r\n v2compatible: false,\r\n afterLoad: null,\r\n onLeave: null,\r\n afterRender: null,\r\n afterResize: null,\r\n afterReBuild: null,\r\n afterSlideLoad: null,\r\n onSlideLeave: null,\r\n afterResponsive: null,\r\n\r\n lazyLoading: true\r\n }, options);\r\n\r\n //flag to avoid very fast sliding for landscape sliders\r\n var slideMoving = false;\r\n\r\n var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);\r\n var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));\r\n var container = typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector;\r\n var windowsHeight = getWindowHeight();\r\n var windowsWidth = getWindowWidth();\r\n var isResizing = false;\r\n var isWindowFocused = true;\r\n var lastScrolledDestiny;\r\n var lastScrolledSlide;\r\n var canScroll = true;\r\n var scrollings = [];\r\n var controlPressed;\r\n var startingSection;\r\n var isScrollAllowed = {};\r\n isScrollAllowed.m = { 'up':true, 'down':true, 'left':true, 'right':true };\r\n isScrollAllowed.k = deepExtend({}, isScrollAllowed.m);\r\n var MSPointer = getMSPointer();\r\n var events = {\r\n touchmove: 'ontouchmove' in window ? 'touchmove' : MSPointer.move,\r\n touchstart: 'ontouchstart' in window ? 'touchstart' : MSPointer.down\r\n };\r\n var scrollBarHandler;\r\n\r\n // taken from https://github.com/udacity/ud891/blob/gh-pages/lesson2-focus/07-modals-and-keyboard-traps/solution/modal.js\r\n var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex=\"0\"], [contenteditable]';\r\n\r\n //cheks for passive event support\r\n var g_supportsPassive = false;\r\n try {\r\n var opts = Object.defineProperty({}, 'passive', {\r\n get: function() {\r\n g_supportsPassive = true;\r\n }\r\n });\r\n window.addEventListener(\"testPassive\", null, opts);\r\n window.removeEventListener(\"testPassive\", null, opts);\r\n } catch (e) {}\r\n\r\n //timeouts\r\n var resizeId;\r\n var resizeHandlerId;\r\n var afterSectionLoadsId;\r\n var afterSlideLoadsId;\r\n var scrollId;\r\n var scrollId2;\r\n var keydownId;\r\n var g_doubleCheckHeightId;\r\n var originals = deepExtend({}, options); //deep copy\r\n var activeAnimation;\r\n var g_initialAnchorsInDom = false;\r\n var g_canFireMouseEnterNormalScroll = true;\r\n var g_mediaLoadedId;\r\n var extensions = [\r\n 'parallax',\r\n 'scrollOverflowReset',\r\n 'dragAndMove',\r\n 'offsetSections',\r\n 'fadingEffect',\r\n 'responsiveSlides',\r\n 'continuousHorizontal',\r\n 'interlockedSlides',\r\n 'scrollHorizontally',\r\n 'resetSliders',\r\n 'cards'\r\n ];\r\n\r\n displayWarnings();\r\n\r\n //easeInOutCubic animation included in the plugin\r\n window.fp_easings = deepExtend(window.fp_easings, {\r\n easeInOutCubic: function (t, b, c, d) {\r\n if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;\r\n }\r\n });\r\n\r\n /**\r\n * Sets the autoScroll option.\r\n * It changes the scroll bar visibility and the history of the site as a result.\r\n */\r\n function setAutoScrolling(value, type){\r\n //removing the transformation\r\n if(!value){\r\n silentScroll(0);\r\n }\r\n\r\n setVariableState('autoScrolling', value, type);\r\n\r\n var element = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n if(options.autoScrolling && !options.scrollBar){\r\n css($htmlBody, {\r\n 'overflow': 'hidden',\r\n 'height': '100%'\r\n });\r\n\r\n setRecordHistory(originals.recordHistory, 'internal');\r\n\r\n //for IE touch devices\r\n css(container, {\r\n '-ms-touch-action': 'none',\r\n 'touch-action': 'none'\r\n });\r\n\r\n if(element != null){\r\n //moving the container up\r\n silentScroll(element.offsetTop);\r\n }\r\n }else{\r\n css($htmlBody, {\r\n 'overflow' : 'visible',\r\n 'height' : 'initial'\r\n });\r\n\r\n var recordHistory = !options.autoScrolling ? false : originals.recordHistory;\r\n setRecordHistory(recordHistory, 'internal');\r\n\r\n //for IE touch devices\r\n css(container, {\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n //scrolling the page to the section with no animation\r\n if (element != null) {\r\n var scrollSettings = getScrollSettings(element.offsetTop);\r\n scrollSettings.element.scrollTo(0, scrollSettings.options);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Defines wheter to record the history for each hash change in the URL.\r\n */\r\n function setRecordHistory(value, type){\r\n setVariableState('recordHistory', value, type);\r\n }\r\n\r\n /**\r\n * Defines the scrolling speed\r\n */\r\n function setScrollingSpeed(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n }\r\n\r\n /**\r\n * Sets fitToSection\r\n */\r\n function setFitToSection(value, type){\r\n setVariableState('fitToSection', value, type);\r\n }\r\n\r\n /**\r\n * Sets lockAnchors\r\n */\r\n function setLockAnchors(value){\r\n options.lockAnchors = value;\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the mouse wheel or the trackpad.\r\n */\r\n function setMouseWheelScrolling(value){\r\n if(value){\r\n addMouseWheelHandler();\r\n addMiddleWheelHandler();\r\n }else{\r\n removeMouseWheelHandler();\r\n removeMiddleWheelHandler();\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the mouse wheel/trackpad or touch gestures.\r\n * Optionally a second parameter can be used to specify the direction for which the action will be applied.\r\n *\r\n * @param directions string containing the direction or directions separated by comma.\r\n */\r\n function setAllowScrolling(value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n directions.forEach(function (direction){\r\n setIsScrollAllowed(value, direction, 'm');\r\n });\r\n }\r\n else{\r\n setIsScrollAllowed(value, 'all', 'm');\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the mouse wheel hijacking\r\n */\r\n function setMouseHijack(value){\r\n if(value){\r\n setMouseWheelScrolling(true);\r\n addTouchHandler();\r\n }else{\r\n setMouseWheelScrolling(false);\r\n removeTouchHandler();\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys\r\n */\r\n function setKeyboardScrolling(value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n directions.forEach(function(direction){\r\n setIsScrollAllowed(value, direction, 'k');\r\n });\r\n }else{\r\n setIsScrollAllowed(value, 'all', 'k');\r\n options.keyboardScrolling = value;\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page up one section.\r\n */\r\n function moveSectionUp(){\r\n var prev = prevUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n\r\n //looping to the bottom if there's no more sections above\r\n if (!prev && (options.loopTop || options.continuousVertical)) {\r\n prev = last($(SECTION_SEL));\r\n }\r\n\r\n if (prev != null) {\r\n scrollPage(prev, null, true);\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page down one section.\r\n */\r\n function moveSectionDown(){\r\n var next = nextUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n\r\n //looping to the top if there's no more sections below\r\n if(!next &&\r\n (options.loopBottom || options.continuousVertical)){\r\n next = $(SECTION_SEL)[0];\r\n }\r\n\r\n if(next != null){\r\n scrollPage(next, null, false);\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page to the given section and slide with no animation.\r\n * Anchors or index positions can be used as params.\r\n */\r\n function silentMoveTo(sectionAnchor, slideAnchor){\r\n setScrollingSpeed (0, 'internal');\r\n moveTo(sectionAnchor, slideAnchor);\r\n setScrollingSpeed (originals.scrollingSpeed, 'internal');\r\n }\r\n\r\n /**\r\n * Moves the page to the given section and slide.\r\n * Anchors or index positions can be used as params.\r\n */\r\n function moveTo(sectionAnchor, slideAnchor){\r\n var destiny = getSectionByAnchor(sectionAnchor);\r\n\r\n if (typeof slideAnchor !== 'undefined'){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else if(destiny != null){\r\n scrollPage(destiny);\r\n }\r\n }\r\n\r\n /**\r\n * Slides right the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n function moveSlideRight(section){\r\n moveSlide('right', section);\r\n }\r\n\r\n /**\r\n * Slides left the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n function moveSlideLeft(section){\r\n moveSlide('left', section);\r\n }\r\n\r\n /**\r\n * When resizing is finished, we adjust the slides sizes and positions\r\n */\r\n function reBuild(resizing){\r\n if(hasClass(container, DESTROYED)){ return; } //nothing to do if the plugin was destroyed\r\n\r\n isResizing = true;\r\n\r\n //updating global vars\r\n windowsHeight = getWindowHeight();\r\n windowsWidth = getWindowWidth();\r\n\r\n var sections = $(SECTION_SEL);\r\n for (var i = 0; i < sections.length; ++i) {\r\n var section = sections[i];\r\n var slidesWrap = $(SLIDES_WRAPPER_SEL, section)[0];\r\n var slides = $(SLIDE_SEL, section);\r\n\r\n //adjusting the height of the table-cell for IE and Firefox\r\n if(options.verticalCentered){\r\n css($(TABLE_CELL_SEL, section), {'height': getTableHeight(section) + 'px'});\r\n }\r\n\r\n css(section, {'height': windowsHeight + 'px'});\r\n\r\n //adjusting the position fo the FULL WIDTH slides...\r\n if (slides.length > 1) {\r\n landscapeScroll(slidesWrap, $(SLIDE_ACTIVE_SEL, slidesWrap)[0]);\r\n }\r\n }\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler.createScrollBarForAll();\r\n }\r\n\r\n var activeSection = $(SECTION_ACTIVE_SEL)[0];\r\n var sectionIndex = index(activeSection, SECTION_SEL);\r\n\r\n //isn't it the first section?\r\n if(sectionIndex){\r\n //adjusting the position for the current section\r\n silentMoveTo(sectionIndex + 1);\r\n }\r\n\r\n isResizing = false;\r\n if(isFunction( options.afterResize ) && resizing){\r\n options.afterResize.call(container, window.innerWidth, window.innerHeight);\r\n }\r\n if(isFunction( options.afterReBuild ) && !resizing){\r\n options.afterReBuild.call(container);\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether fullpage.js is in responsive mode or not.\r\n */\r\n function isResponsiveMode(){\r\n return hasClass($body, RESPONSIVE);\r\n }\r\n\r\n /**\r\n * Turns fullPage.js to normal scrolling mode when the viewport `width` or `height`\r\n * are smaller than the set limit values.\r\n */\r\n function setResponsive(active){\r\n var isResponsive = isResponsiveMode();\r\n\r\n if(active){\r\n if(!isResponsive){\r\n setAutoScrolling(false, 'internal');\r\n setFitToSection(false, 'internal');\r\n hide($(SECTION_NAV_SEL));\r\n addClass($body, RESPONSIVE);\r\n if(isFunction( options.afterResponsive )){\r\n options.afterResponsive.call( container, active);\r\n }\r\n\r\n //when on page load, we will remove scrolloverflow if necessary\r\n if(options.scrollOverflow){\r\n scrollBarHandler.createScrollBarForAll();\r\n }\r\n }\r\n }\r\n else if(isResponsive){\r\n setAutoScrolling(originals.autoScrolling, 'internal');\r\n setFitToSection(originals.autoScrolling, 'internal');\r\n show($(SECTION_NAV_SEL));\r\n removeClass($body, RESPONSIVE);\r\n if(isFunction( options.afterResponsive )){\r\n options.afterResponsive.call( container, active);\r\n }\r\n }\r\n }\r\n\r\n if(container){\r\n //public functions\r\n FP.version = '3.0.8';\r\n FP.setAutoScrolling = setAutoScrolling;\r\n FP.setRecordHistory = setRecordHistory;\r\n FP.setScrollingSpeed = setScrollingSpeed;\r\n FP.setFitToSection = setFitToSection;\r\n FP.setLockAnchors = setLockAnchors;\r\n FP.setMouseWheelScrolling = setMouseWheelScrolling;\r\n FP.setAllowScrolling = setAllowScrolling;\r\n FP.setKeyboardScrolling = setKeyboardScrolling;\r\n FP.moveSectionUp = moveSectionUp;\r\n FP.moveSectionDown = moveSectionDown;\r\n FP.silentMoveTo = silentMoveTo;\r\n FP.moveTo = moveTo;\r\n FP.moveSlideRight = moveSlideRight;\r\n FP.moveSlideLeft = moveSlideLeft;\r\n FP.fitToSection = fitToSection;\r\n FP.reBuild = reBuild;\r\n FP.setResponsive = setResponsive;\r\n FP.getFullpageData = function(){ return options; };\r\n FP.destroy = destroy;\r\n FP.getActiveSection = getActiveSection;\r\n FP.getActiveSlide = getActiveSlide;\r\n\r\n FP.test = {\r\n top: '0px',\r\n translate3d: 'translate3d(0px, 0px, 0px)',\r\n translate3dH: (function(){\r\n var a = [];\r\n for(var i = 0; i < $(options.sectionSelector, container).length; i++){\r\n a.push('translate3d(0px, 0px, 0px)');\r\n }\r\n return a;\r\n })(),\r\n left: (function(){\r\n var a = [];\r\n for(var i = 0; i < $(options.sectionSelector, container).length; i++){\r\n a.push(0);\r\n }\r\n return a;\r\n })(),\r\n options: options,\r\n setAutoScrolling: setAutoScrolling\r\n };\r\n\r\n //functions we want to share across files but which are not\r\n //mean to be used on their own by developers\r\n FP.shared = {\r\n afterRenderActions: afterRenderActions,\r\n isNormalScrollElement: false\r\n };\r\n\r\n window.fullpage_api = FP;\r\n\r\n //using jQuery initialization? Creating the $.fn.fullpage object\r\n if(options.$){\r\n Object.keys(FP).forEach(function (key) { \r\n options.$.fn.fullpage[key] = FP[key]; \r\n });\r\n }\r\n\r\n init();\r\n\r\n bindEvents();\r\n }\r\n\r\n function init(){\r\n //if css3 is not supported, it will use jQuery animations\r\n if(options.css3){\r\n options.css3 = support3d();\r\n }\r\n\r\n options.scrollBar = options.scrollBar || options.hybrid;\r\n\r\n setOptionsFromDOM();\r\n prepareDom();\r\n setAllowScrolling(true);\r\n setMouseHijack(true);\r\n setAutoScrolling(options.autoScrolling, 'internal');\r\n responsive();\r\n\r\n //setting the class for the body element\r\n setBodyClass();\r\n\r\n if(document.readyState === 'complete'){\r\n scrollToAnchor();\r\n }\r\n window.addEventListener('load', scrollToAnchor);\r\n\r\n //if we use scrollOverflow we'll fire afterRender in the scrolloverflow file\r\n if(!options.scrollOverflow){\r\n afterRenderActions();\r\n }\r\n\r\n doubleCheckHeight();\r\n }\r\n\r\n function bindEvents(){\r\n\r\n //when scrolling...\r\n window.addEventListener('scroll', scrollHandler);\r\n\r\n //detecting any change on the URL to scroll to the given anchor link\r\n //(a way to detect back history button as we play with the hashes on the URL)\r\n window.addEventListener('hashchange', hashChangeHandler);\r\n\r\n //when opening a new tab (ctrl + t), `control` won't be pressed when coming back.\r\n window.addEventListener('blur', blurHandler);\r\n\r\n //when resizing the site, we adjust the heights of the sections, slimScroll...\r\n window.addEventListener('resize', resizeHandler);\r\n\r\n //Sliding with arrow keys, both, vertical and horizontal\r\n document.addEventListener('keydown', keydownHandler);\r\n\r\n //to prevent scrolling while zooming\r\n document.addEventListener('keyup', keyUpHandler);\r\n\r\n //Scrolls to the section when clicking the navigation bullet\r\n //simulating the jQuery .on('click') event using delegation\r\n ['click', 'touchstart'].forEach(function(eventName){\r\n document.addEventListener(eventName, delegatedEvents);\r\n });\r\n\r\n /**\r\n * Applying normalScroll elements.\r\n * Ignoring the scrolls over the specified selectors.\r\n */\r\n if(options.normalScrollElements){\r\n ['mouseenter', 'touchstart'].forEach(function(eventName){\r\n forMouseLeaveOrTouch(eventName, false);\r\n });\r\n\r\n ['mouseleave', 'touchend'].forEach(function(eventName){\r\n forMouseLeaveOrTouch(eventName, true);\r\n });\r\n }\r\n }\r\n\r\n function delegatedEvents(e){\r\n var target = e.target;\r\n\r\n if(target && closest(target, SECTION_NAV_SEL + ' a')){\r\n sectionBulletHandler.call(target, e);\r\n }\r\n else if(matches(target, SECTION_NAV_TOOLTIP_SEL)){\r\n tooltipTextHandler.call(target);\r\n }\r\n else if(matches(target, SLIDES_ARROW_SEL)){\r\n slideArrowHandler.call(target, e);\r\n }\r\n else if(matches(target, SLIDES_NAV_LINK_SEL) || closest(target, SLIDES_NAV_LINK_SEL) != null){\r\n slideBulletHandler.call(target, e);\r\n }\r\n else if(closest(target, options.menu + ' [data-menuanchor]')){\r\n menuItemsHandler.call(target, e);\r\n }\r\n }\r\n\r\n function forMouseLeaveOrTouch(eventName, allowScrolling){\r\n //a way to pass arguments to the onMouseEnterOrLeave function\r\n document['fp_' + eventName] = allowScrolling;\r\n document.addEventListener(eventName, onMouseEnterOrLeave, true); //capturing phase\r\n }\r\n\r\n function onMouseEnterOrLeave(e) {\r\n var type = e.type;\r\n var isInsideOneNormalScroll = false;\r\n var isUsingScrollOverflow = options.scrollOverflow;\r\n\r\n //onMouseLeave will use the destination target, not the one we are moving away from\r\n var target = type === 'mouseleave' ? e.toElement || e.relatedTarget : e.target;\r\n\r\n //coming from closing a normalScrollElements modal or moving outside viewport?\r\n if(target == document || !target){\r\n setMouseHijack(true);\r\n\r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, true);\r\n }\r\n return;\r\n }\r\n\r\n if(type === 'touchend'){\r\n g_canFireMouseEnterNormalScroll = false;\r\n setTimeout(function(){\r\n g_canFireMouseEnterNormalScroll = true;\r\n }, 800);\r\n }\r\n\r\n //preventing mouseenter event to do anything when coming from a touchEnd event\r\n //fixing issue #3576\r\n if(type === 'mouseenter' && !g_canFireMouseEnterNormalScroll){\r\n return;\r\n }\r\n\r\n var normalSelectors = options.normalScrollElements.split(',');\r\n\r\n normalSelectors.forEach(function(normalSelector){\r\n if(!isInsideOneNormalScroll){\r\n var isNormalScrollTarget = matches(target, normalSelector);\r\n\r\n //leaving a child inside the normalScoll element is not leaving the normalScroll #3661\r\n var isNormalScrollChildFocused = closest(target, normalSelector);\r\n\r\n if(isNormalScrollTarget || isNormalScrollChildFocused){\r\n if(!FP.shared.isNormalScrollElement){\r\n setMouseHijack(false);\r\n\r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, false);\r\n }\r\n }\r\n FP.shared.isNormalScrollElement = true;\r\n isInsideOneNormalScroll = true;\r\n }\r\n }\r\n });\r\n\r\n //not inside a single normal scroll element anymore?\r\n if(!isInsideOneNormalScroll && FP.shared.isNormalScrollElement){\r\n setMouseHijack(true);\r\n \r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, true);\r\n }\r\n\r\n FP.shared.isNormalScrollElement = false;\r\n }\r\n }\r\n\r\n /**\r\n * Checks the viewport a few times on a define interval of time to \r\n * see if it has changed in any of those. If that's the case, it resizes.\r\n */\r\n function doubleCheckHeight(){\r\n for(var i = 1; i < 4; i++){\r\n g_doubleCheckHeightId = setTimeout(adjustToNewViewport, 350 * i);\r\n }\r\n }\r\n\r\n /**\r\n * Adjusts a section to the viewport if it has changed.\r\n */\r\n function adjustToNewViewport(){\r\n var newWindowHeight = getWindowHeight();\r\n var newWindowWidth = getWindowWidth();\r\n\r\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\r\n windowsHeight = newWindowHeight;\r\n windowsWidth = newWindowWidth;\r\n reBuild(true);\r\n }\r\n }\r\n\r\n /**\r\n * Setting options from DOM elements if they are not provided.\r\n */\r\n function setOptionsFromDOM(){\r\n\r\n //no anchors option? Checking for them in the DOM attributes\r\n if(!options.anchors.length){\r\n var anchorsAttribute = '[data-anchor]';\r\n var anchors = $(options.sectionSelector.split(',').join(anchorsAttribute + ',') + anchorsAttribute, container);\r\n if(anchors.length){\r\n g_initialAnchorsInDom = true;\r\n anchors.forEach(function(item){\r\n options.anchors.push(item.getAttribute('data-anchor').toString());\r\n });\r\n }\r\n }\r\n\r\n //no tooltips option? Checking for them in the DOM attributes\r\n if(!options.navigationTooltips.length){\r\n var tooltipsAttribute = '[data-tooltip]';\r\n var tooltips = $(options.sectionSelector.split(',').join(tooltipsAttribute + ',') + tooltipsAttribute, container);\r\n if(tooltips.length){\r\n tooltips.forEach(function(item){\r\n options.navigationTooltips.push(item.getAttribute('data-tooltip').toString());\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Works over the DOM structure to set it up for the current fullpage options.\r\n */\r\n function prepareDom(){\r\n css(container, {\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n addClass(container, WRAPPER);\r\n addClass($html, ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = getWindowHeight();\r\n\r\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n var sections = $(SECTION_SEL);\r\n\r\n //styling the sections / slides / menu\r\n for(var i = 0; i 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n }\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).forEach(function(item){\r\n $body.appendChild(item);\r\n });\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler = options.scrollOverflowHandler.init(options);\r\n }\r\n }\r\n\r\n /**\r\n * Styles the horizontal slides for a section.\r\n */\r\n function styleSlides(section, slides, numSlides){\r\n var sliderWidth = numSlides * 100;\r\n var slideWidth = 100 / numSlides;\r\n\r\n var slidesWrapper = document.createElement('div');\r\n slidesWrapper.className = SLIDES_WRAPPER; //fp-slides\r\n wrapAll(slides, slidesWrapper);\r\n\r\n var slidesContainer = document.createElement('div');\r\n slidesContainer.className = SLIDES_CONTAINER; //fp-slidesContainer\r\n wrapAll(slides, slidesContainer);\r\n\r\n css($(SLIDES_CONTAINER_SEL, section), {'width': sliderWidth + '%'});\r\n\r\n if(numSlides > 1){\r\n if(options.controlArrows){\r\n createSlideArrows(section);\r\n }\r\n\r\n if(options.slidesNavigation){\r\n addSlidesNavigation(section, numSlides);\r\n }\r\n }\r\n\r\n slides.forEach(function(slide) {\r\n css(slide, {'width': slideWidth + '%'});\r\n\r\n if(options.verticalCentered){\r\n addTableClass(slide);\r\n }\r\n });\r\n\r\n var startingSlide = $(SLIDE_ACTIVE_SEL, section)[0];\r\n\r\n //if the slide won't be an starting point, the default will be the first one\r\n //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default.\r\n if( startingSlide != null && (index($(SECTION_ACTIVE_SEL), SECTION_SEL) !== 0 || (index($(SECTION_ACTIVE_SEL), SECTION_SEL) === 0 && index(startingSlide) !== 0))){\r\n silentLandscapeScroll(startingSlide, 'internal');\r\n }else{\r\n addClass(slides[0], ACTIVE);\r\n }\r\n }\r\n\r\n /**\r\n * Styling vertical sections\r\n */\r\n function styleSection(section, index){\r\n //if no active section is defined, the 1st one will be the default one\r\n if(!index && $(SECTION_ACTIVE_SEL)[0] == null) {\r\n addClass(section, ACTIVE);\r\n }\r\n startingSection = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n css(section, {'height': windowsHeight + 'px'});\r\n\r\n if(options.paddingTop){\r\n css(section, {'padding-top': options.paddingTop});\r\n }\r\n\r\n if(options.paddingBottom){\r\n css(section, {'padding-bottom': options.paddingBottom});\r\n }\r\n\r\n if (typeof options.sectionsColor[index] !== 'undefined') {\r\n css(section, {'background-color': options.sectionsColor[index]});\r\n }\r\n\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n section.setAttribute('data-anchor', options.anchors[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the data-anchor attributes to the menu elements and activates the current one.\r\n */\r\n function styleMenu(section, index){\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n //activating the menu / nav element on load\r\n if(hasClass(section, ACTIVE)){\r\n activateMenuAndNav(options.anchors[index], index);\r\n }\r\n }\r\n\r\n //moving the menu outside the main container if it is inside (avoid problems with fixed positions when using CSS3 tranforms)\r\n if(options.menu && options.css3 && closest($(options.menu)[0], WRAPPER_SEL) != null){\r\n $(options.menu).forEach(function(menu) {\r\n $body.appendChild(menu);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Adds internal classes to be able to provide customizable selectors\r\n * keeping the link with the style sheet.\r\n */\r\n function addInternalSelectors(){\r\n addClass($(options.sectionSelector, container), SECTION);\r\n addClass($(options.slideSelector, container), SLIDE);\r\n }\r\n\r\n /**\r\n * Creates the control arrows for the given section\r\n */\r\n function createSlideArrows(section){\r\n var arrows = [createElementFromHTML('
        '), createElementFromHTML('
        ')];\r\n after($(SLIDES_WRAPPER_SEL, section)[0], arrows);\r\n\r\n if(options.controlArrowColor !== '#fff'){\r\n css($(SLIDES_ARROW_NEXT_SEL, section), {'border-color': 'transparent transparent transparent '+options.controlArrowColor});\r\n css($(SLIDES_ARROW_PREV_SEL, section), {'border-color': 'transparent '+ options.controlArrowColor + ' transparent transparent'});\r\n }\r\n\r\n if(!options.loopHorizontal){\r\n hide($(SLIDES_ARROW_PREV_SEL, section));\r\n }\r\n }\r\n\r\n /**\r\n * Creates a vertical navigation bar.\r\n */\r\n function addVerticalNavigation(){\r\n var navigation = document.createElement('div');\r\n navigation.setAttribute('id', SECTION_NAV);\r\n\r\n var divUl = document.createElement('ul');\r\n navigation.appendChild(divUl);\r\n\r\n appendTo(navigation, $body);\r\n var nav = $(SECTION_NAV_SEL)[0];\r\n\r\n addClass(nav, 'fp-' + options.navigationPosition);\r\n\r\n if(options.showActiveTooltip){\r\n addClass(nav, SHOW_ACTIVE_TOOLTIP);\r\n }\r\n\r\n var li = '';\r\n\r\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\r\n var link = '';\r\n if (options.anchors.length) {\r\n link = options.anchors[i];\r\n }\r\n\r\n li += '
      • ' + getBulletLinkName(i, 'Section') + '';\r\n\r\n // Only add tooltip if needed (defined by user)\r\n var tooltip = options.navigationTooltips[i];\r\n\r\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\r\n li += '
        ' + tooltip + '
        ';\r\n }\r\n\r\n li += '
      • ';\r\n }\r\n $('ul', nav)[0].innerHTML = li;\r\n\r\n //centering it vertically\r\n css($(SECTION_NAV_SEL), {'margin-top': '-' + ($(SECTION_NAV_SEL)[0].offsetHeight/2) + 'px'});\r\n\r\n //activating the current active section\r\n\r\n var bullet = $('li', $(SECTION_NAV_SEL)[0])[index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL)];\r\n addClass($('a', bullet), ACTIVE);\r\n }\r\n\r\n /**\r\n * Gets the name for screen readers for a section/slide navigation bullet.\r\n */\r\n function getBulletLinkName(i, defaultName){\r\n return options.navigationTooltips[i]\r\n || options.anchors[i]\r\n || defaultName + ' ' + (i+1);\r\n }\r\n\r\n /*\r\n * Enables the Youtube videos API so we can control their flow if necessary.\r\n */\r\n function enableYoutubeAPI(){\r\n $('iframe[src*=\"youtube.com/embed/\"]', container).forEach(function(item){\r\n addURLParam(item, 'enablejsapi=1');\r\n });\r\n }\r\n\r\n /**\r\n * Adds a new parameter and its value to the `src` of a given element\r\n */\r\n function addURLParam(element, newParam){\r\n var originalSrc = element.getAttribute('src');\r\n element.setAttribute('src', originalSrc + getUrlParamSign(originalSrc) + newParam);\r\n }\r\n\r\n /*\r\n * Returns the prefix sign to use for a new parameter in an existen URL.\r\n *\r\n * @return {String} ? | &\r\n */\r\n function getUrlParamSign(url){\r\n return ( !/\\?/.test( url ) ) ? '?' : '&';\r\n }\r\n\r\n /**\r\n * Actions and callbacks to fire afterRender\r\n */\r\n function afterRenderActions(){\r\n var section = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n addClass(section, COMPLETELY);\r\n\r\n lazyLoad(section);\r\n lazyLoadOthers();\r\n playMedia(section);\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.afterLoad();\r\n }\r\n\r\n if(isDestinyTheStartingSection() && isFunction(options.afterLoad) ){\r\n fireCallback('afterLoad', {\r\n activeSection: section,\r\n element: section,\r\n direction: null,\r\n\r\n //for backwards compatibility callback (to be removed in a future!)\r\n anchorLink: section.getAttribute('data-anchor'),\r\n sectionIndex: index(section, SECTION_SEL)\r\n });\r\n }\r\n\r\n if(isFunction(options.afterRender)){\r\n fireCallback('afterRender');\r\n }\r\n }\r\n\r\n /**\r\n * Determines if the URL anchor destiny is the starting section (the one using 'active' class before initialization)\r\n */\r\n function isDestinyTheStartingSection(){\r\n var anchor = getAnchorsURL();\r\n var destinationSection = getSectionByAnchor(anchor.section);\r\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\r\n }\r\n\r\n var isScrolling = false;\r\n var lastScroll = 0;\r\n\r\n //when scrolling...\r\n function scrollHandler(){\r\n var currentSection;\r\n\r\n if(!options.autoScrolling || options.scrollBar){\r\n var currentScroll = getScrollTop();\r\n var scrollDirection = getScrollDirection(currentScroll);\r\n var visibleSectionIndex = 0;\r\n var screen_mid = currentScroll + (getWindowHeight() / 2.0);\r\n var isAtBottom = $body.offsetHeight - getWindowHeight() === currentScroll;\r\n var sections = $(SECTION_SEL);\r\n\r\n //when using `auto-height` for a small last section it won't be centered in the viewport\r\n if(isAtBottom){\r\n visibleSectionIndex = sections.length - 1;\r\n }\r\n //is at top? when using `auto-height` for a small first section it won't be centered in the viewport\r\n else if(!currentScroll){\r\n visibleSectionIndex = 0;\r\n }\r\n\r\n //taking the section which is showing more content in the viewport\r\n else{\r\n for (var i = 0; i < sections.length; ++i) {\r\n var section = sections[i];\r\n\r\n // Pick the the last section which passes the middle line of the screen.\r\n if (section.offsetTop <= screen_mid)\r\n {\r\n visibleSectionIndex = i;\r\n }\r\n }\r\n }\r\n\r\n if(isCompletelyInViewPort(scrollDirection)){\r\n if(!hasClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY)){\r\n addClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY);\r\n removeClass(siblings($(SECTION_ACTIVE_SEL)[0]), COMPLETELY);\r\n }\r\n }\r\n\r\n //geting the last one, the current one on the screen\r\n currentSection = sections[visibleSectionIndex];\r\n\r\n //setting the visible section as active when manually scrolling\r\n //executing only once the first time we reach the section\r\n if(!hasClass(currentSection, ACTIVE)){\r\n isScrolling = true;\r\n var leavingSection = $(SECTION_ACTIVE_SEL)[0];\r\n var leavingSectionIndex = index(leavingSection, SECTION_SEL) + 1;\r\n var yMovement = getYmovement(currentSection);\r\n var anchorLink = currentSection.getAttribute('data-anchor');\r\n var sectionIndex = index(currentSection, SECTION_SEL) + 1;\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, currentSection)[0];\r\n var slideIndex;\r\n var slideAnchorLink;\r\n var callbacksParams = {\r\n activeSection: leavingSection,\r\n sectionIndex: sectionIndex -1,\r\n anchorLink: anchorLink,\r\n element: currentSection,\r\n leavingSection: leavingSectionIndex,\r\n direction: yMovement\r\n };\r\n\r\n if(activeSlide){\r\n slideAnchorLink = activeSlide.getAttribute('data-anchor');\r\n slideIndex = index(activeSlide);\r\n }\r\n\r\n if(canScroll){\r\n addClass(currentSection, ACTIVE);\r\n removeClass(siblings(currentSection), ACTIVE);\r\n\r\n if(isFunction( options.onLeave )){\r\n fireCallback('onLeave', callbacksParams);\r\n }\r\n if(isFunction( options.afterLoad )){\r\n fireCallback('afterLoad', callbacksParams);\r\n }\r\n\r\n stopMedia(leavingSection);\r\n lazyLoad(currentSection);\r\n playMedia(currentSection);\r\n\r\n activateMenuAndNav(anchorLink, sectionIndex - 1);\r\n\r\n if(options.anchors.length){\r\n //needed to enter in hashChange event when using the menu with anchor links\r\n lastScrolledDestiny = anchorLink;\r\n }\r\n setState(slideIndex, slideAnchorLink, anchorLink, sectionIndex);\r\n }\r\n\r\n //small timeout in order to avoid entering in hashChange event when scrolling is not finished yet\r\n clearTimeout(scrollId);\r\n scrollId = setTimeout(function(){\r\n isScrolling = false;\r\n }, 100);\r\n }\r\n\r\n if(options.fitToSection){\r\n //for the auto adjust of the viewport to fit a whole section\r\n clearTimeout(scrollId2);\r\n\r\n scrollId2 = setTimeout(function(){\r\n //checking it again in case it changed during the delay\r\n if(options.fitToSection &&\r\n\r\n //is the destination element bigger than the viewport?\r\n $(SECTION_ACTIVE_SEL)[0].offsetHeight <= windowsHeight\r\n ){\r\n fitToSection();\r\n }\r\n }, options.fitToSectionDelay);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Fits the site to the nearest active section\r\n */\r\n function fitToSection(){\r\n //checking fitToSection again in case it was set to false before the timeout delay\r\n if(canScroll){\r\n //allows to scroll to an active section and\r\n //if the section is already active, we prevent firing callbacks\r\n isResizing = true;\r\n\r\n scrollPage($(SECTION_ACTIVE_SEL)[0]);\r\n isResizing = false;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether the active section has seen in its whole or not.\r\n */\r\n function isCompletelyInViewPort(movement){\r\n var top = $(SECTION_ACTIVE_SEL)[0].offsetTop;\r\n var bottom = top + getWindowHeight();\r\n\r\n if(movement == 'up'){\r\n return bottom >= (getScrollTop() + getWindowHeight());\r\n }\r\n return top <= getScrollTop();\r\n }\r\n\r\n /**\r\n * Determines whether a section is in the viewport or not.\r\n */\r\n function isSectionInViewport (el) {\r\n var rect = el.getBoundingClientRect();\r\n var top = rect.top;\r\n var bottom = rect.bottom;\r\n\r\n //sometimes there's a 1px offset on the bottom of the screen even when the \r\n //section's height is the window.innerHeight one. I guess because pixels won't allow decimals.\r\n //using this prevents from lazyLoading the section that is not yet visible \r\n //(only 1 pixel offset is)\r\n var pixelOffset = 2;\r\n \r\n var isTopInView = top + pixelOffset < windowsHeight && top > 0;\r\n var isBottomInView = bottom > pixelOffset && bottom < windowsHeight;\r\n\r\n return isTopInView || isBottomInView;\r\n }\r\n\r\n /**\r\n * Gets the directon of the the scrolling fired by the scroll event.\r\n */\r\n function getScrollDirection(currentScroll){\r\n var direction = currentScroll > lastScroll ? 'down' : 'up';\r\n\r\n lastScroll = currentScroll;\r\n\r\n //needed for auto-height sections to determine if we want to scroll to the top or bottom of the destination\r\n previousDestTop = currentScroll;\r\n\r\n return direction;\r\n }\r\n\r\n /**\r\n * Determines the way of scrolling up or down:\r\n * by 'automatically' scrolling a section or by using the default and normal scrolling.\r\n */\r\n function scrolling(type){\r\n if (!isScrollAllowed.m[type]){\r\n return;\r\n }\r\n\r\n var scrollSection = (type === 'down') ? moveSectionDown : moveSectionUp;\r\n\r\n if(options.scrollOverflow){\r\n var scrollable = options.scrollOverflowHandler.scrollable($(SECTION_ACTIVE_SEL)[0]);\r\n var check = (type === 'down') ? 'bottom' : 'top';\r\n\r\n if(scrollable != null ){\r\n //is the scrollbar at the start/end of the scroll?\r\n if(options.scrollOverflowHandler.isScrolled(check, scrollable)){\r\n scrollSection();\r\n }else{\r\n return true;\r\n }\r\n }else{\r\n // moved up/down\r\n scrollSection();\r\n }\r\n }else{\r\n // moved up/down\r\n scrollSection();\r\n }\r\n }\r\n\r\n /*\r\n * Preventing bouncing in iOS #2285\r\n */\r\n function preventBouncing(e){\r\n if(options.autoScrolling && isReallyTouch(e) && isScrollAllowed.m.up){\r\n //preventing the easing on iOS devices\r\n preventDefault(e);\r\n }\r\n }\r\n\r\n var touchStartY = 0;\r\n var touchStartX = 0;\r\n var touchEndY = 0;\r\n var touchEndX = 0;\r\n\r\n /* Detecting touch events\r\n\r\n * As we are changing the top property of the page on scrolling, we can not use the traditional way to detect it.\r\n * This way, the touchstart and the touch moves shows an small difference between them which is the\r\n * used one to determine the direction.\r\n */\r\n function touchMoveHandler(e){\r\n var activeSection = closest(e.target, SECTION_SEL) || $(SECTION_ACTIVE_SEL)[0];\r\n\r\n if (isReallyTouch(e) ) {\r\n\r\n if(options.autoScrolling){\r\n //preventing the easing on iOS devices\r\n preventDefault(e);\r\n }\r\n\r\n var touchEvents = getEventsPage(e);\r\n\r\n touchEndY = touchEvents.y;\r\n touchEndX = touchEvents.x;\r\n\r\n //if movement in the X axys is greater than in the Y and the currect section has slides...\r\n if ($(SLIDES_WRAPPER_SEL, activeSection).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) {\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (!slideMoving && Math.abs(touchStartX - touchEndX) > (getWindowWidth() / 100 * options.touchSensitivity)) {\r\n if (touchStartX > touchEndX) {\r\n if(isScrollAllowed.m.right){\r\n moveSlideRight(activeSection); //next\r\n }\r\n } else {\r\n if(isScrollAllowed.m.left){\r\n moveSlideLeft(activeSection); //prev\r\n }\r\n }\r\n }\r\n }\r\n\r\n //vertical scrolling (only when autoScrolling is enabled)\r\n else if(options.autoScrolling && canScroll){\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (Math.abs(touchStartY - touchEndY) > (window.innerHeight / 100 * options.touchSensitivity)) {\r\n if (touchStartY > touchEndY) {\r\n scrolling('down');\r\n } else if (touchEndY > touchStartY) {\r\n scrolling('up');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * As IE >= 10 fires both touch and mouse events when using a mouse in a touchscreen\r\n * this way we make sure that is really a touch event what IE is detecting.\r\n */\r\n function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }\r\n\r\n /**\r\n * Handler for the touch start event.\r\n */\r\n function touchStartHandler(e){\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n activeAnimation = false;\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the average of the last `number` elements of the given array.\r\n */\r\n function getAverage(elements, number){\r\n var sum = 0;\r\n\r\n //taking `number` elements from the end to make the average, if there are not enought, 1\r\n var lastElements = elements.slice(Math.max(elements.length - number, 1));\r\n\r\n for(var i = 0; i < lastElements.length; i++){\r\n sum = sum + lastElements[i];\r\n }\r\n\r\n return Math.ceil(sum/number);\r\n }\r\n\r\n /**\r\n * Detecting mousewheel scrolling\r\n *\r\n * http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html\r\n * http://www.sitepoint.com/html5-javascript-mouse-wheel/\r\n */\r\n var prevTime = new Date().getTime();\r\n\r\n function MouseWheelHandler(e) {\r\n var curTime = new Date().getTime();\r\n var isNormalScroll = hasClass($(COMPLETELY_SEL)[0], NORMAL_SCROLL);\r\n\r\n //is scroll allowed?\r\n if (!isScrollAllowed.m.down && !isScrollAllowed.m.up) {\r\n preventDefault(e);\r\n return false;\r\n }\r\n\r\n //autoscrolling and not zooming?\r\n if(options.autoScrolling && !controlPressed && !isNormalScroll){\r\n // cross-browser wheel delta\r\n e = e || window.event;\r\n var value = e.wheelDelta || -e.deltaY || -e.detail;\r\n var delta = Math.max(-1, Math.min(1, value));\r\n\r\n var horizontalDetection = typeof e.wheelDeltaX !== 'undefined' || typeof e.deltaX !== 'undefined';\r\n var isScrollingVertically = (Math.abs(e.wheelDeltaX) < Math.abs(e.wheelDelta)) || (Math.abs(e.deltaX ) < Math.abs(e.deltaY) || !horizontalDetection);\r\n\r\n //Limiting the array to 150 (lets not waste memory!)\r\n if(scrollings.length > 149){\r\n scrollings.shift();\r\n }\r\n\r\n //keeping record of the previous scrollings\r\n scrollings.push(Math.abs(value));\r\n\r\n //preventing to scroll the site on mouse wheel when scrollbar is present\r\n if(options.scrollBar){\r\n preventDefault(e);\r\n }\r\n\r\n //time difference between the last scroll and the current one\r\n var timeDiff = curTime-prevTime;\r\n prevTime = curTime;\r\n\r\n //haven't they scrolled in a while?\r\n //(enough to be consider a different scrolling action to scroll another section)\r\n if(timeDiff > 200){\r\n //emptying the array, we dont care about old scrollings for our averages\r\n scrollings = [];\r\n }\r\n\r\n if(canScroll){\r\n var averageEnd = getAverage(scrollings, 10);\r\n var averageMiddle = getAverage(scrollings, 70);\r\n var isAccelerating = averageEnd >= averageMiddle;\r\n\r\n //to avoid double swipes...\r\n if(isAccelerating && isScrollingVertically){\r\n //scrolling down?\r\n if (delta < 0) {\r\n scrolling('down');\r\n\r\n //scrolling up?\r\n }else {\r\n scrolling('up');\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if(options.fitToSection){\r\n //stopping the auto scroll to adjust to a section\r\n activeAnimation = false;\r\n }\r\n }\r\n\r\n /**\r\n * Slides a slider to the given direction.\r\n * Optional `section` param.\r\n */\r\n function moveSlide(direction, section){\r\n var activeSection = section == null ? $(SECTION_ACTIVE_SEL)[0] : section;\r\n var slides = $(SLIDES_WRAPPER_SEL, activeSection)[0];\r\n\r\n // more than one slide needed and nothing should be sliding\r\n if (slides == null || slideMoving || $(SLIDE_SEL, slides).length < 2) {\r\n return;\r\n }\r\n\r\n var currentSlide = $(SLIDE_ACTIVE_SEL, slides)[0];\r\n var destiny = null;\r\n\r\n if(direction === 'left'){\r\n destiny = prevUntil(currentSlide, SLIDE_SEL);\r\n }else{\r\n destiny = nextUntil(currentSlide, SLIDE_SEL);\r\n }\r\n\r\n //isn't there a next slide in the secuence?\r\n if(destiny == null){\r\n //respect loopHorizontal settin\r\n if (!options.loopHorizontal) return;\r\n\r\n var slideSiblings = siblings(currentSlide);\r\n if(direction === 'left'){\r\n destiny = slideSiblings[slideSiblings.length - 1]; //last\r\n }else{\r\n destiny = slideSiblings[0]; //first\r\n }\r\n }\r\n\r\n slideMoving = true && !FP.test.isTesting;\r\n landscapeScroll(slides, destiny, direction);\r\n }\r\n\r\n /**\r\n * Maintains the active slides in the viewport\r\n * (Because the `scroll` animation might get lost with some actions, such as when using continuousVertical)\r\n */\r\n function keepSlidesPosition(){\r\n var activeSlides = $(SLIDE_ACTIVE_SEL);\r\n for( var i =0; i previousDestTop;\r\n var sectionBottom = position - windowsHeight + elementHeight;\r\n var bigSectionsDestination = options.bigSectionsDestination;\r\n\r\n //is the destination element bigger than the viewport?\r\n if(elementHeight > windowsHeight){\r\n //scrolling up?\r\n if(!isScrollingDown && !bigSectionsDestination || bigSectionsDestination === 'bottom' ){\r\n position = sectionBottom;\r\n }\r\n }\r\n\r\n //sections equal or smaller than the viewport height && scrolling down? || is resizing and its in the last section\r\n else if(isScrollingDown || (isResizing && next(element) == null) ){\r\n //The bottom of the destination will be at the bottom of the viewport\r\n position = sectionBottom;\r\n }\r\n\r\n /*\r\n Keeping record of the last scrolled position to determine the scrolling direction.\r\n No conventional methods can be used as the scroll bar might not be present\r\n AND the section might not be active if it is auto-height and didnt reach the middle\r\n of the viewport.\r\n */\r\n previousDestTop = position;\r\n return position;\r\n }\r\n\r\n /**\r\n * Scrolls the site to the given element and scrolls to the slide if a callback is given.\r\n */\r\n function scrollPage(element, callback, isMovementUp){\r\n if(element == null){ return; } //there's no element to scroll, leaving the function\r\n\r\n var dtop = getDestinationPosition(element);\r\n var slideAnchorLink;\r\n var slideIndex;\r\n\r\n //local variables\r\n var v = {\r\n element: element,\r\n callback: callback,\r\n isMovementUp: isMovementUp,\r\n dtop: dtop,\r\n yMovement: getYmovement(element),\r\n anchorLink: element.getAttribute('data-anchor'),\r\n sectionIndex: index(element, SECTION_SEL),\r\n activeSlide: $(SLIDE_ACTIVE_SEL, element)[0],\r\n activeSection: $(SECTION_ACTIVE_SEL)[0],\r\n leavingSection: index($(SECTION_ACTIVE_SEL), SECTION_SEL) + 1,\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n localIsResizing: isResizing\r\n };\r\n\r\n //quiting when destination scroll is the same as the current one\r\n if((v.activeSection == element && !isResizing) || (options.scrollBar && getScrollTop() === v.dtop && !hasClass(element, AUTO_HEIGHT) )){ return; }\r\n\r\n if(v.activeSlide != null){\r\n slideAnchorLink = v.activeSlide.getAttribute('data-anchor');\r\n slideIndex = index(v.activeSlide);\r\n }\r\n\r\n //callback (onLeave) if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing){\r\n var direction = v.yMovement;\r\n\r\n //required for continousVertical\r\n if(typeof isMovementUp !== 'undefined'){\r\n direction = isMovementUp ? 'up' : 'down';\r\n }\r\n\r\n //for the callback\r\n v.direction = direction;\r\n\r\n if(isFunction(options.onLeave)){\r\n if(fireCallback('onLeave', v) === false){\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // If continuousVertical && we need to wrap around\r\n if (options.autoScrolling && options.continuousVertical && typeof (v.isMovementUp) !== \"undefined\" &&\r\n ((!v.isMovementUp && v.yMovement == 'up') || // Intending to scroll down but about to go up or\r\n (v.isMovementUp && v.yMovement == 'down'))) { // intending to scroll up but about to go down\r\n\r\n v = createInfiniteSections(v);\r\n }\r\n\r\n //pausing media of the leaving section (if we are not just resizing, as destinatino will be the same one)\r\n if(!v.localIsResizing){\r\n stopMedia(v.activeSection);\r\n }\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.beforeLeave();\r\n }\r\n\r\n addClass(element, ACTIVE);\r\n removeClass(siblings(element), ACTIVE);\r\n lazyLoad(element);\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.onLeave();\r\n }\r\n\r\n //preventing from activating the MouseWheelHandler event\r\n //more than once if the page is scrolling\r\n canScroll = false || FP.test.isTesting;\r\n\r\n setState(slideIndex, slideAnchorLink, v.anchorLink, v.sectionIndex);\r\n\r\n performMovement(v);\r\n\r\n //flag to avoid callingn `scrollPage()` twice in case of using anchor links\r\n lastScrolledDestiny = v.anchorLink;\r\n\r\n //avoid firing it twice (as it does also on scroll)\r\n activateMenuAndNav(v.anchorLink, v.sectionIndex);\r\n }\r\n\r\n /**\r\n * Dispatch events & callbacks making sure it does it on the right format, depending on\r\n * whether v2compatible is being used or not.\r\n */\r\n function fireCallback(eventName, v){\r\n var eventData = getEventData(eventName, v);\r\n\r\n if(!options.v2compatible){\r\n trigger(container, eventName, eventData);\r\n\r\n if(options[eventName].apply(eventData[Object.keys(eventData)[0]], toArray(eventData)) === false){\r\n return false;\r\n }\r\n }\r\n else{\r\n if(options[eventName].apply(eventData[0], eventData.slice(1)) === false){\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Makes sure to only create a Panel object if the element exist\r\n */\r\n function nullOrSection(el){\r\n return el ? new Section(el) : null;\r\n }\r\n\r\n function nullOrSlide(el){\r\n return el ? new Slide(el) : null;\r\n }\r\n\r\n /**\r\n * Gets the event's data for the given event on the right format. Depending on whether\r\n * v2compatible is being used or not.\r\n */\r\n function getEventData(eventName, v){\r\n var paramsPerEvent;\r\n\r\n if(!options.v2compatible){\r\n\r\n //using functions to run only the necessary bits within the object\r\n paramsPerEvent = {\r\n afterRender: function(){\r\n return {\r\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\r\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\r\n };\r\n },\r\n onLeave: function(){\r\n return {\r\n origin: nullOrSection(v.activeSection),\r\n destination: nullOrSection(v.element),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n afterLoad: function(){\r\n return paramsPerEvent.onLeave();\r\n },\r\n\r\n afterSlideLoad: function(){\r\n return {\r\n section: nullOrSection(v.section),\r\n origin: nullOrSlide(v.prevSlide),\r\n destination: nullOrSlide(v.destiny),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n onSlideLeave: function(){\r\n return paramsPerEvent.afterSlideLoad();\r\n }\r\n };\r\n }\r\n else{\r\n paramsPerEvent = {\r\n afterRender: function(){ return [container]; },\r\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\r\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\r\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\r\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\r\n };\r\n }\r\n\r\n return paramsPerEvent[eventName]();\r\n }\r\n\r\n /**\r\n * Performs the vertical movement (by CSS3 or by jQuery)\r\n */\r\n function performMovement(v){\r\n // using CSS3 translate functionality\r\n if (options.css3 && options.autoScrolling && !options.scrollBar) {\r\n\r\n // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625\r\n // that's why we round it to 0.\r\n var translate3d = 'translate3d(0px, -' + Math.round(v.dtop) + 'px, 0px)';\r\n transformContainer(translate3d, true);\r\n\r\n //even when the scrollingSpeed is 0 there's a little delay, which might cause the\r\n //scrollingSpeed to change in case of using silentMoveTo();\r\n if(options.scrollingSpeed){\r\n clearTimeout(afterSectionLoadsId);\r\n afterSectionLoadsId = setTimeout(function () {\r\n afterSectionLoads(v);\r\n }, options.scrollingSpeed);\r\n }else{\r\n afterSectionLoads(v);\r\n }\r\n }\r\n\r\n // using JS to animate\r\n else{\r\n var scrollSettings = getScrollSettings(v.dtop);\r\n FP.test.top = -v.dtop + 'px';\r\n\r\n scrollTo(scrollSettings.element, scrollSettings.options, options.scrollingSpeed, function(){\r\n if(options.scrollBar){\r\n\r\n /* Hack!\r\n The timeout prevents setting the most dominant section in the viewport as \"active\" when the user\r\n scrolled to a smaller section by using the mousewheel (auto scrolling) rather than draging the scroll bar.\r\n\r\n When using scrollBar:true It seems like the scroll events still getting propagated even after the scrolling animation has finished.\r\n */\r\n setTimeout(function(){\r\n afterSectionLoads(v);\r\n },30);\r\n }else{\r\n afterSectionLoads(v);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets the scrolling settings depending on the plugin autoScrolling option\r\n */\r\n function getScrollSettings(top){\r\n var scroll = {};\r\n\r\n //top property animation\r\n if(options.autoScrolling && !options.scrollBar){\r\n scroll.options = -top;\r\n scroll.element = $(WRAPPER_SEL)[0];\r\n }\r\n\r\n //window real scrolling\r\n else{\r\n scroll.options = top;\r\n scroll.element = window;\r\n }\r\n\r\n return scroll;\r\n }\r\n\r\n /**\r\n * Adds sections before or after the current one to create the infinite effect.\r\n */\r\n function createInfiniteSections(v){\r\n // Scrolling down\r\n if (!v.isMovementUp) {\r\n // Move all previous sections to after the active section\r\n after($(SECTION_ACTIVE_SEL)[0], prevAll(v.activeSection, SECTION_SEL).reverse());\r\n }\r\n else { // Scrolling up\r\n // Move all next sections to before the active section\r\n before($(SECTION_ACTIVE_SEL)[0], nextAll(v.activeSection, SECTION_SEL));\r\n }\r\n\r\n // Maintain the displayed position (now that we changed the element order)\r\n silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n\r\n // save for later the elements that still need to be reordered\r\n v.wrapAroundElements = v.activeSection;\r\n\r\n // Recalculate animation variables\r\n v.dtop = v.element.offsetTop;\r\n v.yMovement = getYmovement(v.element);\r\n\r\n return v;\r\n }\r\n\r\n /**\r\n * Fix section order after continuousVertical changes have been animated\r\n */\r\n function continuousVerticalFixSectionOrder (v) {\r\n // If continuousVertical is in effect (and autoScrolling would also be in effect then),\r\n // finish moving the elements around so the direct navigation will function more simply\r\n if (v.wrapAroundElements == null) {\r\n return;\r\n }\r\n\r\n if (v.isMovementUp) {\r\n before($(SECTION_SEL)[0], v.wrapAroundElements);\r\n }\r\n else {\r\n after($(SECTION_SEL)[$(SECTION_SEL).length-1], v.wrapAroundElements);\r\n }\r\n\r\n silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n }\r\n\r\n /**\r\n * Actions to do once the section is loaded.\r\n */\r\n function afterSectionLoads (v){\r\n continuousVerticalFixSectionOrder(v);\r\n\r\n //callback (afterLoad) if the site is not just resizing and readjusting the slides\r\n if(isFunction(options.afterLoad) && !v.localIsResizing){\r\n fireCallback('afterLoad', v);\r\n }\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.afterLoad();\r\n }\r\n\r\n if(!v.localIsResizing){\r\n playMedia(v.element);\r\n }\r\n\r\n addClass(v.element, COMPLETELY);\r\n removeClass(siblings(v.element), COMPLETELY);\r\n lazyLoadOthers();\r\n\r\n canScroll = true;\r\n\r\n if(isFunction(v.callback)){\r\n v.callback();\r\n }\r\n }\r\n\r\n /**\r\n * Sets the value for the given attribute from the `data-` attribute with the same suffix\r\n * ie: data-srcset ==> srcset | data-src ==> src\r\n */\r\n function setSrc(element, attribute){\r\n element.setAttribute(attribute, element.getAttribute('data-' + attribute));\r\n element.removeAttribute('data-' + attribute);\r\n }\r\n\r\n /**\r\n * Makes sure lazyload is done for other sections in the viewport that are not the\r\n * active one. \r\n */\r\n function lazyLoadOthers(){\r\n var hasAutoHeightSections = $(AUTO_HEIGHT_SEL)[0] || isResponsiveMode() && $(AUTO_HEIGHT_RESPONSIVE_SEL)[0];\r\n\r\n //quitting when it doesn't apply\r\n if (!options.lazyLoading || !hasAutoHeightSections){\r\n return;\r\n }\r\n\r\n //making sure to lazy load auto-height sections that are in the viewport\r\n $(SECTION_SEL + ':not(' + ACTIVE_SEL + ')').forEach(function(section){\r\n if(isSectionInViewport(section)){\r\n lazyLoad(section);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Lazy loads image, video and audio elements.\r\n */\r\n function lazyLoad(destiny){\r\n if (!options.lazyLoading){\r\n return;\r\n }\r\n\r\n var panel = getSlideOrSection(destiny);\r\n\r\n $('img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]', panel).forEach(function(element){\r\n ['src', 'srcset'].forEach(function(type){\r\n var attribute = element.getAttribute('data-' + type);\r\n if(attribute != null && attribute){\r\n setSrc(element, type);\r\n element.addEventListener('load', function(){\r\n onMediaLoad(destiny);\r\n });\r\n }\r\n });\r\n\r\n if(matches(element, 'source')){\r\n var elementToPlay = closest(element, 'video, audio');\r\n if(elementToPlay){\r\n elementToPlay.load();\r\n elementToPlay.onloadeddata = function(){\r\n onMediaLoad(destiny);\r\n };\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Callback firing when a lazy load media element has loaded.\r\n * Making sure it only fires one per section in normal conditions (if load time is not huge)\r\n */\r\n function onMediaLoad(section){\r\n if(options.scrollOverflow){\r\n clearTimeout(g_mediaLoadedId);\r\n g_mediaLoadedId = setTimeout(function(){\r\n scrollBarHandler.createScrollBar(section);\r\n }, 200);\r\n }\r\n }\r\n\r\n /**\r\n * Plays video and audio elements.\r\n */\r\n function playMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //playing HTML5 media elements\r\n $('video, audio', panel).forEach(function(element){\r\n if( element.hasAttribute('data-autoplay') && typeof element.play === 'function' ) {\r\n element.play();\r\n }\r\n });\r\n\r\n //youtube videos\r\n $('iframe[src*=\"youtube.com/embed/\"]', panel).forEach(function(element){\r\n if ( element.hasAttribute('data-autoplay') ){\r\n playYoutube(element);\r\n }\r\n\r\n //in case the URL was not loaded yet. On page load we need time for the new URL (with the API string) to load.\r\n element.onload = function() {\r\n if ( element.hasAttribute('data-autoplay') ){\r\n playYoutube(element);\r\n }\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Plays a youtube video\r\n */\r\n function playYoutube(element){\r\n element.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', '*');\r\n }\r\n\r\n /**\r\n * Stops video and audio elements.\r\n */\r\n function stopMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //stopping HTML5 media elements\r\n $('video, audio', panel).forEach(function(element){\r\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n\r\n //youtube videos\r\n $('iframe[src*=\"youtube.com/embed/\"]', panel).forEach(function(element){\r\n if( /youtube\\.com\\/embed\\//.test(element.getAttribute('src')) && !element.hasAttribute('data-keepplaying')){\r\n element.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Gets the active slide (or section) for the given section\r\n */\r\n function getSlideOrSection(destiny){\r\n var slide = $(SLIDE_ACTIVE_SEL, destiny);\r\n if( slide.length ) {\r\n destiny = slide[0];\r\n }\r\n\r\n return destiny;\r\n }\r\n\r\n /**\r\n * Scrolls to the anchor in the URL when loading the site\r\n */\r\n function scrollToAnchor(){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Detecting any change on the URL to scroll to the given anchor link\r\n * (a way to detect back history button as we play with the hashes on the URL)\r\n */\r\n function hashChangeHandler(){\r\n if(!isScrolling && !options.lockAnchors){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n //when moving to a slide in the first section for the first time (first time to add an anchor to the URL)\r\n var isFirstSlideMove = (typeof lastScrolledDestiny === 'undefined');\r\n var isFirstScrollMove = (typeof lastScrolledDestiny === 'undefined' && typeof slideAnchor === 'undefined' && !slideMoving);\r\n\r\n if(sectionAnchor && sectionAnchor.length){\r\n /*in order to call scrollpage() only once for each destination at a time\r\n It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange`\r\n event is fired on every scroll too.*/\r\n if ((sectionAnchor && sectionAnchor !== lastScrolledDestiny) && !isFirstSlideMove\r\n || isFirstScrollMove\r\n || (!slideMoving && lastScrolledSlide != slideAnchor )){\r\n\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //gets the URL anchors (section and slide)\r\n function getAnchorsURL(){\r\n var section;\r\n var slide;\r\n var hash = window.location.hash;\r\n\r\n if(hash.length){\r\n //getting the anchor link in the URL and deleting the `#`\r\n var anchorsParts = hash.replace('#', '').split('/');\r\n\r\n //using / for visual reasons and not as a section/slide separator #2803\r\n var isFunkyAnchor = hash.indexOf('#/') > -1;\r\n\r\n section = isFunkyAnchor ? '/' + anchorsParts[1] : decodeURIComponent(anchorsParts[0]);\r\n\r\n var slideAnchor = isFunkyAnchor ? anchorsParts[2] : anchorsParts[1];\r\n if(slideAnchor && slideAnchor.length){\r\n slide = decodeURIComponent(slideAnchor);\r\n }\r\n }\r\n\r\n return {\r\n section: section,\r\n slide: slide\r\n };\r\n }\r\n\r\n //Sliding with arrow keys, both, vertical and horizontal\r\n function keydownHandler(e) {\r\n clearTimeout(keydownId);\r\n\r\n var activeElement = document.activeElement;\r\n var keyCode = e.keyCode;\r\n\r\n //tab?\r\n if(keyCode === 9){\r\n onTab(e);\r\n }\r\n\r\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\r\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if(keyControls.indexOf(keyCode) > -1){\r\n preventDefault(e);\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }\r\n\r\n function tooltipTextHandler(){\r\n /*jshint validthis:true */\r\n trigger(prev(this), 'click');\r\n }\r\n\r\n //to prevent scrolling while zooming\r\n function keyUpHandler(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n }\r\n\r\n //binding the mousemove when the mouse's middle button is released\r\n function mouseDownHandler(e){\r\n //middle button\r\n if (e.which == 2){\r\n oldPageY = e.pageY;\r\n container.addEventListener('mousemove', mouseMoveHandler);\r\n }\r\n }\r\n\r\n //unbinding the mousemove when the mouse's middle button is released\r\n function mouseUpHandler(e){\r\n //middle button\r\n if (e.which == 2){\r\n container.removeEventListener('mousemove', mouseMoveHandler);\r\n }\r\n }\r\n\r\n /**\r\n * Makes sure the tab key will only focus elements within the current section/slide\r\n * preventing this way from breaking the page.\r\n * Based on \"Modals and keyboard traps\"\r\n * from https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex\r\n */\r\n function onTab(e){\r\n var isShiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\r\n\r\n function preventAndFocusFirst(e){\r\n preventDefault(e);\r\n return focusableElements[0] ? focusableElements[0].focus() : null;\r\n }\r\n\r\n //outside any section or slide? Let's not hijack the tab!\r\n if(isFocusOutside(e)){\r\n return;\r\n }\r\n\r\n //is there an element with focus?\r\n if(activeElement){\r\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\r\n activeElement = preventAndFocusFirst(e);\r\n }\r\n }\r\n\r\n //no element if focused? Let's focus the first one of the section/slide\r\n else{\r\n preventAndFocusFirst(e);\r\n }\r\n\r\n //when reached the first or last focusable element of the section/slide\r\n //we prevent the tab action to keep it in the last focusable element\r\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\r\n isShiftPressed && activeElement == focusableElements[0]\r\n ){\r\n preventDefault(e);\r\n }\r\n }\r\n\r\n /**\r\n * Gets all the focusable elements inside the passed element.\r\n */\r\n function getFocusables(el){\r\n return [].slice.call($(focusableElementsString, el)).filter(function(item) {\r\n return item.getAttribute('tabindex') !== '-1'\r\n //are also not hidden elements (or with hidden parents)\r\n && item.offsetParent !== null;\r\n });\r\n }\r\n\r\n /**\r\n * Determines whether the focus is outside fullpage.js sections/slides or not.\r\n */\r\n function isFocusOutside(e){\r\n var allFocusables = getFocusables(document);\r\n var currentFocusIndex = allFocusables.indexOf(document.activeElement);\r\n var focusDestinationIndex = e.shiftKey ? currentFocusIndex - 1 : currentFocusIndex + 1;\r\n var focusDestination = allFocusables[focusDestinationIndex];\r\n var destinationItemSlide = nullOrSlide(closest(focusDestination, SLIDE_SEL));\r\n var destinationItemSection = nullOrSection(closest(focusDestination, SECTION_SEL));\r\n\r\n return !destinationItemSlide && !destinationItemSection;\r\n }\r\n\r\n //Scrolling horizontally when clicking on the slider controls.\r\n function slideArrowHandler(){\r\n /*jshint validthis:true */\r\n var section = closest(this, SECTION_SEL);\r\n\r\n /*jshint validthis:true */\r\n if (hasClass(this, SLIDES_PREV)) {\r\n if(isScrollAllowed.m.left){\r\n moveSlideLeft(section);\r\n }\r\n } else {\r\n if(isScrollAllowed.m.right){\r\n moveSlideRight(section);\r\n }\r\n }\r\n }\r\n\r\n //when opening a new tab (ctrl + t), `control` won't be pressed when coming back.\r\n function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }\r\n\r\n //Scrolls to the section when clicking the navigation bullet\r\n function sectionBulletHandler(e){\r\n preventDefault(e);\r\n\r\n /*jshint validthis:true */\r\n var indexBullet = index(closest(this, SECTION_NAV_SEL + ' li'));\r\n scrollPage($(SECTION_SEL)[indexBullet]);\r\n }\r\n\r\n //Scrolls the slider to the given slide destination for the given section\r\n function slideBulletHandler(e){\r\n preventDefault(e);\r\n\r\n /*jshint validthis:true */\r\n var slides = $(SLIDES_WRAPPER_SEL, closest(this, SECTION_SEL))[0];\r\n var destiny = $(SLIDE_SEL, slides)[index(closest(this, 'li'))];\r\n\r\n landscapeScroll(slides, destiny);\r\n }\r\n\r\n //Menu item handler when not using anchors or using lockAnchors:true\r\n function menuItemsHandler(e){\r\n if($(options.menu)[0] && (options.lockAnchors || !options.anchors.length)){\r\n preventDefault(e);\r\n /*jshint validthis:true */\r\n moveTo(this.getAttribute('data-menuanchor'));\r\n }\r\n }\r\n\r\n /**\r\n * Keydown event\r\n */\r\n function onkeydown(e){\r\n var shiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var isMediaFocused = matches(activeElement, 'video') || matches(activeElement, 'audio');\r\n\r\n //do nothing if we can not scroll or we are not using horizotnal key arrows.\r\n if(!canScroll && [37,39].indexOf(e.keyCode) < 0){\r\n return;\r\n }\r\n\r\n switch (e.keyCode) {\r\n //up\r\n case 38:\r\n case 33:\r\n if(isScrollAllowed.k.up){\r\n moveSectionUp();\r\n }\r\n break;\r\n\r\n //down\r\n case 32: //spacebar\r\n\r\n if(shiftPressed && isScrollAllowed.k.up && !isMediaFocused){\r\n moveSectionUp();\r\n break;\r\n }\r\n /* falls through */\r\n case 40:\r\n case 34:\r\n if(isScrollAllowed.k.down){\r\n // space bar?\r\n if(e.keyCode !== 32 || !isMediaFocused){\r\n moveSectionDown();\r\n }\r\n }\r\n break;\r\n\r\n //Home\r\n case 36:\r\n if(isScrollAllowed.k.up){\r\n moveTo(1);\r\n }\r\n break;\r\n\r\n //End\r\n case 35:\r\n if(isScrollAllowed.k.down){\r\n moveTo( $(SECTION_SEL).length );\r\n }\r\n break;\r\n\r\n //left\r\n case 37:\r\n if(isScrollAllowed.k.left){\r\n moveSlideLeft();\r\n }\r\n break;\r\n\r\n //right\r\n case 39:\r\n if(isScrollAllowed.k.right){\r\n moveSlideRight();\r\n }\r\n break;\r\n\r\n default:\r\n return; // exit this handler for other keys\r\n }\r\n }\r\n\r\n /**\r\n * Detecting the direction of the mouse movement.\r\n * Used only for the middle button of the mouse.\r\n */\r\n var oldPageY = 0;\r\n function mouseMoveHandler(e){\r\n if(!options.autoScrolling){\r\n return;\r\n }\r\n if(canScroll){\r\n // moving up\r\n if (e.pageY < oldPageY && isScrollAllowed.m.up){\r\n moveSectionUp();\r\n }\r\n\r\n // moving down\r\n else if(e.pageY > oldPageY && isScrollAllowed.m.down){\r\n moveSectionDown();\r\n }\r\n }\r\n oldPageY = e.pageY;\r\n }\r\n\r\n /**\r\n * Scrolls horizontal sliders.\r\n */\r\n function landscapeScroll(slides, destiny, direction){\r\n var section = closest(slides, SECTION_SEL);\r\n var v = {\r\n slides: slides,\r\n destiny: destiny,\r\n direction: direction,\r\n destinyPos: {left: destiny.offsetLeft},\r\n slideIndex: index(destiny),\r\n section: section,\r\n sectionIndex: index(section, SECTION_SEL),\r\n anchorLink: section.getAttribute('data-anchor'),\r\n slidesNav: $(SLIDES_NAV_SEL, section)[0],\r\n slideAnchor: getAnchor(destiny),\r\n prevSlide: $(SLIDE_ACTIVE_SEL, section)[0],\r\n prevSlideIndex: index($(SLIDE_ACTIVE_SEL, section)[0]),\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n localIsResizing: isResizing\r\n };\r\n v.xMovement = getXmovement(v.prevSlideIndex, v.slideIndex);\r\n v.direction = v.direction ? v.direction : v.xMovement;\r\n\r\n //important!! Only do it when not resizing\r\n if(!v.localIsResizing){\r\n //preventing from scrolling to the next/prev section when using scrollHorizontally\r\n canScroll = false;\r\n }\r\n\r\n if(options.onSlideLeave){\r\n\r\n //if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing && v.xMovement!=='none'){\r\n if(isFunction( options.onSlideLeave )){\r\n if( fireCallback('onSlideLeave', v) === false){\r\n slideMoving = false;\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n addClass(destiny, ACTIVE);\r\n removeClass(siblings(destiny), ACTIVE);\r\n\r\n if(!v.localIsResizing){\r\n stopMedia(v.prevSlide);\r\n lazyLoad(destiny);\r\n }\r\n\r\n if(!options.loopHorizontal && options.controlArrows){\r\n //hidding it for the fist slide, showing for the rest\r\n toggle($(SLIDES_ARROW_PREV_SEL, section), v.slideIndex!==0);\r\n\r\n //hidding it for the last slide, showing for the rest\r\n toggle($(SLIDES_ARROW_NEXT_SEL, section), next(destiny) != null);\r\n }\r\n\r\n //only changing the URL if the slides are in the current section (not for resize re-adjusting)\r\n if(hasClass(section, ACTIVE) && !v.localIsResizing){\r\n setState(v.slideIndex, v.slideAnchor, v.anchorLink, v.sectionIndex);\r\n }\r\n\r\n performHorizontalMove(slides, v, true);\r\n }\r\n\r\n\r\n function afterSlideLoads(v){\r\n activeSlidesNavigation(v.slidesNav, v.slideIndex);\r\n\r\n //if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing){\r\n if(isFunction( options.afterSlideLoad )){\r\n fireCallback('afterSlideLoad', v);\r\n }\r\n\r\n //needs to be inside the condition to prevent problems with continuousVertical and scrollHorizontally\r\n //and to prevent double scroll right after a windows resize\r\n canScroll = true;\r\n\r\n playMedia(v.destiny);\r\n }\r\n\r\n //letting them slide again\r\n slideMoving = false;\r\n }\r\n\r\n /**\r\n * Performs the horizontal movement. (CSS3 or jQuery)\r\n *\r\n * @param fireCallback {Bool} - determines whether or not to fire the callback\r\n */\r\n function performHorizontalMove(slides, v, fireCallback){\r\n var destinyPos = v.destinyPos;\r\n\r\n if(options.css3){\r\n var translate3d = 'translate3d(-' + Math.round(destinyPos.left) + 'px, 0px, 0px)';\r\n\r\n FP.test.translate3dH[v.sectionIndex] = translate3d;\r\n css(addAnimation($(SLIDES_CONTAINER_SEL, slides)), getTransforms(translate3d));\r\n\r\n afterSlideLoadsId = setTimeout(function(){\r\n if(fireCallback){\r\n afterSlideLoads(v);\r\n }\r\n }, options.scrollingSpeed);\r\n }else{\r\n FP.test.left[v.sectionIndex] = Math.round(destinyPos.left);\r\n\r\n scrollTo(slides, Math.round(destinyPos.left), options.scrollingSpeed, function(){\r\n if(fireCallback){\r\n afterSlideLoads(v);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the state for the horizontal bullet navigations.\r\n */\r\n function activeSlidesNavigation(slidesNav, slideIndex){\r\n if(options.slidesNavigation && slidesNav != null){\r\n removeClass($(ACTIVE_SEL, slidesNav), ACTIVE);\r\n addClass( $('a', $('li', slidesNav)[slideIndex] ), ACTIVE);\r\n }\r\n }\r\n\r\n var previousHeight = windowsHeight;\r\n\r\n /*\r\n * Resize event handler.\r\n */ \r\n function resizeHandler(){\r\n clearTimeout(resizeId);\r\n\r\n //in order to call the functions only when the resize is finished\r\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing \r\n resizeId = setTimeout(function(){\r\n\r\n //issue #3336 \r\n //(some apps or browsers, like Chrome/Firefox for Mobile take time to report the real height)\r\n //so we check it 3 times with intervals in that case\r\n for(var i = 0; i< 4; i++){\r\n resizeHandlerId = setTimeout(resizeActions, 200 * i);\r\n }\r\n }, 200);\r\n }\r\n\r\n /**\r\n * When resizing the site, we adjust the heights of the sections, slimScroll...\r\n */\r\n function resizeActions(){\r\n\r\n //checking if it needs to get responsive\r\n responsive();\r\n\r\n // rebuild immediately on touch devices\r\n if (isTouchDevice) {\r\n var activeElement = document.activeElement;\r\n\r\n //if the keyboard is NOT visible\r\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\r\n var currentHeight = getWindowHeight();\r\n\r\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\r\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\r\n reBuild(true);\r\n previousHeight = currentHeight;\r\n }\r\n }\r\n }\r\n else{\r\n adjustToNewViewport();\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the site needs to get responsive and disables autoScrolling if so.\r\n * A class `fp-responsive` is added to the plugin's container in case the user wants to use it for his own responsive CSS.\r\n */\r\n function responsive(){\r\n var widthLimit = options.responsive || options.responsiveWidth; //backwards compatiblity\r\n var heightLimit = options.responsiveHeight;\r\n\r\n //only calculating what we need. Remember its called on the resize event.\r\n var isBreakingPointWidth = widthLimit && window.innerWidth < widthLimit;\r\n var isBreakingPointHeight = heightLimit && window.innerHeight < heightLimit;\r\n\r\n if(widthLimit && heightLimit){\r\n setResponsive(isBreakingPointWidth || isBreakingPointHeight);\r\n }\r\n else if(widthLimit){\r\n setResponsive(isBreakingPointWidth);\r\n }\r\n else if(heightLimit){\r\n setResponsive(isBreakingPointHeight);\r\n }\r\n }\r\n\r\n /**\r\n * Adds transition animations for the given element\r\n */\r\n function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }\r\n\r\n /**\r\n * Remove transition animations for the given element\r\n */\r\n function removeAnimation(element){\r\n return addClass(element, NO_TRANSITION);\r\n }\r\n\r\n /**\r\n * Activating the vertical navigation bullets according to the given slide name.\r\n */\r\n function activateNavDots(name, sectionIndex){\r\n if(options.navigation && $(SECTION_NAV_SEL)[0] != null){\r\n removeClass($(ACTIVE_SEL, $(SECTION_NAV_SEL)[0]), ACTIVE);\r\n if(name){\r\n addClass( $('a[href=\"#' + name + '\"]', $(SECTION_NAV_SEL)[0]), ACTIVE);\r\n }else{\r\n addClass($('a', $('li', $(SECTION_NAV_SEL)[0])[sectionIndex]), ACTIVE);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Activating the website main menu elements according to the given slide name.\r\n */\r\n function activateMenuElement(name){\r\n $(options.menu).forEach(function(menu) {\r\n if(options.menu && menu != null){\r\n removeClass($(ACTIVE_SEL, menu), ACTIVE);\r\n addClass($('[data-menuanchor=\"'+name+'\"]', menu), ACTIVE);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sets to active the current menu and vertical nav items.\r\n */\r\n function activateMenuAndNav(anchor, index){\r\n activateMenuElement(anchor);\r\n activateNavDots(anchor, index);\r\n }\r\n\r\n /**\r\n * Retuns `up` or `down` depending on the scrolling movement to reach its destination\r\n * from the current section.\r\n */\r\n function getYmovement(destiny){\r\n var fromIndex = index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n var toIndex = index(destiny, SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }\r\n\r\n /**\r\n * Retuns `right` or `left` depending on the scrolling movement to reach its destination\r\n * from the current slide.\r\n */\r\n function getXmovement(fromIndex, toIndex){\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'left';\r\n }\r\n return 'right';\r\n }\r\n\r\n function addTableClass(element){\r\n //In case we are styling for the 2nd time as in with reponsiveSlides\r\n if(!hasClass(element, TABLE)){\r\n var wrapper = document.createElement('div');\r\n wrapper.className = TABLE_CELL;\r\n wrapper.style.height = getTableHeight(element) + 'px';\r\n\r\n addClass(element, TABLE);\r\n wrapInner(element, wrapper);\r\n }\r\n }\r\n\r\n function getTableHeight(element){\r\n var sectionHeight = windowsHeight;\r\n\r\n if(options.paddingTop || options.paddingBottom){\r\n var section = element;\r\n if(!hasClass(section, SECTION)){\r\n section = closest(element, SECTION_SEL);\r\n }\r\n\r\n var paddings = parseInt(getComputedStyle(section)['padding-top']) + parseInt(getComputedStyle(section)['padding-bottom']);\r\n sectionHeight = (windowsHeight - paddings);\r\n }\r\n\r\n return sectionHeight;\r\n }\r\n\r\n /**\r\n * Adds a css3 transform property to the container class with or without animation depending on the animated param.\r\n */\r\n function transformContainer(translate3d, animated){\r\n if(animated){\r\n addAnimation(container);\r\n }else{\r\n removeAnimation(container);\r\n }\r\n\r\n css(container, getTransforms(translate3d));\r\n FP.test.translate3d = translate3d;\r\n\r\n //syncronously removing the class after the animation has been applied.\r\n setTimeout(function(){\r\n removeClass(container, NO_TRANSITION);\r\n },10);\r\n }\r\n\r\n /**\r\n * Gets a section by its anchor / index\r\n */\r\n function getSectionByAnchor(sectionAnchor){\r\n var section = $(SECTION_SEL + '[data-anchor=\"'+sectionAnchor+'\"]', container)[0];\r\n if(!section){\r\n var sectionIndex = typeof sectionAnchor !== 'undefined' ? sectionAnchor -1 : 0;\r\n section = $(SECTION_SEL)[sectionIndex];\r\n }\r\n\r\n return section;\r\n }\r\n\r\n /**\r\n * Gets a slide inside a given section by its anchor / index\r\n */\r\n function getSlideByAnchor(slideAnchor, section){\r\n var slide = $(SLIDE_SEL + '[data-anchor=\"'+slideAnchor+'\"]', section)[0];\r\n if(slide == null){\r\n slideAnchor = typeof slideAnchor !== 'undefined' ? slideAnchor : 0;\r\n slide = $(SLIDE_SEL, section)[slideAnchor];\r\n }\r\n\r\n return slide;\r\n }\r\n\r\n /**\r\n * Scrolls to the given section and slide anchors\r\n */\r\n function scrollPageAndSlide(sectionAnchor, slideAnchor){\r\n var section = getSectionByAnchor(sectionAnchor);\r\n\r\n //do nothing if there's no section with the given anchor name\r\n if(section == null) return;\r\n\r\n var slide = getSlideByAnchor(slideAnchor, section);\r\n\r\n //we need to scroll to the section and then to the slide\r\n if (getAnchor(section) !== lastScrolledDestiny && !hasClass(section, ACTIVE)){\r\n scrollPage(section, function(){\r\n scrollSlider(slide);\r\n });\r\n }\r\n //if we were already in the section\r\n else{\r\n scrollSlider(slide);\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the slider to the given slide destination for the given section\r\n */\r\n function scrollSlider(slide){\r\n if(slide != null){\r\n landscapeScroll(closest(slide, SLIDES_WRAPPER_SEL), slide);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a landscape navigation bar with dots for horizontal sliders.\r\n */\r\n function addSlidesNavigation(section, numSlides){\r\n appendTo(createElementFromHTML('
          '), section);\r\n var nav = $(SLIDES_NAV_SEL, section)[0];\r\n\r\n //top or bottom\r\n addClass(nav, 'fp-' + options.slidesNavPosition);\r\n\r\n for(var i=0; i< numSlides; i++){\r\n appendTo(createElementFromHTML('
        • '+ getBulletLinkName(i, 'Slide') +'
        • '), $('ul', nav)[0] );\r\n }\r\n\r\n //centering it\r\n css(nav, {'margin-left': '-' + (nav.innerWidth/2) + 'px'});\r\n\r\n addClass($('a', $('li', nav)[0] ), ACTIVE);\r\n }\r\n\r\n\r\n /**\r\n * Sets the state of the website depending on the active section/slide.\r\n * It changes the URL hash when needed and updates the body class.\r\n */\r\n function setState(slideIndex, slideAnchor, anchorLink, sectionIndex){\r\n var sectionHash = '';\r\n\r\n if(options.anchors.length && !options.lockAnchors){\r\n\r\n //isn't it the first slide?\r\n if(slideIndex){\r\n if(anchorLink != null){\r\n sectionHash = anchorLink;\r\n }\r\n\r\n //slide without anchor link? We take the index instead.\r\n if(slideAnchor == null){\r\n slideAnchor = slideIndex;\r\n }\r\n\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(sectionHash + '/' + slideAnchor);\r\n\r\n //first slide won't have slide anchor, just the section one\r\n }else if(slideIndex != null){\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(anchorLink);\r\n }\r\n\r\n //section without slides\r\n else{\r\n setUrlHash(anchorLink);\r\n }\r\n }\r\n\r\n setBodyClass();\r\n }\r\n\r\n /**\r\n * Sets the URL hash.\r\n */\r\n function setUrlHash(url){\r\n if(options.recordHistory){\r\n location.hash = url;\r\n }else{\r\n //Mobile Chrome doesn't work the normal way, so... lets use HTML5 for phones :)\r\n if(isTouchDevice || isTouch){\r\n window.history.replaceState(undefined, undefined, '#' + url);\r\n }else{\r\n var baseUrl = window.location.href.split('#')[0];\r\n window.location.replace( baseUrl + '#' + url );\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the anchor for the given slide / section. Its index will be used if there's none.\r\n */\r\n function getAnchor(element){\r\n if(!element){\r\n return null;\r\n }\r\n var anchor = element.getAttribute('data-anchor');\r\n var elementIndex = index(element);\r\n\r\n //Slide without anchor link? We take the index instead.\r\n if(anchor == null){\r\n anchor = elementIndex;\r\n }\r\n\r\n return anchor;\r\n }\r\n\r\n /**\r\n * Sets a class for the body of the page depending on the active section / slide\r\n */\r\n function setBodyClass(){\r\n var section = $(SECTION_ACTIVE_SEL)[0];\r\n var slide = $(SLIDE_ACTIVE_SEL, section)[0];\r\n\r\n var sectionAnchor = getAnchor(section);\r\n var slideAnchor = getAnchor(slide);\r\n\r\n var text = String(sectionAnchor);\r\n\r\n if(slide){\r\n text = text + '-' + slideAnchor;\r\n }\r\n\r\n //changing slash for dash to make it a valid CSS style\r\n text = text.replace('/', '-').replace('#','');\r\n\r\n //removing previous anchor classes\r\n var classRe = new RegExp('\\\\b\\\\s?' + VIEWING_PREFIX + '-[^\\\\s]+\\\\b', \"g\");\r\n $body.className = $body.className.replace(classRe, '');\r\n\r\n //adding the current anchor\r\n addClass($body, VIEWING_PREFIX + '-' + text);\r\n }\r\n\r\n /**\r\n * Checks for translate3d support\r\n * @return boolean\r\n * http://stackoverflow.com/questions/5661671/detecting-transform-translate3d-support\r\n */\r\n function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n //preventing the style p:empty{display: none;} from returning the wrong result\r\n el.style.display = 'block';\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling action fired by the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements won't scroll through sections.\r\n */\r\n function removeMouseWheelHandler(){\r\n if (document.addEventListener) {\r\n document.removeEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper\r\n document.removeEventListener('wheel', MouseWheelHandler, false); //Firefox\r\n document.removeEventListener('MozMousePixelScroll', MouseWheelHandler, false); //old Firefox\r\n } else {\r\n document.detachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8\r\n }\r\n }\r\n\r\n /**\r\n * Adds the auto scrolling action for the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements will scroll through sections\r\n * https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n */\r\n function addMouseWheelHandler(){\r\n var prefix = '';\r\n var _addEventListener;\r\n\r\n if (window.addEventListener){\r\n _addEventListener = \"addEventListener\";\r\n }else{\r\n _addEventListener = \"attachEvent\";\r\n prefix = 'on';\r\n }\r\n\r\n // detect available wheel event\r\n var support = 'onwheel' in document.createElement('div') ? 'wheel' : // Modern browsers support \"wheel\"\r\n document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least \"mousewheel\"\r\n 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox\r\n var passiveEvent = g_supportsPassive ? {passive: false }: false;\r\n\r\n if(support == 'DOMMouseScroll'){\r\n document[ _addEventListener ](prefix + 'MozMousePixelScroll', MouseWheelHandler, passiveEvent);\r\n }\r\n\r\n //handle MozMousePixelScroll in older Firefox\r\n else{\r\n document[ _addEventListener ](prefix + support, MouseWheelHandler, passiveEvent);\r\n }\r\n }\r\n\r\n /**\r\n * Binding the mousemove when the mouse's middle button is pressed\r\n */\r\n function addMiddleWheelHandler(){\r\n container.addEventListener('mousedown', mouseDownHandler);\r\n container.addEventListener('mouseup', mouseUpHandler);\r\n }\r\n\r\n /**\r\n * Unbinding the mousemove when the mouse's middle button is released\r\n */\r\n function removeMiddleWheelHandler(){\r\n container.removeEventListener('mousedown', mouseDownHandler);\r\n container.removeEventListener('mouseup', mouseUpHandler);\r\n }\r\n\r\n /**\r\n * Adds the possibility to auto scroll through sections on touch devices.\r\n */\r\n function addTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n if(options.autoScrolling){\r\n $body.removeEventListener(events.touchmove, preventBouncing, {passive: false});\r\n $body.addEventListener(events.touchmove, preventBouncing, {passive: false});\r\n }\r\n\r\n var touchWrapper = options.touchWrapper;\r\n touchWrapper.removeEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n\r\n touchWrapper.addEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.addEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n }\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling for touch devices.\r\n */\r\n function removeTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n // normalScrollElements requires it off #2691\r\n if(options.autoScrolling){\r\n $body.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n $body.removeEventListener(events.touchmove, preventBouncing, {passive: false});\r\n }\r\n\r\n var touchWrapper = options.touchWrapper;\r\n touchWrapper.removeEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n }\r\n }\r\n\r\n /*\r\n * Returns and object with Microsoft pointers (for IE<11 and for IE >= 11)\r\n * http://msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx\r\n */\r\n function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }\r\n\r\n /**\r\n * Gets the pageX and pageY properties depending on the browser.\r\n * https://github.com/alvarotrigo/fullPage.js/issues/194#issuecomment-34069854\r\n */\r\n function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }\r\n\r\n /**\r\n * Slides silently (with no animation) the active slider to the given slide.\r\n * @param noCallback {bool} true or defined -> no callbacks\r\n */\r\n function silentLandscapeScroll(activeSlide, noCallbacks){\r\n setScrollingSpeed(0, 'internal');\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n //preventing firing callbacks afterSlideLoad etc.\r\n isResizing = true;\r\n }\r\n\r\n landscapeScroll(closest(activeSlide, SLIDES_WRAPPER_SEL), activeSlide);\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n isResizing = false;\r\n }\r\n\r\n setScrollingSpeed(originals.scrollingSpeed, 'internal');\r\n }\r\n\r\n /**\r\n * Scrolls silently (with no animation) the page to the given Y position.\r\n */\r\n function silentScroll(top){\r\n // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625\r\n // that's why we round it to 0.\r\n var roundedTop = Math.round(top);\r\n\r\n if (options.css3 && options.autoScrolling && !options.scrollBar){\r\n var translate3d = 'translate3d(0px, -' + roundedTop + 'px, 0px)';\r\n transformContainer(translate3d, false);\r\n }\r\n else if(options.autoScrolling && !options.scrollBar){\r\n css(container, {'top': -roundedTop + 'px'});\r\n FP.test.top = -roundedTop + 'px';\r\n }\r\n else{\r\n var scrollSettings = getScrollSettings(roundedTop);\r\n setScrolling(scrollSettings.element, scrollSettings.options);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the cross-browser transform string.\r\n */\r\n function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }\r\n\r\n /**\r\n * Allowing or disallowing the mouse/swipe scroll in a given direction. (not for keyboard)\r\n * @type m (mouse) or k (keyboard)\r\n */\r\n function setIsScrollAllowed(value, direction, type){\r\n //up, down, left, right\r\n if(direction !== 'all'){\r\n isScrollAllowed[type][direction] = value;\r\n }\r\n\r\n //all directions?\r\n else{\r\n Object.keys(isScrollAllowed[type]).forEach(function(key){\r\n isScrollAllowed[type][key] = value;\r\n });\r\n }\r\n }\r\n\r\n /*\r\n * Destroys fullpage.js plugin events and optinally its html markup and styles\r\n */\r\n function destroy(all){\r\n setAutoScrolling(false, 'internal');\r\n setAllowScrolling(true);\r\n setMouseHijack(false);\r\n setKeyboardScrolling(false);\r\n addClass(container, DESTROYED);\r\n\r\n [\r\n afterSlideLoadsId, \r\n afterSectionLoadsId,\r\n resizeId,\r\n scrollId,\r\n scrollId2,\r\n g_doubleCheckHeightId,\r\n resizeHandlerId\r\n ].forEach(function(timeoutId){\r\n clearTimeout(timeoutId);\r\n });\r\n\r\n window.removeEventListener('scroll', scrollHandler);\r\n window.removeEventListener('hashchange', hashChangeHandler);\r\n window.removeEventListener('resize', resizeHandler);\r\n\r\n document.removeEventListener('keydown', keydownHandler);\r\n document.removeEventListener('keyup', keyUpHandler);\r\n\r\n ['click', 'touchstart'].forEach(function(eventName){\r\n document.removeEventListener(eventName, delegatedEvents);\r\n });\r\n\r\n ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){\r\n document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required!\r\n });\r\n\r\n //lets make a mess!\r\n if(all){\r\n destroyStructure();\r\n }\r\n }\r\n\r\n /*\r\n * Removes inline styles added by fullpage.js\r\n */\r\n function destroyStructure(){\r\n //reseting the `top` or `translate` properties to 0\r\n silentScroll(0);\r\n\r\n //loading all the lazy load content\r\n $('img[data-src], source[data-src], audio[data-src], iframe[data-src]', container).forEach(function(item){\r\n setSrc(item, 'src');\r\n });\r\n\r\n $('img[data-srcset]').forEach(function(item){\r\n setSrc(item, 'srcset');\r\n });\r\n\r\n remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL));\r\n\r\n //removing inline styles\r\n css($(SECTION_SEL), {\r\n 'height': '',\r\n 'background-color' : '',\r\n 'padding': ''\r\n });\r\n\r\n css($(SLIDE_SEL), {\r\n 'width': ''\r\n });\r\n\r\n css(container, {\r\n 'height': '',\r\n 'position': '',\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n css($htmlBody, {\r\n 'overflow': '',\r\n 'height': ''\r\n });\r\n\r\n // remove .fp-enabled class\r\n removeClass($html, ENABLED);\r\n\r\n // remove .fp-responsive class\r\n removeClass($body, RESPONSIVE);\r\n\r\n // remove all of the .fp-viewing- classes\r\n $body.className.split(/\\s+/).forEach(function (className) {\r\n if (className.indexOf(VIEWING_PREFIX) === 0) {\r\n removeClass($body, className);\r\n }\r\n });\r\n\r\n //removing added classes\r\n $(SECTION_SEL + ', ' + SLIDE_SEL).forEach(function(item){\r\n if(options.scrollOverflowHandler && options.scrollOverflow){\r\n options.scrollOverflowHandler.remove(item);\r\n }\r\n removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY);\r\n var previousStyles = item.getAttribute('data-fp-styles');\r\n if(previousStyles){\r\n item.setAttribute('style', item.getAttribute('data-fp-styles'));\r\n }\r\n\r\n //removing anchors if they were not set using the HTML markup\r\n if(hasClass(item, SECTION) && !g_initialAnchorsInDom){\r\n item.removeAttribute('data-anchor');\r\n }\r\n });\r\n\r\n //removing the applied transition from the fullpage wrapper\r\n removeAnimation(container);\r\n\r\n //Unwrapping content\r\n [TABLE_CELL_SEL, SLIDES_CONTAINER_SEL,SLIDES_WRAPPER_SEL].forEach(function(selector){\r\n $(selector, container).forEach(function(item){\r\n //unwrap not being use in case there's no child element inside and its just text\r\n unwrap(item);\r\n });\r\n });\r\n\r\n //removing the applied transition from the fullpage wrapper\r\n css(container, {\r\n '-webkit-transition': 'none',\r\n 'transition': 'none'\r\n });\r\n\r\n //scrolling the page to the top with no animation\r\n window.scrollTo(0, 0);\r\n\r\n //removing selectors\r\n var usedSelectors = [SECTION, SLIDE, SLIDES_CONTAINER];\r\n usedSelectors.forEach(function(item){\r\n removeClass($('.' + item), item);\r\n });\r\n }\r\n\r\n /*\r\n * Sets the state for a variable with multiple states (original, and temporal)\r\n * Some variables such as `autoScrolling` or `recordHistory` might change automatically its state when using `responsive` or `autoScrolling:false`.\r\n * This function is used to keep track of both states, the original and the temporal one.\r\n * If type is not 'internal', then we assume the user is globally changing the variable.\r\n */\r\n function setVariableState(variable, value, type){\r\n options[variable] = value;\r\n if(type !== 'internal'){\r\n originals[variable] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Displays warnings\r\n */\r\n function displayWarnings(){\r\n var l = options['li' + 'c' + 'enseK' + 'e' + 'y'];\r\n var msgStyle = 'font-size: 15px;background:yellow;';\r\n\r\n if(!isOK){\r\n showError('error', 'Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:');\r\n showError('error', 'https://github.com/alvarotrigo/fullPage.js#options.');\r\n }\r\n else if(l && l.length < 20){\r\n console.warn('%c This website was made using fullPage.js slider. More info on the following website:', msgStyle);\r\n console.warn('%c https://alvarotrigo.com/fullPage/', msgStyle);\r\n }\r\n\r\n if(hasClass($html, ENABLED)){\r\n showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!');\r\n return;\r\n }\r\n\r\n // Disable mutually exclusive settings\r\n if (options.continuousVertical &&\r\n (options.loopTop || options.loopBottom)) {\r\n options.continuousVertical = false;\r\n showError('warn', 'Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n if(options.scrollOverflow &&\r\n (options.scrollBar || !options.autoScrolling)){\r\n showError('warn', 'Options scrollBar:true and autoScrolling:false are mutually exclusive with scrollOverflow:true. Sections with scrollOverflow might not work well in Firefox');\r\n }\r\n\r\n if(options.continuousVertical && (options.scrollBar || !options.autoScrolling)){\r\n options.continuousVertical = false;\r\n showError('warn', 'Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n if(options.scrollOverflow && options.scrollOverflowHandler == null){\r\n options.scrollOverflow = false;\r\n showError('error', 'The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.');\r\n }\r\n\r\n //using extensions? Wrong file!\r\n extensions.forEach(function(extension){\r\n //is the option set to true?\r\n if(options[extension]){\r\n showError('warn', 'fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: '+ extension);\r\n }\r\n });\r\n\r\n //anchors can not have the same value as any element ID or NAME\r\n options.anchors.forEach(function(name){\r\n\r\n //case insensitive selectors (http://stackoverflow.com/a/19465187/1081396)\r\n var nameAttr = [].slice.call($('[name]')).filter(function(item) {\r\n return item.getAttribute('name') && item.getAttribute('name').toLowerCase() == name.toLowerCase();\r\n });\r\n\r\n var idAttr = [].slice.call($('[id]')).filter(function(item) {\r\n return item.getAttribute('id') && item.getAttribute('id').toLowerCase() == name.toLowerCase();\r\n });\r\n\r\n if(idAttr.length || nameAttr.length ){\r\n showError('error', 'data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).');\r\n var propertyName = idAttr.length ? 'id' : 'name';\r\n\r\n if(idAttr.length || nameAttr.length){\r\n showError('error', '\"' + name + '\" is is being used by another element `'+ propertyName +'` property');\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Getting the position of the element to scroll when using jQuery animations\r\n */\r\n function getScrolledPosition(element){\r\n var position;\r\n\r\n //is not the window element and is a slide?\r\n if(element.self != window && hasClass(element, SLIDES_WRAPPER)){\r\n position = element.scrollLeft;\r\n }\r\n else if(!options.autoScrolling || options.scrollBar){\r\n position = getScrollTop();\r\n }\r\n else{\r\n position = element.offsetTop;\r\n }\r\n\r\n //gets the top property of the wrapper\r\n return position;\r\n }\r\n\r\n /**\r\n * Simulates the animated scrollTop of jQuery. Used when css3:false or scrollBar:true or autoScrolling:false\r\n * http://stackoverflow.com/a/16136789/1081396\r\n */\r\n function scrollTo(element, to, duration, callback) {\r\n var start = getScrolledPosition(element);\r\n var change = to - start;\r\n var currentTime = 0;\r\n var increment = 20;\r\n activeAnimation = true;\r\n\r\n var animateScroll = function(){\r\n if(activeAnimation){ //in order to stope it from other function whenever we want\r\n var val = to;\r\n\r\n currentTime += increment;\r\n\r\n if(duration){\r\n val = window.fp_easings[options.easing](currentTime, start, change, duration);\r\n }\r\n\r\n setScrolling(element, val);\r\n\r\n if(currentTime < duration) {\r\n setTimeout(animateScroll, increment);\r\n }else if(typeof callback !== 'undefined'){\r\n callback();\r\n }\r\n }else if (currentTime < duration){\r\n callback();\r\n }\r\n };\r\n\r\n animateScroll();\r\n }\r\n\r\n /**\r\n * Scrolls the page / slider the given number of pixels.\r\n * It will do it one or another way dependiong on the library's config.\r\n */\r\n function setScrolling(element, val){\r\n if(!options.autoScrolling || options.scrollBar || (element.self != window && hasClass(element, SLIDES_WRAPPER))){\r\n\r\n //scrolling horizontally through the slides?\r\n if(element.self != window && hasClass(element, SLIDES_WRAPPER)){\r\n element.scrollLeft = val;\r\n }\r\n //vertical scroll\r\n else{\r\n element.scrollTo(0, val);\r\n }\r\n }else{\r\n element.style.top = val + 'px';\r\n }\r\n }\r\n\r\n /**\r\n * Gets the active slide.\r\n */\r\n function getActiveSlide(){\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\r\n return nullOrSlide(activeSlide);\r\n }\r\n\r\n /**\r\n * Gets the active section.\r\n */\r\n function getActiveSection(){\r\n return new Section($(SECTION_ACTIVE_SEL)[0]);\r\n }\r\n\r\n /**\r\n * Item. Slide or Section objects share the same properties.\r\n */\r\n function Item(el, selector){\r\n this.anchor = el.getAttribute('data-anchor');\r\n this.item = el;\r\n this.index = index(el, selector);\r\n this.isLast = this.index === el.parentElement.querySelectorAll(selector).length -1;\r\n this.isFirst = !this.index;\r\n }\r\n\r\n /**\r\n * Section object\r\n */\r\n function Section(el){\r\n Item.call(this, el, SECTION_SEL);\r\n }\r\n\r\n /**\r\n * Slide object\r\n */\r\n function Slide(el){\r\n Item.call(this, el, SLIDE_SEL);\r\n }\r\n\r\n return FP;\r\n } //end of $.fn.fullpage\r\n\r\n //utils\r\n /**\r\n * Shows a message in the console of the given type.\r\n */\r\n function showError(type, text){\r\n window.console && window.console[type] && window.console[type]('fullPage: ' + text);\r\n }\r\n\r\n /**\r\n * Equivalent or jQuery function $().\r\n */\r\n function $(selector, context){\r\n context = arguments.length > 1 ? context : document;\r\n return context ? context.querySelectorAll(selector) : null;\r\n }\r\n\r\n /**\r\n * Extends a given Object properties and its childs.\r\n */\r\n function deepExtend(out) {\r\n out = out || {};\r\n for (var i = 1, len = arguments.length; i < len; ++i){\r\n var obj = arguments[i];\r\n\r\n if(!obj){\r\n continue;\r\n }\r\n\r\n for(var key in obj){\r\n if (!obj.hasOwnProperty(key)){\r\n continue;\r\n }\r\n\r\n // based on https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/\r\n if (Object.prototype.toString.call(obj[key]) === '[object Object]'){\r\n out[key] = deepExtend(out[key], obj[key]);\r\n continue;\r\n }\r\n\r\n out[key] = obj[key];\r\n }\r\n }\r\n return out;\r\n }\r\n\r\n /**\r\n * Checks if the passed element contains the passed class.\r\n */\r\n function hasClass(el, className){\r\n if(el == null){\r\n return false;\r\n }\r\n if (el.classList){\r\n return el.classList.contains(className);\r\n }\r\n return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);\r\n }\r\n\r\n /**\r\n * Gets the window height. Crossbrowser.\r\n */\r\n function getWindowHeight(){\r\n return 'innerHeight' in window ? window.innerHeight : document.documentElement.offsetHeight;\r\n }\r\n\r\n /**\r\n * Gets the window width.\r\n */\r\n function getWindowWidth(){\r\n return window.innerWidth;\r\n }\r\n\r\n /**\r\n * Set's the CSS properties for the passed item/s.\r\n * @param {NodeList|HTMLElement} items\r\n * @param {Object} props css properties and values.\r\n */\r\n function css(items, props) {\r\n items = getList(items);\r\n\r\n var key;\r\n for (key in props) {\r\n if (props.hasOwnProperty(key)) {\r\n if (key !== null) {\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n item.style[key] = props[key];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Generic function to get the previous or next element.\r\n */\r\n function until(item, selector, fn){\r\n var sibling = item[fn];\r\n while(sibling && !matches(sibling, selector)){\r\n sibling = sibling[fn];\r\n }\r\n\r\n return sibling;\r\n }\r\n\r\n /**\r\n * Gets the previous element to the passed element that matches the passed selector.\r\n */\r\n function prevUntil(item, selector){\r\n return until(item, selector, 'previousElementSibling');\r\n }\r\n\r\n /**\r\n * Gets the next element to the passed element that matches the passed selector.\r\n */\r\n function nextUntil(item, selector){\r\n return until(item, selector, 'nextElementSibling');\r\n }\r\n\r\n /**\r\n * Gets the previous element to the passed element.\r\n */\r\n function prev(item){\r\n return item.previousElementSibling;\r\n }\r\n\r\n /**\r\n * Gets the next element to the passed element.\r\n */\r\n function next(item){\r\n return item.nextElementSibling;\r\n }\r\n\r\n /**\r\n * Gets the last element from the passed list of elements.\r\n */\r\n function last(item){\r\n return item[item.length-1];\r\n }\r\n\r\n /**\r\n * Gets index from the passed element.\r\n * @param {String} selector is optional.\r\n */\r\n function index(item, selector) {\r\n item = isArrayOrList(item) ? item[0] : item;\r\n var children = selector != null? $(selector, item.parentNode) : item.parentNode.childNodes;\r\n var num = 0;\r\n for (var i=0; iafdas');\r\n * wrapInner(document.querySelector('#pepe'), element);\r\n *\r\n * https://jsfiddle.net/zexxz0tw/6/\r\n *\r\n * https://stackoverflow.com/a/21817590/1081396\r\n */\r\n function wrapInner(parent, wrapper) {\r\n if (typeof wrapper === \"string\"){\r\n wrapper = createElementFromHTML(wrapper);\r\n }\r\n\r\n parent.appendChild(wrapper);\r\n\r\n while(parent.firstChild !== wrapper){\r\n wrapper.appendChild(parent.firstChild);\r\n }\r\n }\r\n\r\n /**\r\n * Usage:\r\n * unwrap(document.querySelector('#pepe'));\r\n * unwrap(element);\r\n *\r\n * https://jsfiddle.net/szjt0hxq/1/\r\n *\r\n */\r\n function unwrap(wrapper) {\r\n var wrapperContent = document.createDocumentFragment();\r\n while (wrapper.firstChild) {\r\n wrapperContent.appendChild(wrapper.firstChild);\r\n }\r\n\r\n wrapper.parentNode.replaceChild(wrapperContent, wrapper);\r\n }\r\n\r\n /**\r\n * http://stackoverflow.com/questions/22100853/dom-pure-javascript-solution-to-jquery-closest-implementation\r\n * Returns the element or `false` if there's none\r\n */\r\n function closest(el, selector) {\r\n if(el && el.nodeType === 1){\r\n if(matches(el, selector)){\r\n return el;\r\n }\r\n return closest(el.parentNode, selector);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Places one element (rel) after another one or group of them (reference).\r\n * @param {HTMLElement} reference\r\n * @param {HTMLElement|NodeList|String} el\r\n * https://jsfiddle.net/9s97hhzv/1/\r\n */\r\n function after(reference, el) {\r\n insertBefore(reference, reference.nextSibling, el);\r\n }\r\n\r\n /**\r\n * Places one element (rel) before another one or group of them (reference).\r\n * @param {HTMLElement} reference\r\n * @param {HTMLElement|NodeList|String} el\r\n * https://jsfiddle.net/9s97hhzv/1/\r\n */\r\n function before(reference, el) {\r\n insertBefore(reference, reference, el);\r\n }\r\n\r\n /**\r\n * Based in https://stackoverflow.com/a/19316024/1081396\r\n * and https://stackoverflow.com/a/4793630/1081396\r\n */\r\n function insertBefore(reference, beforeElement, el){\r\n if(!isArrayOrList(el)){\r\n if(typeof el == 'string'){\r\n el = createElementFromHTML(el);\r\n }\r\n el = [el];\r\n }\r\n\r\n for(var i = 0; i -1;\r\n\r\n // cache common elements\r\n var $htmlBody = $('html, body');\r\n var $html = $('html')[0];\r\n var $body = $('body')[0];\r\n\r\n //only once my friend!\r\n if(hasClass($html, ENABLED)){ displayWarnings(); return; }\r\n\r\n var FP = {};\r\n\r\n // Creating some defaults, extending them with any options that were provided\r\n options = deepExtend({\r\n //navigation\r\n menu: false,\r\n anchors:[],\r\n lockAnchors: false,\r\n navigation: false,\r\n navigationPosition: 'right',\r\n navigationTooltips: [],\r\n showActiveTooltip: false,\r\n slidesNavigation: false,\r\n slidesNavPosition: 'bottom',\r\n scrollBar: false,\r\n hybrid: false,\r\n\r\n //scrolling\r\n css3: true,\r\n scrollingSpeed: 700,\r\n autoScrolling: true,\r\n fitToSection: true,\r\n fitToSectionDelay: 1000,\r\n easing: 'easeInOutCubic',\r\n easingcss3: 'ease',\r\n loopBottom: false,\r\n loopTop: false,\r\n loopHorizontal: true,\r\n continuousVertical: false,\r\n continuousHorizontal: false,\r\n scrollHorizontally: false,\r\n interlockedSlides: false,\r\n dragAndMove: false,\r\n offsetSections: false,\r\n resetSliders: false,\r\n fadingEffect: false,\r\n normalScrollElements: null,\r\n scrollOverflow: false,\r\n scrollOverflowReset: false,\r\n scrollOverflowHandler: window.fp_scrolloverflow ? window.fp_scrolloverflow.iscrollHandler : null,\r\n scrollOverflowOptions: null,\r\n touchSensitivity: 5,\r\n touchWrapper: typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector,\r\n bigSectionsDestination: null,\r\n\r\n //Accessibility\r\n keyboardScrolling: true,\r\n animateAnchor: true,\r\n recordHistory: true,\r\n\r\n //design\r\n controlArrows: true,\r\n controlArrowColor: '#fff',\r\n verticalCentered: true,\r\n sectionsColor : [],\r\n paddingTop: 0,\r\n paddingBottom: 0,\r\n fixedElements: null,\r\n responsive: 0, //backwards compabitility with responsiveWiddth\r\n responsiveWidth: 0,\r\n responsiveHeight: 0,\r\n responsiveSlides: false,\r\n parallax: false,\r\n parallaxOptions: {\r\n type: 'reveal',\r\n percentage: 62,\r\n property: 'translate'\r\n },\r\n cards: false,\r\n cardsOptions: {\r\n perspective: 100,\r\n fadeContent: true,\r\n fadeBackground: true\r\n },\r\n\r\n //Custom selectors\r\n sectionSelector: SECTION_DEFAULT_SEL,\r\n slideSelector: SLIDE_DEFAULT_SEL,\r\n\r\n //events\r\n v2compatible: false,\r\n afterLoad: null,\r\n onLeave: null,\r\n afterRender: null,\r\n afterResize: null,\r\n afterReBuild: null,\r\n afterSlideLoad: null,\r\n onSlideLeave: null,\r\n afterResponsive: null,\r\n\r\n lazyLoading: true\r\n }, options);\r\n\r\n //flag to avoid very fast sliding for landscape sliders\r\n var slideMoving = false;\r\n\r\n var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);\r\n var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));\r\n var container = typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector;\r\n var windowsHeight = getWindowHeight();\r\n var windowsWidth = getWindowWidth();\r\n var isResizing = false;\r\n var isWindowFocused = true;\r\n var lastScrolledDestiny;\r\n var lastScrolledSlide;\r\n var canScroll = true;\r\n var scrollings = [];\r\n var controlPressed;\r\n var startingSection;\r\n var isScrollAllowed = {};\r\n isScrollAllowed.m = { 'up':true, 'down':true, 'left':true, 'right':true };\r\n isScrollAllowed.k = deepExtend({}, isScrollAllowed.m);\r\n var MSPointer = getMSPointer();\r\n var events = {\r\n touchmove: 'ontouchmove' in window ? 'touchmove' : MSPointer.move,\r\n touchstart: 'ontouchstart' in window ? 'touchstart' : MSPointer.down\r\n };\r\n var scrollBarHandler;\r\n\r\n // taken from https://github.com/udacity/ud891/blob/gh-pages/lesson2-focus/07-modals-and-keyboard-traps/solution/modal.js\r\n var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex=\"0\"], [contenteditable]';\r\n\r\n //cheks for passive event support\r\n var g_supportsPassive = false;\r\n try {\r\n var opts = Object.defineProperty({}, 'passive', {\r\n get: function() {\r\n g_supportsPassive = true;\r\n }\r\n });\r\n window.addEventListener(\"testPassive\", null, opts);\r\n window.removeEventListener(\"testPassive\", null, opts);\r\n } catch (e) {}\r\n\r\n //timeouts\r\n var resizeId;\r\n var resizeHandlerId;\r\n var afterSectionLoadsId;\r\n var afterSlideLoadsId;\r\n var scrollId;\r\n var scrollId2;\r\n var keydownId;\r\n var g_doubleCheckHeightId;\r\n var originals = deepExtend({}, options); //deep copy\r\n var activeAnimation;\r\n var g_initialAnchorsInDom = false;\r\n var g_canFireMouseEnterNormalScroll = true;\r\n var g_mediaLoadedId;\r\n var g_transitionLapseId;\r\n var extensions = [\r\n 'parallax',\r\n 'scrollOverflowReset',\r\n 'dragAndMove',\r\n 'offsetSections',\r\n 'fadingEffect',\r\n 'responsiveSlides',\r\n 'continuousHorizontal',\r\n 'interlockedSlides',\r\n 'scrollHorizontally',\r\n 'resetSliders',\r\n 'cards'\r\n ];\r\n\r\n displayWarnings();\r\n\r\n //easeInOutCubic animation included in the plugin\r\n window.fp_easings = deepExtend(window.fp_easings, {\r\n easeInOutCubic: function (t, b, c, d) {\r\n if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;\r\n }\r\n });\r\n\r\n /**\r\n * Sets the autoScroll option.\r\n * It changes the scroll bar visibility and the history of the site as a result.\r\n */\r\n function setAutoScrolling(value, type){\r\n //removing the transformation\r\n if(!value){\r\n silentScroll(0);\r\n }\r\n\r\n setVariableState('autoScrolling', value, type);\r\n\r\n var element = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n if(options.autoScrolling && !options.scrollBar){\r\n css($htmlBody, {\r\n 'overflow': 'hidden',\r\n 'height': '100%'\r\n });\r\n\r\n setRecordHistory(originals.recordHistory, 'internal');\r\n\r\n //for IE touch devices\r\n css(container, {\r\n '-ms-touch-action': 'none',\r\n 'touch-action': 'none'\r\n });\r\n\r\n if(element != null){\r\n //moving the container up\r\n silentScroll(element.offsetTop);\r\n }\r\n }else{\r\n css($htmlBody, {\r\n 'overflow' : 'visible',\r\n 'height' : 'initial'\r\n });\r\n\r\n var recordHistory = !options.autoScrolling ? false : originals.recordHistory;\r\n setRecordHistory(recordHistory, 'internal');\r\n\r\n //for IE touch devices\r\n css(container, {\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n //scrolling the page to the section with no animation\r\n if (element != null) {\r\n var scrollSettings = getScrollSettings(element.offsetTop);\r\n scrollSettings.element.scrollTo(0, scrollSettings.options);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Defines wheter to record the history for each hash change in the URL.\r\n */\r\n function setRecordHistory(value, type){\r\n setVariableState('recordHistory', value, type);\r\n }\r\n\r\n /**\r\n * Defines the scrolling speed\r\n */\r\n function setScrollingSpeed(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n }\r\n\r\n /**\r\n * Sets fitToSection\r\n */\r\n function setFitToSection(value, type){\r\n setVariableState('fitToSection', value, type);\r\n }\r\n\r\n /**\r\n * Sets lockAnchors\r\n */\r\n function setLockAnchors(value){\r\n options.lockAnchors = value;\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the mouse wheel or the trackpad.\r\n */\r\n function setMouseWheelScrolling(value){\r\n if(value){\r\n addMouseWheelHandler();\r\n addMiddleWheelHandler();\r\n }else{\r\n removeMouseWheelHandler();\r\n removeMiddleWheelHandler();\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the mouse wheel/trackpad or touch gestures.\r\n * Optionally a second parameter can be used to specify the direction for which the action will be applied.\r\n *\r\n * @param directions string containing the direction or directions separated by comma.\r\n */\r\n function setAllowScrolling(value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n directions.forEach(function (direction){\r\n setIsScrollAllowed(value, direction, 'm');\r\n });\r\n }\r\n else{\r\n setIsScrollAllowed(value, 'all', 'm');\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the mouse wheel hijacking\r\n */\r\n function setMouseHijack(value){\r\n if(value){\r\n setMouseWheelScrolling(true);\r\n addTouchHandler();\r\n }else{\r\n setMouseWheelScrolling(false);\r\n removeTouchHandler();\r\n }\r\n }\r\n\r\n /**\r\n * Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys\r\n */\r\n function setKeyboardScrolling(value, directions){\r\n if(typeof directions !== 'undefined'){\r\n directions = directions.replace(/ /g,'').split(',');\r\n\r\n directions.forEach(function(direction){\r\n setIsScrollAllowed(value, direction, 'k');\r\n });\r\n }else{\r\n setIsScrollAllowed(value, 'all', 'k');\r\n options.keyboardScrolling = value;\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page up one section.\r\n */\r\n function moveSectionUp(){\r\n var prev = prevUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n\r\n //looping to the bottom if there's no more sections above\r\n if (!prev && (options.loopTop || options.continuousVertical)) {\r\n prev = last($(SECTION_SEL));\r\n }\r\n\r\n if (prev != null) {\r\n scrollPage(prev, null, true);\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page down one section.\r\n */\r\n function moveSectionDown(){\r\n var next = nextUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n\r\n //looping to the top if there's no more sections below\r\n if(!next &&\r\n (options.loopBottom || options.continuousVertical)){\r\n next = $(SECTION_SEL)[0];\r\n }\r\n\r\n if(next != null){\r\n scrollPage(next, null, false);\r\n }\r\n }\r\n\r\n /**\r\n * Moves the page to the given section and slide with no animation.\r\n * Anchors or index positions can be used as params.\r\n */\r\n function silentMoveTo(sectionAnchor, slideAnchor){\r\n setScrollingSpeed (0, 'internal');\r\n moveTo(sectionAnchor, slideAnchor);\r\n setScrollingSpeed (originals.scrollingSpeed, 'internal');\r\n }\r\n\r\n /**\r\n * Moves the page to the given section and slide.\r\n * Anchors or index positions can be used as params.\r\n */\r\n function moveTo(sectionAnchor, slideAnchor){\r\n var destiny = getSectionByAnchor(sectionAnchor);\r\n\r\n if (typeof slideAnchor !== 'undefined'){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else if(destiny != null){\r\n scrollPage(destiny);\r\n }\r\n }\r\n\r\n /**\r\n * Slides right the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n function moveSlideRight(section){\r\n moveSlide('right', section);\r\n }\r\n\r\n /**\r\n * Slides left the slider of the active section.\r\n * Optional `section` param.\r\n */\r\n function moveSlideLeft(section){\r\n moveSlide('left', section);\r\n }\r\n\r\n /**\r\n * When resizing is finished, we adjust the slides sizes and positions\r\n */\r\n function reBuild(resizing){\r\n if(hasClass(container, DESTROYED)){ return; } //nothing to do if the plugin was destroyed\r\n\r\n isResizing = true;\r\n\r\n //updating global vars\r\n windowsHeight = getWindowHeight();\r\n windowsWidth = getWindowWidth();\r\n\r\n var sections = $(SECTION_SEL);\r\n for (var i = 0; i < sections.length; ++i) {\r\n var section = sections[i];\r\n var slidesWrap = $(SLIDES_WRAPPER_SEL, section)[0];\r\n var slides = $(SLIDE_SEL, section);\r\n\r\n //adjusting the height of the table-cell for IE and Firefox\r\n if(options.verticalCentered){\r\n css($(TABLE_CELL_SEL, section), {'height': getTableHeight(section) + 'px'});\r\n }\r\n\r\n css(section, {'height': windowsHeight + 'px'});\r\n\r\n //adjusting the position fo the FULL WIDTH slides...\r\n if (slides.length > 1) {\r\n landscapeScroll(slidesWrap, $(SLIDE_ACTIVE_SEL, slidesWrap)[0]);\r\n }\r\n }\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler.createScrollBarForAll();\r\n }\r\n\r\n var activeSection = $(SECTION_ACTIVE_SEL)[0];\r\n var sectionIndex = index(activeSection, SECTION_SEL);\r\n\r\n //isn't it the first section?\r\n if(sectionIndex){\r\n //adjusting the position for the current section\r\n silentMoveTo(sectionIndex + 1);\r\n }\r\n\r\n isResizing = false;\r\n if(isFunction( options.afterResize ) && resizing){\r\n options.afterResize.call(container, window.innerWidth, window.innerHeight);\r\n }\r\n if(isFunction( options.afterReBuild ) && !resizing){\r\n options.afterReBuild.call(container);\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether fullpage.js is in responsive mode or not.\r\n */\r\n function isResponsiveMode(){\r\n return hasClass($body, RESPONSIVE);\r\n }\r\n\r\n /**\r\n * Turns fullPage.js to normal scrolling mode when the viewport `width` or `height`\r\n * are smaller than the set limit values.\r\n */\r\n function setResponsive(active){\r\n var isResponsive = isResponsiveMode();\r\n\r\n if(active){\r\n if(!isResponsive){\r\n setAutoScrolling(false, 'internal');\r\n setFitToSection(false, 'internal');\r\n hide($(SECTION_NAV_SEL));\r\n addClass($body, RESPONSIVE);\r\n if(isFunction( options.afterResponsive )){\r\n options.afterResponsive.call( container, active);\r\n }\r\n\r\n //when on page load, we will remove scrolloverflow if necessary\r\n if(options.scrollOverflow){\r\n scrollBarHandler.createScrollBarForAll();\r\n }\r\n }\r\n }\r\n else if(isResponsive){\r\n setAutoScrolling(originals.autoScrolling, 'internal');\r\n setFitToSection(originals.autoScrolling, 'internal');\r\n show($(SECTION_NAV_SEL));\r\n removeClass($body, RESPONSIVE);\r\n if(isFunction( options.afterResponsive )){\r\n options.afterResponsive.call( container, active);\r\n }\r\n }\r\n }\r\n\r\n if(container){\r\n //public functions\r\n FP.version = '3.0.8';\r\n FP.setAutoScrolling = setAutoScrolling;\r\n FP.setRecordHistory = setRecordHistory;\r\n FP.setScrollingSpeed = setScrollingSpeed;\r\n FP.setFitToSection = setFitToSection;\r\n FP.setLockAnchors = setLockAnchors;\r\n FP.setMouseWheelScrolling = setMouseWheelScrolling;\r\n FP.setAllowScrolling = setAllowScrolling;\r\n FP.setKeyboardScrolling = setKeyboardScrolling;\r\n FP.moveSectionUp = moveSectionUp;\r\n FP.moveSectionDown = moveSectionDown;\r\n FP.silentMoveTo = silentMoveTo;\r\n FP.moveTo = moveTo;\r\n FP.moveSlideRight = moveSlideRight;\r\n FP.moveSlideLeft = moveSlideLeft;\r\n FP.fitToSection = fitToSection;\r\n FP.reBuild = reBuild;\r\n FP.setResponsive = setResponsive;\r\n FP.getFullpageData = function(){ return options; };\r\n FP.destroy = destroy;\r\n FP.getActiveSection = getActiveSection;\r\n FP.getActiveSlide = getActiveSlide;\r\n\r\n FP.test = {\r\n top: '0px',\r\n translate3d: 'translate3d(0px, 0px, 0px)',\r\n translate3dH: (function(){\r\n var a = [];\r\n for(var i = 0; i < $(options.sectionSelector, container).length; i++){\r\n a.push('translate3d(0px, 0px, 0px)');\r\n }\r\n return a;\r\n })(),\r\n left: (function(){\r\n var a = [];\r\n for(var i = 0; i < $(options.sectionSelector, container).length; i++){\r\n a.push(0);\r\n }\r\n return a;\r\n })(),\r\n options: options,\r\n setAutoScrolling: setAutoScrolling\r\n };\r\n\r\n //functions we want to share across files but which are not\r\n //mean to be used on their own by developers\r\n FP.shared = {\r\n afterRenderActions: afterRenderActions,\r\n isNormalScrollElement: false\r\n };\r\n\r\n window.fullpage_api = FP;\r\n\r\n //using jQuery initialization? Creating the $.fn.fullpage object\r\n if(options.$){\r\n Object.keys(FP).forEach(function (key) { \r\n options.$.fn.fullpage[key] = FP[key]; \r\n });\r\n }\r\n\r\n init();\r\n\r\n bindEvents();\r\n }\r\n\r\n function init(){\r\n //if css3 is not supported, it will use jQuery animations\r\n if(options.css3){\r\n options.css3 = support3d();\r\n }\r\n\r\n options.scrollBar = options.scrollBar || options.hybrid;\r\n\r\n setOptionsFromDOM();\r\n prepareDom();\r\n setAllowScrolling(true);\r\n setMouseHijack(true);\r\n setAutoScrolling(options.autoScrolling, 'internal');\r\n responsive();\r\n\r\n //setting the class for the body element\r\n setBodyClass();\r\n\r\n if(document.readyState === 'complete'){\r\n scrollToAnchor();\r\n }\r\n window.addEventListener('load', scrollToAnchor);\r\n\r\n //if we use scrollOverflow we'll fire afterRender in the scrolloverflow file\r\n if(!options.scrollOverflow){\r\n afterRenderActions();\r\n }\r\n\r\n doubleCheckHeight();\r\n }\r\n\r\n function bindEvents(){\r\n\r\n //when scrolling...\r\n window.addEventListener('scroll', scrollHandler);\r\n\r\n //detecting any change on the URL to scroll to the given anchor link\r\n //(a way to detect back history button as we play with the hashes on the URL)\r\n window.addEventListener('hashchange', hashChangeHandler);\r\n \r\n // on window focus\r\n window.addEventListener('focus', focusHandler);\r\n\r\n //when opening a new tab (ctrl + t), `control` won't be pressed when coming back.\r\n window.addEventListener('blur', blurHandler);\r\n\r\n //when resizing the site, we adjust the heights of the sections, slimScroll...\r\n window.addEventListener('resize', resizeHandler);\r\n\r\n //Sliding with arrow keys, both, vertical and horizontal\r\n document.addEventListener('keydown', keydownHandler);\r\n\r\n //to prevent scrolling while zooming\r\n document.addEventListener('keyup', keyUpHandler);\r\n\r\n //Scrolls to the section when clicking the navigation bullet\r\n //simulating the jQuery .on('click') event using delegation\r\n ['click', 'touchstart'].forEach(function(eventName){\r\n document.addEventListener(eventName, delegatedEvents);\r\n });\r\n\r\n /**\r\n * Applying normalScroll elements.\r\n * Ignoring the scrolls over the specified selectors.\r\n */\r\n if(options.normalScrollElements){\r\n ['mouseenter', 'touchstart'].forEach(function(eventName){\r\n forMouseLeaveOrTouch(eventName, false);\r\n });\r\n\r\n ['mouseleave', 'touchend'].forEach(function(eventName){\r\n forMouseLeaveOrTouch(eventName, true);\r\n });\r\n }\r\n }\r\n\r\n function delegatedEvents(e){\r\n var target = e.target;\r\n\r\n if(target && closest(target, SECTION_NAV_SEL + ' a')){\r\n sectionBulletHandler.call(target, e);\r\n }\r\n else if(matches(target, SECTION_NAV_TOOLTIP_SEL)){\r\n tooltipTextHandler.call(target);\r\n }\r\n else if(matches(target, SLIDES_ARROW_SEL)){\r\n slideArrowHandler.call(target, e);\r\n }\r\n else if(matches(target, SLIDES_NAV_LINK_SEL) || closest(target, SLIDES_NAV_LINK_SEL) != null){\r\n slideBulletHandler.call(target, e);\r\n }\r\n else if(closest(target, options.menu + ' [data-menuanchor]')){\r\n menuItemsHandler.call(target, e);\r\n }\r\n }\r\n\r\n function forMouseLeaveOrTouch(eventName, allowScrolling){\r\n //a way to pass arguments to the onMouseEnterOrLeave function\r\n document['fp_' + eventName] = allowScrolling;\r\n document.addEventListener(eventName, onMouseEnterOrLeave, true); //capturing phase\r\n }\r\n\r\n function onMouseEnterOrLeave(e) {\r\n var type = e.type;\r\n var isInsideOneNormalScroll = false;\r\n var isUsingScrollOverflow = options.scrollOverflow;\r\n\r\n //onMouseLeave will use the destination target, not the one we are moving away from\r\n var target = type === 'mouseleave' ? e.toElement || e.relatedTarget : e.target;\r\n\r\n //coming from closing a normalScrollElements modal or moving outside viewport?\r\n if(target == document || !target){\r\n setMouseHijack(true);\r\n\r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, true);\r\n }\r\n return;\r\n }\r\n\r\n if(type === 'touchend'){\r\n g_canFireMouseEnterNormalScroll = false;\r\n setTimeout(function(){\r\n g_canFireMouseEnterNormalScroll = true;\r\n }, 800);\r\n }\r\n\r\n //preventing mouseenter event to do anything when coming from a touchEnd event\r\n //fixing issue #3576\r\n if(type === 'mouseenter' && !g_canFireMouseEnterNormalScroll){\r\n return;\r\n }\r\n\r\n var normalSelectors = options.normalScrollElements.split(',');\r\n\r\n normalSelectors.forEach(function(normalSelector){\r\n if(!isInsideOneNormalScroll){\r\n var isNormalScrollTarget = matches(target, normalSelector);\r\n\r\n //leaving a child inside the normalScoll element is not leaving the normalScroll #3661\r\n var isNormalScrollChildFocused = closest(target, normalSelector);\r\n\r\n if(isNormalScrollTarget || isNormalScrollChildFocused){\r\n if(!FP.shared.isNormalScrollElement){\r\n setMouseHijack(false);\r\n\r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, false);\r\n }\r\n }\r\n FP.shared.isNormalScrollElement = true;\r\n isInsideOneNormalScroll = true;\r\n }\r\n }\r\n });\r\n\r\n //not inside a single normal scroll element anymore?\r\n if(!isInsideOneNormalScroll && FP.shared.isNormalScrollElement){\r\n setMouseHijack(true);\r\n \r\n if(isUsingScrollOverflow){\r\n options.scrollOverflowHandler.setIscroll(target, true);\r\n }\r\n\r\n FP.shared.isNormalScrollElement = false;\r\n }\r\n }\r\n\r\n /**\r\n * Checks the viewport a few times on a define interval of time to \r\n * see if it has changed in any of those. If that's the case, it resizes.\r\n */\r\n function doubleCheckHeight(){\r\n for(var i = 1; i < 4; i++){\r\n g_doubleCheckHeightId = setTimeout(adjustToNewViewport, 350 * i);\r\n }\r\n }\r\n\r\n /**\r\n * Adjusts a section to the viewport if it has changed.\r\n */\r\n function adjustToNewViewport(){\r\n var newWindowHeight = getWindowHeight();\r\n var newWindowWidth = getWindowWidth();\r\n\r\n if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){\r\n windowsHeight = newWindowHeight;\r\n windowsWidth = newWindowWidth;\r\n reBuild(true);\r\n }\r\n }\r\n\r\n /**\r\n * Setting options from DOM elements if they are not provided.\r\n */\r\n function setOptionsFromDOM(){\r\n\r\n //no anchors option? Checking for them in the DOM attributes\r\n if(!options.anchors.length){\r\n var anchorsAttribute = '[data-anchor]';\r\n var anchors = $(options.sectionSelector.split(',').join(anchorsAttribute + ',') + anchorsAttribute, container);\r\n if(anchors.length && anchors.length === $(SECTION_SEL).length){\r\n g_initialAnchorsInDom = true;\r\n anchors.forEach(function(item){\r\n options.anchors.push(item.getAttribute('data-anchor').toString());\r\n });\r\n }\r\n }\r\n\r\n //no tooltips option? Checking for them in the DOM attributes\r\n if(!options.navigationTooltips.length){\r\n var tooltipsAttribute = '[data-tooltip]';\r\n var tooltips = $(options.sectionSelector.split(',').join(tooltipsAttribute + ',') + tooltipsAttribute, container);\r\n if(tooltips.length){\r\n tooltips.forEach(function(item){\r\n options.navigationTooltips.push(item.getAttribute('data-tooltip').toString());\r\n });\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Works over the DOM structure to set it up for the current fullpage options.\r\n */\r\n function prepareDom(){\r\n css(container, {\r\n 'height': '100%',\r\n 'position': 'relative'\r\n });\r\n\r\n //adding a class to recognize the container internally in the code\r\n addClass(container, WRAPPER);\r\n addClass($html, ENABLED);\r\n\r\n //due to https://github.com/alvarotrigo/fullPage.js/issues/1502\r\n windowsHeight = getWindowHeight();\r\n\r\n removeClass(container, DESTROYED); //in case it was destroyed before initializing it again\r\n\r\n addInternalSelectors();\r\n\r\n var sections = $(SECTION_SEL);\r\n\r\n //styling the sections / slides / menu\r\n for(var i = 0; i 0) {\r\n styleSlides(section, slides, numSlides);\r\n }else{\r\n if(options.verticalCentered){\r\n addTableClass(section);\r\n }\r\n }\r\n }\r\n\r\n //fixed elements need to be moved out of the plugin container due to problems with CSS3.\r\n if(options.fixedElements && options.css3){\r\n $(options.fixedElements).forEach(function(item){\r\n $body.appendChild(item);\r\n });\r\n }\r\n\r\n //vertical centered of the navigation + active bullet\r\n if(options.navigation){\r\n addVerticalNavigation();\r\n }\r\n\r\n enableYoutubeAPI();\r\n\r\n if(options.scrollOverflow){\r\n scrollBarHandler = options.scrollOverflowHandler.init(options);\r\n }\r\n }\r\n\r\n /**\r\n * Styles the horizontal slides for a section.\r\n */\r\n function styleSlides(section, slides, numSlides){\r\n var sliderWidth = numSlides * 100;\r\n var slideWidth = 100 / numSlides;\r\n\r\n var slidesWrapper = document.createElement('div');\r\n slidesWrapper.className = SLIDES_WRAPPER; //fp-slides\r\n wrapAll(slides, slidesWrapper);\r\n\r\n var slidesContainer = document.createElement('div');\r\n slidesContainer.className = SLIDES_CONTAINER; //fp-slidesContainer\r\n wrapAll(slides, slidesContainer);\r\n\r\n css($(SLIDES_CONTAINER_SEL, section), {'width': sliderWidth + '%'});\r\n\r\n if(numSlides > 1){\r\n if(options.controlArrows){\r\n createSlideArrows(section);\r\n }\r\n\r\n if(options.slidesNavigation){\r\n addSlidesNavigation(section, numSlides);\r\n }\r\n }\r\n\r\n slides.forEach(function(slide) {\r\n css(slide, {'width': slideWidth + '%'});\r\n\r\n if(options.verticalCentered){\r\n addTableClass(slide);\r\n }\r\n });\r\n\r\n var startingSlide = $(SLIDE_ACTIVE_SEL, section)[0];\r\n\r\n //if the slide won't be an starting point, the default will be the first one\r\n //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default.\r\n if( startingSlide != null && (index($(SECTION_ACTIVE_SEL), SECTION_SEL) !== 0 || (index($(SECTION_ACTIVE_SEL), SECTION_SEL) === 0 && index(startingSlide) !== 0))){\r\n silentLandscapeScroll(startingSlide, 'internal');\r\n }else{\r\n addClass(slides[0], ACTIVE);\r\n }\r\n }\r\n\r\n /**\r\n * Styling vertical sections\r\n */\r\n function styleSection(section, index){\r\n //if no active section is defined, the 1st one will be the default one\r\n if(!index && $(SECTION_ACTIVE_SEL)[0] == null) {\r\n addClass(section, ACTIVE);\r\n }\r\n startingSection = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n css(section, {'height': windowsHeight + 'px'});\r\n\r\n if(options.paddingTop){\r\n css(section, {'padding-top': options.paddingTop});\r\n }\r\n\r\n if(options.paddingBottom){\r\n css(section, {'padding-bottom': options.paddingBottom});\r\n }\r\n\r\n if (typeof options.sectionsColor[index] !== 'undefined') {\r\n css(section, {'background-color': options.sectionsColor[index]});\r\n }\r\n\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n section.setAttribute('data-anchor', options.anchors[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the data-anchor attributes to the menu elements and activates the current one.\r\n */\r\n function styleMenu(section, index){\r\n if (typeof options.anchors[index] !== 'undefined') {\r\n //activating the menu / nav element on load\r\n if(hasClass(section, ACTIVE)){\r\n activateMenuAndNav(options.anchors[index], index);\r\n }\r\n }\r\n\r\n //moving the menu outside the main container if it is inside (avoid problems with fixed positions when using CSS3 tranforms)\r\n if(options.menu && options.css3 && closest($(options.menu)[0], WRAPPER_SEL) != null){\r\n $(options.menu).forEach(function(menu) {\r\n $body.appendChild(menu);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Adds internal classes to be able to provide customizable selectors\r\n * keeping the link with the style sheet.\r\n */\r\n function addInternalSelectors(){\r\n addClass($(options.sectionSelector, container), SECTION);\r\n addClass($(options.slideSelector, container), SLIDE);\r\n }\r\n\r\n /**\r\n * Creates the control arrows for the given section\r\n */\r\n function createSlideArrows(section){\r\n var arrows = [createElementFromHTML('
          '), createElementFromHTML('
          ')];\r\n after($(SLIDES_WRAPPER_SEL, section)[0], arrows);\r\n\r\n if(options.controlArrowColor !== '#fff'){\r\n css($(SLIDES_ARROW_NEXT_SEL, section), {'border-color': 'transparent transparent transparent '+options.controlArrowColor});\r\n css($(SLIDES_ARROW_PREV_SEL, section), {'border-color': 'transparent '+ options.controlArrowColor + ' transparent transparent'});\r\n }\r\n\r\n if(!options.loopHorizontal){\r\n hide($(SLIDES_ARROW_PREV_SEL, section));\r\n }\r\n }\r\n\r\n /**\r\n * Creates a vertical navigation bar.\r\n */\r\n function addVerticalNavigation(){\r\n var navigation = document.createElement('div');\r\n navigation.setAttribute('id', SECTION_NAV);\r\n\r\n var divUl = document.createElement('ul');\r\n navigation.appendChild(divUl);\r\n\r\n appendTo(navigation, $body);\r\n var nav = $(SECTION_NAV_SEL)[0];\r\n\r\n addClass(nav, 'fp-' + options.navigationPosition);\r\n\r\n if(options.showActiveTooltip){\r\n addClass(nav, SHOW_ACTIVE_TOOLTIP);\r\n }\r\n\r\n var li = '';\r\n\r\n for (var i = 0; i < $(SECTION_SEL).length; i++) {\r\n var link = '';\r\n if (options.anchors.length) {\r\n link = options.anchors[i];\r\n }\r\n\r\n li += '
        • ' + getBulletLinkName(i, 'Section') + '';\r\n\r\n // Only add tooltip if needed (defined by user)\r\n var tooltip = options.navigationTooltips[i];\r\n\r\n if (typeof tooltip !== 'undefined' && tooltip !== '') {\r\n li += '
          ' + tooltip + '
          ';\r\n }\r\n\r\n li += '
        • ';\r\n }\r\n $('ul', nav)[0].innerHTML = li;\r\n \r\n //activating the current active section\r\n\r\n var bullet = $('li', $(SECTION_NAV_SEL)[0])[index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL)];\r\n addClass($('a', bullet), ACTIVE);\r\n }\r\n\r\n /**\r\n * Gets the name for screen readers for a section/slide navigation bullet.\r\n */\r\n function getBulletLinkName(i, defaultName, item){\r\n var anchor = defaultName === 'Section' ? options.anchors[i] : item.getAttribute('data-anchor');\r\n return options.navigationTooltips[i]\r\n || anchor\r\n || defaultName + ' ' + (i+1);\r\n }\r\n\r\n /*\r\n * Enables the Youtube videos API so we can control their flow if necessary.\r\n */\r\n function enableYoutubeAPI(){\r\n $('iframe[src*=\"youtube.com/embed/\"]', container).forEach(function(item){\r\n addURLParam(item, 'enablejsapi=1');\r\n });\r\n }\r\n\r\n /**\r\n * Adds a new parameter and its value to the `src` of a given element\r\n */\r\n function addURLParam(element, newParam){\r\n var originalSrc = element.getAttribute('src');\r\n element.setAttribute('src', originalSrc + getUrlParamSign(originalSrc) + newParam);\r\n }\r\n\r\n /*\r\n * Returns the prefix sign to use for a new parameter in an existen URL.\r\n *\r\n * @return {String} ? | &\r\n */\r\n function getUrlParamSign(url){\r\n return ( !/\\?/.test( url ) ) ? '?' : '&';\r\n }\r\n\r\n /**\r\n * Actions and callbacks to fire afterRender\r\n */\r\n function afterRenderActions(){\r\n var section = $(SECTION_ACTIVE_SEL)[0];\r\n\r\n addClass(section, COMPLETELY);\r\n\r\n lazyLoad(section);\r\n lazyLoadOthers();\r\n playMedia(section);\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.afterLoad();\r\n }\r\n\r\n if(isDestinyTheStartingSection() && isFunction(options.afterLoad) ){\r\n fireCallback('afterLoad', {\r\n activeSection: section,\r\n element: section,\r\n direction: null,\r\n\r\n //for backwards compatibility callback (to be removed in a future!)\r\n anchorLink: section.getAttribute('data-anchor'),\r\n sectionIndex: index(section, SECTION_SEL)\r\n });\r\n }\r\n\r\n if(isFunction(options.afterRender)){\r\n fireCallback('afterRender');\r\n }\r\n }\r\n\r\n /**\r\n * Determines if the URL anchor destiny is the starting section (the one using 'active' class before initialization)\r\n */\r\n function isDestinyTheStartingSection(){\r\n var anchor = getAnchorsURL();\r\n var destinationSection = getSectionByAnchor(anchor.section);\r\n return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection);\r\n }\r\n\r\n var isScrolling = false;\r\n var lastScroll = 0;\r\n\r\n //when scrolling...\r\n function scrollHandler(){\r\n var currentSection;\r\n\r\n if(isResizing){\r\n return;\r\n }\r\n \r\n if(!options.autoScrolling || options.scrollBar){\r\n var currentScroll = getScrollTop();\r\n var scrollDirection = getScrollDirection(currentScroll);\r\n var visibleSectionIndex = 0;\r\n var screen_mid = currentScroll + (getWindowHeight() / 2.0);\r\n var isAtBottom = $body.offsetHeight - getWindowHeight() === currentScroll;\r\n var sections = $(SECTION_SEL);\r\n\r\n //when using `auto-height` for a small last section it won't be centered in the viewport\r\n if(isAtBottom){\r\n visibleSectionIndex = sections.length - 1;\r\n }\r\n //is at top? when using `auto-height` for a small first section it won't be centered in the viewport\r\n else if(!currentScroll){\r\n visibleSectionIndex = 0;\r\n }\r\n\r\n //taking the section which is showing more content in the viewport\r\n else{\r\n for (var i = 0; i < sections.length; ++i) {\r\n var section = sections[i];\r\n\r\n // Pick the the last section which passes the middle line of the screen.\r\n if (section.offsetTop <= screen_mid)\r\n {\r\n visibleSectionIndex = i;\r\n }\r\n }\r\n }\r\n\r\n if(isCompletelyInViewPort(scrollDirection)){\r\n if(!hasClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY)){\r\n addClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY);\r\n removeClass(siblings($(SECTION_ACTIVE_SEL)[0]), COMPLETELY);\r\n }\r\n }\r\n\r\n //geting the last one, the current one on the screen\r\n currentSection = sections[visibleSectionIndex];\r\n\r\n //setting the visible section as active when manually scrolling\r\n //executing only once the first time we reach the section\r\n if(!hasClass(currentSection, ACTIVE)){\r\n isScrolling = true;\r\n var leavingSection = $(SECTION_ACTIVE_SEL)[0];\r\n var leavingSectionIndex = index(leavingSection, SECTION_SEL) + 1;\r\n var yMovement = getYmovement(currentSection);\r\n var anchorLink = currentSection.getAttribute('data-anchor');\r\n var sectionIndex = index(currentSection, SECTION_SEL) + 1;\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, currentSection)[0];\r\n var slideIndex;\r\n var slideAnchorLink;\r\n var callbacksParams = {\r\n activeSection: leavingSection,\r\n sectionIndex: sectionIndex -1,\r\n anchorLink: anchorLink,\r\n element: currentSection,\r\n leavingSection: leavingSectionIndex,\r\n direction: yMovement\r\n };\r\n\r\n if(activeSlide){\r\n slideAnchorLink = activeSlide.getAttribute('data-anchor');\r\n slideIndex = index(activeSlide);\r\n }\r\n\r\n if(canScroll){\r\n addClass(currentSection, ACTIVE);\r\n removeClass(siblings(currentSection), ACTIVE);\r\n\r\n if(isFunction( options.onLeave )){\r\n fireCallback('onLeave', callbacksParams);\r\n }\r\n if(isFunction( options.afterLoad )){\r\n fireCallback('afterLoad', callbacksParams);\r\n }\r\n\r\n stopMedia(leavingSection);\r\n lazyLoad(currentSection);\r\n playMedia(currentSection);\r\n\r\n activateMenuAndNav(anchorLink, sectionIndex - 1);\r\n\r\n if(options.anchors.length){\r\n //needed to enter in hashChange event when using the menu with anchor links\r\n lastScrolledDestiny = anchorLink;\r\n }\r\n setState(slideIndex, slideAnchorLink, anchorLink, sectionIndex);\r\n }\r\n\r\n //small timeout in order to avoid entering in hashChange event when scrolling is not finished yet\r\n clearTimeout(scrollId);\r\n scrollId = setTimeout(function(){\r\n isScrolling = false;\r\n }, 100);\r\n }\r\n\r\n if(options.fitToSection){\r\n //for the auto adjust of the viewport to fit a whole section\r\n clearTimeout(scrollId2);\r\n\r\n scrollId2 = setTimeout(function(){\r\n //checking it again in case it changed during the delay\r\n if(options.fitToSection &&\r\n\r\n //is the destination element bigger than the viewport?\r\n $(SECTION_ACTIVE_SEL)[0].offsetHeight <= windowsHeight\r\n ){\r\n fitToSection();\r\n }\r\n }, options.fitToSectionDelay);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Fits the site to the nearest active section\r\n */\r\n function fitToSection(){\r\n //checking fitToSection again in case it was set to false before the timeout delay\r\n if(canScroll){\r\n //allows to scroll to an active section and\r\n //if the section is already active, we prevent firing callbacks\r\n isResizing = true;\r\n\r\n scrollPage($(SECTION_ACTIVE_SEL)[0]);\r\n isResizing = false;\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether the active section has seen in its whole or not.\r\n */\r\n function isCompletelyInViewPort(movement){\r\n var top = $(SECTION_ACTIVE_SEL)[0].offsetTop;\r\n var bottom = top + getWindowHeight();\r\n\r\n if(movement == 'up'){\r\n return bottom >= (getScrollTop() + getWindowHeight());\r\n }\r\n return top <= getScrollTop();\r\n }\r\n\r\n /**\r\n * Determines whether a section is in the viewport or not.\r\n */\r\n function isSectionInViewport (el) {\r\n var rect = el.getBoundingClientRect();\r\n var top = rect.top;\r\n var bottom = rect.bottom;\r\n\r\n //sometimes there's a 1px offset on the bottom of the screen even when the \r\n //section's height is the window.innerHeight one. I guess because pixels won't allow decimals.\r\n //using this prevents from lazyLoading the section that is not yet visible \r\n //(only 1 pixel offset is)\r\n var pixelOffset = 2;\r\n \r\n var isTopInView = top + pixelOffset < windowsHeight && top > 0;\r\n var isBottomInView = bottom > pixelOffset && bottom < windowsHeight;\r\n\r\n return isTopInView || isBottomInView;\r\n }\r\n\r\n /**\r\n * Gets the directon of the the scrolling fired by the scroll event.\r\n */\r\n function getScrollDirection(currentScroll){\r\n var direction = currentScroll > lastScroll ? 'down' : 'up';\r\n\r\n lastScroll = currentScroll;\r\n\r\n //needed for auto-height sections to determine if we want to scroll to the top or bottom of the destination\r\n previousDestTop = currentScroll;\r\n\r\n return direction;\r\n }\r\n\r\n /**\r\n * Determines the way of scrolling up or down:\r\n * by 'automatically' scrolling a section or by using the default and normal scrolling.\r\n */\r\n function scrolling(type){\r\n if (!isScrollAllowed.m[type]){\r\n return;\r\n }\r\n\r\n var scrollSection = (type === 'down') ? moveSectionDown : moveSectionUp;\r\n\r\n if(options.scrollOverflow){\r\n var scrollable = options.scrollOverflowHandler.scrollable($(SECTION_ACTIVE_SEL)[0]);\r\n var check = (type === 'down') ? 'bottom' : 'top';\r\n\r\n if(scrollable != null ){\r\n //is the scrollbar at the start/end of the scroll?\r\n if(options.scrollOverflowHandler.isScrolled(check, scrollable)){\r\n scrollSection();\r\n }else{\r\n return true;\r\n }\r\n }else{\r\n // moved up/down\r\n scrollSection();\r\n }\r\n }else{\r\n // moved up/down\r\n scrollSection();\r\n }\r\n }\r\n\r\n /*\r\n * Preventing bouncing in iOS #2285\r\n */\r\n function preventBouncing(e){\r\n if(options.autoScrolling && isReallyTouch(e) && isScrollAllowed.m.up){\r\n //preventing the easing on iOS devices\r\n preventDefault(e);\r\n }\r\n }\r\n\r\n var touchStartY = 0;\r\n var touchStartX = 0;\r\n var touchEndY = 0;\r\n var touchEndX = 0;\r\n\r\n /* Detecting touch events\r\n\r\n * As we are changing the top property of the page on scrolling, we can not use the traditional way to detect it.\r\n * This way, the touchstart and the touch moves shows an small difference between them which is the\r\n * used one to determine the direction.\r\n */\r\n function touchMoveHandler(e){\r\n var activeSection = closest(e.target, SECTION_SEL) || $(SECTION_ACTIVE_SEL)[0];\r\n\r\n if (isReallyTouch(e) ) {\r\n\r\n if(options.autoScrolling){\r\n //preventing the easing on iOS devices\r\n preventDefault(e);\r\n }\r\n\r\n var touchEvents = getEventsPage(e);\r\n\r\n touchEndY = touchEvents.y;\r\n touchEndX = touchEvents.x;\r\n\r\n //if movement in the X axys is greater than in the Y and the currect section has slides...\r\n if ($(SLIDES_WRAPPER_SEL, activeSection).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) {\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (!slideMoving && Math.abs(touchStartX - touchEndX) > (getWindowWidth() / 100 * options.touchSensitivity)) {\r\n if (touchStartX > touchEndX) {\r\n if(isScrollAllowed.m.right){\r\n moveSlideRight(activeSection); //next\r\n }\r\n } else {\r\n if(isScrollAllowed.m.left){\r\n moveSlideLeft(activeSection); //prev\r\n }\r\n }\r\n }\r\n }\r\n\r\n //vertical scrolling (only when autoScrolling is enabled)\r\n else if(options.autoScrolling && canScroll){\r\n\r\n //is the movement greater than the minimum resistance to scroll?\r\n if (Math.abs(touchStartY - touchEndY) > (window.innerHeight / 100 * options.touchSensitivity)) {\r\n if (touchStartY > touchEndY) {\r\n scrolling('down');\r\n } else if (touchEndY > touchStartY) {\r\n scrolling('up');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * As IE >= 10 fires both touch and mouse events when using a mouse in a touchscreen\r\n * this way we make sure that is really a touch event what IE is detecting.\r\n */\r\n function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }\r\n\r\n /**\r\n * Handler for the touch start event.\r\n */\r\n function touchStartHandler(e){\r\n\r\n //stopping the auto scroll to adjust to a section\r\n if(options.fitToSection){\r\n activeAnimation = false;\r\n }\r\n\r\n if(isReallyTouch(e)){\r\n var touchEvents = getEventsPage(e);\r\n touchStartY = touchEvents.y;\r\n touchStartX = touchEvents.x;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the average of the last `number` elements of the given array.\r\n */\r\n function getAverage(elements, number){\r\n var sum = 0;\r\n\r\n //taking `number` elements from the end to make the average, if there are not enought, 1\r\n var lastElements = elements.slice(Math.max(elements.length - number, 1));\r\n\r\n for(var i = 0; i < lastElements.length; i++){\r\n sum = sum + lastElements[i];\r\n }\r\n\r\n return Math.ceil(sum/number);\r\n }\r\n\r\n /**\r\n * Detecting mousewheel scrolling\r\n *\r\n * http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html\r\n * http://www.sitepoint.com/html5-javascript-mouse-wheel/\r\n */\r\n var prevTime = new Date().getTime();\r\n\r\n function MouseWheelHandler(e) {\r\n var curTime = new Date().getTime();\r\n var isNormalScroll = hasClass($(COMPLETELY_SEL)[0], NORMAL_SCROLL);\r\n\r\n //is scroll allowed?\r\n if (!isScrollAllowed.m.down && !isScrollAllowed.m.up) {\r\n preventDefault(e);\r\n return false;\r\n }\r\n\r\n //autoscrolling and not zooming?\r\n if(options.autoScrolling && !controlPressed && !isNormalScroll){\r\n // cross-browser wheel delta\r\n e = e || window.event;\r\n var value = e.wheelDelta || -e.deltaY || -e.detail;\r\n var delta = Math.max(-1, Math.min(1, value));\r\n\r\n var horizontalDetection = typeof e.wheelDeltaX !== 'undefined' || typeof e.deltaX !== 'undefined';\r\n var isScrollingVertically = (Math.abs(e.wheelDeltaX) < Math.abs(e.wheelDelta)) || (Math.abs(e.deltaX ) < Math.abs(e.deltaY) || !horizontalDetection);\r\n\r\n //Limiting the array to 150 (lets not waste memory!)\r\n if(scrollings.length > 149){\r\n scrollings.shift();\r\n }\r\n\r\n //keeping record of the previous scrollings\r\n scrollings.push(Math.abs(value));\r\n\r\n //preventing to scroll the site on mouse wheel when scrollbar is present\r\n if(options.scrollBar){\r\n preventDefault(e);\r\n }\r\n\r\n //time difference between the last scroll and the current one\r\n var timeDiff = curTime-prevTime;\r\n prevTime = curTime;\r\n\r\n //haven't they scrolled in a while?\r\n //(enough to be consider a different scrolling action to scroll another section)\r\n if(timeDiff > 200){\r\n //emptying the array, we dont care about old scrollings for our averages\r\n scrollings = [];\r\n }\r\n\r\n if(canScroll){\r\n var averageEnd = getAverage(scrollings, 10);\r\n var averageMiddle = getAverage(scrollings, 70);\r\n var isAccelerating = averageEnd >= averageMiddle;\r\n\r\n //to avoid double swipes...\r\n if(isAccelerating && isScrollingVertically){\r\n //scrolling down?\r\n if (delta < 0) {\r\n scrolling('down');\r\n\r\n //scrolling up?\r\n }else {\r\n scrolling('up');\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if(options.fitToSection){\r\n //stopping the auto scroll to adjust to a section\r\n activeAnimation = false;\r\n }\r\n }\r\n\r\n /**\r\n * Slides a slider to the given direction.\r\n * Optional `section` param.\r\n */\r\n function moveSlide(direction, section){\r\n var activeSection = section == null ? $(SECTION_ACTIVE_SEL)[0] : section;\r\n var slides = $(SLIDES_WRAPPER_SEL, activeSection)[0];\r\n\r\n // more than one slide needed and nothing should be sliding\r\n if (slides == null || slideMoving || $(SLIDE_SEL, slides).length < 2) {\r\n return;\r\n }\r\n\r\n var currentSlide = $(SLIDE_ACTIVE_SEL, slides)[0];\r\n var destiny = null;\r\n\r\n if(direction === 'left'){\r\n destiny = prevUntil(currentSlide, SLIDE_SEL);\r\n }else{\r\n destiny = nextUntil(currentSlide, SLIDE_SEL);\r\n }\r\n\r\n //isn't there a next slide in the secuence?\r\n if(destiny == null){\r\n //respect loopHorizontal settin\r\n if (!options.loopHorizontal) return;\r\n\r\n var slideSiblings = siblings(currentSlide);\r\n if(direction === 'left'){\r\n destiny = slideSiblings[slideSiblings.length - 1]; //last\r\n }else{\r\n destiny = slideSiblings[0]; //first\r\n }\r\n }\r\n\r\n slideMoving = true && !FP.test.isTesting;\r\n landscapeScroll(slides, destiny, direction);\r\n }\r\n\r\n /**\r\n * Maintains the active slides in the viewport\r\n * (Because the `scroll` animation might get lost with some actions, such as when using continuousVertical)\r\n */\r\n function keepSlidesPosition(){\r\n var activeSlides = $(SLIDE_ACTIVE_SEL);\r\n for( var i =0; i previousDestTop;\r\n var sectionBottom = position - windowsHeight + elementHeight;\r\n var bigSectionsDestination = options.bigSectionsDestination;\r\n\r\n //is the destination element bigger than the viewport?\r\n if(elementHeight > windowsHeight){\r\n //scrolling up?\r\n if(!isScrollingDown && !bigSectionsDestination || bigSectionsDestination === 'bottom' ){\r\n position = sectionBottom;\r\n }\r\n }\r\n\r\n //sections equal or smaller than the viewport height && scrolling down? || is resizing and its in the last section\r\n else if(isScrollingDown || (isResizing && next(element) == null) ){\r\n //The bottom of the destination will be at the bottom of the viewport\r\n position = sectionBottom;\r\n }\r\n\r\n /*\r\n Keeping record of the last scrolled position to determine the scrolling direction.\r\n No conventional methods can be used as the scroll bar might not be present\r\n AND the section might not be active if it is auto-height and didnt reach the middle\r\n of the viewport.\r\n */\r\n previousDestTop = position;\r\n return position;\r\n }\r\n\r\n /**\r\n * Scrolls the site to the given element and scrolls to the slide if a callback is given.\r\n */\r\n function scrollPage(element, callback, isMovementUp){\r\n if(element == null){ return; } //there's no element to scroll, leaving the function\r\n\r\n var dtop = getDestinationPosition(element);\r\n var slideAnchorLink;\r\n var slideIndex;\r\n\r\n //local variables\r\n var v = {\r\n element: element,\r\n callback: callback,\r\n isMovementUp: isMovementUp,\r\n dtop: dtop,\r\n yMovement: getYmovement(element),\r\n anchorLink: element.getAttribute('data-anchor'),\r\n sectionIndex: index(element, SECTION_SEL),\r\n activeSlide: $(SLIDE_ACTIVE_SEL, element)[0],\r\n activeSection: $(SECTION_ACTIVE_SEL)[0],\r\n leavingSection: index($(SECTION_ACTIVE_SEL), SECTION_SEL) + 1,\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n localIsResizing: isResizing\r\n };\r\n\r\n //quiting when destination scroll is the same as the current one\r\n if((v.activeSection == element && !isResizing) || (options.scrollBar && getScrollTop() === v.dtop && !hasClass(element, AUTO_HEIGHT) )){ return; }\r\n\r\n if(v.activeSlide != null){\r\n slideAnchorLink = v.activeSlide.getAttribute('data-anchor');\r\n slideIndex = index(v.activeSlide);\r\n }\r\n\r\n //callback (onLeave) if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing){\r\n var direction = v.yMovement;\r\n\r\n //required for continousVertical\r\n if(typeof isMovementUp !== 'undefined'){\r\n direction = isMovementUp ? 'up' : 'down';\r\n }\r\n\r\n //for the callback\r\n v.direction = direction;\r\n\r\n if(isFunction(options.onLeave)){\r\n if(fireCallback('onLeave', v) === false){\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // If continuousVertical && we need to wrap around\r\n if (options.autoScrolling && options.continuousVertical && typeof (v.isMovementUp) !== \"undefined\" &&\r\n ((!v.isMovementUp && v.yMovement == 'up') || // Intending to scroll down but about to go up or\r\n (v.isMovementUp && v.yMovement == 'down'))) { // intending to scroll up but about to go down\r\n\r\n v = createInfiniteSections(v);\r\n }\r\n\r\n //pausing media of the leaving section (if we are not just resizing, as destinatino will be the same one)\r\n if(!v.localIsResizing){\r\n stopMedia(v.activeSection);\r\n }\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.beforeLeave();\r\n }\r\n\r\n addClass(element, ACTIVE);\r\n removeClass(siblings(element), ACTIVE);\r\n lazyLoad(element);\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.onLeave();\r\n }\r\n\r\n //preventing from activating the MouseWheelHandler event\r\n //more than once if the page is scrolling\r\n canScroll = false || FP.test.isTesting;\r\n\r\n setState(slideIndex, slideAnchorLink, v.anchorLink, v.sectionIndex);\r\n\r\n performMovement(v);\r\n\r\n //flag to avoid callingn `scrollPage()` twice in case of using anchor links\r\n lastScrolledDestiny = v.anchorLink;\r\n\r\n //avoid firing it twice (as it does also on scroll)\r\n activateMenuAndNav(v.anchorLink, v.sectionIndex);\r\n }\r\n\r\n /**\r\n * Dispatch events & callbacks making sure it does it on the right format, depending on\r\n * whether v2compatible is being used or not.\r\n */\r\n function fireCallback(eventName, v){\r\n var eventData = getEventData(eventName, v);\r\n\r\n if(!options.v2compatible){\r\n trigger(container, eventName, eventData);\r\n\r\n if(options[eventName].apply(eventData[Object.keys(eventData)[0]], toArray(eventData)) === false){\r\n return false;\r\n }\r\n }\r\n else{\r\n if(options[eventName].apply(eventData[0], eventData.slice(1)) === false){\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Makes sure to only create a Panel object if the element exist\r\n */\r\n function nullOrSection(el){\r\n return el ? new Section(el) : null;\r\n }\r\n\r\n function nullOrSlide(el){\r\n return el ? new Slide(el) : null;\r\n }\r\n\r\n /**\r\n * Gets the event's data for the given event on the right format. Depending on whether\r\n * v2compatible is being used or not.\r\n */\r\n function getEventData(eventName, v){\r\n var paramsPerEvent;\r\n\r\n if(!options.v2compatible){\r\n\r\n //using functions to run only the necessary bits within the object\r\n paramsPerEvent = {\r\n afterRender: function(){\r\n return {\r\n section: nullOrSection($(SECTION_ACTIVE_SEL)[0]),\r\n slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0])\r\n };\r\n },\r\n onLeave: function(){\r\n return {\r\n origin: nullOrSection(v.activeSection),\r\n destination: nullOrSection(v.element),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n afterLoad: function(){\r\n return paramsPerEvent.onLeave();\r\n },\r\n\r\n afterSlideLoad: function(){\r\n return {\r\n section: nullOrSection(v.section),\r\n origin: nullOrSlide(v.prevSlide),\r\n destination: nullOrSlide(v.destiny),\r\n direction: v.direction\r\n };\r\n },\r\n\r\n onSlideLeave: function(){\r\n return paramsPerEvent.afterSlideLoad();\r\n }\r\n };\r\n }\r\n else{\r\n paramsPerEvent = {\r\n afterRender: function(){ return [container]; },\r\n onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; },\r\n afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; },\r\n afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; },\r\n onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; },\r\n };\r\n }\r\n\r\n return paramsPerEvent[eventName]();\r\n }\r\n\r\n /**\r\n * Performs the vertical movement (by CSS3 or by jQuery)\r\n */\r\n function performMovement(v){\r\n var isFastSpeed = options.scrollingSpeed < 700;\r\n var transitionLapse = isFastSpeed ? 700 : options.scrollingSpeed; \r\n\r\n // using CSS3 translate functionality\r\n if (options.css3 && options.autoScrolling && !options.scrollBar) {\r\n\r\n // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625\r\n // that's why we round it to 0.\r\n var translate3d = 'translate3d(0px, -' + Math.round(v.dtop) + 'px, 0px)';\r\n transformContainer(translate3d, true);\r\n\r\n //even when the scrollingSpeed is 0 there's a little delay, which might cause the\r\n //scrollingSpeed to change in case of using silentMoveTo();\r\n if(options.scrollingSpeed){\r\n clearTimeout(afterSectionLoadsId);\r\n afterSectionLoadsId = setTimeout(function () {\r\n afterSectionLoads(v);\r\n\r\n //disabling canScroll when using fastSpeed\r\n canScroll = !isFastSpeed;\r\n }, options.scrollingSpeed); \r\n }else{\r\n afterSectionLoads(v);\r\n }\r\n }\r\n\r\n // using JS to animate\r\n else{\r\n var scrollSettings = getScrollSettings(v.dtop);\r\n FP.test.top = -v.dtop + 'px';\r\n\r\n scrollTo(scrollSettings.element, scrollSettings.options, options.scrollingSpeed, function(){\r\n if(options.scrollBar){\r\n\r\n /* Hack!\r\n The timeout prevents setting the most dominant section in the viewport as \"active\" when the user\r\n scrolled to a smaller section by using the mousewheel (auto scrolling) rather than draging the scroll bar.\r\n\r\n When using scrollBar:true It seems like the scroll events still getting propagated even after the scrolling animation has finished.\r\n */\r\n setTimeout(function(){\r\n afterSectionLoads(v);\r\n },30);\r\n }else{\r\n \r\n afterSectionLoads(v);\r\n\r\n //disabling canScroll when using fastSpeed\r\n canScroll = !isFastSpeed;\r\n }\r\n });\r\n }\r\n\r\n // enabling canScroll after the minimum transition laps\r\n if(isFastSpeed){\r\n clearTimeout(g_transitionLapseId);\r\n g_transitionLapseId = setTimeout(function(){\r\n canScroll = true;\r\n }, transitionLapse);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the scrolling settings depending on the plugin autoScrolling option\r\n */\r\n function getScrollSettings(top){\r\n var scroll = {};\r\n\r\n //top property animation\r\n if(options.autoScrolling && !options.scrollBar){\r\n scroll.options = -top;\r\n scroll.element = $(WRAPPER_SEL)[0];\r\n }\r\n\r\n //window real scrolling\r\n else{\r\n scroll.options = top;\r\n scroll.element = window;\r\n }\r\n\r\n return scroll;\r\n }\r\n\r\n /**\r\n * Adds sections before or after the current one to create the infinite effect.\r\n */\r\n function createInfiniteSections(v){\r\n // Scrolling down\r\n if (!v.isMovementUp) {\r\n // Move all previous sections to after the active section\r\n after($(SECTION_ACTIVE_SEL)[0], prevAll(v.activeSection, SECTION_SEL).reverse());\r\n }\r\n else { // Scrolling up\r\n // Move all next sections to before the active section\r\n before($(SECTION_ACTIVE_SEL)[0], nextAll(v.activeSection, SECTION_SEL));\r\n }\r\n\r\n // Maintain the displayed position (now that we changed the element order)\r\n silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n\r\n // save for later the elements that still need to be reordered\r\n v.wrapAroundElements = v.activeSection;\r\n\r\n // Recalculate animation variables\r\n v.dtop = v.element.offsetTop;\r\n v.yMovement = getYmovement(v.element);\r\n\r\n return v;\r\n }\r\n\r\n /**\r\n * Fix section order after continuousVertical changes have been animated\r\n */\r\n function continuousVerticalFixSectionOrder (v) {\r\n // If continuousVertical is in effect (and autoScrolling would also be in effect then),\r\n // finish moving the elements around so the direct navigation will function more simply\r\n if (v.wrapAroundElements == null) {\r\n return;\r\n }\r\n\r\n if (v.isMovementUp) {\r\n before($(SECTION_SEL)[0], v.wrapAroundElements);\r\n }\r\n else {\r\n after($(SECTION_SEL)[$(SECTION_SEL).length-1], v.wrapAroundElements);\r\n }\r\n\r\n silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop);\r\n\r\n // Maintain the active slides visible in the viewport\r\n keepSlidesPosition();\r\n }\r\n\r\n /**\r\n * Actions to do once the section is loaded.\r\n */\r\n function afterSectionLoads (v){\r\n continuousVerticalFixSectionOrder(v);\r\n\r\n //callback (afterLoad) if the site is not just resizing and readjusting the slides\r\n if(isFunction(options.afterLoad) && !v.localIsResizing){\r\n fireCallback('afterLoad', v);\r\n }\r\n\r\n if(options.scrollOverflow){\r\n options.scrollOverflowHandler.afterLoad();\r\n }\r\n\r\n if(!v.localIsResizing){\r\n playMedia(v.element);\r\n }\r\n\r\n addClass(v.element, COMPLETELY);\r\n removeClass(siblings(v.element), COMPLETELY);\r\n lazyLoadOthers();\r\n\r\n canScroll = true;\r\n\r\n if(isFunction(v.callback)){\r\n v.callback();\r\n }\r\n }\r\n\r\n /**\r\n * Sets the value for the given attribute from the `data-` attribute with the same suffix\r\n * ie: data-srcset ==> srcset | data-src ==> src\r\n */\r\n function setSrc(element, attribute){\r\n element.setAttribute(attribute, element.getAttribute('data-' + attribute));\r\n element.removeAttribute('data-' + attribute);\r\n }\r\n\r\n /**\r\n * Makes sure lazyload is done for other sections in the viewport that are not the\r\n * active one. \r\n */\r\n function lazyLoadOthers(){\r\n var hasAutoHeightSections = $(AUTO_HEIGHT_SEL)[0] || isResponsiveMode() && $(AUTO_HEIGHT_RESPONSIVE_SEL)[0];\r\n\r\n //quitting when it doesn't apply\r\n if (!options.lazyLoading || !hasAutoHeightSections){\r\n return;\r\n }\r\n\r\n //making sure to lazy load auto-height sections that are in the viewport\r\n $(SECTION_SEL + ':not(' + ACTIVE_SEL + ')').forEach(function(section){\r\n if(isSectionInViewport(section)){\r\n lazyLoad(section);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Lazy loads image, video and audio elements.\r\n */\r\n function lazyLoad(destiny){\r\n if (!options.lazyLoading){\r\n return;\r\n }\r\n\r\n var panel = getSlideOrSection(destiny);\r\n\r\n $('img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]', panel).forEach(function(element){\r\n ['src', 'srcset'].forEach(function(type){\r\n var attribute = element.getAttribute('data-' + type);\r\n if(attribute != null && attribute){\r\n setSrc(element, type);\r\n element.addEventListener('load', function(){\r\n onMediaLoad(destiny);\r\n });\r\n }\r\n });\r\n\r\n if(matches(element, 'source')){\r\n var elementToPlay = closest(element, 'video, audio');\r\n if(elementToPlay){\r\n elementToPlay.load();\r\n elementToPlay.onloadeddata = function(){\r\n onMediaLoad(destiny);\r\n };\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Callback firing when a lazy load media element has loaded.\r\n * Making sure it only fires one per section in normal conditions (if load time is not huge)\r\n */\r\n function onMediaLoad(section){\r\n if(options.scrollOverflow){\r\n clearTimeout(g_mediaLoadedId);\r\n g_mediaLoadedId = setTimeout(function(){\r\n if(!hasClass($body, RESPONSIVE)){\r\n scrollBarHandler.createScrollBar(section);\r\n }\r\n }, 200);\r\n }\r\n }\r\n\r\n /**\r\n * Plays video and audio elements.\r\n */\r\n function playMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //playing HTML5 media elements\r\n $('video, audio', panel).forEach(function(element){\r\n if( element.hasAttribute('data-autoplay') && typeof element.play === 'function' ) {\r\n element.play();\r\n }\r\n });\r\n\r\n //youtube videos\r\n $('iframe[src*=\"youtube.com/embed/\"]', panel).forEach(function(element){\r\n if ( element.hasAttribute('data-autoplay') ){\r\n playYoutube(element);\r\n }\r\n\r\n //in case the URL was not loaded yet. On page load we need time for the new URL (with the API string) to load.\r\n element.onload = function() {\r\n if ( element.hasAttribute('data-autoplay') ){\r\n playYoutube(element);\r\n }\r\n };\r\n });\r\n }\r\n\r\n /**\r\n * Plays a youtube video\r\n */\r\n function playYoutube(element){\r\n element.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', '*');\r\n }\r\n\r\n /**\r\n * Stops video and audio elements.\r\n */\r\n function stopMedia(destiny){\r\n var panel = getSlideOrSection(destiny);\r\n\r\n //stopping HTML5 media elements\r\n $('video, audio', panel).forEach(function(element){\r\n if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) {\r\n element.pause();\r\n }\r\n });\r\n\r\n //youtube videos\r\n $('iframe[src*=\"youtube.com/embed/\"]', panel).forEach(function(element){\r\n if( /youtube\\.com\\/embed\\//.test(element.getAttribute('src')) && !element.hasAttribute('data-keepplaying')){\r\n element.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}','*');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Gets the active slide (or section) for the given section\r\n */\r\n function getSlideOrSection(destiny){\r\n var slide = $(SLIDE_ACTIVE_SEL, destiny);\r\n if( slide.length ) {\r\n destiny = slide[0];\r\n }\r\n\r\n return destiny;\r\n }\r\n\r\n /**\r\n * Scrolls to the anchor in the URL when loading the site\r\n */\r\n function scrollToAnchor(){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n if(sectionAnchor){ //if theres any #\r\n if(options.animateAnchor){\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }else{\r\n silentMoveTo(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Detecting any change on the URL to scroll to the given anchor link\r\n * (a way to detect back history button as we play with the hashes on the URL)\r\n */\r\n function hashChangeHandler(){\r\n if(!isScrolling && !options.lockAnchors){\r\n var anchors = getAnchorsURL();\r\n var sectionAnchor = anchors.section;\r\n var slideAnchor = anchors.slide;\r\n\r\n //when moving to a slide in the first section for the first time (first time to add an anchor to the URL)\r\n var isFirstSlideMove = (typeof lastScrolledDestiny === 'undefined');\r\n var isFirstScrollMove = (typeof lastScrolledDestiny === 'undefined' && typeof slideAnchor === 'undefined' && !slideMoving);\r\n\r\n if(sectionAnchor && sectionAnchor.length){\r\n /*in order to call scrollpage() only once for each destination at a time\r\n It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange`\r\n event is fired on every scroll too.*/\r\n if ((sectionAnchor && sectionAnchor !== lastScrolledDestiny) && !isFirstSlideMove\r\n || isFirstScrollMove\r\n || (!slideMoving && lastScrolledSlide != slideAnchor )){\r\n\r\n scrollPageAndSlide(sectionAnchor, slideAnchor);\r\n }\r\n }\r\n }\r\n }\r\n\r\n //gets the URL anchors (section and slide)\r\n function getAnchorsURL(){\r\n var section;\r\n var slide;\r\n var hash = window.location.hash;\r\n\r\n if(hash.length){\r\n //getting the anchor link in the URL and deleting the `#`\r\n var anchorsParts = hash.replace('#', '').split('/');\r\n\r\n //using / for visual reasons and not as a section/slide separator #2803\r\n var isFunkyAnchor = hash.indexOf('#/') > -1;\r\n\r\n section = isFunkyAnchor ? '/' + anchorsParts[1] : decodeURIComponent(anchorsParts[0]);\r\n\r\n var slideAnchor = isFunkyAnchor ? anchorsParts[2] : anchorsParts[1];\r\n if(slideAnchor && slideAnchor.length){\r\n slide = decodeURIComponent(slideAnchor);\r\n }\r\n }\r\n\r\n return {\r\n section: section,\r\n slide: slide\r\n };\r\n }\r\n\r\n //Sliding with arrow keys, both, vertical and horizontal\r\n function keydownHandler(e) {\r\n clearTimeout(keydownId);\r\n\r\n var activeElement = document.activeElement;\r\n var keyCode = e.keyCode;\r\n\r\n //tab?\r\n if(keyCode === 9){\r\n onTab(e);\r\n }\r\n\r\n else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') &&\r\n activeElement.getAttribute('contentEditable') !== \"true\" && activeElement.getAttribute('contentEditable') !== '' &&\r\n options.keyboardScrolling && options.autoScrolling){\r\n\r\n //preventing the scroll with arrow keys & spacebar & Page Up & Down keys\r\n var keyControls = [40, 38, 32, 33, 34];\r\n if(keyControls.indexOf(keyCode) > -1){\r\n preventDefault(e);\r\n }\r\n\r\n controlPressed = e.ctrlKey;\r\n\r\n keydownId = setTimeout(function(){\r\n onkeydown(e);\r\n },150);\r\n }\r\n }\r\n\r\n function tooltipTextHandler(){\r\n /*jshint validthis:true */\r\n trigger(prev(this), 'click');\r\n }\r\n\r\n //to prevent scrolling while zooming\r\n function keyUpHandler(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n }\r\n\r\n //binding the mousemove when the mouse's middle button is released\r\n function mouseDownHandler(e){\r\n //middle button\r\n if (e.which == 2){\r\n oldPageY = e.pageY;\r\n container.addEventListener('mousemove', mouseMoveHandler);\r\n }\r\n }\r\n\r\n //unbinding the mousemove when the mouse's middle button is released\r\n function mouseUpHandler(e){\r\n //middle button\r\n if (e.which == 2){\r\n container.removeEventListener('mousemove', mouseMoveHandler);\r\n }\r\n }\r\n\r\n /**\r\n * Makes sure the tab key will only focus elements within the current section/slide\r\n * preventing this way from breaking the page.\r\n * Based on \"Modals and keyboard traps\"\r\n * from https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex\r\n */\r\n function onTab(e){\r\n var isShiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\r\n\r\n function preventAndFocusFirst(e){\r\n preventDefault(e);\r\n return focusableElements[0] ? focusableElements[0].focus() : null;\r\n }\r\n\r\n //outside any section or slide? Let's not hijack the tab!\r\n if(isFocusOutside(e)){\r\n return;\r\n }\r\n\r\n //is there an element with focus?\r\n if(activeElement){\r\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\r\n activeElement = preventAndFocusFirst(e);\r\n }\r\n }\r\n\r\n //no element if focused? Let's focus the first one of the section/slide\r\n else{\r\n preventAndFocusFirst(e);\r\n }\r\n\r\n //when reached the first or last focusable element of the section/slide\r\n //we prevent the tab action to keep it in the last focusable element\r\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\r\n isShiftPressed && activeElement == focusableElements[0]\r\n ){\r\n preventDefault(e);\r\n }\r\n }\r\n\r\n /**\r\n * Gets all the focusable elements inside the passed element.\r\n */\r\n function getFocusables(el){\r\n return [].slice.call($(focusableElementsString, el)).filter(function(item) {\r\n return item.getAttribute('tabindex') !== '-1'\r\n //are also not hidden elements (or with hidden parents)\r\n && item.offsetParent !== null;\r\n });\r\n }\r\n\r\n /**\r\n * Determines whether the focus is outside fullpage.js sections/slides or not.\r\n */\r\n function isFocusOutside(e){\r\n var allFocusables = getFocusables(document);\r\n var currentFocusIndex = allFocusables.indexOf(document.activeElement);\r\n var focusDestinationIndex = e.shiftKey ? currentFocusIndex - 1 : currentFocusIndex + 1;\r\n var focusDestination = allFocusables[focusDestinationIndex];\r\n var destinationItemSlide = nullOrSlide(closest(focusDestination, SLIDE_SEL));\r\n var destinationItemSection = nullOrSection(closest(focusDestination, SECTION_SEL));\r\n\r\n return !destinationItemSlide && !destinationItemSection;\r\n }\r\n\r\n //Scrolling horizontally when clicking on the slider controls.\r\n function slideArrowHandler(){\r\n /*jshint validthis:true */\r\n var section = closest(this, SECTION_SEL);\r\n\r\n /*jshint validthis:true */\r\n if (hasClass(this, SLIDES_PREV)) {\r\n if(isScrollAllowed.m.left){\r\n moveSlideLeft(section);\r\n }\r\n } else {\r\n if(isScrollAllowed.m.right){\r\n moveSlideRight(section);\r\n }\r\n }\r\n }\r\n \r\n // changing isWindowFocused to true on focus event\r\n function focusHandler(){\r\n isWindowFocused = true;\r\n }\r\n\r\n //when opening a new tab (ctrl + t), `control` won't be pressed when coming back.\r\n function blurHandler(){\r\n isWindowFocused = false;\r\n controlPressed = false;\r\n }\r\n\r\n //Scrolls to the section when clicking the navigation bullet\r\n function sectionBulletHandler(e){\r\n preventDefault(e);\r\n\r\n /*jshint validthis:true */\r\n var indexBullet = index(closest(this, SECTION_NAV_SEL + ' li'));\r\n scrollPage($(SECTION_SEL)[indexBullet]);\r\n }\r\n\r\n //Scrolls the slider to the given slide destination for the given section\r\n function slideBulletHandler(e){\r\n preventDefault(e);\r\n\r\n /*jshint validthis:true */\r\n var slides = $(SLIDES_WRAPPER_SEL, closest(this, SECTION_SEL))[0];\r\n var destiny = $(SLIDE_SEL, slides)[index(closest(this, 'li'))];\r\n\r\n landscapeScroll(slides, destiny);\r\n }\r\n\r\n //Menu item handler when not using anchors or using lockAnchors:true\r\n function menuItemsHandler(e){\r\n if($(options.menu)[0] && (options.lockAnchors || !options.anchors.length)){\r\n preventDefault(e);\r\n /*jshint validthis:true */\r\n moveTo(this.getAttribute('data-menuanchor'));\r\n }\r\n }\r\n\r\n /**\r\n * Keydown event\r\n */\r\n function onkeydown(e){\r\n var shiftPressed = e.shiftKey;\r\n var activeElement = document.activeElement;\r\n var isMediaFocused = matches(activeElement, 'video') || matches(activeElement, 'audio');\r\n\r\n //do nothing if we can not scroll or we are not using horizotnal key arrows.\r\n if(!canScroll && [37,39].indexOf(e.keyCode) < 0){\r\n return;\r\n }\r\n\r\n switch (e.keyCode) {\r\n //up\r\n case 38:\r\n case 33:\r\n if(isScrollAllowed.k.up){\r\n moveSectionUp();\r\n }\r\n break;\r\n\r\n //down\r\n case 32: //spacebar\r\n\r\n if(shiftPressed && isScrollAllowed.k.up && !isMediaFocused){\r\n moveSectionUp();\r\n break;\r\n }\r\n /* falls through */\r\n case 40:\r\n case 34:\r\n if(isScrollAllowed.k.down){\r\n // space bar?\r\n if(e.keyCode !== 32 || !isMediaFocused){\r\n moveSectionDown();\r\n }\r\n }\r\n break;\r\n\r\n //Home\r\n case 36:\r\n if(isScrollAllowed.k.up){\r\n moveTo(1);\r\n }\r\n break;\r\n\r\n //End\r\n case 35:\r\n if(isScrollAllowed.k.down){\r\n moveTo( $(SECTION_SEL).length );\r\n }\r\n break;\r\n\r\n //left\r\n case 37:\r\n if(isScrollAllowed.k.left){\r\n moveSlideLeft();\r\n }\r\n break;\r\n\r\n //right\r\n case 39:\r\n if(isScrollAllowed.k.right){\r\n moveSlideRight();\r\n }\r\n break;\r\n\r\n default:\r\n return; // exit this handler for other keys\r\n }\r\n }\r\n\r\n /**\r\n * Detecting the direction of the mouse movement.\r\n * Used only for the middle button of the mouse.\r\n */\r\n var oldPageY = 0;\r\n function mouseMoveHandler(e){\r\n if(!options.autoScrolling){\r\n return;\r\n }\r\n if(canScroll){\r\n // moving up\r\n if (e.pageY < oldPageY && isScrollAllowed.m.up){\r\n moveSectionUp();\r\n }\r\n\r\n // moving down\r\n else if(e.pageY > oldPageY && isScrollAllowed.m.down){\r\n moveSectionDown();\r\n }\r\n }\r\n oldPageY = e.pageY;\r\n }\r\n\r\n /**\r\n * Scrolls horizontal sliders.\r\n */\r\n function landscapeScroll(slides, destiny, direction){\r\n var section = closest(slides, SECTION_SEL);\r\n var v = {\r\n slides: slides,\r\n destiny: destiny,\r\n direction: direction,\r\n destinyPos: {left: destiny.offsetLeft},\r\n slideIndex: index(destiny),\r\n section: section,\r\n sectionIndex: index(section, SECTION_SEL),\r\n anchorLink: section.getAttribute('data-anchor'),\r\n slidesNav: $(SLIDES_NAV_SEL, section)[0],\r\n slideAnchor: getAnchor(destiny),\r\n prevSlide: $(SLIDE_ACTIVE_SEL, section)[0],\r\n prevSlideIndex: index($(SLIDE_ACTIVE_SEL, section)[0]),\r\n\r\n //caching the value of isResizing at the momment the function is called\r\n //because it will be checked later inside a setTimeout and the value might change\r\n localIsResizing: isResizing\r\n };\r\n v.xMovement = getXmovement(v.prevSlideIndex, v.slideIndex);\r\n v.direction = v.direction ? v.direction : v.xMovement;\r\n\r\n //important!! Only do it when not resizing\r\n if(!v.localIsResizing){\r\n //preventing from scrolling to the next/prev section when using scrollHorizontally\r\n canScroll = false;\r\n }\r\n\r\n if(options.onSlideLeave){\r\n\r\n //if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing && v.xMovement!=='none'){\r\n if(isFunction( options.onSlideLeave )){\r\n if( fireCallback('onSlideLeave', v) === false){\r\n slideMoving = false;\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n\r\n addClass(destiny, ACTIVE);\r\n removeClass(siblings(destiny), ACTIVE);\r\n\r\n if(!v.localIsResizing){\r\n stopMedia(v.prevSlide);\r\n lazyLoad(destiny);\r\n }\r\n\r\n if(!options.loopHorizontal && options.controlArrows){\r\n //hidding it for the fist slide, showing for the rest\r\n toggle($(SLIDES_ARROW_PREV_SEL, section), v.slideIndex!==0);\r\n\r\n //hidding it for the last slide, showing for the rest\r\n toggle($(SLIDES_ARROW_NEXT_SEL, section), next(destiny) != null);\r\n }\r\n\r\n //only changing the URL if the slides are in the current section (not for resize re-adjusting)\r\n if(hasClass(section, ACTIVE) && !v.localIsResizing){\r\n setState(v.slideIndex, v.slideAnchor, v.anchorLink, v.sectionIndex);\r\n }\r\n\r\n performHorizontalMove(slides, v, true);\r\n }\r\n\r\n\r\n function afterSlideLoads(v){\r\n activeSlidesNavigation(v.slidesNav, v.slideIndex);\r\n\r\n //if the site is not just resizing and readjusting the slides\r\n if(!v.localIsResizing){\r\n if(isFunction( options.afterSlideLoad )){\r\n fireCallback('afterSlideLoad', v);\r\n }\r\n\r\n //needs to be inside the condition to prevent problems with continuousVertical and scrollHorizontally\r\n //and to prevent double scroll right after a windows resize\r\n canScroll = true;\r\n\r\n playMedia(v.destiny);\r\n }\r\n\r\n //letting them slide again\r\n slideMoving = false;\r\n }\r\n\r\n /**\r\n * Performs the horizontal movement. (CSS3 or jQuery)\r\n *\r\n * @param fireCallback {Bool} - determines whether or not to fire the callback\r\n */\r\n function performHorizontalMove(slides, v, fireCallback){\r\n var destinyPos = v.destinyPos;\r\n\r\n if(options.css3){\r\n var translate3d = 'translate3d(-' + Math.round(destinyPos.left) + 'px, 0px, 0px)';\r\n\r\n FP.test.translate3dH[v.sectionIndex] = translate3d;\r\n css(addAnimation($(SLIDES_CONTAINER_SEL, slides)), getTransforms(translate3d));\r\n\r\n afterSlideLoadsId = setTimeout(function(){\r\n if(fireCallback){\r\n afterSlideLoads(v);\r\n }\r\n }, options.scrollingSpeed);\r\n }else{\r\n FP.test.left[v.sectionIndex] = Math.round(destinyPos.left);\r\n\r\n scrollTo(slides, Math.round(destinyPos.left), options.scrollingSpeed, function(){\r\n if(fireCallback){\r\n afterSlideLoads(v);\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Sets the state for the horizontal bullet navigations.\r\n */\r\n function activeSlidesNavigation(slidesNav, slideIndex){\r\n if(options.slidesNavigation && slidesNav != null){\r\n removeClass($(ACTIVE_SEL, slidesNav), ACTIVE);\r\n addClass( $('a', $('li', slidesNav)[slideIndex] ), ACTIVE);\r\n }\r\n }\r\n\r\n var previousHeight = windowsHeight;\r\n\r\n /*\r\n * Resize event handler.\r\n */ \r\n function resizeHandler(){\r\n isResizing = true;\r\n \r\n clearTimeout(resizeId);\r\n\r\n //in order to call the functions only when the resize is finished\r\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing \r\n resizeId = setTimeout(function(){\r\n\r\n //issue #3336 \r\n //(some apps or browsers, like Chrome/Firefox for Mobile take time to report the real height)\r\n //so we check it 3 times with intervals in that case\r\n for(var i = 0; i< 4; i++){\r\n resizeHandlerId = setTimeout(resizeActions, 200 * i);\r\n }\r\n }, 200);\r\n }\r\n\r\n /**\r\n * When resizing the site, we adjust the heights of the sections, slimScroll...\r\n */\r\n function resizeActions(){\r\n\r\n //checking if it needs to get responsive\r\n responsive();\r\n\r\n // rebuild immediately on touch devices\r\n if (isTouchDevice) {\r\n var activeElement = document.activeElement;\r\n\r\n //if the keyboard is NOT visible\r\n if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) {\r\n var currentHeight = getWindowHeight();\r\n\r\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\r\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\r\n reBuild(true);\r\n previousHeight = currentHeight;\r\n }\r\n }\r\n }\r\n else{\r\n adjustToNewViewport();\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the site needs to get responsive and disables autoScrolling if so.\r\n * A class `fp-responsive` is added to the plugin's container in case the user wants to use it for his own responsive CSS.\r\n */\r\n function responsive(){\r\n var widthLimit = options.responsive || options.responsiveWidth; //backwards compatiblity\r\n var heightLimit = options.responsiveHeight;\r\n\r\n //only calculating what we need. Remember its called on the resize event.\r\n var isBreakingPointWidth = widthLimit && window.innerWidth < widthLimit;\r\n var isBreakingPointHeight = heightLimit && window.innerHeight < heightLimit;\r\n\r\n if(widthLimit && heightLimit){\r\n setResponsive(isBreakingPointWidth || isBreakingPointHeight);\r\n }\r\n else if(widthLimit){\r\n setResponsive(isBreakingPointWidth);\r\n }\r\n else if(heightLimit){\r\n setResponsive(isBreakingPointHeight);\r\n }\r\n }\r\n\r\n /**\r\n * Adds transition animations for the given element\r\n */\r\n function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }\r\n\r\n /**\r\n * Remove transition animations for the given element\r\n */\r\n function removeAnimation(element){\r\n return addClass(element, NO_TRANSITION);\r\n }\r\n\r\n /**\r\n * Activating the vertical navigation bullets according to the given slide name.\r\n */\r\n function activateNavDots(name, sectionIndex){\r\n if(options.navigation && $(SECTION_NAV_SEL)[0] != null){\r\n removeClass($(ACTIVE_SEL, $(SECTION_NAV_SEL)[0]), ACTIVE);\r\n if(name){\r\n addClass( $('a[href=\"#' + name + '\"]', $(SECTION_NAV_SEL)[0]), ACTIVE);\r\n }else{\r\n addClass($('a', $('li', $(SECTION_NAV_SEL)[0])[sectionIndex]), ACTIVE);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Activating the website main menu elements according to the given slide name.\r\n */\r\n function activateMenuElement(name){\r\n $(options.menu).forEach(function(menu) {\r\n if(options.menu && menu != null){\r\n removeClass($(ACTIVE_SEL, menu), ACTIVE);\r\n addClass($('[data-menuanchor=\"'+name+'\"]', menu), ACTIVE);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Sets to active the current menu and vertical nav items.\r\n */\r\n function activateMenuAndNav(anchor, index){\r\n activateMenuElement(anchor);\r\n activateNavDots(anchor, index);\r\n }\r\n\r\n /**\r\n * Retuns `up` or `down` depending on the scrolling movement to reach its destination\r\n * from the current section.\r\n */\r\n function getYmovement(destiny){\r\n var fromIndex = index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\r\n var toIndex = index(destiny, SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }\r\n\r\n /**\r\n * Retuns `right` or `left` depending on the scrolling movement to reach its destination\r\n * from the current slide.\r\n */\r\n function getXmovement(fromIndex, toIndex){\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'left';\r\n }\r\n return 'right';\r\n }\r\n\r\n function addTableClass(element){\r\n //In case we are styling for the 2nd time as in with reponsiveSlides\r\n if(!hasClass(element, TABLE)){\r\n var wrapper = document.createElement('div');\r\n wrapper.className = TABLE_CELL;\r\n wrapper.style.height = getTableHeight(element) + 'px';\r\n\r\n addClass(element, TABLE);\r\n wrapInner(element, wrapper);\r\n }\r\n }\r\n\r\n function getTableHeight(element){\r\n var sectionHeight = windowsHeight;\r\n\r\n if(options.paddingTop || options.paddingBottom){\r\n var section = element;\r\n if(!hasClass(section, SECTION)){\r\n section = closest(element, SECTION_SEL);\r\n }\r\n\r\n var paddings = parseInt(getComputedStyle(section)['padding-top']) + parseInt(getComputedStyle(section)['padding-bottom']);\r\n sectionHeight = (windowsHeight - paddings);\r\n }\r\n\r\n return sectionHeight;\r\n }\r\n\r\n /**\r\n * Adds a css3 transform property to the container class with or without animation depending on the animated param.\r\n */\r\n function transformContainer(translate3d, animated){\r\n if(animated){\r\n addAnimation(container);\r\n }else{\r\n removeAnimation(container);\r\n }\r\n\r\n css(container, getTransforms(translate3d));\r\n FP.test.translate3d = translate3d;\r\n\r\n //syncronously removing the class after the animation has been applied.\r\n setTimeout(function(){\r\n removeClass(container, NO_TRANSITION);\r\n },10);\r\n }\r\n\r\n /**\r\n * Gets a section by its anchor / index\r\n */\r\n function getSectionByAnchor(sectionAnchor){\r\n var section = $(SECTION_SEL + '[data-anchor=\"'+sectionAnchor+'\"]', container)[0];\r\n if(!section){\r\n var sectionIndex = typeof sectionAnchor !== 'undefined' ? sectionAnchor -1 : 0;\r\n section = $(SECTION_SEL)[sectionIndex];\r\n }\r\n\r\n return section;\r\n }\r\n\r\n /**\r\n * Gets a slide inside a given section by its anchor / index\r\n */\r\n function getSlideByAnchor(slideAnchor, section){\r\n var slide = $(SLIDE_SEL + '[data-anchor=\"'+slideAnchor+'\"]', section)[0];\r\n if(slide == null){\r\n slideAnchor = typeof slideAnchor !== 'undefined' ? slideAnchor : 0;\r\n slide = $(SLIDE_SEL, section)[slideAnchor];\r\n }\r\n\r\n return slide;\r\n }\r\n\r\n /**\r\n * Scrolls to the given section and slide anchors\r\n */\r\n function scrollPageAndSlide(sectionAnchor, slideAnchor){\r\n var section = getSectionByAnchor(sectionAnchor);\r\n\r\n //do nothing if there's no section with the given anchor name\r\n if(section == null) return;\r\n\r\n var slide = getSlideByAnchor(slideAnchor, section);\r\n\r\n //we need to scroll to the section and then to the slide\r\n if (getAnchor(section) !== lastScrolledDestiny && !hasClass(section, ACTIVE)){\r\n scrollPage(section, function(){\r\n scrollSlider(slide);\r\n });\r\n }\r\n //if we were already in the section\r\n else{\r\n scrollSlider(slide);\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the slider to the given slide destination for the given section\r\n */\r\n function scrollSlider(slide){\r\n if(slide != null){\r\n landscapeScroll(closest(slide, SLIDES_WRAPPER_SEL), slide);\r\n }\r\n }\r\n\r\n /**\r\n * Creates a landscape navigation bar with dots for horizontal sliders.\r\n */\r\n function addSlidesNavigation(section, numSlides){\r\n appendTo(createElementFromHTML('
            '), section);\r\n var nav = $(SLIDES_NAV_SEL, section)[0];\r\n\r\n //top or bottom\r\n addClass(nav, 'fp-' + options.slidesNavPosition);\r\n\r\n for(var i=0; i< numSlides; i++){\r\n var slide = $(SLIDE_SEL, section)[i];\r\n appendTo(createElementFromHTML('
          • '+ getBulletLinkName(i, 'Slide', slide) +'
          • '), $('ul', nav)[0] );\r\n }\r\n\r\n //centering it\r\n css(nav, {'margin-left': '-' + (nav.innerWidth/2) + 'px'});\r\n\r\n addClass($('a', $('li', nav)[0] ), ACTIVE);\r\n }\r\n\r\n\r\n /**\r\n * Sets the state of the website depending on the active section/slide.\r\n * It changes the URL hash when needed and updates the body class.\r\n */\r\n function setState(slideIndex, slideAnchor, anchorLink, sectionIndex){\r\n var sectionHash = '';\r\n\r\n if(options.anchors.length && !options.lockAnchors){\r\n\r\n //isn't it the first slide?\r\n if(slideIndex){\r\n if(anchorLink != null){\r\n sectionHash = anchorLink;\r\n }\r\n\r\n //slide without anchor link? We take the index instead.\r\n if(slideAnchor == null){\r\n slideAnchor = slideIndex;\r\n }\r\n\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(sectionHash + '/' + slideAnchor);\r\n\r\n //first slide won't have slide anchor, just the section one\r\n }else if(slideIndex != null){\r\n lastScrolledSlide = slideAnchor;\r\n setUrlHash(anchorLink);\r\n }\r\n\r\n //section without slides\r\n else{\r\n setUrlHash(anchorLink);\r\n }\r\n }\r\n\r\n setBodyClass();\r\n }\r\n\r\n /**\r\n * Sets the URL hash.\r\n */\r\n function setUrlHash(url){\r\n if(options.recordHistory){\r\n location.hash = url;\r\n }else{\r\n //Mobile Chrome doesn't work the normal way, so... lets use HTML5 for phones :)\r\n if(isTouchDevice || isTouch){\r\n window.history.replaceState(undefined, undefined, '#' + url);\r\n }else{\r\n var baseUrl = window.location.href.split('#')[0];\r\n window.location.replace( baseUrl + '#' + url );\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Gets the anchor for the given slide / section. Its index will be used if there's none.\r\n */\r\n function getAnchor(element){\r\n if(!element){\r\n return null;\r\n }\r\n var anchor = element.getAttribute('data-anchor');\r\n var elementIndex = index(element);\r\n\r\n //Slide without anchor link? We take the index instead.\r\n if(anchor == null){\r\n anchor = elementIndex;\r\n }\r\n\r\n return anchor;\r\n }\r\n\r\n /**\r\n * Sets a class for the body of the page depending on the active section / slide\r\n */\r\n function setBodyClass(){\r\n var section = $(SECTION_ACTIVE_SEL)[0];\r\n var slide = $(SLIDE_ACTIVE_SEL, section)[0];\r\n\r\n var sectionAnchor = getAnchor(section);\r\n var slideAnchor = getAnchor(slide);\r\n\r\n var text = String(sectionAnchor);\r\n\r\n if(slide){\r\n text = text + '-' + slideAnchor;\r\n }\r\n\r\n //changing slash for dash to make it a valid CSS style\r\n text = text.replace('/', '-').replace('#','');\r\n\r\n //removing previous anchor classes\r\n var classRe = new RegExp('\\\\b\\\\s?' + VIEWING_PREFIX + '-[^\\\\s]+\\\\b', \"g\");\r\n $body.className = $body.className.replace(classRe, '');\r\n\r\n //adding the current anchor\r\n addClass($body, VIEWING_PREFIX + '-' + text);\r\n }\r\n\r\n /**\r\n * Checks for translate3d support\r\n * @return boolean\r\n * http://stackoverflow.com/questions/5661671/detecting-transform-translate3d-support\r\n */\r\n function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n //preventing the style p:empty{display: none;} from returning the wrong result\r\n el.style.display = 'block';\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling action fired by the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements won't scroll through sections.\r\n */\r\n function removeMouseWheelHandler(){\r\n if (document.addEventListener) {\r\n document.removeEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper\r\n document.removeEventListener('wheel', MouseWheelHandler, false); //Firefox\r\n document.removeEventListener('MozMousePixelScroll', MouseWheelHandler, false); //old Firefox\r\n } else {\r\n document.detachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8\r\n }\r\n }\r\n\r\n /**\r\n * Adds the auto scrolling action for the mouse wheel and trackpad.\r\n * After this function is called, the mousewheel and trackpad movements will scroll through sections\r\n * https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n */\r\n function addMouseWheelHandler(){\r\n var prefix = '';\r\n var _addEventListener;\r\n\r\n if (window.addEventListener){\r\n _addEventListener = \"addEventListener\";\r\n }else{\r\n _addEventListener = \"attachEvent\";\r\n prefix = 'on';\r\n }\r\n\r\n // detect available wheel event\r\n var support = 'onwheel' in document.createElement('div') ? 'wheel' : // Modern browsers support \"wheel\"\r\n document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least \"mousewheel\"\r\n 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox\r\n var passiveEvent = g_supportsPassive ? {passive: false }: false;\r\n\r\n if(support == 'DOMMouseScroll'){\r\n document[ _addEventListener ](prefix + 'MozMousePixelScroll', MouseWheelHandler, passiveEvent);\r\n }\r\n\r\n //handle MozMousePixelScroll in older Firefox\r\n else{\r\n document[ _addEventListener ](prefix + support, MouseWheelHandler, passiveEvent);\r\n }\r\n }\r\n\r\n /**\r\n * Binding the mousemove when the mouse's middle button is pressed\r\n */\r\n function addMiddleWheelHandler(){\r\n container.addEventListener('mousedown', mouseDownHandler);\r\n container.addEventListener('mouseup', mouseUpHandler);\r\n }\r\n\r\n /**\r\n * Unbinding the mousemove when the mouse's middle button is released\r\n */\r\n function removeMiddleWheelHandler(){\r\n container.removeEventListener('mousedown', mouseDownHandler);\r\n container.removeEventListener('mouseup', mouseUpHandler);\r\n }\r\n\r\n /**\r\n * Adds the possibility to auto scroll through sections on touch devices.\r\n */\r\n function addTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n if(options.autoScrolling){\r\n $body.removeEventListener(events.touchmove, preventBouncing, {passive: false});\r\n $body.addEventListener(events.touchmove, preventBouncing, {passive: false});\r\n }\r\n\r\n var touchWrapper = options.touchWrapper;\r\n touchWrapper.removeEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n\r\n touchWrapper.addEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.addEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n }\r\n }\r\n\r\n /**\r\n * Removes the auto scrolling for touch devices.\r\n */\r\n function removeTouchHandler(){\r\n if(isTouchDevice || isTouch){\r\n // normalScrollElements requires it off #2691\r\n if(options.autoScrolling){\r\n $body.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n $body.removeEventListener(events.touchmove, preventBouncing, {passive: false});\r\n }\r\n\r\n var touchWrapper = options.touchWrapper;\r\n touchWrapper.removeEventListener(events.touchstart, touchStartHandler);\r\n touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false});\r\n }\r\n }\r\n\r\n /*\r\n * Returns and object with Microsoft pointers (for IE<11 and for IE >= 11)\r\n * http://msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx\r\n */\r\n function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }\r\n\r\n /**\r\n * Gets the pageX and pageY properties depending on the browser.\r\n * https://github.com/alvarotrigo/fullPage.js/issues/194#issuecomment-34069854\r\n */\r\n function getEventsPage(e){\r\n var events = [];\r\n\r\n events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY);\r\n events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);\r\n\r\n //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008\r\n if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){\r\n events.y = e.touches[0].pageY;\r\n events.x = e.touches[0].pageX;\r\n }\r\n\r\n return events;\r\n }\r\n\r\n /**\r\n * Slides silently (with no animation) the active slider to the given slide.\r\n * @param noCallback {bool} true or defined -> no callbacks\r\n */\r\n function silentLandscapeScroll(activeSlide, noCallbacks){\r\n setScrollingSpeed(0, 'internal');\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n //preventing firing callbacks afterSlideLoad etc.\r\n isResizing = true;\r\n }\r\n\r\n landscapeScroll(closest(activeSlide, SLIDES_WRAPPER_SEL), activeSlide);\r\n\r\n if(typeof noCallbacks !== 'undefined'){\r\n isResizing = false;\r\n }\r\n\r\n setScrollingSpeed(originals.scrollingSpeed, 'internal');\r\n }\r\n\r\n /**\r\n * Scrolls silently (with no animation) the page to the given Y position.\r\n */\r\n function silentScroll(top){\r\n // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625\r\n // that's why we round it to 0.\r\n var roundedTop = Math.round(top);\r\n\r\n if (options.css3 && options.autoScrolling && !options.scrollBar){\r\n var translate3d = 'translate3d(0px, -' + roundedTop + 'px, 0px)';\r\n transformContainer(translate3d, false);\r\n }\r\n else if(options.autoScrolling && !options.scrollBar){\r\n css(container, {'top': -roundedTop + 'px'});\r\n FP.test.top = -roundedTop + 'px';\r\n }\r\n else{\r\n var scrollSettings = getScrollSettings(roundedTop);\r\n setScrolling(scrollSettings.element, scrollSettings.options);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the cross-browser transform string.\r\n */\r\n function getTransforms(translate3d){\r\n return {\r\n '-webkit-transform': translate3d,\r\n '-moz-transform': translate3d,\r\n '-ms-transform':translate3d,\r\n 'transform': translate3d\r\n };\r\n }\r\n\r\n /**\r\n * Allowing or disallowing the mouse/swipe scroll in a given direction. (not for keyboard)\r\n * @type m (mouse) or k (keyboard)\r\n */\r\n function setIsScrollAllowed(value, direction, type){\r\n //up, down, left, right\r\n if(direction !== 'all'){\r\n isScrollAllowed[type][direction] = value;\r\n }\r\n\r\n //all directions?\r\n else{\r\n Object.keys(isScrollAllowed[type]).forEach(function(key){\r\n isScrollAllowed[type][key] = value;\r\n });\r\n }\r\n }\r\n\r\n /*\r\n * Destroys fullpage.js plugin events and optinally its html markup and styles\r\n */\r\n function destroy(all){\r\n setAutoScrolling(false, 'internal');\r\n setAllowScrolling(true);\r\n setMouseHijack(false);\r\n setKeyboardScrolling(false);\r\n addClass(container, DESTROYED);\r\n\r\n [\r\n afterSlideLoadsId, \r\n afterSectionLoadsId,\r\n resizeId,\r\n scrollId,\r\n scrollId2,\r\n g_doubleCheckHeightId,\r\n resizeHandlerId,\r\n g_transitionLapseId\r\n ].forEach(function(timeoutId){\r\n clearTimeout(timeoutId);\r\n });\r\n\r\n window.removeEventListener('scroll', scrollHandler);\r\n window.removeEventListener('hashchange', hashChangeHandler);\r\n window.removeEventListener('resize', resizeHandler);\r\n\r\n document.removeEventListener('keydown', keydownHandler);\r\n document.removeEventListener('keyup', keyUpHandler);\r\n\r\n ['click', 'touchstart'].forEach(function(eventName){\r\n document.removeEventListener(eventName, delegatedEvents);\r\n });\r\n\r\n ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){\r\n document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required!\r\n });\r\n\r\n //lets make a mess!\r\n if(all){\r\n destroyStructure();\r\n }\r\n }\r\n\r\n /*\r\n * Removes inline styles added by fullpage.js\r\n */\r\n function destroyStructure(){\r\n //reseting the `top` or `translate` properties to 0\r\n silentScroll(0);\r\n\r\n //loading all the lazy load content\r\n $('img[data-src], source[data-src], audio[data-src], iframe[data-src]', container).forEach(function(item){\r\n setSrc(item, 'src');\r\n });\r\n\r\n $('img[data-srcset]').forEach(function(item){\r\n setSrc(item, 'srcset');\r\n });\r\n\r\n remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL));\r\n\r\n //removing inline styles\r\n css($(SECTION_SEL), {\r\n 'height': '',\r\n 'background-color' : '',\r\n 'padding': ''\r\n });\r\n\r\n css($(SLIDE_SEL), {\r\n 'width': ''\r\n });\r\n\r\n css(container, {\r\n 'height': '',\r\n 'position': '',\r\n '-ms-touch-action': '',\r\n 'touch-action': ''\r\n });\r\n\r\n css($htmlBody, {\r\n 'overflow': '',\r\n 'height': ''\r\n });\r\n\r\n // remove .fp-enabled class\r\n removeClass($html, ENABLED);\r\n\r\n // remove .fp-responsive class\r\n removeClass($body, RESPONSIVE);\r\n\r\n // remove all of the .fp-viewing- classes\r\n $body.className.split(/\\s+/).forEach(function (className) {\r\n if (className.indexOf(VIEWING_PREFIX) === 0) {\r\n removeClass($body, className);\r\n }\r\n });\r\n\r\n //removing added classes\r\n $(SECTION_SEL + ', ' + SLIDE_SEL).forEach(function(item){\r\n if(options.scrollOverflowHandler && options.scrollOverflow){\r\n options.scrollOverflowHandler.remove(item);\r\n }\r\n removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY);\r\n var previousStyles = item.getAttribute('data-fp-styles');\r\n if(previousStyles){\r\n item.setAttribute('style', item.getAttribute('data-fp-styles'));\r\n }\r\n\r\n //removing anchors if they were not set using the HTML markup\r\n if(hasClass(item, SECTION) && !g_initialAnchorsInDom){\r\n item.removeAttribute('data-anchor');\r\n }\r\n });\r\n\r\n //removing the applied transition from the fullpage wrapper\r\n removeAnimation(container);\r\n\r\n //Unwrapping content\r\n [TABLE_CELL_SEL, SLIDES_CONTAINER_SEL,SLIDES_WRAPPER_SEL].forEach(function(selector){\r\n $(selector, container).forEach(function(item){\r\n //unwrap not being use in case there's no child element inside and its just text\r\n unwrap(item);\r\n });\r\n });\r\n\r\n //removing the applied transition from the fullpage wrapper\r\n css(container, {\r\n '-webkit-transition': 'none',\r\n 'transition': 'none'\r\n });\r\n\r\n //scrolling the page to the top with no animation\r\n window.scrollTo(0, 0);\r\n\r\n //removing selectors\r\n var usedSelectors = [SECTION, SLIDE, SLIDES_CONTAINER];\r\n usedSelectors.forEach(function(item){\r\n removeClass($('.' + item), item);\r\n });\r\n }\r\n\r\n /*\r\n * Sets the state for a variable with multiple states (original, and temporal)\r\n * Some variables such as `autoScrolling` or `recordHistory` might change automatically its state when using `responsive` or `autoScrolling:false`.\r\n * This function is used to keep track of both states, the original and the temporal one.\r\n * If type is not 'internal', then we assume the user is globally changing the variable.\r\n */\r\n function setVariableState(variable, value, type){\r\n options[variable] = value;\r\n if(type !== 'internal'){\r\n originals[variable] = value;\r\n }\r\n }\r\n\r\n /**\r\n * Displays warnings\r\n */\r\n function displayWarnings(){\r\n var l = options['li' + 'c' + 'enseK' + 'e' + 'y'];\r\n var msgStyle = 'font-size: 15px;background:yellow;';\r\n\r\n if(!isOK){\r\n showError('error', 'Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:');\r\n showError('error', 'https://github.com/alvarotrigo/fullPage.js#options.');\r\n }\r\n else if(l && l.length < 20){\r\n console.warn('%c This website was made using fullPage.js slider. More info on the following website:', msgStyle);\r\n console.warn('%c https://alvarotrigo.com/fullPage/', msgStyle);\r\n }\r\n\r\n if(hasClass($html, ENABLED)){\r\n showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!');\r\n return;\r\n }\r\n\r\n // Disable mutually exclusive settings\r\n if (options.continuousVertical &&\r\n (options.loopTop || options.loopBottom)) {\r\n options.continuousVertical = false;\r\n showError('warn', 'Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n if(options.scrollOverflow &&\r\n (options.scrollBar || !options.autoScrolling)){\r\n showError('warn', 'Options scrollBar:true and autoScrolling:false are mutually exclusive with scrollOverflow:true. Sections with scrollOverflow might not work well in Firefox');\r\n }\r\n\r\n if(options.continuousVertical && (options.scrollBar || !options.autoScrolling)){\r\n options.continuousVertical = false;\r\n showError('warn', 'Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled');\r\n }\r\n\r\n if(options.scrollOverflow && options.scrollOverflowHandler == null){\r\n options.scrollOverflow = false;\r\n showError('error', 'The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.');\r\n }\r\n\r\n //using extensions? Wrong file!\r\n extensions.forEach(function(extension){\r\n //is the option set to true?\r\n if(options[extension]){\r\n showError('warn', 'fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: '+ extension);\r\n }\r\n });\r\n\r\n //anchors can not have the same value as any element ID or NAME\r\n options.anchors.forEach(function(name){\r\n\r\n //case insensitive selectors (http://stackoverflow.com/a/19465187/1081396)\r\n var nameAttr = [].slice.call($('[name]')).filter(function(item) {\r\n return item.getAttribute('name') && item.getAttribute('name').toLowerCase() == name.toLowerCase();\r\n });\r\n\r\n var idAttr = [].slice.call($('[id]')).filter(function(item) {\r\n return item.getAttribute('id') && item.getAttribute('id').toLowerCase() == name.toLowerCase();\r\n });\r\n\r\n if(idAttr.length || nameAttr.length ){\r\n showError('error', 'data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).');\r\n var propertyName = idAttr.length ? 'id' : 'name';\r\n\r\n if(idAttr.length || nameAttr.length){\r\n showError('error', '\"' + name + '\" is is being used by another element `'+ propertyName +'` property');\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Getting the position of the element to scroll when using jQuery animations\r\n */\r\n function getScrolledPosition(element){\r\n var position;\r\n\r\n //is not the window element and is a slide?\r\n if(element.self != window && hasClass(element, SLIDES_WRAPPER)){\r\n position = element.scrollLeft;\r\n }\r\n else if(!options.autoScrolling || options.scrollBar){\r\n position = getScrollTop();\r\n }\r\n else{\r\n position = element.offsetTop;\r\n }\r\n\r\n //gets the top property of the wrapper\r\n return position;\r\n }\r\n\r\n /**\r\n * Simulates the animated scrollTop of jQuery. Used when css3:false or scrollBar:true or autoScrolling:false\r\n * http://stackoverflow.com/a/16136789/1081396\r\n */\r\n function scrollTo(element, to, duration, callback) {\r\n var start = getScrolledPosition(element);\r\n var change = to - start;\r\n var currentTime = 0;\r\n var increment = 20;\r\n activeAnimation = true;\r\n\r\n var animateScroll = function(){\r\n if(activeAnimation){ //in order to stope it from other function whenever we want\r\n var val = to;\r\n\r\n currentTime += increment;\r\n\r\n if(duration){\r\n val = window.fp_easings[options.easing](currentTime, start, change, duration);\r\n }\r\n\r\n setScrolling(element, val);\r\n\r\n if(currentTime < duration) {\r\n setTimeout(animateScroll, increment);\r\n }else if(typeof callback !== 'undefined'){\r\n callback();\r\n }\r\n }else if (currentTime < duration){\r\n callback();\r\n }\r\n };\r\n\r\n animateScroll();\r\n }\r\n\r\n /**\r\n * Scrolls the page / slider the given number of pixels.\r\n * It will do it one or another way dependiong on the library's config.\r\n */\r\n function setScrolling(element, val){\r\n if(!options.autoScrolling || options.scrollBar || (element.self != window && hasClass(element, SLIDES_WRAPPER))){\r\n\r\n //scrolling horizontally through the slides?\r\n if(element.self != window && hasClass(element, SLIDES_WRAPPER)){\r\n element.scrollLeft = val;\r\n }\r\n //vertical scroll\r\n else{\r\n element.scrollTo(0, val);\r\n }\r\n }else{\r\n element.style.top = val + 'px';\r\n }\r\n }\r\n\r\n /**\r\n * Gets the active slide.\r\n */\r\n function getActiveSlide(){\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\r\n return nullOrSlide(activeSlide);\r\n }\r\n\r\n /**\r\n * Gets the active section.\r\n */\r\n function getActiveSection(){\r\n return new Section($(SECTION_ACTIVE_SEL)[0]);\r\n }\r\n\r\n /**\r\n * Item. Slide or Section objects share the same properties.\r\n */\r\n function Item(el, selector){\r\n this.anchor = el.getAttribute('data-anchor');\r\n this.item = el;\r\n this.index = index(el, selector);\r\n this.isLast = this.index === el.parentElement.querySelectorAll(selector).length -1;\r\n this.isFirst = !this.index;\r\n }\r\n\r\n /**\r\n * Section object\r\n */\r\n function Section(el){\r\n Item.call(this, el, SECTION_SEL);\r\n }\r\n\r\n /**\r\n * Slide object\r\n */\r\n function Slide(el){\r\n Item.call(this, el, SLIDE_SEL);\r\n }\r\n\r\n return FP;\r\n } //end of $.fn.fullpage\r\n\r\n //utils\r\n /**\r\n * Shows a message in the console of the given type.\r\n */\r\n function showError(type, text){\r\n window.console && window.console[type] && window.console[type]('fullPage: ' + text);\r\n }\r\n\r\n /**\r\n * Equivalent of jQuery function $().\r\n */\r\n function $(selector, context){\r\n context = arguments.length > 1 ? context : document;\r\n return context ? context.querySelectorAll(selector) : null;\r\n }\r\n\r\n /**\r\n * Extends a given Object properties and its childs.\r\n */\r\n function deepExtend(out) {\r\n out = out || {};\r\n for (var i = 1, len = arguments.length; i < len; ++i){\r\n var obj = arguments[i];\r\n\r\n if(!obj){\r\n continue;\r\n }\r\n\r\n for(var key in obj){\r\n if (!obj.hasOwnProperty(key)){\r\n continue;\r\n }\r\n\r\n // based on https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/\r\n if (Object.prototype.toString.call(obj[key]) === '[object Object]'){\r\n out[key] = deepExtend(out[key], obj[key]);\r\n continue;\r\n }\r\n\r\n out[key] = obj[key];\r\n }\r\n }\r\n return out;\r\n }\r\n\r\n /**\r\n * Checks if the passed element contains the passed class.\r\n */\r\n function hasClass(el, className){\r\n if(el == null){\r\n return false;\r\n }\r\n if (el.classList){\r\n return el.classList.contains(className);\r\n }\r\n return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);\r\n }\r\n\r\n /**\r\n * Gets the window height. Crossbrowser.\r\n */\r\n function getWindowHeight(){\r\n return 'innerHeight' in window ? window.innerHeight : document.documentElement.offsetHeight;\r\n }\r\n\r\n /**\r\n * Gets the window width.\r\n */\r\n function getWindowWidth(){\r\n return window.innerWidth;\r\n }\r\n\r\n /**\r\n * Set's the CSS properties for the passed item/s.\r\n * @param {NodeList|HTMLElement} items\r\n * @param {Object} props css properties and values.\r\n */\r\n function css(items, props) {\r\n items = getList(items);\r\n\r\n var key;\r\n for (key in props) {\r\n if (props.hasOwnProperty(key)) {\r\n if (key !== null) {\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n item.style[key] = props[key];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Generic function to get the previous or next element.\r\n */\r\n function until(item, selector, fn){\r\n var sibling = item[fn];\r\n while(sibling && !matches(sibling, selector)){\r\n sibling = sibling[fn];\r\n }\r\n\r\n return sibling;\r\n }\r\n\r\n /**\r\n * Gets the previous element to the passed element that matches the passed selector.\r\n */\r\n function prevUntil(item, selector){\r\n return until(item, selector, 'previousElementSibling');\r\n }\r\n\r\n /**\r\n * Gets the next element to the passed element that matches the passed selector.\r\n */\r\n function nextUntil(item, selector){\r\n return until(item, selector, 'nextElementSibling');\r\n }\r\n\r\n /**\r\n * Gets the previous element to the passed element.\r\n */\r\n function prev(item){\r\n return item.previousElementSibling;\r\n }\r\n\r\n /**\r\n * Gets the next element to the passed element.\r\n */\r\n function next(item){\r\n return item.nextElementSibling;\r\n }\r\n\r\n /**\r\n * Gets the last element from the passed list of elements.\r\n */\r\n function last(item){\r\n return item[item.length-1];\r\n }\r\n\r\n /**\r\n * Gets index from the passed element.\r\n * @param {String} selector is optional.\r\n */\r\n function index(item, selector) {\r\n item = isArrayOrList(item) ? item[0] : item;\r\n var children = selector != null? $(selector, item.parentNode) : item.parentNode.childNodes;\r\n var num = 0;\r\n for (var i=0; iafdas');\r\n * wrapInner(document.querySelector('#pepe'), element);\r\n *\r\n * https://jsfiddle.net/zexxz0tw/6/\r\n *\r\n * https://stackoverflow.com/a/21817590/1081396\r\n */\r\n function wrapInner(parent, wrapper) {\r\n if (typeof wrapper === \"string\"){\r\n wrapper = createElementFromHTML(wrapper);\r\n }\r\n\r\n parent.appendChild(wrapper);\r\n\r\n while(parent.firstChild !== wrapper){\r\n wrapper.appendChild(parent.firstChild);\r\n }\r\n }\r\n\r\n /**\r\n * Usage:\r\n * unwrap(document.querySelector('#pepe'));\r\n * unwrap(element);\r\n *\r\n * https://jsfiddle.net/szjt0hxq/1/\r\n *\r\n */\r\n function unwrap(wrapper) {\r\n var wrapperContent = document.createDocumentFragment();\r\n while (wrapper.firstChild) {\r\n wrapperContent.appendChild(wrapper.firstChild);\r\n }\r\n\r\n wrapper.parentNode.replaceChild(wrapperContent, wrapper);\r\n }\r\n\r\n /**\r\n * http://stackoverflow.com/questions/22100853/dom-pure-javascript-solution-to-jquery-closest-implementation\r\n * Returns the element or `false` if there's none\r\n */\r\n function closest(el, selector) {\r\n if(el && el.nodeType === 1){\r\n if(matches(el, selector)){\r\n return el;\r\n }\r\n return closest(el.parentNode, selector);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Places one element (rel) after another one or group of them (reference).\r\n * @param {HTMLElement} reference\r\n * @param {HTMLElement|NodeList|String} el\r\n * https://jsfiddle.net/9s97hhzv/1/\r\n */\r\n function after(reference, el) {\r\n insertBefore(reference, reference.nextSibling, el);\r\n }\r\n\r\n /**\r\n * Places one element (rel) before another one or group of them (reference).\r\n * @param {HTMLElement} reference\r\n * @param {HTMLElement|NodeList|String} el\r\n * https://jsfiddle.net/9s97hhzv/1/\r\n */\r\n function before(reference, el) {\r\n insertBefore(reference, reference, el);\r\n }\r\n\r\n /**\r\n * Based in https://stackoverflow.com/a/19316024/1081396\r\n * and https://stackoverflow.com/a/4793630/1081396\r\n */\r\n function insertBefore(reference, beforeElement, el){\r\n if(!isArrayOrList(el)){\r\n if(typeof el == 'string'){\r\n el = createElementFromHTML(el);\r\n }\r\n el = [el];\r\n }\r\n\r\n for(var i = 0; i - Vue-fullpage - fullPage.js + Angular-fullpage - fullPage.js diff --git a/examples/background-video.html b/examples/background-video.html index fa58570d6..8937d7f5b 100644 --- a/examples/background-video.html +++ b/examples/background-video.html @@ -36,7 +36,6 @@ right: 0; bottom: 0; top:0; - right:0; width: 100%; height: 100%; background-size: 100% 100%; @@ -172,4 +171,4 @@

            fullPage.js videos

            - \ No newline at end of file + diff --git a/examples/module_loaders/webpack-example/.babelrc b/examples/module_loaders/webpack-example/.babelrc new file mode 100644 index 000000000..2647d1a32 --- /dev/null +++ b/examples/module_loaders/webpack-example/.babelrc @@ -0,0 +1,7 @@ +{ + "presets": [ + [ + "env", {} + ] + ] +} \ No newline at end of file diff --git a/examples/module_loaders/webpack-example/dist/main.js b/examples/module_loaders/webpack-example/dist/main.js index ad0cefc42..5dbdc9c4f 100644 --- a/examples/module_loaders/webpack-example/dist/main.js +++ b/examples/module_loaders/webpack-example/dist/main.js @@ -1,6 +1,6 @@ !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){var o; /*! - * fullPage 3.0.2 + * fullPage 3.0.8 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only @@ -10,7 +10,7 @@ * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo */ /*! - * fullPage 3.0.2 + * fullPage 3.0.8 * https://github.com/alvarotrigo/fullPage.js * * @license GPLv3 for open source use only @@ -19,5 +19,5 @@ * * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo */ -!function(r,i,l,a,c){void 0===(o=function(){return r.fullpage=a(i,l),r.fullpage}.call(t,n,t,e))||(e.exports=o)}(this,window,document,function(e,t){"use strict";var n="fullpage-wrapper",o="."+n,r="fp-responsive",i="fp-notransition",l="fp-destroyed",a="fp-enabled",c="fp-viewing",s="active",u="."+s,f="fp-completely",d="."+f,v=".section",p="fp-section",h="."+p,g=h+u,m="fp-tableCell",b="."+m,S="fp-auto-height",y="fp-normal-scroll",w="fp-nav",E="#"+w,L="fp-tooltip",x="."+L,T="fp-show-active",A=".slide",k="fp-slide",M="."+k,O=M+u,C="fp-slides",H="."+C,I="fp-slidesContainer",R="."+I,B="fp-table",j="fp-slidesNav",z="."+j,N=z+" a",P=".fp-controlArrow",D="fp-prev",V="fp-controlArrow "+D,_=P+("."+D),Y="fp-controlArrow fp-next",F=P+".fp-next";function U(t,n){e.console&&e.console[t]&&e.console[t]("fullPage: "+n)}function W(e,n){return(n=arguments.length>1?n:t)?n.querySelectorAll(e):null}function X(e){e=e||{};for(var t=1;t-1;if(!K(W("html"),a)){var ue=W("html, body"),ge=W("body")[0],Ae={};oe=X({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,hybrid:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,continuousHorizontal:!1,scrollHorizontally:!1,interlockedSlides:!1,dragAndMove:!1,offsetSections:!1,resetSliders:!1,fadingEffect:!1,normalScrollElements:null,scrollOverflow:!1,scrollOverflowReset:!1,scrollOverflowHandler:e.fp_scrolloverflow?e.fp_scrolloverflow.iscrollHandler:null,scrollOverflowOptions:null,touchSensitivity:5,normalScrollElementTouchThreshold:5,bigSectionsDestination:null,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,responsiveSlides:!1,parallax:!1,parallaxOptions:{type:"reveal",percentage:62,property:"translate"},sectionSelector:v,slideSelector:A,v2compatible:!1,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null,afterResponsive:null,lazyLoading:!0},oe);var Oe,Ce,He,Ie,Re=!1,Be=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),je="ontouchstart"in e||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,ze="string"==typeof G?W(G)[0]:G,Ne=q(),Pe=!1,De=!0,Ve=!0,_e=[],Ye={m:{up:!0,down:!0,left:!0,right:!0}};Ye.k=X({},Ye.m);var Fe,Ue,We,Xe,Ke,qe,Qe,Ge,$e=e.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"},Je={touchmove:"ontouchmove"in e?"touchmove":$e.move,touchstart:"ontouchstart"in e?"touchstart":$e.down},Ze='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]',et=X({},oe);Dn(),e.fp_easings=X(e.fp_easings,{easeInOutCubic:function(e,t,n,o){return(e/=o/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t}}),ze&&(Ae.version="3.0.2",Ae.setAutoScrolling=ft,Ae.setRecordHistory=dt,Ae.setScrollingSpeed=vt,Ae.setFitToSection=pt,Ae.setLockAnchors=function(e){oe.lockAnchors=e},Ae.setMouseWheelScrolling=ht,Ae.setAllowScrolling=gt,Ae.setKeyboardScrolling=mt,Ae.moveSectionUp=bt,Ae.moveSectionDown=St,Ae.silentMoveTo=yt,Ae.moveTo=wt,Ae.moveSlideRight=Et,Ae.moveSlideLeft=Lt,Ae.fitToSection=Rt,Ae.reBuild=xt,Ae.setResponsive=Tt,Ae.getFullpageData=oe,Ae.destroy=function(n){ft(!1,"internal"),gt(!1),mt(!1),ae(ze,l),clearTimeout(Xe),clearTimeout(We),clearTimeout(Ue),clearTimeout(Ke),clearTimeout(qe),e.removeEventListener("scroll",It),e.removeEventListener("hashchange",nn),e.removeEventListener("resize",mn),t.removeEventListener("keydown",rn),t.removeEventListener("keyup",an);var o=[dn,ln,un,vn];["click","touchstart"].forEach(function(e){o.forEach(function(n){t.removeEventListener(e,n)})}),["mouseenter","touchstart","mouseleave","touchend"].forEach(function(e){t.removeEventListener(e,kt,!0)}),clearTimeout(Xe),clearTimeout(We),n&&(jn(0),W("img[data-src], source[data-src], audio[data-src], iframe[data-src]",ze).forEach(function(e){Qt(e,"src")}),W("img[data-srcset]").forEach(function(e){Qt(e,"srcset")}),Te(W(E+", "+z+", "+P)),Q(W(h),{height:"","background-color":"",padding:""}),Q(W(M),{width:""}),Q(ze,{height:"",position:"","-ms-touch-action":"","touch-action":""}),Q(ue,{overflow:"",height:""}),ce(W("html"),a),ce(ge,r),ge.className.split(/\s+/).forEach(function(e){0===e.indexOf(c)&&ce(ge,e)}),W(h+", "+M).forEach(function(e){oe.scrollOverflowHandler&&oe.scrollOverflowHandler.remove(e),ce(e,B+" "+s+" "+f);var t=e.getAttribute("data-fp-styles");t&&e.setAttribute("style",e.getAttribute("data-fp-styles"))}),yn(ze),[b,R,H].forEach(function(e){W(e,ze).forEach(function(e){e.outerHTML=e.innerHTML})}),Q(ze,{"-webkit-transition":"none",transition:"none"}),W("html")[0].scrollTo(0,0),W("body")[0].scrollTo(0,0),[p,k,I].forEach(function(e){ce(W("."+e),e)}))},Ae.getActiveSection=function(){return new Fn(W(g)[0])},Ae.getActiveSlide=function(){return Xt(W(O,W(g)[0])[0])},Ae.test={top:"0px",translate3d:"translate3d(0px, 0px, 0px)",translate3dH:function(){for(var e=[],t=0;t0&&"none"!==n}()),oe.scrollBar=oe.scrollBar||oe.hybrid,function(){if(!oe.anchors.length){var e="[data-anchor]",t=W(oe.sectionSelector.split(",").join(e+",")+e,ze);t.length&&t.forEach(function(e){oe.anchors.push(e.getAttribute("data-anchor").toString())})}if(!oe.navigationTooltips.length){var e="[data-tooltip]",n=W(oe.sectionSelector.split(",").join(e+",")+e,ze);n.length&&n.forEach(function(e){oe.navigationTooltips.push(e.getAttribute("data-tooltip").toString())})}}(),function(){Q(ze,{height:"100%",position:"relative"}),ae(ze,n),ae(W("html"),a),Ne=q(),ce(ze,l),ae(W(oe.sectionSelector,ze),p),ae(W(oe.slideSelector,ze),k);for(var e=W(h),o=0;o0?Mt(i,c,u):oe.verticalCentered&&Ln(i)}oe.fixedElements&&oe.css3&&W(oe.fixedElements).forEach(function(e){ge.appendChild(e)}),oe.navigation&&function(){var e=t.createElement("div");e.setAttribute("id",w);var n=t.createElement("ul");e.appendChild(n),se(e,ge);var o=W(E)[0];ae(o,"fp-"+oe.navigationPosition),oe.showActiveTooltip&&ae(o,T);for(var r="",i=0;i';var a=oe.navigationTooltips[i];void 0!==a&&""!==a&&(r+='
            '+a+"
            "),r+=""}W("ul",o)[0].innerHTML=r,Q(W(E),{"margin-top":"-"+W(E)[0].offsetHeight/2+"px"}),ae(W("a",W("li",W(E)[0])[ne(W(g)[0],h)]),s)}(),W('iframe[src*="youtube.com/embed/"]',ze).forEach(function(e){!function(e,t){var n=e.getAttribute("src");e.setAttribute("src",n+function(e){return/\?/.test(e)?"&":"?"}(n)+t)}(e,"enablejsapi=1")}),oe.scrollOverflow?Fe=oe.scrollOverflowHandler.init(oe):Ht()}(),gt(!0),ft(oe.autoScrolling,"internal"),bn(),In(),"complete"===t.readyState&&tn(),e.addEventListener("load",tn),e.addEventListener("scroll",It),e.addEventListener("hashchange",nn),e.addEventListener("blur",fn),e.addEventListener("resize",mn),t.addEventListener("keydown",rn),t.addEventListener("keyup",an),["click","touchstart"].forEach(function(e){t.addEventListener(e,function(e){var t=e.target;t&&ve(t,E+" a")?dn.call(t,e):Ee(t,x)?ln.call(t):Ee(t,P)?un.call(t,e):(Ee(t,N)||null!=ve(t,N))&&vn.call(t,e)})}),oe.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){At(e,!1)}),["mouseleave","touchend"].forEach(function(e){At(e,!0)})));var tt=!1,nt=0,ot=0,rt=0,it=0,lt=0,at=(new Date).getTime(),ct=0,st=0,ut=Ne;return Ae}function ft(e,t){e||jn(0),Pn("autoScrolling",e,t);var n=W(g)[0];if(oe.autoScrolling&&!oe.scrollBar)Q(ue,{overflow:"hidden",height:"100%"}),dt(et.recordHistory,"internal"),Q(ze,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&jn(n.offsetTop);else if(Q(ue,{overflow:"visible",height:"initial"}),dt(!1,"internal"),Q(ze,{"-ms-touch-action":"","touch-action":""}),null!=n){var o=Kt(n.offsetTop);o.element.scrollTo(0,o.options)}}function dt(e,t){Pn("recordHistory",e,t)}function vt(e,t){Pn("scrollingSpeed",e,t)}function pt(e,t){Pn("fitToSection",e,t)}function ht(n){n?(function(){var n,o="";e.addEventListener?n="addEventListener":(n="attachEvent",o="on");var r="onwheel"in t.createElement("div")?"wheel":void 0!==t.onmousewheel?"mousewheel":"DOMMouseScroll";"DOMMouseScroll"==r?t[n](o+"MozMousePixelScroll",Vt,!1):t[n](o+r,Vt,!1)}(),ze.addEventListener("mousedown",cn),ze.addEventListener("mouseup",sn)):(t.addEventListener?(t.removeEventListener("mousewheel",Vt,!1),t.removeEventListener("wheel",Vt,!1),t.removeEventListener("MozMousePixelScroll",Vt,!1)):t.detachEvent("onmousewheel",Vt),ze.removeEventListener("mousedown",cn),ze.removeEventListener("mouseup",sn))}function gt(e,t){void 0!==t?(t=t.replace(/ /g,"").split(",")).forEach(function(t){Nn(e,t,"m")}):(Nn(e,"all","m"),e?(ht(!0),(Be||je)&&(oe.autoScrolling&&(ge.removeEventListener(Je.touchmove,jt,{passive:!1}),ge.addEventListener(Je.touchmove,jt,{passive:!1})),W(o)[0].removeEventListener(Je.touchstart,Pt),W(o)[0].removeEventListener(Je.touchmove,zt,{passive:!1}),W(o)[0].addEventListener(Je.touchstart,Pt),W(o)[0].addEventListener(Je.touchmove,zt,{passive:!1}))):(ht(!1),(Be||je)&&(oe.autoScrolling&&(ge.removeEventListener(Je.touchmove,zt,{passive:!1}),ge.removeEventListener(Je.touchmove,jt,{passive:!1})),W(o)[0].removeEventListener(Je.touchstart,Pt),W(o)[0].removeEventListener(Je.touchmove,zt,{passive:!1}))))}function mt(e,t){void 0!==t?(t=t.replace(/ /g,"").split(",")).forEach(function(t){Nn(e,t,"k")}):(Nn(e,"all","k"),oe.keyboardScrolling=e)}function bt(){var e=$(W(g)[0],h);e||!oe.loopTop&&!oe.continuousVertical||(e=te(W(h))),null!=e&&Ft(e,null,!0)}function St(){var e=J(W(g)[0],h);e||!oe.loopBottom&&!oe.continuousVertical||(e=W(h)[0]),null!=e&&Ft(e,null,!1)}function yt(e,t){vt(0,"internal"),wt(e,t),vt(et.scrollingSpeed,"internal")}function wt(e,t){var n=An(e);void 0!==t?kn(e,t):null!=n&&Ft(n)}function Et(e){_t("right",e)}function Lt(e){_t("left",e)}function xt(t){if(!K(ze,l)){Pe=!0,Ne=q();for(var n=W(h),o=0;o1&&hn(i,W(O,i)[0])}oe.scrollOverflow&&Fe.createScrollBarForAll();var c=ne(W(g)[0],h);c&&yt(c+1),Pe=!1,ye(oe.afterResize)&&t&&oe.afterResize.call(ze,e.innerWidth,e.innerHeight),ye(oe.afterReBuild)&&!t&&oe.afterReBuild.call(ze)}}function Tt(e){var t=K(ge,r);e?t||(ft(!1,"internal"),pt(!1,"internal"),re(W(E)),ae(ge,r),ye(oe.afterResponsive)&&oe.afterResponsive.call(ze,e)):t&&(ft(et.autoScrolling,"internal"),pt(et.autoScrolling,"internal"),ie(W(E)),ce(ge,r),ye(oe.afterResponsive)&&oe.afterResponsive.call(ze,e))}function At(e,n){t["fp_"+e]=n,t.addEventListener(e,kt,!0)}function kt(e){e.target!=t&&oe.normalScrollElements.split(",").forEach(function(n){Ee(e.target,n)&>(t["fp_"+e.type])})}function Mt(e,n,o){var r=100*o,i=100/o,l=t.createElement("div");l.className=C,fe(n,l);var a=t.createElement("div");a.className=I,fe(n,a),Q(W(R,e),{width:r+"%"}),o>1&&(oe.controlArrows&&function(e){var t=[xe('
            '),xe('
            ')];pe(W(H,e)[0],t),"#fff"!==oe.controlArrowColor&&(Q(W(F,e),{"border-color":"transparent transparent transparent "+oe.controlArrowColor}),Q(W(_,e),{"border-color":"transparent "+oe.controlArrowColor+" transparent transparent"})),oe.loopHorizontal||re(W(_,e))}(e),oe.slidesNavigation&&function(e,t){se(xe('
              '),e);var n=W(z,e)[0];ae(n,"fp-"+oe.slidesNavPosition);for(var o=0;o'),W("ul",n)[0]);Q(n,{"margin-left":"-"+n.innerWidth/2+"px"}),ae(W("a",W("li",n)[0]),s)}(e,o)),n.forEach(function(e){Q(e,{width:i+"%"}),oe.verticalCentered&&Ln(e)});var c=W(O,e)[0];null!=c&&(0!==ne(W(g),h)||0===ne(W(g),h)&&0!==ne(c))?Bn(c,"internal"):ae(n[0],s)}function Ot(e,t){t||null!=W(g)[0]||ae(e,s),Ie=W(g)[0],Q(e,{height:Ne+"px"}),oe.paddingTop&&Q(e,{"padding-top":oe.paddingTop}),oe.paddingBottom&&Q(e,{"padding-bottom":oe.paddingBottom}),void 0!==oe.sectionsColor[t]&&Q(e,{"background-color":oe.sectionsColor[t]}),void 0!==oe.anchors[t]&&e.setAttribute("data-anchor",oe.anchors[t])}function Ct(e,t){void 0!==oe.anchors[t]&&K(e,s)&&wn(oe.anchors[t],t),oe.menu&&oe.css3&&null!=ve(W(oe.menu)[0],o)&&ge.appendChild(W(oe.menu)[0])}function Ht(){var e=W(g)[0];ae(e,f),Gt(e),$t(e),oe.scrollOverflow&&oe.scrollOverflowHandler.afterLoad(),function(){var e=An(on().section);return!e||void 0!==e&&ne(e)===ne(Ie)}()&&ye(oe.afterLoad)&&Ut("afterLoad",{activeSection:null,element:e,direction:null,anchorLink:e.getAttribute("data-anchor"),sectionIndex:ne(e,h)}),ye(oe.afterRender)&&Ut("afterRender")}function It(){var e;if(!oe.autoScrolling||oe.scrollBar){var t=me(),n=function(e){var t=e>nt?"down":"up";return nt=e,ct=e,t}(t),o=0,r=t+q()/2,i=ge.offsetHeight-q()===t,l=W(h);if(i)o=l.length-1;else if(t)for(var a=0;a=me()+q():t<=me()}(n)&&(K(W(g)[0],f)||(ae(W(g)[0],f),ce(be(W(g)[0]),f))),!K(e=l[o],s)){tt=!0;var c,u,d=W(g)[0],v=ne(d,h)+1,p=En(e),m=e.getAttribute("data-anchor"),b=ne(e,h)+1,S=W(O,e)[0],y={activeSection:d,sectionIndex:b-1,anchorLink:m,element:e,leavingSection:v,direction:p};S&&(u=S.getAttribute("data-anchor"),c=ne(S)),Ve&&(ae(e,s),ce(be(e),s),ye(oe.onLeave)&&Ut("onLeave",y),ye(oe.afterLoad)&&Ut("afterLoad",y),Zt(d),Gt(e),$t(e),wn(m,b-1),oe.anchors.length&&(Oe=m),On(c,u,m)),clearTimeout(Ke),Ke=setTimeout(function(){tt=!1},100)}oe.fitToSection&&(clearTimeout(qe),qe=setTimeout(function(){oe.fitToSection&&W(g)[0].offsetHeight<=Ne&&Rt()},oe.fitToSectionDelay))}}function Rt(){Ve&&(Pe=!0,Ft(W(g)[0]),Pe=!1)}function Bt(e){if(Ye.m[e]){var t="down"===e?St:bt;if(oe.scrollOverflow){var n=oe.scrollOverflowHandler.scrollable(W(g)[0]),o="down"===e?"bottom":"top";if(null!=n){if(!oe.scrollOverflowHandler.isScrolled(o,n))return!0;t()}else t()}else t()}}function jt(e){oe.autoScrolling&&Nt(e)&&Se(e)}function zt(t){var n=ve(t.target,h);if(Nt(t)){oe.autoScrolling&&Se(t);var o=Rn(t);it=o.y,lt=o.x,W(H,n).length&&Math.abs(rt-lt)>Math.abs(ot-it)?!Re&&Math.abs(rt-lt)>e.innerWidth/100*oe.touchSensitivity&&(rt>lt?Ye.m.right&&Et(n):Ye.m.left&&Lt(n)):oe.autoScrolling&&Ve&&Math.abs(ot-it)>e.innerHeight/100*oe.touchSensitivity&&(ot>it?Bt("down"):it>ot&&Bt("up"))}}function Nt(e){return void 0===e.pointerType||"mouse"!=e.pointerType}function Pt(e){if(oe.fitToSection&&(Ge=!1),Nt(e)){var t=Rn(e);ot=t.y,rt=t.x}}function Dt(e,t){for(var n=0,o=e.slice(Math.max(e.length-t,1)),r=0;r149&&_e.shift(),_e.push(Math.abs(r)),oe.scrollBar&&Se(t);var c=n-at;return at=n,c>200&&(_e=[]),Ve&&Dt(_e,10)>=Dt(_e,70)&&a&&Bt(i<0?"down":"up"),!1}oe.fitToSection&&(Ge=!1)}function _t(e,t){var n=null==t?W(g)[0]:t,o=W(H,n)[0];if(!(null==o||Re||W(M,o).length<2)){var r=W(O,o)[0],i=null;if(null==(i="left"===e?$(r,M):J(r,M))){if(!oe.loopHorizontal)return;var l=be(r);i="left"===e?l[l.length-1]:l[0]}Re=!Ae.test.isTesting,hn(o,i,e)}}function Yt(){for(var e=W(O),t=0;tct,i=o-Ne+t,l=oe.bigSectionsDestination;return t>Ne?(r||l)&&"bottom"!==l||(o=i):(r||Pe&&null==ee(e))&&(o=i),ct=o,o}(e),yMovement:En(e),anchorLink:e.getAttribute("data-anchor"),sectionIndex:ne(e,h),activeSlide:W(O,e)[0],activeSection:W(g)[0],leavingSection:ne(W(g),h)+1,localIsResizing:Pe};if(!(i.activeSection==e&&!Pe||oe.scrollBar&&me()===i.dtop&&!K(e,S))){if(null!=i.activeSlide&&(o=i.activeSlide.getAttribute("data-anchor"),r=ne(i.activeSlide)),ye(oe.onLeave)&&!i.localIsResizing){var l=i.yMovement;if(void 0!==n&&(l=n?"up":"down"),i.direction=l,!1===Ut("onLeave",i))return}oe.autoScrolling&&oe.continuousVertical&&void 0!==i.isMovementUp&&(!i.isMovementUp&&"up"==i.yMovement||i.isMovementUp&&"down"==i.yMovement)&&(i=function(e){return e.isMovementUp?he(W(g)[0],ke(e.activeSection,h)):pe(W(g)[0],Me(e.activeSection,h).reverse()),jn(W(g)[0].offsetTop),Yt(),e.wrapAroundElements=e.activeSection,e.dtop=e.element.offsetTop,e.yMovement=En(e.element),e.leavingSection=ne(e.activeSection,h)+1,e.sectionIndex=ne(e.element,h),e}(i)),i.localIsResizing||Zt(i.activeSection),oe.scrollOverflow&&oe.scrollOverflowHandler.beforeLeave(),ae(e,s),ce(be(e),s),Gt(e),oe.scrollOverflow&&oe.scrollOverflowHandler.onLeave(),Ve=Ae.test.isTesting,On(r,o,i.anchorLink,i.sectionIndex),function(e){if(oe.css3&&oe.autoScrolling&&!oe.scrollBar){var t="translate3d(0px, -"+Math.round(e.dtop)+"px, 0px)";Tn(t,!0),oe.scrollingSpeed?(clearTimeout(We),We=setTimeout(function(){qt(e)},oe.scrollingSpeed)):qt(e)}else{var n=Kt(e.dtop);Ae.test.top=-e.dtop+"px",Vn(n.element,n.options,oe.scrollingSpeed,function(){oe.scrollBar?setTimeout(function(){qt(e)},30):qt(e)})}}(i),Oe=i.anchorLink,wn(i.anchorLink,i.sectionIndex)}}}function Ut(e,t){var n=function(e,t){var n;return(n=oe.v2compatible?{afterRender:function(){return[ze]},onLeave:function(){return[t.activeSection,t.leavingSection,t.sectionIndex+1,t.direction]},afterLoad:function(){return[t.element,t.anchorLink,t.sectionIndex+1]},afterSlideLoad:function(){return[t.destiny,t.anchorLink,t.sectionIndex+1,t.slideAnchor,t.slideIndex]},onSlideLeave:function(){return[t.prevSlide,t.anchorLink,t.sectionIndex+1,t.prevSlideIndex,t.direction,t.slideIndex]}}:{afterRender:function(){return{section:Wt(W(g)[0]),slide:Xt(W(O,W(g)[0])[0])}},onLeave:function(){return{origin:Wt(t.activeSection),destination:Wt(t.element),direction:t.direction}},afterLoad:function(){return n.onLeave()},afterSlideLoad:function(){return{section:Wt(t.section),origin:Xt(t.prevSlide),destination:Xt(t.destiny),direction:t.direction}},onSlideLeave:function(){return n.afterSlideLoad()}})[e]()}(e,t);if(oe.v2compatible){if(!1===oe[e].apply(n[0],n.slice(1)))return!1}else if(we(ze,e,n),!1===oe[e].apply(n[Object.keys(n)[0]],function(e){return Object.keys(e).map(function(t){return e[t]})}(n)))return!1;return!0}function Wt(e){return e?new Fn(e):null}function Xt(e){return e?new function(e){Yn.call(this,e,M)}(e):null}function Kt(t){var n={};return oe.autoScrolling&&!oe.scrollBar?(n.options=-t,n.element=W(o)[0]):(n.options=t,n.element=e),n}function qt(e){!function(e){null!=e.wrapAroundElements&&(e.isMovementUp?he(W(h)[0],e.wrapAroundElements):pe(W(h)[W(h).length-1],e.wrapAroundElements),jn(W(g)[0].offsetTop),Yt())}(e),ye(oe.afterLoad)&&!e.localIsResizing&&Ut("afterLoad",e),oe.scrollOverflow&&oe.scrollOverflowHandler.afterLoad(),e.localIsResizing||$t(e.element),ae(e.element,f),ce(be(e.element),f),Ve=!0,ye(e.callback)&&e.callback()}function Qt(e,t){e.setAttribute(t,e.getAttribute("data-"+t)),e.removeAttribute("data-"+t)}function Gt(e){oe.lazyLoading&&W("img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]",en(e)).forEach(function(e){if(["src","srcset"].forEach(function(t){var n=e.getAttribute("data-"+t);null!=n&&n&&Qt(e,t)}),Ee(e,"source")){var t=ve(e,"video, audio");t&&t.load()}})}function $t(e){var t=en(e);W("video, audio",t).forEach(function(e){e.hasAttribute("data-autoplay")&&"function"==typeof e.play&&e.play()}),W('iframe[src*="youtube.com/embed/"]',t).forEach(function(e){e.hasAttribute("data-autoplay")&&Jt(e),e.onload=function(){e.hasAttribute("data-autoplay")&&Jt(e)}})}function Jt(e){e.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}function Zt(e){var t=en(e);W("video, audio",t).forEach(function(e){e.hasAttribute("data-keepplaying")||"function"!=typeof e.pause||e.pause()}),W('iframe[src*="youtube.com/embed/"]',t).forEach(function(e){/youtube\.com\/embed\//.test(e.getAttribute("src"))&&!e.hasAttribute("data-keepplaying")&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})}function en(e){var t=W(O,e);return t.length&&(e=t[0]),e}function tn(){var e=on(),t=e.section,n=e.slide;t&&(oe.animateAnchor?kn(t,n):yt(t,n))}function nn(){if(!tt&&!oe.lockAnchors){var e=on(),t=e.section,n=e.slide,o=void 0===Oe,r=void 0===Oe&&void 0===n&&!Re;t&&t.length&&(t&&t!==Oe&&!o||r||!Re&&Ce!=n)&&kn(t,n)}}function on(){var t,n,o=e.location.hash;if(o.length){var r=o.replace("#","").split("/"),i=o.indexOf("#/")>-1;t=i?"/"+r[1]:decodeURIComponent(r[0]);var l=i?r[2]:r[1];l&&l.length&&(n=decodeURIComponent(l))}return{section:t,slide:n}}function rn(e){clearTimeout(Qe);var n=t.activeElement,o=e.keyCode;9===o?function(e){var n=e.shiftKey,o=t.activeElement,r=W(g)[0],i=W(O,r)[0],l=W(Ze+':not([tabindex="-1"])',i||r);function a(e){return Se(e),l[0].focus()}o?null==ve(o,g+","+O)&&(o=a(e)):a(e),(!n&&o==l[l.length-1]||n&&o==l[0])&&Se(e)}(e):Ee(n,"textarea")||Ee(n,"input")||Ee(n,"select")||"true"===n.getAttribute("contentEditable")||""===n.getAttribute("contentEditable")||!oe.keyboardScrolling||!oe.autoScrolling||([40,38,32,33,34].indexOf(o)>-1&&Se(e),He=e.ctrlKey,Qe=setTimeout(function(){!function(e){var t=e.shiftKey;if(Ve||!([37,39].indexOf(e.keyCode)<0))switch(e.keyCode){case 38:case 33:Ye.k.up&&bt();break;case 32:if(t&&Ye.k.up){bt();break}case 40:case 34:Ye.k.down&&St();break;case 36:Ye.k.up&&wt(1);break;case 35:Ye.k.down&&wt(W(h).length);break;case 37:Ye.k.left&&Lt();break;case 39:Ye.k.right&&Et()}}(e)},150))}function ln(){we(Z(this),"click")}function an(e){De&&(He=e.ctrlKey)}function cn(e){2==e.which&&(st=e.pageY,ze.addEventListener("mousemove",pn))}function sn(e){2==e.which&&ze.removeEventListener("mousemove",pn)}function un(){var e=ve(this,h);K(this,D)?Ye.m.left&&Lt(e):Ye.m.right&&Et(e)}function fn(){De=!1,He=!1}function dn(e){Se(e);var t=ne(ve(this,E+" li"));Ft(W(h)[t])}function vn(e){Se(e);var t=W(H,ve(this,h))[0];hn(t,W(M,t)[ne(ve(this,"li"))])}function pn(e){Ve&&(e.pageYst&&Ye.m.down&&St()),st=e.pageY}function hn(e,t,n){var o=ve(e,h),r={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:ne(t),section:o,sectionIndex:ne(o,h),anchorLink:o.getAttribute("data-anchor"),slidesNav:W(z,o)[0],slideAnchor:Hn(t),prevSlide:W(O,o)[0],prevSlideIndex:ne(W(O,o)[0]),localIsResizing:Pe};r.xMovement=function(e,t){return e==t?"none":e>t?"left":"right"}(r.prevSlideIndex,r.slideIndex),r.localIsResizing||(Ve=!1),oe.onSlideLeave&&!r.localIsResizing&&"none"!==r.xMovement&&ye(oe.onSlideLeave)&&!1===Ut("onSlideLeave",r)?Re=!1:(ae(t,s),ce(be(t),s),r.localIsResizing||(Zt(r.prevSlide),Gt(t)),!oe.loopHorizontal&&oe.controlArrows&&(Le(W(_,o),0!==r.slideIndex),Le(W(F,o),null!=ee(t))),K(o,s)&&!r.localIsResizing&&On(r.slideIndex,r.slideAnchor,r.anchorLink,r.sectionIndex),function(e,t,n){var o=t.destinyPos;if(oe.css3){var r="translate3d(-"+Math.round(o.left)+"px, 0px, 0px)";Ae.test.translate3dH[t.sectionIndex]=r,Q(Sn(W(R,e)),zn(r)),Xe=setTimeout(function(){n&&gn(t)},oe.scrollingSpeed)}else Ae.test.left[t.sectionIndex]=Math.round(o.left),Vn(e,Math.round(o.left),oe.scrollingSpeed,function(){n&&gn(t)})}(e,r,!0))}function gn(e){!function(e,t){oe.slidesNavigation&&null!=e&&(ce(W(u,e),s),ae(W("a",W("li",e)[t]),s))}(e.slidesNav,e.slideIndex),e.localIsResizing||(ye(oe.afterSlideLoad)&&Ut("afterSlideLoad",e),Ve=!0,$t(e.destiny)),Re=!1}function mn(){if(bn(),Be){var e=t.activeElement;if(!Ee(e,"textarea")&&!Ee(e,"input")&&!Ee(e,"select")){var n=q();Math.abs(n-ut)>20*Math.max(ut,n)/100&&(xt(!0),ut=n)}}else clearTimeout(Ue),Ue=setTimeout(function(){xt(!0)},350)}function bn(){var t=oe.responsive||oe.responsiveWidth,n=oe.responsiveHeight,o=t&&e.innerWidthn?"up":"down"}function Ln(e){if(!K(e,B)){var n=t.createElement("div");n.className=m,n.style.height=xn(e)+"px",ae(e,B),de(e,n)}}function xn(e){var t=Ne;if(oe.paddingTop||oe.paddingBottom){var n=e;K(n,p)||(n=ve(e,h));var o=parseInt(getComputedStyle(n)["padding-top"])+parseInt(getComputedStyle(n)["padding-bottom"]);t=Ne-o}return t}function Tn(e,t){t?Sn(ze):yn(ze),Q(ze,zn(e)),Ae.test.translate3d=e,setTimeout(function(){ce(ze,i)},10)}function An(e){var t=W(h+'[data-anchor="'+e+'"]',ze)[0];if(!t){var n=void 0!==e?e-1:0;t=W(h)[n]}return t}function kn(e,t){var n=An(e);if(null!=n){var o=function(e,t){var n=W(M+'[data-anchor="'+e+'"]',t)[0];return null==n&&(e=void 0!==e?e:0,n=W(M,t)[e]),n}(t,n);e===Oe||K(n,s)?Mn(o):Ft(n,function(){Mn(o)})}}function Mn(e){null!=e&&hn(ve(e,H),e)}function On(e,t,n,o){var r="";oe.anchors.length&&!oe.lockAnchors&&(e?(null!=n&&(r=n),null==t&&(t=e),Ce=t,Cn(r+"/"+t)):null!=e?(Ce=t,Cn(n)):Cn(n)),In()}function Cn(t){if(oe.recordHistory)location.hash=t;else if(Be||je)e.history.replaceState(void 0,void 0,"#"+t);else{var n=e.location.href.split("#")[0];e.location.replace(n+"#"+t)}}function Hn(e){if(!e)return null;var t=e.getAttribute("data-anchor"),n=ne(e);return null==t&&(t=n),t}function In(){var e=W(g)[0],t=W(O,e)[0],n=Hn(e),o=Hn(t),r=String(n);t&&(r=r+"-"+o),r=r.replace("/","-").replace("#","");var i=new RegExp("\\b\\s?"+c+"-[^\\s]+\\b","g");ge.className=ge.className.replace(i,""),ae(ge,c+"-"+r)}function Rn(e){var t=[];return t.y=void 0!==e.pageY&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,t.x=void 0!==e.pageX&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,je&&Nt(e)&&oe.scrollBar&&void 0!==e.touches&&(t.y=e.touches[0].pageY,t.x=e.touches[0].pageX),t}function Bn(e,t){vt(0,"internal"),void 0!==t&&(Pe=!0),hn(ve(e,H),e),void 0!==t&&(Pe=!1),vt(et.scrollingSpeed,"internal")}function jn(e){var t=Math.round(e);if(oe.css3&&oe.autoScrolling&&!oe.scrollBar)Tn("translate3d(0px, -"+t+"px, 0px)",!1);else if(oe.autoScrolling&&!oe.scrollBar)Q(ze,{top:-t+"px"}),Ae.test.top=-t+"px";else{var n=Kt(t);_n(n.element,n.options)}}function zn(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}}function Nn(e,t,n){"all"!==t?Ye[n][t]=e:Object.keys(Ye[n]).forEach(function(t){Ye[n][t]=e})}function Pn(e,t,n){oe[e]=t,"internal"!==n&&(et[e]=t)}function Dn(){le||(U("error","Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:"),U("error","https://github.com/alvarotrigo/fullPage.js#options.")),K(W("html"),a)?U("error","Fullpage.js can only be initialized once and you are doing it multiple times!"):(oe.continuousVertical&&(oe.loopTop||oe.loopBottom)&&(oe.continuousVertical=!1,U("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),oe.scrollBar&&oe.scrollOverflow&&U("warn","Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox"),!oe.continuousVertical||!oe.scrollBar&&oe.autoScrolling||(oe.continuousVertical=!1,U("warn","Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),oe.scrollOverflow&&null==oe.scrollOverflowHandler&&(oe.scrollOverflow=!1,U("error","The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.")),["fadingEffect","continuousHorizontal","scrollHorizontally","interlockedSlides","resetSliders","responsiveSlides","offsetSections","dragAndMove","scrollOverflowReset","parallax"].forEach(function(e){oe[e]&&U("warn","fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: "+e)}),oe.anchors.forEach(function(e){var t=[].slice.call(W("[name]")).filter(function(t){return t.getAttribute("name")&&t.getAttribute("name").toLowerCase()==e.toLowerCase()}),n=[].slice.call(W("[id]")).filter(function(t){return t.getAttribute("id")&&t.getAttribute("id").toLowerCase()==e.toLowerCase()});(n.length||t.length)&&(U("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE)."),n.length&&U("error",'"'+e+'" is is being used by another element `id` property'),t.length&&U("error",'"'+e+'" is is being used by another element `name` property'))}))}function Vn(t,n,o,r){var i=function(t){return t.self!=e&&K(t,C)?t.scrollLeft:!oe.autoScrolling||oe.scrollBar?me():t.offsetTop}(t),l=n-i,a=0;Ge=!0;var c=function(){if(Ge){var s=n;a+=20,o&&(s=e.fp_easings[oe.easing](a,i,l,o)),_n(t,s),a1?n:t)?n.querySelectorAll(e):null}function $(e){e=e||{};for(var t=1,n=arguments.length;t-1,ve=K("html, body"),we=K("html")[0],Ce=K("body")[0];if(!q(we,a)){var Be={};le=$({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,hybrid:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,continuousHorizontal:!1,scrollHorizontally:!1,interlockedSlides:!1,dragAndMove:!1,offsetSections:!1,resetSliders:!1,fadingEffect:!1,normalScrollElements:null,scrollOverflow:!1,scrollOverflowReset:!1,scrollOverflowHandler:e.fp_scrolloverflow?e.fp_scrolloverflow.iscrollHandler:null,scrollOverflowOptions:null,touchSensitivity:5,touchWrapper:"string"==typeof Z?K(Z)[0]:Z,bigSectionsDestination:null,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,responsiveSlides:!1,parallax:!1,parallaxOptions:{type:"reveal",percentage:62,property:"translate"},cards:!1,cardsOptions:{perspective:100,fadeContent:!0,fadeBackground:!0},sectionSelector:v,slideSelector:O,v2compatible:!1,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null,afterResponsive:null,lazyLoading:!0},le);var Re,je,Ne,Pe,ze=!1,De=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),Ve="ontouchstart"in e||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,_e="string"==typeof Z?K(Z)[0]:Z,Fe=Q(),We=G(),Ye=!1,Ue=!0,Xe=!0,Ke=[],$e={m:{up:!0,down:!0,left:!0,right:!0}};$e.k=$({},$e.m);var qe,Qe,Ge,Je,Ze,et,tt,nt,ot,rt=e.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"},it={touchmove:"ontouchmove"in e?"touchmove":rt.move,touchstart:"ontouchstart"in e?"touchstart":rt.down},lt='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]',at=!1;try{var ct=Object.defineProperty({},"passive",{get:function(){at=!0}});e.addEventListener("testPassive",null,ct),e.removeEventListener("testPassive",null,ct)}catch(e){}var st,ut,ft=$({},le),dt=!1,vt=!0,pt=["parallax","scrollOverflowReset","dragAndMove","offsetSections","fadingEffect","responsiveSlides","continuousHorizontal","interlockedSlides","scrollHorizontally","resetSliders","cards"];ro(),e.fp_easings=$(e.fp_easings,{easeInOutCubic:function(e,t,n,o){return(e/=o/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t}}),_e&&(Be.version="3.0.8",Be.setAutoScrolling=At,Be.setRecordHistory=Tt,Be.setScrollingSpeed=kt,Be.setFitToSection=Ot,Be.setLockAnchors=function(e){le.lockAnchors=e},Be.setMouseWheelScrolling=Mt,Be.setAllowScrolling=Ct,Be.setKeyboardScrolling=It,Be.moveSectionUp=Bt,Be.moveSectionDown=Rt,Be.silentMoveTo=jt,Be.moveTo=Nt,Be.moveSlideRight=Pt,Be.moveSlideLeft=zt,Be.fitToSection=Jt,Be.reBuild=Dt,Be.setResponsive=_t,Be.getFullpageData=function(){return le},Be.destroy=function(n){At(!1,"internal"),Ct(!0),Ht(!1),It(!1),ue(_e,l),[Ze,Je,Qe,et,tt,ot,Ge].forEach(function(e){clearTimeout(e)}),e.removeEventListener("scroll",Gt),e.removeEventListener("hashchange",Ln),e.removeEventListener("resize",jn),t.removeEventListener("keydown",Tn),t.removeEventListener("keyup",kn),["click","touchstart"].forEach(function(e){t.removeEventListener(e,Ft)}),["mouseenter","touchstart","mouseleave","touchend"].forEach(function(e){t.removeEventListener(e,Yt,!0)}),n&&(eo(0),K("img[data-src], source[data-src], audio[data-src], iframe[data-src]",_e).forEach(function(e){hn(e,"src")}),K("img[data-srcset]").forEach(function(e){hn(e,"srcset")}),Me(K(L+", "+z+", "+V)),J(K(h),{height:"","background-color":"",padding:""}),J(K(C),{width:""}),J(_e,{height:"",position:"","-ms-touch-action":"","touch-action":""}),J(ve,{overflow:"",height:""}),fe(we,a),fe(Ce,r),Ce.className.split(/\s+/).forEach(function(e){0===e.indexOf(c)&&fe(Ce,e)}),K(h+", "+C).forEach(function(e){le.scrollOverflowHandler&&le.scrollOverflow&&le.scrollOverflowHandler.remove(e),fe(e,N+" "+s+" "+f);var t=e.getAttribute("data-fp-styles");t&&e.setAttribute("style",e.getAttribute("data-fp-styles")),q(e,p)&&!dt&&e.removeAttribute("data-anchor")}),Dn(_e),[b,j,B].forEach(function(e){K(e,_e).forEach(function(e){ge(e)})}),J(_e,{"-webkit-transition":"none",transition:"none"}),e.scrollTo(0,0),[p,M,R].forEach(function(e){fe(K("."+e),e)}))},Be.getActiveSection=function(){return new co(K(g)[0])},Be.getActiveSlide=function(){return dn(K(H,K(g)[0])[0])},Be.test={top:"0px",translate3d:"translate3d(0px, 0px, 0px)",translate3dH:function(){for(var e=[],t=0;t0&&"none"!==n}()),le.scrollBar=le.scrollBar||le.hybrid,function(){if(!le.anchors.length){var e=K(le.sectionSelector.split(",").join("[data-anchor],")+"[data-anchor]",_e);e.length&&(dt=!0,e.forEach(function(e){le.anchors.push(e.getAttribute("data-anchor").toString())}))}if(!le.navigationTooltips.length){var t=K(le.sectionSelector.split(",").join("[data-tooltip],")+"[data-tooltip]",_e);t.length&&t.forEach(function(e){le.navigationTooltips.push(e.getAttribute("data-tooltip").toString())})}}(),function(){J(_e,{height:"100%",position:"relative"}),ue(_e,n),ue(we,a),Fe=Q(),fe(_e,l),ue(K(le.sectionSelector,_e),p),ue(K(le.slideSelector,_e),M);for(var e=K(h),o=0;o0?Xt(i,c,u):le.verticalCentered&&Fn(i)}le.fixedElements&&le.css3&&K(le.fixedElements).forEach(function(e){Ce.appendChild(e)}),le.navigation&&function(){var e=t.createElement("div");e.setAttribute("id",x);var n=t.createElement("ul");e.appendChild(n),de(e,Ce);var o=K(L)[0];ue(o,"fp-"+le.navigationPosition),le.showActiveTooltip&&ue(o,k);for(var r="",i=0;i'+qt(i,"Section")+"";var a=le.navigationTooltips[i];void 0!==a&&""!==a&&(r+='
              '+a+"
              "),r+=""}K("ul",o)[0].innerHTML=r,J(K(L),{"margin-top":"-"+K(L)[0].offsetHeight/2+"px"});var c=K("li",K(L)[0])[ie(K(g)[0],h)];ue(K("a",c),s)}(),K('iframe[src*="youtube.com/embed/"]',_e).forEach(function(e){var t,n,o;n="enablejsapi=1",o=(t=e).getAttribute("src"),t.setAttribute("src",o+(/\?/.test(o)?"&":"?")+n)}),le.scrollOverflow&&(qe=le.scrollOverflowHandler.init(le))}(),Ct(!0),Ht(!0),At(le.autoScrolling,"internal"),Pn(),Gn(),"complete"===t.readyState&&xn(),e.addEventListener("load",xn),le.scrollOverflow||Qt(),function(){for(var e=1;e<4;e++)ot=setTimeout(Ut,350*e)}(),e.addEventListener("scroll",Gt),e.addEventListener("hashchange",Ln),e.addEventListener("blur",Hn),e.addEventListener("resize",jn),t.addEventListener("keydown",Tn),t.addEventListener("keyup",kn),["click","touchstart"].forEach(function(e){t.addEventListener(e,Ft)}),le.normalScrollElements&&(["mouseenter","touchstart"].forEach(function(e){Wt(e,!1)}),["mouseleave","touchend"].forEach(function(e){Wt(e,!0)})));var ht=!1,gt=0,mt=0,bt=0,St=0,wt=0,yt=(new Date).getTime(),Et=0,xt=0,Lt=Fe;return Be}function At(e,t){e||eo(0),oo("autoScrolling",e,t);var n=K(g)[0];if(le.autoScrolling&&!le.scrollBar)J(ve,{overflow:"hidden",height:"100%"}),Tt(ft.recordHistory,"internal"),J(_e,{"-ms-touch-action":"none","touch-action":"none"}),null!=n&&eo(n.offsetTop);else if(J(ve,{overflow:"visible",height:"initial"}),Tt(!!le.autoScrolling&&ft.recordHistory,"internal"),J(_e,{"-ms-touch-action":"","touch-action":""}),null!=n){var o=vn(n.offsetTop);o.element.scrollTo(0,o.options)}}function Tt(e,t){oo("recordHistory",e,t)}function kt(e,t){oo("scrollingSpeed",e,t)}function Ot(e,t){oo("fitToSection",e,t)}function Mt(n){n?(function(){var n,o="";e.addEventListener?n="addEventListener":(n="attachEvent",o="on");var r="onwheel"in t.createElement("div")?"wheel":void 0!==t.onmousewheel?"mousewheel":"DOMMouseScroll",i=!!at&&{passive:!1};"DOMMouseScroll"==r?t[n](o+"MozMousePixelScroll",ln,i):t[n](o+r,ln,i)}(),_e.addEventListener("mousedown",On),_e.addEventListener("mouseup",Mn)):(t.addEventListener?(t.removeEventListener("mousewheel",ln,!1),t.removeEventListener("wheel",ln,!1),t.removeEventListener("MozMousePixelScroll",ln,!1)):t.detachEvent("onmousewheel",ln),_e.removeEventListener("mousedown",On),_e.removeEventListener("mouseup",Mn))}function Ct(e,t){void 0!==t?(t=t.replace(/ /g,"").split(",")).forEach(function(t){no(e,t,"m")}):no(e,"all","m")}function Ht(e){e?(Mt(!0),function(){if(De||Ve){le.autoScrolling&&(Ce.removeEventListener(it.touchmove,en,{passive:!1}),Ce.addEventListener(it.touchmove,en,{passive:!1}));var e=le.touchWrapper;e.removeEventListener(it.touchstart,on),e.removeEventListener(it.touchmove,tn,{passive:!1}),e.addEventListener(it.touchstart,on),e.addEventListener(it.touchmove,tn,{passive:!1})}}()):(Mt(!1),function(){if(De||Ve){le.autoScrolling&&(Ce.removeEventListener(it.touchmove,tn,{passive:!1}),Ce.removeEventListener(it.touchmove,en,{passive:!1}));var e=le.touchWrapper;e.removeEventListener(it.touchstart,on),e.removeEventListener(it.touchmove,tn,{passive:!1})}}())}function It(e,t){void 0!==t?(t=t.replace(/ /g,"").split(",")).forEach(function(t){no(e,t,"k")}):(no(e,"all","k"),le.keyboardScrolling=e)}function Bt(){var e=ee(K(g)[0],h);e||!le.loopTop&&!le.continuousVertical||(e=re(K(h))),null!=e&&sn(e,null,!0)}function Rt(){var e=te(K(g)[0],h);e||!le.loopBottom&&!le.continuousVertical||(e=K(h)[0]),null!=e&&sn(e,null,!1)}function jt(e,t){kt(0,"internal"),Nt(e,t),kt(ft.scrollingSpeed,"internal")}function Nt(e,t){var n=Un(e);void 0!==t?Xn(e,t):null!=n&&sn(n)}function Pt(e){an("right",e)}function zt(e){an("left",e)}function Dt(t){if(!q(_e,l)){Ye=!0,Fe=Q(),We=G();for(var n=K(h),o=0;o1&&Bn(i,K(H,i)[0])}le.scrollOverflow&&qe.createScrollBarForAll();var c=ie(K(g)[0],h);c&&jt(c+1),Ye=!1,Le(le.afterResize)&&t&&le.afterResize.call(_e,e.innerWidth,e.innerHeight),Le(le.afterReBuild)&&!t&&le.afterReBuild.call(_e)}}function Vt(){return q(Ce,r)}function _t(e){var t=Vt();e?t||(At(!1,"internal"),Ot(!1,"internal"),ae(K(L)),ue(Ce,r),Le(le.afterResponsive)&&le.afterResponsive.call(_e,e),le.scrollOverflow&&qe.createScrollBarForAll()):t&&(At(ft.autoScrolling,"internal"),Ot(ft.autoScrolling,"internal"),ce(K(L)),fe(Ce,r),Le(le.afterResponsive)&&le.afterResponsive.call(_e,e))}function Ft(e){var t=e.target;t&&me(t,L+" a")?function(e){xe(e);var t=ie(me(this,L+" li"));sn(K(h)[t])}.call(t,e):Te(t,T)?function(){Ae(ne(this),"click")}.call(t):Te(t,V)?function(){var e=me(this,h);q(this,_)?$e.m.left&&zt(e):$e.m.right&&Pt(e)}.call(t,e):Te(t,D)||null!=me(t,D)?function(e){xe(e);var t=K(B,me(this,h))[0],n=K(C,t)[ie(me(this,"li"))];Bn(t,n)}.call(t,e):me(t,le.menu+" [data-menuanchor]")&&function(e){!K(le.menu)[0]||!le.lockAnchors&&le.anchors.length||(xe(e),Nt(this.getAttribute("data-menuanchor")))}.call(t,e)}function Wt(e,n){t["fp_"+e]=n,t.addEventListener(e,Yt,!0)}function Yt(e){var n=e.type,o=!1,r=le.scrollOverflow,i="mouseleave"===n?e.toElement||e.relatedTarget:e.target;if(i==t||!i)return Ht(!0),void(r&&le.scrollOverflowHandler.setIscroll(i,!0));"touchend"===n&&(vt=!1,setTimeout(function(){vt=!0},800)),("mouseenter"!==n||vt)&&(le.normalScrollElements.split(",").forEach(function(e){if(!o){var t=Te(i,e),n=me(i,e);(t||n)&&(Be.shared.isNormalScrollElement||(Ht(!1),r&&le.scrollOverflowHandler.setIscroll(i,!1)),Be.shared.isNormalScrollElement=!0,o=!0)}}),!o&&Be.shared.isNormalScrollElement&&(Ht(!0),r&&le.scrollOverflowHandler.setIscroll(i,!0),Be.shared.isNormalScrollElement=!1))}function Ut(){var e=Q(),t=G();Fe===e&&We===t||(Fe=e,We=t,Dt(!0))}function Xt(e,n,o){var r=100*o,i=100/o,l=t.createElement("div");l.className=I,pe(n,l);var a=t.createElement("div");a.className=R,pe(n,a),J(K(j,e),{width:r+"%"}),o>1&&(le.controlArrows&&function(e){var t=[Oe('
              '),Oe('
              ')];be(K(B,e)[0],t),"#fff"!==le.controlArrowColor&&(J(K(U,e),{"border-color":"transparent transparent transparent "+le.controlArrowColor}),J(K(W,e),{"border-color":"transparent "+le.controlArrowColor+" transparent transparent"})),le.loopHorizontal||ae(K(W,e))}(e),le.slidesNavigation&&function(e,t){de(Oe('
                '),e);var n=K(z,e)[0];ue(n,"fp-"+le.slidesNavPosition);for(var o=0;o'+qt(o,"Slide")+""),K("ul",n)[0]);J(n,{"margin-left":"-"+n.innerWidth/2+"px"}),ue(K("a",K("li",n)[0]),s)}(e,o)),n.forEach(function(e){J(e,{width:i+"%"}),le.verticalCentered&&Fn(e)});var c=K(H,e)[0];null!=c&&(0!==ie(K(g),h)||0===ie(K(g),h)&&0!==ie(c))?Zn(c,"internal"):ue(n[0],s)}function Kt(e,t){t||null!=K(g)[0]||ue(e,s),Pe=K(g)[0],J(e,{height:Fe+"px"}),le.paddingTop&&J(e,{"padding-top":le.paddingTop}),le.paddingBottom&&J(e,{"padding-bottom":le.paddingBottom}),void 0!==le.sectionsColor[t]&&J(e,{"background-color":le.sectionsColor[t]}),void 0!==le.anchors[t]&&e.setAttribute("data-anchor",le.anchors[t])}function $t(e,t){void 0!==le.anchors[t]&&q(e,s)&&Vn(le.anchors[t],t),le.menu&&le.css3&&null!=me(K(le.menu)[0],o)&&K(le.menu).forEach(function(e){Ce.appendChild(e)})}function qt(e,t){return le.navigationTooltips[e]||le.anchors[e]||t+" "+(e+1)}function Qt(){var e,t,n=K(g)[0];ue(n,f),mn(n),gn(),Sn(n),le.scrollOverflow&&le.scrollOverflowHandler.afterLoad(),e=An(),t=Un(e.section),e.section&&t&&(void 0===t||ie(t)!==ie(Pe))||!Le(le.afterLoad)||un("afterLoad",{activeSection:n,element:n,direction:null,anchorLink:n.getAttribute("data-anchor"),sectionIndex:ie(n,h)}),Le(le.afterRender)&&un("afterRender")}function Gt(){var e,t,n,o;if(!le.autoScrolling||le.scrollBar){var r=ye(),i=function(e){var t=e>gt?"down":"up";return gt=e,Et=e,t}(r),l=0,a=r+Q()/2,c=Ce.offsetHeight-Q()===r,u=K(h);if(c)l=u.length-1;else if(r)for(var d=0;d=ye()+Q():n<=ye())&&(q(K(g)[0],f)||(ue(K(g)[0],f),fe(Ee(K(g)[0]),f))),!q(e=u[l],s)){ht=!0;var v,p,m=K(g)[0],b=ie(m,h)+1,S=_n(e),w=e.getAttribute("data-anchor"),y=ie(e,h)+1,E=K(H,e)[0],x={activeSection:m,sectionIndex:y-1,anchorLink:w,element:e,leavingSection:b,direction:S};E&&(p=E.getAttribute("data-anchor"),v=ie(E)),Xe&&(ue(e,s),fe(Ee(e),s),Le(le.onLeave)&&un("onLeave",x),Le(le.afterLoad)&&un("afterLoad",x),yn(m),mn(e),Sn(e),Vn(w,y-1),le.anchors.length&&(Re=w),$n(v,p,w)),clearTimeout(et),et=setTimeout(function(){ht=!1},100)}le.fitToSection&&(clearTimeout(tt),tt=setTimeout(function(){le.fitToSection&&K(g)[0].offsetHeight<=Fe&&Jt()},le.fitToSectionDelay))}}function Jt(){Xe&&(Ye=!0,sn(K(g)[0]),Ye=!1)}function Zt(e){if($e.m[e]){var t="down"===e?Rt:Bt;if(le.scrollOverflow){var n=le.scrollOverflowHandler.scrollable(K(g)[0]),o="down"===e?"bottom":"top";if(null!=n){if(!le.scrollOverflowHandler.isScrolled(o,n))return!0;t()}else t()}else t()}}function en(e){le.autoScrolling&&nn(e)&&$e.m.up&&xe(e)}function tn(t){var n=me(t.target,h)||K(g)[0];if(nn(t)){le.autoScrolling&&xe(t);var o=Jn(t);St=o.y,wt=o.x,K(B,n).length&&Math.abs(bt-wt)>Math.abs(mt-St)?!ze&&Math.abs(bt-wt)>G()/100*le.touchSensitivity&&(bt>wt?$e.m.right&&Pt(n):$e.m.left&&zt(n)):le.autoScrolling&&Xe&&Math.abs(mt-St)>e.innerHeight/100*le.touchSensitivity&&(mt>St?Zt("down"):St>mt&&Zt("up"))}}function nn(e){return void 0===e.pointerType||"mouse"!=e.pointerType}function on(e){if(le.fitToSection&&(st=!1),nn(e)){var t=Jn(e);mt=t.y,bt=t.x}}function rn(e,t){for(var n=0,o=e.slice(Math.max(e.length-t,1)),r=0;r149&&Ke.shift(),Ke.push(Math.abs(r)),le.scrollBar&&xe(t);var c=n-yt;return yt=n,c>200&&(Ke=[]),Xe&&rn(Ke,10)>=rn(Ke,70)&&a&&Zt(i<0?"down":"up"),!1}le.fitToSection&&(st=!1)}function an(e,t){var n=null==t?K(g)[0]:t,o=K(B,n)[0];if(!(null==o||ze||K(C,o).length<2)){var r=K(H,o)[0],i=null;if(null==(i="left"===e?ee(r,C):te(r,C))){if(!le.loopHorizontal)return;var l=Ee(r);i="left"===e?l[l.length-1]:l[0]}ze=!Be.test.isTesting,Bn(o,i,e)}}function cn(){for(var e=K(H),t=0;tEt,i=o-Fe+t,l=le.bigSectionsDestination;return t>Fe?(r||l)&&"bottom"!==l||(o=i):(r||Ye&&null==oe(e))&&(o=i),Et=o,o}(e),yMovement:_n(e),anchorLink:e.getAttribute("data-anchor"),sectionIndex:ie(e,h),activeSlide:K(H,e)[0],activeSection:K(g)[0],leavingSection:ie(K(g),h)+1,localIsResizing:Ye};if(!(i.activeSection==e&&!Ye||le.scrollBar&&ye()===i.dtop&&!q(e,S))){if(null!=i.activeSlide&&(o=i.activeSlide.getAttribute("data-anchor"),r=ie(i.activeSlide)),!i.localIsResizing){var l=i.yMovement;if(void 0!==n&&(l=n?"up":"down"),i.direction=l,Le(le.onLeave)&&!1===un("onLeave",i))return}le.autoScrolling&&le.continuousVertical&&void 0!==i.isMovementUp&&(!i.isMovementUp&&"up"==i.yMovement||i.isMovementUp&&"down"==i.yMovement)&&(i=function(e){return e.isMovementUp?Se(K(g)[0],He(e.activeSection,h)):be(K(g)[0],Ie(e.activeSection,h).reverse()),eo(K(g)[0].offsetTop),cn(),e.wrapAroundElements=e.activeSection,e.dtop=e.element.offsetTop,e.yMovement=_n(e.element),e}(i)),i.localIsResizing||yn(i.activeSection),le.scrollOverflow&&le.scrollOverflowHandler.beforeLeave(),ue(e,s),fe(Ee(e),s),mn(e),le.scrollOverflow&&le.scrollOverflowHandler.onLeave(),Xe=Be.test.isTesting,$n(r,o,i.anchorLink,i.sectionIndex),function(e){if(le.css3&&le.autoScrolling&&!le.scrollBar){var t="translate3d(0px, -"+Math.round(e.dtop)+"px, 0px)";Yn(t,!0),le.scrollingSpeed?(clearTimeout(Je),Je=setTimeout(function(){pn(e)},le.scrollingSpeed)):pn(e)}else{var n=vn(e.dtop);Be.test.top=-e.dtop+"px",io(n.element,n.options,le.scrollingSpeed,function(){le.scrollBar?setTimeout(function(){pn(e)},30):pn(e)})}}(i),Re=i.anchorLink,Vn(i.anchorLink,i.sectionIndex)}}}function un(e,t){var n,o=function(e,t){var n;return(n=le.v2compatible?{afterRender:function(){return[_e]},onLeave:function(){return[t.activeSection,t.leavingSection,t.sectionIndex+1,t.direction]},afterLoad:function(){return[t.element,t.anchorLink,t.sectionIndex+1]},afterSlideLoad:function(){return[t.destiny,t.anchorLink,t.sectionIndex+1,t.slideAnchor,t.slideIndex]},onSlideLeave:function(){return[t.prevSlide,t.anchorLink,t.sectionIndex+1,t.prevSlideIndex,t.direction,t.slideIndex]}}:{afterRender:function(){return{section:fn(K(g)[0]),slide:dn(K(H,K(g)[0])[0])}},onLeave:function(){return{origin:fn(t.activeSection),destination:fn(t.element),direction:t.direction}},afterLoad:function(){return n.onLeave()},afterSlideLoad:function(){return{section:fn(t.section),origin:dn(t.prevSlide),destination:dn(t.destiny),direction:t.direction}},onSlideLeave:function(){return n.afterSlideLoad()}})[e]()}(e,t);if(le.v2compatible){if(!1===le[e].apply(o[0],o.slice(1)))return!1}else if(Ae(_e,e,o),!1===le[e].apply(o[Object.keys(o)[0]],(n=o,Object.keys(n).map(function(e){return n[e]}))))return!1;return!0}function fn(e){return e?new co(e):null}function dn(e){return e?new so(e):null}function vn(t){var n={};return le.autoScrolling&&!le.scrollBar?(n.options=-t,n.element=K(o)[0]):(n.options=t,n.element=e),n}function pn(e){!function(e){null!=e.wrapAroundElements&&(e.isMovementUp?Se(K(h)[0],e.wrapAroundElements):be(K(h)[K(h).length-1],e.wrapAroundElements),eo(K(g)[0].offsetTop),cn())}(e),Le(le.afterLoad)&&!e.localIsResizing&&un("afterLoad",e),le.scrollOverflow&&le.scrollOverflowHandler.afterLoad(),e.localIsResizing||Sn(e.element),ue(e.element,f),fe(Ee(e.element),f),gn(),Xe=!0,Le(e.callback)&&e.callback()}function hn(e,t){e.setAttribute(t,e.getAttribute("data-"+t)),e.removeAttribute("data-"+t)}function gn(){var e=K(w)[0]||Vt()&&K(y)[0];le.lazyLoading&&e&&K(h+":not("+u+")").forEach(function(e){var t,n,o;t=e.getBoundingClientRect(),n=t.top,o=t.bottom,(n+20||o>2&&o-1;t=i?"/"+r[1]:decodeURIComponent(r[0]);var l=i?r[2]:r[1];l&&l.length&&(n=decodeURIComponent(l))}return{section:t,slide:n}}function Tn(e){clearTimeout(nt);var n=t.activeElement,o=e.keyCode;9===o?function(e){var n=e.shiftKey,o=t.activeElement,r=Cn(En(K(g)[0]));function i(e){return xe(e),r[0]?r[0].focus():null}(function(e){var n=Cn(t),o=n.indexOf(t.activeElement),r=e.shiftKey?o-1:o+1,i=n[r],l=dn(me(i,C)),a=fn(me(i,h));return!l&&!a})(e)||(o?null==me(o,g+","+g+" "+H)&&(o=i(e)):i(e),(!n&&o==r[r.length-1]||n&&o==r[0])&&xe(e))}(e):Te(n,"textarea")||Te(n,"input")||Te(n,"select")||"true"===n.getAttribute("contentEditable")||""===n.getAttribute("contentEditable")||!le.keyboardScrolling||!le.autoScrolling||([40,38,32,33,34].indexOf(o)>-1&&xe(e),Ne=e.ctrlKey,nt=setTimeout(function(){!function(e){var n=e.shiftKey,o=t.activeElement,r=Te(o,"video")||Te(o,"audio");if(Xe||!([37,39].indexOf(e.keyCode)<0))switch(e.keyCode){case 38:case 33:$e.k.up&&Bt();break;case 32:if(n&&$e.k.up&&!r){Bt();break}case 40:case 34:$e.k.down&&(32===e.keyCode&&r||Rt());break;case 36:$e.k.up&&Nt(1);break;case 35:$e.k.down&&Nt(K(h).length);break;case 37:$e.k.left&&zt();break;case 39:$e.k.right&&Pt()}}(e)},150))}function kn(e){Ue&&(Ne=e.ctrlKey)}function On(e){2==e.which&&(xt=e.pageY,_e.addEventListener("mousemove",In))}function Mn(e){2==e.which&&_e.removeEventListener("mousemove",In)}function Cn(e){return[].slice.call(K(lt,e)).filter(function(e){return"-1"!==e.getAttribute("tabindex")&&null!==e.offsetParent})}function Hn(){Ue=!1,Ne=!1}function In(e){le.autoScrolling&&(Xe&&(e.pageYxt&&$e.m.down&&Rt()),xt=e.pageY)}function Bn(e,t,n){var o,r,i=me(e,h),l={slides:e,destiny:t,direction:n,destinyPos:{left:t.offsetLeft},slideIndex:ie(t),section:i,sectionIndex:ie(i,h),anchorLink:i.getAttribute("data-anchor"),slidesNav:K(z,i)[0],slideAnchor:Qn(t),prevSlide:K(H,i)[0],prevSlideIndex:ie(K(H,i)[0]),localIsResizing:Ye};l.xMovement=(o=l.prevSlideIndex,r=l.slideIndex,o==r?"none":o>r?"left":"right"),l.direction=l.direction?l.direction:l.xMovement,l.localIsResizing||(Xe=!1),le.onSlideLeave&&!l.localIsResizing&&"none"!==l.xMovement&&Le(le.onSlideLeave)&&!1===un("onSlideLeave",l)?ze=!1:(ue(t,s),fe(Ee(t),s),l.localIsResizing||(yn(l.prevSlide),mn(t)),!le.loopHorizontal&&le.controlArrows&&(ke(K(W,i),0!==l.slideIndex),ke(K(U,i),null!=oe(t))),q(i,s)&&!l.localIsResizing&&$n(l.slideIndex,l.slideAnchor,l.anchorLink,l.sectionIndex),function(e,t,n){var o=t.destinyPos;if(le.css3){var r="translate3d(-"+Math.round(o.left)+"px, 0px, 0px)";Be.test.translate3dH[t.sectionIndex]=r,J(zn(K(j,e)),to(r)),Ze=setTimeout(function(){n&&Rn(t)},le.scrollingSpeed)}else Be.test.left[t.sectionIndex]=Math.round(o.left),io(e,Math.round(o.left),le.scrollingSpeed,function(){n&&Rn(t)})}(e,l,!0))}function Rn(e){var t,n;t=e.slidesNav,n=e.slideIndex,le.slidesNavigation&&null!=t&&(fe(K(u,t),s),ue(K("a",K("li",t)[n]),s)),e.localIsResizing||(Le(le.afterSlideLoad)&&un("afterSlideLoad",e),Xe=!0,Sn(e.destiny)),ze=!1}function jn(){clearTimeout(Qe),Qe=setTimeout(function(){for(var e=0;e<4;e++)Ge=setTimeout(Nn,200*e)},200)}function Nn(){if(Pn(),De){var e=t.activeElement;if(!Te(e,"textarea")&&!Te(e,"input")&&!Te(e,"select")){var n=Q();Math.abs(n-Lt)>20*Math.max(Lt,n)/100&&(Dt(!0),Lt=n)}}else Ut()}function Pn(){var t=le.responsive||le.responsiveWidth,n=le.responsiveHeight,o=t&&e.innerWidthn?"up":"down"}function Fn(e){if(!q(e,N)){var n=t.createElement("div");n.className=m,n.style.height=Wn(e)+"px",ue(e,N),he(e,n)}}function Wn(e){var t=Fe;if(le.paddingTop||le.paddingBottom){var n=e;q(n,p)||(n=me(e,h));var o=parseInt(getComputedStyle(n)["padding-top"])+parseInt(getComputedStyle(n)["padding-bottom"]);t=Fe-o}return t}function Yn(e,t){t?zn(_e):Dn(_e),J(_e,to(e)),Be.test.translate3d=e,setTimeout(function(){fe(_e,i)},10)}function Un(e){var t=K(h+'[data-anchor="'+e+'"]',_e)[0];if(!t){var n=void 0!==e?e-1:0;t=K(h)[n]}return t}function Xn(e,t){var n=Un(e);if(null!=n){var o=function(e,t){var n=K(C+'[data-anchor="'+e+'"]',t)[0];return null==n&&(e=void 0!==e?e:0,n=K(C,t)[e]),n}(t,n);Qn(n)===Re||q(n,s)?Kn(o):sn(n,function(){Kn(o)})}}function Kn(e){null!=e&&Bn(me(e,B),e)}function $n(e,t,n,o){var r="";le.anchors.length&&!le.lockAnchors&&(e?(null!=n&&(r=n),null==t&&(t=e),je=t,qn(r+"/"+t)):null!=e?(je=t,qn(n)):qn(n)),Gn()}function qn(t){if(le.recordHistory)location.hash=t;else if(De||Ve)e.history.replaceState(void 0,void 0,"#"+t);else{var n=e.location.href.split("#")[0];e.location.replace(n+"#"+t)}}function Qn(e){if(!e)return null;var t=e.getAttribute("data-anchor"),n=ie(e);return null==t&&(t=n),t}function Gn(){var e=K(g)[0],t=K(H,e)[0],n=Qn(e),o=Qn(t),r=String(n);t&&(r=r+"-"+o),r=r.replace("/","-").replace("#","");var i=new RegExp("\\b\\s?"+c+"-[^\\s]+\\b","g");Ce.className=Ce.className.replace(i,""),ue(Ce,c+"-"+r)}function Jn(e){var t=[];return t.y=void 0!==e.pageY&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,t.x=void 0!==e.pageX&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,Ve&&nn(e)&&le.scrollBar&&void 0!==e.touches&&(t.y=e.touches[0].pageY,t.x=e.touches[0].pageX),t}function Zn(e,t){kt(0,"internal"),void 0!==t&&(Ye=!0),Bn(me(e,B),e),void 0!==t&&(Ye=!1),kt(ft.scrollingSpeed,"internal")}function eo(e){var t=Math.round(e);if(le.css3&&le.autoScrolling&&!le.scrollBar)Yn("translate3d(0px, -"+t+"px, 0px)",!1);else if(le.autoScrolling&&!le.scrollBar)J(_e,{top:-t+"px"}),Be.test.top=-t+"px";else{var n=vn(t);lo(n.element,n.options)}}function to(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}}function no(e,t,n){"all"!==t?$e[n][t]=e:Object.keys($e[n]).forEach(function(t){$e[n][t]=e})}function oo(e,t,n){le[e]=t,"internal"!==n&&(ft[e]=t)}function ro(){var e=le.licenseKey,t="font-size: 15px;background:yellow;";se?e&&e.length<20&&(console.warn("%c This website was made using fullPage.js slider. More info on the following website:",t),console.warn("%c https://alvarotrigo.com/fullPage/",t)):(X("error","Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:"),X("error","https://github.com/alvarotrigo/fullPage.js#options.")),q(we,a)?X("error","Fullpage.js can only be initialized once and you are doing it multiple times!"):(le.continuousVertical&&(le.loopTop||le.loopBottom)&&(le.continuousVertical=!1,X("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),!le.scrollOverflow||!le.scrollBar&&le.autoScrolling||X("warn","Options scrollBar:true and autoScrolling:false are mutually exclusive with scrollOverflow:true. Sections with scrollOverflow might not work well in Firefox"),!le.continuousVertical||!le.scrollBar&&le.autoScrolling||(le.continuousVertical=!1,X("warn","Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),le.scrollOverflow&&null==le.scrollOverflowHandler&&(le.scrollOverflow=!1,X("error","The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.")),pt.forEach(function(e){le[e]&&X("warn","fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: "+e)}),le.anchors.forEach(function(e){var t=[].slice.call(K("[name]")).filter(function(t){return t.getAttribute("name")&&t.getAttribute("name").toLowerCase()==e.toLowerCase()}),n=[].slice.call(K("[id]")).filter(function(t){return t.getAttribute("id")&&t.getAttribute("id").toLowerCase()==e.toLowerCase()});if(n.length||t.length){X("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).");var o=n.length?"id":"name";(n.length||t.length)&&X("error",'"'+e+'" is is being used by another element `'+o+"` property")}}))}function io(t,n,o,r){var i=function(t){return t.self!=e&&q(t,I)?t.scrollLeft:!le.autoScrolling||le.scrollBar?ye():t.offsetTop}(t),l=n-i,a=0;st=!0;var c=function(){if(st){var s=n;a+=20,o&&(s=e.fp_easings[le.easing](a,i,l,o)),lo(t,s),a - Vue-fullpage - fullPage.js + React-fullpage - fullPage.js diff --git a/lang/chinese/README.md b/lang/chinese/README.md index 987836bb7..f18da04a8 100644 --- a/lang/chinese/README.md +++ b/lang/chinese/README.md @@ -5,6 +5,7 @@

                English | Español | + Français | Pусский | 中文 | 한국어 @@ -12,16 +13,17 @@

                适用于 Vue , React 和 Angular

                + --- -![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.8-brightgreen.svg) +![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.9-brightgreen.svg) [![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) [![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js)    **|**   *7Kb gziped*   **|**   *Created by [@imac2](https://twitter.com/imac2)* - [示例](http://alvarotrigo.com/fullPage/) | [Codepen](https://codepen.io/alvarotrigo/pen/NxyPPp) -- [Wordpress plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) +- [Wordpress plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) and [WordPress pluging fo Elementor](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) - [Wordpress 的主题](http://alvarotrigo.com/fullPage/utils/wordpress.html) - [fullpage.js 扩展](http://alvarotrigo.com/fullPage/extensions/) - [常见问题](https://github.com/alvarotrigo/fullPage.js/wiki/FAQ---Frequently-Answered-Questions) @@ -433,7 +435,7 @@ new fullpage('#fullpage', { - `normalScrollElements`: (默认 `null` )[示例](https://codepen.io/alvarotrigo/pen/RmVazM) 如果你想在滚动某些元素时避免自动滚动,这是你需要使用的选项。 (地图,滚动 div 等有用)它需要带有 Javascript 选择器的字符来表示这些元素。(例如:`normalScrollElements:'#element1,.element2'` )。 此选项不应该应用于任何 section/slide 元素本身。 -- `bigSectionsDestination`: (默认 `null` )定义如何滚动到超出视图的 section。 默认情况下,如果此section 在目标视图的顶部,fullPage.js 将滚动到顶部,如果此 section 在目标视图的底部,则会滚动到底部。 可选的值是 `top`,`bottom`,`null`。 +- `bigSectionsDestination`: (默认 `null` )[示例](https://codepen.io/alvarotrigo/pen/vYLdMrx) 定义如何滚动到超出视图的 section。 默认情况下,如果此section 在目标视图的顶部,fullPage.js 将滚动到顶部,如果此 section 在目标视图的底部,则会滚动到底部。 可选的值是 `top`,`bottom`,`null`。 - `keyboardScrolling`: (默认为 `true` )定义是否可以使用键盘进行内容滑动。 @@ -956,7 +958,7 @@ new fullpage('#fullpage', { 想要构建 fullpage.js 分发文件? 请参阅 [Build Tasks](https://github.com/alvarotrigo/fullPage.js/wiki/Build-tasks) # 参考资源 -- [Wordpress Plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) +- Wordpress Plugin [for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) and [for Elementor](https://alvarotrigo.com/fullPage/wordpress-plugin-elementor/). - [Wordpress theme](http://alvarotrigo.com/fullPage/utils/wordpress.html) - [Official Vue.js wrapper component](https://github.com/alvarotrigo/vue-fullpage.js) - [Official React.js wrapper component](https://github.com/alvarotrigo/react-fullpage) diff --git a/lang/chinese/parallax-extensionmd.md b/lang/chinese/parallax-extensionmd.md index c4d21a8e8..14ce08350 100644 --- a/lang/chinese/parallax-extensionmd.md +++ b/lang/chinese/parallax-extensionmd.md @@ -61,7 +61,7 @@ | 选项 | 说明 | | ------------- | ------------- | -| **parallax** | (默认为 `false`). [fullPage.js的扩展。](http://alvarotrigo.com/fullPage/extensions/). 定义是否在段落/幻灯片上使用视差背景效果。 | +| **parallax** | (默认为 `false`). [fullPage.js的扩展。](http://alvarotrigo.com/fullPage/extensions/). 定义是否在段落/幻灯片上使用视差背景效果。Possible values are false, true, sections, slides. | | **parallaxOptions:** | (默认: `{ type: 'reveal', percentage: 62, property: 'translate'}`). 当使用选项`parallax:true`时,表示允许配置视差背景效果的参数 | diff --git a/lang/french/README.md b/lang/french/README.md new file mode 100644 index 000000000..8560e70ef --- /dev/null +++ b/lang/french/README.md @@ -0,0 +1,1008 @@ +# fullPage.js +![preview](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/intro.png) +![compatibility](https://raw.github.com/alvarotrigo/fullPage.js/master/examples/imgs/compatible.gif?v=2) + +

                + English | + Español | + Français | + Pусский | + 中文 | + 한국어 | + Français +

                + +

                + Disponible pour Vue, React et Angular. +

                + +--- + +![fullPage.js version](http://img.shields.io/badge/fullPage.js-v3.0.9-brightgreen.svg) +[![License](https://img.shields.io/badge/License-GPL-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) +[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95) +[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/fullpage.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/fullpage.js) +   **|**   *7Kb gziped*   **|**   *Created by [@imac2](https://twitter.com/imac2)* + +- [Demo en ligne](http://alvarotrigo.com/fullPage/) | [Codepen](https://codepen.io/alvarotrigo/pen/NxyPPp) +- [Wordpress plugin for Gutenberg](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) and [WordPress pluging fo Elementor](https://alvarotrigo.com/fullPage/wordpress-plugin-gutenberg/) +- [Thème Wordpress](http://alvarotrigo.com/fullPage/utils/wordpress.html) +- [Extensions fullpage.js](http://alvarotrigo.com/fullPage/extensions/) +- [Questions fréquemment demandées](https://github.com/alvarotrigo/fullPage.js/wiki/FAQ---Frequently-Answered-Questions) + +--- + +Une bibliothèque simple et facile à utiliser pour créer des sites Web qui défile en plein écran (aussi connus sous le nom de sites web d'une seule page ou d'une page). +Elle permet la création de sites Web à défilement en plein écran, ainsi que l'ajout de quelques carousel panoramique à l'intérieur des sections du site. + +- [Introduction](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#introduction) +- [Compatibilité](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#compatibilité) +- [Licence](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#licence) +- [Usage](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#usage) + - [Créer des liens vers des sections ou des diapositives](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/créer-des-liens-vers-des-sections-ou-des-diapositives) + - [Créer des sections plus petites ou plus grandes](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#créer-des-sections-plus-petites-ou-plus-grandes) + - [Classes d'états ajoutées par fullpage.js](https://github.com/alvarotrigo/fullPage.j/tree/master/lang/french/s#classes-détats-ajoutées-par-fullpagejs) + - [Lazy loading](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#lazy-loading) + - [Lecture automatique/pause automatique des médias intégrés](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#lecture-automatiquepause-automatique-des-médias-intégrés) + - [Utiliser des extensions](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#utiliser-des-extensions) +- [Options](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#options) +- [Méthodes](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#méthodes) +- [Callbacks](https://github.com/alvarotrigo/fullPage.j/tree/master/lang/french/#callbacks) +- [Signaler les problèmes](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#signaler-les-problèmes) +- [Contribuer à fullpage.js](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#contribuer-à-fullpagejs) +- [Changelog](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#changelog) +- [Build tasks](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#build-tasks) +- [Ressources](https://github.com/alvarotrigo/fullPage.js#ressources) +- [Qui utilise fullpage.js](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#qui-utilise-fullpagejs) +- [Dons](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#dons) +- [Sponsors](https://github.com/alvarotrigo/fullPage.js/tree/master/lang/french/#sponsors) + +## Introduction +Les suggestions sont les bienvenues, non seulement pour les demandes de fonctionnalités mais aussi pour l'amélioration du style de codage. +Faisons de cette bibliothèque une grande bibliothèque pour rendre la vie des gens plus facile ! + +## Compatibilité +fullPage.js est entièrement fonctionnel sur tous les navigateurs modernes, ainsi que sur certains anciens comme Internet Explorer 9, Opera 12, etc. +Il fonctionne avec les navigateurs supportant CSS3 et avec ceux qui ne l'ont pas, ce qui le rend idéal pour la compatibilité avec les anciens navigateurs. +Il fournit également un support tactile pour les téléphones mobiles, les tablettes et les ordinateurs à écran tactile. + +Remerciements particuliers à [Browserstack](http://www.browserstack.com/) pour son soutien à fullpage.js. + +## Licence + +### Licence commercial +Si vous voulez utiliser fullPage pour développer des sites, thèmes, projets et applications non open-source, la licence commerciale est la licence appropriée. Avec cette option, votre code source reste propriétaire. Ce qui signifie que vous n'aurez pas à changer tout le code source de votre application pour une licence open source. [Achat d'une licence commerciale pleine page](https://alvarotrigo.com/fullPage/pricing/) + +### Licence open-source +Si vous créez une application open source sous une licence compatible avec la [licence GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html), vous pouvez utiliser fullPage sous les termes de la GPLv3. + +**Les commentaires de crédit dans les fichiers JavaScript et CSS doivent être conservés intacts.** (même après la combinaison ou la minification) + +[En savoir plus sur la licence de fullPage](https://alvarotrigo.com/fullPage/pricing/). + +## Usage +Comme vous pouvez le voir dans les fichiers d'exemple, vous devrez inclure : + - Le fichier JavaScript `fullpage.js` (ou sa version minifié `fullpage.min.js`) + - Le fichier css `fullpage.css`. + + **Optionnellement**, lorsque vous utilisez `css3:false`, vous pouvez ajouter le fichier [easings file](https://github.com/alvarotrigo/fullPage.js/tree/master/vendors/easings.min.js) au cas où vous voudriez utiliser d'autres effets d'assouplissement que celui inclus dans la bibliothèque (`easeInOutCubic`). + + #### Installer avec bower ou npm + **En option**, vous pouvez installer fullPage.js avec bower ou npm si vous préférez : + + Terminal : + ```shell + // Avec bower + bower install fullpage.js + + // Avec npm + npm installer fullpage.js + ``` + + #### Y compris les fichiers : + +```html + + + + + + + + + +``` + + +Vous utilisez Webpack, Browserify ou Require.js ? Vérifiez comment utiliser fullPage.js avec les chargeurs de modules . + +### Utilisation facultative du CDN +Si vous préférez utiliser un CDN pour charger les fichiers nécessaires, fullPage.js est dans CDNJS : +https://cdnjs.com/libraries/fullPage.js + +### Structure HTML requise +Commencez votre document HTML avec la déclaration obligatoire[déclaration DOCTYPE HTML](http://www.corelangs.com/html/introduction/doctype.html) sur la 1ère ligne de votre code HTML. Sinon, vous pourriez avoir des problèmes avec la hauteur des sections. Les exemples fournis utilisent HTML 5 doctype ``. + +Chaque section sera définie avec un élément contenant la classe `section`. +La section active par défaut sera la première section, qui sera considérée comme la page d'accueil. + +Les sections doivent être placées dans un emballage (`
                ` dans ce cas). L'emballage ne peut pas être l'élément `body`. + +```html +
                +
                Some section
                +
                Some section
                +
                Some section
                +
                Some section
                +
                +``` + +Si vous voulez définir un point de départ différent de la première section ou de la première diapositive d'une section, ajoutez simplement la classe `active` à la section et à la diapositive que vous voulez charger en premier. + +```html +
                Some section
                +``` + +Afin de créer un curseur paysage dans une section, chaque diapositive sera définie par défaut avec un élément contenant la classe `slide`: + +```html +
                +
                Slide 1
                +
                Slide 2
                +
                Slide 3
                +
                Slide 4
                +
                +``` + +Vous pouvez voir un exemple entièrement fonctionnel de la structure HTML dans le [fichier `simple.html`](https://github.com/alvarotrigo/fullPage.js/blob/master/examples/simple.html). + +### Initialisation + +#### Initialisation avec Vanilla Javascript +Tout ce que vous avez à faire est d'appeler fullPage.js avant de fermer la balise ``. + +```javascript +new fullpage('#fullpage', { + //options here + autoScrolling:true, + scrollHorizontally: true +}); + +//methods +fullpage_api.setAllowScrolling(false); +``` + +#### Initialisation avec jQuery +Vous pouvez utiliser fullpage.js comme plugin jQuery si vous le souhaitez ! + +```javascript +$(document).ready(function() { + $('#fullpage').fullpage({ + //options here + autoScrolling:true, + scrollHorizontally: true + }); + + //methods + $.fn.fullpage.setAllowScrolling(false); +}); +``` + +Les fonctions et méthodes peuvent toujours être appelées de la manière jQuery, comme [dans fullPage.js v2.X](https://github.com/alvarotrigo/fullPage.js/tree/2.9.7). + +#### Exemple de Vanille JS avec toutes les options +Une initialisation plus complexe avec toutes les options définies pourrait ressembler à ceci : + +```javascript + +var myFullpage = new fullpage('#fullpage', { + //Navigation + menu: '#menu', + lockAnchors: false, + anchors:['firstPage', 'secondPage'], + navigation: false, + navigationPosition: 'right', + navigationTooltips: ['firstSlide', 'secondSlide'], + showActiveTooltip: false, + slidesNavigation: false, + slidesNavPosition: 'bottom', + + //Défilement + css3: true, + scrollingSpeed: 700, + autoScrolling: true, + fitToSection: true, + fitToSectionDelay: 1000, + scrollBar: false, + easing: 'easeInOutCubic', + easingcss3: 'ease', + loopBottom: false, + loopTop: false, + loopHorizontal: true, + continuousVertical: false, + continuousHorizontal: false, + scrollHorizontally: false, + interlockedSlides: false, + dragAndMove: false, + offsetSections: false, + resetSliders: false, + fadingEffect: false, + normalScrollElements: '#element1, .element2', + scrollOverflow: false, + scrollOverflowReset: false, + scrollOverflowOptions: null, + touchSensitivity: 15, + bigSectionsDestination: null, + + //Accessibilité + keyboardScrolling: true, + animateAnchor: true, + recordHistory: true, + + //Design + controlArrows: true, + verticalCentered: true, + sectionsColor : ['#ccc', '#fff'], + paddingTop: '3em', + paddingBottom: '10px', + fixedElements: '#header, .footer', + responsiveWidth: 0, + responsiveHeight: 0, + responsiveSlides: false, + parallax: false, + parallaxOptions: {type: 'reveal', percentage: 62, property: 'translate'}, + cards: false, + cardsOptions: {perspective: 100, fadeContent: true, fadeBackground: true}, + + //Sélecteurs personnalisés + sectionSelector: '.section', + slideSelector: '.slide', + + lazyLoading: true, + + //événements + onLeave: function(origin, destination, direction){}, + afterLoad: function(origin, destination, direction){}, + afterRender: function(){}, + afterResize: function(width, height){}, + afterReBuild: function(){}, + afterResponsive: function(isResponsive){}, + afterSlideLoad: function(section, origin, destination, direction){}, + onSlideLeave: function(section, origin, destination, direction){} +}); +``` + +### Créer des liens vers des sections ou des diapositives +Si vous utilisez fullPage.js avec des liens d'ancrage pour les sections (en utilisant l'option `anchors` ou l'attribut `data-anchor` dans chaque section), alors vous pourrez également utiliser des liens d'ancrage pour naviguer directement vers une certaine diapositive dans une section. + +Ceci serait un exemple d'un lien avec un ancre : http://alvarotrigo.com/fullPage/#secondPage/2 (qui est l'URL que vous verrez une fois que vous accéderez à cette section/diapositive manuellement) +Remarquez que la dernière partie de l'URL se termine par `#secondPage/2`. + +Avoir l'initialisation suivante : + +```javascript +new fullpage('#fullpage', { + ancres :['firstPage','secondPage','thirdPage'] +}) ; +``` + +L'ancre à la fin de l'URL `#secondPage/2` définit respectivement la section et la diapositive de destination. Dans l'URL précédente, la section de destination sera celle définie avec l'ancre `secondPage` et la diapositive sera la 2ème diapositive, car nous utilisons l'index `2` pour cela. (la première diapositive d'une section a l'index 0, car techniquement c'est une section). + +Nous aurions pu utiliser une ancre personnalisée pour la diapositive au lieu de son index si nous avions utilisé l'attribut `data-anchor` sur le balisage HTML de cette façon : + +```html +
                +
                Slide 1
                Slide 1 +
                Slide 2
                +
                slide 3
                +
                Slide 4
                +
                +``` +Dans ce dernier cas, l'URL que nous utiliserions serait `#secondPage/slide3`, qui est l'équivalent de notre précédente `#secondPage/2`. + +Notez que les ancres de section peuvent aussi être définies de la même manière, en utilisant l'attribut `data-anchor`, si aucun tableau `anchors` n'est fourni. + +**Attention!**, les balises `data-anchor` ne peuvent pas avoir la même valeur que n'importe quel élément ID sur le site (ou élément NAME pour IE). + +### Créer des sections plus petites ou plus grandes +[Démo](http://codepen.io/alvarotrigo/pen/BKjRYm) fullPage.js fournit un moyen de supprimer la restriction de hauteur complète de ses sections et diapositives. Il est possible de créer des sections dont la hauteur est plus petite ou plus grande que la fenêtre. C'est idéal pour les pieds de page. +Il est important de réaliser qu'il n'est pas logique d'avoir toutes vos sections utilisant cette fonctionnalité. S'il y a plus d'une section dans le chargement initial du site, fullPage.js ne défilera pas du tout pour voir la section suivante comme elle sera déjà dans la fenêtre. + +Pour créer des sections plus petites, utilisez simplement la classe `fp-auto-height` dans la section que vous voulez appliquer. Il prendra alors la hauteur définie par le contenu de votre section/diapositive. + + + +```html +
                Vue d'ensemble
                +
                Auto height
                +``` + +##### Sections de hauteur automatique réactives +Une hauteur automatique réactive peut être appliquée en utilisant la classe `fp-auto-haut-responsive`. De cette façon, les sections seront en plein écran jusqu'à ce que le mode réactif soit activé. Ensuite, ils prendront la taille requise par leur contenu, qui peut être plus grand ou plus petit que la fenêtre d'affichage. + +#### Classes d'états ajoutées par fullpage.js +Fullpage.js ajoute plusieurs classes dans différents éléments pour garder une trace de l'état du site : + +- `active` est ajouté la section visible actuelle et la diapositive. +- `active` est ajouté à l'élément de menu courant (si vous utilisez l'option "menu"). +- Une classe de la forme `fp-viewing-SECTION-SLIDE` est ajoutée à l'élément `body` du site. (ex :[`fp-viewing-secondPage-0`](http://alvarotrigo.com/fullPage/#secondPage))) Les parties ` SECTION ` et ` SLIDE ` seront les ancres (ou index si aucune ancre n'est fournie) de la section et de la glissière courante. +- `fp-responsive` est ajouté à l'élément `body` lorsque l'entrée en mode réactif +- `fp-enabled ` est ajouté à l'élément `html` lorsque fullpage.js est activé. (et enlevés lorsqu'ils sont détruits). +- `fp-destroyed` est ajouté au conteneur fullpage.js lorsque fullPage.js est détruit. + +#### Lazy Loading +[Demo](http://codepen.io/alvarotrigo/pen/eNLBXo) fullPage.js fournit un moyen de charger paresseusement des images, des vidéos et des éléments audio pour qu'ils ne ralentissent pas le chargement de votre site ou le transfert de données inutilement gaspillé. +Si vous utilisez un chargement paresseux, tous ces éléments ne seront chargés qu'en entrant dans la fenêtre d'affichage. +Pour activer le lazy loading, il vous suffit de changer votre attribut `src` en `data-src` comme indiqué ci-dessous : + +```html + + + + + + ``` + +Si vous utilisez déjà une autre solution de chargement paresseux qui utilise également `data-src`, vous pouvez désactiver le chargement paresseux de fullPage.js en définissant l'option `lazyLoading : false`. + +### Lecture automatique/pause automatique des médias intégrés + +[Demo](https://codepen.io/alvarotrigo/pen/pXEaaK) **Note** : la fonction de lecture automatique peut ne pas fonctionner sur certains appareils mobiles selon le système d'exploitation et le navigateur (i.e. [Safari on iOS](https://webkit.org/blog/6784/new-video-policies-for-ios/) version < 10.0). + +##### Jouer sur la section/charge de diapositives : +L'utilisation de l'attribut `autoplay` pour les vidéos ou l'audio, ou du paramètre `autoplay=1` pour les iframes youtube entraînera la lecture de l'élément média au chargement de la page. +Pour le lire sur le chargement de sections/diapositives, utilisez à la place l'attribut `data-autoplay`. Par exemple : + +```html + +``` + +##### Pause en congé +Les iframes HTML5 `