/**
* RightJS v2.2.3 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,i){function cJ(a,c){var d=b.createElement(c);d.setAttribute(a,";");return x(d[a])}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(;cd?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"+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;gb?1:a-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-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;c0;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]+>/ig,"")},stripScripts:function(a){var b="",c=this.replace(/