function popup(linkObject) {
	/*
		Load content for popup via AJAX if necessary and open popup.
	*/
	id = linkObject.id + '-popup';
	setDimensions(id); /* verify we still have the right size */
	$('#' + id).slideDown();
}

$(function(){
	//highlight named anchors
	function highlight(elemId){
        // don't highlight comment box, it looks weird;
        if (elemId == '#comment') return;

	    $(elemId).css("backgroundColor", "#ffffff"); // hack for Safari
	    $(elemId).animate({ backgroundColor: '#ffffaa' }, 1500);
	    setTimeout(function(){$(elemId).animate({ backgroundColor: "#ffffff" }, 3000)},1000);
	}

    if (document.location.hash) {
	    highlight(document.location.hash);
	}
	$('#main a[href*=#]').click(function(){
	    var elemId = '#' + $(this).attr('href').split('#')[1];
	    highlight(elemId);
	});
});
