/******************************************** * revolution 5.2.6 extension - parallax * @version: 1.5 (23.06.2016) * @requires jquery.themepunch.revolution.js * @author themepunch *********************************************/ !function(e){function r(e,r){e.lastscrolltop=r}var t=jquery.fn.revolution,a=t.is_mobile();jquery.extend(!0,t,{checkforparallax:function(e,r){function o(e){if("3d"==s.type||"3d"==s.type){e.find(".slotholder").wrapall('
'),e.find(".tp-parallax-wrap").wrapall('
'),e.find(".rs-parallaxlevel-tobggroup").closest(".tp-parallax-wrap").wrapall('
');var t=e.find(".dddwrapper"),a=e.find(".dddwrapper-layer"),o=e.find(".dddwrapper-layertobggroup");o.appendto(t),"carousel"==r.slidertype&&("on"==s.ddd_shadow&&t.addclass("dddwrappershadow"),punchgs.tweenlite.set(t,{borderradius:r.carousel.border_radius})),punchgs.tweenlite.set(e,{overflow:"visible",transformstyle:"preserve-3d",perspective:1600}),punchgs.tweenlite.set(t,{force3d:"auto",transformorigin:"50% 50%"}),punchgs.tweenlite.set(a,{force3d:"auto",transformorigin:"50% 50%",zindex:5}),punchgs.tweenlite.set(r.ul,{transformstyle:"preserve-3d",transformperspective:1600})}}var s=r.parallax;if(!s.done){if(s.done=!0,a&&"on"==s.disable_onmobile)return!1;("3d"==s.type||"3d"==s.type)&&(punchgs.tweenlite.set(r.c,{overflow:s.ddd_overflow}),punchgs.tweenlite.set(r.ul,{overflow:s.ddd_overflow}),"carousel"!=r.slidertype&&"on"==s.ddd_shadow&&(r.c.prepend('
'),punchgs.tweenlite.set(r.c.find(".dddwrappershadow"),{force3d:"auto",transformperspective:1600,transformorigin:"50% 50%",width:"100%",height:"100%",position:"absolute",top:0,left:0,zindex:0}))),r.li.each(function(){o(jquery(this))}),("3d"==s.type||"3d"==s.type&&r.c.find(".tp-static-layers").length>0)&&(punchgs.tweenlite.set(r.c.find(".tp-static-layers"),{top:0,left:0,width:"100%",height:"100%"}),o(r.c.find(".tp-static-layers"))),s.pcontainers=new array,s.pcontainer_depths=new array,s.bgcontainers=new array,s.bgcontainer_depths=new array,r.c.find(".tp-revslider-slidesli .slotholder, .tp-revslider-slidesli .rs-background-video-layer").each(function(){var e=jquery(this),t=e.data("bgparallax")||r.parallax.bgparallax;t="on"==t?1:t,void 0!==t&&"off"!==t&&(s.bgcontainers.push(e),s.bgcontainer_depths.push(r.parallax.levels[parseint(t,0)-1]/100))});for(var i=1;i<=s.levels.length;i++)r.c.find(".rs-parallaxlevel-"+i).each(function(){var e=jquery(this),r=e.closest(".tp-parallax-wrap");r.data("parallaxlevel",s.levels[i-1]),r.addclass("tp-parallax-container"),s.pcontainers.push(r),s.pcontainer_depths.push(s.levels[i-1])});("mouse"==s.type||"scroll+mouse"==s.type||"mouse+scroll"==s.type||"3d"==s.type||"3d"==s.type)&&(e.mouseenter(function(r){var t=e.find(".active-revslide"),a=e.offset().top,o=e.offset().left,s=r.pagex-o,i=r.pagey-a;t.data("enterx",s),t.data("entery",i)}),e.on("mousemove.hoverdir, mouseleave.hoverdir, trigger3dpath",function(t,a){var o=a&&a.li?a.li:e.find(".active-revslide");if("enterpoint"==s.origo){var i=e.offset().top,l=e.offset().left;void 0==o.data("enterx")&&o.data("enterx",t.pagex-l),void 0==o.data("entery")&&o.data("entery",t.pagey-i);var n=o.data("enterx")||t.pagex-l,d=o.data("entery")||t.pagey-i,p=n-(t.pagex-l),c=d-(t.pagey-i),h=s.speed/1e3||.4}else var i=e.offset().top,l=e.offset().left,p=r.conw/2-(t.pagex-l),c=r.conh/2-(t.pagey-i),h=s.speed/1e3||3;"mouseleave"==t.type&&(p=s.ddd_lasth||0,c=s.ddd_lastv||0,h=1.5);for(var u=0;ujquery(window).height()){var l=o;o=a,a=l}var n=e.width(),d=e.height(),p=360/n*o,c=180/d*a,h=s.speed/1e3||3,u=[];if(i.find(".tp-parallax-container").each(function(e){u.push(jquery(this))}),e.find(".tp-static-layers .tp-parallax-container").each(function(){u.push(jquery(this))}),jquery.each(u,function(){var e=jquery(this),r=parseint(e.data("parallaxlevel"),0),t=r/100,a=p*t*2,o=c*t*4;punchgs.tweenlite.to(e,h,{force3d:"auto",x:a,y:o,ease:punchgs.power3.easeout,overwrite:"all"})}),"3d"==s.type||"3d"==s.type){var w=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";"carousel"===r.slidertype&&(w=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),r.c.find(w).each(function(){var e=jquery(this),a=s.levels[s.levels.length-1]/200;offsh=p*a,offsv=c*a*3,offrv=0==r.conw?0:math.round(p/r.conw*a*500)||0,offrh=0==r.conh?0:math.round(c/r.conh*a*700)||0,li=e.closest("li"),zz=0,itslayer=!1,e.hasclass("dddwrapper-layer")&&(zz=s.ddd_z_correction||65,itslayer=!0),e.hasclass("dddwrapper-layer")&&(offsh=0,offsv=0),li.hasclass("active-revslide")||"carousel"!=r.slidertype?"on"!=s.ddd_bgfreeze||itslayer?punchgs.tweenlite.to(e,h,{rotationx:offrh,rotationy:-offrv,x:offsh,z:zz,y:offsv,ease:punchgs.power3.easeout,overwrite:"all"}):punchgs.tweenlite.to(e,.5,{force3d:"auto",rotationy:0,rotationx:0,z:0,ease:punchgs.power3.easeout,overwrite:"all"}):punchgs.tweenlite.to(e,.5,{force3d:"auto",rotationy:0,z:0,x:0,y:0,rotationx:0,z:0,ease:punchgs.power3.easeout,overwrite:"all"}),"mouseleave"==t.type&&punchgs.tweenlite.to(jquery(this),3.8,{z:0,ease:punchgs.power3.easeout})})}})),t.scrollticker(r,e)}},scrollticker:function(e,r){1!=e.scrollticker&&(e.scrollticker=!0,a?(punchgs.tweenlite.ticker.fps(150),punchgs.tweenlite.ticker.addeventlistener("tick",function(){t.scrollhandling(e)},r,!1,1)):document.addeventlistener("scroll",function(r){t.scrollhandling(e,!0)},{passive:!0})),t.scrollhandling(e,!0)},scrollhandling:function(e,o){if(e.lastwindowheight=e.lastwindowheight||window.innerheight,e.lastscrolltop==window.scrolly&&!e.duringslidechange&&!o)return!1;punchgs.tweenlite.delayedcall(.2,r,[e,window.scrolly]);var s=e.c[0].getboundingclientrect(),i=e.viewport,l=e.parallax,n=s.top<0||s.height>e.lastwindowheight?s.top/s.height:s.bottom>e.lastwindowheight?(s.bottom-e.lastwindowheight)/s.height:0;if(e.scrollproc=n,t.callbackhandling&&t.callbackhandling(e,"parallax","start"),i.enable){var d=1-math.abs(n);d=0>d?0:d,jquery.isnumeric(i.visible_area)||-1!==i.visible_area.indexof("%")&&(i.visible_area=parseint(i.visible_area)/100),1-i.visible_area<=d?e.inviewport||(e.inviewport=!0,t.enterinviewport(e)):e.inviewport&&(e.inviewport=!1,t.leaveviewport(e))}if(a&&"on"==l.disable_onmobile)return!1;if("3d"!=l.type&&"3d"!=l.type){if(("scroll"==l.type||"scroll+mouse"==l.type||"mouse+scroll"==l.type)&&l.pcontainers)for(var p=0;p0){var c=l.pcontainers[p],h=l.pcontainer_depths[p]/100,u=math.round(n*-(h*e.conh)*10)/10||0;c.data("parallaxoffset",u),punchgs.tweenlite.set(c,{overwrite:"auto",force3d:"auto",y:u})}if(l.bgcontainers)for(var p=0;p