sne = {
	'speed':10,
	'pspeed':100,
	'i':0,
	'maxcount':50,
	'setint':{},
	'snows':['❄','❅'],
	'create':function(speed,h,l,r,t,a){
		if(sne.i>sne.maxcount){return false;}
		var num = ++sne.i;
		var id = 'sne_num_'+num;
		var l=typeof(l)=='number'?l:0;
		var r=typeof(r)=='number'?r:0;
		var t=typeof(t)=='number'?t:0;
		var a=typeof(a)=='number'&&(a>=0)&&(a<=1)?a:false;
		$('<div style="cursor:default;font-size:'+(Math.ceil(Math.random()*6+10))+'px;color:#CCC;z-index:800; width:20px; height:20px; position:absolute; top:'+t+'; margin:-12px; left:'+(Math.ceil(Math.random()*$(window).width()))+'px;opacity:1;filter:alpha(opacity=100)" alt="" id="'+id+'">'+(sne.snows[Math.ceil(Math.random()*sne.snows.length)-1])+'</div>').appendTo(document.body);
		var sn = $('#'+id);
		sne.setint[id] = setInterval(function(){
			if($('#'+id).offset().top-t+20>(typeof(h)=='number'?h:$(window).height())){$('#'+id).css('top', t+'px');$('#'+id).css('left', (Math.ceil(Math.random()*$(window).width()))+'px');}
			if(a!==false&&a!==1){$('#'+id).css('opacity', (1-((1-a)*($('#'+id).offset().top-t)/h)));}
			$('#'+id).css('top', parseInt($('#'+id).css('top'))+1+'px');
			$('#'+id).css('left', parseInt($('#'+id).css('left'))+Math.ceil(Math.random()*2-1)+'px');
			if($('#'+id).offset().left-l+20<0){$('#'+id).css('left', ($(window).width()-21-r)+'px');}
			if($('#'+id).offset().left+r+20>$(window).width()){$('#'+id).css('left', (l+1)+'px');}
		}, Math.ceil(1000/(typeof(speed)=='number'?speed:sne.speed+Math.ceil(Math.random()*2*sne.pspeed-sne.pspeed))));
		return sn;
	},
	'generate':function(count,height,left,right,top,alpha){
		for(i=1;i<=count;i++)
		{
			setTimeout(function()
			{
				sne.create('', height,left,right,top,alpha);
			},(400*(i-1)+Math.ceil(Math.random()*500-250)));
		}
	}
}
