// extend the current rules with new groovy ones

// this one requires the value to be the same as the first parameter
	$.validator.methods.equal = function(value, element, param) {
		return value == param;
	};
	
	$.meta.setType("attr", "valide");

	$().ready(function() {
		var validator = $("#formcontact").validate({
			debug: false,
			errorElement: "em",
			errorContainer: $("#warning"),
			showErrors: function(errors, errorList) {
				//$("#summary").html("Your form contains " + errorList.length + " errors, see details below.");
				validator.defaultShowErrors();
			},
			errorPlacement: function(error, element) {
				error.appendTo( element.parent("div"));
			},
			success: function(label) {
				label.text("ok!").addClass("success");
			}
		});
		
		var i = 0;
	});