(function(n,t,i){function r(){n(".parallax[parallax-direction][parallax-speed]").each(function(){var r=parseInt(n(this).attr("parallax-speed")),c=n(this).attr("parallax-direction"),i;if(!(r<0)&&!(r>100)&&this.parentElement.getBoundingClientRect&&(i=this.parentElement.getBoundingClientRect(),!(i.top>t.innerHeight)&&!(i.bottom<0))){var l=t.innerHeight-i.top,a=l*((c==="down"?r:100-r)/100),e=l-a,u="bottom",o="height",s=0,h=0,f=i.height;switch(c){case"down":u="bottom";h=e;f=i.height+t.innerHeight*((100-r)/100);break;case"up":u="top";h=-e;f=i.height+(t.innerHeight+i.height)*(r/100);break;case"left":u="left";s=-e;o="width";f=i.width+(t.innerHeight+i.height)*(r/100);break;case"right":u="right";s=e;o="width";f=i.width+(t.innerHeight+i.height)*(r/100)}n(this).css(u,0).css(o,f).css("transform","translate("+s+"px, "+h+"px)")}})}n(i).ready(function(){r()});n(t).on("scroll resize",function(){r()});n(i).on("mouseover",".DynamicBackground",function(){n("> .background-container .dynamic-background",this).toggleClass("active",!0)});n(i).on("mouseout",".DynamicBackground",function(){n("> .background-container .dynamic-background",this).toggleClass("active",!1)})})(jQuery,window,document)