// JavaScript Document Fade

 
$(document).ready(function() {
 
	//Default Action
	$(".tabContent").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tabContent:first").show(); //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
		$(".tabContent").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;
	});
	
	//Default Action
	$(".productTabContent").hide(); //Hide all content
	$("ul.productTabs li:first").addClass("active").show(); //Activate first tab
	$(".productTabContent:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.productTabs li").click(function() {
		$("ul.productTabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".productTabContent").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;
	});
	
	//Default Action
	$(".productTabContent").hide(); //Hide all content
	$("ul.productNav li:first").addClass("active").show(); //Activate first tab
	$(".productTabContent:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.productNav li").click(function() {
		$("ul.productNav li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".productTabContent").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
		
		//$('html, body').animate({
//			scrollTop: 
//		}, 2000);
		$('html, body').scrollTop($(activeTab).offset().top)
	
		return false;
	});
 
});

