/*
- * Tabs 3 - New Wave Tabs
+ * jQuery UI Tabs 1.8.12
*
- * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
*/
-
-(function($) {
-
- // if the UI scope is not availalable, add it
- $.ui = $.ui || {};
-
- // tabs initialization
- $.fn.tabs = function(initial, options) {
- if (initial && initial.constructor == Object) { // shift arguments
- options = initial;
- initial = null;
- }
- options = options || {};
-
- initial = initial && initial.constructor == Number && --initial || 0;
-
- return this.each(function() {
- new $.ui.tabs(this, $.extend(options, { initial: initial }));
- });
- };
-
- // other chainable tabs methods
- $.each(['Add', 'Remove', 'Enable', 'Disable', 'Click', 'Load', 'Href'], function(i, method) {
- $.fn['tabs' + method] = function() {
- var args = arguments;
- return this.each(function() {
- var instance = $.ui.tabs.getInstance(this);
- instance[method.toLowerCase()].apply(instance, args);
- });
- };
- });
- $.fn.tabsSelected = function() {
- var selected = -1;
- if (this[0]) {
- var instance = $.ui.tabs.getInstance(this[0]),
- $lis = $('li', this);
- selected = $lis.index( $lis.filter('.' + instance.options.selectedClass)[0] );
- }
- return selected >= 0 ? ++selected : -1;
- };
-
- // tabs class
- $.ui.tabs = function(el, options) {
-
- this.source = el;
-
- this.options = $.extend({
-
- // basic setup
- initial: 0,
- event: 'click',
- disabled: [],
- cookie: null, // pass options object as expected by cookie plugin: { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- // TODO bookmarkable: $.ajaxHistory ? true : false,
- unselected: false,
- unselect: options.unselected ? true : false,
-
- // Ajax
- spinner: 'Loading…',
- cache: false,
- idPrefix: 'ui-tabs-',
- ajaxOptions: {},
-
- // animations
- /*fxFade: null,
- fxSlide: null,
- fxShow: null,
- fxHide: null,*/
- fxSpeed: 'normal',
- /*fxShowSpeed: null,
- fxHideSpeed: null,*/
-
- // callbacks
- add: function() {},
- remove: function() {},
- enable: function() {},
- disable: function() {},
- click: function() {},
- hide: function() {},
- show: function() {},
- load: function() {},
-
- // templates
- tabTemplate: '<li><a href="#{href}"><span>#{text}</span></a></li>',
- panelTemplate: '<div></div>',
-
- // CSS classes
- navClass: 'ui-tabs-nav',
- selectedClass: 'ui-tabs-selected',
- unselectClass: 'ui-tabs-unselect',
- disabledClass: 'ui-tabs-disabled',
- panelClass: 'ui-tabs-panel',
- hideClass: 'ui-tabs-hide',
- loadingClass: 'ui-tabs-loading'
-
- }, options);
-
- this.options.event += '.ui-tabs'; // namespace event
- this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
-
- // save instance for later
- $.data(el, $.ui.tabs.INSTANCE_KEY, this);
-
- // create tabs
- this.tabify(true);
- };
-
- // static
- $.ui.tabs.INSTANCE_KEY = 'ui_tabs_instance';
- $.ui.tabs.getInstance = function(el) {
- return $.data(el, $.ui.tabs.INSTANCE_KEY);
- };
-
- // instance methods
- $.extend($.ui.tabs.prototype, {
- tabId: function(a) {
- return a.title ? a.title.replace(/\s/g, '_')
- : this.options.idPrefix + $.data(a);
- },
- tabify: function(init) {
-
- this.$lis = $('li:has(a[href])', this.source);
- this.$tabs = this.$lis.map(function() { return $('a', this)[0] });
- this.$panels = $([]);
-
- var self = this, o = this.options;
-
- this.$tabs.each(function(i, a) {
- // inline tab
- if (a.hash && a.hash.replace('#', '')) { // Safari 2 reports '#' for an empty hash
- self.$panels = self.$panels.add(a.hash);
- }
- // remote tab
- else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
- $.data(a, 'href', a.href);
- var id = self.tabId(a);
- a.href = '#' + id;
- self.$panels = self.$panels.add(
- $('#' + id)[0] || $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
- .insertAfter( self.$panels[i - 1] || self.source )
- );
- }
- // invalid tab href
- else {
- o.disabled.push(i + 1);
- }
- });
-
- if (init) {
-
- // attach necessary classes for styling if not present
- $(this.source).hasClass(o.navClass) || $(this.source).addClass(o.navClass);
- this.$panels.each(function() {
- var $this = $(this);
- $this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
- });
-
- // disabled tabs
- for (var i = 0, position; position = o.disabled[i]; i++) {
- this.disable(position);
- }
-
- // Try to retrieve initial tab:
- // 1. from fragment identifier in url if present
- // 2. from cookie
- // 3. from selected class attribute on <li>
- // 4. otherwise use given initial argument
- // 5. check if tab is disabled
- this.$tabs.each(function(i, a) {
- if (location.hash) {
- if (a.hash == location.hash) {
- o.initial = i;
- // prevent page scroll to fragment
- //if (($.browser.msie || $.browser.opera) && !o.remote) {
- if ($.browser.msie || $.browser.opera) {
- var $toShow = $(location.hash), toShowId = $toShow.attr('id');
- $toShow.attr('id', '');
- setTimeout(function() {
- $toShow.attr('id', toShowId); // restore id
- }, 500);
- }
- scrollTo(0, 0);
- return false; // break
- }
- } else if (o.cookie) {
- o.initial = parseInt($.cookie( $.ui.tabs.INSTANCE_KEY + $.data(self.source) )) || 0;
- return false; // break
- } else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
- o.initial = i;
- return false; // break
- }
- });
- var n = this.$lis.length;
- while (this.$lis.eq(o.initial).hasClass(o.disabledClass) && n) {
- o.initial = ++o.initial < this.$lis.length ? o.initial : 0;
- n--;
- }
- if (!n) { // all tabs disabled, set option unselected to true
- o.unselected = o.unselect = true;
- }
-
- // highlight selected tab
- this.$panels.addClass(o.hideClass);
- this.$lis.removeClass(o.selectedClass);
- if (!o.unselected) {
- this.$panels.eq(o.initial).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
- this.$lis.eq(o.initial).addClass(o.selectedClass);
- }
-
- // load if remote tab
- var href = !o.unselected && $.data(this.$tabs[o.initial], 'href');
- if (href) {
- this.load(o.initial + 1, href);
- }
-
- // disable click if event is configured to something else
- if (!/^click/.test(o.event)) {
- this.$tabs.bind('click', function(e) { e.preventDefault(); });
- }
-
- }
-
- // setup animations
- var showAnim = {}, showSpeed = o.fxShowSpeed || o.fxSpeed,
- hideAnim = {}, hideSpeed = o.fxHideSpeed || o.fxSpeed;
- if (o.fxSlide || o.fxFade) {
- if (o.fxSlide) {
- showAnim['height'] = 'show';
- hideAnim['height'] = 'hide';
- }
- if (o.fxFade) {
- showAnim['opacity'] = 'show';
- hideAnim['opacity'] = 'hide';
- }
- } else {
- if (o.fxShow) {
- showAnim = o.fxShow;
- } else { // use some kind of animation to prevent browser scrolling to the tab
- showAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
- showSpeed = 1; // as little as 1 is sufficient
- }
- if (o.fxHide) {
- hideAnim = o.fxHide;
- } else { // use some kind of animation to prevent browser scrolling to the tab
- hideAnim['min-width'] = 0; // avoid opacity, causes flicker in Firefox
- hideSpeed = 1; // as little as 1 is sufficient
- }
- }
-
- // reset some styles to maintain print style sheets etc.
- var resetCSS = { display: '', overflow: '', height: '' };
- if (!$.browser.msie) { // not in IE to prevent ClearType font issue
- resetCSS['opacity'] = '';
- }
-
- // Hide a tab, animation prevents browser scrolling to fragment,
- // $show is optional.
- function hideTab(clicked, $hide, $show) {
- $hide.animate(hideAnim, hideSpeed, function() { //
- $hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && hideAnim['opacity']) {
- $hide[0].style.filter = '';
- }
- o.hide(clicked, $hide[0], $show && $show[0] || null);
- if ($show) {
- showTab(clicked, $show, $hide);
- }
- });
- }
-
- // Show a tab, animation prevents browser scrolling to fragment,
- // $hide is optional
- function showTab(clicked, $show, $hide) {
- if (!(o.fxSlide || o.fxFade || o.fxShow)) {
- $show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
- }
- $show.animate(showAnim, showSpeed, function() {
- $show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
- if ($.browser.msie && showAnim['opacity']) {
- $show[0].style.filter = '';
- }
- o.show(clicked, $show[0], $hide && $hide[0] || null);
- });
- }
-
- // switch a tab
- function switchTab(clicked, $li, $hide, $show) {
- /*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
- $.ajaxHistory.update(clicked.hash);
- }*/
- $li.addClass(o.selectedClass)
- .siblings().removeClass(o.selectedClass);
- hideTab(clicked, $hide, $show);
- }
-
- // attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.$tabs.unbind(o.event).bind(o.event, function() {
-
- //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
- var $li = $(this).parents('li:eq(0)'),
- $hide = self.$panels.filter(':visible'),
- $show = $(this.hash);
-
- // If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
- // Check if click handler returns false last so that it is not executed for a disabled tab!
- if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
- || o.click(this, $show[0], $hide[0]) === false) {
- this.blur();
- return false;
- }
-
- if (o.cookie) {
- $.cookie($.ui.tabs.INSTANCE_KEY + $.data(self.source), self.$tabs.index(this), o.cookie);
- }
-
- // if tab may be closed
- if (o.unselect) {
- if ($li.hasClass(o.selectedClass)) {
- $li.removeClass(o.selectedClass);
- self.$panels.stop();
- hideTab(this, $hide);
- this.blur();
- return false;
- } else if (!$hide.length) {
- self.$panels.stop();
- if ($.data(this, 'href')) { // remote tab
- var a = this;
- self.load(self.$tabs.index(this) + 1, $.data(this, 'href'), function() {
- $li.addClass(o.selectedClass).addClass(o.unselectClass);
- showTab(a, $show);
- });
- } else {
- $li.addClass(o.selectedClass).addClass(o.unselectClass);
- showTab(this, $show);
- }
- this.blur();
- return false;
- }
- }
-
- // stop possibly running animations
- self.$panels.stop();
-
- // show new tab
- if ($show.length) {
-
- // prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
- /*if ($.browser.msie && o.bookmarkable) {
- var showId = this.hash.replace('#', '');
- $show.attr('id', '');
- setTimeout(function() {
- $show.attr('id', showId); // restore id
- }, 0);
- }*/
-
- if ($.data(this, 'href')) { // remote tab
- var a = this;
- self.load(self.$tabs.index(this) + 1, $.data(this, 'href'), function() {
- switchTab(a, $li, $hide, $show);
- });
- } else {
- switchTab(this, $li, $hide, $show);
- }
-
- // Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
- /*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
- var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
- setTimeout(function() {
- scrollTo(scrollX, scrollY);
- }, 0);*/
-
- } else {
- throw 'jQuery UI Tabs: Mismatching fragment identifier.';
- }
-
- // Prevent IE from keeping other link focussed when using the back button
- // and remove dotted border from clicked link. This is controlled in modern
- // browsers via CSS, also blur removes focus from address bar in Firefox
- // which can become a usability and annoying problem with tabsRotate.
- if ($.browser.msie) {
- this.blur();
- }
-
- //return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
- return false;
-
- });
-
- },
- add: function(url, text, position) {
- if (url && text) {
- position = position || this.$tabs.length; // append by default
-
- var o = this.options,
- $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{text\}/, text));
-
- var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
-
- // try to find an existing element before creating a new one
- var $panel = $('#' + id);
- $panel = $panel.length && $panel
- || $(o.panelTemplate).attr('id', id).addClass(o.panelClass).addClass(o.hideClass);
- if (position >= this.$lis.length) {
- $li.appendTo(this.source);
- $panel.appendTo(this.source.parentNode);
- } else {
- $li.insertBefore(this.$lis[position - 1]);
- $panel.insertBefore(this.$panels[position - 1]);
- }
-
- this.tabify();
-
- if (this.$tabs.length == 1) {
- $li.addClass(o.selectedClass);
- $panel.removeClass(o.hideClass);
- var href = $.data(this.$tabs[0], 'href');
- if (href) {
- this.load(position + 1, href);
- }
- }
- o.add(this.$tabs[position], this.$panels[position]); // callback
- } else {
- throw 'jQuery UI Tabs: Not enough arguments to add tab.';
- }
- },
- remove: function(position) {
- if (position && position.constructor == Number) {
- var o = this.options, $li = this.$lis.eq(position - 1).remove(),
- $panel = this.$panels.eq(position - 1).remove();
-
- // If selected tab was removed focus tab to the right or
- // tab to the left if last tab was removed.
- if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1) {
- this.click(position + (position < this.$tabs.length ? 1 : -1));
- }
- this.tabify();
- o.remove($li.end()[0], $panel[0]); // callback
- }
- },
- enable: function(position) {
- var o = this.options, $li = this.$lis.eq(position - 1);
- $li.removeClass(o.disabledClass);
- if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
- $li.css('display', 'inline-block');
- setTimeout(function() {
- $li.css('display', 'block')
- }, 0)
- }
- o.enable(this.$tabs[position - 1], this.$panels[position - 1]); // callback
- },
- disable: function(position) {
- var o = this.options;
- this.$lis.eq(position - 1).addClass(o.disabledClass);
- o.disable(this.$tabs[position - 1], this.$panels[position - 1]); // callback
- },
- click: function(position) {
- this.$tabs.eq(position - 1).trigger(this.options.event);
- },
- load: function(position, url, callback) {
- var self = this, o = this.options,
- $a = this.$tabs.eq(position - 1), a = $a[0], $span = $('span', a);
-
- // shift arguments
- if (url && url.constructor == Function) {
- callback = url;
- url = null;
- }
-
- // set new URL or get existing
- if (url) {
- $.data(a, 'href', url);
- } else {
- url = $.data(a, 'href');
- }
-
- // load
- if (o.spinner) {
- $.data(a, 'title', $span.html());
- $span.html('<em>' + o.spinner + '</em>');
- }
- var finish = function() {
- self.$tabs.filter('.' + o.loadingClass).each(function() {
- $(this).removeClass(o.loadingClass);
- if (o.spinner) {
- $('span', this).html( $.data(this, 'title') );
- }
- });
- self.xhr = null;
- };
- var ajaxOptions = $.extend(o.ajaxOptions, {
- url: url,
- success: function(r) {
- $(a.hash).html(r);
- finish();
- // This callback is required because the switch has to take
- // place after loading has completed.
- if (callback && callback.constructor == Function) {
- callback();
- }
- if (o.cache) {
- $.removeData(a, 'href'); // if loaded once do not load them again
- }
- o.load(self.$tabs[position - 1], self.$panels[position - 1]); // callback
- }
- });
- if (this.xhr) {
- // terminate pending requests from other tabs and restore title
- this.xhr.abort();
- finish();
- }
- $a.addClass(o.loadingClass);
- setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
- self.xhr = $.ajax(ajaxOptions);
- }, 0);
-
- },
- href: function(position, href) {
- $.data(this.$tabs.eq(position - 1)[0], 'href', href);
- }
- });
-
-})(jQuery);
+(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading…</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&&
+e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=
+d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]||
+(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
+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-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected=
+this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
+if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
+this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+
+g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
+function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};
+this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected=
+-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
+d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=
+d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b,
+e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);
+j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();
+if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(h){return h!=b}),function(h){return h>=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null,
+this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this},
+load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c,
+"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.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(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.12"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&
+a.rotate(null)}:function(){t=c.selected;h()});if(b){this.element.bind("tabsshow",h);this.anchors.bind(c.event+".tabs",e);h()}else{clearTimeout(a.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(c.event+".tabs",e);delete this._rotate;delete this._unrotate}return this}})})(jQuery);