$(document).ready(function(){
	
	var rollover = {
		over : function(elem){
			var img = elem.children("img")
			var path = img.attr("src");
		
			var re = new RegExp("-+off+.", "g");
			path = path.replace(re, "-on.");
			
			img.attr("src", path);
		},
		out : function(elem){
			var img = elem.children("img")
			var path = img.attr("src");
		
			var re = new RegExp("-+on+.", "g");
			path = path.replace(re, "-off.");
			
			img.attr("src", path);
		}
	};
	
	$("#watch-learn-more, #watch-learn-more2, #home-find-out,  .nav-menu-rollover, .rolover, .test, #product-ad-top_menu-cart").hover(function(){
		rollover.over($(this));
	}, function(){
		rollover.out($(this));
	});
   
    
   	
  
       
       
       var rollover_input = {
		over : function(elem){
			var img = elem.children("input")
			var path = img.attr("src");
		
			var re = new RegExp("-+off+.", "g");
			path = path.replace(re, "-on.");
			
			img.attr("src", path);
		},
		out : function(elem){
			var img = elem.children("input")
			var path = img.attr("src");
		
			var re = new RegExp("-+on+.", "g");
			path = path.replace(re, "-off.");
			
			img.attr("src", path);
		}
	};
	
	$(".rollover").hover(function(){
		rollover_input.over($(this));
	}, function(){
		rollover_input.out($(this));
	});
    
    

	
});

