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

$.preloadImages("/images/home_on.jpg","/images/about_on.jpg","/images/solutions_on.jpg","/images/services_on.jpg","/images/references_on.jpg","/images/projects_on.jpg");

$(document).ready(function() {
	$("#Home_Menu").hover(
		function() {
			$(this).children().children("img").attr("src","/images/home_on.jpg");
		},
		function() {
			$(this).children().children("img").attr("src","/images/home_up.jpg");
		});
	$("#About_Menu").hover(
		function() {
			$(this).children("img").attr("src","/images/about_on.jpg");
			$(this).children("ul.dropdown_menu").css("display","block");
		},
		function() {
			$(this).children("img").attr("src","/images/about_up.jpg");
			$(this).children("ul.dropdown_menu").css("display","none");

		});
	$("#Solutions_Menu").hover(
		function() {
			$(this).children("img").attr("src","/images/solutions_on.jpg");
			$(this).children("ul.dropdown_menu").css("display","block");
		},
		function() {
			$(this).children("img").attr("src","/images/solutions_up.jpg");
			$(this).children("ul.dropdown_menu").css("display","none");
		});
	$("#Services_Menu").hover(
		function() {
			$(this).children("img").attr("src","/images/services_on.jpg");
			$(this).children("ul.dropdown_menu").css("display","block");
		},
		function() {
			$(this).children("img").attr("src","/images/services_up.jpg");
			$(this).children("ul.dropdown_menu").css("display","none");
		});
	$("#References_Menu").hover(
		function() {
			$(this).children().children("img").attr("src","/images/references_on.jpg");
		},
		function() {
			$(this).children().children("img").attr("src","/images/references_up.jpg");
		});
	$("#Projects_Menu").hover(
		function() {
			$(this).children().children("img").attr("src","/images/projects_on.jpg");
		},
		function() {
			$(this).children().children("img").attr("src","/images/projects_up.jpg");
		}); 
	
	$("ul.dropdown_menu li").hover(
		function() {
			$(this).css("background-color","#6a503e");
			$(this).children("a").css("color","#FFFFFF");
		},
		function() {
			$(this).css("background-color","#eadec4");
			$(this).children("a").css("color","#372224");
		});
	$(".button").hover(
		function() {
			$(this).css("background","url('/images/button-bgrnd_on.jpg') repeat-x");
		},
		function() {
			$(this).css("background","url('/images/button-bgrnd.jpg') repeat-x");
		});	
});

