jQuery(function($){initPopovers();$("body").on("subform-row-add",initPopovers);function initPopovers(event,container){$(container||document).find(".hasPopover").popover({"html":!0,"trigger":"hover focus","container":"body"})}});jQuery(document).ready(function(){var ajax;var country_select=jQuery("#jform_djcatalog2profile_country_id");var state_select=jQuery("#jform_djcatalog2profile_state_id");var init_val="0";var show_null=!1;var country=0;function loadStates(country){if(ajax&&ajax.readyState!=4){ajax.abort()} ajax=jQuery.ajax({type:"GET",url:"/en/component/djcatalog2/?task=getStatesByCountry",data:"country= "+country+"&format=raw&ts="+Date.now()}).done(function(response){var resp;try{resp=jQuery.parseJSON(response)}catch(e){return} for(var i in resp){if(resp.hasOwnProperty(i)){var new_opt=jQuery("