	
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}

$(document).ready(function(){
	
	$.preloadImages(ROOT + "/images/loader.gif'");
	
	$('.footer-messages').animate({'top':'-23px'},200);
	
	
	var onMouseOutOpacity = 0.5;
	$('.home-menu A IMG').not('.chosen').css('opacity', onMouseOutOpacity)
		.hover(
			function () {
				$(this).not('.chosen').fadeTo('fast', 1.0);
			}, 
			function () {
				$(this).not('.chosen').fadeTo('fast', onMouseOutOpacity);
			}
		);
		
	//$('.header-buttons DIV IMG').css({'width':'99%'});
	
	
	$('.header-buttons DIV').hover(
			function () {
				
				var new_width = $(this).attr('id');
				
				$(this).css({'zIndex':'14'});
				$('#'+new_width+' IMG').css({'width':new_width+'px'});
				$('#'+new_width+' IMG').css({'top':'-3px'});
			}, 
			function () {
				
				var bigger_width = $(this).attr('id');
				var normal_width = parseInt(bigger_width) - 5;
				
				$(this).css({'zIndex':'11'});
				$('#'+bigger_width+' IMG').css({'width':normal_width+'px'});
				$('#'+bigger_width+' IMG').css({'top':'0px'});
			}
		);
		
});
