$(document).ready(function() {
	var eleThumb = document.getElementById("thumbNails");
	if (eleThumb != null) {
		$("#thumbNails a img").fadeTo(0, 0.25);
	}
	$("#thumbNails a img").hover(function() {
		$(this).fadeTo(250, 1.00);
	}, function() {
		$(this).fadeTo(250, 0.25);	
	});
	$(".gallerySelect span").hover(function() {
		$(this).children(".subGallery").show("fast");
	}, function() {
		$(this).children(".subGallery").hide("fast");
	});
});

function setPic(NewPic, ID, Ele) {
	$("#galleryData").removeClass("activeShow");
	$("#galleryPlacer").addClass("activeShow");
	$("#thumbNails a").removeClass("activeThumb");
	$(Ele).addClass("activeThumb");
	
	var img = new Image();
	$(".imgHold").fadeTo(250, 0.75, function() {
		$(img).load(function () {
			$(".imgHold").html(this);
			$(".imgHold").fadeTo(250, 1.00);
			$(this).width();
			$(this).height();
		}).error(function () {
		}).attr('src', NewPic);													   
	});
}