jQuery(document).ready(function(i){var p=!1;i("#the-list").on("click",".delete-tag",function(){var t,e=i(this),n=e.parents("tr"),a=!0;return"undefined"!=showNotice&&(a=showNotice.warn()),a&&(t=e.attr("href").replace(/[^?]*\?/,"").replace(/action=delete/,"action=delete-tag"),i.post(ajaxurl,t,function(e){"1"==e?(i("#ajax-response").empty(),n.fadeOut("normal",function(){n.remove()}),i('select#parent option[value="'+t.match(/tag_ID=(\d+)/)[1]+'"]').remove(),i("a.tag-link-"+t.match(/tag_ID=(\d+)/)[1]).remove()):("-1"==e?i("#ajax-response").empty().append('

'+tagsl10n.noPerm+"

"):i("#ajax-response").empty().append('

'+tagsl10n.broken+"

"),n.children().css("backgroundColor",""))}),n.children().css("backgroundColor","#f33")),!1}),i("#edittag").on("click",".delete",function(e){if("undefined"==typeof showNotice)return!0;showNotice.warn()||e.preventDefault()}),i("#submit").click(function(){var o=i(this).parents("form");return validateForm(o)&&(p||(p=!0,o.find(".submit .spinner").addClass("is-active"),i.post(ajaxurl,i("#addtag").serialize(),function(e){var t,n,a,s,r;if(p=!1,o.find(".submit .spinner").removeClass("is-active"),i("#ajax-response").empty(),(t=wpAjax.parseAjaxResponse(e,"ajax-response"))&&!t.errors){if(0<(n=o.find("select#parent").val())&&0'+s+a.name+"")}i('input[type="text"]:visible, textarea:visible',o).val("")}}))),!1})});