
var wh, ww, sw, sh, time, color=9, interval;

$(document).ready(function(){
	if($("#main").height()<$("#div0").height())
		$("#main").css("height", $("#div0").height()+"px");
	$(".snow1", "#mainPage").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(20+Math.random()*300);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow2", "#mainPage").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(20+Math.random()*300);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow3", "#mainPage").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(20+Math.random()*300);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow1", "#inner1").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(-40+Math.random()*120);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow2", "#inner1").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(-40+Math.random()*120);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow3", "#inner1").each(function(){
		var x=Math.floor(1+Math.random()*100);
		var y=Math.floor(-40+Math.random()*120);
		$(this).css({"left": x+"%", "top": y+"px"});									
	});
	$(".snow1", "#inner3").each(function(){
		var x=Math.floor(1+Math.random()*95);
		var y=Math.floor(-40+Math.random()*110);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
	$(".snow2", "#inner3").each(function(){
		var x=Math.floor(1+Math.random()*95);
		var y=Math.floor(-40+Math.random()*110);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
	$(".snow3", "#inner3").each(function(){
		var x=Math.floor(1+Math.random()*95);
		var y=Math.floor(-40+Math.random()*110);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
	$(".snow1", "#inner5").each(function(){
		var x=Math.floor(1+Math.random()*93);
		var y=Math.floor(-40+Math.random()*150);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
	$(".snow2", "#inner5").each(function(){
		var x=Math.floor(1+Math.random()*93);
		var y=Math.floor(-40+Math.random()*150);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
	$(".snow3", "#inner5").each(function(){
		var x=Math.floor(1+Math.random()*93);
		var y=Math.floor(-40+Math.random()*150);
		$(this).css({"right": x+"%", "top": y+"px"});									
	});
});

$(window).resize(function(){
	$("#main").css("height", "auto");
	if($("#main").height()<$("#div0").height())
		$("#main").css("height", $("#div0").height()+"px");
});

