$(document).ready(function() {
			//Default Action
			$(".tab_content, .tab_content1").hide(); //Hide all content
			$("caption").hide();
			$("ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab1 ul.tabs li:first").addClass("active").show(); //Activate first tab
			$(".tab_content:first").show(); //Show first tab content
			$(".tab_content1:first").show(); //Activate first tab
			
			//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
				var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
					$(activeTab).fadeIn();		
					$(".tab_content1").hide();
					
				if(activeTab == '#tab6' || activeTab == '#tab7' || activeTab == '#tab8' || activeTab == '#tab9') {
					$('ul.tabs li').eq(0).addClass("active");
				} else {
					$(".tab_content").hide(); //Hide all tab content
				}
				
				if(activeTab == '#tab1') {
					$("#tab1 ul.tabs li:first").addClass("active").show();
					$(".tab_content1").hide();
					$(".tab_content1:first").show(); //Activate first tab
				}
				
				$(activeTab).fadeIn(); //Fade in the active content

				return false;

			});
		});