

BioManager = {
	currId:null,
	
	updateBio:function(id) {
		BioManager.updateThumb(id);
		BioManager.updateContent(id);
		BioManager.currId = id;
	},
	
	updateThumb:function(id) {
		if (BioManager.currId != null) {
			var thumb = $(".peopleMenu ." + BioManager.currId + " a.thumb");
			thumb.removeClass("selected");
			thumb.addClass("isActive");
		}
		thumb = $(".peopleMenu ." + id + " a.thumb");
		thumb.addClass("selected");
		thumb.removeClass("isActive");
	},
	
	updateContent:function(id) {
		if (BioManager.currId != null) {
			$(".bio" + "." + BioManager.currId).hide();
		}
		$(".bio" + "." + id).fadeIn("slow");
	}
}


// When DOM is ready.

$(document).ready(function() {
	// Hide our bio info to start.
	$(".bio").hide();
	
	// Remove 'hidden' style from bio elements - was added to prevent initial flash of content.
	$(".bio").css({ visibility: "visible" });
	
	// Set-up our peopleMenu functionality.
	$(".peopleMenu a").bind("click", function(evt) {
		var id = $(evt.target).attr("rel");
		BioManager.updateBio(id);
		evt.preventDefault();
	});
	
	// Check to see if a specific bio was requested.
	if ($.jqURL.get('bio')) {
		BioManager.updateBio($.jqURL.get('bio'));
	}
});