jQuery(function(a){a("table.widefat.wp-list-table tbody th, table.widefat tbody td").css("cursor","move"),a("table.widefat.wp-list-table").sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(a,b){b.item.hasClass("alternate")||b.item.css("background-color","#ffffff"),b.item.children("td, th").css("border-bottom-width","0"),b.item.css("outline","1px solid #aaa")},stop:function(a,b){b.item.removeAttr("style"),b.item.children("td, th").css("border-bottom-width","1px")},update:function(b,c){var d,e,f=c.item.find(".check-column input").val(),g=c.item.find(".parent").html(),h=c.item.prev().find(".check-column input").val(),i=c.item.next().find(".check-column input").val();return void 0!==h&&(d=c.item.prev().find(".parent").html(),d!==g&&(h=void 0)),void 0!==i&&(e=c.item.next().find(".parent").html(),e!==g&&(i=void 0)),void 0===h&&void 0===i||void 0===i&&e===h||void 0!==i&&d===f?void a("table.widefat.wp-list-table").sortable("cancel"):(c.item.find(".check-column input").hide().after('processing'),a.post(ajaxurl,{action:"woocommerce_term_ordering",id:f,nextid:i,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(a){"children"===a?window.location.reload():c.item.find(".check-column input").show().siblings("img").remove()}),void a("table.widefat tbody tr").each(function(){var a=jQuery("table.widefat tbody tr").index(this);a%2===0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});