text: /**
   * RightJS-UI Tabs v2.2.2
   * http://rightjs.org/ui/tabs
   *
   * Copyright (C) 2009-2011 Nikolay Nemshilov
   */
  var Tabs=RightJS.Tabs=function(a,b,c){function w(a,b,d){if(c.Cookie){var e=v();e=e.without.apply(e,b.map("id")),e.push(d.target.id),r.set("right-tabs-indexes",e.uniq().join(","),a)}}function v(){return f(c.Cookie?(r.get("right-tabs-indexes")||"").split(","):[])}function d(a,b){b||(b=a,a="DIV");var d=new c.Class(c.Element.Wrappers[a]||c.Element,{initialize:function(b,d){this.key=b;var e=[{"class":"rui-"+b}];this instanceof c.Input||this instanceof c.Form||e.unshift(a),this.$super.apply(this,e),c.isString(d)&&(d=c.$(d)),d instanceof c.Element&&(this._=d._,"$listeners"in d&&(d.$listeners=d.$listeners),d={}),this.setOptions(d,this);return c.Wrapper.Cache[c.$uid(this._)]=this},setOptions:function(a,b){b&&(a=c.Object.merge(a,(new Function("return "+(b.get("data-"+this.key)||"{}")))())),a&&c.Options.setOptions.call(this,c.Object.merge(this.options,a));return this}}),e=new c.Class(d,b);c.Observer.createShortcuts(e.prototype,e.EVENTS||[]);return e}var e=new c.Class(c.Element,{initialize:function(a){this.$super("div",{"class":"rui-spinner"}),this.dots=[];for(var b=0;b<(a||4);b++)this.dots.push(new c.Element("div"));this.dots[0].addClass("glowing"),this.insert(this.dots),c(this.shift).bind(this).periodical(300)},shift:function(){if(this.visible()){var a=this.dots.pop();this.dots.unshift(a),this.insert(a,"top")}}}),f=c,g=c.$,h=c.$$,i=c.$w,j=c.$E,k=c.Fx,l=c.Object,m=c.Browser,n=c.isArray,o=c.isNumber,p=c.Class,q=c.Element,r=c.Cookie,s=new d("UL",{extend:{version:"2.2.2",EVENTS:i("select hide load disable enable add remove move"),Options:{idPrefix:"",tabsElement:null,resizeFx:"both",resizeDuration:400,scrollTabs:!1,scrollDuration:400,selected:null,disabled:null,closable:!1,loop:!1,loopPause:!0,url:!1,cache:!1,Xhr:null,Cookie:null},rescan:function(b){g(b||a).find(".rui-tabs,*[data-tabs]").each(function(a){a=a instanceof s?a:new s(a)})}},initialize:function(a,b){this.$super("tabs",a).setOptions(b).addClass("rui-tabs"),this.isHarmonica=this._.tagName==="DL",this.isCarousel=this.hasClass("rui-tabs-carousel"),this.isSimple=!this.isHarmonica&&!this.isCarousel,this.findTabs().initScrolls().findCurrent().setStyle("visibility:visible"),this.options.disabled&&this.disable(this.options.disabled),this.options.loop&&this.startLoop()},select:function(a){return this.callTab(a,"select")},disable:function(a){return this.callTab(a,"disable")},enable:function(a){return this.callTab(a,"enable")},current:function(){return this.tabs.first("current")},enabled:function(){return this.tabs.filter("enabled")},callTab:function(a,b){f(n(a)?a:[a]).each(function(a){o(a)&&(a=this.tabs[a]),a&&a instanceof t&&a[b]()},this);return this},findTabs:function(){this.tabsList=this.isHarmonica?this:g(this.options.tabsElement)||this.first(".rui-tabs-list")||(this.first("UL")||j("UL").insertTo(this)).addClass("rui-tabs-list"),this.tabs=f([]),this.tabsList.children(this.isHarmonica?"dt":null).map(function(a){this.tabs.push(new t(a,this))},this);for(var a=0,b=this.tabsList.get("childNodes");a<b.length;a++)b[a].nodeType==3&&this.tabsList._.removeChild(b[a]);return this}}),t=s.Tab=new p(q,{extend:{autoId:0},initialize:function(a,b){this.$super(a._),this.addClass("rui-tabs-tab"),this.main=b,this.link=this.first("a"),this.id=this.link.get("href").split("#")[1]||t.autoId++,this.panel=new u(this.findPanel(),this),this.current()&&this.select(),b.options.closable&&this.link.insert(j("div",{"class":"rui-tabs-tab-close-icon",html:"&times;"}).onClick(f(this.remove).bind(this))),this.onClick(this._clicked)},select:function(){if(this.enabled()){var a=this.main.current();a&&a.removeClass("rui-tabs-current").fire("hide"),this.addClass("rui-tabs-current"),this.main.scrollToTab(this),this.panel.show()}return this.fire("select")},disable:function(){return this.addClass("rui-tabs-disabled").fire("disable")},enable:function(){return this.removeClass("rui-tabs-disabled").fire("enable")},disabled:function(){return!this.enabled()},enabled:function(){return!this.hasClass("rui-tabs-disabled")},current:function(){return this.hasClass("rui-tabs-current")},remove:function(a){a&&a.stop();if(this.current()){var b=this.main.enabled(),c=b[b.indexOf(this)+1]||b[b.indexOf(this)-1];c&&c.select()}this.main.tabs.splice(this.main.tabs.indexOf(this),1),this.panel.remove();var d=this.parent();this.fire("beforeremove"),this.$super(),d.fire("remove",{target:this});return this},_clicked:function(a){a.stop();return this.select()},findPanel:function(){var a=this.main,b=a.options.idPrefix+this.id,c;if(a.isHarmonica){var d=this.next();c=d&&d._.tagName==="DD"?d:j("DD").insertTo(this,"after")}else c=g(b)||j(a._.tagName==="UL"?"LI":"DIV").insertTo(a);return c.set("id",b)},width:function(){var a=this.next();return a?a.position().x-this.position().x:this.size().x+1}}),u=s.Panel=new p(q,{initialize:function(a,b){this.$super(a._),this.addClass("rui-tabs-panel"),this.tab=b,this.id=this.get("id")},show:function(){return this.resizing(function(){this.tab.main.find(".rui-tabs-panel").each(function(a){a[a===this?"addClass":"removeClass"]("rui-tabs-current")},this)})},update:function(a){this.tab.current()?this.resizing(function(){q.prototype.update.call(this,a||"")}):this.$super(a||"");return this},lock:function(){this.insert(this.locker(),"top")},resizing:function(a){var b=this.tab.main;if(b.__working)return this.resizing.bind(this,a).delay(100);var d=b.options,e=b.first(".rui-tabs-panel.rui-tabs-current"),f=this,g=e!==f,h=this.first("div.rui-tabs-panel-locker");f.parent().hasClass("rui-tabs-resizer")&&f.insertTo(e.parent());if(d.resizeFx&&c.Fx&&e&&(g||h)){b.__working=!0;var i=function(){b.__working=!1},l=d.resizeFx==="both"&&h?"slide":d.resizeFx,m=d.resizeDuration;m=k.Durations[m]||m;var n=l==="fade"?0:l==="slide"?m:m/2,o=m-n;l!=="slide"&&f.setStyle({opacity:0});var p=b.isHarmonica&&g?0:e.size().y;a.call(this);var q=f.size().y,r=null,s=null,t=null;l!=="fade"&&p!==q?(b._.style.height=b.size().y+"px",r=j("div",{"class":"rui-tabs-resizer",style:"height: "+p+"px"}),b.isHarmonica&&g&&(e.addClass("rui-tabs-current"),s=j("div",{"class":"rui-tabs-resizer"}),s._.style.height=e.size().y+"px",t=function(){s.replace(e.removeClass("rui-tabs-current"))},e.wrap(s),r._.style.height="0px"),f.wrap(r),b._.style.height="auto"):(rezise_duration=0,m=o);var u=0,v=function(){if(r){if(l=="both"&&!u)return u++;r.replace(f)}i()};s&&s.morph({height:"0px"},{duration:n,onFinish:t}),r&&r.morph({height:q+"px"},{duration:n,onFinish:v}),l!=="slide"&&f.morph.bind(f,{opacity:1},{duration:o,onFinish:v}).delay(n),!r&&l==="slide"&&v()}else a.call(this);return this},locker:function(){return this._locker||(this._locker=j("div",{"class":"rui-tabs-panel-locker"}).insert(new e(5)))}});s.include({next:function(){return this.pickTab(+1)},prev:function(){return this.pickTab(-1)},scrollLeft:function(){this.prevButton.hasClass("rui-tabs-scroller-disabled")||this[this.isCarousel?"prev":"justScroll"](+.6);return this},scrollRight:function(){this.nextButton.hasClass("rui-tabs-scroller-disabled")||this[this.isCarousel?"next":"justScroll"](-.6);return this},initScrolls:function(){(this.scrollable=this.options.scrollTabs||this.isCarousel)&&this.buildScroller();return this},buildScroller:function(){if(!(this.prevButton=this.first(".rui-tabs-scroller-prev"))||!(this.nextButton=this.first(".rui-tabs-scroller-next")))this.prevButton=j("div",{"class":"rui-tabs-scroller-prev",html:"&laquo;"}),this.nextButton=j("div",{"class":"rui-tabs-scroller-next",html:"&raquo;"}),j("div").insertTo(this.tabsList,"before").replace(j("div",{"class":"rui-tabs-scroller"}).insert([this.prevButton,this.nextButton,this.scroller=j("div",{"class":"rui-tabs-scroller-body"}).insert(this.tabsList)])).remove();this.prevButton.onClick(f(this.scrollLeft).bind(this)),this.nextButton.onClick(f(this.scrollRight).bind(this))},pickTab:function(a){var b=this.current();if(b&&b.enabled()){var c=this.enabled(),d=c[c.indexOf(b)+a];d&&d.select()}},scrollToTab:function(a){if(this.scroller){var c=0;for(var d=0;d<this.tabs.length;d++){c+=this.tabs[d].width();if(this.tabs[d]===a)break}var e=this.scroller.size().x,f=(this.isCarousel?e/2+a.width()/2:e)-c;if(!this.isCarousel){var g=b(this.tabsList.getStyle("left")||0,10);f>=g&&f<g+e-a.width()?f=g:g>-c&&g<=a.width()-c&&(f=a.width()-c)}this.scrollTo(f)}},justScroll:function(a){if(!this.scroller)return this;var c=b(this.tabsList.getStyle("left")||0,10),d=this.scroller.size().x;this.scrollTo(c+d*a)},scrollTo:function(a){var b=this.scroller.size().x,c=this.tabs.map("width").sum();a<b-c&&(a=b-c),a>0&&(a=0),this.tabsList.morph({left:a+"px"},{duration:this.options.scrollDuration}),this.checkScrollButtons(c,b,a)},checkScrollButtons:function(a,b,c){var d=!1,e=!1;if(this.isCarousel){var f=this.enabled(),g=f.first("current");if(g){var h=f.indexOf(g);d=h>0,e=h<f.length-1}}else d=c!==0,e=c>b-a;this.prevButton[d?"removeClass":"addClass"]("rui-tabs-scroller-disabled"),this.nextButton[e?"removeClass":"addClass"]("rui-tabs-scroller-disabled")}}),s.include({findCurrent:function(){var a=this.enabled(),b=this.tabs[this.options.selected]||this.tabs[this.urlIndex()]||this.tabs[this.cookieIndex()]||a.first("current")||a[0];b&&b.select(),this.options.Cookie&&this.onSelect(f(w).curry(this.options.Cookie,this.tabs));return this},urlIndex:function(){var b=-1,c=a.location.href.split("#")[1];if(c)for(var d=0;d<this.tabs.length;d++)if(this.tabs[d].id==c){b=d;break}return b},cookieIndex:function(){var a=-1;if(this.options.Cookie){var b=v();for(var c=0;c<this.tabs.length;c++)if(b.include(this.tabs[c].id)){a=c;break}}return a}}),s.include({add:function(a,b,c){c=c||{};var d=j(this.isHarmonica?"dt":"li").insert(j("a",{html:a,href:c.url||"#"+(c.id||"")})).insertTo(this.tabsList),e=new t(d,this);e.panel.update(b||""),this.tabs.push(e),e.fire("add"),"position"in c&&this.move(e,c.position);return this},move:function(a,b){a=this.tabs[a]||a,this.tabs[b]&&this.tabs[b]!==a&&(this.tabs[b].insert(a,b===this.tabs.length-1?"after":"before"),this.isHarmonica&&a.insert(a.panel,"after"),this.tabs.splice(this.tabs.indexOf(a),1),this.tabs.splice(b,0,a),a.fire("move",{index:b}));return this},remove:function(a){return arguments.length===0?this.$super():this.callTab(a,"remove")}});var x=t.prototype.select;t.include({select:function(){if(this.dogPiling(arguments))return this;var a=x.apply(this,arguments),b=f(this.link.get("href")),d=this.main.options;b.includes("#")&&(b=d.url?d.url.replace("%{id}",b.split("#")[1]):null);if(b&&!this.request&&(!d.cache&&!this.cache)){this.panel.lock();try{this.request=(new c.Xhr(b,l.merge({method:"get"},d.Xhr))).onComplete(f(function(a){if(this.main.__working)return arguments.callee.bind(this,a).delay(100);this.panel.update(a.text),this.request=null,d.cache&&(this.cache=!0),this.fire("load")}).bind(this)).send()}catch(e){if(!m.OLD)throw e}}return a},dogPiling:function(a){if(this.main.__working){this.main.__timeout&&this.main.__timeout.cancel(),this.main.__timeout=f(function(a){this.select.apply(this,a)}).bind(this,a).delay(100);return!0}return this.main.__timeout=null}}),s.include({startLoop:function(a){if(!a&&!this.options.loop)return this;this.options.loopPause&&(this._stopLoop=this._stopLoop||f(this.stopLoop).bind(this,!0),this._startLoop=this._startLoop||f(this.startLoop).bind(this,a),this.forgetHovers().on({mouseover:this._stopLoop,mouseout:this._startLoop})),this.timer&&this.timer.stop(),this.timer=f(function(){var a=this.enabled(),b=this.current(),c=a[a.indexOf(b)+1];this.select(c||a.first())}).bind(this).periodical(this.options.loop||a);return this},stopLoop:function(a,b){this.timer&&(this.timer.stop(),this.timer=null),!b&&this._startLoop&&this.forgetHovers()},forgetHovers:function(){return this.stopObserving("mouseover",this._stopLoop).stopObserving("mouseout",this._startLoop)}}),g(a).onReady(function(){s.rescan()});var y=a.createElement("style"),z=a.createTextNode("div.rui-spinner,div.rui-spinner div{margin:0;padding:0;border:none;background:none;list-style:none;font-weight:normal;float:none;display:inline-block; *display:inline; *zoom:1;border-radius:.12em;-moz-border-radius:.12em;-webkit-border-radius:.12em}div.rui-spinner{text-align:center;white-space:nowrap;background:#EEE;border:1px solid #DDD;height:1.2em;padding:0 .2em}div.rui-spinner div{width:.4em;height:70%;background:#BBB;margin-left:1px}div.rui-spinner div:first-child{margin-left:0}div.rui-spinner div.glowing{background:#777}.rui-tabs,.rui-tabs-list,.rui-tabs-tab,.rui-tabs-panel,.rui-tabs-scroll-left,.rui-tabs-scroll-right,.rui-tabs-scroll-body,.rui-tabs-panel-locker,.rui-tabs-resizer{margin:0;padding:0;background:none;border:none;list-style:none;display:block;width:auto;height:auto}.rui-tabs{display:block;visibility:hidden;border-bottom:1px solid #CCC}.rui-tabs-resizer{overflow:hidden}.rui-tabs-list{display:block;position:relative;padding:0 .5em;border-bottom:1px solid #CCC;white-space:nowrap}.rui-tabs-list .rui-tabs-tab,.rui-tabs-tab *,.rui-tabs-tab *:hover{display:inline-block; *display:inline; *zoom:1;cursor:pointer;text-decoration:none;vertical-align:center}.rui-tabs-list .rui-tabs-tab{vertical-align:bottom;margin-right:.1em}.rui-tabs-tab a{outline:none;position:relative;border:1px solid #CCC;background:#DDD;color:#444;padding:.3em 1em;border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0}.rui-tabs-tab a:hover{border-color:#CCC;background:#EEE}.rui-tabs-list .rui-tabs-current a,.rui-tabs-list .rui-tabs-current a:hover{font-weight:bold;color:#000;background:#FFF;border-bottom:1px solid #FFF;border-top-width:2px;padding-top:.34em;padding-bottom:.34em;top:1px}.rui-tabs-tab a img{border:none;opacity:.6;filter:alpha(opacity=60)}.rui-tabs-tab a:hover img,.rui-tabs-list .rui-tabs-current a img{opacity:1;filter:alpha(opacity=100)}.rui-tabs-disabled a,.rui-tabs-disabled a:hover{background:#EEE;border-color:#DDD;color:#AAA;cursor:default}.rui-tabs-disabled a img,.rui-tabs-disabled a:hover img{opacity:.5;filter:alpha(opacity=50)}.rui-tabs-tab-close-icon{display:inline-block; *display:inline; *zoom:1;margin-right:-0.5em;margin-left:0.5em;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}.rui-tabs-tab-close-icon:hover{opacity:1;filter:alpha(opacity=100);color:#B00;text-shadow:#888 .15em .15em .2em}.rui-tabs-panel{display:none;position:relative;min-height:4em;padding:.5em 0}.rui-tabs-current{display:block}.rui-tabs-scroller{position:relative;padding:0 1.4em}.rui-tabs-scroller-prev,.rui-tabs-scroller-next{width:1.1em;text-align:center;background:#EEE;color:#666;cursor:pointer;border:1px solid #CCC;border-radius:.2em;-moz-border-radius:.2em;-webkit-border-radius:.2em;position:absolute;bottom:0px;left:0px;padding:0.3em 0;user-select:none;-moz-user-select:none;-webkit-user-select:none}.rui-tabs-scroller-prev:hover,.rui-tabs-scroller-next:hover{color:#000;background:#DDD;border-color:#AAA}.rui-tabs-scroller-prev:active,.rui-tabs-scroller-next:active{background:#eee;border-color:#ccc}.rui-tabs-scroller-next{left:auto;right:0px}.rui-tabs-scroller-disabled,.rui-tabs-scroller-disabled:hover{cursor:default;background:#DDD;border-color:#DDD;color:#AAA}.rui-tabs-scroller-body{overflow:hidden;width:100%;position:relative}.rui-tabs-scroller .rui-tabs-list{padding-left:0;padding-right:0;width:9999em;z-index:10}.rui-tabs-panel-locker{position:absolute;top:0px;left:0px;opacity:0.5;filter:alpha(opacity=50);background:#CCC;width:100%;height:100%;text-align:center}.rui-tabs-panel-locker .rui-spinner{position:absolute;left:44%;top:44%;background:none;border:none;height:2em}.rui-tabs-panel-locker .rui-spinner div{background:#666;width:.65em;margin-left:.15em}.rui-tabs-panel-locker .rui-spinner div.glowing{background:#000}.rui-tabs-carousel .rui-tabs-list{border:none}.rui-tabs-carousel .rui-tabs-tab a,.rui-tabs-carousel .rui-tabs-scroller .rui-tabs-scroller-prev,.rui-tabs-carousel .rui-tabs-scroller .rui-tabs-scroller-next{height:6em;line-height:6em;padding:0;border-bottom:1px solid #ccc;border-radius:.25em;-moz-border-radius:.25em;-webkit-border-radius:.25em}.rui-tabs-carousel .rui-tabs-tab{margin-right:3px}.rui-tabs-carousel .rui-tabs-tab a img{border:1px solid #CCC;vertical-align:middle;margin:.4em;padding:0;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.rui-tabs-carousel .rui-tabs-list .rui-tabs-current a{border-width:1px;border-color:#AAA;padding:0;top:auto}.rui-tabs-carousel .rui-tabs-list .rui-tabs-current a img{border-color:#bbb}.rui-tabs-carousel .rui-tabs-panel{text-align:center}dl.rui-tabs{border:none}dt.rui-tabs-tab,dt.rui-tabs-tab a,dt.rui-tabs-tab a:hover{display:block;float:none}dt.rui-tabs-tab a,dt.rui-tabs-tab a:hover{padding:.2em 1em;border:1px solid #ccc;border-radius:.25em;-moz-border-radius:.3em;-webkit-border-radius:.3em}dl.rui-tabs dt.rui-tabs-current a{background:#EEE;border-bottom-left-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0}dl.rui-tabs dd.rui-tabs-current+dt.rui-tabs-tab a{border-top-left-radius:0;border-top-right-radius:0;-moz-border-radius-topleft:0;-moz-border-radius-topright:0;-webkit-border-top-left-radius:0;-webkit-border-top-right-radius:0}");y.type="text/css",a.getElementsByTagName("head")[0].appendChild(y),y.styleSheet?y.styleSheet.cssText=z.nodeValue:y.appendChild(z);return s}(document,parseInt,RightJS)