function ShowTab(t){jQuery(".OptionTab").each((function(){jQuery(this).addClass("HiddenTab"),jQuery(this).removeClass("ActiveTab")})),jQuery("#"+t).removeClass("HiddenTab"),jQuery("#"+t).addClass("ActiveTab"),jQuery(".nav-tab").each((function(){jQuery(this).removeClass("nav-tab-active")})),jQuery("#"+t+"_Menu").addClass("nav-tab-active")}!function(t,e){t(document).on("MyAdminPointers.setup_done",(function(t,n){t.stopImmediatePropagation(),e.setPlugin(n)})),t(document).on("MyAdminPointers.current_ready",(function(t){t.stopImmediatePropagation(),e.openPointer()})),e.js_pointers={},e.first_pointer=!1,e.current_pointer=!1,e.last_pointer=!1,e.visible_pointers=[],e.hasNext=function(t){return"string"==typeof t.next&&""!==t.next&&void 0!==e.js_pointers[t.next].data&&"string"==typeof e.js_pointers[t.next].data.id},e.isVisible=function(n){return-1!==t.inArray(n.id,e.visible_pointers)},e.getPointerData=function(n){var i=t(n.anchor_id);if(-1!==t.inArray(n.id,e.visible_pointers))return{target:i,data:n};for(i=!1;e.hasNext(n)&&!e.isVisible(n);)n=e.js_pointers[n.next].data,e.isVisible(n)&&(i=t(n.anchor_id));return e.isVisible(n)?{target:i,data:n}:{target:!1,data:!1}},e.setPlugin=function(n){"object"==typeof e.last_pointer&&(e.last_pointer.pointer("destroy"),e.last_pointer=!1),e.current_pointer=!1;var i=e.getPointerData(n);i.target&&i.data&&($target=i.target,n=i.data,$pointer=$target.pointer({pointerWidth:n.width,content:n.title+n.content,position:{edge:n.edge,align:n.align},close:function(i){ShowTab(n.nextTab),e.hasNext(n)&&e.setPlugin(e.js_pointers[n.next].data),t.post(ajaxurl,{pointer:n.id,action:"dismiss-wp-pointer"})}}),e.current_pointer={pointer:$pointer,data:n},t(document).trigger("MyAdminPointers.current_ready"))},e.openPointer=function(){var n=e.current_pointer.pointer;t("html, body").animate({scrollTop:n.offset().top-30},300,(function(){e.last_pointer=n;var t=n.pointer("widget");e.setNext(t,e.current_pointer.data),n.pointer("open")}))},e.setNext=function(t,n){if("object"==typeof t){var i=t.find(".wp-pointer-buttons").eq(0),r=i.find("a.close").eq(0);$button=r.clone(!0,!0).removeClass("close"),i.find("a.close").remove(),$button.addClass("button").addClass("button-primary"),has_next=!1,e.hasNext(n)&&(has_next_data=e.getPointerData(e.js_pointers[n.next].data),has_next=has_next_data.target&&has_next_data.data);var a=has_next?e.next_label:e.close_label;$button.html(a).appendTo(i)}},t(e.pointers).each((function(n,i){t().pointer&&(e.js_pointers[i.id]={data:i},t(i.anchor_id).length&&(e.visible_pointers.push(i.id),e.first_pointer||(e.first_pointer=i)),n===e.pointers.length-1&&e.first_pointer&&t(document).trigger("MyAdminPointers.setup_done",e.first_pointer))}))}(jQuery,MyAdminPointers);