var JFormValidator=function(){"use strict";var a,b,c,d=function(b,c,d){d=""===d||d,a[b]={enabled:d,exec:c}},e=function(a,b){var c,d=jQuery(b);return!!a&&(c=d.find("#"+a+"-lbl"),c.length?c:(c=d.find('label[for="'+a+'"]'),!!c.length&&c))},f=function(a,b){var c=b.data("label");void 0===c&&(c=e(b.attr("id"),b.get(0).form),b.data("label",c)),a===!1?(b.addClass("invalid").attr("aria-invalid","true"),c&&c.addClass("invalid")):(b.removeClass("invalid").attr("aria-invalid","false"),c&&c.removeClass("invalid"))},g=function(b){var d,e,c=jQuery(b);if(c.attr("disabled"))return f(!0,c),!0;if(c.attr("required")||c.hasClass("required"))if(d=c.prop("tagName").toLowerCase(),"fieldset"===d&&(c.hasClass("radio")||c.hasClass("checkboxes"))){if(!c.find("input:checked").length)return f(!1,c),!1}else if(!c.val()||c.hasClass("placeholder")||"checkbox"===c.attr("type")&&!c.is(":checked"))return f(!1,c),!1;return e=c.attr("class")&&c.attr("class").match(/validate-([a-zA-Z0-9\_\-]+)/)?c.attr("class").match(/validate-([a-zA-Z0-9\_\-]+)/)[1]:"",c.attr("pattern")&&""!=c.attr("pattern")?c.val().length?(h=new RegExp("^"+c.attr("pattern")+"$").test(c.val()),f(h,c),h):(f(!1,c),!1):""===e?(f(!0,c),!0):e&&"none"!==e&&a[e]&&c.val()&&a[e].exec(c.val(),c)!==!0?(f(!1,c),!1):(f(!0,c),!0)},h=function(a){var b,e,f,h,j,k,d=!0,i=[];for(b=jQuery(a).find("input, textarea, select, fieldset"),j=0,k=b.length;j0){for(e=Joomla.JText._("JLIB_FORM_FIELD_INVALID"),f={error:[]},j=i.length-1;j>=0;j--)h=jQuery(i[j]).data("label"),h&&f.error.push(e+h.text().replace("*",""));Joomla.renderMessages(f)}return d},i=function(a){var d,c=[],e=jQuery(a);d=e.find("input, textarea, select, fieldset, button");for(var f=0,i=d.length;f|\"|'|%|;|(|)|&]","i");return!c.test(a)}),d("password",function(a,b){var c=/^\S[\S ]{2,98}\S$/;return c.test(a)}),d("numeric",function(a,b){var c=/^(\d|-)?(\d|,)*\.?\d*$/;return c.test(a)}),d("email",function(a,b){a=punycode.toASCII(a);var c=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;return c.test(a)});for(var e=jQuery("form.form-validate"),f=0,g=e.length;f