// *********** menu tabs *************

	  // When the document loads do everything inside here ...
	  $(document).ready(function(){
		
		// When a link is clicked
		$("ul.menu li a.tab").click(function () {
			
			
			// switch all tabs off
			$(".active").removeClass("active");
			
			// switch this tab on
			$(this).addClass("active");
			
			// slide all content up
			$(".content").hide('normal');
			
			// slide this content up
			var content_show = $(this).attr("title");
			$("#"+content_show).show('normal');
		  
		  return false;
		});
	


// *********** titlebar tabs *************
	$('ul.tabNav a').click(function() {
		var curChildIndex = $(this).parent().prevAll().length + 1;
		$(this).parent().parent().children('.current').removeClass('current');
		$(this).parent().addClass('current');
		$(this).parent().parent().next('.tabContainer').children('.current').fadeOut('normal',function() {
			$(this).removeClass('current');
			$(this).parent().children('div:nth-child('+curChildIndex+')').slideDown('slow',function() {
				$(this).addClass('current');
			});
		});
		return false;								
	});
});
