$(document).ready(function()
{
	$("a.personpic")
	.hover(function(){PP_show(this.id)}, function(){$('#PersonPicPopup').remove()})
	.click(function(){return false});	   
});

function PP_show(linkId)
{
	var o = document.getElementById(linkId);
	var linkO = o;
	var x = o.offsetLeft;
	var y = o.offsetTop;
	while(o.offsetParent!=null) {
		oParent = o.offsetParent;
		x += oParent.offsetLeft;
		y += oParent.offsetTop;
		o = oParent
	}
  
	x = x + Math.floor(linkO.offsetWidth / 2) - 45;
	y = y - 120;

	$("body").append("<div id='PersonPicPopup' style='left:" + x + "px;top:" + y + "px'><div id='PersonPicWrapper'><img src='/i/thh/thum-" + linkId + ".jpg' width='65' height='89' /></div><div id='PersonPicPointyBit'>\<img src='/i/bl-arrow.jpg' alt='' title='' /></div>");
}