$(function() {
		// set opacity to nill on page load
		//$("ul#menu span").css("opacity","0");
		// on mouse over
	//window.alert($('#menu-container').height());
	$("a.menuitem").css( {backgroundPosition: "-221px 0px"} );
	$("a.menuitem").hover(
		function () 
		{
			// animate opacity to full
			//$(this).css({backgroundImage:"none"})
			$(this).stop().animate({backgroundPosition: '0px 0px'}, {duration:400});
			$(this).css( {color:"#2c4f66"} );
		},
		// on mouse out
		function ()
		{
			// animate opacity to nill
			$(this).css( {color:"#5c7382"} );
			$(this).stop().animate({backgroundPosition: '-221px 0px'}, "fast");
			
			//$(this).css({backgroundImage:"none"});
			//$(this).stop().animate({backgroundImage:"none"}, "fast");
		}
	);
	
	$('a[href*=game.php]').click(function(event){
		new_window(this.href);
		return false;
 	}); 
	
	$('#myrankings-toggle').hide();
	$('#myrankings-show').click(function() {
			$('#myrankings-toggle').toggle("normal");
	});

});



function startup()	{
	if (typeof(init) == 'function')
		init();
}

function new_window(url)
{
	if ($.browser.msie)
	{
		window.open(url, 'AdAugusta', 'width='+(screen.availWidth-10)+',height='+(screen.availHeight-35)+',fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,top=0,left=0');
	}
	else
	{
		window.open(url, 'AdAugusta', 'fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no');
	}
}

