$(document).ready(function(){		

	/*
	if (location.hash == '#share-tab') {
		$("#boc-wrap .content:not(:last)").hide();//hide all
		$("#share").show();//show share tab
		$("#popup-nav li:last a").addClass('current');
	} else {
		$("#popup-nav li:first a").addClass('current');			
	}
	*/
	
	$("#boc-nav li:first a").addClass('current');
	//$("#boc-wrap .content:not(:first).hide(); //hide all but first tab
	$("#boc-wrap .content:first").show();
	
	$("#boc-nav li a").click(function() {
		$("#boc-nav li a").removeClass("current");
		$(this).addClass('current');
		$("#boc-wrap .content").hide();	//hide all tabs
		
		var href = $(this).attr('href');
		$(href).show(); //show relevant tab

		return false;
	});
	
	$(".bocFooter a.bocChapterLink").click(function() {
		$("#boc-nav li a").removeClass("current");
		var navRef = $(this).attr('rel');
		$(navRef).addClass('current');
		$("#boc-wrap .content").hide();	//hide all tabs
		
		var href = $(this).attr('href');
		$(href).show(); //show relevant tab

		return false;
	});
});		
