$(function() {

$(document).pngFix(); 

de_thumb();


$(".thumb").fancybox({
	'zoomSpeedIn': 0,
	'zoomSpeedOut': 0,
	'overlayShow': true
});


});

// this function makes sure that the url of the href element surrounding the image will link to the full blown image.
function de_thumb()
{
	$(".thumb").each(function() {

		$('img',this).each(function(){
			//console.log($(this).parent());
			var src = $(this).attr("src");
			//console.log(src);
			$(this).parent().attr({href : src.replace("_thumb", "")});

		})
	});
}

// this function replaces the thumbnail url for the full one to display the full blown image
function spotlight()
{
	var style = $("#bgimg").attr("style");
	$("#bgimg").attr({style : style.replace("_thumb", "")});
}