/**
* RightJS v2.2.2 safe-mode, http://rightjs.org
* Released under terms of the MIT license
*
* Copyright (C) 2008-2011 Nikolay Nemshilov
*/
/**
* The safe-mode layout
*
* Copyright (C) 2010-2011 Nikolay Nemshilov
*/
var RightJS = (function(window, src) {
// premassaging the source code, swapping the document reference where needed
src = src
// the default document to the current one
.replace(',document,', ',parent.document,')
// building the inside types conversion methods
+ 'RightJS.$N=function(v){return new Number(v)};'
+ 'RightJS.$S=function(v){return new String(v)}';
// building the frame sandbox
var frame_id = '__rightjs_condom', document = window.document;
if ('attachEvent' in window) {
document.write('');
} else {
var frame = document.createElement('iframe');
frame.name = frame_id;
frame.style.display = 'none';
document.documentElement.appendChild(frame);
}
// puttin the code into the frame
var win = window.frames[frame_id];
if ('execScript' in win) {
win.execScript(src);
} else {
var doc = win.document;
doc.open();doc.write(''); doc.close();
var script = document.createElement('script');
script.text = src;
doc.body.appendChild(script);
}
// transferring the object references from the sandbox into local variable
var RightJS = win.RightJS;
RightJS.context = win;
RightJS.safe = true;
// building the access and types conversion proxy
var proxy = function(value) {
switch (typeof value) {
case 'number': return RightJS.$N(value);
case 'string': return RightJS.$S(value);
case 'function': return RightJS.$ext(value, RightJS.Function.Methods);
case 'object':
if (RightJS.isArray(value))
return RightJS.$A(value);
}
return value;
};
return RightJS.$ext(proxy, RightJS);
})(window, 'var RightJS=function(a,b,c,d,e,f,g,h){function cG(a,c){var d=b.createElement(c);d.setAttribute(a,";");return v(d[a])}function cE(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 cD(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=cC(d,c),d.remove();return e}function cC(a,b){var c=0,d=b.length,e=a.computedStyles(),f={},g;for(;cd?a.finish():(a.render(b(e/d)),e++)},c)}function ck(a){var b=G(a._);(ce[b]||[]).each("cancel"),(cd[b]||[]).splice(0)}function cj(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 ci(a){var b=a.cr;b&&b.splice(b.indexOf(a),1)}function ch(a){a.cr&&a.cr.push(a)}function cg(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 cf(a){var b=G((a.element||{})._||{});a.ch=cd[b]=cd[b]||[],a.cr=ce[b]=ce[b]||[]}function cb(a,b){a.stop(),this.send(b)}function b$(a,b){var d=a[0],e,f,g=bZ(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"+b+""+c+">"+e[1];while(f--!==0)d=d.firstChild;b=d.childNodes;while(b.length!==0)bK.appendChild(b[0])}else for(var g=0,h=b.length,i;gb?1:a-1;c--)if(a.call(b,this[c],c,this))return this[c];return undefined};d.include({indexOf:j.indexOf||function(a,b){for(var c=b<0?h.max(0,this.length+b):b||0;c-1;b--)if(this[b]===a)return b;return-1},first:function(){return arguments.length?Y(U,this,arguments):this[0]},last:function(){return arguments.length?Y(V,this,arguments):this[this.length-1]},random:function(){return this.length===0?undefined: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(){Y(O,this,arguments);return this},forEach:O,map:function(){return Y(R,this,arguments)},filter:function(){return Y(P,this,arguments)},reject:function(){return Y(Q,this,arguments)},some:function(a){return Y(S,this,a?arguments:[Z])},every:function(a){return Y(T,this,a?arguments:[Z])},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;c0;b=h.random(d-1),c=a[--d],a[d]=a[b],a[b]=c){}return a},sort:function(a){return N.apply(this,a||!x(this[0])?arguments:[$])},sortBy:function(){var a=W(arguments,this);return this.sort(function(b,c){return $(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;b]+>/ig,"")},stripScripts:function(a){var b="",c=this.replace(/