// JavaScript Document

jQuery(document).ready(function(){ 
//	$('#BRHtabs div').hide(); // Hide all divs 
	BRHhideall();  // Hide all tabs 
	jQuery('#BRHtabs div:first').show(); // Show the first div 
	jQuery('#BRHtabs ul li:first').addClass('BRHactive'); // Set the class for active state 
	jQuery('#BRHtabs ul li a').click(function(){ // When link is clicked 
		jQuery('#BRHtabs ul li').removeClass('BRHactive'); // Remove active class from links 
		jQuery(this).parent().addClass('BRHactive'); //Set parent of clicked link class to active 
		var currentTab = jQuery(this).attr('href'); // Set currentTab to value of href attribute 
//		$('#BRHtabs div').hide(); // Hide all divs 
		BRHhideall();  // Hide all tabs 
		jQuery(currentTab).show(); // Show div with id equal to variable currentTab 
		return false; 
	}); 
});

function BRHhideall() {
	jQuery('#BRHtabs #BRHbook').hide();
	jQuery('#BRHtabs #BRHexcerpt').hide();
	jQuery('#BRHtabs #BRHpurchase').hide();
}

