$(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(0); //Hide all content
	$("ul.tabs li#tabli"+tab).addClass("active").show(0); //Activate first tab
	$("#tab"+tab+"_content").show(0); //Show first tab content

//	$("ul.tabs li:first").addClass("active").show(0); //Activate first tab
//	$(".tab_content:first").show(0); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(0); //Hide all tab content

		var activeTab = $(this).children().attr("id"); //Find the href attribute value to identify the active tab + content
		$('#'+activeTab+'_content').fadeIn(); //Fade in the active ID content
		return false;
	});

});

