// JavaScript Document
$(document).ready(function() {

	// MENU					   
	$("#menu li").find('a').hide();
	$("#menu li").hover(function() {
		$(this).find('a').animate({ opacity: 'show' }, 'slow');
	},function(){
		$(this).find('a').show();
		$(this).find('a').animate({ opacity: 'hide' }, 'slow');
	});

	//HOME PAGE FADE OUTS
	//Default Action
	$(".tab_home_content").hide(); //Hide all content
	$("ul.home-tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_home_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.home-tabs li").click(function() {
		$("ul.tabs li").removeAttr('style');
		$("ul.home-tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_home_content").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
		var currentId = $(this).attr("id");
		if(currentId=="men-1"){
			$("ul.home-tabs").css("background-position", "0 0");
		};
		if(currentId=="men-2"){
			$("ul.home-tabs").css("background-position", "0 -52px");
			//$("#men-1").css("width", "119px");
		};
		if(currentId=="men-3"){
			$("ul.home-tabs").css("background-position", "0 -104px");
			//$("#men-1").css("width", "132px");
			//$("#men-2").css("width", "128px");
		};
		return false;
	});

	//CALLS TO ACTION FANCYBOX
	$(".zoom").fancybox({
		'titleShow'		:	false,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
		'width'			:	560,
		'height'		:	600
	});

	$(".zoom2").fancybox({
		'titleShow'		:	false,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
		'width'			:	560,
		'height'		:	725
	});

	$(".zoom3").fancybox({
		'titleShow'		:	false,
		'zoomSpeedIn'		:	500,
		'zoomSpeedOut'		:	500,
		'width'			:	600,
		'height'		:	550
	});

 });
