/*! * fullpage.js Parallax Effect Extension 0.2.3 for fullPage.js v3 * https://github.com/alvarotrigo/fullPage.js * * @license This code has been bought from www.alvarotrigo.com/fullPage/extensions/ and it is not free to use or distribute. * Copyright (C) 2016 alvarotrigo.com - A project by Alvaro Trigo */ /* eslint-disable */ window.fp_parallaxExtension=function(){var f,c,o,d,i,u,s,l,e,t,a=this,p=window.fp_utils,r=window.fullpage_api,v=p.$,n=r.getFullpageData(),m=n.options,g=n.internals,x=".fullpage-wrapper",h="active",E="."+h,b=".fp-section",S=b+E,y="fp-slide",w="."+y,L=w+E,A="fp-notransition",M="fp-bg",N="."+M,R="reveal",T="cover",C="fp-parallax-stylesheet",I="fp-parallax-transitions",z="#"+I,O="fp-parallax-transition-class",k="#"+O,B=0,H=!1,F=!1,q=!0,W=!0,_=!1,V=!1,G=!1,P=!1,X=!1,Y=!0===m.parallax||"slides"===m.parallax,D=!0===m.parallax||"sections"===m.parallax,U=p.closest,$=p.addClass,j=p.removeClass,J=p.hasClass,K=p.css,Q=p.nextAll,Z=p.prevAll;function ee(e){return{cover:{offsetNormal:e?0:c},reveal:{offsetNormal:e?-c:0}}}function te(e){return{cover:{offsetNormal:e?0:o},reveal:{offsetNormal:e?-o:0}}}function ne(e){return e*d/100}function oe(e){return e*i/100}function ie(){return window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth}function ae(){s&&Ae(v(S).length?v(S)[0]:v(b)[0],0)}function re(){if(D){var e=v(S).length?v(S)[0]:v(b)[0],t=f===R,n=t?Q(e):Z(e),o=t?Z(e):Q(e);n.forEach(function(e){Ae(e,ee(t)[f].offsetNormal,"silent")}),o.forEach(function(e){Ae(e,0,"silent")})}Y&&v(b).forEach(function(e){v(w,e).length&&le(v(L,e).length?v(L,e)[0]:v(w,e)[0])})}function le(e){var t=f===R,n=t?Q(e):Z(e),o=t?Z(e):Q(e);n.forEach(function(e){Me(e,te(t)[f].offsetNormal,"silent")}),o.forEach(function(e){Me(e,0,"silent")})}function se(e){var t=e.detail;i=ie(),t&&!m.scrollBar?(he(),Ee()):be()}function fe(e){a.destroy(),_=!1}function ce(){v(".fp-scrollable").forEach(function(e){var t=v(N,e)[0];(v(".fp-scrollable",e).length||J(e,"fp-scrollable"))&&null!=t&&p.prependTo(e.parentNode,t)})}function de(e){e.detail?be():P=!0}function ue(e){e.detail,v(N).forEach(function(e){e.setAttribute("data-final-x",0),e.setAttribute("data-final-y",0)}),u=v(b),re()}function pe(e){e.detail.leavingSection,e.detail.destination,F=X=!0}function ve(e){var t=e.detail.leavingSection,n=e.detail.destination;Ae(t,ee(H)[f].offsetNormal,"silent");var o=v(w,t);o.length&&o.forEach(function(e){e!==n&&Ae(e,0,"silent")}),a.afterSlideLoads(v(w,t)[0]),X=!1}function me(e){var t=e.detail;V=!0,le("left"===t.xMovement?v(w,v(S)[0])[0]:p.last(v(w,v(S)[0]))),setTimeout(function(){a.applyHorizontal(t)})}function ge(e){var t=e.detail;G=!0,re(),setTimeout(function(){a.apply(t)})}function xe(){_&&(m.scrollBar||!m.autoScrolling||g.usingExtension("dragAndMove"))&&function(){var e=g.usingExtension("dragAndMove")?Math.abs(window.fp_dragAndMoveExtension.getCurrentScroll()):p.getScrollTop(),t=ei+1&&(n=i+1)}var l=(d-(u[n].offsetTop-e))*c/d;f!==R&&(n-=1);var s=f!==R?l:-c+l;-1