!function(t){t.fn.fallingSnow=function(a){var f,s,d,h,l,o=t.extend({stopOnClick:!0,stopElement:t("#snow"),speedAdjust:2,thicknessAdjust:1,drift:100,opacity:!0},a),n=t(this),r=t(window).width(),e=t(window).height(),i=parseInt(r/14);i=10*Math.round(i/10)/2;for(var p=Math.floor(Math.random()*(i-9))+(i+11),M=0;p>M;M++)f=Math.floor(11*Math.random())*o.thicknessAdjust,s=Math.floor(101*Math.random()),d=Math.floor(101*Math.random()),l=1==o.opacity?Math.floor(3*Math.random()):0,5>f?h=Math.floor(3001*Math.random())+2100:f>5&&9>f?h=Math.floor(2099*Math.random())+1700:f>8&&(h=Math.floor(1699*Math.random())+1e3),h*=o.speedAdjust,n.append('<b class="op'+l+'" style="width: '+f+"px; height: "+f+"px;left: "+s+"%; top: "+d+'%;" data-speed="'+h+'"></b>');n.find("b").each(function(){function l(){a.animate({top:0,left:r+Math.floor(Math.random()*(h-d+1))+d},0).animate({top:"100%",left:r+Math.floor(Math.random()*(h-d+1))+d},f,"linear",function(){l()})}var a=t(this),n=parseInt(a.css("top")),r=parseInt(a.css("left")),f=parseInt(a.attr("data-speed")),s=f-n/e*f,d=-1*o.drift,h=o.drift;a.animate({top:e},s,"linear",function(){l()})}),o.stopElement.click(function(){1==o.stopOnClick&&n.find("b").stop(!0)})}}(jQuery);