jQuery.fn.extend({
	
	// Rollover function that reveals the background color
	hover_fade: function(){
		$(this).each(function(){
			$(this).hover(
				function(){
					$(this).find("img").fadeTo("fast", 0.65);
				},
				function(){
					$(this).find("img").fadeTo("fast", 1);
				}
			);
		});
	},
	
	// Swap Image with image path of alt attribute 
	image_swap: function(){
		$(this).each(function(){
			var alt = $(this).attr("alt");
			$(this).css("background-image", "url('"+template_url+alt+"')");
	
			$(this).hover(
				function(){
					$(this).find("img").fadeOut(150);
				},
				function(){
					$(this).find("img").fadeIn(150);
				}
			);
		});
	}
});