jQuery(document).ready(function($) {
/* Check for hash value in URL*/  
	var href = $('ul li a').not("ul li.exclude_ajax a").each(function(){
		var hash = window.location.hash.substr(0);
		var href = $(this).attr('href');  
		if(hash==href.substr(0,href.length-5)){
			var toLoad = hash+'.html .content';
    		$('.content').load(toLoad);  
    	}  
	});  
	$('ul li a').not("ul li.exclude_ajax a").click(function(){	
		$('ul li a').removeClass("selected");
		$(this).addClass("selected");
		$(this).parent().parent().prev().addClass("selected");
		
		$('.loader').fadeIn('fast');
    	var toLoad = $(this).attr('href')+' .content';  	
		$('.content').fadeOut('fast',loadContent); 
		function loadContent() {
			
    	$('.content').load(toLoad, function() {
    		$(this).fadeIn("normal", hide());	
    		function hide() {		
    			$('.loader').fadeOut('fast');

    		}
    	});
		}
    	return false;
	});
});


