jQuery(document).ready(function(c){jQuery.fn.extend({createRepeater:function(a={}){function d(e){return e.replace(/\[/g,"_").replace(/\]/g,"").toLowerCase()}function r(e,r,n=!0){var t=e,i=t.data("group");t.find("input,select,textarea").each(function(e,t){var a=c(t).data("name");1!=c(t).data("skip-name")?c(t).attr("name",i+"-"+a+"["+r+"]"):"undefined"!=a&&c(t).attr("name",a),1==n&&c(t).attr("value",""),c(t).attr("id",d(c(t).attr("name"))),c(t).parent().find("label").attr("for",d(c(t).attr("name")))}),c(document).on("click",".dina-repeater-remove",function(){c(this).parents(".dina-repeater-item").remove()}),(e=c("<div class='dina-repeater-item'>"+e.html()+"<div/>")).attr("data-index",r),e.insertBefore(o)}var o=this,n=o.find(".dina-repeater-item"),i=0,e=o.find(".dina-repeater-add");n.each(function(e,t){n.remove(),(a.hasOwnProperty("showFirstItemToDefault")&&1==a.showFirstItemToDefault||1<n.length)&&(r(c(t),i),i++)}),e.on("click",function(){r(c(n[0]),i),i++})}}),c(".dina-repeater-items-pros").createRepeater(),c(".dina-repeater-items-cons").createRepeater()});