$(function() 
{
	//Set up the stars after the page has loaded
	$(window).load(function()
	{
		$("div#cc_stars_top").css("background-image","url(/fun/images/character/stars/stars_top_0.gif)");
		$("div#cc_stars_mid_left").css("background-image","url(/fun/images/character/stars/stars_mid_left_0.gif)");
		$("div#cc_stars_mid_right").css("background-image","url(/fun/images/character/stars/stars_mid_right_0.gif)");
		//Fix for ie 7 and 8 where if the gif is in use on another div it doesn't restart animation
		$("div#cc_star_pl_top_1").css("background-image","url(/fun/images/spacer.gif)");
		$("div#cc_star_pl_top_2").css("background-image","url(/fun/images/spacer.gif)");
		$("div#cc_star_pl_mid_left_1").css("background-image","url(/fun/images/spacer.gif)");
		$("div#cc_star_pl_mid_left_2").css("background-image","url(/fun/images/spacer.gif)");
		$("div#cc_star_pl_mid_right_1").css("background-image","url(/fun/images/spacer.gif)");
		$("div#cc_star_pl_mid_right_2").css("background-image","url(/fun/images/spacer.gif)");
		// end fix for ie 7 & 8
	})
	
	//initialize Variables
	$top_i = 1;
	$left_i = 1;
	$right_i = 1;
	$("div#cc_stars_top").mouseover(function()
	{
		$num = $top_i % 2 + 1;
		$(this).css("background-image","url(/fun/images/character/stars/stars_top_" + $num + ".gif)");
		$top_i++;
	})
	$("div#cc_stars_mid_left").mouseover(function()
	{
		$num = $left_i % 2 + 1;
		$(this).css("background-image","url(/fun/images/character/stars/stars_mid_left_" + $num + ".gif)");
		$left_i++;
	})
	$("div#cc_stars_mid_right").mouseover(function()
	{
		$num = $right_i % 2 + 1;
		$(this).css("background-image","url(/fun/images/character/stars/stars_mid_right_" + $num + ".gif)");
		$right_i++;
	})
})