﻿if(document.getElementById&&window.addEventListener||window.attachEvent)(function(){var h=30,v=30,w=1,f=[],e=[],g=[],k=[],c=[],n=[],l=[],j,d,b,a=document,t="px",o=typeof window.innerWidth=="number",u=typeof window.pageYOffset=="number",s=a.getElementsByTagName("div").length;if(a.documentElement.style&&typeof a.documentElement.style.MozOpacity=="string")h=12;for(i=0;i<h;i++){c[i]=Math.round(1+Math.random()*1);document.write('<div id="flake'+(s+i)+'" style="position:absolute;top:0px;left:0px;width:'+c[i]+"px;height:"+c[i]+"px;background-color:#ffffff;font-size:"+c[i]+'px"></div>');l[i]=0;g[i]=c[i]==1?Math.round(2+Math.random()*2):Math.round(3+Math.random()*2);n[i]=c[i]==1?.05+Math.random()*.1:.05+Math.random()*.05}if(o)b=window;else if(a.documentElement&&typeof a.documentElement.clientWidth=="number"&&a.documentElement.clientWidth!=0)b=a.documentElement;else if(a.body&&typeof a.body.clientWidth=="number")b=a.body;function m(){var f,i,g,h,c,e;if(o){if(a.documentElement&&a.defaultView&&typeof a.defaultView.scrollMaxY=="number"){f=a.documentElement.offsetHeight;i=a.defaultView.scrollMaxY;g=a.documentElement.offsetWidth;h=a.defaultView.scrollMaxX;c=f-i;e=g-h}else{c=b.innerHeight;e=b.innerWidth}j=c-2;d=e-2}else{j=b.clientHeight-2;d=b.clientWidth-2}}function q(d){var c,a;if(u){c=b.pageYOffset;a=b.pageXOffset}else{c=b.scrollTop;a=b.scrollLeft}return d==0?c:a}function r(){var b,a;for(i=0;i<h;i++){b=g[i];a=g[i]*Math.cos(l[i]);f[i]+=b;e[i]+=a;if(e[i]>=d||f[i]>=j){f[i]=-10;e[i]=Math.round(Math.random()*d);g[i]=c[i]==1?Math.round(2+Math.random()*2):Math.round(3+Math.random()*2);n[i]=c[i]==1?.05+Math.random()*.1:.05+Math.random()*.05}k[i].top=f[i]+q(0)+t;k[i].left=e[i]+q(1)+t;l[i]+=n[i]}setTimeout(r,v)}function p(){m();for(i=0;i<h;i++){k[i]=document.getElementById("flake"+(s+i)).style;f[i]=Math.round(Math.random()*j);e[i]=Math.round(Math.random()*d)}r()}if(window.addEventListener){window.addEventListener("resize",m,false);window.addEventListener("load",p,false)}else if(window.attachEvent){window.attachEvent("onresize",m);window.attachEvent("onload",p)}})()