var pos=0;var interval;function toggleSnow(){letItSnow=isSnowing();if(letItSnow=="on"){createCookie("snow","off",1);updateSnow("off");}else{createCookie("snow","on",1);updateSnow("on");}}function isSnowing(){state=readCookie("snow");return state==null?"on":state;}function updateSnow(a){if(a=="on"){document.getElementById("startStopSnow").style.backgroundPosition="0 0";
interval=setInterval(snowFall,100);}else{document.getElementById("startStopSnow").style.backgroundPosition="0 -20px";clearInterval(interval);}document.getElementById("startStopSnow").style.display="block";}function snowFall(){var a="0 "+ ++pos+"px";document.getElementById("headerBackDrop").style.backgroundPosition=a;
if(pos>135){pos=0;}}function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString();}else{var a="";}document.cookie=c+"="+d+a+"; path=/";}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];
while(f.charAt(0)==" "){f=f.substring(1,f.length);}if(f.indexOf(e)==0){return f.substring(e.length,f.length);}}return null;}window.addEvent("domready",function(){$("startStopSnow").addEvent("click",toggleSnow);$("headerBackDrop").get("tween",{"duration":4000}).start("opacity",[0,1]);updateSnow(isSnowing());
});