// JavaScript Document

$(document).ready(function(){
	$("#tab-content-container > div").hide();					// hide all tabbed content divs
	$("ul.tab-menu li:first a").addClass("current").show();		// add the class 'current' to the first tab
	$("#tab-content-container > div:first").show();				// show the first tabbed content div
	
	// click event handler for tabs ----
	$("ul.tab-menu li").click(
		function(){
			$("ul.tab-menu li a").removeClass("current");		// remove the class 'current' from all the tabbed hyperlinks
			$("#tab-content-container > div").hide();			// hide all tabbed content divs
			jQuery(this).find("a").addClass("current");			// add the class 'current' to the tab that has been clicked
			//
			var currentTab = $(this).find("a").attr("href");	// get the 'href' value of the clicked tabb
			$(currentTab).fadeIn();								// fade in the correct tabbed content
			return false;										// turn off hyperlink behavior
		}
	);
	
	// make the tabbed content containers the same height as the highest one ----
	/*var tallestHeight = 0;
	$("#tab-content-container > div").each(
		function(){
			var thisHeight = $(this).height();
			if (thisHeight > tallestHeight){
				tallestHeight = thisHeight;
			}
		}
	);
	//
	$("#tab-content-container > div").each(
		function(){
			$(this).height(tallestHeight);
		}
	);*/
});
