").parent();a(".wijmo-wijmenu-current",d).removeClass("wijmo-wijmenu-current");c.animate({left:0},e.showDuration,function(){a(this).find("ul").each(function(){a(this).hide();b._resetDrillChildMenu(a(this))});c.addClass("wijmo-wijmenu-current")});a(".wijmo-wijmenu-all-lists",d).find("span").remove();h.empty().append(f);a(".wijmo-wijmenu-footer",d).empty().hide();b._checkDrillMenuHeight(c,g,b.domObject.scrollcontainer)},_drilldown:function(){var b=this,c=b.rootMenu,h=c.wrap("
").parent().css("position","relative"),d=b.domObject.menucontainer.attr("role","menu"),g=b.domObject.scrollcontainer,e=b.options,i,f=a(''),l=a('"),o=e.backLink?e.backLinkText:e.topLinkText,m=e.backLink?"wijmo-wijmenu-prev-list":"wijmo-wijmenu-all-lists",k=e.backLink?"ui-state-default ui-corner-all":"",n=e.backLink?'
':"",j=a('
'+n+o+"");d.addClass("wijmo-wijmenu-ipod wijmo-wijmenu-container");if(e.backLink)f.addClass("wijmo-wijmenu-footer").appendTo(d).hide();else f.addClass("wijmo-wijmenu-header").prependTo(d);!e.backLink&&f.append(l);c.addClass("wijmo-wijmenu-content wijmo-wijmenu-current ui-widget-content ui-helper-clearfix").css({width:d.width()}).find("ul").css({width:d.width(),left:d.width()}).attr("role","menu").attr("aria-activedescendant","ui-active-menuitem").addClass("ui-widget-content");h.height(b.rootMenu.height());b._sroll();if(b._hasScroll()){i=5;if(c.children(":first").children(":first").length>0)i=c.children(":first").children(":first").css("padding-left").replace(/px/g,"");c.width(g.find(".wijmo-wijsuperpanel-contentwrapper:first").width()-i)}b.element.data("firstLeftValue",parseFloat(c.css("left")));a("li>.wijmo-wijmenu-link",c).each(function(){if(a(this).next().is("ul"))a(this).click(function(r){var o=a(this).next(),p=a(this).parents("ul:eq(0)"),m=p.data("topmenu")?0:parseFloat(c.css("left")),n,k,q=Math.round(m-parseFloat(d.width())),i=a(".wijmo-wijmenu-footer",d),l=function(f){var j=f,e=a(".wijmo-wijmenu-current",d),c;if(e.get(0)===b.rootMenu.get(0))return;c=e.parents("ul:eq(0)");e.hide().attr("aria-expanded","false");b._resetDrillChildMenu(e);b._checkDrillMenuHeight(c,h,g);c.addClass("wijmo-wijmenu-current").attr("aria-expanded","true");if(c.hasClass("wijmo-wijmenu-content")){j.remove();i.hide()}};b._resetDrillChildMenu(p);b._checkDrillMenuHeight(o,h,g);b._slidingAnimation(c,q,null);o.show().addClass("wijmo-wijmenu-current").attr("aria-expanded","true");if(e.backLink){if(i.find("a").size()===0){i.show();a('
'+e.backLinkText+"").appendTo(i).click(function(){var f=a(this),e;c.stop(true,true);e=parseInt(c.css("left"),10)+parseInt(d.width(),10);if(e>m)return;b._slidingAnimation(c,e,function(){l(f)})})}}else{if(f.find("li").size()===1){f.empty().append(j);j.find("a").click(function(){b._resetDrilldownMenu(f)})}a(".wijmo-wijmenu-current-crumb",d).removeClass("wijmo-wijmenu-current-crumb");n=a(this).find("span:eq(0)").text();k=a('");k.appendTo(f).find("a").click(function(){if(!a(this).parent().is(".wijmo-wijmenu-current-crumb")){var d=-(a(".wijmo-wijmenu-current").parents("ul").size()-1)*180;b._slidingAnimation(c,d,function(){l()});a(this).parent().addClass("wijmo-wijmenu-current-crumb").find("span").remove();a(this).parent().nextAll().remove()}});k.prev().append('
')}a(this).attr("href")==="#"&&r.preventDefault()});else a(this).click(function(c){b.activate(c,a(this).parent());b.select(c);if(e.trigger){var g=b._getTriggerEle();if(g.length){b._hideSubmenu(d);b._resetDrilldownMenu(f)}}a(this).attr("href")==="#"&&c.preventDefault()})})},_slidingAnimation:function(d,c,b){var a=this.options.slidingAnimation;if(a&&!a.disabled)d.stop(true,true).animate({left:c},a.duration,a.easing,b);else{d.css("left",c);b.call(this)}},_killDrilldown:function(){var c=this.rootMenu,b=this.domObject,e={width:"",height:""},d;c.css(e).removeClass("ui-widget-content");b.scrollcontainer.css(e);d=a(".wijmo-wijsuperpanel-statecontainer",b.scrollcontainer);b.scrollcontainer.append(c);d.remove();b.menucontainer.removeClass("wijmo-wijmenu-ipod wijmo-wijmenu-container");a(".wijmo-wijmenu-current",b.menucontainer).removeClass("wijmo-wijmenu-current");a(".wijmo-wijmenu-breadcrumb",b.menucontainer).remove();c.find("li").each(function(){var b=a(this).children(":first");b.unbind("click")});a("ul",c).css({left:"",width:""});c.css("left","")},_getItemByValue:function(c){var b=this.rootMenu.find("a.wijmo-wijmenu-link").filter(function(){return a(this).text()===c});return b.length>0?b.eq(0).parent():null},_displaySubmenu:function(j,f,b){var c=this,d=c.options,g,e,h,i=a.wijmo.wijmenu.animations;f.is("a.wijmo-wijmenu-link")&&f.addClass("ui-state-active");b.show();c._setPosition(f,b);c.nowIndex++;c._setZindex(b,c.nowIndex);b.hide();c._trigger("showing",j,b);if(a.fn.wijshow){g={context:b,show:true};e="left";if(d.orientation==="horizontal")if(b.parent().closest("ul").get(0)===this.rootMenu.get(0))e="up";h=a.extend({},{option:{direction:e}},d.animation,d.showAnimation);b.wijshow(h,i,g,null,function(){var c=a.browser;if(c.msie&&c.version==="9.0"){b.wrap("
");b.unwrap()}else c.msie&&c.version==="6.0"&&b.css("overflow","");b.attr("aria-hidden",false)})}else b.show().attr("aria-hidden",false);c._isClickToOpen=d.triggerEvent==="click";if(!b.is(".wijmo-wijmenu")){if(c.currentMenuList===undefined)c.currentMenuList=[];c.currentMenuList.push(b)}},_hideCurrentSubmenu:function(b){var c=this;b.find("ul").each(function(){!a(this).data("notClose")&&c._hideSubmenu(a(this))})},_hideSubmenu:function(b){var d=this,g=d.options,h=a.wijmo.wijmenu.animations,e,c,f;b.prev().is(".wijmo-wijmenu-link")&&b.prev().removeClass("ui-state-active");if(a.fn.wijhide){e={context:b,show:false};f=a.extend({},g.animation,g.hideAnimation);b.wijhide(f,h,e,null,function(){d._setZindex(b);b.attr("aria-hidden",true)})}else{b.hide().attr("aria-hidden",true);d._setZindex(b)}this.element.data("shown",false);c=this.currentMenuList;if(c){c=a.map(c,function(a){return a&&a.get(0)===b.get(0)?null:a});this.currentMenuList=a.makeArray(c)}},_setZindex:function(c,e){var f=this.rootMenu,d=this.domObject,b;if(!d)return;b=d.menucontainer;if(c.get(0)===b.get(0))return;if(e){c.parent().css("z-index",10);c.css("z-index",e);b.css("z-index")===0&&b.css("z-index",9950)}else{c.css("z-index","");c.parent().css("z-index","");a.browser.msie&&a.browser.version<8&&a("ul:visible",f).length===0&&b.css("z-index","")}},_setPosition:function(c,b){b.css({left:"0",top:"0",position:"absolute"});var d=this._getPosition(c),e={of:c};b.position(a.extend(e,d))},_getPosition:function(c){var d=this.options,b={my:"left top",at:"right top"};if(d.orientation==="horizontal")if(c.closest("ul").get(0)===this.rootMenu.get(0))b={my:"left top",at:"left bottom"};if(!c.is(".wijmo-wijmenu-link"))b={my:"left top",at:"left bottom"};b=a.extend(b,d.position);return b}});a.extend(a.wijmo.wijmenu,{animations:{slide:function(b,c){b=a.extend({duration:400,easing:"swing"},b,c);if(b.show)b.context.stop(true,true).animate({height:"show"},b).attr("aria-hidden",false);else b.context.stop(true,true).animate({height:"hide"},b).attr("aria-hidden",true)}}})})(jQuery);
-(function(a){"use strict";var e=0,d=0;function c(){return++e}function b(){return++d}a.widget("wijmo.wijtabs",{options:{alignment:"top",sortable:false,scrollable:false,ajaxOptions:null,cache:false,cookie:null,collapsible:false,hideOption:null,showOption:null,disabled:[],event:"click",idPrefix:"ui-tabs-",panelTemplate:"
",spinner:"
Loading…",tabTemplate:'
#{label}',add:null,remove:null,select:null,show:null,load:null,disable:null,enable:null},_create:function(){this._tabify(true)},_setOption:function(c,b){a.Widget.prototype._setOption.apply(this,arguments);switch(c){case"selected":if(this.options.collapsible&&b==this.options.selected)return;this.select(b);break;case"alignment":this.destroy();this._tabify(true);break;default:this._tabify()}},_initScroller:function(){var c=a.inArray(this._getAlignment(),["top","bottom"])!=-1;if(!c)return;var b=0;this.lis.each(function(){b+=a(this).outerWidth(true)});if(!!this.options.scrollable&&this.element.innerWidth()
");this.scrollWrap=this.list.parent();a.effects.save(this.list,["width","height","overflow"])}this.list.width(b+2);this.scrollWrap.height(this.list.outerHeight(true));this.scrollWrap.wijsuperpanel({allowResize:false,hScroller:{scrollMode:"edge"},vScroller:{scrollBarVisibility:"hidden"}})}else this._removeScroller()},_removeScroller:function(){if(this.scrollWrap){this.scrollWrap.wijsuperpanel("destroy").replaceWith(this.scrollWrap.contents());this.scrollWrap=undefined;a.effects.restore(this.list,["width","height","overflow"])}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+c()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+b());return a.cookie.apply(null,[c].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_getAlignment:function(b){b=b===undefined?true:b;var a=this.options.alignment||"top";if(b)return a;switch(a){case"top":a="bottom";break;case"bottom":a="top";break;case"left":a="right";break;case"right":a="left"}return a},_saveLayout:function(){var b=["width","height","overflow"];a.effects.save(this.element,b);a.effects.save(this.list,b);a.effects.save(this.element.find(".wijmo-wijtabs-content"),b);this.list.width(this.list.width());$hide=this.panels.filter(":not(.ui-tabs-hide)");this.element.data("panel.width",$hide.width());this.element.data("panel.outerWidth",$hide.outerWidth(true))},_restoreLayout:function(){var b=["width","height","overflow"];a.effects.restore(this.element,b);a.effects.restore(this.list,b);a.effects.restore(this.element.find(".wijmo-wijtabs-content"),b)},_hideContent:function(){var a=this.element.find(".wijmo-wijtabs-content");if(a.length){this._saveLayout();a.addClass("ui-tabs-hide").attr("aria-hidden",true);this.element.width(this.list.outerWidth(true))}},_showContent:function(){var a=this.element.find(".wijmo-wijtabs-content");if(a.length){this._restoreLayout();a.removeClass("ui-tabs-hide").attr("aria-hidden",false)}},_blindPanel:function(b,c){var i=this.options,h=b.parent(".wijmo-wijtabs-content");if(!h.length)return;this.list.width(this.list.width());var j=["position","top","left","width"];a.effects.save(b,j);b.show();if(c=="show"){b.removeClass("ui-tabs-hide").attr("aria-hidden",false);b.width(this.element.data("panel.width"))}else b.width(b.width());var e=c=="show"?i.showOption:i.hideOption,f=a.effects.createWrapper(b).css({overflow:"hidden"});c=="show"&&f.css(a.extend({width:0},e.fade?{opacity:0}:{}));var k=a.extend({width:c=="show"?this.element.data("panel.outerWidth"):0},e.fade?{opacity:c=="show"?1:0}:{}),d=this,g=this.list.outerWidth(true);f.animate(k,{duration:e.duration,step:function(){var a=f.outerWidth(true);d.element.width(g+a);h.width(Math.max(0,d.element.innerWidth()-g-6))},complete:function(){if(c=="hide"){d.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);b.addClass("ui-tabs-hide").attr("aria-hidden",true)}else b.css("width","");a.effects.removeWrapper(b);c=="show"&&d._restoreLayout();d._resetStyle(b);b.dequeue();d.element.dequeue("tabs")}})},_resetStyle:function(b){b.css({display:""});!a.support.opacity&&b[0].style.removeAttribute("filter")},_normalizeBlindOption:function(a){if(a.blind===undefined)a.blind=false;if(a.fade===undefined)a.fade=false;if(a.duration===undefined)a.duration=200;if(typeof a.duration=="string")try{a.duration=parseInt(a.duration,10)}catch(b){a.duration=200}},_tabify:function(n){this.list=this.element.find("ol,ul").eq(0);this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var c=this,b=this.options,m=/^#.+/;this.anchors.each(function(j,e){var d=a(e).attr("href"),g=d.split("#")[0],i;if(g&&(g===location.toString().split("#")[0]||(i=a("base")[0])&&g===i.href)){d=e.hash;e.href=d}if(m.test(d))c.panels=c.panels.add(c._sanitizeSelector(d));else if(d!="#"){a.data(e,"href.tabs",d);a.data(e,"load.tabs",d.replace(/#.*$/,""));var h=c._tabId(e);e.href="#"+h;var f=a("#"+h);if(!f.length){f=a(b.panelTemplate).attr("id",h).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(c.panels[j-1]||c.list);f.data("destroy.tabs",true)}c.panels=c.panels.add(f)}else b.disabled.push(j)});var d=this._getAlignment(),l=this._getAlignment(false);if(n){this.list.attr("role","tablist");this.lis.attr("role","tab");this.panels.attr("role","tabpanel");this.element.addClass("ui-tabs wijmo-wijtabs ui-tabs-"+d+" ui-widget ui-widget-content ui-corner-all ui-helper-clearfix");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-"+d);this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-"+l);var f;switch(d){case"bottom":this.list.appendTo(this.element);break;case"left":f=a("
").addClass("wijmo-wijtabs-content").appendTo(this.element);this.panels.appendTo(f);break;case"right":f=a("
").addClass("wijmo-wijtabs-content").insertBefore(this.list);this.panels.appendTo(f);break;case"top":this.list.prependTo(this.element)}if(b.selected===undefined){location.hash&&this.anchors.each(function(c,a){if(a.hash==location.hash){b.selected=c;return false}});if(typeof b.selected!="number"&&b.cookie)b.selected=parseInt(c._cookie(),10);if(typeof b.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));b.selected=b.selected||(this.lis.length?0:-1)}else if(b.selected===null)b.selected=-1;b.selected=b.selected>=0&&this.anchors[b.selected]||b.selected<0?b.selected:0;b.disabled=a.unique(b.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a){return c.lis.index(a)}))).sort();a.inArray(b.selected,b.disabled)!=-1&&b.disabled.splice(a.inArray(b.selected,b.disabled),1);this.panels.addClass("ui-tabs-hide").attr("aria-hidden",true);this.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);if(b.selected>=0&&this.anchors.length){this.panels.eq(b.selected).removeClass("ui-tabs-hide").attr("aria-hidden",false);this.lis.eq(b.selected).addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[b.selected],c.panels[b.selected]))});this.load(b.selected)}a(window).bind("unload",function(){c.lis&&c.lis.add(c.anchors).unbind(".tabs");c.lis=c.anchors=c.panels=null})}else b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[b.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");b.cookie&&this._cookie(b.selected,b.cookie);for(var g=0,e;e=this.lis[g];g++){a(e)[a.inArray(g,b.disabled)!=-1&&!a(e).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");a(e).hasClass("ui-state-disabled")&&a(e).attr("aria-disabled",true)}b.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(b.event!="mouseover"){var i=function(b,a){a.is(":not(.ui-state-disabled)")&&a.addClass("ui-state-"+b)},h=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))});this.lis.bind("mouseout.tabs",function(){h("hover",a(this))});this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){h("focus",a(this).closest("li"))})}if(b.showOption===undefined||b.showOption===null)b.showOption={};this._normalizeBlindOption(b.showOption);if(b.hideOption===undefined||b.hideOption===null)b.hideOption={};this._normalizeBlindOption(b.hideOption);var k=(b.showOption.blind||b.showOption.fade)&&b.showOption.duration>0?function(g,e){a(g).closest("li").addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c._showContent();e.removeClass("ui-tabs-hide").attr("aria-hidden",false);if(d=="top"||d=="bottom"){var f={duration:b.showOption.duration};if(b.showOption.blind)f.height="toggle";if(b.showOption.fade)f.opacity="toggle";e.hide().removeClass("ui-tabs-hide").attr("aria-hidden",false).animate(f,b.showOption.duration||"normal",function(){c._resetStyle(e);c._trigger("show",null,c._ui(g,e[0]))})}else{c._showContent();c._blindPanel(e,"show")}}:function(b,d){a(b).closest("li").addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c._showContent();d.removeClass("ui-tabs-hide").attr("aria-hidden",false);c._trigger("show",null,c._ui(b,d[0]))},j=(b.hideOption.blind||b.hideOption.fade)&&b.hideOption.duration>0?function(f,a){if(d=="top"||d=="bottom"){var e={duration:b.hideOption.duration};if(b.hideOption.blind)e.height="toggle";if(b.hideOption.fade)e.opacity="toggle";a.animate(e,b.hideOption.duration||"normal",function(){c.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);a.addClass("ui-tabs-hide").attr("aria-hidden",true);c._resetStyle(a);c.element.dequeue("tabs")})}else{c._saveLayout();c._blindPanel(a,"hide")}}:function(b,a){c.lis.removeClass("ui-tabs-selected ui-state-active").attr("aria-selected",false);c._hideContent();a.addClass("ui-tabs-hide").attr("aria-hidden",true);c.element.dequeue("tabs")};this.anchors.bind(b.event+".tabs",function(){var g=this,f=a(this).closest("li"),d=c.panels.filter(":not(.ui-tabs-hide)"),e=a(c._sanitizeSelector(this.hash));if(f.hasClass("ui-tabs-selected")&&!b.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||c._trigger("select",null,c._ui(this,e[0]))===false){this.blur();return false}b.selected=c.anchors.index(this);c.abort();if(b.collapsible)if(f.hasClass("ui-tabs-selected")){b.selected=-1;b.cookie&&c._cookie(b.selected,b.cookie);c.element.queue("tabs",function(){j(g,d)}).dequeue("tabs");this.blur();return false}else if(!d.length){b.cookie&&c._cookie(b.selected,b.cookie);c.element.queue("tabs",function(){k(g,e)});c.load(c.anchors.index(this));this.blur();return false}b.cookie&&c._cookie(b.selected,b.cookie);if(e.length){d.length&&c.element.queue("tabs",function(){j(g,d)});c.element.queue("tabs",function(){k(g,e)});c.load(c.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&&this.blur()});this._initScroller();this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var c=this.options;this.abort();this._removeScroller();this.element.unbind(".tabs").removeClass(["wijmo-wijtabs","ui-tabs-top","ui-tabs-bottom","ui-tabs-left","ui-tabs-right","ui-tabs","ui-widget","ui-widget-content","ui-corner-all","ui-tabs-collapsible","ui-helper-clearfix"].join(" ")).removeData("tabs").removeAttr("role");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.each(function(){var b=a.data(this,"href.tabs");if(b)this.href=b;var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(b,a){c.removeData(a+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs"))a(this).remove();else a(this).removeClass(["ui-state-default","ui-corner-top","ui-corner-bottom","ui-corner-left","ui-corner-right","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-tabs-hide"].join(" ")).css({position:"",left:"",top:""}).removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-selected").removeAttr("aria-disabled")});var b=a(".wijmo-wijtabs-content");b.length&&b.replaceWith(b.contents());c.cookie&&this._cookie(null,c.cookie);return this},add:function(g,k,b){if(b===undefined)b=this.anchors.length;var f=this,e=this.options,d=a(e.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,k)),h=!g.indexOf("#")?g.replace("#",""):this._tabId(a("a",d)[0]),j=this._getAlignment(),i=this._getAlignment(false);d.addClass("ui-state-default ui-corner-"+j).data("destroy.tabs",true).attr("role","tab").attr("aria-selected",false);var c=a("#"+h);if(!c.length)c=a(e.panelTemplate).attr("id",h).data("destroy.tabs",true).attr("role","tabpanel");c.addClass("ui-tabs-panel ui-widget-content ui-corner-"+i+" ui-tabs-hide").attr("aria-hidden",true);if(b>=this.lis.length){d.appendTo(this.list);if(this.panels.length>0)c.insertAfter(this.panels[this.panels.length-1]);else c.appendTo(this.list[0].parentNode)}else{d.insertBefore(this.lis[b]);c.insertBefore(this.panels[b])}e.disabled=a.map(e.disabled,function(a){return a>=b?++a:a});this._tabify();if(this.anchors.length==1){e.selected=0;d.addClass("ui-tabs-selected ui-state-active").attr("aria-selected",true);c.removeClass("ui-tabs-hide").attr("aria-hidden",false);this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]));return this},remove:function(b){var d=this.options,c=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();c.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(b+(b+1
=b?--a:a});this._tabify();this._trigger("remove",null,this._ui(c.find("a")[0],e[0]));return this},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1)return;this.lis.eq(b).removeClass("ui-state-disabled").removeAttr("aria-disabled");c.disabled=a.grep(c.disabled,function(a){return a!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this},disable:function(a){var c=this,b=this.options;if(a!=b.selected){this.lis.eq(a).addClass("ui-state-disabled").attr("aria-disabled",true);b.disabled.push(a);b.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))}return this},select:function(a){if(typeof a=="string")a=this.anchors.index(this.anchors.filter("[href$="+a+"]"));else if(a===null)a=-1;if(a==-1&&this.options.collapsible)a=this.options.selected;this.anchors.eq(a).trigger(this.options.event+".tabs");return this},load:function(c){var b=this,e=this.options,d=this.anchors.eq(c)[0],g=a.data(d,"load.tabs");this.abort();if(!g||this.element.queue("tabs").length!==0&&a.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(c).addClass("ui-state-processing");if(e.spinner){var f=a("span",d);f.data("label.tabs",f.html()).html(e.spinner)}this.xhr=a.ajax(a.extend({},e.ajaxOptions,{url:g,success:function(f,g){a(b._sanitizeSelector(d.hash)).html(f);b._cleanup();e.cache&&a.data(d,"cache.tabs",true);b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{e.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f){b._cleanup();b._trigger("load",null,b._ui(b.anchors[c],b.panels[c]));try{e.ajaxOptions.error(a,f,c,d)}catch(g){}}}));b.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}})})(jQuery);