$(document).ready(function(){
	$(".menu_a1").hover(function() {$(this).attr("src","img/menu/glowna_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/glowna.jpg");});  
});

$(document).ready(function(){
	$(".menu_a2").hover(function() {$(this).attr("src","img/menu/o_nas_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/o_nas.jpg");});  
});

$(document).ready(function(){
	$(".menu_a3").hover(function() {$(this).attr("src","img/menu/o_pozycjonowaniu_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/o_pozycjonowaniu.jpg");});  
});

$(document).ready(function(){
	$(".menu_a4").hover(function() {$(this).attr("src","img/menu/opinie_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/opinie.jpg");});  
});

$(document).ready(function(){
	$(".menu_a5").hover(function() {$(this).attr("src","img/menu/cennik_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/cennik.jpg");});  
});

$(document).ready(function(){
	$(".menu_a6").hover(function() {$(this).attr("src","img/menu/kontakt_hover.jpg");}, 
	function() {$(this).attr("src","img/menu/kontakt.jpg");});  
});

// preload obrazków
if (document.images)
{
	preload_image_object = new Image();
	// set image url
	image_url = new Array();
	image_url[0] = "img/menu/glowna_hover.jpg";
	image_url[1] = "img/menu/o_nas_hover.jpg";
	image_url[2] = "img/menu/o_pozycjonowaniu_hover.jpg";
	image_url[3] = "img/menu/opinie_hover.jpg";
	image_url[4] = "img/menu/cennik_hover.jpg";
	image_url[5] = "img/menu/kontakt_hover.jpg";

	var i = 0;
	for(i=0; i<image_url.length; i++)
	{
		preload_image_object.src = image_url[i];
	}
}

/*
var menu_img_paths = new Array(6);
var suffix = "_hover";
var extension = ".jpg";

menu_img_paths[0] = "img/menu/glowna";
menu_img_paths[1] = "img/menu/o_nas";
menu_img_paths[2] = "img/menu/o_pozycjonowaniu";
menu_img_paths[3] = "img/menu/opinie";
menu_img_paths[4] = "img/menu/cennik";
menu_img_paths[5] = "img/menu/kontakt";

for (var i=0; i<menu_img_paths.length; i++)
{
	j=i+1;
	var class = ".menu_a"+j;
	var img_path = menu_img_paths[i]+suffix+extension;
	var img_path_hover = menu_img_paths[i]+extension;
	//alert (class+" | "+img_path+" | "+img_path_hover);
	$(document).ready(function(){
		$(class).hover(function() {$(this).attr("src", img_path);}, 
		function() {$(this).attr("src", img_path_hover);});  
	});
}
*/
