$(document).ready(function() {

var hash = window.location.hash.substr(1);
var href = $('ul#testimonial-list li a').each(function(){
    var href = $(this).attr('href');
    if(hash==href.substr(0,href.length)){
        var toLoad = hash+'.html #testimonial';
        $('#testimonial').load(toLoad)
    } 
});

    $('ul#testimonial-list li a').click(function(){
    
		// Init a variable for the content we want to load from external Page
		// in this example, we're grabbing the content within the #testimonial [div]
		var toLoad = $(this).attr('href')+' #testimonial';
		
		
		// define the function to show new content from external page
		function showNewTestimonial() {
			$('#testimonial').fadeIn('slow');
		}
		
		// Hide the content in the #testimonial [div] on the current page
		$('#testimonial').fadeOut('slow');
		
		
		// Now load the content from the external page using the showNewTestimonial function
		$('#testimonial').load(toLoad,'',showNewTestimonial());
		//$('#testimonial').load(toLoad).fadeIn('slow');

		window.location.hash = $(this).attr('href');

		return false;
    
    });
});





