jQuery(document).ready(function() {

	// For each link containing -off, set up a -on hover
	jQuery("img[src*='-off']").each(function() {
	
		// Preload on state
		var img = new Image();
		img.src = jQuery(this).attr("src").replace(/-off/,"-on");
		
		// Set up the hover switcher
		jQuery(this).hover(function() {
			jQuery(this).attr("src",jQuery(this).attr("src").replace(/-off/,"-on"));
		}, function() {
			jQuery(this).attr("src",jQuery(this).attr("src").replace(/-on/,"-off"));
		});

	
	});
	
		jQuery("ul.hover").hover(
  		function () {
			jQuery(this).parent().find("img").attr("src", jQuery(this).parent().find("img").attr("src").replace(/-off/,"-on"));
			//alert($(this).parent().parent().find("img").attr('src'));
  		}, 
  		function () {
			jQuery(this).parent().find("img").attr("src", jQuery(this).parent().find("img").attr("src").replace(/-on/,"-off"));
			//alert($(this).parent().parent().find("img").attr('src'));
		  }
		);	
		

	

	
});
