$(document).ready(function() {
	$("#Signup").validate({
		rules: {
			email: {
				required: true,
				remote: "/ajax/emailexists/",
				email: true
			},
			password: {
				required: true,				
				minlength: 6
			},			
			password_confirm: {
				required: true,
				equalTo: "#password"
			},
		},
		messages: {
			email: {
  			    remote: jQuery.format("{0} has already an account with us. Please try again <br />	or use the \"Forgot Password\" option  to retrieve your password."), 
				required: "Please type your e-mail address in the format yourname@example.com."
			},
			password: {
				required: "This field is required.",
				minlength: jQuery.format("Your password must be at least 6 characters long. Please try another one.")
			},
			password_confirm: {
				requierd: "You must enter the same password twice in order to confirm it.",
			}		
		},
		onkeyup: false
	})
});
