function writeUpdate() {
    var d = new Date();
    if (d.toLocaleDateString) { 
	document.writeln(d.toLocaleDateString(document.lastModified));
    } else { 
	document.writeln(document.lastModified);   
    }
}

$(document).ready(function(){
    $("#gallery a").click(function() {
	if(($(window).width() < 800) || ($(window).height() < 600)) {
	    return true;
	} else {
	    $("#photoframe").load(this.href + " #photo",function() {
		$("div#photo").click(function() {
		    $("#photoframe").empty();
		    return false;
		});
		$("div#photo a.close").click(function() {
		    $("#photoframe").empty();
		    return false;
		});
		$("div#photo a[href*='http://']").click(function() {
		    location.href = this.href;
		    return false;
		});
	    });
	    return false;
	}
    });


    $("#info ul a").mouseover(function() {
	$("#gallery a." + $(this).attr("class")).addClass("highlighted");
    });
    $("#info ul a").mouseout(function() {
	$("#gallery a.highlighted").removeClass("highlighted");
    });
  
});
