$(function(){
	$.Lightbox.construct({
		"text": {
			// For translating
			"image":		"Image",
			"of":			"of",
			"close":		"X",
			"closeInfo":	"You can also click anywhere outside the image to close.",
			"download":		"",
			"help": {
				"close":	"",
				"interact":	""
			},
			"about": {
				"text": 	"",
				"title":	"",
				"link":		""
			}
		}
	});
});


var currentWindow = null;
	
function showWindow(id) {
 if(currentWindow) {
  currentWindow.animate( {top:-500},500,"backin",function(){
    jQuery(this).hide();
    var i = currentWindow.attr("id");
    currentWindow = null;
    if (i != id) showWindow(id);
  });
  return;
}
 var win = jQuery("#"+id);
 if (!win) return;
 win.show();
 var l = (jQuery(document).width()-win.width())/2;
 var t = (jQuery(document).height()-win.height())/2 - 70;
 l = l<0 ? 0 : l;
 t = t<0 ? 0 : t;
 win.css("left",l);
 win.css("top",-win.width());
 win.animate( {top:t}, 900,"bounceout");
 currentWindow = win;
}

function resize() {
 var size = (jQuery(document).width()-950)/2;
 if (size<0) size=0;
 jQuery(".emptyTD").width(size);
}

jQuery(document).ready(function() {
 resize();
 jQuery(".contentLink").mouseenter(function() {
   jQuery(this).animate({fontSize: "+=3px"},150);
 });
 
 jQuery(".contentLink").mouseleave(function() {
   jQuery(this).animate({fontSize: "-=3px"},150);
 });
 
 jQuery(window).resize(resize);
 });
