function popVideo(videoUrl) {
	var translatedVideoUrl = "/popup_video.php?video=" + videoUrl;
	var width = 650;
	var height = 445;
	var leftOffset = (screen.availWidth / 2) - (width / 2);
	var topOffset = (screen.availHeight / 2) - (height / 2);
	var videoWindow = window.open(translatedVideoUrl,'','width=' + width + ',height=' + height + ',top=' + topOffset + ',left=' + leftOffset + ',location=no,menubar=no,resizable=no,scrollbars=no');
	if (window.focus) { videoWindow.focus; }
}

function galItem( filename, description, rank, alt, ext ) { 
	this.filename = filename;
	this.description = description; 
	this.rank = rank;
	this.alt = alt;
	this.ext = ext;
}

function displayGalItem(galItem) {
	var galShowcaseContent;
	$("#gallery_showcase").fadeOut("normal", function() {
		galShowcaseContent = "<img src=\"/images/gallery/" + galItem.filename + "." + galItem.ext + "\" alt=\"";
		if (galItem.alt == "" || galItem.alt == undefined) {
			galShowcaseContent += galItem.description;
		} else {
			galShowcaseContent += galItem.alt;
		}
		galShowcaseContent += "\" />\n" + galItem.description;
		$("#gallery_showcase").html(galShowcaseContent);
		$("#gallery_showcase img").load(function() {
			$("#gallery_showcase").fadeIn();
			$("#gallery_showcase_container").height($("#gallery_showcase").height());
		});	
	});
}