$(document).ready(function() {

var b = navigator.userAgent.toLowerCase();
	// Figure out what browser is being used
	$.browser = {
		safari: /webkit/.test(b),
		opera: /opera/.test(b),
		camino: /camino/.test(b),
		msie: /msie/.test(b) && !/opera/.test(b),
		msie6: /msie 6.0/.test(b) && !/opera/.test(b),
		mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
	};

if( !$.browser.msie6 )
{

	$("#nav-one li").hover(
		function() {
			$("ul", this).fadeIn("normal");
			$("ul", this).slideDown("normal");
		}, 
		function() { } 
		);
} else {
	$("#nav-one li").hover(
		function() {
			$("ul", this).fadeIn("fast");
		}, 
		function() { } 
		);
	
}

	$("#nav-two li").hover(
		function() {
			$("ul", this).fadeIn("fast");
		}, 
		function() { } 
	);

	if (document.all)
	{
		$("#nav-one li").hoverClass ("sfHover");
		$("#nav-two li").hoverClass ("sfHover");
	}

	// tooltip();



	$("#ro1").hover(
		function() {
			thisMovie("alt_products_woman").swfFunc(1, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro1").mouseout(
		function() {
			thisMovie("alt_products_woman").swfFunc(1, "hide");
			$(this).css("font-weight", "400");
		}
	);
	$("#ro2").hover(
		function() {
			thisMovie("alt_products_woman").swfFunc(2, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro2").mouseout(
		function() {
			thisMovie("alt_products_woman").swfFunc(2, "hide");
			$(this).css("font-weight", "400");
		}
	);
	$("#ro3").hover(
		function() {
			thisMovie("alt_products_woman").swfFunc(3, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro3").mouseout(
		function() {
			thisMovie("alt_products_woman").swfFunc(3, "hide");
			$(this).css("font-weight", "400");
		}
	);

	$("#ro4").hover(
		function() {
			thisMovie("alt_products_man").swfFunc(1, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro4").mouseout(
		function() {
			thisMovie("alt_products_man").swfFunc(1, "hide");
			$(this).css("font-weight", "400");
		}
	);
	$("#ro5").hover(
		function() {
			thisMovie("alt_products_man").swfFunc(2, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro5").mouseout(
		function() {
			thisMovie("alt_products_man").swfFunc(2, "hide");
			$(this).css("font-weight", "400");
		}
	);
	$("#ro6").hover(
		function() {
			thisMovie("alt_products_man").swfFunc(3, "glow");
			$(this).css("font-weight", "800");
		}
	);
	$("#ro6").mouseout(
		function() {
			thisMovie("alt_products_man").swfFunc(3, "hide");
			$(this).css("font-weight", "400");
		}
	);

});

function jsFunc(txt, action)
{
	if(txt == 'txt1')
	{
		if(action == 'glow')
		{
			$('#ro1').css("font-weight", "800");
			$('#ro4').css("font-weight", "800");
		}
		else
		{
			$('#ro1').css("font-weight", "400");
			$('#ro4').css("font-weight", "400");
		}
	}
	if(txt == 'txt2')
	{
		if(action == 'glow')
		{
			$('#ro2').css("font-weight", "800");
			$('#ro5').css("font-weight", "800");
		}
		else
		{
			$('#ro2').css("font-weight", "400");
			$('#ro5').css("font-weight", "400");
		}
	}
	if(txt == 'txt3')
	{
		if(action == 'glow')
		{
			$('#ro3').css("font-weight", "800");
			$('#ro6').css("font-weight", "800");
		}
		else
		{
			$('#ro3').css("font-weight", "400");
			$('#ro6').css("font-weight", "400");
		}
	}
}

function thisMovie(movieName) {
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}  

	$.fn.hoverClass = function(c) {
		return this.each(function(){
			$(this).hover( 
				function() { $(this).addClass(c);  },
				function() { $(this).removeClass(c); }
			);
		});
	};

	

// this.tooltip = function(){	
// 	xOffset = -15;
// 	yOffset = 15;		
// 	$("area.tooltip").hover(function(e){											  
// 		this.t = this.title;
// 		this.title = "";									  
// 		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
// 		$("#tooltip")
// 			.css("top",(e.pageY - xOffset) + "px")
// 			.css("left",(e.pageX + yOffset) + "px")
// 			.fadeIn(100);		
//     },
// 	function(){
// 		this.title = this.t;		
// 		$("#tooltip").remove();
//     });	
// 	$("area.tooltip").mousemove(function(e){
// 		$("#tooltip")
// 			.css("top",(e.pageY - xOffset) + "px")
// 			.css("left",(e.pageX + yOffset) + "px");
// 	});			
// };