// assign the image title the alt attribute for all images with alt tags within the primaryContent div of a publication item
// Nathan White/Bedrich Rios
//
// 3-20-08: will now take images linked in posts to the image displayer and make them popups ... this should be generalized,
//          and flexible enough to adjust to the image size, but alas this needs to be done now for the voice and it works
//
// jQuery must have been loaded for this script to work

$(document).ready(function()
{
	$("#blog.publication .item .primaryContent img").each (
	
	function()
	{
		$(this).attr("title", $(this).attr("alt"));
		if ($(this).attr("align")=="left") $(this).css("margin-left",0);
		else if ($(this).attr("align")=="right") $(this).css("margin-right",0);
	}
	
	)
	
	$("#blog.publication .item .primaryContent a[href*='displayers/image.php?id=']").click (
	
	function()
	{
		window.open($(this).attr("href"), 'PopupImage', 'menubar,scrollbars,resizable,width=600,height=700');
		return false;
	}
	
	)
});