$(function() {
	// disable the enter key when not input[type="submit"]
	$("input[type=\"text\"], input[type=\"radio\"], input[type=\"checkbox\"], select").keydown(
		function(e)
		{
			if (e.which == 13)
			{
				return false;
			}
			else
			{
				return true;
			}
		}
	);
	
	$("ul#FeatureFade").innerfade( { speed: 1000, timeout: 5000, type: "sequence", containerheight: "320px" } );
	
	//$("#USMap").maphilight( { fillColor: "C1BDB8", strokeColor: "767879", alwaysOn: true } );
	$("#USMap").maphilight( { fillColor: "005894", strokeColor: "008BC9", alwaysOn: true } );
	$("#USMap").maphilight( { fillColor: "005894", strokeColor: "008BC9", alwaysOn: true } );
	//$("#USMap").maphilight( { fillColor: "635134", strokeColor: "AE7059", alwaysOn: true } );
	//$("#USMap").maphilight( { fillColor: "FF6666", strokeColor: "FF9999", alwaysOn: true } );
	
	// workaround to applying hover state to non-anchor tags in IE6
	$("#LoginSubmitButton2, #RegisterSubmitButton, #EditMyProfileSubmitButton, #TellAFriendSubmitButton, #ContactUsSubmitButton, #CLSubmitButton").hover(
		function()
		{
			$(this).css( { "background" : "url(images/bg-btnBrown.gif) 0 -204px no-repeat" } );
		},
		function()
		{
			$(this).css( { "background" : "url(images/bg-btnBrown.gif) 0 -168px no-repeat" } );
		}
	);
	
	// workaround to applying hover state to non-anchor tags in IE6
	$(".btnLogin").hover(
		function()
		{
			$(this).css( { "background" : "url(images/bg-btnLogin.gif) no-repeat 0 -25px" } );
		},
		function()
		{
			$(this).css( { "background" : "url(images/bg-btnLogin.gif) no-repeat left top" } );
		}
	);
	
	// workaround to applying focus in IE
	$("input.text, select, textarea").focus(
		function()
		{
			$(this).css( { "border-color" : "#834935" } );
		}
	);
	
	$("input.text, select, textarea").blur(
		function()
		{
			$(this).css( { "border-color" : "#D9C6AB" } );
		}
	);
	
	// workaround to applying focus in IE
	$("#LoginArea input.text").focus(
		function()
		{
			$(this).css( { "border-color" : "#6FBECF" } );
		}
	);
	
	$("#LoginArea input.text").blur(
		function()
		{
			$(this).css( { "border-color" : "#AADEE9" } );
		}
	);
});