/*
 * jQuery UI Tabs 1.8.16
 *
 * 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(d,l){var o=0,p=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,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&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(!0)},_setOption:function(a,d){a=="selected"?this.options.collapsible&&d==this.options.selected||this.select(d):
(this.options[a]=d,this._tabify())},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+ ++o},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++p);return d.cookie.apply(null,[a].concat(d.makeArray(arguments)))},_ui:function(a,d){return{tab:a,panel:d,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 a=
d(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(a){function e(b,a){b.css("display","");!d.support.opacity&&a.opacity&&b[0].style.removeAttribute("filter")}var b=this,c=this.options,g=/^#.+/;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(a,e){var h=d(e).attr("href"),f=h.split("#")[0],k;if(f&&(f===location.toString().split("#")[0]||
(k=d("base")[0])&&f===k.href))h=e.hash,e.href=h;g.test(h)?b.panels=b.panels.add(b.element.find(b._sanitizeSelector(h))):h&&h!=="#"?(d.data(e,"href.tabs",h),d.data(e,"load.tabs",h.replace(/#.*$/,"")),h=b._tabId(e),e.href="#"+h,f=b.element.find("#"+h),f.length||(f=d(c.panelTemplate).attr("id",h).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(b.panels[a-1]||b.list),f.data("destroy.tabs",!0)),b.panels=b.panels.add(f)):c.disabled.push(a)});if(a){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===l){location.hash&&this.anchors.each(function(b,a){if(a.hash==location.hash)return c.selected=b,!1});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(b._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(a){return b.lis.index(a)}))).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");
c.selected>=0&&this.anchors.length&&(b.element.find(b._sanitizeSelector(b.anchors[c.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active"),b.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[c.selected],b.element.find(b._sanitizeSelector(b.anchors[c.selected].hash))[0]))}),this.load(c.selected));d(window).bind("unload",function(){b.lis.add(b.anchors).unbind(".tabs");b.lis=b.anchors=b.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);for(var a=0,f;f=this.lis[a];a++)d(f)[d.inArray(a,c.disabled)!=-1&&!d(f).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(b,a){a.is(":not(.ui-state-disabled)")&&a.addClass("ui-state-"+b)};this.lis.bind("mouseover.tabs",
function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){d(this).removeClass("ui-state-hover")});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){d(this).closest("li").removeClass("ui-state-focus")})}var j,i;if(c.fx)d.isArray(c.fx)?(j=c.fx[0],i=c.fx[1]):j=i=c.fx;var m=i?function(a,c){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");c.hide().removeClass("ui-tabs-hide").animate(i,i.duration||"normal",
function(){e(c,i);b._trigger("show",null,b._ui(a,c[0]))})}:function(a,c){d(a).closest("li").addClass("ui-tabs-selected ui-state-active");c.removeClass("ui-tabs-hide");b._trigger("show",null,b._ui(a,c[0]))},n=j?function(a,c){c.animate(j,j.duration||"normal",function(){b.lis.removeClass("ui-tabs-selected ui-state-active");c.addClass("ui-tabs-hide");e(c,j);b.element.dequeue("tabs")})}:function(a,c){b.lis.removeClass("ui-tabs-selected ui-state-active");c.addClass("ui-tabs-hide");b.element.dequeue("tabs")};
this.anchors.bind(c.event+".tabs",function(){var a=this,e=d(a).closest("li"),f=b.panels.filter(":not(.ui-tabs-hide)"),g=b.element.find(b._sanitizeSelector(a.hash));if(e.hasClass("ui-tabs-selected")&&!c.collapsible||e.hasClass("ui-state-disabled")||e.hasClass("ui-state-processing")||b.panels.filter(":animated").length||b._trigger("select",null,b._ui(this,g[0]))===!1)return this.blur(),!1;c.selected=b.anchors.index(this);b.abort();if(c.collapsible)if(e.hasClass("ui-tabs-selected"))return c.selected=
-1,c.cookie&&b._cookie(c.selected,c.cookie),b.element.queue("tabs",function(){n(a,f)}).dequeue("tabs"),this.blur(),!1;else if(!f.length)return c.cookie&&b._cookie(c.selected,c.cookie),b.element.queue("tabs",function(){m(a,g)}),b.load(b.anchors.index(this)),this.blur(),!1;c.cookie&&b._cookie(c.selected,c.cookie);if(g.length)f.length&&b.element.queue("tabs",function(){n(a,f)}),b.element.queue("tabs",function(){m(a,g)}),b.load(b.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";
d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){typeof a=="string"&&(a=this.anchors.index(this.anchors.filter("[href$="+a+"]")));return a},destroy:function(){var a=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 a=
d.data(this,"href.tabs");if(a)this.href=a;var b=d(this).unbind(".tabs");d.each(["href","load","cache"],function(a,d){b.removeData(d+".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")});a.cookie&&this._cookie(null,a.cookie);return this},add:function(a,
e,b){if(b===l)b=this.anchors.length;var c=this,g=this.options,e=d(g.tabTemplate.replace(/#\{href\}/g,a).replace(/#\{label\}/g,e)),a=!a.indexOf("#")?a.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var f=c.element.find("#"+a);f.length||(f=d(g.panelTemplate).attr("id",a).data("destroy.tabs",!0));f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");b>=this.lis.length?(e.appendTo(this.list),f.appendTo(this.list[0].parentNode)):
(e.insertBefore(this.lis[b]),f.insertBefore(this.panels[b]));g.disabled=d.map(g.disabled,function(a){return a>=b?++a:a});this._tabify();if(this.anchors.length==1)g.selected=0,e.addClass("ui-tabs-selected ui-state-active"),f.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[b],this.panels[b]));return this},remove:function(a){var a=this._getIndex(a),e=this.options,b=this.lis.eq(a).remove(),
c=this.panels.eq(a).remove();b.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(a+(a+1<this.anchors.length?1:-1));e.disabled=d.map(d.grep(e.disabled,function(b){return b!=a}),function(b){return b>=a?--b:b});this._tabify();this._trigger("remove",null,this._ui(b.find("a")[0],c[0]));return this},enable:function(a){var a=this._getIndex(a),e=this.options;if(d.inArray(a,e.disabled)!=-1)return this.lis.eq(a).removeClass("ui-state-disabled"),e.disabled=d.grep(e.disabled,function(b){return b!=
a}),this._trigger("enable",null,this._ui(this.anchors[a],this.panels[a])),this},disable:function(a){var a=this._getIndex(a),d=this.options;a!=d.selected&&(this.lis.eq(a).addClass("ui-state-disabled"),d.disabled.push(a),d.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a])));return this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&&this.options.selected!=-1)a=this.options.selected;else return this;this.anchors.eq(a).trigger(this.options.event+
".tabs");return this},load:function(a){var a=this._getIndex(a),e=this,b=this.options,c=this.anchors.eq(a)[0],g=d.data(c,"load.tabs");this.abort();if(!g||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(a).addClass("ui-state-processing");if(b.spinner){var f=d("span",c);f.data("label.tabs",f.html()).html(b.spinner)}this.xhr=d.ajax(d.extend({},b.ajaxOptions,{url:g,success:function(f,g){e.element.find(e._sanitizeSelector(c.hash)).html(f);e._cleanup();
b.cache&&d.data(c,"cache.tabs",!0);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(f,g)}catch(i){}},error:function(d,f){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(d,f,a,c)}catch(g){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));this.xhr&&(this.xhr.abort(),delete this.xhr);this._cleanup();
return this},url:function(a,d){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",d);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,d){var b=this,c=this.options,g=b._rotate||(b._rotate=function(d){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var a=c.selected;b.select(++a<b.anchors.length?a:0)},a);d&&d.stopPropagation()}),f=b._unrotate||(b._unrotate=!d?function(a){a.clientX&&
b.rotate(null)}:function(){t=c.selected;g()});a?(this.element.bind("tabsshow",g),this.anchors.bind(c.event+".tabs",f),g()):(clearTimeout(b.rotation),this.element.unbind("tabsshow",g),this.anchors.unbind(c.event+".tabs",f),delete this._rotate,delete this._unrotate);return this}})})(jQuery);
