function previewColor(){
	$(".swatch").each(function(){
		$(this).click(function(){
			var newimg = $(this).attr('rel');
			var imgid = $(this).attr('title');
			$("#"+imgid).attr("src",newimg);	
		});
	});
}


//initialize this when the page loads
$(document).ready( function(){ previewColor(); });
