var original_image='';
var second_image='';
$(document).ready(function() {


$("span.mi").hover(function() {
	original_image = $(this).css('background-image');
	second_image = original_image.replace('-off','-on');;
	$(this).css('background-image', second_image); 
}, function() {
	 $(this).css('background-image', original_image); 
	 //alert('out ' + original_image)
});


});



/*

	// For each link containing -off, set up a -on hover
	$("img[src*='-off']").each(function() {
	
		// Preload on state
		var img = new Image();
		img.src = $(this).attr("src").replace(/-off/,"-on");
		
		// If this is within the navigation, then put the hover on the <li> so it stays switched during dropdown navs
		if ($(this).parent().parent().parent().parent().attr("id") == "main-nav")
		{
			// Set up the hover switcher
			$(this).parent().parent().hover(function() {
				$(this).find("img").attr("src",$(this).find("img").attr("src").replace(/-off/,"-on"));
			}, function() {
				$(this).find("img").attr("src",$(this).find("img").attr("src").replace(/-on/,"-off"));
			});
		} 
		else 
		{
			// Set up the hover switcher
			$(this).hover(function() {
				$(this).attr("src",$(this).attr("src").replace(/-off/,"-on"));
			}, function() {
				$(this).attr("src",$(this).attr("src").replace(/-on/,"-off"));
			});
		}
		
	
	});
	
	$("#main-nav > ul > li").hover(function() {
		$(this).find("ul").show();
	}, function() {
		$(this).find("ul").hide();
	});
	
	$(".search-input").hint();

});*/
