//------------------Validation Code----------------------------

	
$.validator.methods.notequal = function(value, element, param) {
	return value != param;
};

$().ready(function() {
	// validate signup form on keyup and submit
	$('#formmailer').validate({
		rules: {
			Name: "required",
			Company: "required",
			PhoneNumb: "required",
			Content: "required",
			email: {
				required: true,
				email: true,
			},
			captcha: {
				required: true,
				remote: 'includes/check_captcha.php'
			}
		},
		messages: {
			Name: "<span style=\"color:red;\"><strong>required</strong>", 
			Company: "<span style=\"color:red;\"><strong>required</strong>", 
			PhoneNumb: "<span style=\"color:red;\"><strong>required</strong>", 
			Content: "<span style=\"color:red;\"><strong>required</strong>", 
			email: {
				required: "Required",
				email: "<br><span style=\"color:red;\">Proper email format required.<br>Example: joe@company.com</span>",
			},
			captcha: {
				required: "required",
				remote: "<span style=\"color:red;\"><strong>wrong answer</strong>"
			}
		}
	});
	
});

//------------------End Validation-----------------------------
