$(document).ready(function() {
	
	$('#peoplenav li a').click(function()
	{
		var img = $(this).attr('href')+' #headerimg img';
		var txt = $(this).attr('href')+' #featured_text p';
		var title = $(this).attr('href')+' #featured_title span';
		$('#featured_title').fadeOut('default');
		$('#featured_text').fadeOut('default');
		$('#headerimg img').fadeOut('default',loadContent());

		
		//window.location.hash = $(this).attr('href').substr(2,$(this).attr('href').length);
		
		function loadContent() {
			$('#headerimg').load(img);
			$('#featured_title').load(title);
			$('#featured_text').load(txt,'',showNewContent())
		}
		
		function showNewContent() {
			setTimeout(function(){
				$('#headerimg img').fadeIn('slow');
				$('#featured_text').fadeIn('slow');
				$('#featured_title').fadeIn('slow');
			},600);
		}
		
		return false;
	});
});