$(document).ready(function(){

	InitMenu();

	$("#RData2").mouseover(
		function(){
			$("#filterDiv2").css({"background-color": "#000000","opacity": "1.00"});
			$("#RInf2").fadeIn("slow");
			$("#QMenu1").fadeIn("slow").html($("#QMenu2").html());
			InitPastel();
			InitEngrv();
		}
	);
	$("#RInf2").click(function(){
/*			location.href='http://www.rainbowsapphire.com';*/
		location.href='/rainbow-sapphire-intense/';
	});
	$("#RData3").mouseover(
		function(){
			$("#filterDiv3").css({"background-color": "#000000","opacity": "1.00"});
			$("#RInf3").fadeIn("slow");
			$("#QMenu1").fadeIn("slow").html($("#QMenu3").html());
			InitIntense();
			InitEngrv();
		}
	);
	$("#RInf3").click(function(){
/*			location.href='http://www.rainbowsapphire.com';*/
		location.href='/rainbow-sapphire-pastel/';
	});
	$("#RData4").mouseover(
		function(){
			$("#filterDiv4").css({"background-color": "#000000","opacity": "1.00"});
			$("#RInf4").fadeIn("slow");
			$("#QMenu1").fadeIn("slow").html($("#QMenu4").html());
			InitIntense();
			InitPastel();
		}
	);
	$("#RInf4").click(function(){
/*			location.href='http://www.rainbowsapphire.com';*/
		location.href='/color/';
	});
	$("#menu").bind("mouseleave", function(){
		InitMenu();
	});

	function InitMenu(){
		InitIntense();
		InitPastel();
		InitEngrv();
		$("#QMenu1").fadeIn("slow").html($("#QMenu2").html());
	}
	function InitIntense(){
		$("#filterDiv2").css({"opacity": "0.0"});
		$("#RInf2").fadeOut("slow");
	}
	function InitPastel(){
		$("#filterDiv3").css({"opacity": "0.0"});
		$("#RInf3").fadeOut("slow");
	}
	function InitEngrv(){
		$("#filterDiv4").css({"opacity": "0.0"});
		$("#RInf4").fadeOut("slow");
	}
	$("#button").click(function(){
		$var_username = jQuery.trim($("#txt_username").val());
		$var_pwd = jQuery.trim($("#txt_password").val());
		if($var_username.length == 0){
			$("#txt_username").focus();
			$("#mark_username").text("*");
			return false;
		}
		if($var_pwd.length == 0){
			$("#txt_password").focus();
			$("#mark_password").text("*");
			return false;
		}
	});

	$("#txt_search").Watermark("Style #");
	$("#button2").click(function(){
		$var_search = jQuery.trim($("#txt_search").val());
		if($var_search == "Style #"){
			$("#txt_search").focus();
			return false;
		}
	});
});
