// JavaScript Document
$(document).ready(function() {

	$("#menu .cats").hide();

	$("#morecats").toggle(function(){ 
  			$("#menu .cats").slideDown();
			$("#morecats strong").text("Less..."); 
			},function(){ 
  			$("#menu .cats").slideUp();
			$("#morecats strong").text("More..."); 
			});

	// contactform
	$(".conterror").hide();
	$("#contactbutton").click(function(e) {
		e.preventDefault();
		$(".conterror").hide();		
			if ($.trim($("#clname").val()).length<4) { //(|| (!$.trim($("#clname").val()).match(/^[a-zA-Z]+$/))) {
				$(".conterror").fadeIn("fast").html("<span>!</span> You must set your name.");
				$("#clname").focus();
				return false;
			}
			if ($.trim($("#clemail").val()).length<5) {
				$(".conterror").fadeIn("fast").html("<span>!</span> You must set your email address.");
				$("#clemail").focus();
				return false;
			}
			if(!$("#clemail").val().match(/^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i)) {
					$(".conterror").fadeIn("fast").html("<span>!</span> You email address is wrong. Please verify it.");
					$("#clemail").focus();
					return false;
				}
			if ($.trim($("#clsubject").val()).length<5) {
				$(".conterror").fadeIn("fast").html("<span>!</span> You must set the subject of your message.");
				$("#clsubject").focus();
				return false;
			}				
			if ($.trim($("#comment").val()).length==0) {
				$(".conterror").fadeIn("fast").html("<span>!</span> Please type your message to us.");
				$("#comment").focus();
				return false;
		}		
			
		$("#formcont").submit();

	});	



//--------------------------

/*function artFixPNG(element) {
	if (artBrowser.msie && artBrowser.version < 7) {
						alert ("pepe");
	}
}*/

// end documento ready
});
