var Prototype={Version:"1.7",Browser:function(){var a=navigator.userAgent,b=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!b,Opera:b,WebKit:a.indexOf("AppleWebKit/")>-1,Gecko:a.indexOf("Gecko")>-1&&a.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile/.test(a)}}(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:function(){var a=window.Element||window.HTMLElement;return!!(a&&a.prototype)}(),SpecificElementExtensions:function(){if(typeof window.HTMLDivElement!==
"undefined")return true;var a=document.createElement("div"),b=document.createElement("form"),e=false;if(a.__proto__&&a.__proto__!==b.__proto__)e=true;return e}()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=false;
var Abstract={},Try={these:function(){for(var a,b=0,e=arguments.length;b<e;b++){var h=arguments[b];try{a=h();break}catch(l){}}return a}},Class=function(){function a(){}var b=function(){for(var e in{toString:1})if(e==="toString")return false;return true}();return{create:function(){function e(){this.initialize.apply(this,arguments)}var h=null,l=$A(arguments);if(Object.isFunction(l[0]))h=l.shift();Object.extend(e,Class.Methods);e.superclass=h;e.subclasses=[];if(h){a.prototype=h.prototype;e.prototype=
new a;h.subclasses.push(e)}h=0;for(var n=l.length;h<n;h++)e.addMethods(l[h]);if(!e.prototype.initialize)e.prototype.initialize=Prototype.emptyFunction;return e.prototype.constructor=e},Methods:{addMethods:function(e){var h=this.superclass&&this.superclass.prototype,l=Object.keys(e);if(b){e.toString!=Object.prototype.toString&&l.push("toString");e.valueOf!=Object.prototype.valueOf&&l.push("valueOf")}for(var n=0,j=l.length;n<j;n++){var m=l[n],p=e[m];if(h&&Object.isFunction(p)&&p.argumentNames()[0]==
"$super"){var s=p;p=function(C){return function(){return h[C].apply(this,arguments)}}(m).wrap(s);p.valueOf=s.valueOf.bind(s);p.toString=s.toString.bind(s)}this.prototype[m]=p}return this}}}}();
(function(){function a(B){switch(B){case null:return s;case void 0:return C}switch(typeof B){case "boolean":return T;case "number":return ia;case "string":return wa}return ya}function b(B,K){for(var J in K)B[J]=K[J];return B}function e(B){return h("",{"":B},[])}function h(B,K,J){K=K[B];var u=typeof K;if(a(K)===ya&&typeof K.toJSON==="function")K=K.toJSON(B);B=p.call(K);switch(B){case xa:case za:case r:K=K.valueOf()}switch(K){case null:return"null";case true:return"true";case false:return"false"}u=
typeof K;switch(u){case "string":return K.inspect(true);case "number":return isFinite(K)?String(K):"null";case "object":u=0;for(var Q=J.length;u<Q;u++)if(J[u]===K)throw new TypeError;J.push(K);var N=[];if(B===z){u=0;for(Q=K.length;u<Q;u++){var fa=h(u,K,J);N.push(typeof fa==="undefined"?"null":fa)}N="["+N.join(",")+"]"}else{var O=Object.keys(K);u=0;for(Q=O.length;u<Q;u++){B=O[u];fa=h(B,K,J);typeof fa!=="undefined"&&N.push(B.inspect(true)+":"+fa)}N="{"+N.join(",")+"}"}J.pop();return N}}function l(B){return JSON.stringify(B)}
function n(B){if(a(B)!==ya)throw new TypeError;var K=[],J;for(J in B)B.hasOwnProperty(J)&&K.push(J);return K}function j(B){return p.call(B)===z}function m(B){return typeof B==="undefined"}var p=Object.prototype.toString,s="Null",C="Undefined",T="Boolean",ia="Number",wa="String",ya="Object",za="[object Boolean]",xa="[object Number]",r="[object String]",z="[object Array]",E=window.JSON&&typeof JSON.stringify==="function"&&JSON.stringify(0)==="0"&&typeof JSON.stringify(Prototype.K)==="undefined";if(typeof Array.isArray==
"function"&&Array.isArray([])&&!Array.isArray({}))j=Array.isArray;b(Object,{extend:b,inspect:function(B){try{if(m(B))return"undefined";if(B===null)return"null";return B.inspect?B.inspect():String(B)}catch(K){if(K instanceof RangeError)return"...";throw K;}},toJSON:E?l:e,toQueryString:function(B){return $H(B).toQueryString()},toHTML:function(B){return B&&B.toHTML?B.toHTML():String.interpret(B)},keys:Object.keys||n,values:function(B){var K=[],J;for(J in B)K.push(B[J]);return K},clone:function(B){return b({},
B)},isElement:function(B){return!!(B&&B.nodeType==1)},isArray:j,isHash:function(B){return B instanceof Hash},isFunction:function(B){return p.call(B)==="[object Function]"},isString:function(B){return p.call(B)===r},isNumber:function(B){return p.call(B)===xa},isDate:function(B){return p.call(B)==="[object Date]"},isUndefined:m})})();
Object.extend(Function.prototype,function(){function a(h,l){for(var n=h.length,j=l.length;j--;)h[n+j]=l[j];return h}function b(h,l){h=e.call(h,0);return a(h,l)}var e=Array.prototype.slice;return{argumentNames:function(){var h=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return h.length==1&&!h[0]?[]:h},bind:function(h){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var l=this,n=e.call(arguments,
1);return function(){var j=b(n,arguments);return l.apply(h,j)}},bindAsEventListener:function(h){var l=this,n=e.call(arguments,1);return function(j){j=a([j||window.event],n);return l.apply(h,j)}},curry:function(){if(!arguments.length)return this;var h=this,l=e.call(arguments,0);return function(){var n=b(l,arguments);return h.apply(this,n)}},delay:function(h){var l=this,n=e.call(arguments,1);h*=1E3;return window.setTimeout(function(){return l.apply(l,n)},h)},defer:function(){return this.delay.apply(this,
a([0.01],arguments))},wrap:function(h){var l=this;return function(){var n=a([l.bind(this)],arguments);return h.apply(this,n)}},methodize:function(){if(this._methodized)return this._methodized;var h=this;return this._methodized=function(){var l=a([this],arguments);return h.apply(null,l)}}}}());
(function(a){function b(){return this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+"Z"}function e(){return this.toISOString()}if(!a.toISOString)a.toISOString=b;if(!a.toJSON)a.toJSON=e})(Date.prototype);RegExp.prototype.match=RegExp.prototype.test;
RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};
var PeriodicalExecuter=Class.create({initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},execute:function(){this.callback(this)},stop:function(){if(this.timer){clearInterval(this.timer);this.timer=null}},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false}catch(a){this.currentlyExecuting=
false;throw a;}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,function(){function a(j){if(Object.isFunction(j))return j;var m=new Template(j);return function(p){return m.evaluate(p)}}function b(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function e(j){var m=this.strip().match(/([^?#]*)(#.*)?$/);if(!m)return{};return m[1].split(j||"&").inject({},function(p,s){if((s=s.split("="))[0]){var C=decodeURIComponent(s.shift()),T=s.length>1?s.join("="):s[0];if(T!=undefined)T=decodeURIComponent(T);if(C in p){Object.isArray(p[C])||
(p[C]=[p[C]]);p[C].push(T)}else p[C]=T}return p})}function h(j){var m=this.unfilterJSON(),p=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(p.test(m))m=m.replace(p,function(C){return"\\u"+("0000"+C.charCodeAt(0).toString(16)).slice(-4)});try{if(!j||m.isJSON())return eval("("+m+")")}catch(s){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());}function l(){var j=this.unfilterJSON();return JSON.parse(j)}var n=window.JSON&&
typeof JSON.parse==="function"&&JSON.parse('{"test": true}').test;return{gsub:function(j,m){var p="",s=this,C;m=a(m);if(Object.isString(j))j=RegExp.escape(j);if(!(j.length||j.source)){m=m("");return m+s.split("").join(m)+m}for(;s.length>0;)if(C=s.match(j)){p+=s.slice(0,C.index);p+=String.interpret(m(C));s=s.slice(C.index+C[0].length)}else{p+=s;s=""}return p},sub:function(j,m,p){m=a(m);p=Object.isUndefined(p)?1:p;return this.gsub(j,function(s){if(--p<0)return s[0];return m(s)})},scan:function(j,m){this.gsub(j,
m);return String(this)},truncate:function(j,m){j=j||30;m=Object.isUndefined(m)?"...":m;return this.length>j?this.slice(0,j-m.length)+m:String(this)},strip:String.prototype.trim||b,stripTags:function(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")},stripScripts:function(){return this.replace(RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var j=RegExp(Prototype.ScriptFragment,"im");return(this.match(RegExp(Prototype.ScriptFragment,"img"))||[]).map(function(m){return(m.match(j)||
["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(j){return eval(j)})},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},toQueryParams:e,parseQuery:e,toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(j){return j<
1?"":Array(j+1).join(this)},camelize:function(){return this.replace(/-+(.)?/g,function(j,m){return m?m.toUpperCase():""})},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/-/g,"_").toLowerCase()},dasherize:function(){return this.replace(/_/g,"-")},inspect:function(j){var m=this.replace(/[\x00-\x1f\\]/g,function(p){if(p in
String.specialChar)return String.specialChar[p];return"\\u00"+p.charCodeAt().toPaddedString(2,16)});if(j)return'"'+m.replace(/"/g,'\\"')+'"';return"'"+m.replace(/'/g,"\\'")+"'"},unfilterJSON:function(j){return this.replace(j||Prototype.JSONFilter,"$1")},isJSON:function(){var j=this;if(j.blank())return false;j=j.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@");j=j.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]");j=j.replace(/(?:^|:|,)(?:\s*\[)+/g,"");return/^[\],:{}\s]*$/.test(j)},
evalJSON:n?l:h,include:function(j){return this.indexOf(j)>-1},startsWith:function(j){return this.lastIndexOf(j,0)===0},endsWith:function(j){var m=this.length-j.length;return m>=0&&this.indexOf(j,m)===m},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(j,m){return(new Template(this,m)).evaluate(j)}}}());
var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements))a=a.toTemplateReplacements();return this.template.gsub(this.pattern,function(b){if(a==null)return b[1]+"";var e=b[1]||"";if(e=="\\")return b[2];var h=a,l=b[3],n=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;b=n.exec(l);if(b==null)return e;for(;b!=null;){var j=b[1].startsWith("[")?b[2].replace(/\\\\]/g,"]"):b[1];h=h[j];if(null==
h||""==b[3])break;l=l.substring("["==b[3]?b[1].length:b[0].length);b=n.exec(l)}return e+String.interpret(h)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={},Enumerable=function(){function a(m,p){m=m||Prototype.K;var s=true;this.each(function(C,T){s=s&&!!m.call(p,C,T);if(!s)throw $break;});return s}function b(m,p){m=m||Prototype.K;var s=false;this.each(function(C,T){if(s=!!m.call(p,C,T))throw $break;});return s}function e(m,p){m=m||Prototype.K;var s=[];this.each(function(C,T){s.push(m.call(p,C,T))});return s}function h(m,p){var s;this.each(function(C,T){if(m.call(p,C,T)){s=C;throw $break;}});return s}function l(m,p){var s=[];this.each(function(C,
T){m.call(p,C,T)&&s.push(C)});return s}function n(m){if(Object.isFunction(this.indexOf))if(this.indexOf(m)!=-1)return true;var p=false;this.each(function(s){if(s==m){p=true;throw $break;}});return p}function j(){return this.map()}return{each:function(m,p){var s=0;try{this._each(function(T){m.call(p,T,s++)})}catch(C){if(C!=$break)throw C;}return this},eachSlice:function(m,p,s){var C=-m,T=[],ia=this.toArray();if(m<1)return ia;for(;(C+=m)<ia.length;)T.push(ia.slice(C,C+m));return T.collect(p,s)},all:a,
every:a,any:b,some:b,collect:e,map:e,detect:h,findAll:l,select:l,filter:l,grep:function(m,p,s){p=p||Prototype.K;var C=[];if(Object.isString(m))m=RegExp(RegExp.escape(m));this.each(function(T,ia){m.match(T)&&C.push(p.call(s,T,ia))});return C},include:n,member:n,inGroupsOf:function(m,p){p=Object.isUndefined(p)?null:p;return this.eachSlice(m,function(s){for(;s.length<m;)s.push(p);return s})},inject:function(m,p,s){this.each(function(C,T){m=p.call(s,m,C,T)});return m},invoke:function(m){var p=$A(arguments).slice(1);
return this.map(function(s){return s[m].apply(s,p)})},max:function(m,p){m=m||Prototype.K;var s;this.each(function(C,T){C=m.call(p,C,T);if(s==null||C>=s)s=C});return s},min:function(m,p){m=m||Prototype.K;var s;this.each(function(C,T){C=m.call(p,C,T);if(s==null||C<s)s=C});return s},partition:function(m,p){m=m||Prototype.K;var s=[],C=[];this.each(function(T,ia){(m.call(p,T,ia)?s:C).push(T)});return[s,C]},pluck:function(m){var p=[];this.each(function(s){p.push(s[m])});return p},reject:function(m,p){var s=
[];this.each(function(C,T){m.call(p,C,T)||s.push(C)});return s},sortBy:function(m,p){return this.map(function(s,C){return{value:s,criteria:m.call(p,s,C)}}).sort(function(s,C){var T=s.criteria,ia=C.criteria;return T<ia?-1:T>ia?1:0}).pluck("value")},toArray:j,entries:j,zip:function(){var m=Prototype.K,p=$A(arguments);if(Object.isFunction(p.last()))m=p.pop();var s=[this].concat(p).map($A);return this.map(function(C,T){return m(s.pluck(T))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+
this.toArray().inspect()+">"},find:h}}();function $A(a){if(!a)return[];if("toArray"in Object(a))return a.toArray();for(var b=a.length||0,e=Array(b);b--;)e[b]=a[b];return e}function $w(a){if(!Object.isString(a))return[];return(a=a.strip())?a.split(/\s+/):[]}Array.from=$A;
(function(){function a(p,s){for(var C=0,T=this.length>>>0;C<T;C++)C in this&&p.call(s,this[C],C,this)}function b(){return j.call(this,0)}function e(p,s){s||(s=0);var C=this.length;if(s<0)s=C+s;for(;s<C;s++)if(this[s]===p)return s;return-1}function h(p,s){s=isNaN(s)?this.length:(s<0?this.length+s:s)+1;var C=this.slice(0,s).reverse().indexOf(p);return C<0?C:s-C-1}function l(){for(var p=j.call(this,0),s,C=0,T=arguments.length;C<T;C++){s=arguments[C];if(Object.isArray(s)&&!("callee"in s))for(var ia=0,
wa=s.length;ia<wa;ia++)p.push(s[ia]);else p.push(s)}return p}var n=Array.prototype,j=n.slice,m=n.forEach;m||(m=a);Object.extend(n,Enumerable);if(!n._reverse)n._reverse=n.reverse;Object.extend(n,{_each:m,clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(p){return p!=null})},flatten:function(){return this.inject([],function(p,s){if(Object.isArray(s))return p.concat(s.flatten());p.push(s);
return p})},without:function(){var p=j.call(arguments,0);return this.select(function(s){return!p.include(s)})},reverse:function(p){return(p===false?this.toArray():this)._reverse()},uniq:function(p){return this.inject([],function(s,C,T){if(0==T||(p?s.last()!=C:!s.include(C)))s.push(C);return s})},intersect:function(p){return this.uniq().findAll(function(s){return p.detect(function(C){return s===C})})},clone:b,toArray:b,size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+
"]"}});if(function(){return[].concat(arguments)[0][0]!==1}(1,2))n.concat=l;if(!n.indexOf)n.indexOf=e;if(!n.lastIndexOf)n.lastIndexOf=h})();function $H(a){return new Hash(a)}
var Hash=Class.create(Enumerable,function(){function a(){return Object.clone(this._object)}function b(e,h){if(Object.isUndefined(h))return e;return e+"="+encodeURIComponent(String.interpret(h))}return{initialize:function(e){this._object=Object.isHash(e)?e.toObject():Object.clone(e)},_each:function(e){for(var h in this._object){var l=this._object[h],n=[h,l];n.key=h;n.value=l;e(n)}},set:function(e,h){return this._object[e]=h},get:function(e){if(this._object[e]!==Object.prototype[e])return this._object[e]},
unset:function(e){var h=this._object[e];delete this._object[e];return h},toObject:a,toTemplateReplacements:a,keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(e){var h=this.detect(function(l){return l.value===e});return h&&h.key},merge:function(e){return this.clone().update(e)},update:function(e){return(new Hash(e)).inject(this,function(h,l){h.set(l.key,l.value);return h})},toQueryString:function(){return this.inject([],function(e,h){var l=encodeURIComponent(h.key),
n=h.value;if(n&&typeof n=="object"){if(Object.isArray(n)){for(var j=[],m=0,p=n.length,s;m<p;m++){s=n[m];j.push(b(l,s))}return e.concat(j)}}else e.push(b(l,n));return e}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(e){return e.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:a,clone:function(){return new Hash(this)}}}());Hash.from=$H;
Object.extend(Number.prototype,function(){return{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a,b){$R(0,this,true).each(a,b);return this},toPaddedString:function(a,b){var e=this.toString(b||10);return"0".times(a-e.length)+e},abs:function(){return Math.abs(this)},round:function(){return Math.round(this)},ceil:function(){return Math.ceil(this)},floor:function(){return Math.floor(this)}}}());function $R(a,b,e){return new ObjectRange(a,b,e)}
var ObjectRange=Class.create(Enumerable,function(){return{initialize:function(a,b,e){this.start=a;this.end=b;this.exclusive=e},_each:function(a){for(var b=this.start;this.include(b);){a(b);b=b.succ()}},include:function(a){if(a<this.start)return false;if(this.exclusive)return a<this.end;return a<=this.end}}}()),Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||
false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,b,e,h){this.each(function(l){if(Object.isFunction(l[a]))try{l[a].apply(l,[b,e,h])}catch(n){}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});
Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isHash(this.options.parameters))this.options.parameters=this.options.parameters.toObject()}});
Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,e){$super(e);this.transport=Ajax.getTransport();this.request(b)},request:function(a){this.url=a;this.method=this.options.method;a=Object.isString(this.options.parameters)?this.options.parameters:Object.toQueryString(this.options.parameters);if(!["get","post"].include(this.method)){a+=(a?"&":"")+"_method="+this.method;this.method="post"}if(a&&this.method==="get")this.url+=(this.url.include("?")?"&":"?")+a;this.parameters=
a.toQueryParams();try{var b=new Ajax.Response(this);this.options.onCreate&&this.options.onCreate(b);Ajax.Responders.dispatch("onCreate",this,b);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?this.options.postBody||a:null;this.transport.send(this.body);!this.options.asynchronous&&
this.transport.overrideMimeType&&this.onStateChange()}catch(e){this.dispatchException(e)}},onStateChange:function(){var a=this.transport.readyState;a>1&&!(a==4&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){a["Content-type"]=this.options.contentType+(this.options.encoding?
"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)a.Connection="close"}if(typeof this.options.requestHeaders=="object"){var b=this.options.requestHeaders;if(Object.isFunction(b.push))for(var e=0,h=b.length;e<h;e+=2)a[b[e]]=b[e+1];else $H(b).each(function(n){a[n.key]=n.value})}for(var l in a)this.transport.setRequestHeader(l,a[l])},success:function(){var a=this.getStatus();return!a||a>=200&&a<300||a==304},getStatus:function(){try{if(this.transport.status===
1223)return 204;return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){a=Ajax.Request.Events[a];var b=new Ajax.Response(this);if(a=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(e){this.dispatchException(e)}var h=b.getHeader("Content-type");if(this.options.evalJS=="force"||this.options.evalJS&&this.isSameOrigin()&&h&&h.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))this.evalResponse()}try{(this.options["on"+
a]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+a,this,b,b.headerJSON)}catch(l){this.dispatchException(l)}if(a=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return!a||a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""})},getHeader:function(a){try{return this.transport.getResponseHeader(a)||
null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(a){this.dispatchException(a)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Response=Class.create({initialize:function(a){this.request=a;a=this.transport=a.transport;var b=this.readyState=a.readyState;if(b>2&&!Prototype.Browser.IE||b==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(a.responseText);this.headerJSON=this._getHeaderJSON()}if(b==4){a=a.responseXML;this.responseXML=Object.isUndefined(a)?null:a;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,
getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||
!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json")||this.responseText.blank())return null;try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});
Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,b,e,h){this.container={success:b.success||b,failure:b.failure||(b.success?null:b)};h=Object.clone(h);var l=h.onComplete;h.onComplete=function(n,j){this.updateContent(n.responseText);Object.isFunction(l)&&l(n,j)}.bind(this);$super(e,h)},updateContent:function(a){var b=this.container[this.success()?"success":"failure"],e=this.options;e.evalScripts||(a=a.stripScripts());if(b=$(b))if(e.insertion)if(Object.isString(e.insertion)){var h=
{};h[e.insertion]=a;b.insert(h)}else e.insertion(b,a);else b.update(a)}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,b,e,h){$super(h);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=b;this.url=e;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},
updateComplete:function(a){if(this.options.decay){this.decay=a.responseText==this.lastText?this.decay*this.options.decay:1;this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});
function $(a){if(arguments.length>1){for(var b=0,e=[],h=arguments.length;b<h;b++)e.push($(arguments[b]));return e}if(Object.isString(a))a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,b){for(var e=[],h=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),l=0,n=h.snapshotLength;l<n;l++)e.push(Element.extend(h.snapshotItem(l)));return e};window.Node||(Node={});
Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});
(function(a){var b=function(){try{var h=document.createElement('<input name="x">');return h.tagName.toLowerCase()==="input"&&h.name==="x"}catch(l){return false}}(),e=a.Element;a.Element=function(h,l){l=l||{};h=h.toLowerCase();var n=Element.cache;if(b&&l.name){h="<"+h+' name="'+l.name+'">';delete l.name;return Element.writeAttribute(document.createElement(h),l)}n[h]||(n[h]=Element.extend(document.createElement(h)));n=(h==="select"?false:"type"in l?false:true)?n[h].cloneNode(false):document.createElement(h);
return Element.writeAttribute(n,l)};Object.extend(a.Element,e||{});if(e)a.Element.prototype=e.prototype})(this);Element.idCounter=1;Element.cache={};Element._purgeElement=function(a){var b=a._prototypeUID;if(b){Element.stopObserving(a);a._prototypeUID=void 0;delete Element.Storage[b]}};
Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){a=$(a);a.style.display="none";return a},show:function(a){a=$(a);a.style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(){var a=function(){var n=document.createElement("select"),j=true;n.innerHTML='<option value="test">test</option>';if(n.options&&n.options[0])j=n.options[0].nodeName.toUpperCase()!==
"OPTION";return j}(),b=function(){try{var n=document.createElement("table");if(n&&n.tBodies){n.innerHTML="<tbody><tr><td>test</td></tr></tbody>";return typeof n.tBodies[0]=="undefined"}}catch(j){return true}}(),e=function(){try{var n=document.createElement("div");n.innerHTML="<link>";return n.childNodes.length===0}catch(j){return true}}(),h=a||b||e,l=function(){var n=document.createElement("script"),j=false;try{n.appendChild(document.createTextNode(""));j=!n.firstChild||n.firstChild&&n.firstChild.nodeType!==
3}catch(m){j=true}return j}();return function(n,j){n=$(n);for(var m=Element._purgeElement,p=n.getElementsByTagName("*"),s=p.length;s--;)m(p[s]);if(j&&j.toElement)j=j.toElement();if(Object.isElement(j))return n.update().insert(j);j=Object.toHTML(j);m=n.tagName.toUpperCase();if(m==="SCRIPT"&&l){n.text=j;return n}if(h)if(m in Element._insertionTranslations.tags){for(;n.firstChild;)n.removeChild(n.firstChild);Element._getContentFromAnonymousElement(m,j.stripScripts()).each(function(C){n.appendChild(C)})}else if(e&&
Object.isString(j)&&j.indexOf("<link")>-1){for(;n.firstChild;)n.removeChild(n.firstChild);Element._getContentFromAnonymousElement(m,j.stripScripts(),true).each(function(C){n.appendChild(C)})}else n.innerHTML=j.stripScripts();else n.innerHTML=j.stripScripts();j.evalScripts.bind(j).defer();return n}}(),replace:function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();else if(!Object.isElement(b)){b=Object.toHTML(b);var e=a.ownerDocument.createRange();e.selectNode(a);b.evalScripts.bind(b).defer();b=e.createContextualFragment(b.stripScripts())}a.parentNode.replaceChild(b,
a);return a},insert:function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var e,h,l,n;for(n in b){e=b[n];n=n.toLowerCase();h=Element._insertionTranslations[n];if(e&&e.toElement)e=e.toElement();if(Object.isElement(e))h(a,e);else{e=Object.toHTML(e);l=(n=="before"||n=="after"?a.parentNode:a).tagName.toUpperCase();l=Element._getContentFromAnonymousElement(l,e.stripScripts());if(n=="top"||n=="after")l.reverse();l.each(h.curry(a));e.evalScripts.bind(e).defer()}}return a},
wrap:function(a,b,e){a=$(a);if(Object.isElement(b))$(b).writeAttribute(e||{});else b=Object.isString(b)?new Element(b,e):new Element("div",b);a.parentNode&&a.parentNode.replaceChild(b,a);b.appendChild(a);return b},inspect:function(a){a=$(a);var b="<"+a.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(e){var h=e.first();e=e.last();if(h=(a[h]||"").toString())b+=" "+e+"="+h.inspect(true)});return b+">"},recursivelyCollect:function(a,b,e){a=$(a);e=e||-1;for(var h=[];a=a[b];){a.nodeType==
1&&h.push(Element.extend(a));if(h.length==e)break}return h},ancestors:function(a){return Element.recursivelyCollect(a,"parentNode")},descendants:function(a){return Element.select(a,"*")},firstDescendant:function(a){for(a=$(a).firstChild;a&&a.nodeType!=1;)a=a.nextSibling;return $(a)},immediateDescendants:function(a){var b=[];for(a=$(a).firstChild;a;){a.nodeType===1&&b.push(Element.extend(a));a=a.nextSibling}return b},previousSiblings:function(a){return Element.recursivelyCollect(a,"previousSibling")},
nextSiblings:function(a){return Element.recursivelyCollect(a,"nextSibling")},siblings:function(a){a=$(a);return Element.previousSiblings(a).reverse().concat(Element.nextSiblings(a))},match:function(a,b){a=$(a);if(Object.isString(b))return Prototype.Selector.match(a,b);return b.match(a)},up:function(a,b,e){a=$(a);if(arguments.length==1)return $(a.parentNode);var h=Element.ancestors(a);return Object.isNumber(b)?h[b]:Prototype.Selector.find(h,b,e)},down:function(a,b,e){a=$(a);if(arguments.length==1)return Element.firstDescendant(a);
return Object.isNumber(b)?Element.descendants(a)[b]:Element.select(a,b)[e||0]},previous:function(a,b,e){a=$(a);if(Object.isNumber(b)){e=b;b=false}Object.isNumber(e)||(e=0);return b?Prototype.Selector.find(a.previousSiblings(),b,e):a.recursivelyCollect("previousSibling",e+1)[e]},next:function(a,b,e){a=$(a);if(Object.isNumber(b)){e=b;b=false}Object.isNumber(e)||(e=0);if(b)return Prototype.Selector.find(a.nextSiblings(),b,e);else{Object.isNumber(e);return a.recursivelyCollect("nextSibling",e+1)[e]}},
select:function(a){a=$(a);var b=Array.prototype.slice.call(arguments,1).join(", ");return Prototype.Selector.select(b,a)},adjacent:function(a){a=$(a);var b=Array.prototype.slice.call(arguments,1).join(", ");return Prototype.Selector.select(b,a.parentNode).without(a)},identify:function(a){a=$(a);var b=Element.readAttribute(a,"id");if(b)return b;do b="anonymous_element_"+Element.idCounter++;while($(b));Element.writeAttribute(a,"id",b);return b},readAttribute:function(a,b){a=$(a);if(Prototype.Browser.IE){var e=
Element._attributeTranslations.read;if(e.values[b])return e.values[b](a,b);if(e.names[b])b=e.names[b];if(b.include(":"))return!a.attributes||!a.attributes[b]?null:a.attributes[b].value}return a.getAttribute(b)},writeAttribute:function(a,b,e){a=$(a);var h={},l=Element._attributeTranslations.write;if(typeof b=="object")h=b;else h[b]=Object.isUndefined(e)?true:e;for(var n in h){b=l.names[n]||n;e=h[n];if(l.values[n])b=l.values[n](a,e);if(e===false||e===null)a.removeAttribute(b);else e===true?a.setAttribute(b,
b):a.setAttribute(b,e)}return a},getHeight:function(a){return Element.getDimensions(a).height},getWidth:function(a){return Element.getDimensions(a).width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(a=$(a)){var e=a.className;return e.length>0&&(e==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(e))}},addClassName:function(a,b){if(a=$(a)){Element.hasClassName(a,b)||(a.className+=(a.className?" ":"")+b);return a}},removeClassName:function(a,b){if(a=$(a)){a.className=
a.className.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a}},toggleClassName:function(a,b){if(a=$(a))return Element[Element.hasClassName(a,b)?"removeClassName":"addClassName"](a,b)},cleanWhitespace:function(a){a=$(a);for(var b=a.firstChild;b;){var e=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b);b=e}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(a,b){a=$(a);b=$(b);if(a.compareDocumentPosition)return(a.compareDocumentPosition(b)&
8)===8;if(b.contains)return b.contains(a)&&b!==a;for(;a=a.parentNode;)if(a==b)return true;return false},scrollTo:function(a){a=$(a);var b=Element.cumulativeOffset(a);window.scrollTo(b[0],b[1]);return a},getStyle:function(a,b){a=$(a);b=b=="float"?"cssFloat":b.camelize();var e=a.style[b];if(!e||e=="auto")e=(e=document.defaultView.getComputedStyle(a,null))?e[b]:null;if(b=="opacity")return e?parseFloat(e):1;return e=="auto"?null:e},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,
b){a=$(a);var e=a.style;if(Object.isString(b)){a.style.cssText+=";"+b;return b.include("opacity")?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a}for(var h in b)if(h=="opacity")a.setOpacity(b[h]);else e[h=="float"||h=="cssFloat"?Object.isUndefined(e.styleFloat)?"cssFloat":"styleFloat":h]=b[h];return a},setOpacity:function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;return a},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=
true;a.style.position="relative";if(Prototype.Browser.Opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow)return a;a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden")a.style.overflow="hidden";return a},undoClipping:function(a){a=$(a);if(!a._overflow)return a;a.style.overflow=
a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},clonePosition:function(a,b,e){e=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},e||{});b=$(b);var h=Element.viewportOffset(b),l=[0,0],n=null;a=$(a);if(Element.getStyle(a,"position")=="absolute"){n=Element.getOffsetParent(a);l=Element.viewportOffset(n)}if(n==document.body){l[0]-=document.body.offsetLeft;l[1]-=document.body.offsetTop}if(e.setLeft)a.style.left=h[0]-l[0]+e.offsetLeft+"px";if(e.setTop)a.style.top=
h[1]-l[1]+e.offsetTop+"px";if(e.setWidth)a.style.width=b.offsetWidth+"px";if(e.setHeight)a.style.height=b.offsetHeight+"px";return a}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};
if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(a,b,e){switch(e){case "height":case "width":if(!Element.visible(b))return null;var h=parseInt(a(b,e),10);if(h!==b["offset"+e.capitalize()])return h+"px";return(e==="height"?["border-top-width","padding-top","padding-bottom","border-bottom-width"]:["border-left-width","padding-left","padding-right","border-right-width"]).inject(h,function(l,n){var j=a(b,n);return j===null?l:l-parseInt(j,10)})+"px";default:return a(b,
e)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,b,e){if(e==="title")return b.title;return a(b,e)})}else if(Prototype.Browser.IE){Element.Methods.getStyle=function(a,b){a=$(a);b=b=="float"||b=="cssFloat"?"styleFloat":b.camelize();var e=a.style[b];if(!e&&a.currentStyle)e=a.currentStyle[b];if(b=="opacity"){if(e=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(e[1])return parseFloat(e[1])/100;return 1}if(e=="auto"){if((b=="width"||b=="height")&&a.getStyle("display")!=
"none")return a["offset"+b.capitalize()]+"px";return null}return e};Element.Methods.setOpacity=function(a,b){a=$(a);var e=a.currentStyle;if(e&&!e.hasLayout||!e&&a.style.zoom=="normal")a.style.zoom=1;e=a.getStyle("filter");var h=a.style;if(b==1||b===""){(e=e.replace(/alpha\([^\)]*\)/gi,""))?h.filter=e:h.removeAttribute("filter");return a}else if(b<1.0E-5)b=0;h.filter=e.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+b*100+")";return a};Element._attributeTranslations=function(){var a="className",b=
"for",e=document.createElement("div");e.setAttribute(a,"x");if(e.className!=="x"){e.setAttribute("class","x");if(e.className==="x")a="class"}e=null;e=document.createElement("label");e.setAttribute(b,"x");if(e.htmlFor!=="x"){e.setAttribute("htmlFor","x");if(e.htmlFor==="x")b="htmlFor"}e=null;return{read:{names:{"class":a,className:a,"for":b,htmlFor:b},values:{_getAttr:function(h,l){return h.getAttribute(l)},_getAttr2:function(h,l){return h.getAttribute(l,2)},_getAttrNode:function(h,l){var n=h.getAttributeNode(l);
return n?n.value:""},_getEv:function(){var h=document.createElement("div"),l;h.onclick=Prototype.emptyFunction;h=h.getAttribute("onclick");if(String(h).indexOf("{")>-1)l=function(n,j){j=n.getAttribute(j);if(!j)return null;j=j.toString();j=j.split("{")[1];j=j.split("}")[0];return j.strip()};else if(h==="")l=function(n,j){j=n.getAttribute(j);if(!j)return null;return j.strip()};h=null;return l}(),_flag:function(h,l){return $(h).hasAttribute(l)?l:null},style:function(h){return h.style.cssText.toLowerCase()},
title:function(h){return h.title}}}}}();Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=
a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr2,src:a._getAttr2,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,
onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values);Prototype.BrowserFeatures.ElementExtensions&&function(){Element.Methods.down=function(a,b,e){a=$(a);if(arguments.length==1)return a.firstDescendant();var h;if(Object.isNumber(b)){h=a.getElementsByTagName("*");for(var l=[],n=0,j;j=h[n];n++)j.tagName!=="!"&&l.push(j);h=l[b]}else h=Element.select(a,b)[e||0];return h}}()}else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent))Element.Methods.setOpacity=
function(a,b){a=$(a);a.style.opacity=b==1?0.999999:b===""?"":b<1.0E-5?0:b;return a};else if(Prototype.Browser.WebKit)Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;if(b==1)if(a.tagName.toUpperCase()=="IMG"&&a.width){a.width++;a.width--}else try{var e=document.createTextNode(" ");a.appendChild(e);a.removeChild(e)}catch(h){}return a};
if("outerHTML"in document.documentElement)Element.Methods.replace=function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();if(Object.isElement(b)){a.parentNode.replaceChild(b,a);return a}b=Object.toHTML(b);var e=a.parentNode,h=e.tagName.toUpperCase();if(Element._insertionTranslations.tags[h]){var l=a.next();h=Element._getContentFromAnonymousElement(h,b.stripScripts());e.removeChild(a);l?h.each(function(n){e.insertBefore(n,l)}):h.each(function(n){e.appendChild(n)})}else a.outerHTML=b.stripScripts();
b.evalScripts.bind(b).defer();return a};Element._returnOffset=function(a,b){var e=[a,b];e.left=a;e.top=b;return e};Element._getContentFromAnonymousElement=function(a,b,e){var h=new Element("div");a=Element._insertionTranslations.tags[a];var l=false;if(a)l=true;else if(e){l=true;a=["","",0]}if(l){h.innerHTML="&nbsp;"+a[0]+b+a[1];h.removeChild(h.firstChild);for(b=a[2];b--;)h=h.firstChild}else h.innerHTML=b;return $A(h.childNodes)};
Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};
(function(){var a=Element._insertionTranslations.tags;Object.extend(a,{THEAD:a.TBODY,TFOOT:a.TBODY,TH:a.TD})})();Element.Methods.Simulated={hasAttribute:function(a,b){b=Element._attributeTranslations.has[b]||b;var e=$(a).getAttributeNode(b);return!!(e&&e.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);
(function(a){if(!Prototype.BrowserFeatures.ElementExtensions&&a.__proto__){window.HTMLElement={};window.HTMLElement.prototype=a.__proto__;Prototype.BrowserFeatures.ElementExtensions=true}})(document.createElement("div"));
Element.extend=function(){function a(l,n){for(var j in n){var m=n[j];if(Object.isFunction(m)&&!(j in l))l[j]=m.methodize()}}var b=function(l){if(typeof window.Element!="undefined"){var n=window.Element.prototype;if(n){var j="_"+(Math.random()+"").slice(2);l=document.createElement(l);n[j]="x";l=l[j]!=="x";delete n[j];return l}}return false}("object");if(Prototype.BrowserFeatures.SpecificElementExtensions){if(b)return function(l){if(l&&typeof l._extendedByPrototype=="undefined"){var n=l.tagName;if(n&&
/^(?:object|applet|embed)$/i.test(n)){a(l,Element.Methods);a(l,Element.Methods.Simulated);a(l,Element.Methods.ByTag[n.toUpperCase()])}}return l};return Prototype.K}var e={},h=Element.Methods.ByTag;b=Object.extend(function(l){if(!l||typeof l._extendedByPrototype!="undefined"||l.nodeType!=1||l==window)return l;var n=Object.clone(e),j=l.tagName.toUpperCase();h[j]&&Object.extend(n,h[j]);a(l,n);l._extendedByPrototype=Prototype.emptyFunction;return l},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(e,
Element.Methods);Object.extend(e,Element.Methods.Simulated)}}});b.refresh();return b}();Element.hasAttribute=document.documentElement.hasAttribute?function(a,b){return a.hasAttribute(b)}:Element.Methods.Simulated.hasAttribute;
Element.addMethods=function(a){function b(p){p=p.toUpperCase();Element.Methods.ByTag[p]||(Element.Methods.ByTag[p]={});Object.extend(Element.Methods.ByTag[p],a)}function e(p,s,C){C=C||false;for(var T in p){var ia=p[T];if(Object.isFunction(ia))if(!C||!(T in s))s[T]=ia.methodize()}}function h(p){var s,C={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",
Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(C[p])s="HTML"+C[p]+"Element";if(window[s])return window[s];s="HTML"+p+"Element";if(window[s])return window[s];s="HTML"+p.capitalize()+"Element";if(window[s])return window[s];p=document.createElement(p);return p.__proto__||p.constructor.prototype}
var l=Prototype.BrowserFeatures,n=Element.Methods.ByTag;if(!a){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods),BUTTON:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var j=a;a=arguments[1]}if(j)Object.isArray(j)?j.each(b):b(j);else Object.extend(Element.Methods,
a||{});j=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(l.ElementExtensions){e(Element.Methods,j);e(Element.Methods.Simulated,j,true)}if(l.SpecificElementExtensions)for(var m in Element.Methods.ByTag){l=h(m);Object.isUndefined(l)||e(n[m],l.prototype)}Object.extend(Element,Element.Methods);delete Element.ByTag;Element.extend.refresh&&Element.extend.refresh();Element.cache={}};
document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};
(function(a){function b(){if(h.WebKit&&!l.evaluate)return document;if(h.Opera&&window.parseFloat(window.opera.version())<9.5)return document.body;return document.documentElement}function e(m){n||(n=b());j[m]="client"+m;a["get"+m]=function(){return n[j[m]]};return a["get"+m]()}var h=Prototype.Browser,l=document,n,j={};a.getWidth=e.curry("Width");a.getHeight=e.curry("Height")})(document.viewport);Element.Storage={UID:1};
Element.addMethods({getStorage:function(a){if(a=$(a)){if(a===window)a=0;else{if(typeof a._prototypeUID==="undefined")a._prototypeUID=Element.Storage.UID++;a=a._prototypeUID}Element.Storage[a]||(Element.Storage[a]=$H());return Element.Storage[a]}},store:function(a,b,e){if(a=$(a)){arguments.length===2?Element.getStorage(a).update(b):Element.getStorage(a).set(b,e);return a}},retrieve:function(a,b,e){if(a=$(a)){a=Element.getStorage(a);var h=a.get(b);if(Object.isUndefined(h)){a.set(b,e);h=e}return h}},
clone:function(a,b){if(a=$(a)){var e=a.cloneNode(b);e._prototypeUID=void 0;if(b)for(var h=Element.select(e,"*"),l=h.length;l--;)h[l]._prototypeUID=void 0;return Element.extend(e)}},purge:function(a){if(a=$(a)){var b=Element._purgeElement;b(a);a=a.getElementsByTagName("*");for(var e=a.length;e--;)b(a[e]);return null}}});
(function(){function a(j,m,p){var s=null;if(Object.isElement(j)){s=j;j=s.getStyle(m)}if(j===null)return null;if(/^(?:-)?\d+(\.\d+)?(px)?$/i.test(j))return window.parseFloat(j);var C=j.include("%"),T=p===document.viewport;if(/\d/.test(j)&&s&&s.runtimeStyle&&!(C&&T)){p=s.style.left;m=s.runtimeStyle.left;s.runtimeStyle.left=s.currentStyle.left;s.style.left=j||0;j=s.style.pixelLeft;s.style.left=p;s.runtimeStyle.left=m;return j}if(s&&C){p=p||s.parentNode;j=(j=j.match(/^(\d+)%?$/i))?Number(j[1])/100:null;
C=null;s.getStyle("position");s=m.include("left")||m.include("right")||m.include("width");m=m.include("top")||m.include("bottom")||m.include("height");if(p===document.viewport)if(s)C=document.viewport.getWidth();else{if(m)C=document.viewport.getHeight()}else if(s)C=$(p).measure("width");else if(m)C=$(p).measure("height");return C===null?0:C*j}return 0}function b(j){j=$(j);if(j.nodeType===Node.DOCUMENT_NODE||l(j)||j.nodeName.toUpperCase()==="BODY"||j.nodeName.toUpperCase()==="HTML")return $(document.body);
if(Element.getStyle(j,"display")!=="inline"&&j.offsetParent)return $(j.offsetParent);for(;(j=j.parentNode)&&j!==document.body;)if(Element.getStyle(j,"position")!=="static")return j.nodeName.toUpperCase()==="HTML"?$(document.body):$(j);return $(document.body)}function e(j){j=$(j);var m=0,p=0;if(j.parentNode){do{m+=j.offsetTop||0;p+=j.offsetLeft||0;j=j.offsetParent}while(j)}return new Element.Offset(p,m)}function h(j){j=$(j);var m=j.getLayout(),p=0,s=0;do{p+=j.offsetTop||0;s+=j.offsetLeft||0;if(j=j.offsetParent){if(j.nodeName.toUpperCase()===
"BODY")break;if(Element.getStyle(j,"position")!=="static")break}}while(j);s-=m.get("margin-top");p-=m.get("margin-left");return new Element.Offset(s,p)}function l(j){return j!==document.body&&!Element.descendantOf(j,document.body)}var n=Prototype.K;if("currentStyle"in document.documentElement)n=function(j){if(!j.currentStyle.hasLayout)j.style.zoom=1;return j};Element.Layout=Class.create(Hash,{initialize:function($super,m,p){$super();this.element=$(m);Element.Layout.PROPERTIES.each(function(s){this._set(s,
null)},this);if(p){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false}},_set:function(j,m){return Hash.prototype.set.call(this,j,m)},set:function(){throw"Properties of Element.Layout are read-only.";},get:function($super,m){var p=$super(m);return p===null?this._compute(m):p},_begin:function(){if(!this._prepared){var j=this.element,m;a:{for(m=j;m&&m.parentNode;){if(m.getStyle("display")==="none"){m=false;break a}m=$(m.parentNode)}m=
true}if(!m){j.store("prototype_original_styles",{position:j.style.position||"",width:j.style.width||"",visibility:j.style.visibility||"",display:j.style.display||""});m=j.getStyle("position");var p=j.getStyle("width");if(p==="0px"||p===null){j.style.display="block";p=j.getStyle("width")}var s=m==="fixed"?document.viewport:j.parentNode;j.setStyle({position:"absolute",visibility:"hidden",display:"block"});var C=j.getStyle("width");m=p&&C===p?a(j,"width",s):m==="absolute"||m==="fixed"?a(j,"width",s):
$(j.parentNode).getLayout().get("width")-this.get("margin-left")-this.get("border-left")-this.get("padding-left")-this.get("padding-right")-this.get("border-right")-this.get("margin-right");j.setStyle({width:m+"px"})}this._prepared=true}},_end:function(){var j=this.element,m=j.retrieve("prototype_original_styles");j.store("prototype_original_styles",null);j.setStyle(m);this._prepared=false},_compute:function(j){var m=Element.Layout.COMPUTATIONS;if(!(j in m))throw"Property not found.";return this._set(j,
m[j].call(this,this.element))},toObject:function(){var j=$A(arguments),m={};(j.length===0?Element.Layout.PROPERTIES:j.join(" ").split(" ")).each(function(p){if(Element.Layout.PROPERTIES.include(p)){var s=this.get(p);if(s!=null)m[p]=s}},this);return m},toHash:function(){var j=this.toObject.apply(this,arguments);return new Hash(j)},toCSS:function(){var j=$A(arguments),m={};(j.length===0?Element.Layout.PROPERTIES:j.join(" ").split(" ")).each(function(p){if(Element.Layout.PROPERTIES.include(p))if(!Element.Layout.COMPOSITE_PROPERTIES.include(p)){var s=
this.get(p);if(s!=null){if(p.include("border"))p+="-width";p=p.camelize();m[p]=s+"px"}}},this);return m},inspect:function(){return"#<Element.Layout>"}});Object.extend(Element.Layout,{PROPERTIES:$w("height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height"),COMPOSITE_PROPERTIES:$w("padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height"),
COMPUTATIONS:{height:function(){this._preComputing||this._begin();var j=this.get("border-box-height");if(j<=0){this._preComputing||this._end();return 0}var m=this.get("border-top"),p=this.get("border-bottom"),s=this.get("padding-top"),C=this.get("padding-bottom");this._preComputing||this._end();return j-m-p-s-C},width:function(){this._preComputing||this._begin();var j=this.get("border-box-width");if(j<=0){this._preComputing||this._end();return 0}var m=this.get("border-left"),p=this.get("border-right"),
s=this.get("padding-left"),C=this.get("padding-right");this._preComputing||this._end();return j-m-p-s-C},"padding-box-height":function(){var j=this.get("height"),m=this.get("padding-top"),p=this.get("padding-bottom");return j+m+p},"padding-box-width":function(){var j=this.get("width"),m=this.get("padding-left"),p=this.get("padding-right");return j+m+p},"border-box-height":function(j){this._preComputing||this._begin();j=j.offsetHeight;this._preComputing||this._end();return j},"border-box-width":function(j){this._preComputing||
this._begin();j=j.offsetWidth;this._preComputing||this._end();return j},"margin-box-height":function(){var j=this.get("border-box-height"),m=this.get("margin-top"),p=this.get("margin-bottom");if(j<=0)return 0;return j+m+p},"margin-box-width":function(){var j=this.get("border-box-width"),m=this.get("margin-left"),p=this.get("margin-right");if(j<=0)return 0;return j+m+p},top:function(j){return j.positionedOffset().top},bottom:function(j){var m=j.positionedOffset();j=j.getOffsetParent().measure("height");
var p=this.get("border-box-height");return j-p-m.top},left:function(j){return j.positionedOffset().left},right:function(j){var m=j.positionedOffset();j=j.getOffsetParent().measure("width");var p=this.get("border-box-width");return j-p-m.left},"padding-top":function(j){return a(j,"paddingTop")},"padding-bottom":function(j){return a(j,"paddingBottom")},"padding-left":function(j){return a(j,"paddingLeft")},"padding-right":function(j){return a(j,"paddingRight")},"border-top":function(j){return a(j,"borderTopWidth")},
"border-bottom":function(j){return a(j,"borderBottomWidth")},"border-left":function(j){return a(j,"borderLeftWidth")},"border-right":function(j){return a(j,"borderRightWidth")},"margin-top":function(j){return a(j,"marginTop")},"margin-bottom":function(j){return a(j,"marginBottom")},"margin-left":function(j){return a(j,"marginLeft")},"margin-right":function(j){return a(j,"marginRight")}}});"getBoundingClientRect"in document.documentElement&&Object.extend(Element.Layout.COMPUTATIONS,{right:function(j){var m=
n(j.getOffsetParent());j=j.getBoundingClientRect();return(m.getBoundingClientRect().right-j.right).round()},bottom:function(j){var m=n(j.getOffsetParent());j=j.getBoundingClientRect();return(m.getBoundingClientRect().bottom-j.bottom).round()}});Element.Offset=Class.create({initialize:function(j,m){this.left=j.round();this.top=m.round();this[0]=this.left;this[1]=this.top},relativeTo:function(j){return new Element.Offset(this.left-j.left,this.top-j.top)},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this)},
toString:function(){return"[#{left}, #{top}]".interpolate(this)},toArray:function(){return[this.left,this.top]}});if(Prototype.Browser.IE){b=b.wrap(function(j,m){m=$(m);if(m.nodeType===Node.DOCUMENT_NODE||l(m)||m.nodeName.toUpperCase()==="BODY"||m.nodeName.toUpperCase()==="HTML")return $(document.body);var p=m.getStyle("position");if(p!=="static")return j(m);m.setStyle({position:"relative"});var s=j(m);m.setStyle({position:p});return s});h=h.wrap(function(j,m){m=$(m);if(!m.parentNode)return new Element.Offset(0,
0);var p=m.getStyle("position");if(p!=="static")return j(m);var s=m.getOffsetParent();s&&s.getStyle("position")==="fixed"&&n(s);m.setStyle({position:"relative"});s=j(m);m.setStyle({position:p});return s})}else if(Prototype.Browser.Webkit)e=function(j){j=$(j);var m=0,p=0;do{m+=j.offsetTop||0;p+=j.offsetLeft||0;if(j.offsetParent==document.body)if(Element.getStyle(j,"position")=="absolute")break;j=j.offsetParent}while(j);return new Element.Offset(p,m)};Element.addMethods({getLayout:function(j,m){return new Element.Layout(j,
m)},measure:function(j,m){return $(j).getLayout().get(m)},getDimensions:function(j){j=$(j);var m=Element.getStyle(j,"display");if(m&&m!=="none")return{width:j.offsetWidth,height:j.offsetHeight};m=j.style;m={visibility:m.visibility,position:m.position,display:m.display};var p={visibility:"hidden",display:"block"};if(m.position!=="fixed")p.position="absolute";Element.setStyle(j,p);p={width:j.offsetWidth,height:j.offsetHeight};Element.setStyle(j,m);return p},getOffsetParent:b,cumulativeOffset:e,positionedOffset:h,
cumulativeScrollOffset:function(j){var m=0,p=0;do{m+=j.scrollTop||0;p+=j.scrollLeft||0;j=j.parentNode}while(j);return new Element.Offset(p,m)},viewportOffset:function(j){$(C);var m=0,p=0,s=document.body,C=j;do{m+=C.offsetTop||0;p+=C.offsetLeft||0;if(C.offsetParent==s&&Element.getStyle(C,"position")=="absolute")break}while(C=C.offsetParent);C=j;do if(C!=s){m-=C.scrollTop||0;p-=C.scrollLeft||0}while(C=C.parentNode);return new Element.Offset(p,m)},absolutize:function(j){j=$(j);if(Element.getStyle(j,
"position")==="absolute")return j;var m=b(j),p=j.viewportOffset();m=m.viewportOffset();p=p.relativeTo(m);m=j.getLayout();j.store("prototype_absolutize_original_styles",{left:j.getStyle("left"),top:j.getStyle("top"),width:j.getStyle("width"),height:j.getStyle("height")});j.setStyle({position:"absolute",top:p.top+"px",left:p.left+"px",width:m.get("width")+"px",height:m.get("height")+"px"});return j},relativize:function(j){j=$(j);if(Element.getStyle(j,"position")==="relative")return j;var m=j.retrieve("prototype_absolutize_original_styles");
m&&j.setStyle(m);return j}});"getBoundingClientRect"in document.documentElement&&Element.addMethods({viewportOffset:function(j){j=$(j);if(l(j))return new Element.Offset(0,0);j=j.getBoundingClientRect();var m=document.documentElement;return new Element.Offset(j.left-m.clientLeft,j.top-m.clientTop)}})})();window.$$=function(){var a=$A(arguments).join(", ");return Prototype.Selector.select(a,document)};
Prototype.Selector=function(){function a(e){for(var h=0,l=e.length;h<l;h++)Element.extend(e[h]);return e}var b=Prototype.K;return{select:function(){throw Error('Method "Prototype.Selector.select" must be defined.');},match:function(){throw Error('Method "Prototype.Selector.match" must be defined.');},find:function(e,h,l){l=l||0;var n=Prototype.Selector.match,j=e.length,m=0,p;for(p=0;p<j;p++)if(n(e[p],h)&&l==m++)return Element.extend(e[p])},extendElements:Element.extend===b?b:a,extendElement:Element.extend}}();
Prototype._original_property=window.Sizzle;
(function(){function a(r,z,E,B,K,J){K=r=="previousSibling"&&!J;for(var u=0,Q=B.length;u<Q;u++){var N=B[u];if(N){if(K&&N.nodeType===1){N.sizcache=E;N.sizset=u}N=N[r];for(var fa=false;N;){if(N.sizcache===E){fa=B[N.sizset];break}if(N.nodeType===1&&!J){N.sizcache=E;N.sizset=u}if(N.nodeName===z){fa=N;break}N=N[r]}B[u]=fa}}}function b(r,z,E,B,K,J){K=r=="previousSibling"&&!J;for(var u=0,Q=B.length;u<Q;u++){var N=B[u];if(N){if(K&&N.nodeType===1){N.sizcache=E;N.sizset=u}N=N[r];for(var fa=false;N;){if(N.sizcache===
E){fa=B[N.sizset];break}if(N.nodeType===1){if(!J){N.sizcache=E;N.sizset=u}if(typeof z!=="string"){if(N===z){fa=true;break}}else if(m.filter(z,[N]).length>0){fa=N;break}}N=N[r]}B[u]=fa}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,l=Object.prototype.toString,n=false,j=true;[0,0].sort(function(){j=false;return 0});var m=function(r,z,E,B){E=E||[];var K=z=z||document;if(z.nodeType!==1&&z.nodeType!==9)return[];
if(!r||typeof r!=="string")return E;for(var J=[],u,Q,N,fa,O=true,sa=za(z),ma=r;(e.exec(""),u=e.exec(ma))!==null;){ma=u[3];J.push(u[1]);if(u[2]){fa=u[3];break}}if(J.length>1&&s.exec(r))if(J.length===2&&p.relative[J[0]])Q=xa(J[0]+J[1],z);else for(Q=p.relative[J[0]]?[z]:m(J.shift(),z);J.length;){r=J.shift();if(p.relative[r])r+=J.shift();Q=xa(r,Q)}else{if(!B&&J.length>1&&z.nodeType===9&&!sa&&p.match.ID.test(J[0])&&!p.match.ID.test(J[J.length-1])){u=m.find(J.shift(),z,sa);z=u.expr?m.filter(u.expr,u.set)[0]:
u.set[0]}if(z){u=B?{expr:J.pop(),set:T(B)}:m.find(J.pop(),J.length===1&&(J[0]==="~"||J[0]==="+")&&z.parentNode?z.parentNode:z,sa);Q=u.expr?m.filter(u.expr,u.set):u.set;if(J.length>0)N=T(Q);else O=false;for(;J.length;){var f=J.pop();u=f;if(p.relative[f])u=J.pop();else f="";if(u==null)u=z;p.relative[f](N,u,sa)}}else N=[]}N||(N=Q);if(!N)throw"Syntax error, unrecognized expression: "+(f||r);if(l.call(N)==="[object Array]")if(O)if(z&&z.nodeType===1)for(r=0;N[r]!=null;r++){if(N[r]&&(N[r]===true||N[r].nodeType===
1&&ya(z,N[r])))E.push(Q[r])}else for(r=0;N[r]!=null;r++)N[r]&&N[r].nodeType===1&&E.push(Q[r]);else E.push.apply(E,N);else T(N,E);if(fa){m(fa,K,E,B);m.uniqueSort(E)}return E};m.uniqueSort=function(r){if(wa){n=j;r.sort(wa);if(n)for(var z=1;z<r.length;z++)r[z]===r[z-1]&&r.splice(z--,1)}return r};m.matches=function(r,z){return m(r,null,null,z)};m.find=function(r,z,E){var B,K;if(!r)return[];for(var J=0,u=p.order.length;J<u;J++){var Q=p.order[J];if(K=p.leftMatch[Q].exec(r)){var N=K[1];K.splice(1,1);if(N.substr(N.length-
1)!=="\\"){K[1]=(K[1]||"").replace(/\\/g,"");B=p.find[Q](K,z,E);if(B!=null){r=r.replace(p.match[Q],"");break}}}}B||(B=z.getElementsByTagName("*"));return{set:B,expr:r}};m.filter=function(r,z,E,B){for(var K=r,J=[],u=z,Q,N,fa=z&&z[0]&&za(z[0]);r&&z.length;){for(var O in p.filter)if((Q=p.match[O].exec(r))!=null){var sa=p.filter[O],ma,f;N=false;if(u==J)J=[];if(p.preFilter[O])if(Q=p.preFilter[O](Q,u,E,J,B,fa)){if(Q===true)continue}else N=ma=true;if(Q)for(var Ba=0;(f=u[Ba])!=null;Ba++)if(f){ma=sa(f,Q,Ba,
u);var Ha=B^!!ma;if(E&&ma!=null)if(Ha)N=true;else u[Ba]=false;else if(Ha){J.push(f);N=true}}if(ma!==undefined){E||(u=J);r=r.replace(p.match[O],"");if(!N)return[];break}}if(r==K)if(N==null)throw"Syntax error, unrecognized expression: "+r;else break;K=r}return u};var p=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(r){return r.getAttribute("href")}},relative:{"+":function(r,z,E){var B=typeof z==="string",K=B&&!/\W/.test(z);B=B&&!K;if(K&&!E)z=z.toUpperCase();E=0;K=r.length;
for(var J;E<K;E++)if(J=r[E]){for(;(J=J.previousSibling)&&J.nodeType!==1;);r[E]=B||J&&J.nodeName===z?J||false:J===z}B&&m.filter(z,r,true)},">":function(r,z,E){var B=typeof z==="string";if(B&&!/\W/.test(z)){z=E?z:z.toUpperCase();E=0;for(var K=r.length;E<K;E++){var J=r[E];if(J){B=J.parentNode;r[E]=B.nodeName===z?B:false}}}else{E=0;for(K=r.length;E<K;E++)if(J=r[E])r[E]=B?J.parentNode:J.parentNode===z;B&&m.filter(z,r,true)}},"":function(r,z,E){var B=h++,K=b;if(!/\W/.test(z)){var J=z=E?z:z.toUpperCase();
K=a}K("parentNode",z,B,r,J,E)},"~":function(r,z,E){var B=h++,K=b;if(typeof z==="string"&&!/\W/.test(z)){var J=z=E?z:z.toUpperCase();K=a}K("previousSibling",z,B,r,J,E)}},find:{ID:function(r,z,E){if(typeof z.getElementById!=="undefined"&&!E)return(r=z.getElementById(r[1]))?[r]:[]},NAME:function(r,z){if(typeof z.getElementsByName!=="undefined"){for(var E=[],B=z.getElementsByName(r[1]),K=0,J=B.length;K<J;K++)B[K].getAttribute("name")===r[1]&&E.push(B[K]);return E.length===0?null:E}},TAG:function(r,z){return z.getElementsByTagName(r[1])}},
preFilter:{CLASS:function(r,z,E,B,K,J){r=" "+r[1].replace(/\\/g,"")+" ";if(J)return r;J=0;for(var u;(u=z[J])!=null;J++)if(u)if(K^(u.className&&(" "+u.className+" ").indexOf(r)>=0))E||B.push(u);else if(E)z[J]=false;return false},ID:function(r){return r[1].replace(/\\/g,"")},TAG:function(r,z){for(var E=0;z[E]===false;E++);return z[E]&&za(z[E])?r[1]:r[1].toUpperCase()},CHILD:function(r){if(r[1]=="nth"){var z=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(r[2]=="even"&&"2n"||r[2]=="odd"&&"2n+1"||!/\D/.test(r[2])&&"0n+"+
r[2]||r[2]);r[2]=z[1]+(z[2]||1)-0;r[3]=z[3]-0}r[0]=h++;return r},ATTR:function(r,z,E,B,K,J){z=r[1].replace(/\\/g,"");if(!J&&p.attrMap[z])r[1]=p.attrMap[z];if(r[2]==="~=")r[4]=" "+r[4]+" ";return r},PSEUDO:function(r,z,E,B,K){if(r[1]==="not")if((e.exec(r[3])||"").length>1||/^\w/.test(r[3]))r[3]=m(r[3],null,null,z);else{r=m.filter(r[3],z,E,true^K);E||B.push.apply(B,r);return false}else if(p.match.POS.test(r[0])||p.match.CHILD.test(r[0]))return true;return r},POS:function(r){r.unshift(true);return r}},
filters:{enabled:function(r){return r.disabled===false&&r.type!=="hidden"},disabled:function(r){return r.disabled===true},checked:function(r){return r.checked===true},selected:function(r){return r.selected===true},parent:function(r){return!!r.firstChild},empty:function(r){return!r.firstChild},has:function(r,z,E){return!!m(E[3],r).length},header:function(r){return/h\d/i.test(r.nodeName)},text:function(r){return"text"===r.type},radio:function(r){return"radio"===r.type},checkbox:function(r){return"checkbox"===
r.type},file:function(r){return"file"===r.type},password:function(r){return"password"===r.type},submit:function(r){return"submit"===r.type},image:function(r){return"image"===r.type},reset:function(r){return"reset"===r.type},button:function(r){return"button"===r.type||r.nodeName.toUpperCase()==="BUTTON"},input:function(r){return/input|select|textarea|button/i.test(r.nodeName)}},setFilters:{first:function(r,z){return z===0},last:function(r,z,E,B){return z===B.length-1},even:function(r,z){return z%2===
0},odd:function(r,z){return z%2===1},lt:function(r,z,E){return z<E[3]-0},gt:function(r,z,E){return z>E[3]-0},nth:function(r,z,E){return E[3]-0==z},eq:function(r,z,E){return E[3]-0==z}},filter:{PSEUDO:function(r,z,E,B){var K=z[1],J=p.filters[K];if(J)return J(r,E,z,B);else if(K==="contains")return(r.textContent||r.innerText||"").indexOf(z[3])>=0;else if(K==="not"){z=z[3];E=0;for(B=z.length;E<B;E++)if(z[E]===r)return false;return true}},CHILD:function(r,z){var E=z[1],B=r;switch(E){case "only":case "first":for(;B=
B.previousSibling;)if(B.nodeType===1)return false;if(E=="first")return true;B=r;case "last":for(;B=B.nextSibling;)if(B.nodeType===1)return false;return true;case "nth":E=z[2];var K=z[3];if(E==1&&K==0)return true;var J=z[0],u=r.parentNode;if(u&&(u.sizcache!==J||!r.nodeIndex)){var Q=0;for(B=u.firstChild;B;B=B.nextSibling)if(B.nodeType===1)B.nodeIndex=++Q;u.sizcache=J}B=r.nodeIndex-K;return E==0?B==0:B%E==0&&B/E>=0}},ID:function(r,z){return r.nodeType===1&&r.getAttribute("id")===z},TAG:function(r,z){return z===
"*"&&r.nodeType===1||r.nodeName===z},CLASS:function(r,z){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(z)>-1},ATTR:function(r,z){var E=z[1];E=p.attrHandle[E]?p.attrHandle[E](r):r[E]!=null?r[E]:r.getAttribute(E);var B=E+"",K=z[2],J=z[4];return E==null?K==="!=":K==="="?B===J:K==="*="?B.indexOf(J)>=0:K==="~="?(" "+B+" ").indexOf(J)>=0:!J?B&&E!==false:K==="!="?B!=J:K==="^="?B.indexOf(J)===0:K==="$="?B.substr(B.length-J.length)===J:K==="|="?B===J||B.substr(0,J.length+1)===J+"-":false},
POS:function(r,z,E,B){var K=p.setFilters[z[2]];if(K)return K(r,E,z,B)}}},s=p.match.POS,C;for(C in p.match){p.match[C]=RegExp(p.match[C].source+/(?![^\[]*\])(?![^\(]*\))/.source);p.leftMatch[C]=RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[C].source)}var T=function(r,z){r=Array.prototype.slice.call(r,0);if(z){z.push.apply(z,r);return z}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(ia){T=function(r,z){var E=z||[];if(l.call(r)==="[object Array]")Array.prototype.push.apply(E,
r);else if(typeof r.length==="number")for(var B=0,K=r.length;B<K;B++)E.push(r[B]);else for(B=0;r[B];B++)E.push(r[B]);return E}}var wa;if(document.documentElement.compareDocumentPosition)wa=function(r,z){if(!r.compareDocumentPosition||!z.compareDocumentPosition){if(r==z)n=true;return 0}var E=r.compareDocumentPosition(z)&4?-1:r===z?0:1;if(E===0)n=true;return E};else if("sourceIndex"in document.documentElement)wa=function(r,z){if(!r.sourceIndex||!z.sourceIndex){if(r==z)n=true;return 0}var E=r.sourceIndex-
z.sourceIndex;if(E===0)n=true;return E};else if(document.createRange)wa=function(r,z){if(!r.ownerDocument||!z.ownerDocument){if(r==z)n=true;return 0}var E=r.ownerDocument.createRange(),B=z.ownerDocument.createRange();E.setStart(r,0);E.setEnd(r,0);B.setStart(z,0);B.setEnd(z,0);E=E.compareBoundaryPoints(Range.START_TO_END,B);if(E===0)n=true;return E};(function(){var r=document.createElement("div"),z="script"+(new Date).getTime();r.innerHTML="<a name='"+z+"'/>";var E=document.documentElement;E.insertBefore(r,
E.firstChild);if(document.getElementById(z)){p.find.ID=function(B,K,J){if(typeof K.getElementById!=="undefined"&&!J)return(K=K.getElementById(B[1]))?K.id===B[1]||typeof K.getAttributeNode!=="undefined"&&K.getAttributeNode("id").nodeValue===B[1]?[K]:undefined:[]};p.filter.ID=function(B,K){var J=typeof B.getAttributeNode!=="undefined"&&B.getAttributeNode("id");return B.nodeType===1&&J&&J.nodeValue===K}}E.removeChild(r);E=r=null})();(function(){var r=document.createElement("div");r.appendChild(document.createComment(""));
if(r.getElementsByTagName("*").length>0)p.find.TAG=function(z,E){var B=E.getElementsByTagName(z[1]);if(z[1]==="*"){for(var K=[],J=0;B[J];J++)B[J].nodeType===1&&K.push(B[J]);B=K}return B};r.innerHTML="<a href='#'></a>";if(r.firstChild&&typeof r.firstChild.getAttribute!=="undefined"&&r.firstChild.getAttribute("href")!=="#")p.attrHandle.href=function(z){return z.getAttribute("href",2)};r=null})();document.querySelectorAll&&function(){var r=m,z=document.createElement("div");z.innerHTML="<p class='TEST'></p>";
if(!(z.querySelectorAll&&z.querySelectorAll(".TEST").length===0)){m=function(B,K,J,u){K=K||document;if(!u&&K.nodeType===9&&!za(K))try{return T(K.querySelectorAll(B),J)}catch(Q){}return r(B,K,J,u)};for(var E in r)m[E]=r[E];z=null}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var r=document.createElement("div");r.innerHTML="<div class='test e'></div><div class='test'></div>";if(r.getElementsByClassName("e").length!==0){r.lastChild.className="e";if(r.getElementsByClassName("e").length!==
1){p.order.splice(1,0,"CLASS");p.find.CLASS=function(z,E,B){if(typeof E.getElementsByClassName!=="undefined"&&!B)return E.getElementsByClassName(z[1])};r=null}}}();var ya=document.compareDocumentPosition?function(r,z){return r.compareDocumentPosition(z)&16}:function(r,z){return r!==z&&(r.contains?r.contains(z):true)},za=function(r){return r.nodeType===9&&r.documentElement.nodeName!=="HTML"||!!r.ownerDocument&&r.ownerDocument.documentElement.nodeName!=="HTML"},xa=function(r,z){for(var E=[],B="",K,
J=z.nodeType?[z]:z;K=p.match.PSEUDO.exec(r);){B+=K[0];r=r.replace(p.match.PSEUDO,"")}r=p.relative[r]?r+"*":r;K=0;for(var u=J.length;K<u;K++)m(r,J[K],E);return m.filter(B,E)};window.Sizzle=m})();(function(a){var b=Prototype.Selector.extendElements;Prototype.Selector.engine=a;Prototype.Selector.select=function(e,h){return b(a(e,h||document))};Prototype.Selector.match=function(e,h){return a.matches(h,[e]).length==1}})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;
var Form={reset:function(a){a=$(a);a.reset();return a},serializeElements:function(a,b){if(typeof b!="object")b={hash:!!b};else if(Object.isUndefined(b.hash))b.hash=true;var e,h,l=false,n=b.submit,j,m;if(b.hash){m={};j=function(p,s,C){if(s in p){Object.isArray(p[s])||(p[s]=[p[s]]);p[s].push(C)}else p[s]=C;return p}}else{m="";j=function(p,s,C){return p+(p?"&":"")+encodeURIComponent(s)+"="+encodeURIComponent(C)}}return a.inject(m,function(p,s){if(!s.disabled&&s.name){e=s.name;h=$(s).getValue();if(h!=
null&&s.type!="file"&&(s.type!="submit"||!l&&n!==false&&(!n||e==n)&&(l=true)))p=j(p,e,h)}return p})}};
Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){a=$(a).getElementsByTagName("*");for(var b,e=[],h=Form.Element.Serializers,l=0;b=a[l];l++)e.push(b);return e.inject([],function(n,j){h[j.tagName.toLowerCase()]&&n.push(Element.extend(j));return n})},getInputs:function(a,b,e){a=$(a);a=a.getElementsByTagName("input");if(!b&&!e)return $A(a).map(Element.extend);for(var h=0,l=[],n=a.length;h<n;h++){var j=a[h];b&&j.type!=b||e&&j.name!=e||
l.push(Element.extend(j))}return l},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(a){a=$(a).getElements().findAll(function(e){return"hidden"!=e.type&&!e.disabled});var b=a.findAll(function(e){return e.hasAttribute("tabIndex")&&e.tabIndex>=0}).sortBy(function(e){return e.tabIndex}).first();return b?b:a.find(function(e){return/^(?:input|select|textarea)$/i.test(e.tagName)})},
focusFirstElement:function(a){a=$(a);var b=a.findFirstElement();b&&b.activate();return a},request:function(a,b){a=$(a);b=Object.clone(b||{});var e=b.parameters,h=a.readAttribute("action")||"";if(h.blank())h=window.location.href;b.parameters=a.serialize(true);if(e){if(Object.isString(e))e=e.toQueryParams();Object.extend(b.parameters,e)}if(a.hasAttribute("method")&&!b.method)b.method=a.method;return new Ajax.Request(h,b)}};
Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};
Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var e={};e[a.name]=b;return Object.toQueryString(e)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var e=a.tagName.toLowerCase();Form.Element.Serializers[e](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();
if(a.select&&(a.tagName.toLowerCase()!="input"||!/^(?:button|reset|submit)$/i.test(a.type)))a.select()}catch(b){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element,$F=Form.Element.Methods.getValue;
Form.Element.Serializers=function(){function a(n,j){if(Object.isUndefined(j))return n.checked?n.value:null;else n.checked=!!j}function b(n,j){if(Object.isUndefined(j))return n.value;else n.value=j}function e(n){var j=n.selectedIndex;return j>=0?l(n.options[j]):null}function h(n){var j,m=n.length;if(!m)return null;var p=0;for(j=[];p<m;p++){var s=n.options[p];s.selected&&j.push(l(s))}return j}function l(n){return Element.hasAttribute(n,"value")?n.value:n.text}return{input:function(n,j){switch(n.type.toLowerCase()){case "checkbox":case "radio":return a(n,
j);default:return b(n,j)}},inputSelector:a,textarea:b,select:function(n,j){if(Object.isUndefined(j))return(n.type==="select-one"?e:h)(n);for(var m,p,s=!Object.isArray(j),C=0,T=n.length;C<T;C++){m=n.options[C];p=this.optionValue(m);if(s){if(p==j){m.selected=true;break}}else m.selected=j.include(p)}},selectOne:e,selectMany:h,optionValue:l,button:b}}();
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,b,e,h){$super(h,e);this.element=$(b);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});
Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});
Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type)switch(a.type.toLowerCase()){case "checkbox":case "radio":Event.observe(a,
"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this))}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});
(function(){function a(u,Q){return u.which?u.which===Q+1:u.button===Q}function b(u,Q){return u.button===xa[Q]}function e(u,Q){switch(Q){case 0:return u.which==1&&!u.metaKey;case 1:return u.which==2||u.which==1&&u.metaKey;case 2:return u.which==3;default:return false}}function h(u){var Q=document.documentElement,N=document.body||{scrollLeft:0};return u.pageX||u.clientX+(Q.scrollLeft||N.scrollLeft)-(Q.clientLeft||0)}function l(u){var Q=document.documentElement,N=document.body||{scrollTop:0};return u.pageY||
u.clientY+(Q.scrollTop||N.scrollTop)-(Q.clientTop||0)}function n(u,Q,N){var fa=Element.retrieve(u,"prototype_event_registry");if(Object.isUndefined(fa)){B.push(u);fa=Element.retrieve(u,"prototype_event_registry",$H())}var O=fa.get(Q);if(Object.isUndefined(O)){O=[];fa.set(Q,O)}if(O.pluck("handler").include(N))return false;var sa;if(Q.include(":"))sa=function(ma){if(Object.isUndefined(ma.eventName))return false;if(ma.eventName!==Q)return false;T.extend(ma,u);N.call(u,ma)};else if(!wa&&(Q==="mouseenter"||
Q==="mouseleave")){if(Q==="mouseenter"||Q==="mouseleave")sa=function(ma){T.extend(ma,u);for(var f=ma.relatedTarget;f&&f!==u;)try{f=f.parentNode}catch(Ba){f=u}f!==u&&N.call(u,ma)}}else sa=function(ma){T.extend(ma,u);N.call(u,ma)};sa.handler=N;O.push(sa);return sa}function j(){for(var u=0,Q=B.length;u<Q;u++){T.stopObserving(B[u]);B[u]=null}}function m(u,Q,N){u=$(u);N=n(u,Q,N);if(!N)return u;if(Q.include(":"))if(u.addEventListener)u.addEventListener("dataavailable",N,false);else{u.attachEvent("ondataavailable",
N);u.attachEvent("onlosecapture",N)}else{Q=K(Q);u.addEventListener?u.addEventListener(Q,N,false):u.attachEvent("on"+Q,N)}return u}function p(u,Q,N){u=$(u);var fa=Element.retrieve(u,"prototype_event_registry");if(!fa)return u;if(!Q){fa.each(function(f){p(u,f.key)});return u}var O=fa.get(Q);if(!O)return u;if(!N){O.each(function(f){p(u,Q,f.handler)});return u}for(var sa=O.length,ma;sa--;)if(O[sa].handler===N){ma=O[sa];break}if(!ma)return u;if(Q.include(":"))if(u.removeEventListener)u.removeEventListener("dataavailable",
ma,false);else{u.detachEvent("ondataavailable",ma);u.detachEvent("onlosecapture",ma)}else{N=K(Q);u.removeEventListener?u.removeEventListener(N,ma,false):u.detachEvent("on"+N,ma)}fa.set(Q,O.without(ma));return u}function s(u,Q,N,fa){u=$(u);if(Object.isUndefined(fa))fa=true;if(u==document&&document.createEvent&&!u.dispatchEvent)u=document.documentElement;var O;if(document.createEvent){O=document.createEvent("HTMLEvents");O.initEvent("dataavailable",fa,true)}else{O=document.createEventObject();O.eventType=
fa?"ondataavailable":"onlosecapture"}O.eventName=Q;O.memo=N||{};document.createEvent?u.dispatchEvent(O):u.fireEvent(O.eventType,O);return T.extend(O)}function C(u,Q,N,fa){u=$(u);if(Object.isFunction(N)&&Object.isUndefined(fa)){fa=N;N=null}return(new T.Handler(u,Q,N,fa)).start()}var T={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}},ia=document.documentElement,
wa="onmouseenter"in ia&&"onmouseleave"in ia,ya=function(){return false};if(window.attachEvent)ya=window.addEventListener?function(u){return!(u instanceof window.Event)}:function(){return true};var za,xa={0:1,1:4,2:2};za=window.attachEvent?window.addEventListener?function(u,Q){return ya(u)?b(u,Q):a(u,Q)}:b:Prototype.Browser.WebKit?e:a;T.Methods={isLeftClick:function(u){return za(u,0)},isMiddleClick:function(u){return za(u,1)},isRightClick:function(u){return za(u,2)},element:function(u){u=T.extend(u);
var Q=u.target,N=u.type;if((u=u.currentTarget)&&u.tagName)if(N==="load"||N==="error"||N==="click"&&u.tagName.toLowerCase()==="input"&&u.type==="radio")Q=u;if(Q.nodeType==Node.TEXT_NODE)Q=Q.parentNode;return Element.extend(Q)},findElement:function(u,Q){var N=T.element(u);if(!Q)return N;for(;N;){if(Object.isElement(N)&&Prototype.Selector.match(N,Q))return Element.extend(N);N=N.parentNode}},pointer:function(u){return{x:h(u),y:l(u)}},pointerX:h,pointerY:l,stop:function(u){T.extend(u);u.preventDefault();
u.stopPropagation();u.stopped=true}};var r=Object.keys(T.Methods).inject({},function(u,Q){u[Q]=T.Methods[Q].methodize();return u});if(window.attachEvent){var z=function(u){switch(u.type){case "mouseover":case "mouseenter":u=u.fromElement;break;case "mouseout":case "mouseleave":u=u.toElement;break;default:return null}return Element.extend(u)},E={stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}};T.extend=
function(u,Q){if(!u)return false;if(!ya(u))return u;if(u._extendedByPrototype)return u;u._extendedByPrototype=Prototype.emptyFunction;var N=T.pointer(u);Object.extend(u,{target:u.srcElement||Q,relatedTarget:z(u),pageX:N.x,pageY:N.y});Object.extend(u,r);Object.extend(u,E);return u}}else T.extend=Prototype.K;if(window.addEventListener){T.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(T.prototype,r)}var B=[];Prototype.Browser.IE&&window.attachEvent("onunload",
j);Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,false);var K=Prototype.K,J={mouseenter:"mouseover",mouseleave:"mouseout"};wa||(K=function(u){return J[u]||u});T.Handler=Class.create({initialize:function(u,Q,N,fa){this.element=$(u);this.eventName=Q;this.selector=N;this.callback=fa;this.handler=this.handleEvent.bind(this)},start:function(){T.observe(this.element,this.eventName,this.handler);return this},stop:function(){T.stopObserving(this.element,this.eventName,
this.handler);return this},handleEvent:function(u){var Q=T.findElement(u,this.selector);Q&&this.callback.call(this.element,u,Q)}});Object.extend(T,T.Methods);Object.extend(T,{fire:s,observe:m,stopObserving:p,on:C});Element.addMethods({fire:s,observe:m,stopObserving:p,on:C});Object.extend(document,{fire:s.methodize(),observe:m.methodize(),stopObserving:p.methodize(),on:C.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,T);else window.Event=T})();
(function(){function a(){if(!document.loaded){h&&window.clearTimeout(h);document.loaded=true;document.fire("dom:loaded")}}function b(){if(document.readyState==="complete"){document.stopObserving("readystatechange",b);a()}}function e(){try{document.documentElement.doScroll("left")}catch(l){h=e.defer();return}a()}var h;if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,false);else{document.observe("readystatechange",b);if(window==top)h=e.defer()}Event.observe(window,"load",
a)})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;
var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}},$continue=Error('"throw $continue" is deprecated, use "return" instead'),Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||
document.body.scrollTop||0},within:function(a,b,e){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,b,e);this.xcomp=b;this.ycomp=e;this.offset=Element.cumulativeOffset(a);return e>=this.offset[1]&&e<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,b,e){var h=Element.cumulativeScrollOffset(a);this.xcomp=b+h[0]-this.deltaX;this.ycomp=e+h[1]-this.deltaY;this.offset=Element.cumulativeOffset(a);return this.ycomp>=
this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,b){if(!a)return 0;if(a=="vertical")return(this.offset[1]+b.offsetHeight-this.ycomp)/b.offsetHeight;if(a=="horizontal")return(this.offset[0]+b.offsetWidth-this.xcomp)/b.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();
return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,b,e){e=e||{};return Element.clonePosition(b,a,e)}};
if(!document.getElementsByClassName)document.getElementsByClassName=function(a){function b(e){return e.blank()?null:"[contains(concat(' ', @class, ' '), ' "+e+" ')]"}a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(e,h){h=h.toString().strip();var l=/\s/.test(h)?$w(h).map(b).join(""):b(h);return l?document._getElementsByXPath(".//*"+l,e):[]}:function(e,h){h=h.toString().strip();var l=[],n=/\s/.test(h)?$w(h):null;if(!n&&!h)return l;var j=$(e).getElementsByTagName("*");h=" "+h+" ";for(var m=
0,p,s;p=j[m];m++)if(p.className&&(s=" "+p.className+" ")&&(s.include(h)||n&&n.all(function(C){return!C.toString().blank()&&s.include(" "+C+" ")})))l.push(Element.extend(p));return l};return function(e,h){return $(h||document.body).getElementsByClassName(e)}}(Element.Methods);Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){this.include(a)||this.set($A(this).concat(a).join(" "))},remove:function(a){this.include(a)&&this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);
(function(){window.Selector=Class.create({initialize:function(a){this.expression=a.strip()},findElements:function(a){return Prototype.Selector.select(this.expression,a)},match:function(a){return Prototype.Selector.match(a,this.expression)},toString:function(){return this.expression},inspect:function(){return"#<Selector: "+this.expression+">"}});Object.extend(Selector,{matchElements:function(a,b){for(var e=Prototype.Selector.match,h=[],l=0,n=a.length;l<n;l++){var j=a[l];e(j,b)&&h.push(Element.extend(j))}return h},
findElement:function(a,b,e){e=e||0;for(var h=0,l,n=0,j=a.length;n<j;n++){l=a[n];if(Prototype.Selector.match(l,b)&&e===h++)return Element.extend(l)}},findChildElements:function(a,b){var e=b.toArray().join(", ");return Prototype.Selector.select(e,a||document)}})})();
String.prototype.parseColor=function(a){var b="#";if(this.slice(0,4)=="rgb("){var e=this.slice(4,this.length-1).split(","),h=0;do b+=parseInt(e[h]).toColorPart();while(++h<3)}else if(this.slice(0,1)=="#"){if(this.length==4)for(h=1;h<4;h++)b+=(this.charAt(h)+this.charAt(h)).toLowerCase();if(this.length==7)b=this.toLowerCase()}return b.length==7?b:a||this};
Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return b.nodeType==3?b.nodeValue:b.hasChildNodes()?Element.collectTextNodes(b):""}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(e){return e.nodeType==3?e.nodeValue:e.hasChildNodes()&&!Element.hasClassName(e,b)?Element.collectTextNodesIgnoreClass(e,b):""}).flatten().join("")};
Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:b/100+"em"});Prototype.Browser.WebKit&&window.scrollBy(0,0);return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var b=document.createTextNode(" ");a.appendChild(b);a.removeChild(b)}catch(e){}};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return-Math.cos(a*Math.PI)/2+0.5},reverse:function(a){return 1-a},flicker:function(a){a=-Math.cos(a*Math.PI)/4+0.75+Math.random()/4;return a>1?1:a},wobble:function(a){return-Math.cos(a*Math.PI*9*a)/2+0.5},pulse:function(a,b){return-Math.cos(a*((b||5)-0.5)*2*Math.PI)/2+0.5},spring:function(a){return 1-
Math.cos(a*4.5*Math.PI)*Math.exp(-a*6)},none:function(){return 0},full:function(){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE)b+=";zoom:1";a=$(a);$A(a.childNodes).each(function(e){if(e.nodeType==3){e.nodeValue.toArray().each(function(h){a.insertBefore((new Element("span",{style:b})).update(h==" "?String.fromCharCode(160):h),e)});Element.remove(e)}})},multiple:function(a,b,e){a=
(typeof a=="object"||Object.isFunction(a))&&a.length?a:$(a).childNodes;var h=Object.extend({speed:0.1,delay:0},e||{}),l=h.delay;$A(a).each(function(n,j){new b(n,Object.extend(h,{delay:j*h.speed+l}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(a,b,e){a=$(a);b=(b||"appear").toLowerCase();return Effect[Effect.PAIRS[b][a.visible()?1:0]](a,Object.extend({queue:{position:"end",scope:a.id||"global",limit:1}},e||{}))}};
Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;
Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(a){var b=(new Date).getTime();switch(Object.isString(a.options.queue)?a.options.queue:a.options.queue.position){case "front":this.effects.findAll(function(e){return e.state=="idle"}).each(function(e){e.startOn+=a.finishOn;e.finishOn+=a.finishOn});break;case "with-last":b=this.effects.pluck("startOn").max()||b;break;case "end":b=this.effects.pluck("finishOn").max()||
b}a.startOn+=b;a.finishOn+=b;if(!a.options.queue.limit||this.effects.length<a.options.queue.limit)this.effects.push(a);if(!this.interval)this.interval=setInterval(this.loop.bind(this),15)},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){for(var a=(new Date).getTime(),b=0,e=this.effects.length;b<e;b++)this.effects[b]&&this.effects[b].loop(a)}});
Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a))return a;return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue)}};Effect.Queue=Effect.Queues.get("global");
Effect.Base=Class.create({position:null,start:function(a){if(a&&a.transition===false)a.transition=Effect.Transitions.linear;this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1E3;this.finishOn=this.startOn+this.options.duration*1E3;this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=function(){function b(e,
h){e.options[h+"Internal"]&&e.options[h+"Internal"](e);e.options[h]&&e.options[h](e)}return function(e){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");this.setup&&this.setup();b(this,"afterSetup")}if(this.state==="running"){this.position=e=this.options.transition(e)*this.fromToDelta+this.options.from;b(this,"beforeUpdate");this.update&&this.update(e);b(this,"afterUpdate")}}}();this.event("beforeStart");this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":
this.options.queue.scope).add(this)},loop:function(a){if(a>=this.startOn)if(a>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");this.finish&&this.finish();this.event("afterFinish")}else{a=(a-this.startOn)/this.totalTime;var b=(a*this.totalFrames).round();if(b>this.currentFrame){this.render(a);this.currentFrame=b}}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this);this.state="finished"},
event:function(a){this.options[a+"Internal"]&&this.options[a+"Internal"](this);this.options[a]&&this.options[a](this)},inspect:function(){var a=$H();for(property in this)Object.isFunction(this[property])||a.set(property,this[property]);return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});
Effect.Parallel=Class.create(Effect.Base,{initialize:function(a,b){this.effects=a||[];this.start(b)},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");b.finish&&b.finish(a);b.event("afterFinish")})}});
Effect.Tween=Class.create(Effect.Base,{initialize:function(a,b,e){a=Object.isString(a)?$(a):a;var h=$A(arguments),l=h.last();h=h.length==5?h[3]:null;this.method=Object.isFunction(l)?l.bind(a):Object.isFunction(a[l])?a[l].bind(a):function(n){a[l]=n};this.start(Object.extend({from:b,to:e},h||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(a){this.start(Object.extend({duration:0},a||{}))},update:Prototype.emptyFunction});
Effect.Opacity=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});this.start(Object.extend({from:this.element.getOpacity()||0,to:1},b||{}))},update:function(a){this.element.setOpacity(a)}});
Effect.Move=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({x:0,y:0,mode:"relative"},b||{}))},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x-=this.originalLeft;this.options.y-=this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*
a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(a,b,e,h){return new Effect.Move(a,Object.extend({x:e,y:b},h||{}))};
Effect.Scale=Class.create(Effect.Base,{initialize:function(a,b,e){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:b},e||{}))},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=
this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box")this.dims=[this.element.offsetHeight,this.element.offsetWidth];if(/^content/.test(this.options.scaleMode))this.dims=
[this.element.scrollHeight,this.element.scrollWidth];if(!this.dims)this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]},update:function(a){a=this.options.scaleFrom/100+this.factor*a;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*a+this.fontSizeType});this.setDimensions(this.dims[0]*a,this.dims[1]*a)},finish:function(){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(a,b){var e={};
if(this.options.scaleX)e.width=b.round()+"px";if(this.options.scaleY)e.height=a.round()+"px";if(this.options.scaleFromCenter){var h=(a-this.dims[0])/2,l=(b-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY)e.top=this.originalTop-h+"px";if(this.options.scaleX)e.left=this.originalLeft-l+"px"}else{if(this.options.scaleY)e.top=-h+"px";if(this.options.scaleX)e.left=-l+"px"}}this.element.setStyle(e)}});
Effect.Highlight=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({startcolor:"#ffff99"},b||{}))},setup:function(){if(this.element.getStyle("display")=="none")this.cancel();else{this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor)this.options.endcolor=
this.element.getStyle("background-color").parseColor("#ffffff");if(!this.options.restorecolor)this.options.restorecolor=this.element.getStyle("background-color");this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))}},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,e,h){return b+
(this._base[h]+this._delta[h]*a).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(a,b){var e=b||{},h=document.viewport.getScrollOffsets(),l=$(a).cumulativeOffset();if(e.offset)l[1]+=e.offset;return new Effect.Tween(null,h.top,l[1],e,function(n){scrollTo(h.left,n.round())})};
Effect.Fade=function(a,b){a=$(a);var e=a.getInlineOpacity(),h=Object.extend({from:a.getOpacity()||1,to:0,afterFinishInternal:function(l){l.options.to==0&&l.element.hide().setStyle({opacity:e})}},b||{});return new Effect.Opacity(a,h)};
Effect.Appear=function(a,b){a=$(a);var e=Object.extend({from:a.getStyle("display")=="none"?0:a.getOpacity()||0,to:1,afterFinishInternal:function(h){h.element.forceRerendering()},beforeSetup:function(h){h.element.setOpacity(h.options.from).show()}},b||{});return new Effect.Opacity(a,e)};
Effect.Puff=function(a,b){a=$(a);var e={opacity:a.getInlineOpacity(),position:a.getStyle("position"),top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};return new Effect.Parallel([new Effect.Scale(a,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(h){Position.absolutize(h.effects[0].element)},afterFinishInternal:function(h){h.effects[0].element.hide().setStyle(e)}},
b||{}))};Effect.BlindUp=function(a,b){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(e){e.element.hide().undoClipping()}},b||{}))};
Effect.BlindDown=function(a,b){a=$(a);var e=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:e.height,originalWidth:e.width},restoreAfterFinish:true,afterSetup:function(h){h.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(h){h.element.undoClipping()}},b||{}))};
Effect.SwitchOff=function(a,b){a=$(a);var e=a.getInlineOpacity();return new Effect.Appear(a,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(h){new Effect.Scale(h.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(l){l.element.makePositioned().makeClipping()},afterFinishInternal:function(l){l.element.hide().undoClipping().undoPositioned().setStyle({opacity:e})}})}},b||{}))};
Effect.DropOut=function(a,b){a=$(a);var e={top:a.getStyle("top"),left:a.getStyle("left"),opacity:a.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(a,{x:0,y:100,sync:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(h){h.effects[0].element.makePositioned()},afterFinishInternal:function(h){h.effects[0].element.hide().undoPositioned().setStyle(e)}},b||{}))};
Effect.Shake=function(a,b){a=$(a);var e=Object.extend({distance:20,duration:0.5},b||{}),h=parseFloat(e.distance),l=parseFloat(e.duration)/10,n={top:a.getStyle("top"),left:a.getStyle("left")};return new Effect.Move(a,{x:h,y:0,duration:l,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-h*2,y:0,duration:l*2,afterFinishInternal:function(m){new Effect.Move(m.element,{x:h*2,y:0,duration:l*2,afterFinishInternal:function(p){new Effect.Move(p.element,{x:-h*2,y:0,duration:l*2,afterFinishInternal:function(s){new Effect.Move(s.element,
{x:h*2,y:0,duration:l*2,afterFinishInternal:function(C){new Effect.Move(C.element,{x:-h,y:0,duration:l,afterFinishInternal:function(T){T.element.undoPositioned().setStyle(n)}})}})}})}})}})}})};
Effect.SlideDown=function(a,b){a=$(a).cleanWhitespace();var e=a.down().getStyle("bottom"),h=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:h.height,originalWidth:h.width},restoreAfterFinish:true,afterSetup:function(l){l.element.makePositioned();l.element.down().makePositioned();window.opera&&l.element.setStyle({top:""});l.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(l){l.element.down().setStyle({bottom:l.dims[0]-
l.element.clientHeight+"px"})},afterFinishInternal:function(l){l.element.undoClipping().undoPositioned();l.element.down().undoPositioned().setStyle({bottom:e})}},b||{}))};
Effect.SlideUp=function(a,b){a=$(a).cleanWhitespace();var e=a.down().getStyle("bottom"),h=a.getDimensions();return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:h.height,originalWidth:h.width},restoreAfterFinish:true,afterSetup:function(l){l.element.makePositioned();l.element.down().makePositioned();window.opera&&l.element.setStyle({top:""});l.element.makeClipping().show()},afterUpdateInternal:function(l){l.element.down().setStyle({bottom:l.dims[0]-
l.element.clientHeight+"px"})},afterFinishInternal:function(l){l.element.hide().undoClipping().undoPositioned();l.element.down().undoPositioned().setStyle({bottom:e})}},b||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};
Effect.Grow=function(a,b){a=$(a);var e=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},b||{}),h={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},l=a.getDimensions(),n,j,m,p;switch(e.direction){case "top-left":n=j=m=p=0;break;case "top-right":n=l.width;j=p=0;m=-l.width;break;case "bottom-left":n=m=0;j=l.height;p=-l.height;break;
case "bottom-right":n=l.width;j=l.height;m=-l.width;p=-l.height;break;case "center":n=l.width/2;j=l.height/2;m=-l.width/2;p=-l.height/2}return new Effect.Move(a,{x:n,y:j,duration:0.01,beforeSetup:function(s){s.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(s){new Effect.Parallel([new Effect.Opacity(s.element,{sync:true,to:1,from:0,transition:e.opacityTransition}),new Effect.Move(s.element,{x:m,y:p,sync:true,transition:e.moveTransition}),new Effect.Scale(s.element,100,
{scaleMode:{originalHeight:l.height,originalWidth:l.width},sync:true,scaleFrom:window.opera?1:0,transition:e.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(C){C.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(C){C.effects[0].element.undoClipping().undoPositioned().setStyle(h)}},e))}})};
Effect.Shrink=function(a,b){a=$(a);var e=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},b||{}),h={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},l=a.getDimensions(),n,j;switch(e.direction){case "top-left":n=j=0;break;case "top-right":n=l.width;j=0;break;case "bottom-left":n=0;j=l.height;break;case "bottom-right":n=l.width;j=
l.height;break;case "center":n=l.width/2;j=l.height/2}return new Effect.Parallel([new Effect.Opacity(a,{sync:true,to:0,from:1,transition:e.opacityTransition}),new Effect.Scale(a,window.opera?1:0,{sync:true,transition:e.scaleTransition,restoreAfterFinish:true}),new Effect.Move(a,{x:n,y:j,sync:true,transition:e.moveTransition})],Object.extend({beforeStartInternal:function(m){m.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(m){m.effects[0].element.hide().undoClipping().undoPositioned().setStyle(h)}},
e))};Effect.Pulsate=function(a,b){a=$(a);var e=b||{},h=a.getInlineOpacity(),l=e.transition||Effect.Transitions.linear;return new Effect.Opacity(a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(n){n.element.setStyle({opacity:h})}},e),{transition:function(n){return 1-l(-Math.cos(n*(e.pulses||5)*2*Math.PI)/2+0.5)}}))};
Effect.Fold=function(a,b){a=$(a);var e={top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};a.makeClipping();return new Effect.Scale(a,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(){new Effect.Scale(a,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(h){h.element.hide().undoClipping().setStyle(e)}})}},b||{}))};
Effect.Morph=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;var e=Object.extend({style:{}},b||{});if(Object.isString(e.style))if(e.style.include(":"))this.style=e.style.parseStyle();else{this.element.addClassName(e.style);this.style=$H(this.element.getStyles());this.element.removeClassName(e.style);var h=this.element.getStyles();this.style=this.style.reject(function(l){return l.value==h[l.key]});e.afterFinishInternal=function(l){l.element.addClassName(l.options.style);
l.transforms.each(function(n){l.element.style[n.style]=""})}}else this.style=$H(e.style);this.start(e)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b))b="#ffffff";b=b.parseColor();return $R(0,2).map(function(e){return parseInt(b.slice(e*2+1,e*2+3),16)})}this.transforms=this.style.map(function(b){var e=b[0];b=b[1];var h=null;if(b.parseColor("#zzzzzz")!="#zzzzzz"){b=b.parseColor();h="color"}else if(e=="opacity"){b=parseFloat(b);Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&
this.element.setStyle({zoom:1})}else if(Element.CSS_LENGTH.test(b)){h=b.match(/^([\+\-]?[0-9\.]+)(.*)$/);b=parseFloat(h[1]);h=h.length==3?h[2]:null}var l=this.element.getStyle(e);return{style:e.camelize(),originalValue:h=="color"?a(l):parseFloat(l||0),targetValue:h=="color"?a(b):b,unit:h}}.bind(this)).reject(function(b){return b.originalValue==b.targetValue||b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))})},update:function(a){for(var b={},e,h=this.transforms.length;h--;)b[(e=this.transforms[h]).style]=
e.unit=="color"?"#"+Math.round(e.originalValue[0]+(e.targetValue[0]-e.originalValue[0])*a).toColorPart()+Math.round(e.originalValue[1]+(e.targetValue[1]-e.originalValue[1])*a).toColorPart()+Math.round(e.originalValue[2]+(e.targetValue[2]-e.originalValue[2])*a).toColorPart():(e.originalValue+(e.targetValue-e.originalValue)*a).toFixed(3)+(e.unit===null?"":e.unit);this.element.setStyle(b,true)}});
Effect.Transform=Class.create({initialize:function(a,b){this.tracks=[];this.options=b||{};this.addTracks(a)},addTracks:function(a){a.each(function(b){b=$H(b);var e=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:e}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var b=a.get("ids"),e=a.get("effect"),h=a.get("options");return[$(b)||$$(b)].flatten().map(function(l){return new e(l,Object.extend({sync:true},
h))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");
String.prototype.parseStyle=function(){var a,b=$H();if(Prototype.Browser.WebKit)a=(new Element("div",{style:this})).style;else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';a=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(e){a[e]&&b.set(e,a[e])});Prototype.Browser.IE&&this.include("opacity")&&b.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);return b};
Element.getStyles=document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=document.defaultView.getComputedStyle($(a),null);return Element.CSS_PROPERTIES.inject({},function(e,h){e[h]=b[h];return e})}:function(a){a=$(a);var b=a.currentStyle,e;e=Element.CSS_PROPERTIES.inject({},function(h,l){h[l]=b[l];return h});if(!e.opacity)e.opacity=a.getOpacity();return e};
Effect.Methods={morph:function(a,b,e){a=$(a);new Effect.Morph(a,Object.extend({style:b},e||{}));return a},visualEffect:function(a,b,e){a=$(a);b=b.dasherize().camelize();b=b.charAt(0).toUpperCase()+b.substring(1);new Effect[b](a,e);return a},highlight:function(a,b){a=$(a);new Effect.Highlight(a,b);return a}};
$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(b,e){b=$(b);Effect[a.charAt(0).toUpperCase()+a.substring(1)](b,e);return b}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
var swfobject=function(){function a(){if(!Ja){try{var G=u.getElementsByTagName("body")[0].appendChild(u.createElement("span"));G.parentNode.removeChild(G)}catch(P){return}Ja=true;G=fa.length;for(var Y=0;Y<G;Y++)fa[Y]()}}function b(G){if(Ja)G();else fa[fa.length]=G}function e(G){if(typeof J.addEventListener!=z)J.addEventListener("load",G,false);else if(typeof u.addEventListener!=z)u.addEventListener("load",G,false);else if(typeof J.attachEvent!=z)wa(J,"onload",G);else if(typeof J.onload=="function"){var P=
J.onload;J.onload=function(){P();G()}}else J.onload=G}function h(){var G=u.getElementsByTagName("body")[0],P=u.createElement(E);P.setAttribute("type",B);var Y=G.appendChild(P);if(Y){var ba=0;(function(){if(typeof Y.GetVariable!=z){var da=Y.GetVariable("$version");if(da){da=da.split(" ")[1].split(",");ea.pv=[parseInt(da[0],10),parseInt(da[1],10),parseInt(da[2],10)]}}else if(ba<10){ba++;setTimeout(arguments.callee,10);return}G.removeChild(P);Y=null;l()})()}else l()}function l(){var G=O.length;if(G>
0)for(var P=0;P<G;P++){var Y=O[P].id,ba=O[P].callbackFn,da={success:false,id:Y};if(ea.pv[0]>0){var na=ia(Y);if(na)if(ya(O[P].swfVersion)&&!(ea.wk&&ea.wk<312)){xa(Y,true);if(ba){da.success=true;da.ref=n(Y);ba(da)}}else if(O[P].expressInstall&&j()){da={};da.data=O[P].expressInstall;da.width=na.getAttribute("width")||"0";da.height=na.getAttribute("height")||"0";if(na.getAttribute("class"))da.styleclass=na.getAttribute("class");if(na.getAttribute("align"))da.align=na.getAttribute("align");var ka={};na=
na.getElementsByTagName("param");for(var ta=na.length,ua=0;ua<ta;ua++)if(na[ua].getAttribute("name").toLowerCase()!="movie")ka[na[ua].getAttribute("name")]=na[ua].getAttribute("value");m(da,ka,Y,ba)}else{p(na);ba&&ba(da)}}else{xa(Y,true);if(ba){if((Y=n(Y))&&typeof Y.SetVariable!=z){da.success=true;da.ref=Y}ba(da)}}}}function n(G){var P=null;if((G=ia(G))&&G.nodeName=="OBJECT")if(typeof G.SetVariable!=z)P=G;else if(G=G.getElementsByTagName(E)[0])P=G;return P}function j(){return!Na&&ya("6.0.65")&&(ea.win||
ea.mac)&&!(ea.wk&&ea.wk<312)}function m(G,P,Y,ba){Na=true;Ha=ba||null;cb={success:false,id:Y};var da=ia(Y);if(da){if(da.nodeName=="OBJECT"){f=s(da);Ba=null}else{f=da;Ba=Y}G.id=K;if(typeof G.width==z||!/%$/.test(G.width)&&parseInt(G.width,10)<310)G.width="310";if(typeof G.height==z||!/%$/.test(G.height)&&parseInt(G.height,10)<137)G.height="137";u.title=u.title.slice(0,47)+" - Flash Player Installation";ba=ea.ie&&ea.win?"ActiveX":"PlugIn";ba="MMredirectURL="+J.location.toString().replace(/&/g,"%26")+
"&MMplayerType="+ba+"&MMdoctitle="+u.title;if(typeof P.flashvars!=z)P.flashvars+="&"+ba;else P.flashvars=ba;if(ea.ie&&ea.win&&da.readyState!=4){ba=u.createElement("div");Y+="SWFObjectNew";ba.setAttribute("id",Y);da.parentNode.insertBefore(ba,da);da.style.display="none";(function(){da.readyState==4?da.parentNode.removeChild(da):setTimeout(arguments.callee,10)})()}C(G,P,Y)}}function p(G){if(ea.ie&&ea.win&&G.readyState!=4){var P=u.createElement("div");G.parentNode.insertBefore(P,G);P.parentNode.replaceChild(s(G),
P);G.style.display="none";(function(){G.readyState==4?G.parentNode.removeChild(G):setTimeout(arguments.callee,10)})()}else G.parentNode.replaceChild(s(G),G)}function s(G){var P=u.createElement("div");if(ea.win&&ea.ie)P.innerHTML=G.innerHTML;else if(G=G.getElementsByTagName(E)[0])if(G=G.childNodes)for(var Y=G.length,ba=0;ba<Y;ba++)!(G[ba].nodeType==1&&G[ba].nodeName=="PARAM")&&G[ba].nodeType!=8&&P.appendChild(G[ba].cloneNode(true));return P}function C(G,P,Y){var ba,da=ia(Y);if(ea.wk&&ea.wk<312)return ba;
if(da){if(typeof G.id==z)G.id=Y;if(ea.ie&&ea.win){var na="",ka;for(ka in G)if(G[ka]!=Object.prototype[ka])if(ka.toLowerCase()=="data")P.movie=G[ka];else if(ka.toLowerCase()=="styleclass")na+=' class="'+G[ka]+'"';else if(ka.toLowerCase()!="classid")na+=" "+ka+'="'+G[ka]+'"';ka="";for(var ta in P)if(P[ta]!=Object.prototype[ta])ka+='<param name="'+ta+'" value="'+P[ta]+'" />';da.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+na+">"+ka+"</object>";sa[sa.length]=G.id;ba=ia(G.id)}else{ta=
u.createElement(E);ta.setAttribute("type",B);for(var ua in G)if(G[ua]!=Object.prototype[ua])if(ua.toLowerCase()=="styleclass")ta.setAttribute("class",G[ua]);else ua.toLowerCase()!="classid"&&ta.setAttribute(ua,G[ua]);for(na in P)if(P[na]!=Object.prototype[na]&&na.toLowerCase()!="movie"){G=ta;ka=na;ua=P[na];Y=u.createElement("param");Y.setAttribute("name",ka);Y.setAttribute("value",ua);G.appendChild(Y)}da.parentNode.replaceChild(ta,da);ba=ta}}return ba}function T(G){var P=ia(G);if(P&&P.nodeName=="OBJECT")if(ea.ie&&
ea.win){P.style.display="none";(function(){if(P.readyState==4){var Y=ia(G);if(Y){for(var ba in Y)if(typeof Y[ba]=="function")Y[ba]=null;Y.parentNode.removeChild(Y)}}else setTimeout(arguments.callee,10)})()}else P.parentNode.removeChild(P)}function ia(G){var P=null;try{P=u.getElementById(G)}catch(Y){}return P}function wa(G,P,Y){G.attachEvent(P,Y);ma[ma.length]=[G,P,Y]}function ya(G){var P=ea.pv;G=G.split(".");G[0]=parseInt(G[0],10);G[1]=parseInt(G[1],10)||0;G[2]=parseInt(G[2],10)||0;return P[0]>G[0]||
P[0]==G[0]&&P[1]>G[1]||P[0]==G[0]&&P[1]==G[1]&&P[2]>=G[2]?true:false}function za(G,P,Y,ba){if(!(ea.ie&&ea.mac)){var da=u.getElementsByTagName("head")[0];if(da){Y=Y&&typeof Y=="string"?Y:"screen";if(ba)ab=Aa=null;if(!Aa||ab!=Y){ba=u.createElement("style");ba.setAttribute("type","text/css");ba.setAttribute("media",Y);Aa=da.appendChild(ba);if(ea.ie&&ea.win&&typeof u.styleSheets!=z&&u.styleSheets.length>0)Aa=u.styleSheets[u.styleSheets.length-1];ab=Y}if(ea.ie&&ea.win)Aa&&typeof Aa.addRule==E&&Aa.addRule(G,
P);else Aa&&typeof u.createTextNode!=z&&Aa.appendChild(u.createTextNode(G+" {"+P+"}"))}}}function xa(G,P){if(db){var Y=P?"visible":"hidden";if(Ja&&ia(G))ia(G).style.visibility=Y;else za("#"+G,"visibility:"+Y)}}function r(G){return/[\\\"<>\.;]/.exec(G)!=null&&typeof encodeURIComponent!=z?encodeURIComponent(G):G}var z="undefined",E="object",B="application/x-shockwave-flash",K="SWFObjectExprInst",J=window,u=document,Q=navigator,N=false,fa=[function(){N?h():l()}],O=[],sa=[],ma=[],f,Ba,Ha,cb,Ja=false,
Na=false,Aa,ab,db=true,ea=function(){var G=typeof u.getElementById!=z&&typeof u.getElementsByTagName!=z&&typeof u.createElement!=z,P=Q.userAgent.toLowerCase(),Y=Q.platform.toLowerCase(),ba=Y?/win/.test(Y):/win/.test(P);Y=Y?/mac/.test(Y):/mac/.test(P);P=/webkit/.test(P)?parseFloat(P.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var da=!+"\u000b1",na=[0,0,0],ka=null;if(typeof Q.plugins!=z&&typeof Q.plugins["Shockwave Flash"]==E){if((ka=Q.plugins["Shockwave Flash"].description)&&!(typeof Q.mimeTypes!=
z&&Q.mimeTypes[B]&&!Q.mimeTypes[B].enabledPlugin)){N=true;da=false;ka=ka.replace(/^.*\s+(\S+\s+\S+$)/,"$1");na[0]=parseInt(ka.replace(/^(.*)\..*$/,"$1"),10);na[1]=parseInt(ka.replace(/^.*\.(.*)\s.*$/,"$1"),10);na[2]=/[a-zA-Z]/.test(ka)?parseInt(ka.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof J.ActiveXObject!=z)try{var ta=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(ta)if(ka=ta.GetVariable("$version")){da=true;ka=ka.split(" ")[1].split(",");na=[parseInt(ka[0],10),parseInt(ka[1],
10),parseInt(ka[2],10)]}}catch(ua){}return{w3:G,pv:na,wk:P,ie:da,win:ba,mac:Y}}();(function(){if(ea.w3){if(typeof u.readyState!=z&&u.readyState=="complete"||typeof u.readyState==z&&(u.getElementsByTagName("body")[0]||u.body))a();if(!Ja){typeof u.addEventListener!=z&&u.addEventListener("DOMContentLoaded",a,false);if(ea.ie&&ea.win){u.attachEvent("onreadystatechange",function(){if(u.readyState=="complete"){u.detachEvent("onreadystatechange",arguments.callee);a()}});J==top&&function(){if(!Ja){try{u.documentElement.doScroll("left")}catch(G){setTimeout(arguments.callee,
0);return}a()}}()}ea.wk&&function(){Ja||(/loaded|complete/.test(u.readyState)?a():setTimeout(arguments.callee,0))}();e(a)}}})();(function(){ea.ie&&ea.win&&window.attachEvent("onunload",function(){for(var G=ma.length,P=0;P<G;P++)ma[P][0].detachEvent(ma[P][1],ma[P][2]);G=sa.length;for(P=0;P<G;P++)T(sa[P]);for(var Y in ea)ea[Y]=null;ea=null;for(var ba in swfobject)swfobject[ba]=null;swfobject=null})})();return{registerObject:function(G,P,Y,ba){if(ea.w3&&G&&P){var da={};da.id=G;da.swfVersion=P;da.expressInstall=
Y;da.callbackFn=ba;O[O.length]=da;xa(G,false)}else ba&&ba({success:false,id:G})},getObjectById:function(G){if(ea.w3)return n(G)},embedSWF:function(G,P,Y,ba,da,na,ka,ta,ua,Oa){var Ua={success:false,id:P};if(ea.w3&&!(ea.wk&&ea.wk<312)&&G&&P&&Y&&ba&&da){xa(P,false);b(function(){Y+="";ba+="";var Ea={};if(ua&&typeof ua===E)for(var Fa in ua)Ea[Fa]=ua[Fa];Ea.data=G;Ea.width=Y;Ea.height=ba;Fa={};if(ta&&typeof ta===E)for(var Va in ta)Fa[Va]=ta[Va];if(ka&&typeof ka===E)for(var Pa in ka)if(typeof Fa.flashvars!=
z)Fa.flashvars+="&"+Pa+"="+ka[Pa];else Fa.flashvars=Pa+"="+ka[Pa];if(ya(da)){Va=C(Ea,Fa,P);Ea.id==P&&xa(P,true);Ua.success=true;Ua.ref=Va}else if(na&&j()){Ea.data=na;m(Ea,Fa,P,Oa);return}else xa(P,true);Oa&&Oa(Ua)})}else Oa&&Oa(Ua)},switchOffAutoHideShow:function(){db=false},ua:ea,getFlashPlayerVersion:function(){return{major:ea.pv[0],minor:ea.pv[1],release:ea.pv[2]}},hasFlashPlayerVersion:ya,createSWF:function(G,P,Y){if(ea.w3)return C(G,P,Y)},showExpressInstall:function(G,P,Y,ba){ea.w3&&j()&&m(G,
P,Y,ba)},removeSWF:function(G){ea.w3&&T(G)},createCSS:function(G,P,Y,ba){ea.w3&&za(G,P,Y,ba)},addDomLoadEvent:b,addLoadEvent:e,getQueryParamValue:function(G){var P=u.location.search||u.location.hash;if(P){if(/\?/.test(P))P=P.split("?")[1];if(G==null)return r(P);P=P.split("&");for(var Y=0;Y<P.length;Y++)if(P[Y].substring(0,P[Y].indexOf("="))==G)return r(P[Y].substring(P[Y].indexOf("=")+1))}return""},expressInstallCallback:function(){if(Na){var G=ia(K);if(G&&f){G.parentNode.replaceChild(f,G);if(Ba){xa(Ba,
true);if(ea.ie&&ea.win)f.style.display="block"}Ha&&Ha(cb)}Na=false}}}}();function createEmptyDiv(a,b){if(!document.getElementById(b)){var e=document.createElement("div");e.id=b;document.getElementById(a).appendChild(e)}}function addSWF(a,b,e,h,l,n,j,m){h=h||{allowScriptAccess:"always"};l=l||"";n=n||"0";j=j||"0";m=m||"9";createEmptyDiv(b,e);swfobject.embedSWF(unescape(a),e,n,j,m,"/widgets/expressinstall.swf","",h,l)}
Prototype.Browser.IE6=Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))==6;Prototype.Browser.IE7=Prototype.Browser.IE&&parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5))==7;Prototype.Browser.IE8=Prototype.Browser.IE&&!Prototype.Browser.IE6&&!Prototype.Browser.IE7;BaseDomain="justin.tv";typeof jQuery!=="undefined"&&jQuery&&jQuery.noConflict();try{document.execCommand("BackgroundImageCache",false,true)}catch(err){}
function createCookie(a,b,e,h,l){h||(h="/");if(e){var n=new Date;n.setTime(n.getTime()+e*1E3);e="; expires="+n.toGMTString()}else e="";a=a+"="+b+e+"; path="+h;if(l==null)document.cookie=a+"; domain=."+BaseDomain;else if(l=="")document.cookie=a}function readCookie(a){a+="=";for(var b=document.cookie.split(";"),e=0;e<b.length;e++){for(var h=b[e];h.charAt(0)==" ";)h=h.substring(1,h.length);if(h.indexOf(a)==0)return h.substring(a.length,h.length)}return null}
function ajax_url_params(a){var b=[],e=window.location.hash.slice(2);e.length>0&&b.push(e);e=window.location.search.slice(1);e.length>0&&b.push(e);a&&b.push(Object.toQueryString(a));a=b.join("&");return a.length>0?"?"+a:""}function url_plus_params(a){a=ajax_url_params(a);return window.location.protocol+"//"+window.location.host+window.location.pathname+a}function eraseCookie(a,b){if(b==null){createCookie(a,"",-1);createCookie(a,"",-1,null,"")}else createCookie(a,"",-1,null,b)}
function setCookieTimeout(a,b,e){if(!readCookie(b)){createCookie(b,"true",e);a()}}function add_hash_param(a,b){var e=window.location.hash.slice(2).toQueryParams();e[a]=b;window.location.hash="!"+Object.toQueryString(e)}function iframe_request(a,b){var e=document.createElement("iframe");e.src=a;e.style.display="none";e.style.visibility="hidden";e.onload=function(){b(e.contentWindow.document.body.innerHTML);document.body.removeChild(e)};on_dom_load(function(){document.body.appendChild(e)})}
function getUrlParameter(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=RegExp("[\\?&]"+a+"=([^&#]*)").exec(window.location.href);if(a==null)return null;return a[1]}function appendHTML(a,b){a=$(a);var e=document.createElement("div");e.style.display="none";document.body.appendChild(e);e.innerHTML=b;for(var h=0;h<e.childNodes.length;h++)a.appendChild($(e.childNodes[h]).remove());$(e).remove()}function set_volume(a){createCookie("volume",a,604800)}
function get_volume(){return readCookie("volume")||100}function limit_tags(a,b,e,h){for(a=$(a).getElementsByTagName(b);a.length>e;)if(h){b=a[a.length-1];b.parentNode.removeChild(b)}else a[0].parentNode.removeChild(a[0])}function addEvent(a,b,e){if(a.addEventListener)a.addEventListener(b,e,false);else if(a.attachEvent){a["e"+b+e]=e;a[b+e]=function(){a["e"+b+e](window.event)};a.attachEvent("on"+b,a[b+e])}}
function safe_on_load(a){Prototype.Browser.IE?Event.observe(window,"load",a):document.observe("dom:loaded",a)}function swap(a,b){return a.parentNode.replaceChild(b,a)}function when(a,b){a()?b():window.setTimeout(function(){when(a,b)},10)}
var on_dom_load=function(){var a=function(b){if(a.already_loaded)b();else if(window.addEventListener)window.addEventListener("DOMContentLoaded",b,false);else document.attchEvent?document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){b();document.detachEvent("onreadystatechange",arguments.callee)}}):when(function(){try{document.documentElement.doScroll("left");return document.documentElement.doScroll&&window==window.top}catch(e){return false}},b)};a.already_loaded=
false;a(function(){a.already_loaded=true});return a}(),cursor=function(){var a=null,b=null;if(window.event){a=function(){return window.event.pageX};b=function(){return window.event.pageX}}else{a=function(){return document.documentElement.scrollLeft||document.body.scrollLeft};b=function(){return document.body.scrollTop||document.body.scrollTop}}var e=function(){return{x:a(),y:b()}};e.x=a;e.y=b;return e}(),shorten=function(a,b){new Ajax.Request("/sharing/shorten",{method:"get",parameters:{url:a},onSuccess:function(e){b(e.responseText)}})};
function is_blank(a){return $(a).value===""}function two_digit(a){return a<10?"0"+(a-0):a}function mil_to_ampm(a){if(a>12)a-=12;if(a==0)a=12;return a}function ordinalize(a){if(11<=a&&a<=13)return a+"th";switch(a%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd";default:return a+"th"}}String.prototype.reverse=function(){return this.split("").reverse().join("")};function commatize(a){return(a+"").reverse().match(/(?:\d*\.)?\d{1,3}-?/g).join(",").reverse()}
function sig_dig(a,b){var e=Math.pow(10,b);return Math.round(a*e)/e}function bound(a,b,e){if(a<b)return b;if(a>e)return e;return a}function length_as_clock(a){var b=Math.floor(a%60),e=Math.floor(a%3600/60);return(a=Math.floor(a/3600))?a+":"+two_digit(e)+":"+two_digit(b):e+":"+two_digit(b)}
function time_ago_in_words(a){a=((new Date).getTime()-a.getTime())/1E3;return a<60?_("Less than a minute"):a<1800?pluralsub(_("%d minute"),_("%d minutes"),Math.round(a/60)):a<86400?pluralsub(_("%d hour"),_("%d hours"),Math.round(a/3600)):a<2592E3?pluralsub(_("%d day"),_("%d days"),Math.round(a/86400)):pluralsub(_("%d month"),_("%d months"),Math.round(a/2592E3))}Date.prototype.on_date=function(a){return a.getFullYear()==this.getFullYear()&&a.getMonth()==this.getMonth()&&a.getDate()==this.getDate()};
Date.prototype.is_today=function(){return this.on_date(new Date)};Date.prototype.is_tomorrow=function(){return this.on_date(new Date((new Date).getTime()+864E5))};Date.prototype.is_day_after_tomorrow=function(){return this.on_date(new Date((new Date).getTime()+1728E5))};
function local_time_in_words(a){var b=null;if(a.is_today())if(a.getHours()>=17)b=_("Tonight");else{a.getHours();b=_("Today")}else b=a.is_tomorrow()?a.getHours()<5?_("Tonight"):a.getHours()<12?_("Tomorrow morning"):a.getHours()<17?_("Tomorrow afternoon"):_("Tomorrow night"):a.is_day_after_tomorrow()&&a.getHours()<5?_("Tomorrow night"):format_date(a,"%B %o");a=format_date(a,"$f%p");return b+" "+a}function time_to_date_string(a){return a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()}
function format_date(a,b){var e=[_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat")],h=[_("Sunday"),_("Monday"),_("Tuesday"),_("Wednesday"),_("Thursday"),_("Friday"),_("Saturday")],l=[_("Jan"),_("Feb"),_("Mar"),_("Apr"),_("May"),_("Jun"),_("Jul"),_("Aug"),_("Sep"),_("Oct"),_("Nov"),_("Dec")],n=[_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December")],j=a.getHours()<12?"am":"pm",m=mil_to_ampm(a.getHours()),
p=two_digit(a.getHours()),s=two_digit(a.getMinutes()),C=two_digit(a.getSeconds()),T=a.is_today(),ia=a.is_tomorrow(),wa=h[a.getDay()]+" "+n[a.getMonth()]+" "+ordinalize(a.getDate());e=[["%a",e[a.getDay()]],["%A",h[a.getDay()]],["%b",l[a.getMonth()]],["%B",n[a.getMonth()]],["%c",a.toString()],["%d",two_digit(a.getDate())],["$d",a.getDate()],["%H",p],["%I",two_digit(m)],["%m",two_digit(a.getMonth()+1)],["%M",s],["%p",j],["%P",j.toUpperCase()],["%S",C],["%w",a.getDay()],["%x",time_to_date_string(a)],
["%X",m+":"+s+":"+C+" "+j],["%y",two_digit(a.getYear()%100)],["%Y",a.getFullYear()],["$f",m+(a.getMinutes()?":"+s:"")],["$m",a.getMonth()+1],["$M",a.getMinutes()],["$S",a.getSeconds()],["$H",a.getHours()],["$I",m],["%i",m],["%o",ordinalize(a.getDate())],["%T",T?_("Today at"):ia?_("Tomorrow at"):wa]];for(h=0;h<e.length;h++)b=b.replace(e[h][0],e[h][1]);return b}
function get_flash_version(){try{if(navigator.plugins!=null&&navigator.plugins.length>0){var a=navigator.plugins["Shockwave Flash"];if(typeof a=="object"){var b=/\d+\.\d+/.exec(a.description);if(b!=null)return parseFloat(b[0])}}return 0}catch(e){return 0}}
flash=function(){var a={},b=false,e=function(){};a.swfObjectCallback=function(h,l,n,j){h=/([0-9]+)/.exec(h)[1];var m=/([0-9]+)/.exec(l)[1];if(!j){if(!b){e();b=true}if(h>50&&m>50)MobileBrowser()?on_dom_load(function(){$(n).innerHTML='<div style="padding-top:'+(m/2-25)+'px;">'+s_("Your mobile device does not support Justin.tv.")+"</div>"}):on_dom_load(function(){$(n).innerHTML='<div style="padding-top:'+(m/2-25)+'px;">'+s_("Justin.tv requires Flash Player 9 or higher.")+"<br/>"+s_("Please %{download} and install Flash Player.").replace(/\%\{(.*?)\}/,
'<a href="http://get.adobe.com/flashplayer" style="color: #06c;">$1</a>')+"</div>"})}};a.onFail=function(h){var l=e;e=function(){l();h()}};return a}();function checkAll(a,b,e){a=$(a).getElementsByClassName(a,b);for(b=0;b<a.length;b++)a[b].checked=e}function checkAllBoxes(a,b){for(var e=$(a).getElementsByTagName("input"),h=0;h<e.length;h++)if(e[h].type=="checkbox")e[h].checked=b}
function showTab(a,b){for(var e=0;e<b.length;e++){Element.hide(b[e]+"_panel");Element.removeClassName(b[e]+"_tab","selected")}Element.show(a+"_panel");Element.addClassName(a+"_tab","selected")}function setClassForDuration(a,b,e){Element.addClassName(a,b);setTimeout(function(){Element.removeClassName(a,b)},e*1E3)}function not_in_frame(){try{return top.location==location?true:false}catch(a){}}
String.prototype.breaking=function(a){return this.replace(/\S+/g,function(b){return b.replace(RegExp("\\S{1,"+a+"}","g"),function(e){return e+"<wbr />"})})};function toggle_section(a){Element.toggleClassName(a,"closed");Element.toggleClassName(a+"_header","max");Element.toggleClassName(a+"_header","min");LateLoader.refresh();LateLoader.reposition_all_ads()}function toggle_description(a){Element.toggle(a+"_t");Element.toggle(a+"_f")}MENUOPEN="";
Event.observe(window,"load",function(){$$("a.dropmenu-trigger").each(function(a){$(a).observe("click",toggleDropmenu)})});
function toggleDropmenu(a){closeOpenMenus();var b=Element.hasClassName(Event.element(a),"dropmenu-trigger")?Element.identify(Event.element(a)):Element.identify(Element.up(Event.element(a)));$(b).toggleClassName("selected");Element.toggle(b+"_menu");Event.stop(a);MENUOPEN=b;a=window.document.body;$(MENUOPEN+"_menu").style.display==""?$(a).observe("click",observeDropmenu):$(a).stopObserving("click",observeDropmenu)}
function observeDropmenu(a){a=Element.identify(Event.element(a));if(a!=$(MENUOPEN)||a!=$(MENUOPEN+"_menu")){$(MENUOPEN).toggleClassName("selected");Element.toggle(MENUOPEN+"_menu");MENUOPEN=""}}function closeOpenMenus(){$$(".menu_box").each(function(a){if($(a).style.display==""){Element.toggle(a);mir=Element.identify(a).replace(/_menu/,"");$(mir).toggleClassName("selected");MENUOPEN=""}})}
function hideSearchText(){var a=$$("#search_tags input").first();a.value="";a.style.color="#000000";SEARCHTEXT=false;a.onclick=""}function setSiteViewerCount(a){$("site_viewer_count").innerHTML=commatize(a-0)}
function setChannelViewerCount(a){a-=0;if($("channel_viewer_count")){$("channel_viewer_count").innerHTML=commatize(a);if(a>0){$("channel_viewer_count_container")&&$("channel_viewer_count_container").show();$("channel_viewer_count").show()}else{$("channel_viewer_count_container")&&$("channel_viewer_count_container").hide();$("channel_viewer_count").hide()}}if(window.PP){PP.channel_live=a>0;PP.channel_viewers=a;EventBank.fire("PP_live_change")}}function setBroadcastIdPart(){}
function pluralsub(a,b,e){return(e==1?a:b).replace("%d",commatize(e))}function s_(a){for(var b=1;b<arguments.length;b++)a=a.replace(/%s/,arguments[b]);return a}function h_(a,b){return a.replace(/%\{(\w+)\}/g,function(e,h){return b[h]})}function l_(a,b){var e=$A(arguments).slice(2);return b.replace(/\$(.+?)\$/g,function(h,l){return a.apply(this,[l].concat(e))})}function enclose(a,b,e){return b+a+e}function get_username(){return PP.login}
function log_stat(a,b,e){b=b||[];var h=new Image(1,1);if(e)h.onload=e;try{query_string=[encodeURIComponent(a),b.map(encodeURI),get_page_log_params().toQueryString()].flatten().join("&");h.src="http://stats.jtvnw.net/"+Math.round(Math.random()*1E4)+"?"+query_string;return h}catch(l){}}
function get_page_log_params(){var a=$H(),b=function(e,h){h&&h!==""&&a.set(e,h)};b("unique_id",getUniqueId());b("unique_id_time",readCookie("guidtime"));b("browser_name",Platform.browser());b("operating_system",Platform.os());PP!==null&&$A(["login","page_type","language","channel","geo","category"]).each(function(e){b(e,PP[e])});return a}function log_stat_afterload(a,b,e){Event.observe(window,"load",function(){log_stat(a,b,e)})}
function ageFromBday(a){a=a.split("-");return Math.round(((new Date).getTime()-(new Date(a[0],a[1]-1,a[2])).getTime())/31536E6)}function formatYearsAgo(a){return format_date(new Date((new Date).getTime()+31536E6*a),"%Y-%m-%d")}function ageTierFromBday(a){if(!a)return"";return a<formatYearsAgo(18)?"13-17":a<formatYearsAgo(25)?"18-24":a<formatYearsAgo(35)?"25-34":"35+"}function get_ip(){return PP.ip}function get_geo(){return PP.geo}
function send_comscore_beacon(a){beacon_sent=true;COMSCORE.beacon({c1:a.c1,c2:a.c2,c3:a.c3,c4:"",c5:a.c5,c6:"",c15:get_comscore_15(readCookie("psHashedUserId"))})}function get_comscore_15(a){return a===null||a=="CXCXCXCX"?"":a}
function peerset_beacon_url(){if(typeof $psl!="undefined"){clearInterval(peerset_interval_id);var a=PP.birthday?Math.floor((new Date-Date.UTC.apply(null,PP.birthday.split("-").reverse()))/31536E6):"0",b=[];CatTracker.raw_list()&&b.push(CatTracker.raw_list());PP.channel_category&&b.push(PP.channel_category+"/"+PP.channel_subcategory);$psl.pid=58632;$psl.addAttr("uid",PP.user_id||"0");$psl.addAttr("age",a);$psl.addAttr("gender",{Male:"m",Female:"f"}[PP.sex]||"0");$psl.addAttr("categories",b.join(",").replace(/_/g,
"-")||"0");$psl.addAttr("interests",PP.interests);$psl.run()}}
CatTracker={push:function(a,b){var e=this.list().concat([[a,b]]).map(this.combine);e=e.slice(-4);createCookie("recent-cats",this.combine_all(e))},raw_list:function(){return readCookie("recent-cats")||""},list:function(){return this.split_all(this.raw_list()).map(this.split)},combine:function(a){return a.join("/")},split:function(a){return a.split("/",2)},combine_all:function(a){return a.join(",")},split_all:function(a){return a?$A(a.split(",")):$A([])}};
Date.prototype.to_chat_timestamp=function(){var a=isNaN(this.getHours())?new Date:this,b=a.getMinutes();if(b<10)b="0"+b;var e=a.getHours();if(e>12)e-=12;else if(e==0)e=12;var h=PP.user_id;if(new Date(2007,11,24,0,0,0)<new Date&&(h==7824||h==39980||h==6356))return e+":"+b+" "+(a.getHours()>11?"pm":"am");return e+":"+b};escape_html=function(a,b){return b?a:a.replace(/</g,"&lt;").replace(/>/g,"&gt;")};
MobileBrowser=function(){var a=false,b=function(){return a};b.iphone=/.* \((iPhone|iPod|iPad);.*/.test(navigator.appVersion);b.blackberry=/.*BlackBerry.*/.test(navigator.appName)||/.*BlackBerry.*/.test(navigator.appVersion);b.android=/.*Android.*/.test(navigator.appVersion);b.wince=/.*Windows CE.*/.test(navigator.appVersion);b.webos=/.*webOS.*/.test(navigator.appVersion);b.feature_phone=/.*(Nokia|MOT|NetFront|MDIP|SEMC|Symbian).*/.test(navigator.appVersion)||/.*LGE?[\/-].*/.test(navigator.appName);
a=b.iphone||b.blackberry||b.android||b.wince||b.webos||b.feature_phone;return b}();if(!MobileBrowser()&&!/static\/flash9ajax/gi.test(window.location.href))var flash9_updater=setInterval(function(){location.hash=="#flash9"&&show_flash_9()},300);
var Platform=function(){var a={},b={windows:/.*Win.*/,macos:/.*Mac.*/},e=null;a.os=function(){e=$H(b).keys().detect(function(n){return b[n].test(navigator.platform)})||"unknown";a.os=function(){return e};return e};a.is_os=function(n){if(Object.isArray(n))return $A(n).indexOf(a.os())!=-1;else if(Object.isString(n))return a.os()==n;return false};var h=["IE","Opera","WebKit","MobileSafari","Gecko"],l=null;a.browser=function(){l=$A(h).detect(function(n){return Prototype.Browser[n]})||"unknown";a.browser=
function(){return l};return l};return a}();
if(!window.skip_promo_redirect&&window.location.hostname.match(/justin/)&&(MobileBrowser.android||MobileBrowser.iphone)&&!readCookie("android_promo")&&!(window.sessionStorage&&window.sessionStorage.android_promo))if(MobileBrowser.android)redirect_respecting_analytics("/static/android_promo?dest="+escape(window.location.pathname+window.location.search+window.location.hash));else MobileBrowser.iphone&&redirect_respecting_analytics("/static/iphone_promo#"+escape(window.location.pathname+window.location.search+
window.location.hash));function show_flash_9(){var a=document.createElement("div");document.body.appendChild(a);a.style.position="absolute";a.style.height="100%";a.style.width="100%";a.style.left="0px";a.style.top="0px";a.id="flash9_dialog";a.style.backgroundColor="#FFFFFF";a.style.zIndex=11;var b=document.createElement("iframe");b.src="/static/flash9ajax";b.style.height="100%";b.style.width="100%";a.appendChild(b);(a=$("ChanHeader"))&&a.remove();clearInterval(flash9_updater)}
function change_language(a,b){change_language_internal(a,b,window.location.href,window.location.hostname)}function change_language_internal(a,b,e){log_stat("change_language_clicked",["current_language="+a,"new_language="+b,"logged_in="+(PP.login==null)],function(){var h=e;if(a!==b){h=e.replace("://"+a+".","://"+b+".");if(h===e)h=e.match("www.")?e.replace("www",b):e.replace(LanguageBaseDomain,b+"."+LanguageBaseDomain)}redirect_respecting_analytics(h)})}getUserLogin=function(){return PP.login};
getPasswordHash=function(){return PP.password_hash};getUserID=function(){return PP.user_id};function read_location_hash(){var a={};$A(location.hash.substr(1).split("&")).each(function(b){var e=[];if(b.startsWith("from-")){e.push("from");e.push(b.substr(5))}else if(b.startsWith("my")){e.push("chat");e.push(b.substr(2))}else e=b.split("=");if(e.length>=2)a[e[0]]=e[1]});return a}
function write_location_hash(a){window.location.replace([window.location.href.replace(/\#.*/i,""),"#",$H(a).toQueryString().replace("%2F","/")].join(""))}function modify_location_hash(a,b){hash=read_location_hash();hash[a]=b;write_location_hash(hash)}function remove_from_location_hash(a){hash=read_location_hash();delete hash[a];write_location_hash(hash)}
function growl_ad(a,b,e,h){growl('<a href="'+h+'" style="display:block;"><table><tr><td><img style="height:40px;width:40px" src="'+e+'" /></td><td style="padding-left:5px;vertical-align:top;"><h3>'+a+'</h3><p style="color:white;">'+b+"</p></td></table></tr></a>","growl_ad")}
function growl(a,b,e){if(!$$(".notification_holder .content").any(function(l){return l.innerHTML.replace(/\s/,"")==a.replace(/\s/,"")})){var h="growl_"+growl.growl_id++;b=['<div class="notification_holder" id="',h,'"><div class="notification"><a href="#" class="close" onclick="$(\'',h,'\').hide(); return false;">X</a><div class="content ',b,'">',a,"</div></div></div>"].join("");appendHTML("growl_slider",b);$(h).onmouseover=function(){x=$(h).down("a.close");x.style.display="block"};$(h).onmouseout=
function(){x=$(h).down("a.close");x.style.display=""};$("growl_container").show();e||(e=7);new Effect.Fade(h,{duration:3,delay:e,queue:{scope:h},afterFinish:function(){var l=$(h).offsetHeight;new Effect.Move("growl_slider",{y:0-l,x:0,mode:"relative",afterFinish:function(){$(h).remove();if($("growl_slider").childElements().length==0)$("growl_slider").style.top="0px";else $("growl_slider").style.top=$("growl_slider").positionedOffset().top+l+"px"}})}})}}growl.growl_id=0;
function show_info_popup(a,b,e,h){$("info_popup_title").update(a);$("info_popup_body").update(b);try{b.evalScripts()}catch(l){}$("info_popup_container").appear({duration:0.2});$("info_popup_cover").show();$("info_popup_close_link").onclick=function(){e&&e();hide_info_popup();return false};$("info_popup").removeClassName("single");$("info_popup").removeClassName("narrow");$("info_popup").removeClassName("double");$("info_popup").addClassName(h?h:"single")}
function hide_info_popup(){$("info_popup_container").hide();$("info_popup_cover").hide()}function user_profile_image(a){var b=PP.profile_image,e=PP.login;if(b){var h=b.match(/:uid=>"(\w+)"/);if(h)b=b.match(/:format=>"(\w+)"/);else{h=b.match(/:uid:\s*(\w+)/);b=b.match(/:format:\s*(\w+)/)}return"http://s.jtvnw.net/jtv_user_pictures/"+e+"-profile_image-"+h[1]+"-"+a+"."+b[1]}else return"/images/redesign/404_user_"+a+".png"}EventBank={handlers:{},prefix_handlers:{},backlog:{}};
EventBank.fire=function(a){var b=$A(arguments).slice(1);if(EventBank.handlers.hasOwnProperty(a)){$A(EventBank.handlers[a]||[]).each(function(h){h.apply(EventBank,b)});var e=EventBank.prefix_handlers[a.split(":")[0]]||[];$A(e).each(function(h){h.apply(EventBank,[a].concat(b))})}else{EventBank.backlog.hasOwnProperty(a)||(EventBank.backlog[a]=[]);EventBank.backlog[a].push(b)}};
EventBank.register_handler=function(a,b){EventBank.handlers[a]||(EventBank.handlers[a]=[]);EventBank.handlers[a].push(b);if(EventBank.backlog.hasOwnProperty(a))for(var e,h=EventBank.backlog[a];e=h.pop();)b.apply(EventBank,e)};EventBank.register_prefix_handler=function(a,b){EventBank.prefix_handlers[a]||(EventBank.prefix_handlers[a]=[]);EventBank.prefix_handlers[a].push(b)};function getUniqueId(){return readCookie("unique_id")}
function import_login_success(){flash_msg("import_login_message");$("youtube_login").value=""}function import_login_failure(){flash_msg("import_login_error")}function import_url_success(){flash_msg("import_url_message");$("youtube_url").value=""}function import_url_failure(){flash_msg("import_url_error")}function flash_msg(a){$(a).show();new Effect.Fade(a,{duration:8,from:1,to:0})}
function check_login_available(a,b){if(check_login_available.timeout){clearTimeout(check_login_available.timeout);check_login_available.timeout=null}$("login_validation").src="/images/redesign/spinner.gif";$("login_validation").show();if(a.length>3)check_login_available.timeout=setTimeout(function(){new Ajax.Request("/user/login_available",{parameters:"login="+encodeURIComponent(a),onSuccess:function(e){$("login_validation").src="/images/"+b+"-"+e.responseText+".png";$("login_validation").show()}});
check_login_available.timeout=null},500);else $("login_validation").hide()}function show_login_box(a){show_login_box=function(){return true};a||(a={});$("login_wrapper").show();new Ajax.Updater("login_wrapper","/user/login_popup",{method:"get",evalScripts:true,onComplete:function(b){if(b.status!=200)a.url?redirect_respecting_analytics(a.url):redirect_respecting_analytics("/user/signup");else window.setTimeout(function(){show_login_box(a)},50)}})}
show_reload_box=function(){var a=$("reload_subwindow"),b=$("cover");if(a&&b){hide_overlay_box();a.show();b.show();hide_flash_player();hide_embed_player();window.scrollTo(0,0)}};show_post_signup_subwindow=function(){Element.show("cover");Element.show("post_signup_subwindow");hide_flash_player();hide_embed_player()};
hide_overlay_box=function(){show_flash_player();show_embed_player();toggleManagedAds();$("cover")&&Element.hide("cover");$("login_subwindow")&&Element.hide("login_subwindow");$("post_signup_subwindow")&&Element.hide("post_signup_subwindow");$("email_window")&&Element.hide("email_window");$("broadcast_subwindow")&&Element.hide("broadcast_subwindow");$("reload_subwindow")&&Element.hide("reload_subwindow");$("chat_login")&&$("chat_login").hide();$("temp_cover")&&$("temp_cover").hide();$("login_wraper")&&
$("login_wrapper").hide()};show_flash_player=function(){if(video_player())video_player().style.visibility="visible";$$(".front_page_flash").each(function(a){a.style.visibility=""})};hide_flash_player=function(){if(video_player())video_player().style.visibility="hidden";$$(".front_page_flash").each(function(a){a.style.visibility="hidden"})};
video_player=function(){return $("live_site_player_flash")||$("archive_site_player_flash")||$("jtv_archive_flash")||$("live_embed_player_flash")||$("clip_site_player_flash")||$("clip_embed_player_flash")};show_embed_player=function(){if(embed_player())embed_player().parentNode.style.visibility="visible"};hide_embed_player=function(){if(embed_player())embed_player().parentNode.style.visibility="hidden"};embed_player=function(){return $("clip_embed_player_flash")};sharing_login_windows={};
sharing_login_callbacks={};
log_in_to_sharing_service=function(a,b){for(var e in sharing_login_windows)sharing_login_windows.hasOwnProperty(e)&&a!=e&&sharing_login_windows[e].close();for(e in sharing_login_windows)sharing_login_windows.hasOwnProperty(e)&&a!==e&&sharing_login_callbacks[e].onFailure({message:_("You started to log in to another messaging service.")});log_stat("sharing/login_prompt",["status=start","service="+a,"prompt_type="+b.type]);e=window.open("/sharing/begin_login?service="+a+"&login_prompt_type="+b.type,
"sharing_login_window","width=1024,height=400");sharing_login_windows[a]=e;if(!e.opener)e.opener=window;window.focus&&e.focus();sharing_login_callbacks[a]={onSuccess:function(h){delete sharing_login_callbacks[a];delete sharing_login_windows[a];log_stat("sharing/login_prompt",["status=success","service="+a,"prompt_type="+b.type]);return b.onSuccess(h)},onFailure:function(h){delete sharing_login_callbacks[a];delete sharing_login_windows[a];log_stat("sharing/login_prompt",["status=failure","service="+
a]);return b.onFailure(h)}}};
var share=function(a){if({twitter:readCookie("twitter_login"),facebook:readCookie("facebook_uid")}[a.service])new Ajax.Request("/sharing/share",{method:"post",parameters:{service:a.service,message:a.message,link:a.link,description:a.description,source:a.source,type:a.type,object_id:a.object_id},onSuccess:a.onSuccess,onFailure:a.onFailure||function(){}});else log_in_to_sharing_service(a.service,{onSuccess:function(){share(a)},onFailure:a.onFailure||function(){}})},popup_share_url=function(a){if(!a.link&&
!a.id)if(typeof broadcast_id_from_url!="undefined"&&typeof broadcast_part_from_url!="undefined"){var b=broadcast_id_from_url(),e=broadcast_part_from_url();if(b&&e){a.type="broadcast";a.id=PP.channel+":"+b+":"+e}else a.link=window.location.toString()}else a.link=window.location.toString();if(!a.title)a.title=document.title;return"/sharing/popup_share?"+Object.toQueryString(a)},require_login=function(a,b){if(PP.login){b&&b();return true}else{show_login_box(a||{});return false}};
Event.observe(window,"unload",function(){for(var a in sharing_login_callbacks)if(sharing_login_callbacks.hasOwnProperty(a)){sharing_login_callbacks[a].onFailure({error_message:_("You left the page.")});sharing_login_windows[a].close()}});window._gaq=window._gaq||[];function gaTrackEvent(a,b,e,h){a=["_trackEvent",a,b];e!=null&&a.push(e);h!=null&&a.push(h);_gaq.push(a);return true}function track_analytics_event(a){_gaq.push(["_trackPageview",a])}
function redirect_respecting_analytics(a){var b=/\?/.test(a)?"&":"?",e=$A(window.location.search.slice(1).split("&")).map(function(h){return h.split("=")}).findAll(function(h){return h[0]in{utm_source:1,utm_medium:1,utm_campaign:1,utm_term:1,utm_content:1}}).map(function(h){return h.join("=")}).join("&");if(e)a=a+b+e;window.location=a}
function populate_fields(a){if(a.facebook.token){$("user_facebook_access_token").value=a.facebook.token;$("user_facebook_uid").value=a.facebook.data.id}if(a.facebook.data.link&&!/.+\.php\?/.test(a.facebook.data.link))$("user_login").value=a.facebook.data.link.split("/").last().replace(/\W+/g,"");else if(a.facebook.data.name)$("user_login").value=a.facebook.data.name.replace(/\W+/g,"");if(a.facebook.data.name)$("user_name").value=a.facebook.data.name;if(a.facebook.data.email)$("user_email").value=
a.facebook.data.email;if(a.facebook.data.birthday){a=a.facebook.data.birthday.split("/");if(a.length>=1&&$("birthday_fields").childElements().length>=3){$("birthday_fields").childElements()[0].childElements()[parseInt(a[0],10)].selected=true;if(a.length>=2){$("birthday_fields").childElements()[1].childElements()[parseInt(a[1],10)].selected=true;if(a.length>=3){$("birthday_fields").childElements()[2].childElements()[parseInt(a[2],10)-1909].selected=true;$("birthday_div").hide()}}}}$("create_acount_facebook")&&
$("create_account_facebook").hide();$("signup_form").show();$("user_password").focus();check_login_available($("user_login").value)}function get_leaderboard(){var a=$("FPLeaderboard");if(location.host.include("staging"))a=$("Staging_FPLeaderboard");return a}
function toggle_header_notification(){if($("header_notification")&&$("header_notification").style.display=="none"){if($("iphone_banner").style.display==""){hn_height=$("header_notification").getHeight();ib_height=$("iphone_banner").getHeight();if(ib_height>0){ib_height=135;$("iphone_banner_in").morph("height:"+ib_height+"px;",{duration:0.1})}$("header_notification").setStyle({top:"-"+ib_height+"px"});$("header_notification").morph("margin-bottom:-"+hn_height+"px;",{duration:0.5})}Effect.SlideDown("header_notification",
{duration:0.5})}else{Effect.SlideUp("header_notification",{duration:0.3});if($("iphone_banner").style.display==""){$("header_notification").morph("margin-bottom:-21px;",{duration:0.3});setTimeout(function(){$("iphone_banner_in").morph("height:104px",{duration:0.3})},360)}}}
function RemovedRedirectionHandling(a,b,e,h,l){if((h=="true"||h===true)&&l!="true"&&l!==true){log_stat("emergency_paywall_redirect",["from="+window.location]);redirect_respecting_analytics("/payment/pro_account")}if(!(b=="false"||!b))if(b=="dmca")redirect_respecting_analytics(e+"/dmca_violation");else if(b=="tos")redirect_respecting_analytics(e+"/tos_violation");else if(b&&b!="directory_hidden")a=="archive"?redirect_respecting_analytics(e):redirect_respecting_analytics(e+"/dmca_violation")}
Mixpanel={track_with_swf:function(a,b){Mixpanel._init();var e="_mpq_"+window._mp.count;window._mp.count=(window._mp.count+1)%window._mp.cap;var h={allowScriptAccess:"always",allowNetworking:"all",flashvars:Mixpanel._build_flashvars(a,b)};addSWF("/widgets/mixpanel_beacon.swf","_mpq",e,h,{id:e,name:"left",bgcolor:"#000000"})},_build_flashvars:function(a,b){b=Object.clone(b);b.login=PP.login;var e,h,l,n=0,j=[];j[n++]="event="+a.toString();for(e in b)if(e)if(e!="event"){val=b[e];h=val==null?"":val.toString();
l=e;j[n++]=l+"="+h}return j.join("&")},_init:function(){if(!window._mp){window._mp={};window._mp.count=0;window._mp.cap=10;window._mp.q=document.createElement("div");window._mp.q.id="_mpq";window._mp.q.setStyle({height:"0px",width:"0px"});document.getElementsByTagName("body")[0].appendChild(window._mp.q)}}};window.$j!==undefined&&function(a){window.getGameInfo=function(b,e){a.ajax({url:"/discovery/game",dataType:"json",data:{name:b},success:function(h){e(h)},error:function(){}})}}($j);
var LateLoader={initialized:false,images:[],updating:false,xarth:false,show_companion:true,companion_slot:"",leader_ad:false,init:function(){var a=LateLoader.ad_geos;if(a)for(var b=PP.geo||"US",e=a.length-1;e>=0;e--)if(a[e][1]=="white")a[e][2].indexOf(b)!=-1||LateLoader.prevent_ad(a[e][0]);else a[e][2].indexOf(b)!=-1&&LateLoader.prevent_ad(a[e][0]);LateLoader.reposition_all_ads();if(LateLoader.initialized)return false;LateLoader.prep_images();Event.observe(window,"scroll",LateLoader.refresh);Event.observe(window,
"resize",LateLoader.refresh);LateLoader.refresh();LateLoader.initialized=true},last_init:function(){$$(".lastload").each(function(a){Event.observe(a,"load",LateLoader.reposition_all_ads);a.src=a.getAttribute("src1")});$$(".panel").each(function(a){Event.observe(a,"scroll",LateLoader.refresh)});LateLoader.refresh()},prep_images:function(){$$(".lateload").each(function(a,b){if(a.id!=="lateload"+b){var e=a.getAttribute("src1");a.id="lateload"+b;LateLoader.images.push({id:a.id,src:e})}})},set_companion_flag:function(a,
b){LateLoader.companion_slot=b;LateLoader.show_companion=a&&a[PP.geo]&&Math.floor(Math.random()*101)<a[PP.geo]?true:false;LateLoader.show_companion&&b&&LateLoader.prevent_ad(b)},should_show_companion:function(){return LateLoader.show_companion},refresh:function(){if(!LateLoader.updating){LateLoader.updating=true;var a=document.viewport.getScrollOffsets().top,b=a+document.viewport.getHeight();images=LateLoader.images.select(function(j){var m=$(j.id);if(m&&m.src!==j.src){var p=m.cumulativeOffset().top-
(m.cumulativeScrollOffset().top-a);if(b>=p-20&&m.clientWidth>0){m.src=j.src;return false}}return true});if(LateLoader.channel_about_me){var e=$("about_me_container"),h=e.cumulativeOffset();if(b>=h.top-20){e.innerHTML=LateLoader.channel_about_me;LateLoader.channel_about_me=null}if($("related")){var l=0;$$("#related_list .list_item").each(function(j){l+=j.getHeight()});e=-50;if($("clips"))e+=$("clips").getHeight();if($("about"))e+=$("about").getHeight();e=Math.min(l,e,400);h=$("related_list");if(e>
h.getHeight())h.style.height=e+"px"}}LateLoader.reposition_ad("ChanLeaderBottomv2");LateLoader.reposition_ad("Staging_ChanLeaderBottomv2");LateLoader.images=images;LateLoader.updating=false;if($$(".below_header")){var n=50-a;if(n<0)n=0;$$(".below_header").each(function(j){$(j).style.top=n+"px"})}if($$(".above_footer")&&$("footer")){n=b-$("footer").positionedOffset().top;if(n<0)n=0;$$(".above_footer").each(function(j){$(j).style.bottom=n+10+"px"})}}},ads:[],prevented_ads:[],is_prevented:function(a){return $A(LateLoader.prevented_ads).include(a)},
fill_slot:function(a){LateLoader.is_prevented(a)||typeof GA_googleFillSlot!="undefined"&&GA_googleFillSlot(a)},fill_slot_and_treat:function(a){LateLoader.fill_slot(a);LateLoader.register_ad(a);LateLoader.reposition_ad(a)},register_ad:function(a){LateLoader.is_prevented(a)||LateLoader.ads.push(a)},prevent_ad:function(a){LateLoader.prevented_ads.push(a);$A(this.ads).reject(function(b){return b==a})},reposition_ad:function(a){if(!LateLoader.is_prevented(a)){var b=$(a),e=$(a+"_holder");if(b&&e)if(PP.is_pro||
PP.active_channel_subscriber||$("right_col")&&!$("right_col").hasClassName("ad")){if(!e.hidden){e.hide();e.hidden=true;log_stat("page_ad_skipped",["name="+a,"page_type="+PP.page_type,"is_subscriber="+PP.active_channel_subscriber,"is_pro="+PP.is_pro])}}else{$("go_pro_link")!=undefined&&$("go_pro_link").show();var h=0,l=0;if(a.indexOf("Leaderv")>-1){LateLoader.leader_ad=true;h=b.getHeight();l=b.getWidth();h>0&&l>0&&show_header_banner()}var n={};if(typeof $j!="undefined"&&LateLoader.xarth){n=$j("#"+
a+"_holder").offset();var j=$j(".wrapper").offset();n.left-=j.left;n.top-=j.top}else n=e.positionedOffset();if(a.indexOf("Leaderv")>-1){if(h>0)b.style.top=n.top+(e.getHeight()-h)/2+"px";if(l>0)b.style.left=n.left+(e.getWidth()-l)/2+"px"}else{b.style.top=n.top+"px";b.style.left=n.left+"px";b.style.width=e.offsetWidth+"px";if(b.offsetHeight>0)e.style.height=b.offsetHeight+"px";else Event.observe(window,"load",function(){if($(a).offsetHeight>0)e.style.height=$(a).offsetHeight+"px";LateLoader.leader_ad&&
LateLoader.reposition_all_ads()})}b.show();(b=$(a+"_load_text"))&&b.remove();e.removeClassName("ad_placeholder")}}},reposition_all_ads:function(){LateLoader.ads.each(function(a){LateLoader.reposition_ad(a)})},watch_height_change:function(a){var b=function(){var e=$(a);if(e){max_height=0;e.descendants().each(function(h){if(h.tagName.toUpperCase()=="DIV"){var l=h.getStyle("clip");if(l)try{ss=l.split(",");if(ss.length<2)ss=l.split(" ");parseInt(ss[2])>0?h.setStyle({height:parseInt(ss[2])+"px"}):h.setStyle({height:null})}catch(n){}h=
h.getHeight();if(h>max_height)max_height=h}});$(a+"_holder").setStyle({height:max_height+"px"})}setTimeout(b,75)};b()},watch_ad_changes:function(a){setInterval(function(){LateLoader.reposition_ad(a)},200)}};safe_on_load(LateLoader.init);Event.observe(window,"load",LateLoader.last_init);function pro_hide_ads(){if(PP.is_pro||PP.active_channel_subscriber)$$(".right_col").each(function(a){a.removeClassName("ad")})}toggleManagedAds=function(){$$(".managed_ad").invoke("toggle")};
function load_external_file(a){var b=/src="(.+?)"/;a.match(RegExp(Prototype.ScriptFragment,"img")).map(function(e){return e.match(b)[1]}).map(function(e){$$("body")[0].insert(new Element("script",{src:e}))});$$("body")[0].insert(a)}function setCompanionHTML(a){if(!(!LateLoader.is_prevented("ChanMedRectv2")&&PP.page_type=="channel"))$("adaptvcompanion_wrapper").innerHTML=a}function show_header_banner(){$("iphone_banner").show()}
function close_header_banner(a){$("iphone_banner").hide();createCookie(a,"true",86400)}function close_leaderboard_banner(){["ChanLeaderv2","ChanLeaderv3","ClipsTopLeaderv2","SearchLeaderv2","DirLeaderv2"].each(function(a){LateLoader.prevent_ad(a);LateLoader.prevent_ad("Staging_"+a);try{$(a).hide();$(a).remove()}catch(b){}try{$("Staging_"+a).hide();$("Staging_"+a).remove()}catch(e){}});close_header_banner("leaderboard_banner")}
function showFPopaBanner(){var a=$$(".fp_opa_pushdown").first();$(a).morph("height:66px;");a=get_leaderboard();var b=$("takeover_wrapper");b||(b=$("directory"));if(a){$(a).style.left="121px";b&&b.addClassName("takeover")}b&&b.addClassName("opa_pushdown");setTimeout(FPopaAnimation,3E3)}function FPopaAnimation(){Effect.Fade("FPopaBannerImage");Effect.SlideDown("FPopaBannerFull");var a=$$(".fp_opa_pushdown").first();$(a).morph("height:300px;");move_dir_ads_to(352);setTimeout(hideFPopaBanner,7E3)}
function hideFPopaBanner(){var a=$$(".fp_opa_pushdown").first();$(a).morph("height:66px;");Effect.SlideUp("FPopaBannerFull");Effect.Appear("FPopaBannerImage");move_dir_ads_to(-352)}function move_dir_ads_to(a){var b=LateLoader.xarth?"Twitch_":"";["DirectoryLeaderBottomv2","DirectoryMedRectv2","FPLeaderboard"].each(function(e){var h=$(b+e);if(h)new Effect.Move(h,{x:0,y:a,mode:"relative"});else(h=$("Staging_"+b+e))&&new Effect.Move(h,{x:0,y:a,mode:"relative"})})}
function doubleClickFormat(a){return a.replace(/['"=!+#*~;^()<>\[\],.&]/g,"").slice(0,10)}function setGoogleGameAttr(a){if(a.genres)for(var b=0;b<Math.min(a.genres.length,3);b++)GA_googleAddAttr("genre"+b,doubleClickFormat(a.genres[b]));a.name&&GA_googleAddAttr("gameName",doubleClickFormat(a.name))}
function fallback_ad(a,b,e,h,l,n){e||(e=310);h||(h=320);l||(l="");if(b=="DirectoryMedRectBottomv2"&&document.getElementById("spotlight404"))l=true;if(!b&&LateLoader.companion_slot)b=LateLoader.companion_slot;var j=function(m){m='<iframe src="'+m+'" height="'+h+'" width="'+e+'" id="ad_iframe" scrolling="no"></iframe>';$(a).innerHTML=m;$(a).show();if(n){$(a).setStyle({width:e+"px",height:h+"px"});$(a).ancestors()[0].setStyle({width:e+35+"px",height:h+"px"})}LateLoader.reposition_all_ads()};url="/ad/iframe_ad?";
url+="ad_slot="+b+"&just_ad="+l+"&height="+h+"&width="+e;if(PP.channel_category!=undefined)url+="&category="+encodeURIComponent(PP.channel_category);else if(PP.directory_category!=undefined)url+="&category="+encodeURIComponent(PP.directory_category);if(PP.channel_subcategory!=undefined)url+="&subcategory="+encodeURIComponent(PP.channel_subcategory);else if(PP.directory_subcategory!=undefined)url+="&subcategory="+encodeURIComponent(PP.directory_subcategory);if(PP.channel_is_featured!=undefined)url+=
"&channel_is_featured="+encodeURIComponent(PP.channel_is_featured);if(PP.channel!=undefined)url+="&channel="+encodeURIComponent(PP.channel);if(PP.game_info){b=PP.game_info;if(b.genres)for(l=0;l<Math.min(b.genres.length,3);l++)url+="&genre"+l+"="+encodeURIComponent(b.genres[l]);if(b.name)url+="&game_name="+encodeURIComponent(b.name)}else j(url)}function setExtraGoogleParams(a){PP.game_info&&setGoogleGameAttr(PP.game_info);a()}function fetchGoogleAds(){setExtraGoogleParams(GA_googleFetchAds)}
var Tooltips={load:function(){if(typeof Prototype==="undefined")throw"Prototype.js is required.";Event.observe(window,"load",function(){Event.observe(document.body,"click",this.closeAll.bindAsEventListener(this))}.bind(this))},closeAll:function(a){$A(Tooltips.tips).each(function(b){b._pointer.x=Event.pointerX(a);b._pointer.y=Event.pointerY(a);return b._check_and_hide()})},tips:[]};Tooltips.load();
var Tooltip=Class.create({initialize:function(a,b,e){this.disabled=e.disabled||false;this.options=e;this.activators=[];this.tip_parts=[];this.event_list=[];if(!this.options.show_delay)this.options.show_delay=this.options.delay||500;if(!this.options.hide_delay)this.options.hide_delay=this.options.delay||1500;this._reshow_delay=0;Object.isArray(b)||(b=[b]);for(a=b.length;a--;){if(Object.isString(b[a]))b[a]=this._loadElementFromString(b[a]);b[a]=$(b[a]);this._attachEvents(b[a],e.delay);this.tip_parts.push(b[a])}try{b[0].parentNode.show()}catch(h){}if(!this.options.delay)this.options.delay=
1E3;Tooltips.tips.push(this);this.hide()},hide:function(){$A(this.tip_parts).invoke("hide")},show:function(){this.disabled||$A(this.tip_parts).invoke("show")},appear:function(a){this.disabled||$A(this.tip_parts).invoke("appear",a)},popup:function(){this.show()},attach:function(a){Object.isArray(a)||(a=[a]);for(var b=a.length;b--;){if(Object.isString(a[b]))a[b]=this._loadElementFromString(a[b]);this._attachEvents(a[b],this.options.delay);a[b].observe("click",function(){this.visible()?this.hide():this.show()}.bind(this));
this.activators.push(a[b])}return this},visible:function(){return $A(this.tip_parts).any(function(a){return a.visible()})},moveToPointer:function(a,b){$A(this.tip_parts).each(function(e){e.style.position="absolute";e.style.left=this._pointer.x+a+"px";e.style.top=this._pointer.y+b+"px"}.bind(this))},_loadElementFromString:function(a){if(/[\<\>]/gi.test(a)){var b=(new Element("div")).insert(a).hide();$(document.body).insert(a);return b}else return $(a)},_set_hide_timeout:function(){this.timeout&&clearTimeout(this.timeout);
this.timeout=setTimeout(this._check_and_hide.bind(this),this.options.hide_delay)},_within:function(){var a=this._pointer.x,b=this._pointer.y;return $A([this.tip_parts,this.activators]).flatten().any(function(e){return Position.within(e,a,b)})&&b>0&&a>0},_check_and_hide:function(){this._within()?this._set_hide_timeout():this._run_hide()},_run_show:function(){this.options.showEffect?this.options.showEffect(this):this.show();this.options.onShow&&this.options.onShow(this);this.event_list=[];this._set_hide_timeout()},
_run_hide:function(){this.options.hideEffect?this.options.hideEffect(this):this.hide();this.options.onHide&&this.options.onHide(this);this.event_list=[];this._untrack_position()},_track_position:function(){if(!this.observing_position){this.observing_position=function(a){this._pointer=Event.pointer(a)}.bindAsEventListener(this);Event.observe(document,"mousemove",this.observing_position)}},_untrack_position:function(){if(this.observing_position){Event.stopObserving(document,"mousemove",this.observing_position);
this.observing_position=null}},_pointer:{x:0,y:0},_control:function(){this._track_position();var a=-1;if(this.event_list.length>0){if(!this._within())return;a=(new Date).valueOf()-this.event_list.last().timestamp-(this.options.show_delay+this._reshow_delay);if(a>=0&&!this.visible()){this._reshow_delay=0;this._run_show()}}if(a<0){this._control_timeout&&clearTimeout(this.control_timeout);this._control_timeout=setTimeout(this._control.bind(this),-a+5)}},_logEvent:function(a){a={pointerX:Event.pointerX(a),
pointerY:Event.pointerY(a),timestamp:a.timestamp||(new Date).valueOf()};this._pointer.x=a.pointerX;this._pointer.y=a.pointerY;this.event_list.push(a)},_attachEvents:function(a){var b=function(e){Event.pointer(e);this._logEvent(e);this._control()}.bindAsEventListener(this);a.observe("mouseover",b);b=a.select(".close");a.hasClassName("close")&&b.push(a);b.each(function(e){e.observe("click",function(){this.hide();this._reshow_delay=2E3}.bind(this))}.bind(this))}});
Tooltip.Fixed=Class.create(Tooltip,{initialize:function($super){$super.apply(this,arguments)}});var dropmenus=[];function hide_other_dropmenus(a){$A(dropmenus).invoke("hide");a.show()}function check_overlap(a,b){var e=get_coordinates(a),h=get_coordinates(b);e={top:Math.max(e.top,h.top),left:Math.max(e.left,h.left),right:Math.min(e.right,h.right),bottom:Math.min(e.bottom,h.bottom)};return e.right>e.left&&e.bottom>e.top}
function get_coordinates(a){var b=$(a).cumulativeOffset();a=$(a).getDimensions();return{top:b[1],left:b[0],bottom:b[1]+a.height,right:b[0]+a.width}}
var default_dropmenu_options={hide_delay:500,show_delay:150,showEffect:hide_other_dropmenus,onShow:function(a){window.isIE6?$$(".managed_ad").invoke("hide"):$$(".managed_ad").findAll(function(b){if(!$A(["embed","object","iframe"]).any(function(e){return b.getElementsByTagName(e).length>0}))return false;return $A(a.tip_parts).any(function(e){return check_overlap(b,e)})}).invoke("hide")},onHide:function(){$$(".managed_ad").invoke("show")}};
function ajaxMenu(a,b,e,h,l){e=$(e);var n={pageX:0,pageY:0,timestamp:0},j=function(p){n.pageX=Event.pointerX(p);n.pageY=Event.pointerY(p)},m=function(p){if(!e.loading){e.loading=true;n.timestamp=(new Date).valueOf();j(p);Event.observe(document.body,"mousemove",j);new Ajax.Request(a,{method:"get",onSuccess:function(s){Event.stopObserving(e,"mouseover",m);Event.stopObserving(document.body,"mousemove",j);$(h).insert(s.responseText);s.responseText.evalScripts();s=dropmenus.push((new Tooltip.Fixed(b,l)).attach(e))-
1;l.on_load&&l.on_load(e,dropmenus[s]);dropmenus[s]._logEvent(n);dropmenus[s]._control()},onComplete:function(){if($(e).identify()=="usermgmt_dropmenu_toggle"||$(e).identify()=="header_language_dropmenu_toggle")position_to_container(b,e,"right");else if($(e).identify()=="category_dropmenu_toggle"||$(e).identify()=="subcategory_dropmenu_toggle"||$(e).identify()=="language_filter_dropmenu_toggle"){var s=1,C=$("DiropaBanner_holder");C||(C=$("Staging_DiropaBanner_holder"));if(C)s+=C.offsetHeight+13;s>
0&&b[0].setStyle({marginTop:s+"px"});b[1].setStyle({marginTop:s+"px"})}$("header_dropmenus")&&$("header_dropmenus").show()}})}};Event.observe(e,"mouseover",m.bindAsEventListener(window))}function position_to_container(a,b,e){var h=a[0];a=a[1];b=$(b).positionedOffset();var l=$(a).getStyle("padding-left");b=b[0]-parseFloat(l)-1;$(a).setStyle({left:b+"px"});e=e=="right"?b-$(h).getWidth()+$(a).getWidth():b;$(h).setStyle({left:e+"px"})}
load_dropmenus=function(){var a=default_dropmenu_options;$("header_channels_dropmenu_toggle")&&ajaxMenu("/dropmenu/channels",["header_channels_dropmenu","channels_stem"],"header_channels_dropmenu_toggle","header_dropmenus",a);$("usermgmt_dropmenu_toggle")&&ajaxMenu("/dropmenu/usermgmt",["usermgmt_dropmenu","usermgmt_stem"],"usermgmt_dropmenu_toggle","header_dropmenus",a);$("header_language_dropmenu_toggle")&&ajaxMenu("/dropmenu/languages",["header_language_dropmenu","languages_stem"],"header_language_dropmenu_toggle",
"header_dropmenus",a)};function track_link_click(a,b,e){a.observe("click",function(){log_stat(b,e)})}function track_promoted_links(a,b,e){for(var h in e)for(var l=$$(a+" "+e[h]),n=0;n<l.length;n++)track_link_click(l[n],"promoted_click",["source="+b,"link_type="+h,"pos="+n])}
function track_promoted_links_with_id(a,b,e,h){a=$$(a);$A(a).each(function(l,n){var j=$H(h).map(function(s){return l.hasClassName(s[0])?s[1]:""}).join(""),m;for(m in e){var p=$$("#"+l.id+" "+e[m]);$A(p).each(function(s){track_link_click(s,"promoted_click/"+b,["link_type="+m,"pos="+n,"type="+j])})}})}
safe_on_load(function(){track_promoted_links("#producer_info .list_item.channel","producer_spotlight",{status:".content a.status",title:".content .action a",thumb:"a.thumb"});track_promoted_links("#content_blog .front_page_channel","front_page_channel",{title:".title a",thumb:".photo a[href!='/apiredirect']",clip_thumb:".blog_clip a.thumb",clip_title:".blog_clip a.title"});track_promoted_links("#content_blog .front_page_channel","front_page_api",{thumb:".photo a[href='/apiredirect']"});track_promoted_links("#upcoming .list_item",
"upcoming_events",{title:"a.title",thumb:"a.thumb"});track_promoted_links("#search_results .sponsored_result","search_results",{title:".data .title a",thumb_live:".thumb .live_tag a",thumb:".thumb a.thumb_link"});track_promoted_links("#related_list .list_item.channel","channel_related",{thumb:"a.thumb",status:"a.title",title:"span.action a"});track_promoted_links_with_id("#broadcasts_list li.list_item","feed",{thumb:"a.broadcast-thumb",channel_thumb:"a.channel-thumb",title:"a.broadcast-title",source_title:"a.source-title",
source_thumb:"a.source-thumb"},{broadcast:"live",archive:"past_broadcast"})});function iab_rma_start(){$A(document.getElementsByTagName("embed")).each(function(a){a.pause_video&&a.pause_video()})}function iab_rma_stop(){$A(document.getElementsByTagName("embed")).each(function(a){a.resume_video&&a.resume_video()})}
(function(a,b){function e(c){var d=Ba[c]={},g,i;c=c.split(/\s+/);g=0;for(i=c.length;g<i;g++)d[c[g]]=true;return d}function h(c,d,g){if(g===b&&c.nodeType===1){g="data-"+d.replace(Ja,"-$1").toLowerCase();g=c.getAttribute(g);if(typeof g==="string"){try{g=g==="true"?true:g==="false"?false:g==="null"?null:f.isNumeric(g)?parseFloat(g):cb.test(g)?f.parseJSON(g):g}catch(i){}f.data(c,d,g)}else g=b}return g}function l(c){for(var d in c)if(!(d==="data"&&f.isEmptyObject(c[d])))if(d!=="toJSON")return false;return true}
function n(c,d,g){var i=d+"defer",k=d+"queue",o=d+"mark",t=f._data(c,i);if(t&&(g==="queue"||!f._data(c,k))&&(g==="mark"||!f._data(c,o)))setTimeout(function(){if(!f._data(c,k)&&!f._data(c,o)){f.removeData(c,i,true);t.fire()}},0)}function j(){return false}function m(){return true}function p(c,d,g){d=d||0;if(f.isFunction(d))return f.grep(c,function(k,o){return!!d.call(k,o,k)===g});else if(d.nodeType)return f.grep(c,function(k){return k===d===g});else if(typeof d==="string"){var i=f.grep(c,function(k){return k.nodeType===
1});if(Ib.test(d))return f.filter(d,i,!g);else d=f.filter(d,i)}return f.grep(c,function(k){return f.inArray(k,d)>=0===g})}function s(c){var d=pb.split("|");c=c.createDocumentFragment();if(c.createElement)for(;d.length;)c.createElement(d.pop());return c}function C(c,d){if(!(d.nodeType!==1||!f.hasData(c))){var g,i,k;i=f._data(c);var o=f._data(d,i),t=i.events;if(t){delete o.handle;o.events={};for(g in t){i=0;for(k=t[g].length;i<k;i++)f.event.add(d,g+(t[g][i].namespace?".":"")+t[g][i].namespace,t[g][i],
t[g][i].data)}}if(o.data)o.data=f.extend({},o.data)}}function T(c,d){var g;if(d.nodeType===1){d.clearAttributes&&d.clearAttributes();d.mergeAttributes&&d.mergeAttributes(c);g=d.nodeName.toLowerCase();if(g==="object")d.outerHTML=c.outerHTML;else if(g==="input"&&(c.type==="checkbox"||c.type==="radio")){if(c.checked)d.defaultChecked=d.checked=c.checked;if(d.value!==c.value)d.value=c.value}else if(g==="option")d.selected=c.defaultSelected;else if(g==="input"||g==="textarea")d.defaultValue=c.defaultValue;
d.removeAttribute(f.expando)}}function ia(c){return typeof c.getElementsByTagName!=="undefined"?c.getElementsByTagName("*"):typeof c.querySelectorAll!=="undefined"?c.querySelectorAll("*"):[]}function wa(c){if(c.type==="checkbox"||c.type==="radio")c.defaultChecked=c.checked}function ya(c){var d=(c.nodeName||"").toLowerCase();if(d==="input")wa(c);else d!=="script"&&typeof c.getElementsByTagName!=="undefined"&&f.grep(c.getElementsByTagName("input"),wa)}function za(c,d){d.src?f.ajax({url:d.src,async:false,
dataType:"script"}):f.globalEval((d.text||d.textContent||d.innerHTML||"").replace(Jb,"/*$0*/"));d.parentNode&&d.parentNode.removeChild(d)}function xa(c,d,g){var i=d==="width"?c.offsetWidth:c.offsetHeight,k=d==="width"?Kb:Lb,o=0,t=k.length;if(i>0){if(g!=="border")for(;o<t;o++){g||(i-=parseFloat(f.css(c,"padding"+k[o]))||0);if(g==="margin")i+=parseFloat(f.css(c,g+k[o]))||0;else i-=parseFloat(f.css(c,"border"+k[o]+"Width"))||0}return i+"px"}i=Wa(c,d,d);if(i<0||i==null)i=c.style[d]||0;i=parseFloat(i)||
0;if(g)for(;o<t;o++){i+=parseFloat(f.css(c,"padding"+k[o]))||0;if(g!=="padding")i+=parseFloat(f.css(c,"border"+k[o]+"Width"))||0;if(g==="margin")i+=parseFloat(f.css(c,g+k[o]))||0}return i+"px"}function r(c){return function(d,g){if(typeof d!=="string"){g=d;d="*"}if(f.isFunction(g))for(var i=d.toLowerCase().split(qb),k=0,o=i.length,t,y;k<o;k++){t=i[k];if(y=/^\+/.test(t))t=t.substr(1)||"*";t=c[t]=c[t]||[];t[y?"unshift":"push"](g)}}}function z(c,d,g,i,k,o){k=k||d.dataTypes[0];o=o||{};o[k]=true;k=c[k];
for(var t=0,y=k?k.length:0,A=c===jb,I;t<y&&(A||!I);t++){I=k[t](d,g,i);if(typeof I==="string")if(!A||o[I])I=b;else{d.dataTypes.unshift(I);I=z(c,d,g,i,I,o)}}if((A||!I)&&!o["*"])I=z(c,d,g,i,"*",o);return I}function E(c,d){var g,i,k=f.ajaxSettings.flatOptions||{};for(g in d)if(d[g]!==b)(k[g]?c:i||(i={}))[g]=d[g];i&&f.extend(true,c,i)}function B(c,d,g,i){if(f.isArray(d))f.each(d,function(o,t){g||Mb.test(c)?i(c,t):B(c+"["+(typeof t==="object"||f.isArray(t)?o:"")+"]",t,g,i)});else if(!g&&d!=null&&typeof d===
"object")for(var k in d)B(c+"["+k+"]",d[k],g,i);else i(c,d)}function K(){try{return new a.XMLHttpRequest}catch(c){}}function J(){setTimeout(u,0);return eb=f.now()}function u(){eb=b}function Q(c,d){var g={};f.each(rb.concat.apply([],rb.slice(0,d)),function(){g[this]=c});return g}function N(c){if(!kb[c]){var d=O.body,g=f("<"+c+">").appendTo(d),i=g.css("display");g.remove();if(i==="none"||i===""){if(!Ia){Ia=O.createElement("iframe");Ia.frameBorder=Ia.width=Ia.height=0}d.appendChild(Ia);if(!Xa||!Ia.createElement){Xa=
(Ia.contentWindow||Ia.contentDocument).document;Xa.write((O.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");Xa.close()}g=Xa.createElement(c);Xa.body.appendChild(g);i=f.css(g,"display");d.removeChild(Ia)}kb[c]=i}return kb[c]}function fa(c){return f.isWindow(c)?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var O=a.document,sa=a.navigator,ma=a.location,f=function(){function c(){if(!d.isReady){try{O.documentElement.doScroll("left")}catch(w){setTimeout(c,1);return}d.ready()}}var d=
function(w,R){return new d.fn.init(w,R,k)},g=a.jQuery,i=a.$,k,o=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,t=/\S/,y=/^\s+/,A=/\s+$/,I=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,X=/^[\],:{}\s]*$/,M=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Z=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,U=/(?:^|:|,)(?:\s*\[)+/g,ha=/(webkit)[ \/]([\w.]+)/,oa=/(opera)(?:.*version)?[ \/]([\w.]+)/,ra=/(msie) ([\w.]+)/,pa=/(mozilla)(?:.*? rv:([\w.]+))?/,Ka=/-([a-z]|[0-9])/ig,Ca=/^-ms-/,ja=function(w,R){return(R+"").toUpperCase()},
Ga=sa.userAgent,q,v,D=Object.prototype.toString,F=Object.prototype.hasOwnProperty,H=Array.prototype.push,L=Array.prototype.slice,aa=String.prototype.trim,V=Array.prototype.indexOf,la={};d.fn=d.prototype={constructor:d,init:function(w,R,W){var S;if(!w)return this;if(w.nodeType){this.context=this[0]=w;this.length=1;return this}if(w==="body"&&!R&&O.body){this.context=O;this[0]=O.body;this.selector=w;this.length=1;return this}if(typeof w==="string")if((S=w.charAt(0)==="<"&&w.charAt(w.length-1)===">"&&
w.length>=3?[null,w,null]:o.exec(w))&&(S[1]||!R))if(S[1]){W=(R=R instanceof d?R[0]:R)?R.ownerDocument||R:O;if(w=I.exec(w))if(d.isPlainObject(R)){w=[O.createElement(w[1])];d.fn.attr.call(w,R,true)}else w=[W.createElement(w[1])];else{w=d.buildFragment([S[1]],[W]);w=(w.cacheable?d.clone(w.fragment):w.fragment).childNodes}return d.merge(this,w)}else{if((R=O.getElementById(S[2]))&&R.parentNode){if(R.id!==S[2])return W.find(w);this.length=1;this[0]=R}this.context=O;this.selector=w;return this}else return!R||
R.jquery?(R||W).find(w):this.constructor(R).find(w);else if(d.isFunction(w))return W.ready(w);if(w.selector!==b){this.selector=w.selector;this.context=w.context}return d.makeArray(w,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return L.call(this,0)},get:function(w){return w==null?this.toArray():w<0?this[this.length+w]:this[w]},pushStack:function(w,R,W){var S=this.constructor();d.isArray(w)?H.apply(S,w):d.merge(S,w);S.prevObject=this;S.context=this.context;
if(R==="find")S.selector=this.selector+(this.selector?" ":"")+W;else if(R)S.selector=this.selector+"."+R+"("+W+")";return S},each:function(w,R){return d.each(this,w,R)},ready:function(w){d.bindReady();q.add(w);return this},eq:function(w){w=+w;return w===-1?this.slice(w):this.slice(w,w+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(L.apply(this,arguments),"slice",L.call(arguments).join(","))},map:function(w){return this.pushStack(d.map(this,
function(R,W){return w.call(R,W,R)}))},end:function(){return this.prevObject||this.constructor(null)},push:H,sort:[].sort,splice:[].splice};d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var w,R,W,S,ga,ca=arguments[0]||{},qa=1,va=arguments.length,Qa=false;if(typeof ca==="boolean"){Qa=ca;ca=arguments[1]||{};qa=2}if(typeof ca!=="object"&&!d.isFunction(ca))ca={};if(va===qa){ca=this;--qa}for(;qa<va;qa++)if((w=arguments[qa])!=null)for(R in w){W=ca[R];S=w[R];if(ca!==S)if(Qa&&S&&(d.isPlainObject(S)||
(ga=d.isArray(S)))){if(ga){ga=false;W=W&&d.isArray(W)?W:[]}else W=W&&d.isPlainObject(W)?W:{};ca[R]=d.extend(Qa,W,S)}else if(S!==b)ca[R]=S}return ca};d.extend({noConflict:function(w){if(a.$===d)a.$=i;if(w&&a.jQuery===d)a.jQuery=g;return d},isReady:false,readyWait:1,holdReady:function(w){if(w)d.readyWait++;else d.ready(true)},ready:function(w){if(w===true&&!--d.readyWait||w!==true&&!d.isReady){if(!O.body)return setTimeout(d.ready,1);d.isReady=true;if(!(w!==true&&--d.readyWait>0)){q.fireWith(O,[d]);
d.fn.trigger&&d(O).trigger("ready").off("ready")}}},bindReady:function(){if(!q){q=d.Callbacks("once memory");if(O.readyState==="complete")return setTimeout(d.ready,1);if(O.addEventListener){O.addEventListener("DOMContentLoaded",v,false);a.addEventListener("load",d.ready,false)}else if(O.attachEvent){O.attachEvent("onreadystatechange",v);a.attachEvent("onload",d.ready);var w=false;try{w=a.frameElement==null}catch(R){}O.documentElement.doScroll&&w&&c()}}},isFunction:function(w){return d.type(w)==="function"},
isArray:Array.isArray||function(w){return d.type(w)==="array"},isWindow:function(w){return w&&typeof w==="object"&&"setInterval"in w},isNumeric:function(w){return!isNaN(parseFloat(w))&&isFinite(w)},type:function(w){return w==null?String(w):la[D.call(w)]||"object"},isPlainObject:function(w){if(!w||d.type(w)!=="object"||w.nodeType||d.isWindow(w))return false;try{if(w.constructor&&!F.call(w,"constructor")&&!F.call(w.constructor.prototype,"isPrototypeOf"))return false}catch(R){return false}for(var W in w);
return W===b||F.call(w,W)},isEmptyObject:function(w){for(var R in w)return false;return true},error:function(w){throw Error(w);},parseJSON:function(w){if(typeof w!=="string"||!w)return null;w=d.trim(w);if(a.JSON&&a.JSON.parse)return a.JSON.parse(w);if(X.test(w.replace(M,"@").replace(Z,"]").replace(U,"")))return(new Function("return "+w))();d.error("Invalid JSON: "+w)},parseXML:function(w){var R,W;try{if(a.DOMParser){W=new DOMParser;R=W.parseFromString(w,"text/xml")}else{R=new ActiveXObject("Microsoft.XMLDOM");
R.async="false";R.loadXML(w)}}catch(S){R=b}if(!R||!R.documentElement||R.getElementsByTagName("parsererror").length)d.error("Invalid XML: "+w);return R},noop:function(){},globalEval:function(w){if(w&&t.test(w))(a.execScript||function(R){a.eval.call(a,R)})(w)},camelCase:function(w){return w.replace(Ca,"ms-").replace(Ka,ja)},nodeName:function(w,R){return w.nodeName&&w.nodeName.toUpperCase()===R.toUpperCase()},each:function(w,R,W){var S,ga=0,ca=w.length,qa=ca===b||d.isFunction(w);if(W)if(qa)for(S in w){if(R.apply(w[S],
W)===false)break}else for(;ga<ca;){if(R.apply(w[ga++],W)===false)break}else if(qa)for(S in w){if(R.call(w[S],S,w[S])===false)break}else for(;ga<ca;)if(R.call(w[ga],ga,w[ga++])===false)break;return w},trim:aa?function(w){return w==null?"":aa.call(w)}:function(w){return w==null?"":w.toString().replace(y,"").replace(A,"")},makeArray:function(w,R){var W=R||[];if(w!=null){var S=d.type(w);w.length==null||S==="string"||S==="function"||S==="regexp"||d.isWindow(w)?H.call(W,w):d.merge(W,w)}return W},inArray:function(w,
R,W){var S;if(R){if(V)return V.call(R,w,W);S=R.length;for(W=W?W<0?Math.max(0,S+W):W:0;W<S;W++)if(W in R&&R[W]===w)return W}return-1},merge:function(w,R){var W=w.length,S=0;if(typeof R.length==="number")for(var ga=R.length;S<ga;S++)w[W++]=R[S];else for(;R[S]!==b;)w[W++]=R[S++];w.length=W;return w},grep:function(w,R,W){var S=[],ga;W=!!W;for(var ca=0,qa=w.length;ca<qa;ca++){ga=!!R(w[ca],ca);W!==ga&&S.push(w[ca])}return S},map:function(w,R,W){var S,ga,ca=[],qa=0,va=w.length;if(w instanceof d||va!==b&&
typeof va==="number"&&(va>0&&w[0]&&w[va-1]||va===0||d.isArray(w)))for(;qa<va;qa++){S=R(w[qa],qa,W);if(S!=null)ca[ca.length]=S}else for(ga in w){S=R(w[ga],ga,W);if(S!=null)ca[ca.length]=S}return ca.concat.apply([],ca)},guid:1,proxy:function(w,R){if(typeof R==="string"){var W=w[R];R=w;w=W}if(!d.isFunction(w))return b;var S=L.call(arguments,2);W=function(){return w.apply(R,S.concat(L.call(arguments)))};W.guid=w.guid=w.guid||W.guid||d.guid++;return W},access:function(w,R,W,S,ga,ca){var qa=w.length;if(typeof R===
"object"){for(var va in R)d.access(w,va,R[va],S,ga,W);return w}if(W!==b){S=!ca&&S&&d.isFunction(W);for(va=0;va<qa;va++)ga(w[va],R,S?W.call(w[va],va,ga(w[va],R)):W,ca);return w}return qa?ga(w[0],R):b},now:function(){return(new Date).getTime()},uaMatch:function(w){w=w.toLowerCase();w=ha.exec(w)||oa.exec(w)||ra.exec(w)||w.indexOf("compatible")<0&&pa.exec(w)||[];return{browser:w[1]||"",version:w[2]||"0"}},sub:function(){function w(W,S){return new w.fn.init(W,S)}d.extend(true,w,this);w.superclass=this;
w.fn=w.prototype=this();w.fn.constructor=w;w.sub=this.sub;w.fn.init=function(W,S){if(S&&S instanceof d&&!(S instanceof w))S=w(S);return d.fn.init.call(this,W,S,R)};w.fn.init.prototype=w.fn;var R=w(O);return w},browser:{}});d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(w,R){la["[object "+R+"]"]=R.toLowerCase()});Ga=d.uaMatch(Ga);if(Ga.browser){d.browser[Ga.browser]=true;d.browser.version=Ga.version}if(d.browser.webkit)d.browser.safari=true;if(t.test("\u00a0")){y=
/^[\s\xA0]+/;A=/[\s\xA0]+$/}k=d(O);if(O.addEventListener)v=function(){O.removeEventListener("DOMContentLoaded",v,false);d.ready()};else if(O.attachEvent)v=function(){if(O.readyState==="complete"){O.detachEvent("onreadystatechange",v);d.ready()}};return d}(),Ba={};f.Callbacks=function(c){c=c?Ba[c]||e(c):{};var d=[],g=[],i,k,o,t,y,A=function(M){var Z,U,ha,oa;Z=0;for(U=M.length;Z<U;Z++){ha=M[Z];oa=f.type(ha);if(oa==="array")A(ha);else if(oa==="function")if(!c.unique||!X.has(ha))d.push(ha)}},I=function(M,
Z){Z=Z||[];i=!c.memory||[M,Z];k=true;y=o||0;o=0;for(t=d.length;d&&y<t;y++)if(d[y].apply(M,Z)===false&&c.stopOnFalse){i=true;break}k=false;if(d)if(c.once)if(i===true)X.disable();else d=[];else if(g&&g.length){i=g.shift();X.fireWith(i[0],i[1])}},X={add:function(){if(d){var M=d.length;A(arguments);if(k)t=d.length;else if(i&&i!==true){o=M;I(i[0],i[1])}}return this},remove:function(){if(d)for(var M=arguments,Z=0,U=M.length;Z<U;Z++)for(var ha=0;ha<d.length;ha++)if(M[Z]===d[ha]){if(k)if(ha<=t){t--;ha<=y&&
y--}d.splice(ha--,1);if(c.unique)break}return this},has:function(M){if(d)for(var Z=0,U=d.length;Z<U;Z++)if(M===d[Z])return true;return false},empty:function(){d=[];return this},disable:function(){d=g=i=b;return this},disabled:function(){return!d},lock:function(){g=b;if(!i||i===true)X.disable();return this},locked:function(){return!g},fireWith:function(M,Z){if(g)if(k)c.once||g.push([M,Z]);else c.once&&i||I(M,Z);return this},fire:function(){X.fireWith(this,arguments);return this},fired:function(){return!!i}};
return X};var Ha=[].slice;f.extend({Deferred:function(c){var d=f.Callbacks("once memory"),g=f.Callbacks("once memory"),i=f.Callbacks("memory"),k="pending",o={resolve:d,reject:g,notify:i},t={done:d.add,fail:g.add,progress:i.add,state:function(){return k},isResolved:d.fired,isRejected:g.fired,then:function(I,X,M){y.done(I).fail(X).progress(M);return this},always:function(){y.done.apply(y,arguments).fail.apply(y,arguments);return this},pipe:function(I,X,M){return f.Deferred(function(Z){f.each({done:[I,
"resolve"],fail:[X,"reject"],progress:[M,"notify"]},function(U,ha){var oa=ha[0],ra=ha[1],pa;f.isFunction(oa)?y[U](function(){(pa=oa.apply(this,arguments))&&f.isFunction(pa.promise)?pa.promise().then(Z.resolve,Z.reject,Z.notify):Z[ra+"With"](this===y?Z:this,[pa])}):y[U](Z[ra])})}).promise()},promise:function(I){if(I==null)I=t;else for(var X in t)I[X]=t[X];return I}},y=t.promise({}),A;for(A in o){y[A]=o[A].fire;y[A+"With"]=o[A].fireWith}y.done(function(){k="resolved"},g.disable,i.lock).fail(function(){k=
"rejected"},d.disable,i.lock);c&&c.call(y,y);return y},when:function(c){function d(X){return function(M){i[X]=arguments.length>1?Ha.call(arguments,0):M;--y||A.resolveWith(A,i)}}function g(X){return function(M){t[X]=arguments.length>1?Ha.call(arguments,0):M;A.notifyWith(I,t)}}var i=Ha.call(arguments,0),k=0,o=i.length,t=Array(o),y=o,A=o<=1&&c&&f.isFunction(c.promise)?c:f.Deferred(),I=A.promise();if(o>1){for(;k<o;k++)if(i[k]&&i[k].promise&&f.isFunction(i[k].promise))i[k].promise().then(d(k),A.reject,
g(k));else--y;y||A.resolveWith(A,i)}else if(A!==c)A.resolveWith(A,o?[c]:[]);return I}});f.support=function(){var c,d,g,i,k,o,t,y,A=O.createElement("div");A.setAttribute("className","t");A.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";d=A.getElementsByTagName("*");g=A.getElementsByTagName("a")[0];if(!d||!d.length||!g)return{};i=O.createElement("select");k=i.appendChild(O.createElement("option"));d=A.getElementsByTagName("input")[0];
c={leadingWhitespace:A.firstChild.nodeType===3,tbody:!A.getElementsByTagName("tbody").length,htmlSerialize:!!A.getElementsByTagName("link").length,style:/top/.test(g.getAttribute("style")),hrefNormalized:g.getAttribute("href")==="/a",opacity:/^0.55/.test(g.style.opacity),cssFloat:!!g.style.cssFloat,checkOn:d.value==="on",optSelected:k.selected,getSetAttribute:A.className!=="t",enctype:!!O.createElement("form").enctype,html5Clone:O.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,
changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};d.checked=true;c.noCloneChecked=d.cloneNode(true).checked;i.disabled=true;c.optDisabled=!k.disabled;try{delete A.test}catch(I){c.deleteExpando=false}if(!A.addEventListener&&A.attachEvent&&A.fireEvent){A.attachEvent("onclick",function(){c.noCloneEvent=false});A.cloneNode(true).fireEvent("onclick")}d=O.createElement("input");d.value="t";d.setAttribute("type",
"radio");c.radioValue=d.value==="t";d.setAttribute("checked","checked");A.appendChild(d);g=O.createDocumentFragment();g.appendChild(A.lastChild);c.checkClone=g.cloneNode(true).cloneNode(true).lastChild.checked;c.appendChecked=d.checked;g.removeChild(d);g.appendChild(A);A.innerHTML="";if(a.getComputedStyle){d=O.createElement("div");d.style.width="0";d.style.marginRight="0";A.style.width="2px";A.appendChild(d);c.reliableMarginRight=(parseInt((a.getComputedStyle(d,null)||{marginRight:0}).marginRight,
10)||0)===0}if(A.attachEvent)for(t in{submit:1,change:1,focusin:1}){d="on"+t;y=d in A;if(!y){A.setAttribute(d,"return;");y=typeof A[d]==="function"}c[t+"Bubbles"]=y}g.removeChild(A);g=i=k=d=A=d=null;f(function(){var X,M,Z,U,ha=O.getElementsByTagName("body")[0];if(ha){X=O.createElement("div");X.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";ha.insertBefore(X,ha.firstChild);A=O.createElement("div");X.appendChild(A);A.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
o=A.getElementsByTagName("td");y=o[0].offsetHeight===0;o[0].style.display="";o[1].style.display="none";c.reliableHiddenOffsets=y&&o[0].offsetHeight===0;A.innerHTML="";A.style.width=A.style.paddingLeft="1px";f.boxModel=c.boxModel=A.offsetWidth===2;if(typeof A.style.zoom!=="undefined"){A.style.display="inline";A.style.zoom=1;c.inlineBlockNeedsLayout=A.offsetWidth===2;A.style.display="";A.innerHTML="<div style='width:4px;'></div>";c.shrinkWrapBlocks=A.offsetWidth!==2}A.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;";
A.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";M=A.firstChild;Z=M.firstChild;U={doesNotAddBorder:Z.offsetTop!==5,doesAddBorderForTableAndCells:M.nextSibling.firstChild.firstChild.offsetTop===5};Z.style.position="fixed";Z.style.top="20px";U.fixedPosition=
Z.offsetTop===20||Z.offsetTop===15;Z.style.position=Z.style.top="";M.style.overflow="hidden";M.style.position="relative";U.subtractsBorderForOverflowNotVisible=Z.offsetTop===-5;U.doesNotIncludeMarginInBodyOffset=ha.offsetTop!==1;ha.removeChild(X);A=null;f.extend(c,U)}});return c}();var cb=/^(?:\{.*\}|\[.*\])$/,Ja=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(c){c=
c.nodeType?f.cache[c[f.expando]]:c[f.expando];return!!c&&!l(c)},data:function(c,d,g,i){if(f.acceptData(c)){var k;k=f.expando;var o=typeof d==="string",t=c.nodeType,y=t?f.cache:c,A=t?c[k]:c[k]&&k,I=d==="events";if(!((!A||!y[A]||!I&&!i&&!y[A].data)&&o&&g===b)){if(!A)if(t)c[k]=A=++f.uuid;else A=k;if(!y[A]){y[A]={};if(!t)y[A].toJSON=f.noop}if(typeof d==="object"||typeof d==="function")if(i)y[A]=f.extend(y[A],d);else y[A].data=f.extend(y[A].data,d);k=c=y[A];if(!i){if(!c.data)c.data={};c=c.data}if(g!==
b)c[f.camelCase(d)]=g;if(I&&!c[d])return k.events;if(o){g=c[d];if(g==null)g=c[f.camelCase(d)]}else g=c;return g}}},removeData:function(c,d,g){if(f.acceptData(c)){var i,k,o,t=f.expando,y=c.nodeType,A=y?f.cache:c,I=y?c[t]:t;if(A[I]){if(d)if(i=g?A[I]:A[I].data){if(!f.isArray(d))if(d in i)d=[d];else{d=f.camelCase(d);d=d in i?[d]:d.split(" ")}k=0;for(o=d.length;k<o;k++)delete i[d[k]];if(!(g?l:f.isEmptyObject)(i))return}if(!g){delete A[I].data;if(!l(A[I]))return}if(f.support.deleteExpando||!A.setInterval)delete A[I];
else A[I]=null;if(y)if(f.support.deleteExpando)delete c[t];else if(c.removeAttribute)c.removeAttribute(t);else c[t]=null}}},_data:function(c,d,g){return f.data(c,d,g,true)},acceptData:function(c){if(c.nodeName){var d=f.noData[c.nodeName.toLowerCase()];if(d)return!(d===true||c.getAttribute("classid")!==d)}return true}});f.fn.extend({data:function(c,d){var g,i,k,o=null;if(typeof c==="undefined"){if(this.length){o=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){i=this[0].attributes;
for(var t=0,y=i.length;t<y;t++){k=i[t].name;if(k.indexOf("data-")===0){k=f.camelCase(k.substring(5));h(this[0],k,o[k])}}f._data(this[0],"parsedAttrs",true)}}return o}else if(typeof c==="object")return this.each(function(){f.data(this,c)});g=c.split(".");g[1]=g[1]?"."+g[1]:"";if(d===b){o=this.triggerHandler("getData"+g[1]+"!",[g[0]]);if(o===b&&this.length){o=f.data(this[0],c);o=h(this[0],c,o)}return o===b&&g[1]?this.data(g[0]):o}else return this.each(function(){var A=f(this),I=[g[0],d];A.triggerHandler("setData"+
g[1]+"!",I);f.data(this,c,d);A.triggerHandler("changeData"+g[1]+"!",I)})},removeData:function(c){return this.each(function(){f.removeData(this,c)})}});f.extend({_mark:function(c,d){if(c){d=(d||"fx")+"mark";f._data(c,d,(f._data(c,d)||0)+1)}},_unmark:function(c,d,g){if(c!==true){g=d;d=c;c=false}if(d){g=g||"fx";var i=g+"mark";if(c=c?0:(f._data(d,i)||1)-1)f._data(d,i,c);else{f.removeData(d,i,true);n(d,g,"mark")}}},queue:function(c,d,g){var i;if(c){d=(d||"fx")+"queue";i=f._data(c,d);if(g)if(!i||f.isArray(g))i=
f._data(c,d,f.makeArray(g));else i.push(g);return i||[]}},dequeue:function(c,d){d=d||"fx";var g=f.queue(c,d),i=g.shift(),k={};if(i==="inprogress")i=g.shift();if(i){d==="fx"&&g.unshift("inprogress");f._data(c,d+".run",k);i.call(c,function(){f.dequeue(c,d)},k)}if(!g.length){f.removeData(c,d+"queue "+d+".run",true);n(c,d,"queue")}}});f.fn.extend({queue:function(c,d){if(typeof c!=="string"){d=c;c="fx"}if(d===b)return f.queue(this[0],c);return this.each(function(){var g=f.queue(this,c,d);c==="fx"&&g[0]!==
"inprogress"&&f.dequeue(this,c)})},dequeue:function(c){return this.each(function(){f.dequeue(this,c)})},delay:function(c,d){c=f.fx?f.fx.speeds[c]||c:c;d=d||"fx";return this.queue(d,function(g,i){var k=setTimeout(g,c);i.stop=function(){clearTimeout(k)}})},clearQueue:function(c){return this.queue(c||"fx",[])},promise:function(c){function d(){--o||g.resolveWith(i,[i])}if(typeof c!=="string")c=b;c=c||"fx";var g=f.Deferred(),i=this,k=i.length,o=1,t=c+"defer",y=c+"queue";c=c+"mark";for(var A;k--;)if(A=
f.data(i[k],t,b,true)||(f.data(i[k],y,b,true)||f.data(i[k],c,b,true))&&f.data(i[k],t,f.Callbacks("once memory"),true)){o++;A.add(d)}d();return g.promise()}});var Na=/[\n\t\r]/g,Aa=/\s+/,ab=/\r/g,db=/^(?:button|input)$/i,ea=/^(?:button|input|object|select|textarea)$/i,G=/^a(?:rea)?$/i,P=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Y=f.support.getSetAttribute,ba,da,na;f.fn.extend({attr:function(c,d){return f.access(this,
c,d,true,f.attr)},removeAttr:function(c){return this.each(function(){f.removeAttr(this,c)})},prop:function(c,d){return f.access(this,c,d,true,f.prop)},removeProp:function(c){c=f.propFix[c]||c;return this.each(function(){try{this[c]=b;delete this[c]}catch(d){}})},addClass:function(c){var d,g,i,k,o,t,y;if(f.isFunction(c))return this.each(function(A){f(this).addClass(c.call(this,A,this.className))});if(c&&typeof c==="string"){d=c.split(Aa);g=0;for(i=this.length;g<i;g++){k=this[g];if(k.nodeType===1)if(!k.className&&
d.length===1)k.className=c;else{o=" "+k.className+" ";t=0;for(y=d.length;t<y;t++)~o.indexOf(" "+d[t]+" ")||(o+=d[t]+" ");k.className=f.trim(o)}}}return this},removeClass:function(c){var d,g,i,k,o,t,y;if(f.isFunction(c))return this.each(function(A){f(this).removeClass(c.call(this,A,this.className))});if(c&&typeof c==="string"||c===b){d=(c||"").split(Aa);g=0;for(i=this.length;g<i;g++){k=this[g];if(k.nodeType===1&&k.className)if(c){o=(" "+k.className+" ").replace(Na," ");t=0;for(y=d.length;t<y;t++)o=
o.replace(" "+d[t]+" "," ");k.className=f.trim(o)}else k.className=""}}return this},toggleClass:function(c,d){var g=typeof c,i=typeof d==="boolean";if(f.isFunction(c))return this.each(function(k){f(this).toggleClass(c.call(this,k,this.className,d),d)});return this.each(function(){if(g==="string")for(var k,o=0,t=f(this),y=d,A=c.split(Aa);k=A[o++];){y=i?y:!t.hasClass(k);t[y?"addClass":"removeClass"](k)}else if(g==="undefined"||g==="boolean"){this.className&&f._data(this,"__className__",this.className);
this.className=this.className||c===false?"":f._data(this,"__className__")||""}})},hasClass:function(c){c=" "+c+" ";for(var d=0,g=this.length;d<g;d++)if(this[d].nodeType===1&&(" "+this[d].className+" ").replace(Na," ").indexOf(c)>-1)return true;return false},val:function(c){var d,g,i,k=this[0];if(arguments.length){i=f.isFunction(c);return this.each(function(o){var t=f(this);if(this.nodeType===1){o=i?c.call(this,o,t.val()):c;if(o==null)o="";else if(typeof o==="number")o+="";else if(f.isArray(o))o=f.map(o,
function(y){return y==null?"":y+""});d=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!d||!("set"in d)||d.set(this,o,"value")===b)this.value=o}})}else if(k){if((d=f.valHooks[k.nodeName.toLowerCase()]||f.valHooks[k.type])&&"get"in d&&(g=d.get(k,"value"))!==b)return g;g=k.value;return typeof g==="string"?g.replace(ab,""):g==null?"":g}}});f.extend({valHooks:{option:{get:function(c){var d=c.attributes.value;return!d||d.specified?c.value:c.text}},select:{get:function(c){var d,g,i=c.selectedIndex,
k=[],o=c.options,t=c.type==="select-one";if(i<0)return null;c=t?i:0;for(g=t?i+1:o.length;c<g;c++){d=o[c];if(d.selected&&(f.support.optDisabled?!d.disabled:d.getAttribute("disabled")===null)&&(!d.parentNode.disabled||!f.nodeName(d.parentNode,"optgroup"))){d=f(d).val();if(t)return d;k.push(d)}}if(t&&!k.length&&o.length)return f(o[i]).val();return k},set:function(c,d){var g=f.makeArray(d);f(c).find("option").each(function(){this.selected=f.inArray(f(this).val(),g)>=0});if(!g.length)c.selectedIndex=-1;
return g}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(c,d,g,i){var k,o,t=c.nodeType;if(!(!c||t===3||t===8||t===2)){if(i&&d in f.attrFn)return f(c)[d](g);if(typeof c.getAttribute==="undefined")return f.prop(c,d,g);if(i=t!==1||!f.isXMLDoc(c)){d=d.toLowerCase();o=f.attrHooks[d]||(P.test(d)?da:ba)}if(g!==b)if(g===null)f.removeAttr(c,d);else if(o&&"set"in o&&i&&(k=o.set(c,g,d))!==b)return k;else{c.setAttribute(d,""+g);return g}else if(o&&
"get"in o&&i&&(k=o.get(c,d))!==null)return k;else{k=c.getAttribute(d);return k===null?b:k}}},removeAttr:function(c,d){var g,i,k,o,t=0;if(d&&c.nodeType===1){i=d.toLowerCase().split(Aa);for(o=i.length;t<o;t++)if(k=i[t]){g=f.propFix[k]||k;f.attr(c,k,"");c.removeAttribute(Y?k:g);if(P.test(k)&&g in c)c[g]=false}}},attrHooks:{type:{set:function(c,d){if(db.test(c.nodeName)&&c.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&d==="radio"&&f.nodeName(c,"input")){var g=c.value;
c.setAttribute("type",d);if(g)c.value=g;return d}}},value:{get:function(c,d){if(ba&&f.nodeName(c,"button"))return ba.get(c,d);return d in c?c.value:null},set:function(c,d,g){if(ba&&f.nodeName(c,"button"))return ba.set(c,d,g);c.value=d}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},
prop:function(c,d,g){var i,k,o=c.nodeType;if(!(!c||o===3||o===8||o===2)){if(o!==1||!f.isXMLDoc(c)){d=f.propFix[d]||d;k=f.propHooks[d]}return g!==b?k&&"set"in k&&(i=k.set(c,g,d))!==b?i:c[d]=g:k&&"get"in k&&(i=k.get(c,d))!==null?i:c[d]}},propHooks:{tabIndex:{get:function(c){var d=c.getAttributeNode("tabindex");return d&&d.specified?parseInt(d.value,10):ea.test(c.nodeName)||G.test(c.nodeName)&&c.href?0:b}}}});f.attrHooks.tabindex=f.propHooks.tabIndex;da={get:function(c,d){var g,i=f.prop(c,d);return i===
true||typeof i!=="boolean"&&(g=c.getAttributeNode(d))&&g.nodeValue!==false?d.toLowerCase():b},set:function(c,d,g){if(d===false)f.removeAttr(c,g);else{d=f.propFix[g]||g;if(d in c)c[d]=true;c.setAttribute(g,g.toLowerCase())}return g}};if(!Y){na={name:true,id:true};ba=f.valHooks.button={get:function(c,d){var g;return(g=c.getAttributeNode(d))&&(na[d]?g.nodeValue!=="":g.specified)?g.nodeValue:b},set:function(c,d,g){var i=c.getAttributeNode(g);if(!i){i=O.createAttribute(g);c.setAttributeNode(i)}return i.nodeValue=
d+""}};f.attrHooks.tabindex.set=ba.set;f.each(["width","height"],function(c,d){f.attrHooks[d]=f.extend(f.attrHooks[d],{set:function(g,i){if(i===""){g.setAttribute(d,"auto");return i}}})});f.attrHooks.contenteditable={get:ba.get,set:function(c,d,g){if(d==="")d="false";ba.set(c,d,g)}}}f.support.hrefNormalized||f.each(["href","src","width","height"],function(c,d){f.attrHooks[d]=f.extend(f.attrHooks[d],{get:function(g){g=g.getAttribute(d,2);return g===null?b:g}})});if(!f.support.style)f.attrHooks.style=
{get:function(c){return c.style.cssText.toLowerCase()||b},set:function(c,d){return c.style.cssText=""+d}};if(!f.support.optSelected)f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(){return null}});if(!f.support.enctype)f.propFix.enctype="encoding";f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(c){return c.getAttribute("value")===null?"on":c.value}}});f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(c,
d){if(f.isArray(d))return c.checked=f.inArray(f(c).val(),d)>=0}})});var ka=/^(?:textarea|input|select)$/i,ta=/^([^\.]*)?(?:\.(.+))?$/,ua=/\bhover(\.\S+)?\b/,Oa=/^key/,Ua=/^(?:mouse|contextmenu)|click/,Ea=/^(?:focusinfocus|focusoutblur)$/,Fa=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Va=function(c){if(c=Fa.exec(c)){c[1]=(c[1]||"").toLowerCase();c[3]=c[3]&&RegExp("(?:^|\\s)"+c[3]+"(?:\\s|$)")}return c},Pa=function(c){return f.event.special.hover?c:c.replace(ua,"mouseenter$1 mouseleave$1")};f.event={add:function(c,
d,g,i,k){var o,t,y,A,I,X,M,Z,U;if(!(c.nodeType===3||c.nodeType===8||!d||!g||!(o=f._data(c)))){if(g.handler){M=g;g=M.handler}if(!g.guid)g.guid=f.guid++;y=o.events;if(!y)o.events=y={};t=o.handle;if(!t){o.handle=t=function(ha){return typeof f!=="undefined"&&(!ha||f.event.triggered!==ha.type)?f.event.dispatch.apply(t.elem,arguments):b};t.elem=c}d=f.trim(Pa(d)).split(" ");for(o=0;o<d.length;o++){A=ta.exec(d[o])||[];I=A[1];X=(A[2]||"").split(".").sort();U=f.event.special[I]||{};I=(k?U.delegateType:U.bindType)||
I;U=f.event.special[I]||{};A=f.extend({type:I,origType:A[1],data:i,handler:g,guid:g.guid,selector:k,quick:Va(k),namespace:X.join(".")},M);Z=y[I];if(!Z){Z=y[I]=[];Z.delegateCount=0;if(!U.setup||U.setup.call(c,i,X,t)===false)if(c.addEventListener)c.addEventListener(I,t,false);else c.attachEvent&&c.attachEvent("on"+I,t)}if(U.add){U.add.call(c,A);if(!A.handler.guid)A.handler.guid=g.guid}k?Z.splice(Z.delegateCount++,0,A):Z.push(A);f.event.global[I]=true}c=null}},global:{},remove:function(c,d,g,i,k){var o=
f.hasData(c)&&f._data(c),t,y,A,I,X,M,Z,U,ha,oa;if(o&&(Z=o.events)){d=f.trim(Pa(d||"")).split(" ");for(t=0;t<d.length;t++){y=ta.exec(d[t])||[];A=I=y[1];y=y[2];if(A){U=f.event.special[A]||{};A=(i?U.delegateType:U.bindType)||A;ha=Z[A]||[];X=ha.length;y=y?RegExp("(^|\\.)"+y.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(M=0;M<ha.length;M++){oa=ha[M];if((k||I===oa.origType)&&(!g||g.guid===oa.guid)&&(!y||y.test(oa.namespace))&&(!i||i===oa.selector||i==="**"&&oa.selector)){ha.splice(M--,1);
oa.selector&&ha.delegateCount--;U.remove&&U.remove.call(c,oa)}}if(ha.length===0&&X!==ha.length){if(!U.teardown||U.teardown.call(c,y)===false)f.removeEvent(c,A,o.handle);delete Z[A]}}else for(A in Z)f.event.remove(c,A+d[t],g,i,true)}if(f.isEmptyObject(Z)){if(d=o.handle)d.elem=null;f.removeData(c,["events","handle"],true)}}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(c,d,g,i){if(!(g&&(g.nodeType===3||g.nodeType===8))){var k=c.type||c,o=[],t,y,A,I,X;if(!Ea.test(k+f.event.triggered)){if(k.indexOf("!")>=
0){k=k.slice(0,-1);t=true}if(k.indexOf(".")>=0){o=k.split(".");k=o.shift();o.sort()}if(!((!g||f.event.customEvent[k])&&!f.event.global[k])){c=typeof c==="object"?c[f.expando]?c:new f.Event(k,c):new f.Event(k);c.type=k;c.isTrigger=true;c.exclusive=t;c.namespace=o.join(".");c.namespace_re=c.namespace?RegExp("(^|\\.)"+o.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;t=k.indexOf(":")<0?"on"+k:"";if(g){c.result=b;if(!c.target)c.target=g;d=d!=null?f.makeArray(d):[];d.unshift(c);A=f.event.special[k]||{};if(!(A.trigger&&
A.trigger.apply(g,d)===false)){X=[[g,A.bindType||k]];if(!i&&!A.noBubble&&!f.isWindow(g)){I=A.delegateType||k;o=Ea.test(I+k)?g:g.parentNode;for(y=null;o;o=o.parentNode){X.push([o,I]);y=o}if(y&&y===g.ownerDocument)X.push([y.defaultView||y.parentWindow||a,I])}for(y=0;y<X.length&&!c.isPropagationStopped();y++){o=X[y][0];c.type=X[y][1];(I=(f._data(o,"events")||{})[c.type]&&f._data(o,"handle"))&&I.apply(o,d);(I=t&&o[t])&&f.acceptData(o)&&I.apply(o,d)===false&&c.preventDefault()}c.type=k;if(!i&&!c.isDefaultPrevented())if((!A._default||
A._default.apply(g.ownerDocument,d)===false)&&!(k==="click"&&f.nodeName(g,"a"))&&f.acceptData(g))if(t&&g[k]&&(k!=="focus"&&k!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(g)){if(y=g[t])g[t]=null;f.event.triggered=k;g[k]();f.event.triggered=b;if(y)g[t]=y}return c.result}}else{g=f.cache;for(y in g)g[y].events&&g[y].events[k]&&f.event.trigger(c,d,g[y].handle.elem,true)}}}}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],g=d.delegateCount,i=[].slice.call(arguments,
0),k=!c.exclusive&&!c.namespace,o=[],t,y,A,I,X,M,Z;i[0]=c;c.delegateTarget=this;if(g&&!c.target.disabled&&!(c.button&&c.type==="click")){A=f(this);A.context=this.ownerDocument||this;for(y=c.target;y!=this;y=y.parentNode||this){X={};M=[];A[0]=y;for(t=0;t<g;t++){I=d[t];Z=I.selector;if(X[Z]===b){var U=X,ha=Z,oa;if(I.quick){oa=I.quick;var ra=y.attributes||{};oa=(!oa[1]||y.nodeName.toLowerCase()===oa[1])&&(!oa[2]||(ra.id||{}).value===oa[2])&&(!oa[3]||oa[3].test((ra["class"]||{}).value))}else oa=A.is(Z);
U[ha]=oa}X[Z]&&M.push(I)}M.length&&o.push({elem:y,matches:M})}}d.length>g&&o.push({elem:this,matches:d.slice(g)});for(t=0;t<o.length&&!c.isPropagationStopped();t++){g=o[t];c.currentTarget=g.elem;for(d=0;d<g.matches.length&&!c.isImmediatePropagationStopped();d++){I=g.matches[d];if(k||!c.namespace&&!I.namespace||c.namespace_re&&c.namespace_re.test(I.namespace)){c.data=I.data;c.handleObj=I;I=((f.event.special[I.origType]||{}).handle||I.handler).apply(g.elem,i);if(I!==b){c.result=I;if(I===false){c.preventDefault();
c.stopPropagation()}}}}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(c,d){if(c.which==null)c.which=d.charCode!=null?d.charCode:d.keyCode;return c}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter:function(c,d){var g,i,k=d.button,o=d.fromElement;if(c.pageX==null&&d.clientX!=null){g=c.target.ownerDocument||O;i=g.documentElement;g=g.body;c.pageX=d.clientX+(i&&i.scrollLeft||g&&g.scrollLeft||0)-(i&&i.clientLeft||g&&g.clientLeft||0);c.pageY=d.clientY+(i&&i.scrollTop||g&&g.scrollTop||0)-(i&&i.clientTop||g&&g.clientTop||0)}if(!c.relatedTarget&&o)c.relatedTarget=o===c.target?d.toElement:o;if(!c.which&&k!==b)c.which=k&1?1:k&2?3:k&4?2:0;return c}},fix:function(c){if(c[f.expando])return c;var d,
g,i=c,k=f.event.fixHooks[c.type]||{},o=k.props?this.props.concat(k.props):this.props;c=f.Event(i);for(d=o.length;d;){g=o[--d];c[g]=i[g]}if(!c.target)c.target=i.srcElement||O;if(c.target.nodeType===3)c.target=c.target.parentNode;if(c.metaKey===b)c.metaKey=c.ctrlKey;return k.filter?k.filter(c,i):c},special:{ready:{setup:f.bindReady},load:{noBubble:true},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(c,d,g){if(f.isWindow(this))this.onbeforeunload=g},teardown:function(c,
d){if(this.onbeforeunload===d)this.onbeforeunload=null}}},simulate:function(c,d,g,i){c=f.extend(new f.Event,g,{type:c,isSimulated:true,originalEvent:{}});i?f.event.trigger(c,null,d):f.event.dispatch.call(d,c);c.isDefaultPrevented()&&g.preventDefault()}};f.event.handle=f.event.dispatch;f.removeEvent=O.removeEventListener?function(c,d,g){c.removeEventListener&&c.removeEventListener(d,g,false)}:function(c,d,g){c.detachEvent&&c.detachEvent("on"+d,g)};f.Event=function(c,d){if(!(this instanceof f.Event))return new f.Event(c,
d);if(c&&c.type){this.originalEvent=c;this.type=c.type;this.isDefaultPrevented=c.defaultPrevented||c.returnValue===false||c.getPreventDefault&&c.getPreventDefault()?m:j}else this.type=c;d&&f.extend(this,d);this.timeStamp=c&&c.timeStamp||f.now();this[f.expando]=true};f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=m;var c=this.originalEvent;if(c)if(c.preventDefault)c.preventDefault();else c.returnValue=false},stopPropagation:function(){this.isPropagationStopped=m;var c=this.originalEvent;
if(c){c.stopPropagation&&c.stopPropagation();c.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=m;this.stopPropagation()},isDefaultPrevented:j,isPropagationStopped:j,isImmediatePropagationStopped:j};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(c,d){f.event.special[c]={delegateType:d,bindType:d,handle:function(g){var i=g.relatedTarget,k=g.handleObj,o;if(!i||i!==this&&!f.contains(this,i)){g.type=k.origType;o=k.handler.apply(this,arguments);
g.type=d}return o}}});if(!f.support.submitBubbles)f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return false;f.event.add(this,"click._submit keypress._submit",function(c){c=c.target;if((c=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b)&&!c._submit_attached){f.event.add(c,"submit._submit",function(d){this.parentNode&&!d.isTrigger&&f.event.simulate("submit",this.parentNode,d,true)});c._submit_attached=true}})},teardown:function(){if(f.nodeName(this,"form"))return false;
f.event.remove(this,"._submit")}};if(!f.support.changeBubbles)f.event.special.change={setup:function(){if(ka.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){f.event.add(this,"propertychange._change",function(c){if(c.originalEvent.propertyName==="checked")this._just_changed=true});f.event.add(this,"click._change",function(c){if(this._just_changed&&!c.isTrigger){this._just_changed=false;f.event.simulate("change",this,c,true)}})}return false}f.event.add(this,"beforeactivate._change",
function(c){c=c.target;if(ka.test(c.nodeName)&&!c._change_attached){f.event.add(c,"change._change",function(d){this.parentNode&&!d.isSimulated&&!d.isTrigger&&f.event.simulate("change",this.parentNode,d,true)});c._change_attached=true}})},handle:function(c){var d=c.target;if(this!==d||c.isSimulated||c.isTrigger||d.type!=="radio"&&d.type!=="checkbox")return c.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return ka.test(this.nodeName)}};f.support.focusinBubbles||
f.each({focus:"focusin",blur:"focusout"},function(c,d){var g=0,i=function(k){f.event.simulate(d,k.target,f.event.fix(k),true)};f.event.special[d]={setup:function(){g++===0&&O.addEventListener(c,i,true)},teardown:function(){--g===0&&O.removeEventListener(c,i,true)}}});f.fn.extend({on:function(c,d,g,i,k){var o,t;if(typeof c==="object"){if(typeof d!=="string"){g=d;d=b}for(t in c)this.on(t,d,g,c[t],k);return this}if(g==null&&i==null){i=d;g=d=b}else if(i==null)if(typeof d==="string"){i=g;g=b}else{i=g;
g=d;d=b}if(i===false)i=j;else if(!i)return this;if(k===1){o=i;i=function(y){f().off(y);return o.apply(this,arguments)};i.guid=o.guid||(o.guid=f.guid++)}return this.each(function(){f.event.add(this,c,i,g,d)})},one:function(c,d,g,i){return this.on.call(this,c,d,g,i,1)},off:function(c,d,g){if(c&&c.preventDefault&&c.handleObj){var i=c.handleObj;f(c.delegateTarget).off(i.namespace?i.type+"."+i.namespace:i.type,i.selector,i.handler);return this}if(typeof c==="object"){for(i in c)this.off(i,d,c[i]);return this}if(d===
false||typeof d==="function"){g=d;d=b}if(g===false)g=j;return this.each(function(){f.event.remove(this,c,g,d)})},bind:function(c,d,g){return this.on(c,null,d,g)},unbind:function(c,d){return this.off(c,null,d)},live:function(c,d,g){f(this.context).on(c,this.selector,d,g);return this},die:function(c,d){f(this.context).off(c,this.selector||"**",d);return this},delegate:function(c,d,g,i){return this.on(d,c,g,i)},undelegate:function(c,d,g){return arguments.length==1?this.off(c,"**"):this.off(d,c,g)},trigger:function(c,
d){return this.each(function(){f.event.trigger(c,d,this)})},triggerHandler:function(c,d){if(this[0])return f.event.trigger(c,d,this[0],true)},toggle:function(c){var d=arguments,g=c.guid||f.guid++,i=0,k=function(o){var t=(f._data(this,"lastToggle"+c.guid)||0)%i;f._data(this,"lastToggle"+c.guid,t+1);o.preventDefault();return d[t].apply(this,arguments)||false};for(k.guid=g;i<d.length;)d[i++].guid=g;return this.click(k)},hover:function(c,d){return this.mouseenter(c).mouseleave(d||c)}});f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
function(c,d){f.fn[d]=function(g,i){if(i==null){i=g;g=null}return arguments.length>0?this.on(d,null,g,i):this.trigger(d)};if(f.attrFn)f.attrFn[d]=true;if(Oa.test(d))f.event.fixHooks[d]=f.event.keyHooks;if(Ua.test(d))f.event.fixHooks[d]=f.event.mouseHooks});(function(){function c(q,v,D,F,H,L){H=0;for(var aa=F.length;H<aa;H++){var V=F[H];if(V){var la=false;for(V=V[q];V;){if(V[i]===D){la=F[V.sizset];break}if(V.nodeType===1&&!L){V[i]=D;V.sizset=H}if(V.nodeName.toLowerCase()===v){la=V;break}V=V[q]}F[H]=
la}}}function d(q,v,D,F,H,L){H=0;for(var aa=F.length;H<aa;H++){var V=F[H];if(V){var la=false;for(V=V[q];V;){if(V[i]===D){la=F[V.sizset];break}if(V.nodeType===1){if(!L){V[i]=D;V.sizset=H}if(typeof v!=="string"){if(V===v){la=true;break}}else if(M.filter(v,[V]).length>0){la=V;break}}V=V[q]}F[H]=la}}}var g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),k=0,o=Object.prototype.toString,
t=false,y=true,A=/\\/g,I=/\r\n/g,X=/\W/;[0,0].sort(function(){y=false;return 0});var M=function(q,v,D,F){D=D||[];var H=v=v||O;if(v.nodeType!==1&&v.nodeType!==9)return[];if(!q||typeof q!=="string")return D;var L,aa,V,la,w,R=true,W=M.isXML(v),S=[],ga=q;do{g.exec("");if(L=g.exec(ga)){ga=L[3];S.push(L[1]);if(L[2]){la=L[3];break}}}while(L);if(S.length>1&&ha.exec(q))if(S.length===2&&U.relative[S[0]])aa=Ga(S[0]+S[1],v,F);else for(aa=U.relative[S[0]]?[v]:M(S.shift(),v);S.length;){q=S.shift();if(U.relative[q])q+=
S.shift();aa=Ga(q,aa,F)}else{if(!F&&S.length>1&&v.nodeType===9&&!W&&U.match.ID.test(S[0])&&!U.match.ID.test(S[S.length-1])){L=M.find(S.shift(),v,W);v=L.expr?M.filter(L.expr,L.set)[0]:L.set[0]}if(v){L=F?{expr:S.pop(),set:pa(F)}:M.find(S.pop(),S.length===1&&(S[0]==="~"||S[0]==="+")&&v.parentNode?v.parentNode:v,W);aa=L.expr?M.filter(L.expr,L.set):L.set;if(S.length>0)V=pa(aa);else R=false;for(;S.length;){L=w=S.pop();if(U.relative[w])L=S.pop();else w="";if(L==null)L=v;U.relative[w](V,L,W)}}else V=[]}V||
(V=aa);V||M.error(w||q);if(o.call(V)==="[object Array]")if(R)if(v&&v.nodeType===1)for(q=0;V[q]!=null;q++){if(V[q]&&(V[q]===true||V[q].nodeType===1&&M.contains(v,V[q])))D.push(aa[q])}else for(q=0;V[q]!=null;q++)V[q]&&V[q].nodeType===1&&D.push(aa[q]);else D.push.apply(D,V);else pa(V,D);if(la){M(la,H,D,F);M.uniqueSort(D)}return D};M.uniqueSort=function(q){if(Ca){t=y;q.sort(Ca);if(t)for(var v=1;v<q.length;v++)q[v]===q[v-1]&&q.splice(v--,1)}return q};M.matches=function(q,v){return M(q,null,null,v)};M.matchesSelector=
function(q,v){return M(v,null,null,[q]).length>0};M.find=function(q,v,D){var F,H,L,aa,V,la;if(!q)return[];H=0;for(L=U.order.length;H<L;H++){V=U.order[H];if(aa=U.leftMatch[V].exec(q)){la=aa[1];aa.splice(1,1);if(la.substr(la.length-1)!=="\\"){aa[1]=(aa[1]||"").replace(A,"");F=U.find[V](aa,v,D);if(F!=null){q=q.replace(U.match[V],"");break}}}}F||(F=typeof v.getElementsByTagName!=="undefined"?v.getElementsByTagName("*"):[]);return{set:F,expr:q}};M.filter=function(q,v,D,F){for(var H,L,aa,V,la,w,R,W,S=q,
ga=[],ca=v,qa=v&&v[0]&&M.isXML(v[0]);q&&v.length;){for(aa in U.filter)if((H=U.leftMatch[aa].exec(q))!=null&&H[2]){w=U.filter[aa];la=H[1];L=false;H.splice(1,1);if(la.substr(la.length-1)!=="\\"){if(ca===ga)ga=[];if(U.preFilter[aa])if(H=U.preFilter[aa](H,ca,D,ga,F,qa)){if(H===true)continue}else L=V=true;if(H)for(R=0;(la=ca[R])!=null;R++)if(la){V=w(la,H,R,ca);W=F^V;if(D&&V!=null)if(W)L=true;else ca[R]=false;else if(W){ga.push(la);L=true}}if(V!==b){D||(ca=ga);q=q.replace(U.match[aa],"");if(!L)return[];
break}}}if(q===S)if(L==null)M.error(q);else break;S=q}return ca};M.error=function(q){throw Error("Syntax error, unrecognized expression: "+q);};var Z=M.getText=function(q){var v,D;v=q.nodeType;var F="";if(v)if(v===1||v===9)if(typeof q.textContent==="string")return q.textContent;else if(typeof q.innerText==="string")return q.innerText.replace(I,"");else for(q=q.firstChild;q;q=q.nextSibling)F+=Z(q);else{if(v===3||v===4)return q.nodeValue}else for(v=0;D=q[v];v++)if(D.nodeType!==8)F+=Z(D);return F},U=
M.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(q){return q.getAttribute("href")},type:function(q){return q.getAttribute("type")}},relative:{"+":function(q,v){var D=typeof v==="string",F=D&&!X.test(v);D=D&&!F;if(F)v=v.toLowerCase();F=0;for(var H=q.length,L;F<H;F++)if(L=q[F]){for(;(L=L.previousSibling)&&L.nodeType!==1;);q[F]=D||L&&L.nodeName.toLowerCase()===v?L||false:L===v}D&&
M.filter(v,q,true)},">":function(q,v){var D,F=typeof v==="string",H=0,L=q.length;if(F&&!X.test(v))for(v=v.toLowerCase();H<L;H++){if(D=q[H]){D=D.parentNode;q[H]=D.nodeName.toLowerCase()===v?D:false}}else{for(;H<L;H++)if(D=q[H])q[H]=F?D.parentNode:D.parentNode===v;F&&M.filter(v,q,true)}},"":function(q,v,D){var F,H=k++,L=d;if(typeof v==="string"&&!X.test(v)){F=v=v.toLowerCase();L=c}L("parentNode",v,H,q,F,D)},"~":function(q,v,D){var F,H=k++,L=d;if(typeof v==="string"&&!X.test(v)){F=v=v.toLowerCase();
L=c}L("previousSibling",v,H,q,F,D)}},find:{ID:function(q,v,D){if(typeof v.getElementById!=="undefined"&&!D)return(q=v.getElementById(q[1]))&&q.parentNode?[q]:[]},NAME:function(q,v){if(typeof v.getElementsByName!=="undefined"){for(var D=[],F=v.getElementsByName(q[1]),H=0,L=F.length;H<L;H++)F[H].getAttribute("name")===q[1]&&D.push(F[H]);return D.length===0?null:D}},TAG:function(q,v){if(typeof v.getElementsByTagName!=="undefined")return v.getElementsByTagName(q[1])}},preFilter:{CLASS:function(q,v,D,
F,H,L){q=" "+q[1].replace(A,"")+" ";if(L)return q;L=0;for(var aa;(aa=v[L])!=null;L++)if(aa)if(H^(aa.className&&(" "+aa.className+" ").replace(/[\t\n\r]/g," ").indexOf(q)>=0))D||F.push(aa);else if(D)v[L]=false;return false},ID:function(q){return q[1].replace(A,"")},TAG:function(q){return q[1].replace(A,"").toLowerCase()},CHILD:function(q){if(q[1]==="nth"){q[2]||M.error(q[0]);q[2]=q[2].replace(/^\+|\s*/g,"");var v=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(q[2]==="even"&&"2n"||q[2]==="odd"&&"2n+1"||!/\D/.test(q[2])&&
"0n+"+q[2]||q[2]);q[2]=v[1]+(v[2]||1)-0;q[3]=v[3]-0}else q[2]&&M.error(q[0]);q[0]=k++;return q},ATTR:function(q,v,D,F,H,L){v=q[1]=q[1].replace(A,"");if(!L&&U.attrMap[v])q[1]=U.attrMap[v];q[4]=(q[4]||q[5]||"").replace(A,"");if(q[2]==="~=")q[4]=" "+q[4]+" ";return q},PSEUDO:function(q,v,D,F,H){if(q[1]==="not")if((g.exec(q[3])||"").length>1||/^\w/.test(q[3]))q[3]=M(q[3],null,null,v);else{q=M.filter(q[3],v,D,true^H);D||F.push.apply(F,q);return false}else if(U.match.POS.test(q[0])||U.match.CHILD.test(q[0]))return true;
return q},POS:function(q){q.unshift(true);return q}},filters:{enabled:function(q){return q.disabled===false&&q.type!=="hidden"},disabled:function(q){return q.disabled===true},checked:function(q){return q.checked===true},selected:function(q){return q.selected===true},parent:function(q){return!!q.firstChild},empty:function(q){return!q.firstChild},has:function(q,v,D){return!!M(D[3],q).length},header:function(q){return/h\d/i.test(q.nodeName)},text:function(q){var v=q.getAttribute("type"),D=q.type;return q.nodeName.toLowerCase()===
"input"&&"text"===D&&(v===D||v===null)},radio:function(q){return q.nodeName.toLowerCase()==="input"&&"radio"===q.type},checkbox:function(q){return q.nodeName.toLowerCase()==="input"&&"checkbox"===q.type},file:function(q){return q.nodeName.toLowerCase()==="input"&&"file"===q.type},password:function(q){return q.nodeName.toLowerCase()==="input"&&"password"===q.type},submit:function(q){var v=q.nodeName.toLowerCase();return(v==="input"||v==="button")&&"submit"===q.type},image:function(q){return q.nodeName.toLowerCase()===
"input"&&"image"===q.type},reset:function(q){var v=q.nodeName.toLowerCase();return(v==="input"||v==="button")&&"reset"===q.type},button:function(q){var v=q.nodeName.toLowerCase();return v==="input"&&"button"===q.type||v==="button"},input:function(q){return/input|select|textarea|button/i.test(q.nodeName)},focus:function(q){return q===q.ownerDocument.activeElement}},setFilters:{first:function(q,v){return v===0},last:function(q,v,D,F){return v===F.length-1},even:function(q,v){return v%2===0},odd:function(q,
v){return v%2===1},lt:function(q,v,D){return v<D[3]-0},gt:function(q,v,D){return v>D[3]-0},nth:function(q,v,D){return D[3]-0===v},eq:function(q,v,D){return D[3]-0===v}},filter:{PSEUDO:function(q,v,D,F){var H=v[1],L=U.filters[H];if(L)return L(q,D,v,F);else if(H==="contains")return(q.textContent||q.innerText||Z([q])||"").indexOf(v[3])>=0;else if(H==="not"){v=v[3];D=0;for(F=v.length;D<F;D++)if(v[D]===q)return false;return true}else M.error(H)},CHILD:function(q,v){var D,F,H,L,aa,V;D=v[1];V=q;switch(D){case "only":case "first":for(;V=
V.previousSibling;)if(V.nodeType===1)return false;if(D==="first")return true;V=q;case "last":for(;V=V.nextSibling;)if(V.nodeType===1)return false;return true;case "nth":D=v[2];F=v[3];if(D===1&&F===0)return true;H=v[0];if((L=q.parentNode)&&(L[i]!==H||!q.nodeIndex)){aa=0;for(V=L.firstChild;V;V=V.nextSibling)if(V.nodeType===1)V.nodeIndex=++aa;L[i]=H}V=q.nodeIndex-F;return D===0?V===0:V%D===0&&V/D>=0}},ID:function(q,v){return q.nodeType===1&&q.getAttribute("id")===v},TAG:function(q,v){return v==="*"&&
q.nodeType===1||!!q.nodeName&&q.nodeName.toLowerCase()===v},CLASS:function(q,v){return(" "+(q.className||q.getAttribute("class"))+" ").indexOf(v)>-1},ATTR:function(q,v){var D=v[1];D=M.attr?M.attr(q,D):U.attrHandle[D]?U.attrHandle[D](q):q[D]!=null?q[D]:q.getAttribute(D);var F=D+"",H=v[2],L=v[4];return D==null?H==="!=":!H&&M.attr?D!=null:H==="="?F===L:H==="*="?F.indexOf(L)>=0:H==="~="?(" "+F+" ").indexOf(L)>=0:!L?F&&D!==false:H==="!="?F!==L:H==="^="?F.indexOf(L)===0:H==="$="?F.substr(F.length-L.length)===
L:H==="|="?F===L||F.substr(0,L.length+1)===L+"-":false},POS:function(q,v,D,F){var H=U.setFilters[v[2]];if(H)return H(q,D,v,F)}}},ha=U.match.POS,oa=function(q,v){return"\\"+(v-0+1)},ra;for(ra in U.match){U.match[ra]=RegExp(U.match[ra].source+/(?![^\[]*\])(?![^\(]*\))/.source);U.leftMatch[ra]=RegExp(/(^(?:.|\r|\n)*?)/.source+U.match[ra].source.replace(/\\(\d+)/g,oa))}var pa=function(q,v){q=Array.prototype.slice.call(q,0);if(v){v.push.apply(v,q);return v}return q};try{Array.prototype.slice.call(O.documentElement.childNodes,
0)}catch(Ka){pa=function(q,v){var D=0,F=v||[];if(o.call(q)==="[object Array]")Array.prototype.push.apply(F,q);else if(typeof q.length==="number")for(var H=q.length;D<H;D++)F.push(q[D]);else for(;q[D];D++)F.push(q[D]);return F}}var Ca,ja;if(O.documentElement.compareDocumentPosition)Ca=function(q,v){if(q===v){t=true;return 0}if(!q.compareDocumentPosition||!v.compareDocumentPosition)return q.compareDocumentPosition?-1:1;return q.compareDocumentPosition(v)&4?-1:1};else{Ca=function(q,v){if(q===v){t=true;
return 0}else if(q.sourceIndex&&v.sourceIndex)return q.sourceIndex-v.sourceIndex;var D,F,H=[],L=[];D=q.parentNode;F=v.parentNode;var aa=D;if(D===F)return ja(q,v);else if(D){if(!F)return 1}else return-1;for(;aa;){H.unshift(aa);aa=aa.parentNode}for(aa=F;aa;){L.unshift(aa);aa=aa.parentNode}D=H.length;F=L.length;for(aa=0;aa<D&&aa<F;aa++)if(H[aa]!==L[aa])return ja(H[aa],L[aa]);return aa===D?ja(q,L[aa],-1):ja(H[aa],v,1)};ja=function(q,v,D){if(q===v)return D;for(q=q.nextSibling;q;){if(q===v)return-1;q=q.nextSibling}return 1}}(function(){var q=
O.createElement("div"),v="script"+(new Date).getTime(),D=O.documentElement;q.innerHTML="<a name='"+v+"'/>";D.insertBefore(q,D.firstChild);if(O.getElementById(v)){U.find.ID=function(F,H,L){if(typeof H.getElementById!=="undefined"&&!L)return(H=H.getElementById(F[1]))?H.id===F[1]||typeof H.getAttributeNode!=="undefined"&&H.getAttributeNode("id").nodeValue===F[1]?[H]:b:[]};U.filter.ID=function(F,H){var L=typeof F.getAttributeNode!=="undefined"&&F.getAttributeNode("id");return F.nodeType===1&&L&&L.nodeValue===
H}}D.removeChild(q);D=q=null})();(function(){var q=O.createElement("div");q.appendChild(O.createComment(""));if(q.getElementsByTagName("*").length>0)U.find.TAG=function(v,D){var F=D.getElementsByTagName(v[1]);if(v[1]==="*"){for(var H=[],L=0;F[L];L++)F[L].nodeType===1&&H.push(F[L]);F=H}return F};q.innerHTML="<a href='#'></a>";if(q.firstChild&&typeof q.firstChild.getAttribute!=="undefined"&&q.firstChild.getAttribute("href")!=="#")U.attrHandle.href=function(v){return v.getAttribute("href",2)};q=null})();
O.querySelectorAll&&function(){var q=M,v=O.createElement("div");v.innerHTML="<p class='TEST'></p>";if(!(v.querySelectorAll&&v.querySelectorAll(".TEST").length===0)){M=function(F,H,L,aa){H=H||O;if(!aa&&!M.isXML(H)){var V=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(F);if(V&&(H.nodeType===1||H.nodeType===9))if(V[1])return pa(H.getElementsByTagName(F),L);else if(V[2]&&U.find.CLASS&&H.getElementsByClassName)return pa(H.getElementsByClassName(V[2]),L);if(H.nodeType===9){if(F==="body"&&H.body)return pa([H.body],
L);else if(V&&V[3]){var la=H.getElementById(V[3]);if(la&&la.parentNode){if(la.id===V[3])return pa([la],L)}else return pa([],L)}try{return pa(H.querySelectorAll(F),L)}catch(w){}}else if(H.nodeType===1&&H.nodeName.toLowerCase()!=="object"){V=H;var R=(la=H.getAttribute("id"))||"__sizzle__",W=H.parentNode,S=/^\s*[+~]/.test(F);if(la)R=R.replace(/'/g,"\\$&");else H.setAttribute("id",R);if(S&&W)H=H.parentNode;try{if(!S||W)return pa(H.querySelectorAll("[id='"+R+"'] "+F),L)}catch(ga){}finally{la||V.removeAttribute("id")}}}return q(F,
H,L,aa)};for(var D in q)M[D]=q[D];v=null}}();(function(){var q=O.documentElement,v=q.matchesSelector||q.mozMatchesSelector||q.webkitMatchesSelector||q.msMatchesSelector;if(v){var D=!v.call(O.createElement("div"),"div"),F=false;try{v.call(O.documentElement,"[test!='']:sizzle")}catch(H){F=true}M.matchesSelector=function(L,aa){aa=aa.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!M.isXML(L))try{if(F||!U.match.PSEUDO.test(aa)&&!/!=/.test(aa)){var V=v.call(L,aa);if(V||!D||L.document&&L.document.nodeType!==
11)return V}}catch(la){}return M(aa,null,null,[L]).length>0}}})();(function(){var q=O.createElement("div");q.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!q.getElementsByClassName||q.getElementsByClassName("e").length===0)){q.lastChild.className="e";if(q.getElementsByClassName("e").length!==1){U.order.splice(1,0,"CLASS");U.find.CLASS=function(v,D,F){if(typeof D.getElementsByClassName!=="undefined"&&!F)return D.getElementsByClassName(v[1])};q=null}}})();M.contains=O.documentElement.contains?
function(q,v){return q!==v&&(q.contains?q.contains(v):true)}:O.documentElement.compareDocumentPosition?function(q,v){return!!(q.compareDocumentPosition(v)&16)}:function(){return false};M.isXML=function(q){return(q=(q?q.ownerDocument||q:0).documentElement)?q.nodeName!=="HTML":false};var Ga=function(q,v,D){var F,H=[],L="";for(v=v.nodeType?[v]:v;F=U.match.PSEUDO.exec(q);){L+=F[0];q=q.replace(U.match.PSEUDO,"")}q=U.relative[q]?q+"*":q;F=0;for(var aa=v.length;F<aa;F++)M(q,v[F],H,D);return M.filter(L,H)};
M.attr=f.attr;M.selectors.attrMap={};f.find=M;f.expr=M.selectors;f.expr[":"]=f.expr.filters;f.unique=M.uniqueSort;f.text=M.getText;f.isXMLDoc=M.isXML;f.contains=M.contains})();var Nb=/Until$/,Ob=/^(?:parents|prevUntil|prevAll)/,Pb=/,/,Ib=/^.[^:#\[\.,]*$/,Qb=Array.prototype.slice,sb=f.expr.match.POS,Rb={children:true,contents:true,next:true,prev:true};f.fn.extend({find:function(c){var d=this,g,i;if(typeof c!=="string")return f(c).filter(function(){g=0;for(i=d.length;g<i;g++)if(f.contains(d[g],this))return true});
var k=this.pushStack("","find",c),o,t,y;g=0;for(i=this.length;g<i;g++){o=k.length;f.find(c,this[g],k);if(g>0)for(t=o;t<k.length;t++)for(y=0;y<o;y++)if(k[y]===k[t]){k.splice(t--,1);break}}return k},has:function(c){var d=f(c);return this.filter(function(){for(var g=0,i=d.length;g<i;g++)if(f.contains(this,d[g]))return true})},not:function(c){return this.pushStack(p(this,c,false),"not",c)},filter:function(c){return this.pushStack(p(this,c,true),"filter",c)},is:function(c){return!!c&&(typeof c==="string"?
sb.test(c)?f(c,this.context).index(this[0])>=0:f.filter(c,this).length>0:this.filter(c).length>0)},closest:function(c,d){var g=[],i,k,o=this[0];if(f.isArray(c)){for(k=1;o&&o.ownerDocument&&o!==d;){for(i=0;i<c.length;i++)f(o).is(c[i])&&g.push({selector:c[i],elem:o,level:k});o=o.parentNode;k++}return g}var t=sb.test(c)||typeof c!=="string"?f(c,d||this.context):0;i=0;for(k=this.length;i<k;i++)for(o=this[i];o;)if(t?t.index(o)>-1:f.find.matchesSelector(o,c)){g.push(o);break}else{o=o.parentNode;if(!o||
!o.ownerDocument||o===d||o.nodeType===11)break}g=g.length>1?f.unique(g):g;return this.pushStack(g,"closest",c)},index:function(c){if(!c)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof c==="string")return f.inArray(this[0],f(c));return f.inArray(c.jquery?c[0]:c,this)},add:function(c,d){var g=typeof c==="string"?f(c,d):f.makeArray(c&&c.nodeType?[c]:c),i=f.merge(this.get(),g);return this.pushStack(!g[0]||!g[0].parentNode||g[0].parentNode.nodeType===11||!i[0]||!i[0].parentNode||
i[0].parentNode.nodeType===11?i:f.unique(i))},andSelf:function(){return this.add(this.prevObject)}});f.each({parent:function(c){return(c=c.parentNode)&&c.nodeType!==11?c:null},parents:function(c){return f.dir(c,"parentNode")},parentsUntil:function(c,d,g){return f.dir(c,"parentNode",g)},next:function(c){return f.nth(c,2,"nextSibling")},prev:function(c){return f.nth(c,2,"previousSibling")},nextAll:function(c){return f.dir(c,"nextSibling")},prevAll:function(c){return f.dir(c,"previousSibling")},nextUntil:function(c,
d,g){return f.dir(c,"nextSibling",g)},prevUntil:function(c,d,g){return f.dir(c,"previousSibling",g)},siblings:function(c){return f.sibling(c.parentNode.firstChild,c)},children:function(c){return f.sibling(c.firstChild)},contents:function(c){return f.nodeName(c,"iframe")?c.contentDocument||c.contentWindow.document:f.makeArray(c.childNodes)}},function(c,d){f.fn[c]=function(g,i){var k=f.map(this,d,g);Nb.test(c)||(i=g);if(i&&typeof i==="string")k=f.filter(i,k);k=this.length>1&&!Rb[c]?f.unique(k):k;if((this.length>
1||Pb.test(i))&&Ob.test(c))k=k.reverse();return this.pushStack(k,c,Qb.call(arguments).join(","))}});f.extend({filter:function(c,d,g){if(g)c=":not("+c+")";return d.length===1?f.find.matchesSelector(d[0],c)?[d[0]]:[]:f.find.matches(c,d)},dir:function(c,d,g){var i=[];for(c=c[d];c&&c.nodeType!==9&&(g===b||c.nodeType!==1||!f(c).is(g));){c.nodeType===1&&i.push(c);c=c[d]}return i},nth:function(c,d,g){d=d||1;for(var i=0;c;c=c[g])if(c.nodeType===1&&++i===d)break;return c},sibling:function(c,d){for(var g=[];c;c=
c.nextSibling)c.nodeType===1&&c!==d&&g.push(c);return g}});var pb="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Sb=/ jQuery\d+="(?:\d+|null)"/g,lb=/^\s+/,tb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ub=/<([\w:]+)/,Tb=/<tbody/i,Ub=/<|&#?\w+;/,Vb=/<(?:script|style)/i,Wb=/<(?:script|object|embed|option|style)/i,vb=RegExp("<(?:"+pb+")","i"),wb=/checked\s*(?:[^=]|=\s*.checked.)/i,
Xb=/\/(java|ecma)script/i,Jb=/^\s*<!(?:\[CDATA\[|\-\-)/,Da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},xb=s(O);Da.optgroup=Da.option;Da.tbody=Da.tfoot=Da.colgroup=Da.caption=Da.thead;Da.th=Da.td;if(!f.support.htmlSerialize)Da._default=
[1,"div<div>","</div>"];f.fn.extend({text:function(c){if(f.isFunction(c))return this.each(function(d){var g=f(this);g.text(c.call(this,d,g.text()))});if(typeof c!=="object"&&c!==b)return this.empty().append((this[0]&&this[0].ownerDocument||O).createTextNode(c));return f.text(this)},wrapAll:function(c){if(f.isFunction(c))return this.each(function(g){f(this).wrapAll(c.call(this,g))});if(this[0]){var d=f(c,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&d.insertBefore(this[0]);d.map(function(){for(var g=
this;g.firstChild&&g.firstChild.nodeType===1;)g=g.firstChild;return g}).append(this)}return this},wrapInner:function(c){if(f.isFunction(c))return this.each(function(d){f(this).wrapInner(c.call(this,d))});return this.each(function(){var d=f(this),g=d.contents();g.length?g.wrapAll(c):d.append(c)})},wrap:function(c){var d=f.isFunction(c);return this.each(function(g){f(this).wrapAll(d?c.call(this,g):c)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},
append:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.appendChild(c)})},prepend:function(){return this.domManip(arguments,true,function(c){this.nodeType===1&&this.insertBefore(c,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(d){this.parentNode.insertBefore(d,this)});else if(arguments.length){var c=f.clean(arguments);c.push.apply(c,this.toArray());return this.pushStack(c,"before",arguments)}},after:function(){if(this[0]&&
this[0].parentNode)return this.domManip(arguments,false,function(d){this.parentNode.insertBefore(d,this.nextSibling)});else if(arguments.length){var c=this.pushStack(this,"after",arguments);c.push.apply(c,f.clean(arguments));return c}},remove:function(c,d){for(var g=0,i;(i=this[g])!=null;g++)if(!c||f.filter(c,[i]).length){if(!d&&i.nodeType===1){f.cleanData(i.getElementsByTagName("*"));f.cleanData([i])}i.parentNode&&i.parentNode.removeChild(i)}return this},empty:function(){for(var c=0,d;(d=this[c])!=
null;c++)for(d.nodeType===1&&f.cleanData(d.getElementsByTagName("*"));d.firstChild;)d.removeChild(d.firstChild);return this},clone:function(c,d){c=c==null?false:c;d=d==null?c:d;return this.map(function(){return f.clone(this,c,d)})},html:function(c){if(c===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Sb,""):null;else if(typeof c==="string"&&!Vb.test(c)&&(f.support.leadingWhitespace||!lb.test(c))&&!Da[(ub.exec(c)||["",""])[1].toLowerCase()]){c=c.replace(tb,"<$1></$2>");try{for(var d=
0,g=this.length;d<g;d++)if(this[d].nodeType===1){f.cleanData(this[d].getElementsByTagName("*"));this[d].innerHTML=c}}catch(i){this.empty().append(c)}}else f.isFunction(c)?this.each(function(k){var o=f(this);o.html(c.call(this,k,o.html()))}):this.empty().append(c);return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(f.isFunction(c))return this.each(function(d){var g=f(this),i=g.html();g.replaceWith(c.call(this,d,i))});if(typeof c!=="string")c=f(c).detach();return this.each(function(){var d=
this.nextSibling,g=this.parentNode;f(this).remove();d?f(d).before(c):f(g).append(c)})}else return this.length?this.pushStack(f(f.isFunction(c)?c():c),"replaceWith",c):this},detach:function(c){return this.remove(c,true)},domManip:function(c,d,g){var i,k,o,t=c[0],y=[];if(!f.support.checkClone&&arguments.length===3&&typeof t==="string"&&wb.test(t))return this.each(function(){f(this).domManip(c,d,g,true)});if(f.isFunction(t))return this.each(function(X){var M=f(this);c[0]=t.call(this,X,d?M.html():b);
M.domManip(c,d,g)});if(this[0]){i=t&&t.parentNode;i=f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?{fragment:i}:f.buildFragment(c,this,y);o=i.fragment;if(k=o.childNodes.length===1?o=o.firstChild:o.firstChild){d=d&&f.nodeName(k,"tr");k=0;for(var A=this.length,I=A-1;k<A;k++)g.call(d?f.nodeName(this[k],"table")?this[k].getElementsByTagName("tbody")[0]||this[k].appendChild(this[k].ownerDocument.createElement("tbody")):this[k]:this[k],i.cacheable||A>1&&k<I?f.clone(o,true,true):
o)}y.length&&f.each(y,za)}return this}});f.buildFragment=function(c,d,g){var i,k,o,t,y=c[0];if(d&&d[0])t=d[0].ownerDocument||d[0];t.createDocumentFragment||(t=O);if(c.length===1&&typeof y==="string"&&y.length<512&&t===O&&y.charAt(0)==="<"&&!Wb.test(y)&&(f.support.checkClone||!wb.test(y))&&(f.support.html5Clone||!vb.test(y))){k=true;if((o=f.fragments[y])&&o!==1)i=o}if(!i){i=t.createDocumentFragment();f.clean(c,t,i,g)}if(k)f.fragments[y]=o?i:1;return{fragment:i,cacheable:k}};f.fragments={};f.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,d){f.fn[c]=function(g){var i=[];g=f(g);var k=this.length===1&&this[0].parentNode;if(k&&k.nodeType===11&&k.childNodes.length===1&&g.length===1){g[d](this[0]);return this}else{k=0;for(var o=g.length;k<o;k++){var t=(k>0?this.clone(true):this).get();f(g[k])[d](t);i=i.concat(t)}return this.pushStack(i,c,g.selector)}}});f.extend({clone:function(c,d,g){var i,k,o;if(f.support.html5Clone||!vb.test("<"+c.nodeName))i=
c.cloneNode(true);else{i=O.createElement("div");xb.appendChild(i);i.innerHTML=c.outerHTML;i=i.firstChild}var t=i;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(c.nodeType===1||c.nodeType===11)&&!f.isXMLDoc(c)){T(c,t);i=ia(c);k=ia(t);for(o=0;i[o];++o)k[o]&&T(i[o],k[o])}if(d){C(c,t);if(g){i=ia(c);k=ia(t);for(o=0;i[o];++o)C(i[o],k[o])}}return t},clean:function(c,d,g,i){d=d||O;if(typeof d.createElement==="undefined")d=d.ownerDocument||d[0]&&d[0].ownerDocument||O;for(var k=[],o,t=0,y;(y=c[t])!=
null;t++){if(typeof y==="number")y+="";if(y){if(typeof y==="string")if(Ub.test(y)){y=y.replace(tb,"<$1></$2>");o=(ub.exec(y)||["",""])[1].toLowerCase();var A=Da[o]||Da._default,I=A[0],X=d.createElement("div");d===O?xb.appendChild(X):s(d).appendChild(X);for(X.innerHTML=A[1]+y+A[2];I--;)X=X.lastChild;if(!f.support.tbody){I=Tb.test(y);A=o==="table"&&!I?X.firstChild&&X.firstChild.childNodes:A[1]==="<table>"&&!I?X.childNodes:[];for(o=A.length-1;o>=0;--o)f.nodeName(A[o],"tbody")&&!A[o].childNodes.length&&
A[o].parentNode.removeChild(A[o])}!f.support.leadingWhitespace&&lb.test(y)&&X.insertBefore(d.createTextNode(lb.exec(y)[0]),X.firstChild);y=X.childNodes}else y=d.createTextNode(y);var M;if(!f.support.appendChecked)if(y[0]&&typeof(M=y.length)==="number")for(o=0;o<M;o++)ya(y[o]);else ya(y);if(y.nodeType)k.push(y);else k=f.merge(k,y)}}if(g){c=function(Z){return!Z.type||Xb.test(Z.type)};for(t=0;k[t];t++)if(i&&f.nodeName(k[t],"script")&&(!k[t].type||k[t].type.toLowerCase()==="text/javascript"))i.push(k[t].parentNode?
k[t].parentNode.removeChild(k[t]):k[t]);else{if(k[t].nodeType===1){d=f.grep(k[t].getElementsByTagName("script"),c);k.splice.apply(k,[t+1,0].concat(d))}g.appendChild(k[t])}}return k},cleanData:function(c){for(var d,g,i=f.cache,k=f.event.special,o=f.support.deleteExpando,t=0,y;(y=c[t])!=null;t++)if(!(y.nodeName&&f.noData[y.nodeName.toLowerCase()]))if(g=y[f.expando]){if((d=i[g])&&d.events){for(var A in d.events)k[A]?f.event.remove(y,A):f.removeEvent(y,A,d.handle);if(d.handle)d.handle.elem=null}if(o)delete y[f.expando];
else y.removeAttribute&&y.removeAttribute(f.expando);delete i[g]}}});var mb=/alpha\([^)]*\)/i,Yb=/opacity=([^)]*)/,Zb=/([A-Z]|^ms)/g,yb=/^-?\d+(?:px)?$/i,$b=/^-?\d/,ac=/^([\-+])=([\-+.\de]+)/,bc={position:"absolute",visibility:"hidden",display:"block"},Kb=["Left","Right"],Lb=["Top","Bottom"],Wa,zb,Ab;f.fn.css=function(c,d){if(arguments.length===2&&d===b)return this;return f.access(this,c,d,true,function(g,i,k){return k!==b?f.style(g,i,k):f.css(g,i)})};f.extend({cssHooks:{opacity:{get:function(c,d){if(d){var g=
Wa(c,"opacity","opacity");return g===""?"1":g}else return c.style.opacity}}},cssNumber:{fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(c,d,g,i){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var k,o=f.camelCase(d),t=c.style,y=f.cssHooks[o];d=f.cssProps[o]||o;if(g!==b){i=typeof g;if(i==="string"&&(k=ac.exec(g))){g=+(k[1]+1)*+k[2]+parseFloat(f.css(c,d));i=
"number"}if(!(g==null||i==="number"&&isNaN(g))){if(i==="number"&&!f.cssNumber[o])g+="px";if(!y||!("set"in y)||(g=y.set(c,g))!==b)try{t[d]=g}catch(A){}}}else{if(y&&"get"in y&&(k=y.get(c,false,i))!==b)return k;return t[d]}}},css:function(c,d,g){var i,k;d=f.camelCase(d);k=f.cssHooks[d];d=f.cssProps[d]||d;if(d==="cssFloat")d="float";if(k&&"get"in k&&(i=k.get(c,true,g))!==b)return i;else if(Wa)return Wa(c,d)},swap:function(c,d,g){var i={},k;for(k in d){i[k]=c.style[k];c.style[k]=d[k]}g.call(c);for(k in d)c.style[k]=
i[k]}});f.curCSS=f.css;f.each(["height","width"],function(c,d){f.cssHooks[d]={get:function(g,i,k){var o;if(i){if(g.offsetWidth!==0)return xa(g,d,k);else f.swap(g,bc,function(){o=xa(g,d,k)});return o}},set:function(g,i){if(yb.test(i)){i=parseFloat(i);if(i>=0)return i+"px"}else return i}}});if(!f.support.opacity)f.cssHooks.opacity={get:function(c,d){return Yb.test((d&&c.currentStyle?c.currentStyle.filter:c.style.filter)||"")?parseFloat(RegExp.$1)/100+"":d?"1":""},set:function(c,d){var g=c.style,i=c.currentStyle,
k=f.isNumeric(d)?"alpha(opacity="+d*100+")":"",o=i&&i.filter||g.filter||"";g.zoom=1;if(d>=1&&f.trim(o.replace(mb,""))===""){g.removeAttribute("filter");if(i&&!i.filter)return}g.filter=mb.test(o)?o.replace(mb,k):o+" "+k}};f(function(){if(!f.support.reliableMarginRight)f.cssHooks.marginRight={get:function(c,d){var g;f.swap(c,{display:"inline-block"},function(){g=d?Wa(c,"margin-right","marginRight"):c.style.marginRight});return g}}});if(O.defaultView&&O.defaultView.getComputedStyle)zb=function(c,d){var g,
i,k;d=d.replace(Zb,"-$1").toLowerCase();if((i=c.ownerDocument.defaultView)&&(k=i.getComputedStyle(c,null))){g=k.getPropertyValue(d);if(g===""&&!f.contains(c.ownerDocument.documentElement,c))g=f.style(c,d)}return g};if(O.documentElement.currentStyle)Ab=function(c,d){var g,i,k=c.currentStyle&&c.currentStyle[d],o=c.style;if(k===null&&o&&(g=o[d]))k=g;if(!yb.test(k)&&$b.test(k)){g=o.left;if(i=c.runtimeStyle&&c.runtimeStyle.left)c.runtimeStyle.left=c.currentStyle.left;o.left=d==="fontSize"?"1em":k||0;k=
o.pixelLeft+"px";o.left=g;if(i)c.runtimeStyle.left=i}return k===""?"auto":k};Wa=zb||Ab;if(f.expr&&f.expr.filters){f.expr.filters.hidden=function(c){var d=c.offsetHeight;return c.offsetWidth===0&&d===0||!f.support.reliableHiddenOffsets&&(c.style&&c.style.display||f.css(c,"display"))==="none"};f.expr.filters.visible=function(c){return!f.expr.filters.hidden(c)}}var cc=/%20/g,Mb=/\[\]$/,Bb=/\r?\n/g,dc=/#.*$/,ec=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,fc=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
gc=/^(?:GET|HEAD)$/,hc=/^\/\//,Cb=/\?/,ic=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,jc=/^(?:select|textarea)/i,qb=/\s+/,kc=/([?&])_=[^&]*/,Db=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Eb=f.fn.load,jb={},Fb={},Ra,Sa,Gb=["*/"]+["*"];try{Ra=ma.href}catch(sc){Ra=O.createElement("a");Ra.href="";Ra=Ra.href}Sa=Db.exec(Ra.toLowerCase())||[];f.fn.extend({load:function(c,d,g){if(typeof c!=="string"&&Eb)return Eb.apply(this,arguments);else if(!this.length)return this;var i=c.indexOf(" ");
if(i>=0){var k=c.slice(i,c.length);c=c.slice(0,i)}i="GET";if(d)if(f.isFunction(d)){g=d;d=b}else if(typeof d==="object"){d=f.param(d,f.ajaxSettings.traditional);i="POST"}var o=this;f.ajax({url:c,type:i,dataType:"html",data:d,complete:function(t,y,A){A=t.responseText;if(t.isResolved()){t.done(function(I){A=I});o.html(k?f("<div>").append(A.replace(ic,"")).find(k):A)}g&&o.each(g,[A,y,t])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||jc.test(this.nodeName)||fc.test(this.type))}).map(function(c,d){var g=f(this).val();return g==null?null:f.isArray(g)?f.map(g,function(i){return{name:d.name,value:i.replace(Bb,"\r\n")}}):{name:d.name,value:g.replace(Bb,"\r\n")}}).get()}});f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(c,d){f.fn[d]=function(g){return this.on(d,g)}});f.each(["get","post"],
function(c,d){f[d]=function(g,i,k,o){if(f.isFunction(i)){o=o||k;k=i;i=b}return f.ajax({type:d,url:g,data:i,success:k,dataType:o})}});f.extend({getScript:function(c,d){return f.get(c,b,d,"script")},getJSON:function(c,d,g){return f.get(c,d,g,"json")},ajaxSetup:function(c,d){if(d)E(c,f.ajaxSettings);else{d=c;c=f.ajaxSettings}E(c,d);return c},ajaxSettings:{url:Ra,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Sa[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",
processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Gb},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":true,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:r(jb),ajaxTransport:r(Fb),ajax:function(c,d){function g(v,D,F,H){if(pa!==2){pa=2;oa&&clearTimeout(oa);ha=
b;Z=H||"";ja.readyState=v>0?4:0;var L,aa,V;H=D;if(F){var la=i,w=ja,R=la.contents,W=la.dataTypes,S=la.responseFields,ga,ca,qa,va;for(ca in S)if(ca in F)w[S[ca]]=F[ca];for(;W[0]==="*";){W.shift();if(ga===b)ga=la.mimeType||w.getResponseHeader("content-type")}if(ga)for(ca in R)if(R[ca]&&R[ca].test(ga)){W.unshift(ca);break}if(W[0]in F)qa=W[0];else{for(ca in F){if(!W[0]||la.converters[ca+" "+W[0]]){qa=ca;break}va||(va=ca)}qa=qa||va}if(qa){qa!==W[0]&&W.unshift(qa);F=F[qa]}else F=void 0}else F=b;F=F;if(v>=
200&&v<300||v===304){if(i.ifModified){if(ga=ja.getResponseHeader("Last-Modified"))f.lastModified[I]=ga;if(ga=ja.getResponseHeader("Etag"))f.etag[I]=ga}if(v===304){H="notmodified";L=true}else try{ga=i;F=F;if(ga.dataFilter)F=ga.dataFilter(F,ga.dataType);var Qa=ga.dataTypes;ca={};var bb,fb,lc=Qa.length,gb,La=Qa[0],Ya,nb,Ma,Ta,Za;for(bb=1;bb<lc;bb++){if(bb===1)for(fb in ga.converters)if(typeof fb==="string")ca[fb.toLowerCase()]=ga.converters[fb];Ya=La;La=Qa[bb];if(La==="*")La=Ya;else if(Ya!=="*"&&Ya!==
La){nb=Ya+" "+La;Ma=ca[nb]||ca["* "+La];if(!Ma){Za=b;for(Ta in ca){gb=Ta.split(" ");if(gb[0]===Ya||gb[0]==="*")if(Za=ca[gb[1]+" "+La]){Ta=ca[Ta];if(Ta===true)Ma=Za;else if(Za===true)Ma=Ta;break}}}Ma||Za||f.error("No conversion from "+nb.replace(" "," to "));if(Ma!==true)F=Ma?Ma(F):Za(Ta(F))}}aa=F;H="success";L=true}catch(mc){H="parsererror";V=mc}}else{V=H;if(!H||v){H="error";if(v<0)v=0}}ja.status=v;ja.statusText=""+(D||H);L?t.resolveWith(k,[aa,H,ja]):t.rejectWith(k,[ja,H,V]);ja.statusCode(A);A=b;
if(Ka)o.trigger("ajax"+(L?"Success":"Error"),[ja,i,L?aa:V]);y.fireWith(k,[ja,H]);if(Ka){o.trigger("ajaxComplete",[ja,i]);--f.active||f.event.trigger("ajaxStop")}}}if(typeof c==="object"){d=c;c=b}d=d||{};var i=f.ajaxSetup({},d),k=i.context||i,o=k!==i&&(k.nodeType||k instanceof f)?f(k):f.event,t=f.Deferred(),y=f.Callbacks("once memory"),A=i.statusCode||{},I,X={},M={},Z,U,ha,oa,ra,pa=0,Ka,Ca,ja={readyState:0,setRequestHeader:function(v,D){if(!pa){var F=v.toLowerCase();v=M[F]=M[F]||v;X[v]=D}return this},
getAllResponseHeaders:function(){return pa===2?Z:null},getResponseHeader:function(v){var D;if(pa===2){if(!U)for(U={};D=ec.exec(Z);)U[D[1].toLowerCase()]=D[2];D=U[v.toLowerCase()]}return D===b?null:D},overrideMimeType:function(v){if(!pa)i.mimeType=v;return this},abort:function(v){v=v||"abort";ha&&ha.abort(v);g(0,v);return this}};t.promise(ja);ja.success=ja.done;ja.error=ja.fail;ja.complete=y.add;ja.statusCode=function(v){if(v){var D;if(pa<2)for(D in v)A[D]=[A[D],v[D]];else{D=v[ja.status];ja.then(D,
D)}}return this};i.url=((c||i.url)+"").replace(dc,"").replace(hc,Sa[1]+"//");i.dataTypes=f.trim(i.dataType||"*").toLowerCase().split(qb);if(i.crossDomain==null){ra=Db.exec(i.url.toLowerCase());i.crossDomain=!!(ra&&(ra[1]!=Sa[1]||ra[2]!=Sa[2]||(ra[3]||(ra[1]==="http:"?80:443))!=(Sa[3]||(Sa[1]==="http:"?80:443))))}if(i.data&&i.processData&&typeof i.data!=="string")i.data=f.param(i.data,i.traditional);z(jb,i,d,ja);if(pa===2)return false;Ka=i.global;i.type=i.type.toUpperCase();i.hasContent=!gc.test(i.type);
Ka&&f.active++===0&&f.event.trigger("ajaxStart");if(!i.hasContent){if(i.data){i.url+=(Cb.test(i.url)?"&":"?")+i.data;delete i.data}I=i.url;if(i.cache===false){ra=f.now();var Ga=i.url.replace(kc,"$1_="+ra);i.url=Ga+(Ga===i.url?(Cb.test(i.url)?"&":"?")+"_="+ra:"")}}if(i.data&&i.hasContent&&i.contentType!==false||d.contentType)ja.setRequestHeader("Content-Type",i.contentType);if(i.ifModified){I=I||i.url;f.lastModified[I]&&ja.setRequestHeader("If-Modified-Since",f.lastModified[I]);f.etag[I]&&ja.setRequestHeader("If-None-Match",
f.etag[I])}ja.setRequestHeader("Accept",i.dataTypes[0]&&i.accepts[i.dataTypes[0]]?i.accepts[i.dataTypes[0]]+(i.dataTypes[0]!=="*"?", "+Gb+"; q=0.01":""):i.accepts["*"]);for(Ca in i.headers)ja.setRequestHeader(Ca,i.headers[Ca]);if(i.beforeSend&&(i.beforeSend.call(k,ja,i)===false||pa===2)){ja.abort();return false}for(Ca in{success:1,error:1,complete:1})ja[Ca](i[Ca]);if(ha=z(Fb,i,d,ja)){ja.readyState=1;Ka&&o.trigger("ajaxSend",[ja,i]);if(i.async&&i.timeout>0)oa=setTimeout(function(){ja.abort("timeout")},
i.timeout);try{pa=1;ha.send(X,g)}catch(q){if(pa<2)g(-1,q);else throw q;}}else g(-1,"No Transport");return ja},param:function(c,d){var g=[],i=function(o,t){t=f.isFunction(t)?t():t;g[g.length]=encodeURIComponent(o)+"="+encodeURIComponent(t)};if(d===b)d=f.ajaxSettings.traditional;if(f.isArray(c)||c.jquery&&!f.isPlainObject(c))f.each(c,function(){i(this.name,this.value)});else for(var k in c)B(k,c[k],d,i);return g.join("&").replace(cc,"+")}});f.extend({active:0,lastModified:{},etag:{}});var nc=f.now(),
hb=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+nc++}});f.ajaxPrefilter("json jsonp",function(c,d,g){d=c.contentType==="application/x-www-form-urlencoded"&&typeof c.data==="string";if(c.dataTypes[0]==="jsonp"||c.jsonp!==false&&(hb.test(c.url)||d&&hb.test(c.data))){var i,k=c.jsonpCallback=f.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,o=a[k],t=c.url,y=c.data,A="$1"+k+"$2";if(c.jsonp!==false){t=t.replace(hb,A);if(c.url===t){if(d)y=
y.replace(hb,A);if(c.data===y)t+=(/\?/.test(t)?"&":"?")+c.jsonp+"="+k}}c.url=t;c.data=y;a[k]=function(I){i=[I]};g.always(function(){a[k]=o;i&&f.isFunction(o)&&a[k](i[0])});c.converters["script json"]=function(){i||f.error(k+" was not called");return i[0]};c.dataTypes[0]="json";return"script"}});f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(c){f.globalEval(c);
return c}}});f.ajaxPrefilter("script",function(c){if(c.cache===b)c.cache=false;if(c.crossDomain){c.type="GET";c.global=false}});f.ajaxTransport("script",function(c){if(c.crossDomain){var d,g=O.head||O.getElementsByTagName("head")[0]||O.documentElement;return{send:function(i,k){d=O.createElement("script");d.async="async";if(c.scriptCharset)d.charset=c.scriptCharset;d.src=c.url;d.onload=d.onreadystatechange=function(o,t){if(t||!d.readyState||/loaded|complete/.test(d.readyState)){d.onload=d.onreadystatechange=
null;g&&d.parentNode&&g.removeChild(d);d=b;t||k(200,"success")}};g.insertBefore(d,g.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ob=a.ActiveXObject?function(){for(var c in $a)$a[c](0,1)}:false,oc=0,$a;f.ajaxSettings.xhr=a.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&K()))a:{try{c=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(d){}c=void 0}return c}:K;(function(c){f.extend(f.support,{ajax:!!c,cors:!!c&&"withCredentials"in c})})(f.ajaxSettings.xhr());f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||
f.support.cors){var d;return{send:function(g,i){var k=c.xhr(),o,t;c.username?k.open(c.type,c.url,c.async,c.username,c.password):k.open(c.type,c.url,c.async);if(c.xhrFields)for(t in c.xhrFields)k[t]=c.xhrFields[t];c.mimeType&&k.overrideMimeType&&k.overrideMimeType(c.mimeType);if(!c.crossDomain&&!g["X-Requested-With"])g["X-Requested-With"]="XMLHttpRequest";try{for(t in g)k.setRequestHeader(t,g[t])}catch(y){}k.send(c.hasContent&&c.data||null);d=function(A,I){var X,M,Z,U,ha;try{if(d&&(I||k.readyState===
4)){d=b;if(o){k.onreadystatechange=f.noop;ob&&delete $a[o]}if(I)k.readyState!==4&&k.abort();else{X=k.status;Z=k.getAllResponseHeaders();U={};if((ha=k.responseXML)&&ha.documentElement)U.xml=ha;U.text=k.responseText;try{M=k.statusText}catch(oa){M=""}if(!X&&c.isLocal&&!c.crossDomain)X=U.text?200:404;else if(X===1223)X=204}}}catch(ra){I||i(-1,ra)}U&&i(X,M,U,Z)};if(!c.async||k.readyState===4)d();else{o=++oc;if(ob){if(!$a){$a={};f(a).unload(ob)}$a[o]=d}k.onreadystatechange=d}},abort:function(){d&&d(0,1)}}}});
var kb={},Ia,Xa,pc=/^(?:toggle|show|hide)$/,qc=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ib,rb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],eb;f.fn.extend({show:function(c,d,g){if(c||c===0)return this.animate(Q("show",3),c,d,g);else{g=0;for(var i=this.length;g<i;g++){c=this[g];if(c.style){d=c.style.display;if(!f._data(c,"olddisplay")&&d==="none")d=c.style.display="";d===""&&f.css(c,"display")==="none"&&
f._data(c,"olddisplay",N(c.nodeName))}}for(g=0;g<i;g++){c=this[g];if(c.style){d=c.style.display;if(d===""||d==="none")c.style.display=f._data(c,"olddisplay")||""}}return this}},hide:function(c,d,g){if(c||c===0)return this.animate(Q("hide",3),c,d,g);else{g=0;for(var i=this.length;g<i;g++){c=this[g];if(c.style){d=f.css(c,"display");d!=="none"&&!f._data(c,"olddisplay")&&f._data(c,"olddisplay",d)}}for(g=0;g<i;g++)if(this[g].style)this[g].style.display="none";return this}},_toggle:f.fn.toggle,toggle:function(c,
d,g){var i=typeof c==="boolean";if(f.isFunction(c)&&f.isFunction(d))this._toggle.apply(this,arguments);else c==null||i?this.each(function(){var k=i?c:f(this).is(":hidden");f(this)[k?"show":"hide"]()}):this.animate(Q("toggle",3),c,d,g);return this},fadeTo:function(c,d,g,i){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:d},c,g,i)},animate:function(c,d,g,i){function k(){o.queue===false&&f._mark(this);var t=f.extend({},o),y=this.nodeType===1,A=y&&f(this).is(":hidden"),I,
X,M,Z,U;t.animatedProperties={};for(M in c){I=f.camelCase(M);if(M!==I){c[I]=c[M];delete c[M]}X=c[I];if(f.isArray(X)){t.animatedProperties[I]=X[1];X=c[I]=X[0]}else t.animatedProperties[I]=t.specialEasing&&t.specialEasing[I]||t.easing||"swing";if(X==="hide"&&A||X==="show"&&!A)return t.complete.call(this);if(y&&(I==="height"||I==="width")){t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(f.css(this,"display")==="inline"&&f.css(this,"float")==="none")if(!f.support.inlineBlockNeedsLayout||
N(this.nodeName)==="inline")this.style.display="inline-block";else this.style.zoom=1}}if(t.overflow!=null)this.style.overflow="hidden";for(M in c){y=new f.fx(this,t,M);X=c[M];if(pc.test(X))if(I=f._data(this,"toggle"+M)||(X==="toggle"?A?"show":"hide":0)){f._data(this,"toggle"+M,I==="show"?"hide":"show");y[I]()}else y[X]();else{I=qc.exec(X);Z=y.cur();if(I){X=parseFloat(I[2]);U=I[3]||(f.cssNumber[M]?"":"px");if(U!=="px"){f.style(this,M,(X||1)+U);Z=(X||1)/y.cur()*Z;f.style(this,M,Z+U)}if(I[1])X=(I[1]===
"-="?-1:1)*X+Z;y.custom(Z,X,U)}else y.custom(Z,X,"")}}return true}var o=f.speed(d,g,i);if(f.isEmptyObject(c))return this.each(o.complete,[false]);c=f.extend({},c);return o.queue===false?this.each(k):this.queue(o.queue,k)},stop:function(c,d,g){if(typeof c!=="string"){g=d;d=c;c=b}if(d&&c!==false)this.queue(c||"fx",[]);return this.each(function(){function i(A,I,X){I=I[X];f.removeData(A,X,true);I.stop(g)}var k,o=false,t=f.timers,y=f._data(this);g||f._unmark(true,this);if(c==null)for(k in y)y[k]&&y[k].stop&&
k.indexOf(".run")===k.length-4&&i(this,y,k);else if(y[k=c+".run"]&&y[k].stop)i(this,y,k);for(k=t.length;k--;)if(t[k].elem===this&&(c==null||t[k].queue===c)){g?t[k](true):t[k].saveState();o=true;t.splice(k,1)}g&&o||f.dequeue(this,c)})}});f.each({slideDown:Q("show",1),slideUp:Q("hide",1),slideToggle:Q("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,d){f.fn[c]=function(g,i,k){return this.animate(d,g,i,k)}});f.extend({speed:function(c,d,g){var i=
c&&typeof c==="object"?f.extend({},c):{complete:g||!g&&d||f.isFunction(c)&&c,duration:c,easing:g&&d||d&&!f.isFunction(d)&&d};i.duration=f.fx.off?0:typeof i.duration==="number"?i.duration:i.duration in f.fx.speeds?f.fx.speeds[i.duration]:f.fx.speeds._default;if(i.queue==null||i.queue===true)i.queue="fx";i.old=i.complete;i.complete=function(k){f.isFunction(i.old)&&i.old.call(this);if(i.queue)f.dequeue(this,i.queue);else k!==false&&f._unmark(this)};return i},easing:{linear:function(c,d,g,i){return g+
i*c},swing:function(c,d,g,i){return(-Math.cos(c*Math.PI)/2+0.5)*i+g}},timers:[],fx:function(c,d,g){this.options=d;this.elem=c;this.prop=g;d.orig=d.orig||{}}});f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var c,d=f.css(this.elem,this.prop);return isNaN(c=parseFloat(d))?
!d||d==="auto"?0:d:c},custom:function(c,d,g){function i(t){return k.step(t)}var k=this,o=f.fx;this.startTime=eb||J();this.end=d;this.now=this.start=c;this.pos=this.state=0;this.unit=g||this.unit||(f.cssNumber[this.prop]?"":"px");i.queue=this.options.queue;i.elem=this.elem;i.saveState=function(){k.options.hide&&f._data(k.elem,"fxshow"+k.prop)===b&&f._data(k.elem,"fxshow"+k.prop,k.start)};if(i()&&f.timers.push(i)&&!ib)ib=setInterval(o.tick,o.interval)},show:function(){var c=f._data(this.elem,"fxshow"+
this.prop);this.options.orig[this.prop]=c||f.style(this.elem,this.prop);this.options.show=true;c!==b?this.custom(this.cur(),c):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(c){var d,g=eb||J(),i=true,k=this.elem,o=this.options;if(c||g>=o.duration+this.startTime){this.now=this.end;
this.pos=this.state=1;this.update();o.animatedProperties[this.prop]=true;for(d in o.animatedProperties)if(o.animatedProperties[d]!==true)i=false;if(i){o.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(t,y){k.style["overflow"+y]=o.overflow[t]});o.hide&&f(k).hide();if(o.hide||o.show)for(d in o.animatedProperties){f.style(k,d,o.orig[d]);f.removeData(k,"fxshow"+d,true);f.removeData(k,"toggle"+d,true)}if(c=o.complete){o.complete=false;c.call(k)}}return false}else{if(o.duration==
Infinity)this.now=g;else{c=g-this.startTime;this.state=c/o.duration;this.pos=f.easing[o.animatedProperties[this.prop]](this.state,c,0,1,o.duration);this.now=this.start+(this.end-this.start)*this.pos}this.update()}return true}};f.extend(f.fx,{tick:function(){for(var c,d=f.timers,g=0;g<d.length;g++){c=d[g];!c()&&d[g]===c&&d.splice(g--,1)}d.length||f.fx.stop()},interval:13,stop:function(){clearInterval(ib);ib=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(c){f.style(c.elem,"opacity",
c.now)},_default:function(c){if(c.elem.style&&c.elem.style[c.prop]!=null)c.elem.style[c.prop]=c.now+c.unit;else c.elem[c.prop]=c.now}}});f.each(["width","height"],function(c,d){f.fx.step[d]=function(g){f.style(g.elem,d,Math.max(0,g.now)+g.unit)}});if(f.expr&&f.expr.filters)f.expr.filters.animated=function(c){return f.grep(f.timers,function(d){return c===d.elem}).length};var rc=/^t(?:able|d|h)$/i,Hb=/^(?:body|html)$/i;f.fn.offset="getBoundingClientRect"in O.documentElement?function(c){var d=this[0],
g;if(c)return this.each(function(t){f.offset.setOffset(this,c,t)});if(!d||!d.ownerDocument)return null;if(d===d.ownerDocument.body)return f.offset.bodyOffset(d);try{g=d.getBoundingClientRect()}catch(i){}var k=d.ownerDocument,o=k.documentElement;if(!g||!f.contains(o,d))return g?{top:g.top,left:g.left}:{top:0,left:0};d=k.body;k=fa(k);return{top:g.top+(k.pageYOffset||f.support.boxModel&&o.scrollTop||d.scrollTop)-(o.clientTop||d.clientTop||0),left:g.left+(k.pageXOffset||f.support.boxModel&&o.scrollLeft||
d.scrollLeft)-(o.clientLeft||d.clientLeft||0)}}:function(c){var d=this[0];if(c)return this.each(function(I){f.offset.setOffset(this,c,I)});if(!d||!d.ownerDocument)return null;if(d===d.ownerDocument.body)return f.offset.bodyOffset(d);var g,i=d.offsetParent,k=d.ownerDocument,o=k.documentElement,t=k.body;g=(k=k.defaultView)?k.getComputedStyle(d,null):d.currentStyle;for(var y=d.offsetTop,A=d.offsetLeft;(d=d.parentNode)&&d!==t&&d!==o;){if(f.support.fixedPosition&&g.position==="fixed")break;g=k?k.getComputedStyle(d,
null):d.currentStyle;y-=d.scrollTop;A-=d.scrollLeft;if(d===i){y+=d.offsetTop;A+=d.offsetLeft;if(f.support.doesNotAddBorder&&!(f.support.doesAddBorderForTableAndCells&&rc.test(d.nodeName))){y+=parseFloat(g.borderTopWidth)||0;A+=parseFloat(g.borderLeftWidth)||0}i=d.offsetParent}if(f.support.subtractsBorderForOverflowNotVisible&&g.overflow!=="visible"){y+=parseFloat(g.borderTopWidth)||0;A+=parseFloat(g.borderLeftWidth)||0}g=g}if(g.position==="relative"||g.position==="static"){y+=t.offsetTop;A+=t.offsetLeft}if(f.support.fixedPosition&&
g.position==="fixed"){y+=Math.max(o.scrollTop,t.scrollTop);A+=Math.max(o.scrollLeft,t.scrollLeft)}return{top:y,left:A}};f.offset={bodyOffset:function(c){var d=c.offsetTop,g=c.offsetLeft;if(f.support.doesNotIncludeMarginInBodyOffset){d+=parseFloat(f.css(c,"marginTop"))||0;g+=parseFloat(f.css(c,"marginLeft"))||0}return{top:d,left:g}},setOffset:function(c,d,g){var i=f.css(c,"position");if(i==="static")c.style.position="relative";var k=f(c),o=k.offset(),t=f.css(c,"top"),y=f.css(c,"left"),A={},I={};if((i===
"absolute"||i==="fixed")&&f.inArray("auto",[t,y])>-1){I=k.position();i=I.top;y=I.left}else{i=parseFloat(t)||0;y=parseFloat(y)||0}if(f.isFunction(d))d=d.call(c,g,o);if(d.top!=null)A.top=d.top-o.top+i;if(d.left!=null)A.left=d.left-o.left+y;"using"in d?d.using.call(c,A):k.css(A)}};f.fn.extend({position:function(){if(!this[0])return null;var c=this[0],d=this.offsetParent(),g=this.offset(),i=Hb.test(d[0].nodeName)?{top:0,left:0}:d.offset();g.top-=parseFloat(f.css(c,"marginTop"))||0;g.left-=parseFloat(f.css(c,
"marginLeft"))||0;i.top+=parseFloat(f.css(d[0],"borderTopWidth"))||0;i.left+=parseFloat(f.css(d[0],"borderLeftWidth"))||0;return{top:g.top-i.top,left:g.left-i.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||O.body;c&&!Hb.test(c.nodeName)&&f.css(c,"position")==="static";)c=c.offsetParent;return c})}});f.each(["Left","Top"],function(c,d){var g="scroll"+d;f.fn[g]=function(i){var k,o;if(i===b){k=this[0];if(!k)return null;return(o=fa(k))?"pageXOffset"in o?o[c?"pageYOffset":
"pageXOffset"]:f.support.boxModel&&o.document.documentElement[g]||o.document.body[g]:k[g]}return this.each(function(){if(o=fa(this))o.scrollTo(!c?i:f(o).scrollLeft(),c?i:f(o).scrollTop());else this[g]=i})}});f.each(["Height","Width"],function(c,d){var g=d.toLowerCase();f.fn["inner"+d]=function(){var i=this[0];return i?i.style?parseFloat(f.css(i,g,"padding")):this[g]():null};f.fn["outer"+d]=function(i){var k=this[0];return k?k.style?parseFloat(f.css(k,g,i?"margin":"border")):this[g]():null};f.fn[g]=
function(i){var k=this[0];if(!k)return i==null?null:this;if(f.isFunction(i))return this.each(function(y){var A=f(this);A[g](i.call(this,y,A[g]()))});if(f.isWindow(k)){var o=k.document.documentElement["client"+d],t=k.document.body;return k.document.compatMode==="CSS1Compat"&&o||t&&t["client"+d]||o}else if(k.nodeType===9)return Math.max(k.documentElement["client"+d],k.body["scroll"+d],k.documentElement["scroll"+d],k.body["offset"+d],k.documentElement["offset"+d]);else if(i===b){k=f.css(k,g);o=parseFloat(k);
return f.isNumeric(o)?o:k}else return this.css(g,typeof i==="string"?i:i+"px")}});a.jQuery=a.$=f;typeof define==="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);window.$j=jQuery.noConflict();
(function(a){a.fn.placeholder=function(){function b(e){return a(e).val()==a(e).attr("placeholder")}return this.each(function(){a(this).find("[placeholder]").each(function(){if(a(this).attr("type")=="password"){var e=a("<input type='text'>");e.attr("rel",a(this).attr("id"));e.attr("value",a(this).attr("placeholder"));a(this).parent().append(e);e.hide();var h=function(n){if(a(n).val()==""||b(n)){a(n).hide();a("input[rel="+a(n).attr("id")+"]").show()}};e.focus(function(){a(this).hide();a("input#"+a(this).attr("rel")).show().focus()});
a(this).blur(function(){h(this,false)});h(this)}else{var l=function(n,j){if(a(n).val()==""||j&&b(n)){a(n).val(a(n).attr("placeholder"));a(n).addClass("placeholder")}};a(this).focus(function(){if(a(this).val()==a(this).attr("placeholder")){a(this).val("");a(this).removeClass("placeholder")}});a(this).blur(function(){l(a(this),false)});l(this,true)}});a(this).submit(function(){a(this).find(":input").each(function(){a(this).val()==a(this).attr("placeholder")&&a(this).val("")})})})}})(jQuery);
(function(a,b,e){function h(l,n){function j(s){a(m).each(function(){var C=a(this);this!==s.target&&!C.has(s.target).length&&C.triggerHandler(n,[s.target])})}n=n||l+e;var m=a(),p=l+"."+n+"-special-event";a.event.special[n]={setup:function(){m=m.add(this);m.length===1&&a(b).bind(p,j)},teardown:function(){m=m.not(this);m.length===0&&a(b).unbind(p)},add:function(s){var C=s.handler;s.handler=function(T,ia){T.target=ia;C.apply(this,arguments)}}}}a.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "),
function(l){h(l)});h("focusin","focus"+e);h("focusout","blur"+e);a.addOutsideEvent=h})(jQuery,document,"outside");
(function(a){function b(h,l){l=a.extend({side:"left",above:false},l);h.hide();h.css({position:"absolute","z-index":10,top:0,left:0});h.find(".close").click(function(n){n.preventDefault();h.is(":visible")&&h.hide()});a("body").keyup(function(n){n.keyCode===27&&h.is(":visible")&&h.hide()});return this.each(function(){var n=a(this),j=function(){var p=n.offset(),s=l.above?p.top-h.outerHeight()-5:p.top+n.outerHeight()+5,C=p.left+n.outerWidth();p=l.side==="left"?C-h.outerWidth():p.left;h.css("top",s);h.css("left",
p)};a(window).bind("resize",j);var m=function(){if(!h.is(":visible")){j();h.show();h.css("outline","none")}};n.bind("click display",function(p){p.preventDefault();p.stopPropagation();if(h.is(":visible"))h.hide();else if(h._contentFn){var s=h._contentFn;s(h,m,p);h._contentFn=false}else m(p)})})}var e={close_on_outside_click:function(h,l){var n=a(this);b.call(n,h,l);h.bind("clickoutside",function(){h.is(":visible")&&h.hide()})},click_to_close:function(h,l){var n=a(this);b.call(n,h,l)},close_on_click:function(h,
l){var n=a(this);b.call(n,h,l);h.click(function(){h.hide()})}};a.fn.popup=function(h,l,n){if(typeof h!=="string"){n=l;l=h;h="close_on_outside_click"}if(typeof l==="function"){var j=a("body"),m=l;l=a('<div style="display:none">');l.appendTo(j);l._contentFn=m}var p;if(p=e[h])return this.each(function(){p.call(this,l,n)});else throw"No method with name: "+h;}})($j);
(function(a){a(function(){var b=a("body");b.bind("login.overlay.show",function(e,h){b.overlay(h.url,function(){a("#subwindow_close").click(function(l){l.preventDefault();a(this).trigger("overlay.hide")})},h)})});a.login=function(){var b=a("body"),e={url:"/user/login_popup",width:"640px",id:"login_subwindow",focusOnLoad:"#login_user_login",destroyOnHide:false};if(b.innerWidth()<640)e=a.extend({},e,{url:"/user/login_popup_small",width:"326px"});b.trigger("login.overlay.show",[e])};a.fn.login=function(b){b=
a.extend({},b,{events:"click"});return this.each(function(){a(this).bind(b.events,function(e){e.preventDefault();a.login()})})}})($j);
(function(a){a.fn.siteNotification=function(b){return this.each(function(){var e=a(this),h=e.children(".body"),l=e.children(".close"),n=readCookie("notification_closed/"+b,n),j=function(){createCookie("notification_closed/"+b,n,6048E5);e.slideUp("fast")},m=function(){a.ajax({url:"/site_announce/"+b+".html",dataType:"json",success:function(p){if(p.alert_id!=n){n=p.alert_id;h.html(p.html);["notice","error","warning","success","purple"].each(function(s){e.removeClass(s)});e.addClass(p.type||"notice");
e.slideDown("fast")}},404:j})};m();setInterval(m,3E5);l.click(j)})}})($j);
(function(a){a.forceLogIn=function(){window.location="/user/login?redirect_on_login="+window.location.pathname+window.location.search};a.loggedInAjax=function(b,e){if(typeof e=="undefined"){e=b;b=null}else e.url=b;var h=e.error;e.error=function(l){l.status==403&&a.forceLogIn();h&&h.apply(this,arguments)};return a.ajax(e)};a(function(){a(".header_nick").popup(a("#self_actions"));a("input[placeholder]").placeholder();a("#header_login, #header_signup, #broadcast_login, .popup_auth_link").login();a("#languages").popup(function(b,
e,h){a.get("/dropmenu/languages").success(function(l){b.html(l);e(h)})},{above:true});if(!PP||!PP.display_name){a("#user_display_name").hide();a("#user_login").show()}a("#header_notification").siteNotification("header")})})($j);
(function(a){a.fn.overlay=function(b,e,h){h=a.extend({closeOnEsc:true,width:"640px",useIframe:false,destroyOnHide:true},h);return this.each(function(){if(!b)throw"Please provide a contentURL";var l=a(this);if(l.css("position")==="absolute")throw"Parent of an overlay cannot be positioned absolute";if(l.children(".twitch_cover").length>0){l.children(".twitch_cover").show();l.children(".twitch_subwindow_container").show().children(".twitch_subwindow").show();l.scrollTop(0);h.focusOnLoad&&a(h.focusOnLoad).focus()}else{var n,
j=function(){if(!n){n=a("<div></div>").addClass("twitch_cover");h.cover_opacity&&n.css("opacity",h.cover_opacity);l.prepend(n).show()}};h.cover_immediately&&j();a.get(b).success(function(m){var p,s;try{p=h.isIframe?"<iframe></iframe>":"<div></div>";s=a(p).addClass("twitch_subwindow").addClass("rounder").html(m)}catch(C){throw"Invalid data";}h.id&&s.attr("id",h.id);s.css("width",h.width);var T=a("<div></div>").addClass("twitch_subwindow_container");j();l.prepend(T).show();T.prepend(s).show();l.scrollTop(0);
h.focusOnLoad&&a(h.focusOnLoad).focus();h.closeOnEsc&&l.bind("keyup",function(ia){ia.keyCode===27&&l.trigger("overlay.hide")});l.bind("overlay.hide",function(ia){ia.stopPropagation();if(h.destroyOnHide){s.remove();T.remove();n.remove()}else{s.hide();T.hide();n.hide()}});e()})}})}})(jQuery);

