RegisterNamespace("Woot.Scripts.LazyLoadImages");Woot.Scripts.LazyLoadImages.Images=[];Woot.Scripts.LazyLoadImages.Initialize=function(){for(var a=$("img[lazysrc]"),b=0;b<a.length;b++)Woot.Scripts.LazyLoadImages.Images.push(a[b])};
Woot.Scripts.LazyLoadImages.LoadImagesInViewport=function(){for(var a=parseInt((window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop)+(window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body.clientHeight)+600),b=Woot.Scripts.LazyLoadImages.Images.length-1;b>=0;b--){var c=Woot.Scripts.LazyLoadImages.Images[b];if(c.getAttribute("lazysrc")&&a>=GetPositionY(c)){c.setAttribute("src",c.getAttribute("lazysrc"));
c.removeAttribute("lazysrc");Woot.Scripts.LazyLoadImages.Images.splice(b,1)}}};function GetPositionY(a){var b=0;if(a.offsetParent)for(;;){b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else if(a.y)b+=a.y;return b}function RegisterNamespace(a){var b=window;a=a.split(".");for(var c=0;c<a.length;c++){var e=a[c],d=b[e];if(!d){d=b[e]={};d.__namespace=true;d.__typeName=a.slice(0,c+1).join(".");var f;try{f=eval(d.__typeName)}catch(g){f=null}f!==d&&delete b[e]}b=d}}
$(function(){Woot.Scripts.LazyLoadImages.Initialize();Woot.Scripts.LazyLoadImages.LoadImagesInViewport();$(window).resize(Woot.Scripts.LazyLoadImages.LoadImagesInViewport);$(window).scroll(Woot.Scripts.LazyLoadImages.LoadImagesInViewport)});

