/**
* RightJS in safe-mode, http://rightjs.org
* Released under terms of the MIT license
*
* Copyright (C) 2008-2010 Nikolay Nemshilov
*/
/**
* The safe-mode layout
*
* Copyright (C) 2010 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(P,r,u,E,M,V,ma,w){function Q(a){return W(a)?a:[a]}function Ba(a,b){var c=a[0],d=Ca.call(a,1),e=b,f;if(L(c)){f=c;c=b.length&&$(b[0][f])?function(i){return i[f].apply(i,d)}:function(i){return i[f]}}else e=d[0];return[c,e]}function R(a,b,c){var d;try{d=a.apply(b,Ba(c,b))}catch(e){if(!(e instanceof j.Break))throw e;}return d}function Da(a){return!!a}function Ea(a,b){return a>b?1:a"+a+""+b+">"+d[1];e-- >0;)c=c.firstChild;a=c.childNodes}b=0;for(c=a.length;b< '+
'c;b++){d=a[a.length===c?b:0];Ha.appendChild(d instanceof s?d._:d)}return Ha}function Ia(a,b){var c,d=b.camelize();switch(d){case "opacity":c=!H.IE?a[d].replace(",","."):(/opacity=(\\d+)/i.exec(a.filter||"")||["","100"])[1].toInt()/100+"";break;case "float":d=H.IE?"styleFloat":"cssFloat";default:c=a[d];if(H.Opera&&/color/i.test(d)&&c)c=c.replace(/"/g,"")}return c||null}function ha(a,b,c){X[a]=eval("["+X[a].toString().replace(b,c)+"]")[0]}function Ja(a){a=S(a);pa=pa.concat(a);aa(s[q],a);aa(Y[q],a)}function Ka(a, '+
'b){var c=a||"*",d=b._;d="tagName"in d?d.tagName:null;return d===null?c:c.replace(/(^|,)/g,"$1"+d+" ")}function ia(a){var b=new La(a),c=b.target;c=c.parent&&c.parent();b.type=a.type==="focusin"||a.type==="focus"?"focus":"blur";c&&c.fire(b)}function Ma(a,b){var c=r.createElement(b);c.setAttribute(a,";");return $(c[a])}function gb(a,b,c){return function(d){var e=d.target,f=o(b),i=f.shift();if(c.find(a).includes(e))$(i)?i.apply(e,[d].concat(f)):e[i].apply(e,f)}}function Na(a){a=o(a);var b=a[1]||{},c= '+
'{},d;if(L(b)){c[b]=a.slice(2);if(W(c[b][0]))c[b]=c[b][0].map(Q)}else c=b;for(d in c){c[d]=Q(c[d]);c[d]=W(c[d][0])?c[d]:[c[d]]}return c}function Oa(a,b){var c=a[0],d,e,f=Na(a),i=!u.keys(f).length;return(b.$listeners||[]).filter(function(z){return z.dr&&z.n===c&&(i||function(){for(var k in f)if(z.dr===k){d=0;for(e=f[k];d-1;c--)if(a.call(b,this[c],c,this))return this[c];return null};E.include({indexOf:J.indexOf||function(a,b){for(var c=b<0?w.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?R(ob,this,arguments):this[0]},last:function(){return arguments.length? '+
'R(pb,this,arguments):this[this.length-1]},random:function(){return this.length?this[w.random(this.length-1)]:null},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return!this.length},clone:function(){return this.slice(0)},each:function(){R(Va,this,arguments);return this},forEach:Va,map:function(){return R(lb,this,arguments)},filter:function(){return R(jb,this,arguments)},reject:function(){return R(kb,this,arguments)},some:function(a){return R(mb,this, '+
'a?arguments:[Da])},every:function(a){return R(nb,this,a?arguments:[Da])},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,d,e=arguments.length;c0;b=w.random(d-1),c=a[--d],a[d]=a[b],a[b]=c);return a},sort:function(a){return ib.apply(this,a||!Sa(this[0])?arguments:[Ea])},sortBy:function(){var a=Ba(arguments,this);return this.sort(function(b, '+
'c){return Ea(a[0].call(a[1],b),a[0].call(a[1],c))})},min:function(){return w.min.apply(w,this)},max:function(){return w.max.apply(w,this)},sum:function(){for(var a=0,b=this.length,c=0;a]+>/ig, '+
'"")},stripScripts:function(a){var b="",c=this.replace(/