$().ready(function() {
		var validator = $("#Form").bind("invalid-form.validate", function() {
			$("#drawer").html("Your form contains " + validator.numberOfInvalids() + " errors. Errors have a <samp style=\"color:red\"><strong>red</strong></samp> background.");
		}).validate({
			
			errorContainer: $("#drawer"),
		
			//Setup our validation rules
			 rules: {
				vericode: {
				   required: true,
				   minlength: 3
				},
				email: {
					required: true,
					email: true
				}
			},		
			
			//Execute this Function if Form is invalid
			 invalidHandler: function(form, validator) {		    
				
				//alert("Error");
				
				//Fancy drawer function from jquery.tools
				$("#drawer").slideDown(function()  {		
					// colored flash effect
					$("#drawer").css("backgroundColor", "#B21D23");
					setTimeout(function() { $("#drawer").css("backgroundColor", "#87A3BC"); }, 1000);
				});
				
			 },
			 
			 submitHandler: function(form) {			
				//on SUCCESFUL submit, slide that SHIZ up!
				$("#drawer").slideUp();	
				form.submit();//VERY IMPORTANT!
			 }
		
	});
		
});