jQuery(document).ready(function() {
	//work out the index of the current person in the carousel
	var myid="/a/" + $("#id").val();
	var tot = $("#carousel li").length;
	var myitem = $("#carousel li:has(a[href*='" + myid + "'])");
	myitem.removeClass('inactive_person').addClass('active_person');
	var myindex=myitem.index();
	if ((myindex > -1) && (myindex>3)) 
		{myindex=myindex-2}
	else if (myindex>tot-4) 
		{myindex=tot-7}
	else
		{myindex=0};
	//setup the carousel	
	jQuery('#carousel').jcarousel({
		visible:7,
		scroll:7,
		start:myindex,
		animation:"slow"
	});
	$("#carousel li").mouseout(function() { //mouse out
		p =$("#person_popup");
		p.text('').hide();
	}
	);
});



