// jquery stuff
$(function() {
	
	// IMAGE INFO TOOLTIPS
	// if there is a link, add pointer cursor behavior and 
	// add "click for more info" text to coaption content
	var append = '';
	if($("a#imageCaptionButton").attr("href") != undefined) {
		$("a#imageCaptionButton").css("cursor", "pointer");
		append = '<p class="note">('+$("a#imageCaptionButton").attr("title")+')</p>'
		// $("#imageCaptionContent").append('<p class="note">('+$("a#imageCaptionButton").attr("title")+')</p>');
	}
	$("a#imageCaptionButton").tooltip({
		bodyHandler: function() {
			return $("#imageCaptionContent").html()+append;
		},
		showURL: false,
		delay: 100
	});
	// END IMAGE INFO TOOLTIPS	
	
	// POPUP IMAGE
	// $("a[rel*='popup']").click(function(event){
	// 	event.preventDefault();
	// 	alert("popup");
	// });
	// 
}); 


	// print this page script
function print_me() {
	if (window.print) { 
		window.print()
	} else {
		var platform = navigator.platform.toUpperCase()
		var browser = navigator.appName.toUpperCase()
		if (platform == "MACPPC" && browser == "NETSCAPE") {
			alert('Please use command-p to print.')
		} else {
			alert('Please use control-p to print.')
		}
	}
}

    // size slideshow window
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=700');");
}

   // size player window
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
//

