$(document).ready(function() {
	/********************************************
	* General Tabs Function
	********************************************/
	
	//Make tabs
	$('#tabLinks > ul').tabs();
	$('#tabBox > ul').tabs();
	
	//Hide Tabs Box Div
	$("#tabsBox").hide();
	
	//When Click on Show/Hide button
	$(".showTabs").click(function () { 
		$("#tabsBox").slideToggle(); 
    });
	
		//When Click on any tab
		$(".showTabs2").click(function () {
	  
		var tabID = $(this).attr("rel"); //Get ID of Target DIV from "rel"	  
		var tabIndex = $('#tabLinks ul li a').index(this); //Get index of li of clicked link
	  
		$("#tabLinks > ul > li").removeClass("ui-tabs-selected"); //Make unselected all the tabs
		$("#tabLinks > ul > li:eq("+tabIndex+")").addClass("ui-tabs-selected"); //Make selected clicked tab
 
		$("#tabsBox").show(); //Show Tabs Box div, if it is hidden
	 
		$(".tabdiv").hide(); //Hide all tabs Div
		$("#"+tabID).slideDown("fast"); //Show target Div
    });
	
	/********************************************
	* Upload Document Tab
	********************************************/
	$(".docOpt").click(function () {
		$(".docs").hide();
		$("#Docs").hide();
		var docSelected = $(this).attr("id");
		$("."+docSelected).show();
	});
});
