$(document).ready(function(){
  


$("#form").validate({
//errorElement:"span",
	rules: {
		cname: {
			required: true,
			maxlength: 12
			},
    	csecondName: {
			required: true,
			maxlength: 14
			},
    	cmail: {
     		 required: true,
     		 email: true
  		  },
    	password: {
    		minlength: 5,
    		required: true
    		},
   		password_again: {
      		equalTo: "#password",
    		required: true
   		 }
  },
invalidHandler:function(form,validator){
	$("p.post_error").html("Attenzione: compilare correttamente i campi del form");
},
validHandler:function(form,validator){
	$("p.post_error").html("");
},
errorPlacement: function(){}

});

});