(function(n){n.fn.mzForm=function(){function i(n,t){var i;i=t?"block":"none",n.find("em").get(0).style.display=i,u(n,!t)}function u(n,t){var r,i;r=t?"block":"none",i=n.find("p").get(0),i&&(i.style.display=r)}function t(t){var r=n(t.data),f,u,e;if(r.parent("div.input_field")&&r.parent("div.input_field").hasClass("hidden"))u=!0;else if(r.data("validate")){if(f=r.parent(),r.attr("type")=="checkbox")u=r.val();else{e=r.data("validate");switch(e){case"url":e="^https?://.+$"}u=new RegExp(e).test(n.trim(r.val()))}i(f,!u)}else r.data("same")?(f=r.parent(),u=n(input.data("same")).val()===r.val(),i(f,!u)):u=!0;return u}if(this.data("mzform"))return this.data("mzform");$this=n(this);var r=$this.find("input[data-validate]");return r.each(function(){n(this).on("blur",n(this),t).on("keyup",n(this),t).css({color:"#999"}).on("focus",function(){n(this).css({color:"#333"})}).on("blur",function(){n(this).css({color:"#999"})})}),$this.validate=function(){var i=!0;return r.each(function(){var r=t({data:n(this)});r||(i=!1)}),i},$this.data("mzform",$this),$this}})(jQuery)