$(document).ready(function(){ 
     
    $('ul.fader-list').innerfade({ 
        animationtype: 'fade',
        speed: 750,
        timeout: 5000,
        type: 'random',
        containerheight: '50px' 
    }); 
    
    //Hiding all tabs
    $(".tab").hide();
    $(".tabs a").removeClass("active");
    
    // Showing First Tab
    $(".tabs-content .tab").eq(0).show().addClass("active");
    $(".tabs a").eq(0).addClass("active");
    
    $(".tabs a").click(function(){
        $(".tabs a").removeClass("active");
        $(this).addClass("active");
        
        $(".tabs-content .active").removeClass("active").hide();
        $($(this).attr("href")).addClass("active").fadeIn();
        
        return false;
    });
    
    
    $("p.more").click(function () {
    	$(this).parent().find('.hide-content').slideToggle('fast');
   		$(this).toggleClass("hide");
   		return false;
    });

    //Ajax

	$('.book .big-buttons a').live('click', function(){
		var href = $(this).attr('href');
		loader(href);
		return false;
	});
	
	$('.profile-names ul li a').live('click', function(){
		var href = $(this).attr('href');
	
		loader(href);
		return false;
	});
	
	$('.nav-buttons span a').live('click', function(){
		var href = $(this).attr('href');
		loader(href);
		return false;
	});
	
	

	     
     //PNG FIX for IE6
    if($.browser.msie && $.browser.version.substr(0,1) == 6 ){
        DD_belatedPNG.fix('h1#logo a,#main ul.tab-nav li a, #main .sidebar .box span.info, .inner-page h1#logo a, .nav-buttons span.home a,.nav-buttons span.prev a, #footer .center p.phone    ')
    }


	

});

function loader(href) {
	$('.book .entry').fadeOut(function() {
	  $('.book .entry').load(href, function(){
    		$('.book .entry').fadeIn();
    	});  
	});
}



 


