$(function(){ParallaxScroll.init()});var ParallaxScroll={showLogs:!1,round:1e3,init:function(){return this._log("init"),this._inited?(this._log("Already Inited"),void(this._inited=!0)):(this._requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1e3/60)}}(),void this._onScroll(!0))},_inited:!1,_properties:["x","y","z","rotateX","rotateY","rotateZ","scaleX","scaleY","scaleZ","scale"],_requestAnimationFrame:null,_log:function(a){this.showLogs&&console.log("Parallax Scroll / "+a)},_onScroll:function(a){var b=$(document).scrollTop(),c=$(window).height();this._log("onScroll "+b),$("[data-parallax]").each($.proxy(function(d,e){var f=$(e),g=[],h=!1,i=f.data("style");void 0==i&&(i=f.attr("style")||"",f.data("style",i));var k,j=[f.data("parallax")];for(k=2;f.data("parallax"+k);k++)j.push(f.data("parallax-"+k));var l=j.length;for(k=0;kn&&("back"==f.data("sens")?(u=1,f.data("sens","go")):u++),w0&&u<=s){var j=b;"back"==f.data("sens")&&(j=c,c=-c,q=r,s=t),i=$.easing[q](null,u,j,c,s)}i=Math.ceil(i*this.round)/this.round,i==d&&e==c&&(i=c),g[a]||(g[a]=0),g[a]+=i,d!=g[a]&&(f.data("_"+a,g[a]),h=!0)}},this))}if(h){if(void 0!=g.z){var x=m.perspective;void 0==x&&(x=800);var y=f.parent();y.data("style")||y.data("style",y.attr("style")||""),y.attr("style","perspective:"+x+"px; -webkit-perspective:"+x+"px; "+y.data("style"))}void 0==g.scaleX&&(g.scaleX=1),void 0==g.scaleY&&(g.scaleY=1),void 0==g.scaleZ&&(g.scaleZ=1),void 0!=g.scale&&(g.scaleX*=g.scale,g.scaleY*=g.scale,g.scaleZ*=g.scale);var z="translate3d("+(g.x?g.x:0)+"px, "+(g.y?g.y:0)+"px, "+(g.z?g.z:0)+"px)",A="rotateX("+(g.rotateX?g.rotateX:0)+"deg) rotateY("+(g.rotateY?g.rotateY:0)+"deg) rotateZ("+(g.rotateZ?g.rotateZ:0)+"deg)",B="scaleX("+g.scaleX+") scaleY("+g.scaleY+") scaleZ("+g.scaleZ+")",C=z+" "+A+" "+B+";";this._log(C),f.attr("style","transform:"+C+" -webkit-transform:"+C+" "+i)}},this)),window.requestAnimationFrame?window.requestAnimationFrame($.proxy(this._onScroll,this,!1)):this._requestAnimationFrame($.proxy(this._onScroll,this,!1))}};