$(document).ready(function() {
	buildAllTabsBox();
});

function buildAllTabsBox() {
	//Default Action
	$(".tabs").children('div').hide(); //Hide all content
	$(".tabs ul").each(function() {
			$(this).children("li:first").addClass("active").show();
	});
	$(".tabs").each(function() {
			$(this).children("div:first").show();
	});
	$(".pager").show();
	//On Click Event
	$(".tabs ul li").click(function() {
		$(this).siblings("li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(this).parents(".tabs").children("div").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
}    
