!function(r){var o=window.jQuery;if("function"!=typeof o||!o.fn.jquery)throw"Fail to init ajaxFormBuilder";var t="ajaxFormBuilder",a=function(r,t){this.init(r,t)};a.prototype={init:function(e){if(o(e).length){o(e).attr("action");var r=o(e).attr("class").match(/formBuilder-(\d+)/);if(r.length){var n=r[1];o(e).submit(function(r){var t=o(e).find("label.required"),i=!0,a="__formerror"+n;if(o("#"+a).remove(),o(t).each(function(r,t){var a=o(t).attr("for");isCaptcha=!1,a.match(/captcha/)&&(isCaptcha=!0);var e="."+a+"-container";o(e).removeClass("container-error"),isCaptcha?eVal=o(t).parents(".container_type_captcha").find("#g-recaptcha-response").val():eVal=o("#"+a).val(),o.trim(eVal)||(i=!1,o(e).addClass("container-error"))}),!i)return o(e).before('There are errors on form. Please fix them before continuing.'),o(e).parent(),r.preventDefault(),r.stopPropagation(),setTimeout(function(){o(e).find('input[type="submit"]').removeAttr("disabled")},100),!1})}}}},o.fn.ajaxFormBuilder=function(r){return this.each(function(){o.data(this,t)||o.data(this,t,new a(this,r))})}}();