// JavaScript Document
$(document).ready(function()
{
	var origBio = $("#bio").html();

	/*
	$("#photoHolder").flash({
		src: 'flash/quotes1.swf',
		width: 197,
		height: 345,
		wmode: 'transparent'
		});
	*/
	//Take care of the hover action
	$(".actionBox").hover(function()
	{		
		if($(this).children("img").attr('src'))
		{
			var bigSource = $(this).children("img").attr('src').replace(/thumbnail/, 'fullsize');
			var name = $(this).next().children("div").html();
			var title = $(this).next().children("p").html();
		} else {
			var bigSource = $(this).prev().children("img").attr('src').replace(/thumbnail/, 'fullsize');
			var name = $(this).children("div").html();
			var title = $(this).children("p").html();
		}
		$("#fullsizePhoto").show();
		$("#fullsizePhoto").attr('src', bigSource);
		$("#nameBox").text(name);
		$("#titleBox").html(title);
	}, function() { return false; }); //$("#fullsizePhoto").attr('src', 'images/blank.gif');
	
	$(".execBox").hover(function()
	{
		if($(this).children("div").children("img").attr('src'))
		{
			var bigSource = $(this).children("div").children("img").attr('src').replace(/thumbnail/, 'fullsize');
			var name = $(this).next().children("div").children(".biotxt").html();
			var title = $(this).next().children("div").children(".titletxt").html();
			var bio = $(this).next().children(".bio").html();
		} else {
			var bigSource = $(this).prev().children("div").children("img").attr('src').replace(/thumbnail/, 'fullsize');
			var name = $(this).children("div").children(".biotxt").html();
			var title = $(this).children("div").children(".titletxt").html();
			var bio = $(this).children(".bio").html();
		}
		//alert(bigSource);
		$("#fullsizePhoto").attr('src', bigSource);
		$("#bio").html(bio);
		$("#personName").html(name);
		$("#personTitle").html(title);
		
		//In case this is the first hover hide slideshow and show image

	}, function() { 
		//$("#personName").html("&nbsp;");
		//$("#personTitle").html("&nbsp;");
		//$("#bio").html(origBio);
		//$("#fullsizePhoto").attr('src', 'images/tnp_building.jpg');
	});
	
});