// JavaScript Document
if (document.images)
    {
      preload_image = new Image(25,25); 
      preload_image.src="http://www.gameranx.com/images/header.png"; 
	  preload_image.src="http://www.gameranx.com/images/critics/ajax-loader.gif";
    }
	
	
$.fn.navbar=function(ati){
			$("#sprite").css({backgroundPosition:ati});
			$("#n-25px,#n310px,#n405px,#n475px,#n550px,#n630px,#n720px").css({backgroundPosition:'0px 0px'}).mouseover(function(){
				var pdi=''+$(this).attr("id").slice(1,6)+' 0px';
				$("#sprite").stop().animate({backgroundPosition:pdi},{duration:200});
			});
			$("#n-25px,#n310px,#n405px,#n475px,#n550px,#n630px,#n720px").mouseout(function(){
				$("#sprite").stop().animate({backgroundPosition:ati},{duration:200});
			});
		};
$(document).ready(function(){
	//console glow animation
	var xpos=0;
	var stre=0;
	$("#pc,#xbox,#ps3,#wii,#psp").mouseover(function(){
	stre=$(this).css("backgroundPosition");
	if(typeof(stre) === 'undefined'){ 
	stre=$(this).css('background-position-x') + ' ' + $(this).css('background-position-y');
	}
	xpos=stre.substring(0, stre.length - 6);
		$(this).stop().css({backgroundPosition:''+xpos+' -226px'},{duration:100});
	});
	$("#pc,#xbox,#ps3,#wii,#psp").mouseout(function(){
		$(this).stop().css({backgroundPosition:''+xpos+' -191px'},{duration:100});
	});
	
	
	//Forums coming soon
	$("a#forums").hover(
			function(){
			$("#forums_soon").css({opacity:0.6}).fadeIn(200);
			},function(){
			$("#forums_soon").fadeOut(200);
			}
	);
						   });