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

'+tagsl10n.noPerm+"

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

'+tagsl10n.broken+"

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