$(document).ready(function(){
	// When a link is clicked
	$("a.tab").click(function () {
		// switch all tabs off
		$(".current_page").removeClass("current_page");
		$(".active").removeClass("active");

		// switch this tab on
		$(this).addClass("current_page");
		$(this).addClass("active");

		// slide all elements with the class 'content' up
		$(".content").slideUp();

		// Now figure out what the 'title' attribute value is and find the element with that id.  Then slide that down.
		var content_show = $(this).attr("title");
		$("#"+content_show).slideDown();

		// Sub Contents Active Off
		$(".subActive").removeClass("subActive");

		$('#subContents').addClass('subContentsBg');

		return false;
	});
});
