You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
10 KiB

  1. (function(M){function z(r,t){r.lastscrolltop=t}var w=jQuery.fn.revolution,j=w.is_mobile(),Y={alias:"Parallax Min JS",name:"revolution.extensions.parallax.min.js",min_core:"5.4.5",version:"2.2.3"};jQuery.extend(!0,w,{checkForParallax:function(r,t){function m(a){if(e.type=="3D"||e.type=="3d"){a.find(".slotholder").wrapAll('<div class="dddwrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden"></div>'),a.find(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layer" style="width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:5;overflow:'+e.ddd_layer_overflow+';"></div>'),a.find(".rs-parallaxlevel-tobggroup").closest(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layertobggroup" style="position:absolute;top:0px;left:0px;z-index:50;width:100%;height:100%"></div>');var s=a.find(".dddwrapper"),d=a.find(".dddwrapper-layer");a.find(".dddwrapper-layertobggroup").appendTo(s),t.sliderType=="carousel"&&(e.ddd_shadow=="on"&&s.addClass("dddwrappershadow"),punchgs.TweenLite.set(s,{borderRadius:t.carousel.border_radius})),punchgs.TweenLite.set(a,{overflow:"visible",transformStyle:"preserve-3d",perspective:1600}),punchgs.TweenLite.set(s,{force3D:"auto",transformOrigin:"50% 50%"}),punchgs.TweenLite.set(d,{force3D:"auto",transformOrigin:"50% 50%",zIndex:5}),punchgs.TweenLite.set(t.ul,{transformStyle:"preserve-3d",transformPerspective:1600})}}if(w.compare_version(Y).check==="stop")return!1;var e=t.parallax;if(!e.done){if(e.done=!0,j&&e.disable_onmobile=="on")return!1;e.type!="3D"&&e.type!="3d"||(punchgs.TweenLite.set(t.c,{overflow:e.ddd_overflow}),punchgs.TweenLite.set(t.ul,{overflow:e.ddd_overflow}),t.sliderType!="carousel"&&e.ddd_shadow=="on"&&(t.c.prepend('<div class="dddwrappershadow"></div>'),punchgs.TweenLite.set(t.c.find(".dddwrappershadow"),{force3D:"auto",transformPerspective:1600,transformOrigin:"50% 50%",width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:0}))),t.li.each(function(){m(jQuery(this))}),(e.type=="3D"||e.type=="3d")&&t.c.find(".tp-static-layers").length>0&&(punchgs.TweenLite.set(t.c.find(".tp-static-layers"),{top:0,left:0,width:"100%",height:"100%"}),m(t.c.find(".tp-static-layers"))),e.pcontainers=new Array,e.pcontainer_depths=new Array,e.bgcontainers=new Array,e.bgcontainer_depths=new Array,t.c.find(".tp-revslider-slidesli .slotholder, .tp-revslider-slidesli .rs-background-video-layer").each(function(){var a=jQuery(this),s=a.data("bgparallax")||t.parallax.bgparallax;(s=s=="on"?1:s)!==void 0&&s!=="off"&&(e.bgcontainers.push(a),e.bgcontainer_depths.push(t.parallax.levels[parseInt(s,0)-1]/100))});for(var p=1;p<=e.levels.length;p++)t.c.find(".rs-parallaxlevel-"+p).each(function(){var a=jQuery(this),s=a.closest(".tp-parallax-wrap");s.data("parallaxlevel",e.levels[p-1]),s.addClass("tp-parallax-container"),e.pcontainers.push(s),e.pcontainer_depths.push(e.levels[p-1])});e.type!="mouse"&&e.type!="scroll+mouse"&&e.type!="mouse+scroll"&&e.type!="3D"&&e.type!="3d"||(r.mouseenter(function(a){var s=r.find(".active-revslide"),d=r.offset().top,T=r.offset().left,L=a.pageX-T,h=a.pageY-d;s.data("enterx",L),s.data("entery",h)}),r.on("mousemove.hoverdir, mouseleave.hoverdir, trigger3dpath",function(a,s){var d=s&&s.li?s.li:r.find(".active-revslide");if(e.origo=="enterpoint"){var h=r.offset().top,v=r.offset().left;d.data("enterx")==null&&d.data("enterx",a.pageX-v),d.data("entery")==null&&d.data("entery",a.pageY-h);var T=d.data("enterx")||a.pageX-v,L=d.data("entery")||a.pageY-h,y=T-(a.pageX-v),b=L-(a.pageY-h),o=e.speed/1e3||.4}else var h=r.offset().top,v=r.offset().left,y=t.conw/2-(a.pageX-v),b=t.conh/2-(a.pageY-h),o=e.speed/1e3||3;a.type=="mouseleave"&&(y=e.ddd_lasth||0,b=e.ddd_lastv||0,o=1.5);for(var u=0;u<e.pcontainers.length;u++){var n=e.pcontainers[u],i=e.pcontainer_depths[u],g=e.type=="3D"||e.type=="3d"?i/200:i/100,f=y*g,x=b*g;e.type=="scroll+mouse"||e.type=="mouse+scroll"?punchgs.TweenLite.to(n,o,{force3D:"auto",x:f,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(n,o,{force3D:"auto",x:f,y:x,ease:punchgs.Power3.easeOut,overwrite:"all"})}if(e.type=="3D"||e.type=="3d"){var c=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";t.sliderType==="carousel"&&(c=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),t.c.find(c).each(function(){var _=jQuery(this),k=e.levels[e.levels.length-1]/200,D=y*k,P=b*k,X=t.conw==0?0:Math.round(y/t.conw*k*100)||0,C=t.conh==0?0:Math.round(b/t.conh*k*100)||0,H=_.closest("li"),Q=0,O=!1;_.hasClass("dddwrapper-layer")&&(Q=e.ddd_z_correction||65,O=!0),_.hasClass("dddwrapper-layer")&&(D=0,P=0),H.hasClass("active-revslide")||t.sliderType!="carousel"?e.ddd_bgfreeze!="on"||O?punchgs.TweenLite.to(_,o,{rotationX:C,rotationY:-X,x:D,z:Q,y:P,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(_,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(_,.5,{force3D:"auto",rotationY:0,x:0,y:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}),a.type=="mouseleave"&&punchgs.TweenLite.to(jQuery(this),3.8,{z:0,ease:punchgs.Power3.easeOut})})}}),j&&(window.ondeviceorientation=function(a){var s=Math.round(a.beta||0)-70,d=Math.round(a.gamma||0),T=r.find(".active-revslide");if(jQuery(window).width()>jQuery(window).height()){var L=d;d=s,s=L}var h=r.width(),v=r.height(),y=360/h*d,b=180/v*s,o=e.speed/1e3||3,u=[];if(T.find(".tp-parallax-container").each(function(i){u.push(jQuery(this))}),r.find(".tp-static-layers .tp-parallax-container").each(function(){u.push(jQuery(this))}),jQuery.each(u,function(){var i=jQuery(this),g=parseInt(i.data("parallaxlevel"),0),f=g/100,x=y*f*2,c=b*f*4;punchgs.TweenLite.to(i,o,{force3D:"auto",x,y:c,ease:punchgs.Power3.easeOut,overwrite:"all"})}),e.type=="3D"||e.type=="3d"){var n=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";t.sliderType==="carousel"&&(n=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),t.c.find(n).each(function(){var i=jQuery(this),g=e.levels[e.levels.length-1]/200,f=y*g,x=b*g*3,c=t.conw==0?0:Math.round(y/t.conw*g*500)||0,_=t.conh==0?0:Math.round(b/t.conh*g*700)||0,k=i.closest("li"),D=0,P=!1;i.hasClass("dddwrapper-layer")&&(D=e.ddd_z_correction||65,P=!0),i.hasClass("dddwrapper-layer")&&(f=0,x=0),k.hasClass("active-revslide")||t.sliderType!="carousel"?e.ddd_bgfreeze!="on"||P?punchgs.TweenLite.to(i,o,{rotationX:_,rotationY:-c,x:f,z:D,y:x,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(i,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(i,.5,{force3D:"auto",rotationY:0,z:0,x:0,y:0,rotationX:0,ease:punchgs.Power3.easeOut,overwrite:"all"}),a.type=="mouseleave"&&punchgs.TweenLite.to(jQuery(this),3.8,{z:0,ease:punchgs.Power3.easeOut})})}}));var l=t.scrolleffect;if(l.bgs=new Array,l.on){if(l.on_slidebg==="on")for(var p=0;p<t.allslotholder.length;p++)l.bgs.push(t.allslotholder[p]);l.multiplicator_layers=parseFloat(l.multiplicator_layers),l.multiplicator=parseFloat(l.multiplicator)}l.layers!==void 0&&l.layers.length===0&&(l.layers=!1),l.bgs!==void 0&&l.bgs.length===0&&(l.bgs=!1),w.scrollTicker(t,r)}},scrollTicker:function(r,t){r.scrollTicker!=1&&(r.scrollTicker=!0,j?(punchgs.TweenLite.ticker.fps(150),punchgs.TweenLite.ticker.addEventListener("tick",function(){w.scrollHandling(r)},t,!1,1)):document.addEventListener("scroll",function(m){w.scrollHandling(r,!0)},{passive:!0})),w.scrollHandling(r,!0)},scrollHandling:function(r,t,m){if(r.lastwindowheight=r.lastwindowheight||window.innerHeight,r.conh=r.conh===0||r.conh===void 0?r.infullscreenmode?r.minHeight:r.c.height():r.conh,r.lastscrolltop==window.scrollY&&!r.duringslidechange&&!t)return!1;punchgs.TweenLite.delayedCall(.2,z,[r,window.scrollY]);var e=r.c[0].getBoundingClientRect(),p=r.viewPort,l=r.parallax,a=e.top<0||e.height>r.lastwindowheight?e.top/e.height:e.bottom>r.lastwindowheight?(e.bottom-r.lastwindowheight)/e.height:0;if(r.scrollproc=a,w.callBackHandling&&w.callBackHandling(r,"parallax","start"),p.enable){var s=1-Math.abs(a);s=s<0?0:s,jQuery.isNumeric(p.visible_area)||p.visible_area.indexOf("%")!==-1&&(p.visible_area=parseInt(p.visible_area)/100),1-p.visible_area<=s?r.inviewport||(r.inviewport=!0,w.enterInViewPort(r)):r.inviewport&&(r.inviewport=!1,w.leaveViewPort(r))}if(j&&l.disable_onmobile=="on")return!1;if(l.type!="3d"&&l.type!="3D"){if((l.type=="scroll"||l.type=="scroll+mouse"||l.type=="mouse+scroll")&&l.pcontainers){for(var d=0;d<l.pcontainers.length;d++)if(l.pcontainers[d].length>0){var T=l.pcontainers[d],L=l.pcontainer_depths[d]/100,h=Math.round(a*(-L*r.conh)*10)/10||0,v=m!==void 0?m:l.speedls/1e3||0;T.data("parallaxoffset",h),punchgs.TweenLite.to(T,v,{overwrite:"auto",force3D:"auto",y:h})}}if(l.bgcontainers)for(var d=0;d<l.bgcontainers.length;d++){var y=l.bgcontainers[d],b=l.bgcontainer_depths[d],h=a*(-b*r.conh)||0,v=m!==void 0?m:l.speedbg/1e3||0;punchgs.TweenLite.to(y,v,{position:"absolute",top:"0px",left:"0px",backfaceVisibility:"hidden",force3D:"true",y:h+"px"})}}var o=r.scrolleffect;if(o.on&&(o.disable_on_mobile!=="on"||!j)){var u=Math.abs(a)-o.tilt/100;if(u=u<0?0:u,o.layers!==!1){var n=1-u*o.multiplicator_layers,i={backfaceVisibility:"hidden",force3D:"true",z:.001,perspective:600};if(o.direction=="top"&&a>=0&&(n=1),o.direction=="bottom"&&a<=0&&(n=1),n=n>1?1:n<0?0:n,o.fade==="on"&&(i.opacity=n),o.scale==="on"){var g=n;i.scale=1-g+1}if(o.blur==="on"){var f=(1-n)*o.maxblur;i["-webkit-filter"]="blur("+f+"px)",i.filter="blur("+f+"px)"}if(o.grayscale==="on"){var x=100*(1-n),c="grayscale("+x+"%)";i["-webkit-filter"]=i["-webkit-filter"]===void 0?c:i["-webkit-filter"]+" "+c,i.filter=i.filter===void 0?c:i.filter+" "+c}punchgs.TweenLite.set(o.layers,i)}if(o.bgs!==!1){var n=1-u*o.multiplicator,i={backfaceVisibility:"hidden",force3D:"true"};if(o.direction=="top"&&a>=0&&(n=1),o.direction=="bottom"&&a<=0&&(n=1),n=n>1?1:n<0?0:n,o.fade==="on"&&(i.opacity=n),o.scale==="on"){var g=n;punchgs.TweenLite.set(jQuery(".tp-kbimg-wrap"),{transformOrigin:"50% 50%",scale:g,force3D:!0})}if(o.blur==="on"){var f=(1-n)*o.maxblur;i["-webkit-filter"]="blur("+f+"px)",i.filter="blur("+f+"px)"}if(o.grayscale==="on"){var x=100*(1-n),c="grayscale("+x+"%)";i["-webkit-filter"]=i["-webkit-filter"]===void 0?c:i["-webkit-filter"]+" "+c,i.filter=i.filter===void 0?c:i.filter+" "+c}punchgs.TweenLite.set(o.bgs,i)}}w.callBackHandling&&w.callBackHandling(r,"parallax","end")}})})(jQuery);