$(document).ready(function() { 

	var w_width 	=  $(window).width();
	var w_height 	=  $(window).height();
	
	var colors = new Array();
	colors[0] = "blue";
	colors[1] = "red";
	colors[2] = "#00ffff";
	colors[4] = "lime";
	colors[5] = "yellow";

	var fonts = new Array();
	fonts[0] = "arial";
	fonts[1] = "verdana";
	fonts[2] = "tahoma";
	fonts[4] = "times new roman";
	fonts[5] = "courier new";
	fonts[6] = "georgia";
	fonts[7] = "serif";

	function resetme()
	{

		$('body').css('background-color', get_color());
		
		
		$("div.buahaha").each(function (el) {

			opacity = $.randomBetween(10, 90);
			$(this).css('opacity', opacity/100);
			$(this).css('filter:alpha', opacity);
			$(this).css('background-color', get_color());
			$(this).css('z-index', $.randomBetween(0, 89));
			
			this_width = $.randomBetween(0, w_width/2);
			this_height = $.randomBetween(0, w_height/2);
			
			$(this).css('width', this_width);
			$(this).css('height', this_height);
			
			$(this).css('top', $.randomBetween(0, w_height-this_height));
			$(this).css('left', $.randomBetween(0, w_width-this_width));
			
			
		});
		
		$("span.whaha").each(function (el) {
			opacity = $.randomBetween(30, 90);
			$(this).css('opacity', opacity/100);
			$(this).css('filter:alpha', opacity);
			$(this).css('color', get_color());
			$(this).css('font-family', get_font());
			$(this).css('font-size', $.randomBetween(10, 50));
	
			
		});

	}
	
	function get_color()
	{
		return colors[$.randomBetween(0, 5)];
	}
	
	function get_font()
	{
		return fonts[$.randomBetween(0, 7)];
	}
	
	resetme();
	$('body').mousemove(function(e){
		resetme();
	});
	
	
});

