jquery.fullPage.js
23.6 KB
!function(e,n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(o){return n(o,e,e.document,e.Math)}):"undefined"!=typeof exports?module.exports=n(require("jquery"),e,e.document,e.Math):n(jQuery,e,e.document,e.Math)}("undefined"!=typeof window?window:this,function(e,n,o,t,i){"use strict";var a="fullpage-wrapper",l="."+a,s="fp-scrollable",r="."+s,c=".slimScrollBar",d=".slimScrollRail",f="fp-responsive",u="fp-notransition",h="fp-destroyed",p="fp-enabled",v="fp-viewing",g="active",m="."+g,S=".section",w="fp-section",y="."+w,x=y+m,T=y+":first",b=y+":last",C="fp-tableCell",k="."+C,A="fp-auto-height",L="fp-nav",B="#"+L,E="fp-tooltip",M="fp-show-active",R=".slide",z="fp-slide",I="."+z,P=I+m,D="fp-slides",F="."+D,H="fp-slidesContainer",O="."+H,V="fp-table",q="fp-slidesNav",U="."+q,Y=U+" a",W="fp-controlArrow",N="."+W,K="fp-prev",X="."+K,j=W+" "+K,Q=N+X,_="fp-next",G="."+_,J=W+" "+_,Z=N+G,$=e(n),ee=e(o);e.fn.fullpage=function(W){function X(){Mn.css({height:"100%",position:"relative"}),Mn.addClass(a),e("html").addClass(p),W.css3&&(W.css3=ln()),W.anchors.length||(W.anchors=e("[data-anchor]").map(function(){return e(this).data("anchor").toString()}).get()),bn.setAllowScrolling(!0),Mn.removeClass(h),oe(),e(y).each(function(n){var o=e(this),t=o.find(I),i=t.length;G(o,n),ne(o,n),i>0?_(o,t,i):W.verticalCentered&&je(o)}),bn.setAutoScrolling(W.autoScrolling,"internal");var t=e(x).find(P);if(t.length&&(0!==e(x).index(y)||0===e(x).index(y)&&0!==t.index())&&hn(t),W.fixedElements&&W.css3&&e(W.fixedElements).appendTo(Tn),W.navigation&&ie(),W.scrollOverflow?("complete"===o.readyState&&ae(),$.on("load",ae)):le(),De(),!W.animateAnchor){var i=n.location.hash.replace("#","").split("/"),l=i[0];if(l.length){var s=e('[data-anchor="'+l+'"]');s.length&&(W.autoScrolling?pn(s.position().top):(pn(0),xn.scrollTop(s.position().top)),Ue(l,null),e.isFunction(W.afterLoad)&&W.afterLoad.call(s,l,s.index(y)+1),s.addClass(g).siblings().removeClass(g))}}an(),$.on("load",function(){Be()})}function _(n,o,t){var i=100*t,a=100/t;o.wrapAll('<div class="'+H+'" />'),o.parent().wrap('<div class="'+D+'" />'),n.find(O).css("width",i+"%"),t>1&&(W.controlArrows&&te(n),W.slidesNavigation&&en(n,t)),o.each(function(n){e(this).css("width",a+"%"),W.verticalCentered&&je(e(this))});var l=n.find(P);l.length?hn(l):o.eq(0).addClass(g)}function G(n,o){o||0!==e(x).length||n.addClass(g),n.css("height",Rn+"px"),W.paddingTop&&n.css("padding-top",W.paddingTop),W.paddingBottom&&n.css("padding-bottom",W.paddingBottom),"undefined"!=typeof W.sectionsColor[o]&&n.css("background-color",W.sectionsColor[o])}function ne(n,o){"undefined"!=typeof W.anchors[o]&&(n.attr("data-anchor",W.anchors[o]),n.hasClass(g)&&Ue(W.anchors[o],o)),W.menu&&W.css3&&e(W.menu).closest(l).length&&e(W.menu).appendTo(Tn)}function oe(){e(W.sectionSelector).each(function(){e(this).addClass(w)}),e(W.slideSelector).each(function(){e(this).addClass(z)})}function te(e){e.find(F).after('<div class="'+j+'"></div><div class="'+J+'"></div>'),"#fff"!=W.controlArrowColor&&(e.find(Z).css("border-color","transparent transparent transparent "+W.controlArrowColor),e.find(Q).css("border-color","transparent "+W.controlArrowColor+" transparent transparent")),W.loopHorizontal||e.find(Q).hide()}function ie(){Tn.append('<div id="'+L+'"><ul></ul></div>');var n=e(B);n.addClass(function(){return W.showActiveTooltip?M+" "+W.navigationPosition:W.navigationPosition});for(var o=0;o<e(y).length;o++){var t="";W.anchors.length&&(t=W.anchors[o]);var i='<li><a href="#'+t+'"><span></span></a>',a=W.navigationTooltips[o];"undefined"!=typeof a&&""!==a&&(i+='<div class="'+E+" "+W.navigationPosition+'">'+a+"</div>"),i+="</li>",n.find("ul").append(i)}e(B).css("margin-top","-"+e(B).height()/2+"px"),e(B).find("li").eq(e(x).index(y)).find("a").addClass(g)}function ae(){e(y).each(function(){var n=e(this).find(I);n.length?n.each(function(){Ke(e(this))}):Ke(e(this))}),le()}function le(){var n=e(x);se(n),ke(n),Ae(n),e.isFunction(W.afterLoad)&&W.afterLoad.call(n,n.data("anchor"),n.index(y)+1),e.isFunction(W.afterRender)&&W.afterRender.call(Mn)}function se(e){var n=e.find("SLIDES_WRAPPER"),o=e.find(r);n.length&&(o=n.find(P)),o.mouseover()}function re(){var n;if(!W.autoScrolling||W.scrollBar){for(var i=$.scrollTop(),a=0,l=t.abs(i-o.querySelectorAll(y)[0].offsetTop),s=o.querySelectorAll(y),r=0;r<s.length;++r){var c=s[r],d=t.abs(i-c.offsetTop);d<l&&(a=r,l=d)}n=e(s).eq(a)}if(!W.autoScrolling||W.scrollBar){if(!n.hasClass(g)){Wn=!0;var f=e(x),u=f.index(y)+1,h=We(n),p=n.data("anchor"),v=n.index(y)+1,m=n.find(P);if(m.length)var S=m.data("anchor"),w=m.index();In&&(n.addClass(g).siblings().removeClass(g),e.isFunction(W.onLeave)&&W.onLeave.call(f,u,v,h),e.isFunction(W.afterLoad)&&W.afterLoad.call(n,p,v),ke(n),Ue(p,v-1),W.anchors.length&&(Cn=p,nn(w,S,p,v))),clearTimeout(Vn),Vn=setTimeout(function(){Wn=!1},100)}W.fitToSection&&(clearTimeout(qn),qn=setTimeout(function(){In&&(e(x).is(n)&&(zn=!0),we(n),zn=!1)},W.fitToSectionDelay))}}function ce(e){return e.find(F).length?e.find(P).find(r):e.find(r)}function de(e,n){if(Dn.m[e]){var o,t;if("down"==e?(o="bottom",t=bn.moveSectionDown):(o="top",t=bn.moveSectionUp),n.length>0){if(!Ye(o,n))return!0;t()}else t()}}function fe(n){var o=n.originalEvent;if(!ue(n.target)&&he(o)){W.autoScrolling&&n.preventDefault();var i=e(x),a=ce(i);if(In&&!Ln){var l=un(o);Xn=l.y,jn=l.x,i.find(F).length&&t.abs(Kn-jn)>t.abs(Nn-Xn)?t.abs(Kn-jn)>$.width()/100*W.touchSensitivity&&(Kn>jn?Dn.m.right&&bn.moveSlideRight():Dn.m.left&&bn.moveSlideLeft()):W.autoScrolling&&t.abs(Nn-Xn)>$.height()/100*W.touchSensitivity&&(Nn>Xn?de("down",a):Xn>Nn&&de("up",a))}}}function ue(n,o){o=o||0;var t=e(n).parent();return!!(o<W.normalScrollElementTouchThreshold&&t.is(W.normalScrollElements))||o!=W.normalScrollElementTouchThreshold&&ue(t,++o)}function he(e){return"undefined"==typeof e.pointerType||"mouse"!=e.pointerType}function pe(e){var n=e.originalEvent;if(W.fitToSection&&xn.stop(),he(n)){var o=un(n);Nn=o.y,Kn=o.x}}function ve(e,n){for(var o=0,i=e.slice(t.max(e.length-n,1)),a=0;a<i.length;a++)o+=i[a];return t.ceil(o/n)}function ge(o){var i=(new Date).getTime();if(W.autoScrolling&&!An){o=o||n.event;var a=o.wheelDelta||-o.deltaY||-o.detail,l=t.max(-1,t.min(1,a));Pn.length>149&&Pn.shift(),Pn.push(t.abs(a)),W.scrollBar&&(o.preventDefault?o.preventDefault():o.returnValue=!1);var s=e(x),r=ce(s),c=i-Qn;if(Qn=i,c>200&&(Pn=[]),In){var d=ve(Pn,10),f=ve(Pn,70),u=d>=f;u&&(l<0?de("down",r):de("up",r))}return!1}W.fitToSection&&xn.stop()}function me(n){var o=e(x),t=o.find(F),i=t.find(I).length;if(!(!t.length||Ln||i<2)){var a=t.find(P),l=null;if(l="prev"===n?a.prev(I):a.next(I),!l.length){if(!W.loopHorizontal)return;l="prev"===n?a.siblings(":last"):a.siblings(":first")}Ln=!0,Ie(t,l)}}function Se(){e(P).each(function(){hn(e(this),"internal")})}function we(n,o,t){var i=n.position();if("undefined"!=typeof i){var a=n.hasClass(A)?i.top-Rn+n.height():i.top,l={element:n,callback:o,isMovementUp:t,dest:i,dtop:a,yMovement:We(n),anchorLink:n.data("anchor"),sectionIndex:n.index(y),activeSlide:n.find(P),activeSection:e(x),leavingSection:e(x).index(y)+1,localIsResizing:zn};if(!(l.activeSection.is(n)&&!zn||W.scrollBar&&$.scrollTop()===l.dtop)){if(l.activeSlide.length)var s=l.activeSlide.data("anchor"),r=l.activeSlide.index();if(W.autoScrolling&&W.continuousVertical&&"undefined"!=typeof l.isMovementUp&&(!l.isMovementUp&&"up"==l.yMovement||l.isMovementUp&&"down"==l.yMovement)&&(l=Te(l)),e.isFunction(W.onLeave)&&!l.localIsResizing){if(W.onLeave.call(l.activeSection,l.leavingSection,l.sectionIndex+1,l.yMovement)===!1)return;Le(l.activeSection)}n.addClass(g).siblings().removeClass(g),In=!1,nn(r,s,l.anchorLink,l.sectionIndex),ye(l),Cn=l.anchorLink,Ue(l.anchorLink,l.sectionIndex)}}}function ye(n){if(W.css3&&W.autoScrolling&&!W.scrollBar){var o="translate3d(0px, -"+n.dtop+"px, 0px)";_e(o,!0),W.scrollingSpeed?Hn=setTimeout(function(){Ce(n)},W.scrollingSpeed):Ce(n)}else{var t=xe(n);e(t.element).animate(t.options,W.scrollingSpeed,W.easing).promise().done(function(){Ce(n)})}}function xe(e){var n={};return W.autoScrolling&&!W.scrollBar?(n.options={top:-e.dtop},n.element=l):(n.options={scrollTop:e.dtop},n.element="html, body"),n}function Te(n){return n.isMovementUp?e(x).before(n.activeSection.nextAll(y)):e(x).after(n.activeSection.prevAll(y).get().reverse()),pn(e(x).position().top),Se(),n.wrapAroundElements=n.activeSection,n.dest=n.element.position(),n.dtop=n.dest.top,n.yMovement=We(n.element),n}function be(n){n.wrapAroundElements&&n.wrapAroundElements.length&&(n.isMovementUp?e(T).before(n.wrapAroundElements):e(b).after(n.wrapAroundElements),pn(e(x).position().top),Se())}function Ce(n){be(n),n.element.find(".fp-scrollable").mouseover(),e.isFunction(W.afterLoad)&&!n.localIsResizing&&W.afterLoad.call(n.element,n.anchorLink,n.sectionIndex+1),ke(n.element),Ae(n.element),In=!0,e.isFunction(n.callback)&&n.callback.call(this)}function ke(n){var o=n.find(P);o.length&&(n=e(o)),n.find("img[data-src], source[data-src], audio[data-src]").each(function(){e(this).attr("src",e(this).data("src")),e(this).removeAttr("data-src"),e(this).is("source")&&e(this).closest("video").get(0).load()})}function Ae(n){n.find("video, audio").each(function(){var n=e(this).get(0);n.hasAttribute("autoplay")&&"function"==typeof n.play&&n.play()})}function Le(n){n.find("video, audio").each(function(){var n=e(this).get(0);n.hasAttribute("data-ignore")||"function"!=typeof n.pause||n.pause()})}function Be(){var e=n.location.hash.replace("#","").split("/"),o=e[0],t=e[1];o&&Ze(o,t)}function Ee(){if(!Wn&&!W.lockAnchors){var e=n.location.hash.replace("#","").split("/"),o=e[0],t=e[1];if(o.length){var i="undefined"==typeof Cn,a="undefined"==typeof Cn&&"undefined"==typeof t&&!Ln;(o&&o!==Cn&&!i||a||!Ln&&kn!=t)&&Ze(o,t)}}}function Me(n){clearTimeout(Un);var o=e(":focus");if(!o.is("textarea")&&!o.is("input")&&!o.is("select")&&W.keyboardScrolling&&W.autoScrolling){var t=n.which,i=[40,38,32,33,34];e.inArray(t,i)>-1&&n.preventDefault(),Un=setTimeout(function(){Re(n)},150)}}function Re(n){var o=n.shiftKey;switch(An=n.ctrlKey,n.which){case 38:case 33:Dn.k.up&&bn.moveSectionUp();break;case 32:if(o&&Dn.k.up){bn.moveSectionUp();break}case 40:case 34:Dn.k.down&&bn.moveSectionDown();break;case 36:Dn.k.up&&bn.moveTo(1);break;case 35:Dn.k.down&&bn.moveTo(e(y).length);break;case 37:Dn.k.left&&bn.moveSlideLeft();break;case 39:Dn.k.right&&bn.moveSlideRight();break;default:return}}function ze(e){In&&(e.pageY<_n?bn.moveSectionUp():e.pageY>_n&&bn.moveSectionDown()),_n=e.pageY}function Ie(n,o){var i=o.position(),a=o.index(),l=n.closest(y),s=l.index(y),r=l.data("anchor"),c=l.find(U),d=tn(o),f=zn;if(W.onSlideLeave){var u=l.find(P),h=u.index(),p=Ne(h,a);if(!f&&"none"!==p&&e.isFunction(W.onSlideLeave)&&W.onSlideLeave.call(u,r,s+1,h,p,a)===!1)return void(Ln=!1)}o.addClass(g).siblings().removeClass(g),ke(o),!W.loopHorizontal&&W.controlArrows&&(l.find(Q).toggle(0!==a),l.find(Z).toggle(!o.is(":last-child"))),l.hasClass(g)&&nn(a,d,r,s);var v=function(){f||e.isFunction(W.afterSlideLoad)&&W.afterSlideLoad.call(o,r,s+1,d,a),Ln=!1};if(W.css3){var S="translate3d(-"+t.round(i.left)+"px, 0px, 0px)";Fe(n.find(O),W.scrollingSpeed>0).css(vn(S)),On=setTimeout(function(){v()},W.scrollingSpeed,W.easing)}else n.animate({scrollLeft:t.round(i.left)},W.scrollingSpeed,W.easing,function(){v()});c.find(m).removeClass(g),c.find("li").eq(a).find("a").addClass(g)}function Pe(){if(De(),Bn){var n=e(o.activeElement);if(!n.is("textarea")&&!n.is("input")&&!n.is("select")){var i=$.height();t.abs(i-Gn)>20*t.max(Gn,i)/100&&(bn.reBuild(!0),Gn=i)}}else clearTimeout(Fn),Fn=setTimeout(function(){bn.reBuild(!0)},350)}function De(){var e=W.responsive||W.responsiveWidth,n=W.responsiveHeight;if(e&&bn.setResponsive($.width()<e),n){var o=Mn.hasClass(f);o||bn.setResponsive($.height()<n)}}function Fe(e){var n="all "+W.scrollingSpeed+"ms "+W.easingcss3;return e.removeClass(u),e.css({"-webkit-transition":n,transition:n})}function He(e){return e.addClass(u)}function Oe(e,n){var o=825,i=900;if(e<o||n<i){var a=100*e/o,l=100*n/i,s=t.min(a,l),r=s.toFixed(2);Tn.css("font-size",r+"%")}else Tn.css("font-size","100%")}function Ve(n,o){W.navigation&&(e(B).find(m).removeClass(g),n?e(B).find('a[href="#'+n+'"]').addClass(g):e(B).find("li").eq(o).find("a").addClass(g))}function qe(n){W.menu&&(e(W.menu).find(m).removeClass(g),e(W.menu).find('[data-menuanchor="'+n+'"]').addClass(g))}function Ue(e,n){qe(e),Ve(e,n)}function Ye(e,n){return"top"===e?!n.scrollTop():"bottom"===e?n.scrollTop()+1+n.innerHeight()>=n[0].scrollHeight:void 0}function We(n){var o=e(x).index(y),t=n.index(y);return o==t?"none":o>t?"up":"down"}function Ne(e,n){return e==n?"none":e>n?"left":"right"}function Ke(e){e.css("overflow","hidden");var n,o=e.closest(y),t=e.find(r);t.length?n=t.get(0).scrollHeight:(n=e.get(0).scrollHeight,W.verticalCentered&&(n=e.find(k).get(0).scrollHeight));var i=Rn-parseInt(o.css("padding-bottom"))-parseInt(o.css("padding-top"));n>i?t.length?t.css("height",i+"px").parent().css("height",i+"px"):(W.verticalCentered?e.find(k).wrapInner('<div class="'+s+'" />'):e.wrapInner('<div class="'+s+'" />'),e.find(r).slimScroll({allowPageScroll:!0,height:i+"px",size:"10px",alwaysVisible:!0})):Xe(e),e.css("overflow","")}function Xe(e){e.find(r).children().first().unwrap().unwrap(),e.find(c).remove(),e.find(d).remove()}function je(e){e.addClass(V).wrapInner('<div class="'+C+'" style="height:'+Qe(e)+'px;" />')}function Qe(e){var n=Rn;if(W.paddingTop||W.paddingBottom){var o=e;o.hasClass(w)||(o=e.closest(y));var t=parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"));n=Rn-t}return n}function _e(e,n){n?Fe(Mn):He(Mn),Mn.css(vn(e)),setTimeout(function(){Mn.removeClass(u)},10)}function Ge(n){var o=e(y+'[data-anchor="'+n+'"]');return o.length||(o=e(y).eq(n-1)),o}function Je(e,n){var o=n.find(F),t=o.find(I+'[data-anchor="'+e+'"]');return t.length||(t=o.find(I).eq(e)),t}function Ze(e,n){var o=Ge(e);"undefined"==typeof n&&(n=0),e===Cn||o.hasClass(g)?$e(o,n):we(o,function(){$e(o,n)})}function $e(e,n){if("undefined"!=typeof n){var o=e.find(F),t=Je(n,e);t.length&&Ie(o,t)}}function en(e,n){e.append('<div class="'+q+'"><ul></ul></div>');var o=e.find(U);o.addClass(W.slidesNavPosition);for(var t=0;t<n;t++)o.find("ul").append('<li><a href="#"><span></span></a></li>');o.css("margin-left","-"+o.width()/2+"px"),o.find("li").first().find("a").addClass(g)}function nn(e,n,o,t){var i="";W.anchors.length&&!W.lockAnchors&&(e?("undefined"!=typeof o&&(i=o),"undefined"==typeof n&&(n=e),kn=n,on(i+"/"+n)):"undefined"!=typeof e?(kn=n,on(o)):on(o)),an()}function on(e){if(W.recordHistory)location.hash=e;else if(Bn||En)history.replaceState(i,i,"#"+e);else{var o=n.location.href.split("#")[0];n.location.replace(o+"#"+e)}}function tn(e){var n=e.data("anchor"),o=e.index();return"undefined"==typeof n&&(n=o),n}function an(){var n=e(x),o=n.find(P),t=n.data("anchor"),i=tn(o),a=n.index(y),l=String(a);W.anchors.length&&(l=t),o.length&&(l=l+"-"+i),l=l.replace("/","-").replace("#","");var s=new RegExp("\\b\\s?"+v+"-[^\\s]+\\b","g");Tn[0].className=Tn[0].className.replace(s,""),Tn.addClass(v+"-"+l)}function ln(){var e,t=o.createElement("p"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};o.body.insertBefore(t,null);for(var l in a)t.style[l]!==i&&(t.style[l]="translate3d(1px,1px,1px)",e=n.getComputedStyle(t).getPropertyValue(a[l]));return o.body.removeChild(t),e!==i&&e.length>0&&"none"!==e}function sn(){o.addEventListener?(o.removeEventListener("mousewheel",ge,!1),o.removeEventListener("wheel",ge,!1),o.removeEventListener("DOMMouseScroll",ge,!1)):o.detachEvent("onmousewheel",ge)}function rn(){o.addEventListener?(o.addEventListener("mousewheel",ge,!1),o.addEventListener("wheel",ge,!1),o.addEventListener("DOMMouseScroll",ge,!1)):o.attachEvent("onmousewheel",ge)}function cn(){if(Bn||En){var n=fn();e(l).off("touchstart "+n.down).on("touchstart "+n.down,pe),e(l).off("touchmove "+n.move).on("touchmove "+n.move,fe)}}function dn(){if(Bn||En){var n=fn();e(l).off("touchstart "+n.down),e(l).off("touchmove "+n.move)}}function fn(){var e;return e=n.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"}}function un(e){var n=[];return n.y="undefined"!=typeof e.pageY&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,n.x="undefined"!=typeof e.pageX&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,En&&he(e)&&W.scrollBar&&(n.y=e.touches[0].pageY,n.x=e.touches[0].pageX),n}function hn(e,n){bn.setScrollingSpeed(0,"internal"),"undefined"!=typeof n&&(zn=!0),Ie(e.closest(F),e),"undefined"!=typeof n&&(zn=!1),bn.setScrollingSpeed(Yn.scrollingSpeed,"internal")}function pn(e){if(W.scrollBar)Mn.scrollTop(e);else if(W.css3){var n="translate3d(0px, -"+e+"px, 0px)";_e(n,!1)}else Mn.css("top",-e)}function vn(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}}function gn(e,n,o){switch(n){case"up":Dn[o].up=e;break;case"down":Dn[o].down=e;break;case"left":Dn[o].left=e;break;case"right":Dn[o].right=e;break;case"all":"m"==o?bn.setAllowScrolling(e):bn.setKeyboardScrolling(e)}}function mn(){pn(0),e(B+", "+U+", "+N).remove(),e(y).css({height:"","background-color":"",padding:""}),e(I).css({width:""}),Mn.css({height:"",position:"","-ms-touch-action":"","touch-action":""}),xn.css({overflow:"",height:""}),e("html").removeClass(p),e.each(Tn.get(0).className.split(/\s+/),function(e,n){0===n.indexOf(v)&&Tn.removeClass(n)}),e(y+", "+I).each(function(){Xe(e(this)),e(this).removeClass(V+" "+g)}),He(Mn),Mn.find(k+", "+O+", "+F).each(function(){e(this).replaceWith(this.childNodes)}),xn.scrollTop(0)}function Sn(e,n,o){W[e]=n,"internal"!==o&&(Yn[e]=n)}function wn(){W.continuousVertical&&(W.loopTop||W.loopBottom)&&(W.continuousVertical=!1,yn("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),W.scrollBar&&W.scrollOverflow&&yn("warn","Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox"),W.continuousVertical&&W.scrollBar&&(W.continuousVertical=!1,yn("warn","Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),e.each(W.anchors,function(n,o){(e("#"+o).length||e('[name="'+o+'"]').length)&&yn("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).")})}function yn(e,n){console&&console[e]&&console[e]("fullPage: "+n)}var xn=e("html, body"),Tn=e("body"),bn=e.fn.fullpage;W=e.extend({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,normalScrollElements:null,scrollOverflow:!1,touchSensitivity:5,normalScrollElementTouchThreshold:5,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,resize:!1,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,sectionSelector:S,slideSelector:R,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null},W),wn(),e.extend(e.easing,{easeInOutCubic:function(e,n,o,t,i){return(n/=i/2)<1?t/2*n*n*n+o:t/2*((n-=2)*n*n+2)+o}}),e.extend(e.easing,{easeInQuart:function(e,n,o,t,i){return t*(n/=i)*n*n*n+o}}),bn.setAutoScrolling=function(n,o){Sn("autoScrolling",n,o);var t=e(x);W.autoScrolling&&!W.scrollBar?(xn.css({overflow:"hidden",height:"100%"}),bn.setRecordHistory(W.recordHistory,"internal"),Mn.css({"-ms-touch-action":"none","touch-action":"none"}),t.length&&pn(t.position().top)):(xn.css({overflow:"visible",height:"initial"}),bn.setRecordHistory(!1,"internal"),Mn.css({"-ms-touch-action":"","touch-action":""}),pn(0),t.length&&xn.scrollTop(t.position().top))},bn.setRecordHistory=function(e,n){Sn("recordHistory",e,n)},bn.setScrollingSpeed=function(e,n){Sn("scrollingSpeed",e,n)},bn.setFitToSection=function(e,n){Sn("fitToSection",e,n)},bn.setLockAnchors=function(e){W.lockAnchors=e},bn.setMouseWheelScrolling=function(e){e?rn():sn()},bn.setAllowScrolling=function(n,o){"undefined"!=typeof o?(o=o.replace(/ /g,"").split(","),e.each(o,function(e,o){gn(n,o,"m")})):n?(bn.setMouseWheelScrolling(!0),cn()):(bn.setMouseWheelScrolling(!1),dn())},bn.setKeyboardScrolling=function(n,o){"undefined"!=typeof o?(o=o.replace(/ /g,"").split(","),e.each(o,function(e,o){gn(n,o,"k")})):W.keyboardScrolling=n},bn.moveSectionUp=function(){var n=e(x).prev(y);n.length||!W.loopTop&&!W.continuousVertical||(n=e(y).last()),n.length&&we(n,null,!0)},bn.moveSectionDown=function(){var n=e(x).next(y);if(n.length||!W.loopBottom&&!W.continuousVertical||(n=e(y).first()),n.length){if(W.onBeforeMoveSection&&e.isFunction(W.onBeforeMoveSection)&&W.onBeforeMoveSection.call(this,direction,currentSlide,destiny,slides,activeSection)===!1)return;we(n,null,!1)}},bn.silentMoveTo=function(e,n){bn.setScrollingSpeed(0,"internal"),bn.moveTo(e,n),bn.setScrollingSpeed(Yn.scrollingSpeed,"internal")},bn.moveTo=function(e,n){var o=Ge(e);"undefined"!=typeof n?Ze(e,n):o.length>0&&we(o)},bn.moveSlideRight=function(){me("next")},bn.moveSlideLeft=function(){me("prev")},bn.reBuild=function(n){if(!Mn.hasClass(h)){zn=!0;var o=$.width();Rn=$.height(),W.resize&&Oe(Rn,o),e(y).each(function(){var n=e(this).find(F),o=e(this).find(I);W.verticalCentered&&e(this).find(k).css("height",Qe(e(this))+"px"),e(this).css("height",Rn+"px"),W.scrollOverflow&&(o.length?o.each(function(){Ke(e(this))}):Ke(e(this))),o.length>1&&Ie(n,n.find(P))});var t=e(x),i=t.index(y);i&&bn.silentMoveTo(i+1),zn=!1,e.isFunction(W.afterResize)&&n&&W.afterResize.call(Mn),e.isFunction(W.afterReBuild)&&!n&&W.afterReBuild.call(Mn)}},bn.setResponsive=function(n){var o=Mn.hasClass(f);n?o||(bn.setAutoScrolling(!1,"internal"),bn.setFitToSection(!1,"internal"),e(B).hide(),Mn.addClass(f)):o&&(bn.setAutoScrolling(Yn.autoScrolling,"internal"),bn.setFitToSection(Yn.autoScrolling,"internal"),e(B).show(),Mn.removeClass(f))};var Cn,kn,An,Ln=!1,Bn=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),En="ontouchstart"in n||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,Mn=e(this),Rn=$.height(),zn=!1,In=!0,Pn=[],Dn={};Dn.m={up:!0,down:!0,left:!0,right:!0},Dn.k=e.extend(!0,{},Dn.m);var Fn,Hn,On,Vn,qn,Un,Yn=e.extend(!0,{},W);e(this).length&&X();var Wn=!1;$.on("scroll",re);var Nn=0,Kn=0,Xn=0,jn=0,Qn=(new Date).getTime();$.on("hashchange",Ee),ee.keydown(Me),ee.keyup(function(e){An=e.ctrlKey}),e(n).blur(function(){An=!1});var Un;Mn.mousedown(function(e){2==e.which&&(_n=e.pageY,Mn.on("mousemove",ze))}),Mn.mouseup(function(e){2==e.which&&Mn.off("mousemove")});var _n=0;ee.on("click touchstart",B+" a",function(n){n.preventDefault();var o=e(this).parent().index();we(e(y).eq(o))}),ee.on("click touchstart",Y,function(n){n.preventDefault();var o=e(this).closest(y).find(F),t=o.find(I).eq(e(this).closest("li").index());Ie(o,t)}),W.normalScrollElements&&(ee.on("mouseenter",W.normalScrollElements,function(){bn.setMouseWheelScrolling(!1)}),ee.on("mouseleave",W.normalScrollElements,function(){bn.setMouseWheelScrolling(!0)})),e(y).on("click touchstart",N,function(){e(this).hasClass(K)?Dn.m.left&&bn.moveSlideLeft():Dn.m.right&&bn.moveSlideRight()}),$.resize(Pe);var Gn=Rn;bn.destroy=function(n){bn.setAutoScrolling(!1,"internal"),bn.setAllowScrolling(!1),bn.setKeyboardScrolling(!1),Mn.addClass(h),clearTimeout(On),clearTimeout(Hn),clearTimeout(Fn),clearTimeout(Vn),clearTimeout(qn),$.off("scroll",re).off("hashchange",Ee).off("resize",Pe),ee.off("click",B+" a").off("mouseenter",B+" li").off("mouseleave",B+" li").off("click",Y).off("mouseover",W.normalScrollElements).off("mouseout",W.normalScrollElements),e(y).off("click",N),clearTimeout(On),clearTimeout(Hn),n&&mn()}}});