﻿$(document).ready(function(){
	
	$("#menu li a img").hover(
	  function(){
	  	if ($(this).attr("src").indexOf("_1") == -1)
	  	{
					var newSrc = $(this).attr("src").replace(".jpg", "_1.jpg");
					$(this).attr("src", newSrc);
			}
		},
		
		function(){
			if ($(this).attr("src").indexOf("_1.jpg") != -1)
			{
				var oldSrc = $(this).attr("src").replace("_1.jpg", ".jpg");
				$(this).attr("src", oldSrc);	
			}
		});	
		
		$(".sub li a img").hover(
	   function(){
	  	if ($(this).attr("src").indexOf("_1") == -1)
	  	{
					var newSrc = $(this).attr("src").replace(".jpg", "_1.jpg");
					$(this).attr("src", newSrc);
			}
		},
		
		function(){
			if ($(this).attr("src").indexOf("_1.jpg") != -1)
			{
				var oldSrc = $(this).attr("src").replace("_1.jpg", ".jpg");
				$(this).attr("src", oldSrc);	
			}
		});	
		
		$(".sub_sub li a img").hover(
	   function(){
	  	if ($(this).attr("src").indexOf("_1") == -1)
	  	{
					var newSrc = $(this).attr("src").replace(".jpg", "_1.jpg");
					$(this).attr("src", newSrc);
			}
		},
		
		function(){
			if ($(this).attr("src").indexOf("_1.jpg") != -1)
			{
				var oldSrc = $(this).attr("src").replace("_1.jpg", ".jpg");
				$(this).attr("src", oldSrc);	
			}
		});	
		
		/*$("#menu li a").hover(
	   function(){
	   	//alert($(this).next(".sub"));
	   	
	   	$(this).next(".sub").show();
		},
		
		function(){
			//$(this).next(".sub").hide();
		}
		);	
		
		$(".sub li a").hover(
	   function(){
	   	//alert("t");
	   	//$(this).prev(".sub").show();
	   	$(this).next(".sub_sub").show();
		},
		
		function(){
			//$(this).prev(".sub").show();
	   	//$(this).next(".sub_sub").hide();
		});	
		
		$(".sub_sub li a").hover(
	   function(){
	   	//$(this).show();
		},
		
		function(){
			//$(this).hide();
		});	*/
		$(".reset_button img").hover(
	  function(){
	  	if ($(this).attr("src").indexOf("_1") == -1)
	  	{
					var newSrc = $(this).attr("src").replace(".jpg", "_1.jpg");
					$(this).attr("src", newSrc);
			}
		},
		
		function(){
			if ($(this).attr("src").indexOf("_1.jpg") != -1)
			{
				var oldSrc = $(this).attr("src").replace("_1.jpg", ".jpg");
				$(this).attr("src", oldSrc);	
			}
		});	
});


