$(document).ready(function() {
	$("a.thumbLink").removeAttr("href");
	$("img.thumbImg").removeAttr("ONMOUSEOUT");
	$("img.thumbImg").removeAttr("ONMOUSEOVER");

	$("img.thumbImg").mouseover(function(){
		if($(this).attr("id") != "selectedThumb"){
			$(this).attr("src", $(this).attr("activeThumb"));
		}
	});

	$("img.thumbImg").mouseout(function(){
		if($(this).attr("id") != "selectedThumb"){
			$(this).attr("src", $(this).attr("disabledThumb"));
		}
	});

	$("img.thumbImg").click(function(){
		var bigImg = $(this).attr("bigImg");

		var prevSelImg = $("img#selectedThumb");
		prevSelImg.attr("src", prevSelImg.attr("disabledThumb"));
		prevSelImg.removeAttr("id");

		$(this).attr("id", "selectedThumb");
		$(this).attr("src", $(this).attr("activeThumb"));

		$("img.bigImg").fadeOut("slow", function(){
			$("img.bigImg").attr("src", bigImg);
			$("img.bigImg").load(function(){
				$("img.bigImg").fadeIn("slow");
				$("img.bigImg").load(null);
			});
		});
	});
});
