$(document).ready(function() {
						   
	var hash = window.location.hash.substr(1);
	var href = $('#submenu li a').each(function(){
		var href = $(this).attr('href');
		if(hash==href.substr(0,href.length-5)){
			var toLoad = hash+'.html #subcontent';
			$('#subcontent').load(toLoad)
		}											
	});

	$('#submenu li a').click(function(){
								  
		var toLoad = $(this).attr('href')+' #subcontent';
		$('#subcontent').fadeOut('slow',loadContent);



		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
		function loadContent() {
			$('#subcontent').load(toLoad,'',showNewContent())
		}
		function showNewContent() {
			$('#subcontent').fadeIn('slow');
		}

		return false;
		
	});

});
