summaryrefslogtreecommitdiff
path: root/slideshows/dark/template/right.js
diff options
context:
space:
mode:
Diffstat (limited to 'slideshows/dark/template/right.js')
-rw-r--r--slideshows/dark/template/right.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/slideshows/dark/template/right.js b/slideshows/dark/template/right.js
new file mode 100644
index 0000000..1996290
--- /dev/null
+++ b/slideshows/dark/template/right.js
@@ -0,0 +1,7 @@
+/**
+ * RightJS v2.2.3 - http://rightjs.org
+ * Released under the terms of MIT license
+ *
+ * Copyright (C) 2008-2011 Nikolay Nemshilov
+ */
+var RightJS=function(a,b,c,d,e,f,g,h,i){function cH(a,b,c,d){var e={},f=a.marginLeft.toFloat()||0,g=a.marginTop.toFloat()||0,h=c==="right",i=c==="bottom",j=c==="top"||i;d==="out"?(e[j?"height":"width"]="0px",h?e.marginLeft=f+b.x+"px":i&&(e.marginTop=g+b.y+"px")):(j?(e.height=b.y+"px",a.height="0px"):(e.width=b.x+"px",a.width="0px"),h?(e.marginLeft=f+"px",a.marginLeft=f+b.x+"px"):i&&(e.marginTop=g+"px",a.marginTop=g+b.y+"px"));return e}function cG(a,b,c){var d=a.clone().setStyle("position:absolute;z-index:-1;visibility:hidden").setWidth(a.size().x).setStyle(b),e;a.parent()&&a.insert(d,"before"),e=cF(d,c),d.remove();return e}function cF(a,b){var c=0,d=b.length,e=a.computedStyles(),f={},g;for(;c<d;c++)g=b[c],g in e&&(f[g]=""+e[g],g==="opacity"&&(f[g]=f[g].replace(",",".")));return f}function cE(a,b,c){var d;for(d in c)(d=="width"||d=="height")&&b[d]=="auto"&&(b[d]=a._["offset"+d.capitalize()]+"px");bt&&c.filter&&!b.filter&&(b.filter="alpha(opacity=100)"),cC(a,b,c);for(d in c){if(c[d]!==b[d]&&/color/i.test(d)){bp&&(c[d]=c[d].replace(/"/g,""),b[d]=b[d].replace(/"/g,"")),cB(c[d])||(c[d]=c[d].toRgb()),cB(b[d])||(b[d]=b[d].toRgb());if(!c[d]||!b[d])c[d]=b[d]=""}/\d/.test(c[d])&&!/\d/.test(b[d])&&(b[d]=c[d].replace(/[\d\.\-]+/g,"0"));if(c[d]===b[d]||!/\d/.test(b[d])||!/\d/.test(c[d]))delete c[d],delete b[d]}}function cD(a){var b={},c=/[\d\.\-]+/g,d,e,f,g;for(e in a){d=a[e].match(c),f=d.map("toFloat"),f.t=a[e].split(c),f.r=f.t[0]==="rgb(",f.t.length==1&&f.t.unshift("");for(g=0;g<f.length;g++)f.t.splice(g*2+1,0,f[g]);b[e]=f}return b}function cC(a,b,c){for(var d=0;d<4;d++){var e="border"+cy[d]+"Style",f="border"+cy[d]+"Width",g="border"+cy[d]+"Color";if(e in b&&b[e]!=c[e]){var h=a._.style;b[e]=="none"&&(h[f]="0px"),h[e]=c[e],cB(b[g])&&(h[g]=a.getStyle("Color"))}}}function cB(a){return a==="transparent"||a==="rgba(0, 0, 0, 0)"}function cA(a){var b=[],c=["Style","Color","Width"],d,e,f;for(d in a)if(d.startsWith("border"))for(e=0;e<3;e++)for(f=0;f<4;f++)b.push("border"+cy[f]+c[e]);else d==="margin"||d==="padding"?cz(b,d,cy):d.startsWith("background")?cz(b,"background",["Color","Position","PositionX","PositionY"]):d==="opacity"&&bt?b.push("filter"):b.push(d);return b}function cz(a,b,c){for(var d=0;d<c.length;d++)a.push(b+c[d])}function cx(a){function g(){for(var a in f)e[a]=f[a]}var b=this.options,d=this.element,e=d._.style,f=c.only(d.computedStyles(),ct,cu,cv);this.onFinish(g).onCancel(function(){e[ct]="none",setTimeout(g,1)}),e[ct]="all",e[cu]=(cf.Durations[b.duration]||b.duration)+"ms",e[cv]=cw[b.transition]||b.transition,setTimeout(function(){d.setStyle(a)},0)}function cq(a,b,c){var d=J(c).compact(),e=A(d.last())?d.pop():{},f=new(cf[b.capitalize()])(a,e);f.start.apply(f,d);return a}function cp(a){a._timer&&clearInterval(a._timer)}function co(a,b,c,d){var e=1;a._timer=setInterval(function(){e>d?a.finish():(a.render(b(e/d)),e++)},c)}function cn(a){var b=I(a._);(ch[b]||[]).each("cancel"),(cg[b]||[]).splice(0)}function cm(a){var b=a.ch,c=b.shift();if(c=b[0])c[1].$ch=!0,c[1].start.apply(c[1],c[0])}function cl(a){var b=a.cr;b&&b.splice(b.indexOf(a),1)}function ck(a){a.cr&&a.cr.push(a)}function cj(a,b){var c=a.ch,d=a.options.queue;if(!c||a.$ch)return a.$ch=!1;d&&c.push([b,a]);return d&&c[0][1]!==a}function ci(a){var b=I((a.element||{})._||{});a.ch=cg[b]=cg[b]||[],a.cr=ch[b]=ch[b]||[]}function ce(a,b){a.stop(),this.send(b)}function cb(a,b){var d=a[0],e,f,g=ca(a),h=!c.keys(g).length;return(b.$listeners||[]).filter(function(a){return a.dr&&a.n===d&&(h||function(){for(var b in g)if(a.dr===b)for(e=0,f=g[b];e<f.length;e++)if(!f[e].length||f[e][0]===a.dc)return!0;return!1}())})}function ca(a){var b=J(a),c=b[1]||{},d={},e;y(c)?(d[c]=b.slice(2),B(d[c][0])&&(d[c]=d[c][0].map(N))):d=c;for(e in d)d[e]=N(d[e]),d[e]=B(d[e][0])?d[e]:[d[e]];return d}function b_(a,b,c){var d=J(b),e=d.shift();return function(b){var c=b.find(a);return c===i?c:typeof e==="string"?c[e].apply(c,d):e.apply(c,[b].concat(d))}}function b$(){bW&&(bW=!1,bq?(b.attachEvent("onmouseover",bY),a.attachEvent("blur",bZ)):(b.addEventListener("mouseover",bY,!1),a.addEventListener("blur",bZ,!1)))}function bZ(a){bV.each(function(b,c){b&&q[c]&&bX(a,q[c]._,c,!1)})}function bY(a){var b=a.target||a.srcElement,c=a.relatedTarget||a.fromElement,d=b,e=!1,f=[],g,h;while(d.nodeType===1)g=I(d),bV[g]===i&&bX(a,d,g,bV[g]=!0),d===c&&(e=!0),f.push(d),d=d.parentNode;if(c&&!e)while(c!==null&&c.nodeType===1&&f.indexOf(c)===-1)g=I(c),bV[g]!==i&&bX(a,c,g,bV[g]=i),c=c.parentNode}function bX(a,b,c,d){var e=new bD(a);e.type=d===!0?"mouseenter":"mouseleave",e.bubbles=!1,e.stopped=!0,e.target=bz(b),e.find=function(a){return F(a,!0).indexOf(this.target._)===-1?i:this.target},e.target.fire(e),bB.fire(e)}function bU(a){var b=new bD(a),c=b.target,d=c.parent&&c.parent();b.type=a.type==="focusin"||a.type==="focus"?"focus":"blur",d&&d.fire(b)}function bR(a){a=H(a),bE=bE.concat(a),bl(bF.prototype,a),bl(bA.prototype,a)}function bQ(a,b){b=b.camelize();if(b==="opacity")return bt?(/opacity=(\d+)/i.exec(a.filter||"")||["","100"])[1].toInt()/100+"":a[b].replace(",",".");b==="float"&&(b=bq?"styleFloat":"cssFloat");var c=a[b];bp&&/color/i.test(b)&&c&&(c=c.replace(/"/g,""));return c}function bP(a,b){if(typeof b==="string"){var c=a.tagName,d=bO,e=c in bM?bM[c]:["","",1],f=e[2];d.innerHTML=e[0]+"<"+c+">"+b+"</"+c+">"+e[1];while(f--!==0)d=d.firstChild;b=d.childNodes;while(b.length!==0)bN.appendChild(b[0])}else for(var g=0,h=b.length,i;g<h;g++)i=b[b.length===h?g:0],bN.appendChild(i instanceof bF?i._:i);return bN}function bK(a,b,c){var d=a._,e=[],f=0,g=!c;while(d=d[b])d.nodeType===1&&(g||bz(d).match(c))&&(e[f++]=bz(d));return e}function bJ(a,b,c){if(typeof b==="string"){a._=bI(b,c);if(c!==i)for(var d in c)switch(d){case"id":a._.id=c[d];break;case"html":a._.innerHTML=c[d];break;case"class":a._.className=c[d];break;case"on":a.on(c[d]);break;default:a.set(d,c[d])}}else a._=b}function bz(a){if(a!=null){var b=r in a?q[a[r]]:i;if(b!==i)return b;if(a.nodeType===1)return new bF(a);if(a.nodeType===9)return new bA(a);if(a.window==a)return new bC(a);if(C(a.target)||C(a.srcElement))return new bD(a)}return a}function by(a,b){typeof a==="string"&&(a=s({type:a},b),this.stopped=a.bubbles===!1,A(b)&&s(this,b)),this._=a,this.type=a.type,this.which=a.which,this.keyCode=a.keyCode,this.target=bz(a.target!=null&&"nodeType"in a.target&&a.target.nodeType===3?a.target.parentNode:a.target),this.currentTarget=bz(a.currentTarget),this.relatedTarget=bz(a.relatedTarget),this.pageX=a.pageX,this.pageY=a.pageY;if(bs&&"srcElement"in a){this.which=a.button===2?3:a.button===4?2:1,this.target=bz(a.srcElement)||b,this.relatedTarget=this.target._===a.fromElement?bz(a.toElement):this.target,this.currentTarget=b;var c=this.target.win().scrolls();this.pageX=a.clientX+c.x,this.pageY=a.clientY+c.y}}function bx(a,b){bJ(this,a,b);var c=this,d=c._,e=bv.Cast(d),f=r in d?d[r]:d[r]=p++;e!==i&&(c=new e(d,b),"$listeners"in this&&(c.$listeners=this.$listeners)),q[f]=c;return c}function bw(){return function(a,b){bh(this),this.initialize.apply(this,arguments);var c=this._,d=r in c?c[r]:c[r]=(c.nodeType===1?1:-1)*p++;q[d]=this}}function bn(a,b,c,d){if(A(b))for(var e in b)a.stopObserving(e,b[e]);else y(b)||(c=b,b=null),y(c)&&(c=a[c]),a.$listeners=(a.$listeners||[]).filter(function(a){var e=b&&c?a.e!==b||a.f!==c:b?a.e!==b:a.f!==c;e||d(a);return e})}function bm(a,b,c){var d=n.call(b,2),e=b[0],f=b[1],g=!1;if(y(e))switch(typeof f){case"string":g=f,f=f in a?a[f]:function(){};case"function":("$listeners"in a?a.$listeners:a.$listeners=[]).push(c({e:e,f:f,a:d,r:g||!1,t:a}));break;default:if(B(f))for(var h=0;h<f.length;h++)a.on.apply(a,[e].concat(N(f[h])).concat(d))}else{d=n.call(b,1);for(g in e)a.on.apply(a,[g].concat(N(e[g])).concat(d))}}function bh(a){"prebind"in a&&B(a.prebind)&&a.prebind.each(function(b){a[b]=a[b].bind(a)})}function bg(a,b){var c=b.toUpperCase(),d=a.constructor,e=[a,d].concat(d.ancestors||[]),f=0;for(l=e.length;f<l;f++){if(c in e[f])return e[f][c];if(b in e[f])return e[f][b]}return null}function bf(a,b,c){(b[bd[c?0:2]]||b[bd[c?1:3]]||function(){}).call(b,a)}function be(a,b){return c.without.apply(c,[a].concat(bd.concat(b?H("prototype parent ancestors"):["constructor"])))}function ba(a,b){return a>b?1:a<b?-1:0}function _(a){return!!a}function $(a,b,c){try{return a.apply(b,Y(c,b))}catch(d){if(!(d instanceof Z))throw d}return i}function Z(){}function Y(a,b){var c=a[0],d=n.call(a,1),e=b,f;typeof c==="string"?(f=c,b.length!==0&&typeof b[0][f]==="function"?c=function(a){return a[f].apply(a,d)}:c=function(a){return a[f]}):e=d[0];return[c,e]}function N(a){return B(a)?a:[a]}function K(a){return s(a,{Methods:{},include:function(){for(var b=0,c=arguments.length;b<c;b++)A(arguments[b])&&(s(a.prototype,arguments[b]),s(a.Methods,arguments[b]))}})}var j=function(a){return a};j.version="2.2.3",j.modules=["core","dom","form","events","xhr","fx","cookie"];var k=d.prototype,m=c.prototype.toString,n=k.slice,o=b.documentElement,p=1,q=[],r="uniqueNumber",s=j.$ext=function(a,b,c){var d=b||{},e;for(e in d)if(!c||!(e in a))a[e]=d[e];return a},t=j.$eval=function(b){b&&("execScript"in a?bB.win()._.execScript(b):G("script",{text:b}).insertTo(o))},u=j.$break=function(){throw new Z},v=j.$alias=function(a,b){for(var c in b)a[c]=a[b[c]];return a},w=j.defined=function(a){return typeof a!=="undefined"},x=j.isFunction=function(a){return typeof a==="function"},y=j.isString=function(a){return typeof a==="string"},z=j.isNumber=function(a){return typeof a==="number"},A=j.isHash=function(a){return m.call(a)==="[object Object]"},B=j.isArray=function(a){return m.call(a)==="[object Array]"},C=j.isElement=function(a){return a!=null&&a.nodeType===1},D=j.isNode=function(a){return a!=null&&a.nodeType!=null},E=j.$=function(a){if(a instanceof bv)return a;typeof a==="string"&&(a=b.getElementById(a));return bz(a)},F=j.$$=function(a,b){return bB.find(a,b)},G=j.$E=function(a,b){return new bF(a,b)},H=j.$w=function(a){return a.trim().split(/\s+/)},I=j.$uid=function(a){return r in a?a[r]:a[r]=p++},J=j.$A=function(a){return n.call(a,0)};k.map||(J=j.$A=function(a){try{return n.call(a,0)}catch(b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=a[d];return c}}),A(o)&&(A=j.isHash=function(a){return m.call(a)==="[object Object]"&&a!=null&&a.hasOwnProperty!=null});for(var L=0,M="Array Function Number String Date RegExp".split(" ");L<M.length;L++)j[M[L]]=K((new f("return "+M[L]))());j.Object=c,j.Math=h,s(c,{keys:function(a){var b=[],c;for(c in a)b.push(c);return b},values:function(a){var b=[],c;for(c in a)b.push(a[c]);return b},each:function(a,b,c){for(var d in a)b.call(c,d,a[d]);return a},empty:function(a){for(var b in a)return!1;return!0},clone:function(a){return c.merge(a)},without:function(){var a=J(arguments),b=a.shift(),c={},d;for(d in b)a.include(d)||(c[d]=b[d]);return c},only:function(){var a=J(arguments),b=a.shift(),c={},d=0,e=a.length;for(;d<e;d++)a[d]in b&&(c[a[d]]=b[a[d]]);return c},merge:function(){var a={},b=0,d=arguments,e;for(l=d.length;b<l;b++)if(A(d[b]))for(e in d[b])a[e]=A(d[b][e])&&!(d[b][e]instanceof bb)?c.merge(e in a?a[e]:{},d[b][e]):d[b][e];return a},toQueryString:function(a){var b=[],c,d,e=encodeURIComponent;for(c in a){d=N(a[c]);for(var f=0,g=d.length;f<g;f++)b.push(e(c)+"="+e(d[f]))}return b.join("&")}},!0);var O=h.random;h.random=function(a,b){if(arguments.length===0)return O();arguments.length===1&&(b=a,a=0);return~~(O()*(b-a+1)+~~a)};var P=k.sort,Q=k.forEach||function(a,b){for(var c=0,d=this.length;c<d;c++)a.call(b,this[c],c,this)},R=k.filter||function(a,b){for(var c=[],d=0,e=0,f=this.length;e<f;e++)a.call(b,this[e],e,this)&&(c[d++]=this[e]);return c},S=function(a,b){for(var c=[],d=0,e=0,f=this.length;e<f;e++)a.call(b,this[e],e,this)||(c[d++]=this[e]);return c},T=k.map||function(a,b){for(var c=[],d=0,e=this.length;d<e;d++)c[d]=a.call(b,this[d],d,this);return c},U=k.some||function(a,b){for(var c=0,d=this.length;c<d;c++)if(a.call(b,this[c],c,this))return!0;return!1},V=k.every||function(a,b){for(var c=0,d=this.length;c<d;c++)if(!a.call(b,this[c],c,this))return!1;return!0},W=function(a,b){for(var c=0,d=this.length;c<d;c++)if(a.call(b,this[c],c,this))return this[c];return i},X=function(a,b){for(var c=this.length-1;c>-1;c--)if(a.call(b,this[c],c,this))return this[c];return i};d.include({indexOf:k.indexOf||function(a,b){for(var c=b<0?h.max(0,this.length+b):b||0,d=this.length;c<d;c++)if(this[c]===a)return c;return-1},lastIndexOf:k.lastIndexOf||function(a){for(var b=this.length-1;b>-1;b--)if(this[b]===a)return b;return-1},first:function(){return arguments.length?$(W,this,arguments):this[0]},last:function(){return arguments.length?$(X,this,arguments):this[this.length-1]},random:function(){return this.length===0?i:this[h.random(this.length-1)]},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return this.length===0},clone:function(){return this.slice(0)},each:function(){$(Q,this,arguments);return this},forEach:Q,map:function(){return $(T,this,arguments)},filter:function(){return $(R,this,arguments)},reject:function(){return $(S,this,arguments)},some:function(a){return $(U,this,a?arguments:[_])},every:function(a){return $(V,this,a?arguments:[_])},walk:function(){this.map.apply(this,arguments).forEach(function(a,b){this[b]=a},this);return this},merge:function(){for(var a=this.clone(),b,c=0;c<arguments.length;c++){b=N(arguments[c]);for(var d=0;d<b.length;d++)a.indexOf(b[d])==-1&&a.push(b[d])}return a},flatten:function(){var a=[];this.forEach(function(b){B(b)?a=a.concat(b.flatten()):a.push(b)});return a},compact:function(){return this.without(null,i)},uniq:function(){return[].merge(this)},includes:function(){for(var a=0;a<arguments.length;a++)if(this.indexOf(arguments[a])===-1)return!1;return!0},without:function(){var a=n.call(arguments);return this.filter(function(b){return a.indexOf(b)===-1})},shuffle:function(){var a=this.clone(),b,c,d=a.length;for(;d>0;b=h.random(d-1),c=a[--d],a[d]=a[b],a[b]=c){}return a},sort:function(a){return P.apply(this,a||!z(this[0])?arguments:[ba])},sortBy:function(){var a=Y(arguments,this);return this.sort(function(b,c){return ba(a[0].call(a[1],b),a[0].call(a[1],c))})},min:function(){return h.min.apply(h,this)},max:function(){return h.max.apply(h,this)},sum:function(){for(var a=0,b=0,c=this.length;b<c;a+=this[b++]){}return a}}),k.include=k.includes,e.include({empty:function(){return this==""},blank:function(){return this==!1},trim:e.prototype.trim||function(){var a=this.replace(/^\s\s*/,""),b=a.length;while(/\s/.test(a.charAt(--b))){}return a.slice(0,b+1)},stripTags:function(){return this.replace(/<\/?[^>]+>/ig,"")},stripScripts:function(a){var b="",c=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/img,function(a,c){b+=c+"\n";return""});a===!0?t(b):x(a)&&a(b,c);return c},extractScripts:function(){var a="";this.stripScripts(function(b){a=b});return a},evalScripts:function(){this.stripScripts(!0);return this},camelize:function(){return this.replace(/(\-|_)+(.)?/g,function(a,b,c){return c?c.toUpperCase():""})},underscored:function(){return this.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/\-/g,"_").toLowerCase()},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},includes:function(a){return this.indexOf(a)!=-1},startsWith:function(a,b){return(b!==!0?this.indexOf(a):this.toLowerCase().indexOf(a.toLowerCase()))===0},endsWith:function(a,b){return this.length-(b!==!0?this.lastIndexOf(a):this.toLowerCase().lastIndexOf(a.toLowerCase()))===a.length},toInt:function(a){return parseInt(this,a===i?10:a)},toFloat:function(a){return parseFloat(a===!0?this:this.replace(",",".").replace(/(\d)-(\d)/,"$1.$2"))}}),e.prototype.include=e.prototype.includes,f.include({bind:function(){var a=J(arguments),b=a.shift(),c=this;return function(){return c.apply(b,a.length!==0||arguments.length!==0?a.concat(J(arguments)):a)}},bindAsEventListener:function(){var a=J(arguments),b=a.shift(),c=this;return function(d){return c.apply(b,[d].concat(a).concat(J(arguments)))}},curry:function(){return this.bind.apply(this,[this].concat(J(arguments)))},rcurry:function(){var a=J(arguments),b=this;return function(){return b.apply(b,J(arguments).concat(a))}},delay:function(){var a=J(arguments),b=a.shift(),c=new g(setTimeout(this.bind.apply(this,[this].concat(a)),b));c.cancel=function(){clearTimeout(this)};return c},periodical:function(){var a=J(arguments),b=a.shift(),c=new g(setInterval(this.bind.apply(this,[this].concat(a)),b));c.stop=function(){clearInterval(this)};return c},chain:function(){var a=J(arguments),b=a.shift(),c=this;return function(){var d=c.apply(c,arguments);b.apply(b,a);return d}}}),g.include({times:function(a,b){for(var c=0;c<this;c++)a.call(b,c);return this},upto:function(a,b,c){for(var d=this+0;d<=a;d++)b.call(c,d);return this},downto:function(a,b,c){for(var d=this+0;d>=a;d--)b.call(c,d);return this},abs:function(){return h.abs(this)},round:function(a){return a?parseFloat(this.toFixed(a)):h.round(this)},ceil:function(){return h.ceil(this)},floor:function(){return h.floor(this)},min:function(a){return this<a?a:this+0},max:function(a){return this>a?a:this+0}}),RegExp.escape=function(a){return(""+a).replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")};var bb=j.Class=function(){var a=J(arguments).slice(0,2),b=a.pop()||{},c=a.pop(),d=arguments[2],e=function(){};!a.length&&!A(b)&&(c=b,b={}),!d&&c&&(c===bv||c.ancestors.include(bv))&&(d=bw()),d=s(d||function(){bh(this);return"initialize"in this?this.initialize.apply(this,arguments):this},bc),c=c||bb,e.prototype=c.prototype,d.prototype=new e,d.parent=c,d.prototype.constructor=d,d.ancestors=[];while(c)d.ancestors.push(c),c=c.parent;["extend","include"].each(function(a){a in b&&d[a].apply(d,N(b[a]))});return d.include(b)},bc={extend:function(){J(arguments).filter(A).each(function(a){s(this,be(a,!0)),bf(this,a,!0)},this);return this},include:function(){var a=[this].concat(this.ancestors);J(arguments).filter(A).each(function(b){c.each(be(b,!1),function(b,c){for(var d,e=0,f=a.length;e<f;e++)if(b in a[e].prototype){d=a[e].prototype[b];break}this.prototype[b]=x(c)&&x(d)?function(){this.$super=d;return c.apply(this,arguments)}:c},this),bf(this,b,!1)},this);return this}},bd=H("selfExtended self_extended selfIncluded self_included extend include");s(bb,bc),bb.prototype.$super=i;var bi=j.Options={setOptions:function(a){var b=this.options=s(s({},c.clone(bg(this,"Options"))),a),d,e;if(x(this.on))for(e in b)if(d=e.match(/on([A-Z][A-Za-z]+)/))this.on(d[1].toLowerCase(),b[e]),delete b[e];return this},cutOptions:function(a){var b=J(a);this.setOptions(A(b.last())?b.pop():{});return b}},bj=j.Observer=new bb({include:bi,initialize:function(a){this.setOptions(a),bl(this,bg(this,"Events"));return this},on:function(){bm(this,arguments,function(a){return a});return this},observes:function(a,b){y(a)||(b=a,a=null),y(b)&&(b=b in this?this[b]:null);return(this.$listeners||[]).some(function(c){return a&&b?c.e===a&&c.f===b:a?c.e===a:c.f===b})},stopObserving:function(a,b){bn(this,a,b,function(){});return this},listeners:function(a){return(this.$listeners||[]).filter(function(b){return!a||b.e===a}).map(function(a){return a.f}).uniq()},fire:function(){var a=J(arguments),b=a.shift();(this.$listeners||[]).each(function(c){c.e===b&&c.f.apply(this,c.a.concat(a))},this);return this}}),bk=bj.create=function(a,b){s(a,c.without(bj.prototype,"initialize","setOptions"),!0);return bl(a,b||bg(a,"Events"))},bl=bj.createShortcuts=function(a,b){(b||[]).each(function(b){var c="on"+b.replace(/(^|_|:)([a-z])/g,function(a,b,c){return c.toUpperCase()});c in a||(a[c]=function(){return this.on.apply(this,[b].concat(J(arguments)))})});return a},bo=navigator.userAgent,bp="opera"in a,bq="attachEvent"in a&&!bp,br=j.Browser={IE:bq,Opera:bp,WebKit:bo.include("AppleWebKit/"),Gecko:bo.include("Gecko")&&!bo.include("KHTML"),MobileSafari:/Apple.*Mobile.*Safari/.test(bo),Konqueror:bo.include("Konqueror"),OLD:!b.querySelector,IE8L:!1},bs=!1,bt=!("opacity"in o.style)&&"filter"in o.style;try{b.createElement("<input/>"),br.OLD=br.IE8L=bs=!0}catch(bu){}var bv=j.Wrapper=new bb({_:i,initialize:function(a){this._=a}});bv.Cache=q,bv.Cast=function(a){return a.tagName in bG?bG[a.tagName]:i};var bA=j.Document=new bb(bv,{win:function(){return bz(this._.defaultView||this._.parentWindow)}}),bB=bz(b),bC=j.Window=new bb(bv,{win:function(){return this},size:function(){var a=this._,b=a.document.documentElement;return a.innerWidth?{x:a.innerWidth,y:a.innerHeight}:{x:b.clientWidth,y:b.clientHeight}},scrolls:function(){var a=this._,b=a.document,c=b.body,d=b.documentElement;return a.pageXOffset||a.pageYOffset?{x:a.pageXOffset,y:a.pageYOffset}:c&&(c.scrollLeft||c.scrollTop)?{x:c.scrollLeft,y:c.scrollTop}:{x:d.scrollLeft,y:d.scrollTop}},scrollTo:function(a,b,c){var d=a,e=b,f=z(a)?null:E(a);f instanceof bF&&(a=f.position()),A(a)&&(e=a.y,d=a.x),A(c=c||b)&&j.Fx?(new cf.Scroll(this,c)).start({x:d,y:e}):this._.scrollTo(d,e);return this}}),bD=j.Event=new bb(bv,{type:null,which:null,keyCode:null,target:null,currentTarget:null,relatedTarget:null,pageX:null,pageY:null,initialize:by,stopPropagation:function(){this._.stopPropagation?this._.stopPropagation():this._.cancelBubble=!0,this.stopped=!0;return this},preventDefault:function(){this._.preventDefault?this._.preventDefault():this._.returnValue=!1;return this},stop:function(){return this.stopPropagation().preventDefault()},position:function(){return{x:this.pageX,y:this.pageY}},offset:function(){if(this.target instanceof bF){var a=this.target.position();return{x:this.pageX-a.x,y:this.pageY-a.y}}return null},find:function(a){if(this.target instanceof bv&&this.currentTarget instanceof bv){var b=this.target._,c=this.currentTarget.find(a,!0);while(b){if(c.indexOf(b)!==-1)return bz(b);b=b.parentNode}}return i}},by),bE=[],bF=j.Element=new bb(bv,{initialize:function(a,b){bJ(this,a,b)}},bx),bG=bF.Wrappers={},bH={},bI=function(a,c){return(a in bH?bH[a]:bH[a]=b.createElement(a)).cloneNode(!1)};bs&&(bI=function(a,c){a==="input"&&c!==i&&(a='<input name="'+c.name+'" type='+c.type+(c.checked?" checked":"")+"/>");return b.createElement(a)}),bF.include({parent:function(a){var b=this._.parentNode,c=b&&b.nodeType;return a?this.parents(a)[0]:c===1||c===9?bz(b):null},parents:function(a){return bK(this,"parentNode",a)},children:function(a){return this.find(a).filter(function(a){return a._.parentNode===this._},this)},siblings:function(a){return this.prevSiblings(a).reverse().concat(this.nextSiblings(a))},nextSiblings:function(a){return bK(this,"nextSibling",a)},prevSiblings:function(a){return bK(this,"previousSibling",a)},next:function(a){return!a&&this._.nextElementSibling!==i?bz(this._.nextElementSibling):this.nextSiblings(a)[0]},prev:function(a){return!a&&this._.previousElementSibling!==i?bz(this._.previousElementSibling):this.prevSiblings(a)[0]},remove:function(){var a=this._,b=a.parentNode;b&&b.removeChild(a);return this},insert:function(a,b){var c=null,d=this._;b=b===i?"bottom":b,typeof a!=="object"?c=a=""+a:a instanceof bF&&(a=a._),bL[b](d,a.nodeType===i?bP(b==="bottom"||b==="top"?d:d.parentNode,a):a),c!==null&&c.evalScripts();return this},insertTo:function(a,b){E(a).insert(this,b);return this},append:function(a){return this.insert(y(a)?J(arguments).join(""):arguments)},update:function(a){if(typeof a!=="object"){a=""+a;try{this._.innerHTML=a}catch(b){return this.clean().insert(a)}a.evalScripts();return this}return this.clean().insert(a)},html:function(a){return a===i?this._.innerHTML:this.update(a)},text:function(a){return a===i?this._.textContent||this._.innerText:this.update(this.doc()._.createTextNode(a))},replace:function(a){return this.insert(a,"instead")},wrap:function(a){var b=this._,c=b.parentNode;c&&(a=E(a)._,c.replaceChild(a,b),a.appendChild(b));return this},clean:function(){while(this._.firstChild)this._.removeChild(this._.firstChild);return this},empty:function(){return this.html().blank()},clone:function(){return new bF(this._.cloneNode(!0))},index:function(){var a=this._,b=a.parentNode.firstChild,c=0;while(b!==a)b.nodeType===1&&c++,b=b.nextSibling;return c}});var bL={bottom:function(a,b){a.appendChild(b)},top:function(a,b){a.firstChild!==null?a.insertBefore(b,a.firstChild):a.appendChild(b)},after:function(a,b){var c=a.parentNode,d=a.nextSibling;d!==null?c.insertBefore(b,d):c.appendChild(b)},before:function(a,b){a.parentNode.insertBefore(b,a)},instead:function(a,b){a.parentNode.replaceChild(b,a)}},bM={TBODY:["<TABLE>","</TABLE>",2],TR:["<TABLE><TBODY>","</TBODY></TABLE>",3],TD:["<TABLE><TBODY><TR>","</TR></TBODY></TABLE>",4],COL:["<TABLE><COLGROUP>","</COLGROUP><TBODY></TBODY></TABLE>",2],LEGEND:["<FIELDSET>","</FIELDSET>",2],AREA:["<map>","</map>",2],OPTION:["<SELECT>","</SELECT>",2]};v(bM,{OPTGROUP:"OPTION",THEAD:"TBODY",TFOOT:"TBODY",TH:"TD"});var bN=b.createDocumentFragment(),bO=b.createElement("DIV");bF.include({setStyle:function(a,b){var c,d,e={},f=this._.style;b!==i?(e[a]=b,a=e):y(a)&&(a.split(";").each(function(a){var b=a.split(":").map("trim");b[0]&&b[1]&&(e[b[0]]=b[1])}),a=e);for(c in a)d=c.indexOf("-")<0?c:c.camelize(),bt&&c==="opacity"?f.filter="alpha(opacity="+a[c]*100+")":c==="float"&&(d=bq?"styleFloat":"cssFloat"),f[d]=a[c];return this},getStyle:function(a){return bQ(this._.style,a)||bQ(this.computedStyles(),a)},computedStyles:o.currentStyle?function(){return this._.currentStyle||{}}:o.runtimeStyle?function(){return this._.runtimeStyle||{}}:function(){return this._.ownerDocument.defaultView.getComputedStyle(this._,null)},hasClass:function(a){return(" "+this._.className+" ").indexOf(" "+a+" ")!=-1},setClass:function(a){this._.className=a;return this},getClass:function(){return this._.className},addClass:function(a){var b=" "+this._.className+" ";b.indexOf(" "+a+" ")==-1&&(this._.className+=(b===" "?"":" ")+a);return this},removeClass:function(a){this._.className=(" "+this._.className+" ").replace(" "+a+" "," ").trim();return this},toggleClass:function(a){return this[this.hasClass(a)?"removeClass":"addClass"](a)},radioClass:function(a){this.siblings().each("removeClass",a);return this.addClass(a)}}),bF.include({set:function(a,b){if(typeof a==="string"){var c={};c[a]=b,a=c}var d,e=this._;for(d in a)d==="style"?this.setStyle(a[d]):(d in e||e.setAttribute(d,""+a[d]),e[d]=a[d]);return this},get:function(a){var b=this._,c=b[a]||b.getAttribute(a);return c===""?null:c},has:function(a){return this.get(a)!==null},erase:function(a){this._.removeAttribute(a);return this},hidden:function(){return this.getStyle("display")==="none"},visible:function(){return!this.hidden()},hide:function(a,b){this.visible()&&(this._d=this.getStyle("display"),this._.style.display="none");return this},show:function(){if(this.hidden()){var a=this._,b=this._d,c;if(!b||b==="none")c=G(a.tagName).insertTo(o),b=c.getStyle("display"),c.remove();b==="none"&&(b="block"),a.style.display=b}return this},toggle:function(){return this[this.visible()?"hide":"show"]()},radio:function(a,b){this.siblings().each("hide",a,b);return this.show()}}),bF.include({doc:function(){return bz(this._.ownerDocument)},win:function(){return this.doc().win()},size:function(){return{x:this._.offsetWidth,y:this._.offsetHeight}},position:function(){var a=this._.getBoundingClientRect(),b=this.doc()._.documentElement,c=this.win().scrolls();return{x:a.left+c.x-b.clientLeft,y:a.top+c.y-b.clientTop}},scrolls:function(){return{x:this._.scrollLeft,y:this._.scrollTop}},dimensions:function(){var a=this.size(),b=this.scrolls(),c=this.position();return{top:c.y,left:c.x,width:a.x,height:a.y,scrollLeft:b.x,scrollTop:b.y}},overlaps:function(a){var b=this.position(),c=this.size();return a.x>b.x&&a.x<b.x+c.x&&a.y>b.y&&a.y<b.y+c.y},setWidth:function(a){var b=this._.style;b.width=a+"px",b.width=2*a-this._.offsetWidth+"px";return this},setHeight:function(a){var b=this._.style;b.height=a+"px",b.height=2*a-this._.offsetHeight+"px";return this},resize:function(a,b){A(a)&&(b=a.y,a=a.x);return this.setWidth(a).setHeight(b)},moveTo:function(a,b){A(a)&&(b=a.y,a=a.x);return this.setStyle({left:a+"px",top:b+"px"})},scrollTo:function(a,b){A(a)&&(b=a.y,a=a.x),this._.scrollLeft=a,this._.scrollTop=b;return this},scrollThere:function(a){this.win().scrollTo(this,a);return this}}),[bF,bA,bC].each("include",s(bk({}),{on:function(){bm(this,arguments,function(a){a.e==="mouseenter"||a.e==="mouseleave"?(b$(),a.n=a.e,a.w=function(){}):(a.e==="contextmenu"&&br.Konqueror?a.n="rightclick":a.e==="mousewheel"&&br.Gecko?a.n="DOMMouseScroll":a.n=a.e,a.w=function(b){b=new bD(b,a.t),a.f.apply(a.t,(a.r?[]:[b]).concat(a.a))===!1&&b.stop()},bs?a.t._.attachEvent("on"+a.n,a.w):a.t._.addEventListener(a.n,a.w,!1));return a});return this},stopObserving:function(a,b){bn(this,a,b,function(a){bs?a.t._.detachEvent("on"+a.n,a.w):a.t._.removeEventListener(a.n,a.w,!1)});return this},fire:function(a,b){var c=this.parent&&this.parent();a instanceof bD||(a=new bD(a,s({target:this._},b))),a.currentTarget=this,(this.$listeners||[]).each(function(b){b.e===a.type&&b.f.apply(this,(b.r?[]:[a]).concat(b.a))===!1&&a.stop()},this),c&&c.fire&&!a.stopped&&c.fire(a);return this},stopEvent:function(){return!1}})),bl(bC.prototype,H("blur focus scroll resize load")),bR("click rightclick contextmenu mousedown mouseup mouseover mouseout mousemove keypress keydown keyup"),[bF,bA].each("include",{first:function(a){return bz(a===i&&this._.firstElementChild!==i?this._.firstElementChild:this._.querySelector(a||"*"))},find:function(a,b){var c=this._.querySelectorAll(a||"*"),d,e=0,f=c.length;if(b===!0)d=J(c);else for(d=[];e<f;e++)d[e]=bz(c[e]);return d},match:function(a){var c=this._,d=c,e,f=!1;while(d.parentNode!==null&&d.parentNode.nodeType!==11)d=d.parentNode;c===d&&(d=b.createElement("div"),d.appendChild(c),f=!0),e=bz(d).find(a,!0).indexOf(c)!==-1,f&&d.removeChild(c);return e}}),bA.include({on:function(a){if(a==="ready"&&!this._iR){var b=this._,c=this.fire.bind(this,"ready");"readyState"in b?function(){["loaded","complete"].include(b.readyState)?c():arguments.callee.delay(50)}():b.addEventListener("DOMContentLoaded",c,!1),this._iR=!0}return this.$super.apply(this,arguments)}}),bl(bA.prototype,["ready"]);var bS=j.Form=bG.FORM=new bb(bF,{initialize:function(a){var b=a||{},d="remote"in b,e=b;A(b)&&!C(b)&&(e="form",b=c.without(b,"remote")),this.$super(e,b),d&&this.remotize()},elements:function(){return this.find("input,button,select,textarea")},inputs:function(){return this.elements().filter(function(a){return!["submit","button","reset","image",null].include(a._.type)})},input:function(a){return bz(this._[a])},focus:function(){var a=this.inputs().first(function(a){return a._.type!=="hidden"});a&&a.focus();return this},blur:function(){this.elements().each("blur");return this},disable:function(){this.elements().each("disable");return this},enable:function(){this.elements().each("enable");return this},values:function(){var a={},b,c,d,e;this.inputs().each(function(d){e=d._,c=e.name,!e.disabled&&c&&(!["checkbox","radio"].include(e.type)||e.checked)&&(b=d.getValue(),c.endsWith("[]")&&(b=(a[c]||[]).concat([b])),a[c]=b)});return a},serialize:function(){return c.toQueryString(this.values())},submit:function(){this._.submit();return this},reset:function(){this._.reset();return this}});bR("submit reset focus blur disable enable change");var bT=j.Input=bG.INPUT=bG.BUTTON=bG.SELECT=bG.TEXTAREA=bG.OPTGROUP=new bb(bF,{initialize:function(a,b){if(!a||A(a)&&!C(a))b=a||{},/textarea|select/.test(b.type||"")?(a=b.type,delete b.type):a="input";this.$super(a,b)},form:function(){return bz(this._.form)},insert:function(a,b){this.$super(a,b),this.find("option").each(function(a){a._.selected=!!a.get("selected")});return this},update:function(a){return this.clean().insert(a)},getValue:function(){return this._.type=="select-multiple"?this.find("option").map(function(a){return a._.selected?a._.value:null}).compact():this._.value},setValue:function(a){this._.type=="select-multiple"?(a=N(a).map(e),this.find("option").each(function(b){b._.selected=a.include(b._.value)})):this._.value=a;return this},value:function(a){return this[a===i?"getValue":"setValue"](a)},focus:function(){this._.focus(),this.focused=!0,bq&&this.fire("focus",{bubbles:!1});return this},blur:function(){this._.blur(),this.focused=!1,bq&&this.fire("blur",{bubbles:!1});return this},select:function(){this._.select();return this.focus()},disable:function(){this._.disabled=!0;return this.fire("disable")},enable:function(){this._.disabled=!1;return this.fire("enable")},disabled:function(a){return a===i?this._.disabled:this[a?"disable":"enable"]()},checked:function(a){a===i?a=this._.checked:(this._.checked=a,a=this);return a}});bs?(b.attachEvent("onfocusin",bU),b.attachEvent("onfocusout",bU)):(b.addEventListener("focus",bU,!0),b.addEventListener("blur",bU,!0));var bV=[],bW=!0;bR("mouseenter mouseleave"),[bF,bA].each("include",{delegate:function(a){var b=ca(arguments),c,d,e,f;for(c in b)for(d=0,f=b[c];d<f.length;d++)this.on(a,b_(c,f[d],this)),s(this.$listeners.last(),{dr:c,dc:f[d][0]});return this},undelegate:function(a){cb(arguments,this).each(function(a){this.stopObserving(a.n,a.f)},this);return this},delegates:function(){return!!cb(arguments,this).length}}),c.each({on:"delegate",stopObserving:"undelegate",observes:"delegates"},function(a,b){e.prototype[a]=function(){var a=J(arguments),c;a.splice(1,0,""+this),c=bB[b].apply(bB,a);return c===bB?this:c}});var cc=e.prototype.on;e.prototype.on=function(a){if(A(a))for(var b in a)cc.apply(this,[b].concat([a[b]]));else cc.apply(this,arguments);return this},bE.each(function(a){e.prototype["on"+a.capitalize()]=function(){return this.on.apply(this,[a].concat(J(arguments)))}}),H("Element Input Form").each(function(a){c.each(a in j?j[a].prototype:{},function(a,b){x(b)&&!(a in e.prototype)&&(e.prototype[a]=function(){var b=F(this,!0),c=0,d=b.length,e=!0,f,g;for(;c<d;c++){f=bz(b[c]),g=f[a].apply(f,arguments);if(e){if(g!==f)return g;e=!1}}return null})})});var cd=j.Xhr=new bb(bj,{extend:{EVENTS:H("success failure complete request cancel create"),Options:{headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript,text/html,application/xml,text/xml,*/*"},method:"post",encoding:"utf-8",async:!0,evalScripts:!1,evalResponse:!1,evalJS:!0,evalJSON:!0,secureJSON:!0,urlEncoded:!0,spinner:null,spinnerFx:"fade",params:null,iframed:!1,jsonp:!1},load:function(a,b){return(new this(a,s({method:"get"},b))).send()}},initialize:function(a,b){this.initCallbacks(),this.url=a,s(this.$super(b),this.options),this.params!=cd.Options.params&&(this.params=this.prepareData(cd.Options.params,this.params)),cd.Options.spinner&&E(this.spinner)===E(cd.Options.spinner)&&(this.spinner=null)},setHeader:function(a,b){this.headers[a]=b;return this},getHeader:function(a){var b;try{b=this.xhr.getResponseHeader(a)}catch(c){}return b},successful:function(){return this.status>=200&&this.status<300},send:function(a){var b={},c=this.url,d=this.method.toLowerCase(),e=this.headers,f,g;if(d=="put"||d=="delete")b._method=d,d="post";var h=this.prepareData(this.params,this.prepareParams(a),b);this.urlEncoded&&d=="post"&&!e["Content-type"]&&this.setHeader("Content-type","application/x-www-form-urlencoded;charset="+this.encoding),d=="get"&&(h&&(c+=(c.include("?")?"&":"?")+h),h=null),g=this.xhr=this.createXhr(),this.fire("create"),g.open(d,c,this.async),g.onreadystatechange=this.stateChanged.bind(this);for(f in e)g.setRequestHeader(f,e[f]);g.send(h),this.fire("request"),this.async||this.stateChanged();return this},update:function(a,b){return this.onSuccess(function(b){a.update(b.text)}).send(b)},cancel:function(){var a=this.xhr;if(!a||a.canceled)return this;a.abort(),a.onreadystatechange=function(){},a.canceled=!0;return this.fire("cancel")},fire:function(a){return this.$super(a,this,this.xhr)},createXhr:function(){return this.jsonp?new cd.JSONP(this):this.form&&this.form.first("input[type=file]")?new cd.IFramed(this.form):"ActiveXObject"in a?new ActiveXObject("MSXML2.XMLHTTP"):new XMLHttpRequest},prepareParams:function(a){a&&a instanceof bS&&(this.form=a,a=a.values());return a},prepareData:function(){return J(arguments).map(function(a){y(a)||(a=c.toQueryString(a));return a.blank()?null:a}).compact().join("&")},stateChanged:function(){var a=this.xhr;if(a.readyState==4&&!a.canceled){try{this.status=a.status}catch(b){this.status=0}this.text=this.responseText=a.responseText,this.xml=this.responseXML=a.responseXML,this.fire("complete").fire(this.successful()?"success":"failure")}},tryScripts:function(a){var b=this.getHeader("Content-type");this.evalResponse||this.evalJS&&/(ecma|java)script/i.test(b)?t(this.text):/json/.test(b)&&this.evalJSON?this.json=this.responseJSON=this.sanitizedJSON():this.evalScripts&&this.text.evalScripts()},sanitizedJSON:function(){if(!/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(this.text.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){if(this.secureJSON)throw"JSON error: "+this.text;return null}return"JSON"in a?JSON.parse(this.text):(new f("return "+this.text))()},initCallbacks:function(){this.on({success:"tryScripts",create:"showSpinner",complete:"hideSpinner",cancel:"hideSpinner"}),cd.EVENTS.each(function(a){this.on(a,function(){cd.fire(a,this,this.xhr)})},this)},showSpinner:function(){cd.showSpinner.call(this,this)},hideSpinner:function(){cd.hideSpinner.call(this,this)}});s(bk(cd),{counter:0,showSpinner:function(a){cd.trySpinner(a,"show")},hideSpinner:function(a){cd.trySpinner(a,"hide")},trySpinner:function(a,b){var c=a||cd.Options,d=E(c.spinner);d&&d[b](c.spinnerFx,{duration:100})},countIn:function(){cd.counter++,cd.showSpinner()},countOut:function(){cd.counter--,cd.counter<1&&cd.hideSpinner()}}).on({create:"countIn",complete:"countOut",cancel:"countOut"}),bS.include({send:function(a){a=a||{},a.method=a.method||this._.method||"post",this.xhr=(new cd(this._.action||b.location.href,s({spinner:this.first(".spinner")},a))).onComplete(this.enable.bind(this)).onCancel(this.enable.bind(this)).send(this),this.disable.bind(this).delay(1);return this},cancelXhr:function(){this.xhr instanceof cd&&this.xhr.cancel();return this},remotize:function(a){this.remote||(this.on("submit",ce,a),this.remote=!0);return this},unremotize:function(){this.stopObserving("submit",ce),this.remote=!1;return this}}),bF.include({load:function(a,b){(new cd(a,s({method:"get"},b))).update(this);return this}}),cd.Dummy={open:function(){},setRequestHeader:function(){},onreadystatechange:function(){}},cd.IFramed=new bb({include:cd.Dummy,initialize:function(a){this.form=a,this.id="xhr_"+(new Date).getTime(),this.form.doc().first("body").append('<i><iframe name="'+this.id+'" id="'+this.id+'" width="0" height="0" frameborder="0" src="about:blank"></iframe></i>',"after"),E(this.id).on("load",this.onLoad.bind(this))},send:function(){this.form.set("target",this.id).submit()},onLoad:function(){this.status=200,this.readyState=4,this.form.set("target","");try{this.responseText=a[this.id].document.documentElement.innerHTML}catch(b){}this.onreadystatechange()},abort:function(){E(this.id).set("src","about:blank")}}),cd.JSONP=new bb({include:cd.Dummy,prefix:"jsonp",initialize:function(a){this.xhr=a,this.name=this.prefix+(new Date).getTime(),this.param=(y(a.jsonp)?a.jsonp:"callback")+"="+this.name,this.script=G("script",{charset:a.encoding,async:a.async})},open:function(a,b,c){this.url=b,this.method=a},send:function(b){a[this.name]=this.finish.bind(this),this.script.set("src",this.url+(this.url.include("?")?"&":"?")+this.param+"&"+b).insertTo(F("script").last(),"after")},finish:function(a){this.status=200,this.readyState=4,this.xhr.json=this.xhr.responseJSON=a,this.onreadystatechange()},abort:function(){a[this.name]=function(){}}});var cf=j.Fx=new bb(bj,{extend:{EVENTS:H("start finish cancel"),Durations:{"short":200,normal:400,"long":800},Options:{fps:bs?40:60,duration:"normal",transition:"Sin",queue:!0},Transitions:{Sin:function(a){return-(h.cos(h.PI*a)-1)/2},Cos:function(a){return h.asin((a-.5)*2)/h.PI+.5},Exp:function(a){return h.pow(2,8*(a-1))},Log:function(a){return 1-h.pow(2,-8*a)},Lin:function(a){return a}}},initialize:function(a,b){this.$super(b),this.element=E(a),ci(this)},start:function(){if(cj(this,arguments))return this;var a=this.options,b=cf.Durations[a.duration]||a.duration,c=cf.Transitions[a.transition]||a.transition,d=(b/1e3*this.options.fps).ceil(),e=(1e3/this.options.fps).round();ck(this),this.prepare.apply(this,arguments),co(this,c,e,d);return this.fire("start",this)},finish:function(){cp(this),cl(this),this.fire("finish"),cm(this);return this},cancel:function(){cp(this),cl(this);return this.fire("cancel")},prepare:function(){},render:function(){}}),cg=[],ch=[];e.COLORS={maroon:"#800000",red:"#ff0000",orange:"#ffA500",yellow:"#ffff00",olive:"#808000",purple:"#800080",fuchsia:"#ff00ff",white:"#ffffff",lime:"#00ff00",green:"#008000",navy:"#000080",blue:"#0000ff",aqua:"#00ffff",teal:"#008080",black:"#000000",silver:"#c0c0c0",gray:"#808080",brown:"#a52a2a"},e.include({toHex:function(){var a=/^#(\w)(\w)(\w)$/.exec(this);a?a="#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]:(a=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(this))?a="#"+a.slice(1).map(function(a){a=(a-0).toString(16);return a.length==1?"0"+a:a}).join(""):a=e.COLORS[this]||this;return a},toRgb:function(a){var b=/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/i.exec(this.toHex()||"");b&&(b=b.slice(1).map("toInt",16),b=a?b:"rgb("+b+")");return b}}),bF.include({stop:function(){cn(this);return this},hide:function(a,b){return a&&this.visible()?cq(this,a,["out",b]):this.$super()},show:function(a,b){return a&&!this.visible()?cq(this,a,["in",b]):this.$super()},toggle:function(a,b){return a?cq(this,a,["toggle",b]):this.$super()},remove:function(a,b){return a&&this.visible()?cq(this,a,["out",s(b||{},{onFinish:this.$super.bind(this)})]):this.$super()},morph:function(a,b){return cq(this,"morph",[a,b||{}])},highlight:function(){return cq(this,"highlight",arguments)},fade:function(){return cq(this,"fade",arguments)},slide:function(){return cq(this,"slide",arguments)},scroll:function(a,b){return cq(this,"scroll",[a,b||{}])},scrollTo:function(a,b){return A(b)?this.scroll(a,b):this.$super.apply(this,arguments)}});var cr=["WebkitT","OT","MozT","MsT","t"].first(function(a){return a+"ransition"in o.style}),cs=cr+"ransition",ct=cs+"Property",cu=cs+"Duration",cv=cs+"TimingFunction",cw={Sin:"cubic-bezier(.3,0,.6,1)",Cos:"cubic-bezier(0,.3,.6,0)",Log:"cubic-bezier(0.6,.3,.8)",Exp:"cubic-bezier(.6,0,.8,.3)",Lin:"cubic-bezier(0,0,1,1)"};cf.Options.engine=cr===i||bp?"javascript":"native",cf.Morph=new bb(cf,{prepare:function(a){if(this.options.engine==="native"&&cr!==i)this.render=this.transition=function(){},cx.call(this,a);else{var b=cA(a),c=cF(this.element,b),d=cG(this.element,a,b);cE(this.element,c,d),this.before=cD(c),this.after=cD(d)}},render:function(a){var b,c,d,e=this.element._.style,f,g,i;for(f in this.after){b=this.before[f],c=this.after[f];for(g=0,i=c.length;g<i;g++)d=b[g]+(c[g]-b[g])*a,c.r&&(d=h.round(d)),c.t[g*2+1]=d;e[f]=c.t.join("")}}});var cy=H("Top Left Right Bottom");cf.Highlight=new bb(cf.Morph,{extend:{Options:c.merge(cf.Options,{color:"#FF8",transition:"Exp"})},prepare:function(a,b){var c=this.element,d=c._.style,e="backgroundColor",f=b||c.getStyle(e);cB(f)&&(this.onFinish(function(){d[e]="transparent"}),f=[c].concat(c.parents()).map("getStyle",e).reject(cB).compact().first()||"#FFF"),d[e]=a||this.options.color;return this.$super({backgroundColor:f})}}),cf.Twin=new bb(cf.Morph,{finish:function(){this.how==="out"&&bF.prototype.hide.call(this.element);return this.$super()},setHow:function(a){this.how=a||"toggle",this.how==="toggle"&&(this.how=this.element.visible()?"out":"in")}}),cf.Slide=new bb(cf.Twin,{extend:{Options:c.merge(cf.Options,{direction:"top"})},prepare:function(a){function f(){for(var a in e)d[a]=e[a]}this.setHow(a);var b=bF.prototype.show.call(this.element),d=b._.style,e=c.only(d,"overflow","width","height","marginTop","marginLeft");this.onFinish(f).onCancel(f),d.overflow="hidden";return this.$super(cH(d,b.size(),this.options.direction,this.how))}}),cf.Fade=new bb(cf.Twin,{prepare:function(a){this.setHow(a),this.how==="in"&&bF.prototype.show.call(this.element.setStyle({opacity:0}));return this.$super({opacity:this.how==="in"?1:0})}}),cf.Attr=new bb(cf,{prepare:function(a){this.before={},this.after=a;var b,c=this.element._;for(b in a)this.before[b]=c[b]},render:function(a){var b,c=this.element._,d=this.before;for(b in d)c[b]=d[b]+(this.after[b]-d[b])*a}}),cf.Scroll=new bb(cf.Attr,{initialize:function(a,b){a=E(a),this.$super(a instanceof bC?a._.document["body"in a._.document?"body":"documentElement"]:a,b)},prepare:function(a){var b={};"x"in a&&(b.scrollLeft=a.x),"y"in a&&(b.scrollTop=a.y),this.$super(b)}});var cI=j.Cookie=new bb({include:bi,extend:{set:function(a,b,c){return(new this(a,c)).set(b)},get:function(a){return(new this(a)).get()},remove:function(a){return(new this(a)).remove()},enabled:function(){b.cookie="__t=1";return b.cookie.indexOf("__t=1")!=-1},Options:{secure:!1,document:b}},initialize:function(a,b){this.name=a,this.setOptions(b)},set:function(a){var b=encodeURIComponent(a),c=this.options;c.domain&&(b+="; domain="+c.domain),c.path&&(b+="; path="+c.path);if(c.duration){var d=new Date;d.setTime(d.getTime()+c.duration*24*60*60*1e3),b+="; expires="+d.toGMTString()}c.secure&&(b+="; secure"),c.document.cookie=this.name+"="+b;return this},get:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+RegExp.escape(this.name)+"=([^;]*)");return a?decodeURIComponent(a[1]):null},remove:function(){this.options.duration=-1;return this.set("")}});s(a,c.without(j,"version","modules"));return j}(window,document,Object,Array,String,Function,Number,Math);RightJS.Browser.OLD&&function(a){var b=a.createElement("script"),c=a.getElementsByTagName("script"),d=c[c.length-1];b.src=d.src.replace(/(^|\/)(right)([^\/]+)$/,"$1$2-olds$3"),d.parentNode.appendChild(b)}(document)