(function(){var lastScrollY=0,ticking=false,bgElm=document.getElementById('kk-parallax-bg'),bgElmTitle=document.getElementById('kk-parallax-title-wrapper'),bgElmVid=document.getElementById('kk-parallax-video'),speedDivider=3;var updatePosition=function(){if(bgElm==null)
return;var translateValue=lastScrollY/speedDivider;if(translateValue<0)
translateValue=0;translateY(bgElm,translateValue);if(bgElmVid!=null)
translateY(bgElmVid,translateValue);translateY(bgElmTitle,(translateValue*1.5));opacityA(bgElmTitle,translateValue);ticking=false;};var translateY=function(elm,value){var translate='translate3d(0px,'+value+'px, 0px)';elm.style['-webkit-transform']=translate;elm.style['-moz-transform']=translate;elm.style['-ms-transform']=translate;elm.style['-o-transform']=translate;elm.style.transform=translate;};var opacityA=function(elm,value){var height=bgElmTitle.offsetHeight,opacity=1-(value*0.0044/(height*0.0014));elm.style['opacity']=opacity;elm.style['-webkit-opacity']=opacity;};var requestTick=function(){if(!ticking){window.requestAnimationFrame(updatePosition);ticking=true;}};var doScroll=function(){lastScrollY=window.pageYOffset;requestTick();};(function(){var loaded=0;var bootstrap=function(){if(loaded)
return;loaded=1;rafPolyfill();window.onscroll=doScroll;};if(document.readyState==='complete'){setTimeout(bootstrap);}else{document.addEventListener('DOMContentLoaded',bootstrap,false);window.addEventListener('load',bootstrap,false);}})();var rafPolyfill=function(){var lastTime,vendors,x;lastTime=0;vendors=["webkit","moz"];x=0;while(x<vendors.length&&!window.requestAnimationFrame){window.requestAnimationFrame=window[vendors[x]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[vendors[x]+"CancelAnimationFrame"]||window[vendors[x]+"CancelRequestAnimationFrame"];++x;}
if(!window.requestAnimationFrame){window.requestAnimationFrame=function(callback,element){var currTime,id,timeToCall;currTime=new Date().getTime();timeToCall=Math.max(0,16-(currTime-lastTime));id=window.setTimeout(function(){callback(currTime+timeToCall);},timeToCall);lastTime=currTime+timeToCall;return id;};}
if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(id){clearTimeout(id);};}};}).call(this);