	/* display year */
var date = new Date();
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;

/* centered pop up window */
function centeredPopUpWindow(mypage, myname, w, h, scroll){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

var photoNumber = 1;
function resetCurrentPhoto(photoNumber){
	currentPhoto = photoNumber;
}

$(document).ready(function(){

	$("ul#photoClickThru li a").click(function(){
		$("ul#projectPhotos li").hide();
		$("ul#photoClickThru li a").removeClass("photoHighlight");
		$(this).addClass("photoHighlight");
		$("ul#projectPhotos li.photo" + currentPhoto).fadeIn("normal");
		return false;
	});
	
	$("a.selectProject").click(function(){
		
		if ( $(this).hasClass("selectProjectOn") ) {
			$("ul#projectsNav").fadeOut("normal");
			$(this).removeClass("selectProjectOn");
			return false;
		} else {
			$("ul#projectsNav").fadeIn("normal");
			$(this).addClass("selectProjectOn");
			return false;
		}
		
	});

});
