(function(a){function i(b){var d=new Validator("SG_FORM_BUILDER_"+b);b=a("form[name=SG_FORM_BUILDER_"+b+"]");a("input, select, textarea",b).each(function(){var c=a(this),e=c.attr("name"),f=c.attr("validate"),g=c.attr("type"),h="req";nice=e.replace(/sg_form_/,"");nice=nice.replace(/_/g," ");nice=nice.replace(/\[\]/g,"");if(g=="radio"||g=="checkbox"){if(!c.hasClass("first"))return;h="selone_radio"}c.attr("_required")&&d.addValidation(e,h,nice+" is required");f&&d.addValidation(e,f,nice+" must be valid")})}
function j(){a.each(forms,function(b,d){i(d)});window.form_builder_use_tabs&&sgTabs.setup(".show_hide",".sg_tabNavBox")}a(j)})(jQuery);
