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"),d=false;if(a.__proto__&&a.__proto__!==b.__proto__)d=true;return d}()},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,d=arguments.length;b<d;b++){var g=arguments[b];try{a=g();break}catch(l){}}return a}},Class=function(){function a(){}var b=function(){for(var d in{toString:1})if(d==="toString")return false;return true}();return{create:function(){function d(){this.initialize.apply(this,arguments)}var g=null,l=$A(arguments);if(Object.isFunction(l[0]))g=l.shift();Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=
new a;g.subclasses.push(d)}g=0;for(var n=l.length;g<n;g++)d.addMethods(l[g]);if(!d.prototype.initialize)d.prototype.initialize=Prototype.emptyFunction;return d.prototype.constructor=d},Methods:{addMethods:function(d){var g=this.superclass&&this.superclass.prototype,l=Object.keys(d);if(b){d.toString!=Object.prototype.toString&&l.push("toString");d.valueOf!=Object.prototype.valueOf&&l.push("valueOf")}for(var n=0,j=l.length;n<j;n++){var m=l[n],o=d[m];if(g&&Object.isFunction(o)&&o.argumentNames()[0]==
"$super"){var s=o;o=function(D){return function(){return g[D].apply(this,arguments)}}(m).wrap(s);o.valueOf=s.valueOf.bind(s);o.toString=s.toString.bind(s)}this.prototype[m]=o}return this}}}}();
(function(){function a(B){switch(B){case null:return s;case void 0:return D}switch(typeof B){case "boolean":return T;case "number":return ja;case "string":return Aa}return wa}function b(B,K){for(var M in K)B[M]=K[M];return B}function d(B){return g("",{"":B},[])}function g(B,K,M){K=K[B];var q=typeof K;if(a(K)===wa&&typeof K.toJSON==="function")K=K.toJSON(B);B=o.call(K);switch(B){case ta:case Ea:case t:K=K.valueOf()}switch(K){case null:return"null";case true:return"true";case false:return"false"}q=
typeof K;switch(q){case "string":return K.inspect(true);case "number":return isFinite(K)?String(K):"null";case "object":q=0;for(var C=M.length;q<C;q++)if(M[q]===K)throw new TypeError;M.push(K);var E=[];if(B===y){q=0;for(C=K.length;q<C;q++){var Q=g(q,K,M);E.push(typeof Q==="undefined"?"null":Q)}E="["+E.join(",")+"]"}else{var F=Object.keys(K);q=0;for(C=F.length;q<C;q++){B=F[q];Q=g(B,K,M);typeof Q!=="undefined"&&E.push(B.inspect(true)+":"+Q)}E="{"+E.join(",")+"}"}M.pop();return E}}function l(B){return JSON.stringify(B)}
function n(B){if(a(B)!==wa)throw new TypeError;var K=[],M;for(M in B)B.hasOwnProperty(M)&&K.push(M);return K}function j(B){return o.call(B)===y}function m(B){return typeof B==="undefined"}var o=Object.prototype.toString,s="Null",D="Undefined",T="Boolean",ja="Number",Aa="String",wa="Object",Ea="[object Boolean]",ta="[object Number]",t="[object String]",y="[object Array]",G=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:G?l:d,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=[],M;for(M in B)K.push(B[M]);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 o.call(B)==="[object Function]"},isString:function(B){return o.call(B)===t},isNumber:function(B){return o.call(B)===ta},isDate:function(B){return o.call(B)==="[object Date]"},isUndefined:m})})();
Object.extend(Function.prototype,function(){function a(g,l){for(var n=g.length,j=l.length;j--;)g[n+j]=l[j];return g}function b(g,l){g=d.call(g,0);return a(g,l)}var d=Array.prototype.slice;return{argumentNames:function(){var g=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return g.length==1&&!g[0]?[]:g},bind:function(g){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var l=this,n=d.call(arguments,
1);return function(){var j=b(n,arguments);return l.apply(g,j)}},bindAsEventListener:function(g){var l=this,n=d.call(arguments,1);return function(j){j=a([j||window.event],n);return l.apply(g,j)}},curry:function(){if(!arguments.length)return this;var g=this,l=d.call(arguments,0);return function(){var n=b(l,arguments);return g.apply(this,n)}},delay:function(g){var l=this,n=d.call(arguments,1);g*=1E3;return window.setTimeout(function(){return l.apply(l,n)},g)},defer:function(){return this.delay.apply(this,
a([0.01],arguments))},wrap:function(g){var l=this;return function(){var n=a([l.bind(this)],arguments);return g.apply(this,n)}},methodize:function(){if(this._methodized)return this._methodized;var g=this;return this._methodized=function(){var l=a([this],arguments);return g.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 d(){return this.toISOString()}if(!a.toISOString)a.toISOString=b;if(!a.toJSON)a.toJSON=d})(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(o){return m.evaluate(o)}}function b(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function d(j){var m=this.strip().match(/([^?#]*)(#.*)?$/);if(!m)return{};return m[1].split(j||"&").inject({},function(o,s){if((s=s.split("="))[0]){var D=decodeURIComponent(s.shift()),T=s.length>1?s.join("="):s[0];if(T!=undefined)T=decodeURIComponent(T);if(D in o){Object.isArray(o[D])||
(o[D]=[o[D]]);o[D].push(T)}else o[D]=T}return o})}function g(j){var m=this.unfilterJSON(),o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(o.test(m))m=m.replace(o,function(D){return"\\u"+("0000"+D.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 o="",s=this,D;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(D=s.match(j)){o+=s.slice(0,D.index);o+=String.interpret(m(D));s=s.slice(D.index+D[0].length)}else{o+=s;s=""}return o},sub:function(j,m,o){m=a(m);o=Object.isUndefined(o)?1:o;return this.gsub(j,function(s){if(--o<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:d,parseQuery:d,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(o){if(o in
String.specialChar)return String.specialChar[o];return"\\u00"+o.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:g,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 d=b[1]||"";if(d=="\\")return b[2];var g=a,l=b[3],n=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;b=n.exec(l);if(b==null)return d;for(;b!=null;){var j=b[1].startsWith("[")?b[2].replace(/\\\\]/g,"]"):b[1];g=g[j];if(null==
g||""==b[3])break;l=l.substring("["==b[3]?b[1].length:b[0].length);b=n.exec(l)}return d+String.interpret(g)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={},Enumerable=function(){function a(m,o){m=m||Prototype.K;var s=true;this.each(function(D,T){s=s&&!!m.call(o,D,T);if(!s)throw $break;});return s}function b(m,o){m=m||Prototype.K;var s=false;this.each(function(D,T){if(s=!!m.call(o,D,T))throw $break;});return s}function d(m,o){m=m||Prototype.K;var s=[];this.each(function(D,T){s.push(m.call(o,D,T))});return s}function g(m,o){var s;this.each(function(D,T){if(m.call(o,D,T)){s=D;throw $break;}});return s}function l(m,o){var s=[];this.each(function(D,
T){m.call(o,D,T)&&s.push(D)});return s}function n(m){if(Object.isFunction(this.indexOf))if(this.indexOf(m)!=-1)return true;var o=false;this.each(function(s){if(s==m){o=true;throw $break;}});return o}function j(){return this.map()}return{each:function(m,o){var s=0;try{this._each(function(T){m.call(o,T,s++)})}catch(D){if(D!=$break)throw D;}return this},eachSlice:function(m,o,s){var D=-m,T=[],ja=this.toArray();if(m<1)return ja;for(;(D+=m)<ja.length;)T.push(ja.slice(D,D+m));return T.collect(o,s)},all:a,
every:a,any:b,some:b,collect:d,map:d,detect:g,findAll:l,select:l,filter:l,grep:function(m,o,s){o=o||Prototype.K;var D=[];if(Object.isString(m))m=RegExp(RegExp.escape(m));this.each(function(T,ja){m.match(T)&&D.push(o.call(s,T,ja))});return D},include:n,member:n,inGroupsOf:function(m,o){o=Object.isUndefined(o)?null:o;return this.eachSlice(m,function(s){for(;s.length<m;)s.push(o);return s})},inject:function(m,o,s){this.each(function(D,T){m=o.call(s,m,D,T)});return m},invoke:function(m){var o=$A(arguments).slice(1);
return this.map(function(s){return s[m].apply(s,o)})},max:function(m,o){m=m||Prototype.K;var s;this.each(function(D,T){D=m.call(o,D,T);if(s==null||D>=s)s=D});return s},min:function(m,o){m=m||Prototype.K;var s;this.each(function(D,T){D=m.call(o,D,T);if(s==null||D<s)s=D});return s},partition:function(m,o){m=m||Prototype.K;var s=[],D=[];this.each(function(T,ja){(m.call(o,T,ja)?s:D).push(T)});return[s,D]},pluck:function(m){var o=[];this.each(function(s){o.push(s[m])});return o},reject:function(m,o){var s=
[];this.each(function(D,T){m.call(o,D,T)||s.push(D)});return s},sortBy:function(m,o){return this.map(function(s,D){return{value:s,criteria:m.call(o,s,D)}}).sort(function(s,D){var T=s.criteria,ja=D.criteria;return T<ja?-1:T>ja?1:0}).pluck("value")},toArray:j,entries:j,zip:function(){var m=Prototype.K,o=$A(arguments);if(Object.isFunction(o.last()))m=o.pop();var s=[this].concat(o).map($A);return this.map(function(D,T){return m(s.pluck(T))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+
this.toArray().inspect()+">"},find:g}}();function $A(a){if(!a)return[];if("toArray"in Object(a))return a.toArray();for(var b=a.length||0,d=Array(b);b--;)d[b]=a[b];return d}function $w(a){if(!Object.isString(a))return[];return(a=a.strip())?a.split(/\s+/):[]}Array.from=$A;
(function(){function a(o,s){for(var D=0,T=this.length>>>0;D<T;D++)D in this&&o.call(s,this[D],D,this)}function b(){return j.call(this,0)}function d(o,s){s||(s=0);var D=this.length;if(s<0)s=D+s;for(;s<D;s++)if(this[s]===o)return s;return-1}function g(o,s){s=isNaN(s)?this.length:(s<0?this.length+s:s)+1;var D=this.slice(0,s).reverse().indexOf(o);return D<0?D:s-D-1}function l(){for(var o=j.call(this,0),s,D=0,T=arguments.length;D<T;D++){s=arguments[D];if(Object.isArray(s)&&!("callee"in s))for(var ja=0,
Aa=s.length;ja<Aa;ja++)o.push(s[ja]);else o.push(s)}return o}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(o){return o!=null})},flatten:function(){return this.inject([],function(o,s){if(Object.isArray(s))return o.concat(s.flatten());o.push(s);
return o})},without:function(){var o=j.call(arguments,0);return this.select(function(s){return!o.include(s)})},reverse:function(o){return(o===false?this.toArray():this)._reverse()},uniq:function(o){return this.inject([],function(s,D,T){if(0==T||(o?s.last()!=D:!s.include(D)))s.push(D);return s})},intersect:function(o){return this.uniq().findAll(function(s){return o.detect(function(D){return s===D})})},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=d;if(!n.lastIndexOf)n.lastIndexOf=g})();function $H(a){return new Hash(a)}
var Hash=Class.create(Enumerable,function(){function a(){return Object.clone(this._object)}function b(d,g){if(Object.isUndefined(g))return d;return d+"="+encodeURIComponent(String.interpret(g))}return{initialize:function(d){this._object=Object.isHash(d)?d.toObject():Object.clone(d)},_each:function(d){for(var g in this._object){var l=this._object[g],n=[g,l];n.key=g;n.value=l;d(n)}},set:function(d,g){return this._object[d]=g},get:function(d){if(this._object[d]!==Object.prototype[d])return this._object[d]},
unset:function(d){var g=this._object[d];delete this._object[d];return g},toObject:a,toTemplateReplacements:a,keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(d){var g=this.detect(function(l){return l.value===d});return g&&g.key},merge:function(d){return this.clone().update(d)},update:function(d){return(new Hash(d)).inject(this,function(g,l){g.set(l.key,l.value);return g})},toQueryString:function(){return this.inject([],function(d,g){var l=encodeURIComponent(g.key),
n=g.value;if(n&&typeof n=="object"){if(Object.isArray(n)){for(var j=[],m=0,o=n.length,s;m<o;m++){s=n[m];j.push(b(l,s))}return d.concat(j)}}else d.push(b(l,n));return d}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(d){return d.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 d=this.toString(b||10);return"0".times(a-d.length)+d},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,d){return new ObjectRange(a,b,d)}
var ObjectRange=Class.create(Enumerable,function(){return{initialize:function(a,b,d){this.start=a;this.end=b;this.exclusive=d},_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,d,g){this.each(function(l){if(Object.isFunction(l[a]))try{l[a].apply(l,[b,d,g])}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,d){$super(d);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(d){this.dispatchException(d)}},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 d=0,g=b.length;d<g;d+=2)a[b[d]]=b[d+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(d){this.dispatchException(d)}var g=b.getHeader("Content-type");if(this.options.evalJS=="force"||this.options.evalJS&&this.isSameOrigin()&&g&&g.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,d,g){this.container={success:b.success||b,failure:b.failure||(b.success?null:b)};g=Object.clone(g);var l=g.onComplete;g.onComplete=function(n,j){this.updateContent(n.responseText);Object.isFunction(l)&&l(n,j)}.bind(this);$super(d,g)},updateContent:function(a){var b=this.container[this.success()?"success":"failure"],d=this.options;d.evalScripts||(a=a.stripScripts());if(b=$(b))if(d.insertion)if(Object.isString(d.insertion)){var g=
{};g[d.insertion]=a;b.insert(g)}else d.insertion(b,a);else b.update(a)}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,b,d,g){$super(g);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=b;this.url=d;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,d=[],g=arguments.length;b<g;b++)d.push($(arguments[b]));return d}if(Object.isString(a))a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,b){for(var d=[],g=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),l=0,n=g.snapshotLength;l<n;l++)d.push(Element.extend(g.snapshotItem(l)));return d};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 g=document.createElement('<input name="x">');return g.tagName.toLowerCase()==="input"&&g.name==="x"}catch(l){return false}}(),d=a.Element;a.Element=function(g,l){l=l||{};g=g.toLowerCase();var n=Element.cache;if(b&&l.name){g="<"+g+' name="'+l.name+'">';delete l.name;return Element.writeAttribute(document.createElement(g),l)}n[g]||(n[g]=Element.extend(document.createElement(g)));n=(g==="select"?false:"type"in l?false:true)?n[g].cloneNode(false):document.createElement(g);
return Element.writeAttribute(n,l)};Object.extend(a.Element,d||{});if(d)a.Element.prototype=d.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}}(),d=function(){try{var n=document.createElement("div");n.innerHTML="<link>";return n.childNodes.length===0}catch(j){return true}}(),g=a||b||d,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,o=n.getElementsByTagName("*"),s=o.length;s--;)m(o[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(g)if(m in Element._insertionTranslations.tags){for(;n.firstChild;)n.removeChild(n.firstChild);Element._getContentFromAnonymousElement(m,j.stripScripts()).each(function(D){n.appendChild(D)})}else if(d&&
Object.isString(j)&&j.indexOf("<link")>-1){for(;n.firstChild;)n.removeChild(n.firstChild);Element._getContentFromAnonymousElement(m,j.stripScripts(),true).each(function(D){n.appendChild(D)})}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 d=a.ownerDocument.createRange();d.selectNode(a);b.evalScripts.bind(b).defer();b=d.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 d,g,l,n;for(n in b){d=b[n];n=n.toLowerCase();g=Element._insertionTranslations[n];if(d&&d.toElement)d=d.toElement();if(Object.isElement(d))g(a,d);else{d=Object.toHTML(d);l=(n=="before"||n=="after"?a.parentNode:a).tagName.toUpperCase();l=Element._getContentFromAnonymousElement(l,d.stripScripts());if(n=="top"||n=="after")l.reverse();l.each(g.curry(a));d.evalScripts.bind(d).defer()}}return a},
wrap:function(a,b,d){a=$(a);if(Object.isElement(b))$(b).writeAttribute(d||{});else b=Object.isString(b)?new Element(b,d):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(d){var g=d.first();d=d.last();if(g=(a[g]||"").toString())b+=" "+d+"="+g.inspect(true)});return b+">"},recursivelyCollect:function(a,b,d){a=$(a);d=d||-1;for(var g=[];a=a[b];){a.nodeType==
1&&g.push(Element.extend(a));if(g.length==d)break}return g},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,d){a=$(a);if(arguments.length==1)return $(a.parentNode);var g=Element.ancestors(a);return Object.isNumber(b)?g[b]:Prototype.Selector.find(g,b,d)},down:function(a,b,d){a=$(a);if(arguments.length==1)return Element.firstDescendant(a);
return Object.isNumber(b)?Element.descendants(a)[b]:Element.select(a,b)[d||0]},previous:function(a,b,d){a=$(a);if(Object.isNumber(b)){d=b;b=false}Object.isNumber(d)||(d=0);return b?Prototype.Selector.find(a.previousSiblings(),b,d):a.recursivelyCollect("previousSibling",d+1)[d]},next:function(a,b,d){a=$(a);if(Object.isNumber(b)){d=b;b=false}Object.isNumber(d)||(d=0);if(b)return Prototype.Selector.find(a.nextSiblings(),b,d);else{Object.isNumber(d);return a.recursivelyCollect("nextSibling",d+1)[d]}},
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 d=
Element._attributeTranslations.read;if(d.values[b])return d.values[b](a,b);if(d.names[b])b=d.names[b];if(b.include(":"))return!a.attributes||!a.attributes[b]?null:a.attributes[b].value}return a.getAttribute(b)},writeAttribute:function(a,b,d){a=$(a);var g={},l=Element._attributeTranslations.write;if(typeof b=="object")g=b;else g[b]=Object.isUndefined(d)?true:d;for(var n in g){b=l.names[n]||n;d=g[n];if(l.values[n])b=l.values[n](a,d);if(d===false||d===null)a.removeAttribute(b);else d===true?a.setAttribute(b,
b):a.setAttribute(b,d)}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 d=a.className;return d.length>0&&(d==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}},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 d=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b);b=d}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 d=a.style[b];if(!d||d=="auto")d=(d=document.defaultView.getComputedStyle(a,null))?d[b]:null;if(b=="opacity")return d?parseFloat(d):1;return d=="auto"?null:d},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,
b){a=$(a);var d=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 g in b)if(g=="opacity")a.setOpacity(b[g]);else d[g=="float"||g=="cssFloat"?Object.isUndefined(d.styleFloat)?"cssFloat":"styleFloat":g]=b[g];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,d){d=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},d||{});b=$(b);var g=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(d.setLeft)a.style.left=g[0]-l[0]+d.offsetLeft+"px";if(d.setTop)a.style.top=
g[1]-l[1]+d.offsetTop+"px";if(d.setWidth)a.style.width=b.offsetWidth+"px";if(d.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,d){switch(d){case "height":case "width":if(!Element.visible(b))return null;var g=parseInt(a(b,d),10);if(g!==b["offset"+d.capitalize()])return g+"px";return(d==="height"?["border-top-width","padding-top","padding-bottom","border-bottom-width"]:["border-left-width","padding-left","padding-right","border-right-width"]).inject(g,function(l,n){var j=a(b,n);return j===null?l:l-parseInt(j,10)})+"px";default:return a(b,
d)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,b,d){if(d==="title")return b.title;return a(b,d)})}else if(Prototype.Browser.IE){Element.Methods.getStyle=function(a,b){a=$(a);b=b=="float"||b=="cssFloat"?"styleFloat":b.camelize();var d=a.style[b];if(!d&&a.currentStyle)d=a.currentStyle[b];if(b=="opacity"){if(d=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(d[1])return parseFloat(d[1])/100;return 1}if(d=="auto"){if((b=="width"||b=="height")&&a.getStyle("display")!=
"none")return a["offset"+b.capitalize()]+"px";return null}return d};Element.Methods.setOpacity=function(a,b){a=$(a);var d=a.currentStyle;if(d&&!d.hasLayout||!d&&a.style.zoom=="normal")a.style.zoom=1;d=a.getStyle("filter");var g=a.style;if(b==1||b===""){(d=d.replace(/alpha\([^\)]*\)/gi,""))?g.filter=d:g.removeAttribute("filter");return a}else if(b<1.0E-5)b=0;g.filter=d.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+b*100+")";return a};Element._attributeTranslations=function(){var a="className",b=
"for",d=document.createElement("div");d.setAttribute(a,"x");if(d.className!=="x"){d.setAttribute("class","x");if(d.className==="x")a="class"}d=null;d=document.createElement("label");d.setAttribute(b,"x");if(d.htmlFor!=="x"){d.setAttribute("htmlFor","x");if(d.htmlFor==="x")b="htmlFor"}d=null;return{read:{names:{"class":a,className:a,"for":b,htmlFor:b},values:{_getAttr:function(g,l){return g.getAttribute(l)},_getAttr2:function(g,l){return g.getAttribute(l,2)},_getAttrNode:function(g,l){var n=g.getAttributeNode(l);
return n?n.value:""},_getEv:function(){var g=document.createElement("div"),l;g.onclick=Prototype.emptyFunction;g=g.getAttribute("onclick");if(String(g).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(g==="")l=function(n,j){j=n.getAttribute(j);if(!j)return null;return j.strip()};g=null;return l}(),_flag:function(g,l){return $(g).hasAttribute(l)?l:null},style:function(g){return g.style.cssText.toLowerCase()},
title:function(g){return g.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,d){a=$(a);if(arguments.length==1)return a.firstDescendant();var g;if(Object.isNumber(b)){g=a.getElementsByTagName("*");for(var l=[],n=0,j;j=g[n];n++)j.tagName!=="!"&&l.push(j);g=l[b]}else g=Element.select(a,b)[d||0];return g}}()}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 d=document.createTextNode(" ");a.appendChild(d);a.removeChild(d)}catch(g){}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 d=a.parentNode,g=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[g]){var l=a.next();g=Element._getContentFromAnonymousElement(g,b.stripScripts());d.removeChild(a);l?g.each(function(n){d.insertBefore(n,l)}):g.each(function(n){d.appendChild(n)})}else a.outerHTML=b.stripScripts();
b.evalScripts.bind(b).defer();return a};Element._returnOffset=function(a,b){var d=[a,b];d.left=a;d.top=b;return d};Element._getContentFromAnonymousElement=function(a,b,d){var g=new Element("div");a=Element._insertionTranslations.tags[a];var l=false;if(a)l=true;else if(d){l=true;a=["","",0]}if(l){g.innerHTML="&nbsp;"+a[0]+b+a[1];g.removeChild(g.firstChild);for(b=a[2];b--;)g=g.firstChild}else g.innerHTML=b;return $A(g.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 d=$(a).getAttributeNode(b);return!!(d&&d.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 d={},g=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(d),j=l.tagName.toUpperCase();g[j]&&Object.extend(n,g[j]);a(l,n);l._extendedByPrototype=Prototype.emptyFunction;return l},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(d,
Element.Methods);Object.extend(d,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(o){o=o.toUpperCase();Element.Methods.ByTag[o]||(Element.Methods.ByTag[o]={});Object.extend(Element.Methods.ByTag[o],a)}function d(o,s,D){D=D||false;for(var T in o){var ja=o[T];if(Object.isFunction(ja))if(!D||!(T in s))s[T]=ja.methodize()}}function g(o){var s,D={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(D[o])s="HTML"+D[o]+"Element";if(window[s])return window[s];s="HTML"+o+"Element";if(window[s])return window[s];s="HTML"+o.capitalize()+"Element";if(window[s])return window[s];o=document.createElement(o);return o.__proto__||o.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){d(Element.Methods,j);d(Element.Methods.Simulated,j,true)}if(l.SpecificElementExtensions)for(var m in Element.Methods.ByTag){l=g(m);Object.isUndefined(l)||d(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(g.WebKit&&!l.evaluate)return document;if(g.Opera&&window.parseFloat(window.opera.version())<9.5)return document.body;return document.documentElement}function d(m){n||(n=b());j[m]="client"+m;a["get"+m]=function(){return n[j[m]]};return a["get"+m]()}var g=Prototype.Browser,l=document,n,j={};a.getWidth=d.curry("Width");a.getHeight=d.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,d){if(a=$(a)){arguments.length===2?Element.getStorage(a).update(b):Element.getStorage(a).set(b,d);return a}},retrieve:function(a,b,d){if(a=$(a)){a=Element.getStorage(a);var g=a.get(b);if(Object.isUndefined(g)){a.set(b,d);g=d}return g}},
clone:function(a,b){if(a=$(a)){var d=a.cloneNode(b);d._prototypeUID=void 0;if(b)for(var g=Element.select(d,"*"),l=g.length;l--;)g[l]._prototypeUID=void 0;return Element.extend(d)}},purge:function(a){if(a=$(a)){var b=Element._purgeElement;b(a);a=a.getElementsByTagName("*");for(var d=a.length;d--;)b(a[d]);return null}}});
(function(){function a(j,m,o){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 D=j.include("%"),T=o===document.viewport;if(/\d/.test(j)&&s&&s.runtimeStyle&&!(D&&T)){o=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=o;s.runtimeStyle.left=m;return j}if(s&&D){o=o||s.parentNode;j=(j=j.match(/^(\d+)%?$/i))?Number(j[1])/100:null;
D=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(o===document.viewport)if(s)D=document.viewport.getWidth();else{if(m)D=document.viewport.getHeight()}else if(s)D=$(o).measure("width");else if(m)D=$(o).measure("height");return D===null?0:D*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 d(j){j=$(j);var m=0,o=0;if(j.parentNode){do{m+=j.offsetTop||0;o+=j.offsetLeft||0;j=j.offsetParent}while(j)}return new Element.Offset(o,m)}function g(j){j=$(j);var m=j.getLayout(),o=0,s=0;do{o+=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");o-=m.get("margin-left");return new Element.Offset(s,o)}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,o){$super();this.element=$(m);Element.Layout.PROPERTIES.each(function(s){this._set(s,
null)},this);if(o){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 o=$super(m);return o===null?this._compute(m):o},_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 o=j.getStyle("width");if(o==="0px"||o===null){j.style.display="block";o=j.getStyle("width")}var s=m==="fixed"?document.viewport:j.parentNode;j.setStyle({position:"absolute",visibility:"hidden",display:"block"});var D=j.getStyle("width");m=o&&D===o?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(o){if(Element.Layout.PROPERTIES.include(o)){var s=this.get(o);if(s!=null)m[o]=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(o){if(Element.Layout.PROPERTIES.include(o))if(!Element.Layout.COMPOSITE_PROPERTIES.include(o)){var s=
this.get(o);if(s!=null){if(o.include("border"))o+="-width";o=o.camelize();m[o]=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"),o=this.get("border-bottom"),s=this.get("padding-top"),D=this.get("padding-bottom");this._preComputing||this._end();return j-m-o-s-D},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"),o=this.get("border-right"),
s=this.get("padding-left"),D=this.get("padding-right");this._preComputing||this._end();return j-m-o-s-D},"padding-box-height":function(){var j=this.get("height"),m=this.get("padding-top"),o=this.get("padding-bottom");return j+m+o},"padding-box-width":function(){var j=this.get("width"),m=this.get("padding-left"),o=this.get("padding-right");return j+m+o},"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"),o=this.get("margin-bottom");if(j<=0)return 0;return j+m+o},"margin-box-width":function(){var j=this.get("border-box-width"),m=this.get("margin-left"),o=this.get("margin-right");if(j<=0)return 0;return j+m+o},top:function(j){return j.positionedOffset().top},bottom:function(j){var m=j.positionedOffset();j=j.getOffsetParent().measure("height");
var o=this.get("border-box-height");return j-o-m.top},left:function(j){return j.positionedOffset().left},right:function(j){var m=j.positionedOffset();j=j.getOffsetParent().measure("width");var o=this.get("border-box-width");return j-o-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 o=m.getStyle("position");if(o!=="static")return j(m);m.setStyle({position:"relative"});var s=j(m);m.setStyle({position:o});return s});g=g.wrap(function(j,m){m=$(m);if(!m.parentNode)return new Element.Offset(0,
0);var o=m.getStyle("position");if(o!=="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:o});return s})}else if(Prototype.Browser.Webkit)d=function(j){j=$(j);var m=0,o=0;do{m+=j.offsetTop||0;o+=j.offsetLeft||0;if(j.offsetParent==document.body)if(Element.getStyle(j,"position")=="absolute")break;j=j.offsetParent}while(j);return new Element.Offset(o,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 o={visibility:"hidden",display:"block"};if(m.position!=="fixed")o.position="absolute";Element.setStyle(j,o);o={width:j.offsetWidth,height:j.offsetHeight};Element.setStyle(j,m);return o},getOffsetParent:b,cumulativeOffset:d,positionedOffset:g,
cumulativeScrollOffset:function(j){var m=0,o=0;do{m+=j.scrollTop||0;o+=j.scrollLeft||0;j=j.parentNode}while(j);return new Element.Offset(o,m)},viewportOffset:function(j){$(D);var m=0,o=0,s=document.body,D=j;do{m+=D.offsetTop||0;o+=D.offsetLeft||0;if(D.offsetParent==s&&Element.getStyle(D,"position")=="absolute")break}while(D=D.offsetParent);D=j;do if(D!=s){m-=D.scrollTop||0;o-=D.scrollLeft||0}while(D=D.parentNode);return new Element.Offset(o,m)},absolutize:function(j){j=$(j);if(Element.getStyle(j,
"position")==="absolute")return j;var m=b(j),o=j.viewportOffset();m=m.viewportOffset();o=o.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:o.top+"px",left:o.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(d){for(var g=0,l=d.length;g<l;g++)Element.extend(d[g]);return d}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(d,g,l){l=l||0;var n=Prototype.Selector.match,j=d.length,m=0,o;for(o=0;o<j;o++)if(n(d[o],g)&&l==m++)return Element.extend(d[o])},extendElements:Element.extend===b?b:a,extendElement:Element.extend}}();
Prototype._original_property=window.Sizzle;
(function(){function a(t,y,G,B,K,M){K=t=="previousSibling"&&!M;for(var q=0,C=B.length;q<C;q++){var E=B[q];if(E){if(K&&E.nodeType===1){E.sizcache=G;E.sizset=q}E=E[t];for(var Q=false;E;){if(E.sizcache===G){Q=B[E.sizset];break}if(E.nodeType===1&&!M){E.sizcache=G;E.sizset=q}if(E.nodeName===y){Q=E;break}E=E[t]}B[q]=Q}}}function b(t,y,G,B,K,M){K=t=="previousSibling"&&!M;for(var q=0,C=B.length;q<C;q++){var E=B[q];if(E){if(K&&E.nodeType===1){E.sizcache=G;E.sizset=q}E=E[t];for(var Q=false;E;){if(E.sizcache===
G){Q=B[E.sizset];break}if(E.nodeType===1){if(!M){E.sizcache=G;E.sizset=q}if(typeof y!=="string"){if(E===y){Q=true;break}}else if(m.filter(y,[E]).length>0){Q=E;break}}E=E[t]}B[q]=Q}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,g=0,l=Object.prototype.toString,n=false,j=true;[0,0].sort(function(){j=false;return 0});var m=function(t,y,G,B){G=G||[];var K=y=y||document;if(y.nodeType!==1&&y.nodeType!==9)return[];
if(!t||typeof t!=="string")return G;for(var M=[],q,C,E,Q,F=true,fa=Ea(y),da=t;(d.exec(""),q=d.exec(da))!==null;){da=q[3];M.push(q[1]);if(q[2]){Q=q[3];break}}if(M.length>1&&s.exec(t))if(M.length===2&&o.relative[M[0]])C=ta(M[0]+M[1],y);else for(C=o.relative[M[0]]?[y]:m(M.shift(),y);M.length;){t=M.shift();if(o.relative[t])t+=M.shift();C=ta(t,C)}else{if(!B&&M.length>1&&y.nodeType===9&&!fa&&o.match.ID.test(M[0])&&!o.match.ID.test(M[M.length-1])){q=m.find(M.shift(),y,fa);y=q.expr?m.filter(q.expr,q.set)[0]:
q.set[0]}if(y){q=B?{expr:M.pop(),set:T(B)}:m.find(M.pop(),M.length===1&&(M[0]==="~"||M[0]==="+")&&y.parentNode?y.parentNode:y,fa);C=q.expr?m.filter(q.expr,q.set):q.set;if(M.length>0)E=T(C);else F=false;for(;M.length;){var f=M.pop();q=f;if(o.relative[f])q=M.pop();else f="";if(q==null)q=y;o.relative[f](E,q,fa)}}else E=[]}E||(E=C);if(!E)throw"Syntax error, unrecognized expression: "+(f||t);if(l.call(E)==="[object Array]")if(F)if(y&&y.nodeType===1)for(t=0;E[t]!=null;t++){if(E[t]&&(E[t]===true||E[t].nodeType===
1&&wa(y,E[t])))G.push(C[t])}else for(t=0;E[t]!=null;t++)E[t]&&E[t].nodeType===1&&G.push(C[t]);else G.push.apply(G,E);else T(E,G);if(Q){m(Q,K,G,B);m.uniqueSort(G)}return G};m.uniqueSort=function(t){if(Aa){n=j;t.sort(Aa);if(n)for(var y=1;y<t.length;y++)t[y]===t[y-1]&&t.splice(y--,1)}return t};m.matches=function(t,y){return m(t,null,null,y)};m.find=function(t,y,G){var B,K;if(!t)return[];for(var M=0,q=o.order.length;M<q;M++){var C=o.order[M];if(K=o.leftMatch[C].exec(t)){var E=K[1];K.splice(1,1);if(E.substr(E.length-
1)!=="\\"){K[1]=(K[1]||"").replace(/\\/g,"");B=o.find[C](K,y,G);if(B!=null){t=t.replace(o.match[C],"");break}}}}B||(B=y.getElementsByTagName("*"));return{set:B,expr:t}};m.filter=function(t,y,G,B){for(var K=t,M=[],q=y,C,E,Q=y&&y[0]&&Ea(y[0]);t&&y.length;){for(var F in o.filter)if((C=o.match[F].exec(t))!=null){var fa=o.filter[F],da,f;E=false;if(q==M)M=[];if(o.preFilter[F])if(C=o.preFilter[F](C,q,G,M,B,Q)){if(C===true)continue}else E=da=true;if(C)for(var Ca=0;(f=q[Ca])!=null;Ca++)if(f){da=fa(f,C,Ca,
q);var Da=B^!!da;if(G&&da!=null)if(Da)E=true;else q[Ca]=false;else if(Da){M.push(f);E=true}}if(da!==undefined){G||(q=M);t=t.replace(o.match[F],"");if(!E)return[];break}}if(t==K)if(E==null)throw"Syntax error, unrecognized expression: "+t;else break;K=t}return q};var o=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(t){return t.getAttribute("href")}},relative:{"+":function(t,y,G){var B=typeof y==="string",K=B&&!/\W/.test(y);B=B&&!K;if(K&&!G)y=y.toUpperCase();G=0;K=t.length;
for(var M;G<K;G++)if(M=t[G]){for(;(M=M.previousSibling)&&M.nodeType!==1;);t[G]=B||M&&M.nodeName===y?M||false:M===y}B&&m.filter(y,t,true)},">":function(t,y,G){var B=typeof y==="string";if(B&&!/\W/.test(y)){y=G?y:y.toUpperCase();G=0;for(var K=t.length;G<K;G++){var M=t[G];if(M){B=M.parentNode;t[G]=B.nodeName===y?B:false}}}else{G=0;for(K=t.length;G<K;G++)if(M=t[G])t[G]=B?M.parentNode:M.parentNode===y;B&&m.filter(y,t,true)}},"":function(t,y,G){var B=g++,K=b;if(!/\W/.test(y)){var M=y=G?y:y.toUpperCase();
K=a}K("parentNode",y,B,t,M,G)},"~":function(t,y,G){var B=g++,K=b;if(typeof y==="string"&&!/\W/.test(y)){var M=y=G?y:y.toUpperCase();K=a}K("previousSibling",y,B,t,M,G)}},find:{ID:function(t,y,G){if(typeof y.getElementById!=="undefined"&&!G)return(t=y.getElementById(t[1]))?[t]:[]},NAME:function(t,y){if(typeof y.getElementsByName!=="undefined"){for(var G=[],B=y.getElementsByName(t[1]),K=0,M=B.length;K<M;K++)B[K].getAttribute("name")===t[1]&&G.push(B[K]);return G.length===0?null:G}},TAG:function(t,y){return y.getElementsByTagName(t[1])}},
preFilter:{CLASS:function(t,y,G,B,K,M){t=" "+t[1].replace(/\\/g,"")+" ";if(M)return t;M=0;for(var q;(q=y[M])!=null;M++)if(q)if(K^(q.className&&(" "+q.className+" ").indexOf(t)>=0))G||B.push(q);else if(G)y[M]=false;return false},ID:function(t){return t[1].replace(/\\/g,"")},TAG:function(t,y){for(var G=0;y[G]===false;G++);return y[G]&&Ea(y[G])?t[1]:t[1].toUpperCase()},CHILD:function(t){if(t[1]=="nth"){var y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(t[2]=="even"&&"2n"||t[2]=="odd"&&"2n+1"||!/\D/.test(t[2])&&"0n+"+
t[2]||t[2]);t[2]=y[1]+(y[2]||1)-0;t[3]=y[3]-0}t[0]=g++;return t},ATTR:function(t,y,G,B,K,M){y=t[1].replace(/\\/g,"");if(!M&&o.attrMap[y])t[1]=o.attrMap[y];if(t[2]==="~=")t[4]=" "+t[4]+" ";return t},PSEUDO:function(t,y,G,B,K){if(t[1]==="not")if((d.exec(t[3])||"").length>1||/^\w/.test(t[3]))t[3]=m(t[3],null,null,y);else{t=m.filter(t[3],y,G,true^K);G||B.push.apply(B,t);return false}else if(o.match.POS.test(t[0])||o.match.CHILD.test(t[0]))return true;return t},POS:function(t){t.unshift(true);return t}},
filters:{enabled:function(t){return t.disabled===false&&t.type!=="hidden"},disabled:function(t){return t.disabled===true},checked:function(t){return t.checked===true},selected:function(t){return t.selected===true},parent:function(t){return!!t.firstChild},empty:function(t){return!t.firstChild},has:function(t,y,G){return!!m(G[3],t).length},header:function(t){return/h\d/i.test(t.nodeName)},text:function(t){return"text"===t.type},radio:function(t){return"radio"===t.type},checkbox:function(t){return"checkbox"===
t.type},file:function(t){return"file"===t.type},password:function(t){return"password"===t.type},submit:function(t){return"submit"===t.type},image:function(t){return"image"===t.type},reset:function(t){return"reset"===t.type},button:function(t){return"button"===t.type||t.nodeName.toUpperCase()==="BUTTON"},input:function(t){return/input|select|textarea|button/i.test(t.nodeName)}},setFilters:{first:function(t,y){return y===0},last:function(t,y,G,B){return y===B.length-1},even:function(t,y){return y%2===
0},odd:function(t,y){return y%2===1},lt:function(t,y,G){return y<G[3]-0},gt:function(t,y,G){return y>G[3]-0},nth:function(t,y,G){return G[3]-0==y},eq:function(t,y,G){return G[3]-0==y}},filter:{PSEUDO:function(t,y,G,B){var K=y[1],M=o.filters[K];if(M)return M(t,G,y,B);else if(K==="contains")return(t.textContent||t.innerText||"").indexOf(y[3])>=0;else if(K==="not"){y=y[3];G=0;for(B=y.length;G<B;G++)if(y[G]===t)return false;return true}},CHILD:function(t,y){var G=y[1],B=t;switch(G){case "only":case "first":for(;B=
B.previousSibling;)if(B.nodeType===1)return false;if(G=="first")return true;B=t;case "last":for(;B=B.nextSibling;)if(B.nodeType===1)return false;return true;case "nth":G=y[2];var K=y[3];if(G==1&&K==0)return true;var M=y[0],q=t.parentNode;if(q&&(q.sizcache!==M||!t.nodeIndex)){var C=0;for(B=q.firstChild;B;B=B.nextSibling)if(B.nodeType===1)B.nodeIndex=++C;q.sizcache=M}B=t.nodeIndex-K;return G==0?B==0:B%G==0&&B/G>=0}},ID:function(t,y){return t.nodeType===1&&t.getAttribute("id")===y},TAG:function(t,y){return y===
"*"&&t.nodeType===1||t.nodeName===y},CLASS:function(t,y){return(" "+(t.className||t.getAttribute("class"))+" ").indexOf(y)>-1},ATTR:function(t,y){var G=y[1];G=o.attrHandle[G]?o.attrHandle[G](t):t[G]!=null?t[G]:t.getAttribute(G);var B=G+"",K=y[2],M=y[4];return G==null?K==="!=":K==="="?B===M:K==="*="?B.indexOf(M)>=0:K==="~="?(" "+B+" ").indexOf(M)>=0:!M?B&&G!==false:K==="!="?B!=M:K==="^="?B.indexOf(M)===0:K==="$="?B.substr(B.length-M.length)===M:K==="|="?B===M||B.substr(0,M.length+1)===M+"-":false},
POS:function(t,y,G,B){var K=o.setFilters[y[2]];if(K)return K(t,G,y,B)}}},s=o.match.POS,D;for(D in o.match){o.match[D]=RegExp(o.match[D].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[D]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[D].source)}var T=function(t,y){t=Array.prototype.slice.call(t,0);if(y){y.push.apply(y,t);return y}return t};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(ja){T=function(t,y){var G=y||[];if(l.call(t)==="[object Array]")Array.prototype.push.apply(G,
t);else if(typeof t.length==="number")for(var B=0,K=t.length;B<K;B++)G.push(t[B]);else for(B=0;t[B];B++)G.push(t[B]);return G}}var Aa;if(document.documentElement.compareDocumentPosition)Aa=function(t,y){if(!t.compareDocumentPosition||!y.compareDocumentPosition){if(t==y)n=true;return 0}var G=t.compareDocumentPosition(y)&4?-1:t===y?0:1;if(G===0)n=true;return G};else if("sourceIndex"in document.documentElement)Aa=function(t,y){if(!t.sourceIndex||!y.sourceIndex){if(t==y)n=true;return 0}var G=t.sourceIndex-
y.sourceIndex;if(G===0)n=true;return G};else if(document.createRange)Aa=function(t,y){if(!t.ownerDocument||!y.ownerDocument){if(t==y)n=true;return 0}var G=t.ownerDocument.createRange(),B=y.ownerDocument.createRange();G.setStart(t,0);G.setEnd(t,0);B.setStart(y,0);B.setEnd(y,0);G=G.compareBoundaryPoints(Range.START_TO_END,B);if(G===0)n=true;return G};(function(){var t=document.createElement("div"),y="script"+(new Date).getTime();t.innerHTML="<a name='"+y+"'/>";var G=document.documentElement;G.insertBefore(t,
G.firstChild);if(document.getElementById(y)){o.find.ID=function(B,K,M){if(typeof K.getElementById!=="undefined"&&!M)return(K=K.getElementById(B[1]))?K.id===B[1]||typeof K.getAttributeNode!=="undefined"&&K.getAttributeNode("id").nodeValue===B[1]?[K]:undefined:[]};o.filter.ID=function(B,K){var M=typeof B.getAttributeNode!=="undefined"&&B.getAttributeNode("id");return B.nodeType===1&&M&&M.nodeValue===K}}G.removeChild(t);G=t=null})();(function(){var t=document.createElement("div");t.appendChild(document.createComment(""));
if(t.getElementsByTagName("*").length>0)o.find.TAG=function(y,G){var B=G.getElementsByTagName(y[1]);if(y[1]==="*"){for(var K=[],M=0;B[M];M++)B[M].nodeType===1&&K.push(B[M]);B=K}return B};t.innerHTML="<a href='#'></a>";if(t.firstChild&&typeof t.firstChild.getAttribute!=="undefined"&&t.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(y){return y.getAttribute("href",2)};t=null})();document.querySelectorAll&&function(){var t=m,y=document.createElement("div");y.innerHTML="<p class='TEST'></p>";
if(!(y.querySelectorAll&&y.querySelectorAll(".TEST").length===0)){m=function(B,K,M,q){K=K||document;if(!q&&K.nodeType===9&&!Ea(K))try{return T(K.querySelectorAll(B),M)}catch(C){}return t(B,K,M,q)};for(var G in t)m[G]=t[G];y=null}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var t=document.createElement("div");t.innerHTML="<div class='test e'></div><div class='test'></div>";if(t.getElementsByClassName("e").length!==0){t.lastChild.className="e";if(t.getElementsByClassName("e").length!==
1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(y,G,B){if(typeof G.getElementsByClassName!=="undefined"&&!B)return G.getElementsByClassName(y[1])};t=null}}}();var wa=document.compareDocumentPosition?function(t,y){return t.compareDocumentPosition(y)&16}:function(t,y){return t!==y&&(t.contains?t.contains(y):true)},Ea=function(t){return t.nodeType===9&&t.documentElement.nodeName!=="HTML"||!!t.ownerDocument&&t.ownerDocument.documentElement.nodeName!=="HTML"},ta=function(t,y){for(var G=[],B="",K,
M=y.nodeType?[y]:y;K=o.match.PSEUDO.exec(t);){B+=K[0];t=t.replace(o.match.PSEUDO,"")}t=o.relative[t]?t+"*":t;K=0;for(var q=M.length;K<q;K++)m(t,M[K],G);return m.filter(B,G)};window.Sizzle=m})();(function(a){var b=Prototype.Selector.extendElements;Prototype.Selector.engine=a;Prototype.Selector.select=function(d,g){return b(a(d,g||document))};Prototype.Selector.match=function(d,g){return a.matches(g,[d]).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 d,g,l=false,n=b.submit,j,m;if(b.hash){m={};j=function(o,s,D){if(s in o){Object.isArray(o[s])||(o[s]=[o[s]]);o[s].push(D)}else o[s]=D;return o}}else{m="";j=function(o,s,D){return o+(o?"&":"")+encodeURIComponent(s)+"="+encodeURIComponent(D)}}return a.inject(m,function(o,s){if(!s.disabled&&s.name){d=s.name;g=$(s).getValue();if(g!=
null&&s.type!="file"&&(s.type!="submit"||!l&&n!==false&&(!n||d==n)&&(l=true)))o=j(o,d,g)}return o})}};
Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){a=$(a).getElementsByTagName("*");for(var b,d=[],g=Form.Element.Serializers,l=0;b=a[l];l++)d.push(b);return d.inject([],function(n,j){g[j.tagName.toLowerCase()]&&n.push(Element.extend(j));return n})},getInputs:function(a,b,d){a=$(a);a=a.getElementsByTagName("input");if(!b&&!d)return $A(a).map(Element.extend);for(var g=0,l=[],n=a.length;g<n;g++){var j=a[g];b&&j.type!=b||d&&j.name!=d||
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(d){return"hidden"!=d.type&&!d.disabled});var b=a.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0}).sortBy(function(d){return d.tabIndex}).first();return b?b:a.find(function(d){return/^(?:input|select|textarea)$/i.test(d.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 d=b.parameters,g=a.readAttribute("action")||"";if(g.blank())g=window.location.href;b.parameters=a.serialize(true);if(d){if(Object.isString(d))d=d.toQueryParams();Object.extend(b.parameters,d)}if(a.hasAttribute("method")&&!b.method)b.method=a.method;return new Ajax.Request(g,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 d={};d[a.name]=b;return Object.toQueryString(d)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var d=a.tagName.toLowerCase();Form.Element.Serializers[d](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 d(n){var j=n.selectedIndex;return j>=0?l(n.options[j]):null}function g(n){var j,m=n.length;if(!m)return null;var o=0;for(j=[];o<m;o++){var s=n.options[o];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"?d:g)(n);for(var m,o,s=!Object.isArray(j),D=0,T=n.length;D<T;D++){m=n.options[D];o=this.optionValue(m);if(s){if(o==j){m.selected=true;break}}else m.selected=j.include(o)}},selectOne:d,selectMany:g,optionValue:l,button:b}}();
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,b,d,g){$super(g,d);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(q,C){return q.which?q.which===C+1:q.button===C}function b(q,C){return q.button===ta[C]}function d(q,C){switch(C){case 0:return q.which==1&&!q.metaKey;case 1:return q.which==2||q.which==1&&q.metaKey;case 2:return q.which==3;default:return false}}function g(q){var C=document.documentElement,E=document.body||{scrollLeft:0};return q.pageX||q.clientX+(C.scrollLeft||E.scrollLeft)-(C.clientLeft||0)}function l(q){var C=document.documentElement,E=document.body||{scrollTop:0};return q.pageY||
q.clientY+(C.scrollTop||E.scrollTop)-(C.clientTop||0)}function n(q,C,E){var Q=Element.retrieve(q,"prototype_event_registry");if(Object.isUndefined(Q)){B.push(q);Q=Element.retrieve(q,"prototype_event_registry",$H())}var F=Q.get(C);if(Object.isUndefined(F)){F=[];Q.set(C,F)}if(F.pluck("handler").include(E))return false;var fa;if(C.include(":"))fa=function(da){if(Object.isUndefined(da.eventName))return false;if(da.eventName!==C)return false;T.extend(da,q);E.call(q,da)};else if(!Aa&&(C==="mouseenter"||
C==="mouseleave")){if(C==="mouseenter"||C==="mouseleave")fa=function(da){T.extend(da,q);for(var f=da.relatedTarget;f&&f!==q;)try{f=f.parentNode}catch(Ca){f=q}f!==q&&E.call(q,da)}}else fa=function(da){T.extend(da,q);E.call(q,da)};fa.handler=E;F.push(fa);return fa}function j(){for(var q=0,C=B.length;q<C;q++){T.stopObserving(B[q]);B[q]=null}}function m(q,C,E){q=$(q);E=n(q,C,E);if(!E)return q;if(C.include(":"))if(q.addEventListener)q.addEventListener("dataavailable",E,false);else{q.attachEvent("ondataavailable",
E);q.attachEvent("onlosecapture",E)}else{C=K(C);q.addEventListener?q.addEventListener(C,E,false):q.attachEvent("on"+C,E)}return q}function o(q,C,E){q=$(q);var Q=Element.retrieve(q,"prototype_event_registry");if(!Q)return q;if(!C){Q.each(function(f){o(q,f.key)});return q}var F=Q.get(C);if(!F)return q;if(!E){F.each(function(f){o(q,C,f.handler)});return q}for(var fa=F.length,da;fa--;)if(F[fa].handler===E){da=F[fa];break}if(!da)return q;if(C.include(":"))if(q.removeEventListener)q.removeEventListener("dataavailable",
da,false);else{q.detachEvent("ondataavailable",da);q.detachEvent("onlosecapture",da)}else{E=K(C);q.removeEventListener?q.removeEventListener(E,da,false):q.detachEvent("on"+E,da)}Q.set(C,F.without(da));return q}function s(q,C,E,Q){q=$(q);if(Object.isUndefined(Q))Q=true;if(q==document&&document.createEvent&&!q.dispatchEvent)q=document.documentElement;var F;if(document.createEvent){F=document.createEvent("HTMLEvents");F.initEvent("dataavailable",Q,true)}else{F=document.createEventObject();F.eventType=
Q?"ondataavailable":"onlosecapture"}F.eventName=C;F.memo=E||{};document.createEvent?q.dispatchEvent(F):q.fireEvent(F.eventType,F);return T.extend(F)}function D(q,C,E,Q){q=$(q);if(Object.isFunction(E)&&Object.isUndefined(Q)){Q=E;E=null}return(new T.Handler(q,C,E,Q)).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:{}},ja=document.documentElement,Aa=
"onmouseenter"in ja&&"onmouseleave"in ja,wa=function(){return false};if(window.attachEvent)wa=window.addEventListener?function(q){return!(q instanceof window.Event)}:function(){return true};var Ea,ta={0:1,1:4,2:2};Ea=window.attachEvent?window.addEventListener?function(q,C){return wa(q)?b(q,C):a(q,C)}:b:Prototype.Browser.WebKit?d:a;T.Methods={isLeftClick:function(q){return Ea(q,0)},isMiddleClick:function(q){return Ea(q,1)},isRightClick:function(q){return Ea(q,2)},element:function(q){q=T.extend(q);
var C=q.target,E=q.type;if((q=q.currentTarget)&&q.tagName)if(E==="load"||E==="error"||E==="click"&&q.tagName.toLowerCase()==="input"&&q.type==="radio")C=q;if(C.nodeType==Node.TEXT_NODE)C=C.parentNode;return Element.extend(C)},findElement:function(q,C){var E=T.element(q);if(!C)return E;for(;E;){if(Object.isElement(E)&&Prototype.Selector.match(E,C))return Element.extend(E);E=E.parentNode}},pointer:function(q){return{x:g(q),y:l(q)}},pointerX:g,pointerY:l,stop:function(q){T.extend(q);q.preventDefault();
q.stopPropagation();q.stopped=true}};var t=Object.keys(T.Methods).inject({},function(q,C){q[C]=T.Methods[C].methodize();return q});if(window.attachEvent){var y=function(q){switch(q.type){case "mouseover":case "mouseenter":q=q.fromElement;break;case "mouseout":case "mouseleave":q=q.toElement;break;default:return null}return Element.extend(q)},G={stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}};T.extend=
function(q,C){if(!q)return false;if(!wa(q))return q;if(q._extendedByPrototype)return q;q._extendedByPrototype=Prototype.emptyFunction;var E=T.pointer(q);Object.extend(q,{target:q.srcElement||C,relatedTarget:y(q),pageX:E.x,pageY:E.y});Object.extend(q,t);Object.extend(q,G);return q}}else T.extend=Prototype.K;if(window.addEventListener){T.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(T.prototype,t)}var B=[];Prototype.Browser.IE&&window.attachEvent("onunload",
j);Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,false);var K=Prototype.K,M={mouseenter:"mouseover",mouseleave:"mouseout"};Aa||(K=function(q){return M[q]||q});T.Handler=Class.create({initialize:function(q,C,E,Q){this.element=$(q);this.eventName=C;this.selector=E;this.callback=Q;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(q){var C=T.findElement(q,this.selector);C&&this.callback.call(this.element,q,C)}});Object.extend(T,T.Methods);Object.extend(T,{fire:s,observe:m,stopObserving:o,on:D});Element.addMethods({fire:s,observe:m,stopObserving:o,on:D});Object.extend(document,{fire:s.methodize(),observe:m.methodize(),stopObserving:o.methodize(),on:D.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,T);else window.Event=T})();
(function(){function a(){if(!document.loaded){g&&window.clearTimeout(g);document.loaded=true;document.fire("dom:loaded")}}function b(){if(document.readyState==="complete"){document.stopObserving("readystatechange",b);a()}}function d(){try{document.documentElement.doScroll("left")}catch(l){g=d.defer();return}a()}var g;if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,false);else{document.observe("readystatechange",b);if(window==top)g=d.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,d){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,b,d);this.xcomp=b;this.ycomp=d;this.offset=Element.cumulativeOffset(a);return d>=this.offset[1]&&d<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,b,d){var g=Element.cumulativeScrollOffset(a);this.xcomp=b+g[0]-this.deltaX;this.ycomp=d+g[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,d){d=d||{};return Element.clonePosition(b,a,d)}};
if(!document.getElementsByClassName)document.getElementsByClassName=function(a){function b(d){return d.blank()?null:"[contains(concat(' ', @class, ' '), ' "+d+" ')]"}a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(d,g){g=g.toString().strip();var l=/\s/.test(g)?$w(g).map(b).join(""):b(g);return l?document._getElementsByXPath(".//*"+l,d):[]}:function(d,g){g=g.toString().strip();var l=[],n=/\s/.test(g)?$w(g):null;if(!n&&!g)return l;var j=$(d).getElementsByTagName("*");g=" "+g+" ";for(var m=
0,o,s;o=j[m];m++)if(o.className&&(s=" "+o.className+" ")&&(s.include(g)||n&&n.all(function(D){return!D.toString().blank()&&s.include(" "+D+" ")})))l.push(Element.extend(o));return l};return function(d,g){return $(g||document.body).getElementsByClassName(d)}}(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 d=Prototype.Selector.match,g=[],l=0,n=a.length;l<n;l++){var j=a[l];d(j,b)&&g.push(Element.extend(j))}return g},
findElement:function(a,b,d){d=d||0;for(var g=0,l,n=0,j=a.length;n<j;n++){l=a[n];if(Prototype.Selector.match(l,b)&&d===g++)return Element.extend(l)}},findChildElements:function(a,b){var d=b.toArray().join(", ");return Prototype.Selector.select(d,a||document)}})})();
(function(a,b){function d(c){var e=Ca[c]={},h,i;c=c.split(/\s+/);h=0;for(i=c.length;h<i;h++)e[c[h]]=true;return e}function g(c,e,h){if(h===b&&c.nodeType===1){h="data-"+e.replace(xa,"-$1").toLowerCase();h=c.getAttribute(h);if(typeof h==="string"){try{h=h==="true"?true:h==="false"?false:h==="null"?null:f.isNumeric(h)?parseFloat(h):Ma.test(h)?f.parseJSON(h):h}catch(i){}f.data(c,e,h)}else h=b}return h}function l(c){for(var e in c)if(!(e==="data"&&f.isEmptyObject(c[e])))if(e!=="toJSON")return false;return true}
function n(c,e,h){var i=e+"defer",k=e+"queue",p=e+"mark",u=f._data(c,i);if(u&&(h==="queue"||!f._data(c,k))&&(h==="mark"||!f._data(c,p)))setTimeout(function(){if(!f._data(c,k)&&!f._data(c,p)){f.removeData(c,i,true);u.fire()}},0)}function j(){return false}function m(){return true}function o(c,e,h){e=e||0;if(f.isFunction(e))return f.grep(c,function(k,p){return!!e.call(k,p,k)===h});else if(e.nodeType)return f.grep(c,function(k){return k===e===h});else if(typeof e==="string"){var i=f.grep(c,function(k){return k.nodeType===
1});if(Ib.test(e))return f.filter(e,i,!h);else e=f.filter(e,i)}return f.grep(c,function(k){return f.inArray(k,e)>=0===h})}function s(c){var e=pb.split("|");c=c.createDocumentFragment();if(c.createElement)for(;e.length;)c.createElement(e.pop());return c}function D(c,e){if(!(e.nodeType!==1||!f.hasData(c))){var h,i,k;i=f._data(c);var p=f._data(e,i),u=i.events;if(u){delete p.handle;p.events={};for(h in u){i=0;for(k=u[h].length;i<k;i++)f.event.add(e,h+(u[h][i].namespace?".":"")+u[h][i].namespace,u[h][i],
u[h][i].data)}}if(p.data)p.data=f.extend({},p.data)}}function T(c,e){var h;if(e.nodeType===1){e.clearAttributes&&e.clearAttributes();e.mergeAttributes&&e.mergeAttributes(c);h=e.nodeName.toLowerCase();if(h==="object")e.outerHTML=c.outerHTML;else if(h==="input"&&(c.type==="checkbox"||c.type==="radio")){if(c.checked)e.defaultChecked=e.checked=c.checked;if(e.value!==c.value)e.value=c.value}else if(h==="option")e.selected=c.defaultSelected;else if(h==="input"||h==="textarea")e.defaultValue=c.defaultValue;
e.removeAttribute(f.expando)}}function ja(c){return typeof c.getElementsByTagName!=="undefined"?c.getElementsByTagName("*"):typeof c.querySelectorAll!=="undefined"?c.querySelectorAll("*"):[]}function Aa(c){if(c.type==="checkbox"||c.type==="radio")c.defaultChecked=c.checked}function wa(c){var e=(c.nodeName||"").toLowerCase();if(e==="input")Aa(c);else e!=="script"&&typeof c.getElementsByTagName!=="undefined"&&f.grep(c.getElementsByTagName("input"),Aa)}function Ea(c,e){e.src?f.ajax({url:e.src,async:false,
dataType:"script"}):f.globalEval((e.text||e.textContent||e.innerHTML||"").replace(Jb,"/*$0*/"));e.parentNode&&e.parentNode.removeChild(e)}function ta(c,e,h){var i=e==="width"?c.offsetWidth:c.offsetHeight,k=e==="width"?Kb:Lb,p=0,u=k.length;if(i>0){if(h!=="border")for(;p<u;p++){h||(i-=parseFloat(f.css(c,"padding"+k[p]))||0);if(h==="margin")i+=parseFloat(f.css(c,h+k[p]))||0;else i-=parseFloat(f.css(c,"border"+k[p]+"Width"))||0}return i+"px"}i=Xa(c,e,e);if(i<0||i==null)i=c.style[e]||0;i=parseFloat(i)||
0;if(h)for(;p<u;p++){i+=parseFloat(f.css(c,"padding"+k[p]))||0;if(h!=="padding")i+=parseFloat(f.css(c,"border"+k[p]+"Width"))||0;if(h==="margin")i+=parseFloat(f.css(c,h+k[p]))||0}return i+"px"}function t(c){return function(e,h){if(typeof e!=="string"){h=e;e="*"}if(f.isFunction(h))for(var i=e.toLowerCase().split(qb),k=0,p=i.length,u,z;k<p;k++){u=i[k];if(z=/^\+/.test(u))u=u.substr(1)||"*";u=c[u]=c[u]||[];u[z?"unshift":"push"](h)}}}function y(c,e,h,i,k,p){k=k||e.dataTypes[0];p=p||{};p[k]=true;k=c[k];
for(var u=0,z=k?k.length:0,A=c===jb,N;u<z&&(A||!N);u++){N=k[u](e,h,i);if(typeof N==="string")if(!A||p[N])N=b;else{e.dataTypes.unshift(N);N=y(c,e,h,i,N,p)}}if((A||!N)&&!p["*"])N=y(c,e,h,i,"*",p);return N}function G(c,e){var h,i,k=f.ajaxSettings.flatOptions||{};for(h in e)if(e[h]!==b)(k[h]?c:i||(i={}))[h]=e[h];i&&f.extend(true,c,i)}function B(c,e,h,i){if(f.isArray(e))f.each(e,function(p,u){h||Mb.test(c)?i(c,u):B(c+"["+(typeof u==="object"||f.isArray(u)?p:"")+"]",u,h,i)});else if(!h&&e!=null&&typeof e===
"object")for(var k in e)B(c+"["+k+"]",e[k],h,i);else i(c,e)}function K(){try{return new a.XMLHttpRequest}catch(c){}}function M(){setTimeout(q,0);return eb=f.now()}function q(){eb=b}function C(c,e){var h={};f.each(rb.concat.apply([],rb.slice(0,e)),function(){h[this]=c});return h}function E(c){if(!kb[c]){var e=F.body,h=f("<"+c+">").appendTo(e),i=h.css("display");h.remove();if(i==="none"||i===""){if(!La){La=F.createElement("iframe");La.frameBorder=La.width=La.height=0}e.appendChild(La);if(!Ya||!La.createElement){Ya=
(La.contentWindow||La.contentDocument).document;Ya.write((F.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>");Ya.close()}h=Ya.createElement(c);Ya.body.appendChild(h);i=f.css(h,"display");e.removeChild(La)}kb[c]=i}return kb[c]}function Q(c){return f.isWindow(c)?c:c.nodeType===9?c.defaultView||c.parentWindow:false}var F=a.document,fa=a.navigator,da=a.location,f=function(){function c(){if(!e.isReady){try{F.documentElement.doScroll("left")}catch(w){setTimeout(c,1);return}e.ready()}}var e=
function(w,S){return new e.fn.init(w,S,k)},h=a.jQuery,i=a.$,k,p=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,u=/\S/,z=/^\s+/,A=/\s+$/,N=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Y=/^[\],:{}\s]*$/,P=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,aa=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,V=/(?:^|:|,)(?:\s*\[)+/g,ka=/(webkit)[ \/]([\w.]+)/,pa=/(opera)(?:.*version)?[ \/]([\w.]+)/,ua=/(msie) ([\w.]+)/,ra=/(mozilla)(?:.*? rv:([\w.]+))?/,Na=/-([a-z]|[0-9])/ig,Fa=/^-ms-/,la=function(w,S){return(S+"").toUpperCase()},
Ha=fa.userAgent,r,v,H=Object.prototype.toString,I=Object.prototype.hasOwnProperty,L=Array.prototype.push,O=Array.prototype.slice,ba=String.prototype.trim,W=Array.prototype.indexOf,ma={};e.fn=e.prototype={constructor:e,init:function(w,S,X){var U;if(!w)return this;if(w.nodeType){this.context=this[0]=w;this.length=1;return this}if(w==="body"&&!S&&F.body){this.context=F;this[0]=F.body;this.selector=w;this.length=1;return this}if(typeof w==="string")if((U=w.charAt(0)==="<"&&w.charAt(w.length-1)===">"&&
w.length>=3?[null,w,null]:p.exec(w))&&(U[1]||!S))if(U[1]){X=(S=S instanceof e?S[0]:S)?S.ownerDocument||S:F;if(w=N.exec(w))if(e.isPlainObject(S)){w=[F.createElement(w[1])];e.fn.attr.call(w,S,true)}else w=[X.createElement(w[1])];else{w=e.buildFragment([U[1]],[X]);w=(w.cacheable?e.clone(w.fragment):w.fragment).childNodes}return e.merge(this,w)}else{if((S=F.getElementById(U[2]))&&S.parentNode){if(S.id!==U[2])return X.find(w);this.length=1;this[0]=S}this.context=F;this.selector=w;return this}else return!S||
S.jquery?(S||X).find(w):this.constructor(S).find(w);else if(e.isFunction(w))return X.ready(w);if(w.selector!==b){this.selector=w.selector;this.context=w.context}return e.makeArray(w,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return O.call(this,0)},get:function(w){return w==null?this.toArray():w<0?this[this.length+w]:this[w]},pushStack:function(w,S,X){var U=this.constructor();e.isArray(w)?L.apply(U,w):e.merge(U,w);U.prevObject=this;U.context=this.context;
if(S==="find")U.selector=this.selector+(this.selector?" ":"")+X;else if(S)U.selector=this.selector+"."+S+"("+X+")";return U},each:function(w,S){return e.each(this,w,S)},ready:function(w){e.bindReady();r.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(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(w){return this.pushStack(e.map(this,
function(S,X){return w.call(S,X,S)}))},end:function(){return this.prevObject||this.constructor(null)},push:L,sort:[].sort,splice:[].splice};e.fn.init.prototype=e.fn;e.extend=e.fn.extend=function(){var w,S,X,U,ia,ea=arguments[0]||{},sa=1,ya=arguments.length,Ra=false;if(typeof ea==="boolean"){Ra=ea;ea=arguments[1]||{};sa=2}if(typeof ea!=="object"&&!e.isFunction(ea))ea={};if(ya===sa){ea=this;--sa}for(;sa<ya;sa++)if((w=arguments[sa])!=null)for(S in w){X=ea[S];U=w[S];if(ea!==U)if(Ra&&U&&(e.isPlainObject(U)||
(ia=e.isArray(U)))){if(ia){ia=false;X=X&&e.isArray(X)?X:[]}else X=X&&e.isPlainObject(X)?X:{};ea[S]=e.extend(Ra,X,U)}else if(U!==b)ea[S]=U}return ea};e.extend({noConflict:function(w){if(a.$===e)a.$=i;if(w&&a.jQuery===e)a.jQuery=h;return e},isReady:false,readyWait:1,holdReady:function(w){if(w)e.readyWait++;else e.ready(true)},ready:function(w){if(w===true&&!--e.readyWait||w!==true&&!e.isReady){if(!F.body)return setTimeout(e.ready,1);e.isReady=true;if(!(w!==true&&--e.readyWait>0)){r.fireWith(F,[e]);
e.fn.trigger&&e(F).trigger("ready").off("ready")}}},bindReady:function(){if(!r){r=e.Callbacks("once memory");if(F.readyState==="complete")return setTimeout(e.ready,1);if(F.addEventListener){F.addEventListener("DOMContentLoaded",v,false);a.addEventListener("load",e.ready,false)}else if(F.attachEvent){F.attachEvent("onreadystatechange",v);a.attachEvent("onload",e.ready);var w=false;try{w=a.frameElement==null}catch(S){}F.documentElement.doScroll&&w&&c()}}},isFunction:function(w){return e.type(w)==="function"},
isArray:Array.isArray||function(w){return e.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):ma[H.call(w)]||"object"},isPlainObject:function(w){if(!w||e.type(w)!=="object"||w.nodeType||e.isWindow(w))return false;try{if(w.constructor&&!I.call(w,"constructor")&&!I.call(w.constructor.prototype,"isPrototypeOf"))return false}catch(S){return false}for(var X in w);
return X===b||I.call(w,X)},isEmptyObject:function(w){for(var S in w)return false;return true},error:function(w){throw Error(w);},parseJSON:function(w){if(typeof w!=="string"||!w)return null;w=e.trim(w);if(a.JSON&&a.JSON.parse)return a.JSON.parse(w);if(Y.test(w.replace(P,"@").replace(aa,"]").replace(V,"")))return(new Function("return "+w))();e.error("Invalid JSON: "+w)},parseXML:function(w){var S,X;try{if(a.DOMParser){X=new DOMParser;S=X.parseFromString(w,"text/xml")}else{S=new ActiveXObject("Microsoft.XMLDOM");
S.async="false";S.loadXML(w)}}catch(U){S=b}if(!S||!S.documentElement||S.getElementsByTagName("parsererror").length)e.error("Invalid XML: "+w);return S},noop:function(){},globalEval:function(w){if(w&&u.test(w))(a.execScript||function(S){a.eval.call(a,S)})(w)},camelCase:function(w){return w.replace(Fa,"ms-").replace(Na,la)},nodeName:function(w,S){return w.nodeName&&w.nodeName.toUpperCase()===S.toUpperCase()},each:function(w,S,X){var U,ia=0,ea=w.length,sa=ea===b||e.isFunction(w);if(X)if(sa)for(U in w){if(S.apply(w[U],
X)===false)break}else for(;ia<ea;){if(S.apply(w[ia++],X)===false)break}else if(sa)for(U in w){if(S.call(w[U],U,w[U])===false)break}else for(;ia<ea;)if(S.call(w[ia],ia,w[ia++])===false)break;return w},trim:ba?function(w){return w==null?"":ba.call(w)}:function(w){return w==null?"":w.toString().replace(z,"").replace(A,"")},makeArray:function(w,S){var X=S||[];if(w!=null){var U=e.type(w);w.length==null||U==="string"||U==="function"||U==="regexp"||e.isWindow(w)?L.call(X,w):e.merge(X,w)}return X},inArray:function(w,
S,X){var U;if(S){if(W)return W.call(S,w,X);U=S.length;for(X=X?X<0?Math.max(0,U+X):X:0;X<U;X++)if(X in S&&S[X]===w)return X}return-1},merge:function(w,S){var X=w.length,U=0;if(typeof S.length==="number")for(var ia=S.length;U<ia;U++)w[X++]=S[U];else for(;S[U]!==b;)w[X++]=S[U++];w.length=X;return w},grep:function(w,S,X){var U=[],ia;X=!!X;for(var ea=0,sa=w.length;ea<sa;ea++){ia=!!S(w[ea],ea);X!==ia&&U.push(w[ea])}return U},map:function(w,S,X){var U,ia,ea=[],sa=0,ya=w.length;if(w instanceof e||ya!==b&&
typeof ya==="number"&&(ya>0&&w[0]&&w[ya-1]||ya===0||e.isArray(w)))for(;sa<ya;sa++){U=S(w[sa],sa,X);if(U!=null)ea[ea.length]=U}else for(ia in w){U=S(w[ia],ia,X);if(U!=null)ea[ea.length]=U}return ea.concat.apply([],ea)},guid:1,proxy:function(w,S){if(typeof S==="string"){var X=w[S];S=w;w=X}if(!e.isFunction(w))return b;var U=O.call(arguments,2);X=function(){return w.apply(S,U.concat(O.call(arguments)))};X.guid=w.guid=w.guid||X.guid||e.guid++;return X},access:function(w,S,X,U,ia,ea){var sa=w.length;if(typeof S===
"object"){for(var ya in S)e.access(w,ya,S[ya],U,ia,X);return w}if(X!==b){U=!ea&&U&&e.isFunction(X);for(ya=0;ya<sa;ya++)ia(w[ya],S,U?X.call(w[ya],ya,ia(w[ya],S)):X,ea);return w}return sa?ia(w[0],S):b},now:function(){return(new Date).getTime()},uaMatch:function(w){w=w.toLowerCase();w=ka.exec(w)||pa.exec(w)||ua.exec(w)||w.indexOf("compatible")<0&&ra.exec(w)||[];return{browser:w[1]||"",version:w[2]||"0"}},sub:function(){function w(X,U){return new w.fn.init(X,U)}e.extend(true,w,this);w.superclass=this;
w.fn=w.prototype=this();w.fn.constructor=w;w.sub=this.sub;w.fn.init=function(X,U){if(U&&U instanceof e&&!(U instanceof w))U=w(U);return e.fn.init.call(this,X,U,S)};w.fn.init.prototype=w.fn;var S=w(F);return w},browser:{}});e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(w,S){ma["[object "+S+"]"]=S.toLowerCase()});Ha=e.uaMatch(Ha);if(Ha.browser){e.browser[Ha.browser]=true;e.browser.version=Ha.version}if(e.browser.webkit)e.browser.safari=true;if(u.test("\u00a0")){z=
/^[\s\xA0]+/;A=/[\s\xA0]+$/}k=e(F);if(F.addEventListener)v=function(){F.removeEventListener("DOMContentLoaded",v,false);e.ready()};else if(F.attachEvent)v=function(){if(F.readyState==="complete"){F.detachEvent("onreadystatechange",v);e.ready()}};return e}(),Ca={};f.Callbacks=function(c){c=c?Ca[c]||d(c):{};var e=[],h=[],i,k,p,u,z,A=function(P){var aa,V,ka,pa;aa=0;for(V=P.length;aa<V;aa++){ka=P[aa];pa=f.type(ka);if(pa==="array")A(ka);else if(pa==="function")if(!c.unique||!Y.has(ka))e.push(ka)}},N=function(P,
aa){aa=aa||[];i=!c.memory||[P,aa];k=true;z=p||0;p=0;for(u=e.length;e&&z<u;z++)if(e[z].apply(P,aa)===false&&c.stopOnFalse){i=true;break}k=false;if(e)if(c.once)if(i===true)Y.disable();else e=[];else if(h&&h.length){i=h.shift();Y.fireWith(i[0],i[1])}},Y={add:function(){if(e){var P=e.length;A(arguments);if(k)u=e.length;else if(i&&i!==true){p=P;N(i[0],i[1])}}return this},remove:function(){if(e)for(var P=arguments,aa=0,V=P.length;aa<V;aa++)for(var ka=0;ka<e.length;ka++)if(P[aa]===e[ka]){if(k)if(ka<=u){u--;
ka<=z&&z--}e.splice(ka--,1);if(c.unique)break}return this},has:function(P){if(e)for(var aa=0,V=e.length;aa<V;aa++)if(P===e[aa])return true;return false},empty:function(){e=[];return this},disable:function(){e=h=i=b;return this},disabled:function(){return!e},lock:function(){h=b;if(!i||i===true)Y.disable();return this},locked:function(){return!h},fireWith:function(P,aa){if(h)if(k)c.once||h.push([P,aa]);else c.once&&i||N(P,aa);return this},fire:function(){Y.fireWith(this,arguments);return this},fired:function(){return!!i}};
return Y};var Da=[].slice;f.extend({Deferred:function(c){var e=f.Callbacks("once memory"),h=f.Callbacks("once memory"),i=f.Callbacks("memory"),k="pending",p={resolve:e,reject:h,notify:i},u={done:e.add,fail:h.add,progress:i.add,state:function(){return k},isResolved:e.fired,isRejected:h.fired,then:function(N,Y,P){z.done(N).fail(Y).progress(P);return this},always:function(){z.done.apply(z,arguments).fail.apply(z,arguments);return this},pipe:function(N,Y,P){return f.Deferred(function(aa){f.each({done:[N,
"resolve"],fail:[Y,"reject"],progress:[P,"notify"]},function(V,ka){var pa=ka[0],ua=ka[1],ra;f.isFunction(pa)?z[V](function(){(ra=pa.apply(this,arguments))&&f.isFunction(ra.promise)?ra.promise().then(aa.resolve,aa.reject,aa.notify):aa[ua+"With"](this===z?aa:this,[ra])}):z[V](aa[ua])})}).promise()},promise:function(N){if(N==null)N=u;else for(var Y in u)N[Y]=u[Y];return N}},z=u.promise({}),A;for(A in p){z[A]=p[A].fire;z[A+"With"]=p[A].fireWith}z.done(function(){k="resolved"},h.disable,i.lock).fail(function(){k=
"rejected"},e.disable,i.lock);c&&c.call(z,z);return z},when:function(c){function e(Y){return function(P){i[Y]=arguments.length>1?Da.call(arguments,0):P;--z||A.resolveWith(A,i)}}function h(Y){return function(P){u[Y]=arguments.length>1?Da.call(arguments,0):P;A.notifyWith(N,u)}}var i=Da.call(arguments,0),k=0,p=i.length,u=Array(p),z=p,A=p<=1&&c&&f.isFunction(c.promise)?c:f.Deferred(),N=A.promise();if(p>1){for(;k<p;k++)if(i[k]&&i[k].promise&&f.isFunction(i[k].promise))i[k].promise().then(e(k),A.reject,
h(k));else--z;z||A.resolveWith(A,i)}else if(A!==c)A.resolveWith(A,p?[c]:[]);return N}});f.support=function(){var c,e,h,i,k,p,u,z,A=F.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'/>";e=A.getElementsByTagName("*");h=A.getElementsByTagName("a")[0];if(!e||!e.length||!h)return{};i=F.createElement("select");k=i.appendChild(F.createElement("option"));e=A.getElementsByTagName("input")[0];
c={leadingWhitespace:A.firstChild.nodeType===3,tbody:!A.getElementsByTagName("tbody").length,htmlSerialize:!!A.getElementsByTagName("link").length,style:/top/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:e.value==="on",optSelected:k.selected,getSetAttribute:A.className!=="t",enctype:!!F.createElement("form").enctype,html5Clone:F.createElement("nav").cloneNode(true).outerHTML!=="<:nav></:nav>",submitBubbles:true,
changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};e.checked=true;c.noCloneChecked=e.cloneNode(true).checked;i.disabled=true;c.optDisabled=!k.disabled;try{delete A.test}catch(N){c.deleteExpando=false}if(!A.addEventListener&&A.attachEvent&&A.fireEvent){A.attachEvent("onclick",function(){c.noCloneEvent=false});A.cloneNode(true).fireEvent("onclick")}e=F.createElement("input");e.value="t";e.setAttribute("type",
"radio");c.radioValue=e.value==="t";e.setAttribute("checked","checked");A.appendChild(e);h=F.createDocumentFragment();h.appendChild(A.lastChild);c.checkClone=h.cloneNode(true).cloneNode(true).lastChild.checked;c.appendChecked=e.checked;h.removeChild(e);h.appendChild(A);A.innerHTML="";if(a.getComputedStyle){e=F.createElement("div");e.style.width="0";e.style.marginRight="0";A.style.width="2px";A.appendChild(e);c.reliableMarginRight=(parseInt((a.getComputedStyle(e,null)||{marginRight:0}).marginRight,
10)||0)===0}if(A.attachEvent)for(u in{submit:1,change:1,focusin:1}){e="on"+u;z=e in A;if(!z){A.setAttribute(e,"return;");z=typeof A[e]==="function"}c[u+"Bubbles"]=z}h.removeChild(A);h=i=k=e=A=e=null;f(function(){var Y,P,aa,V,ka=F.getElementsByTagName("body")[0];if(ka){Y=F.createElement("div");Y.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";ka.insertBefore(Y,ka.firstChild);A=F.createElement("div");Y.appendChild(A);A.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
p=A.getElementsByTagName("td");z=p[0].offsetHeight===0;p[0].style.display="";p[1].style.display="none";c.reliableHiddenOffsets=z&&p[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>";P=A.firstChild;aa=P.firstChild;V={doesNotAddBorder:aa.offsetTop!==5,doesAddBorderForTableAndCells:P.nextSibling.firstChild.firstChild.offsetTop===5};aa.style.position="fixed";aa.style.top="20px";
V.fixedPosition=aa.offsetTop===20||aa.offsetTop===15;aa.style.position=aa.style.top="";P.style.overflow="hidden";P.style.position="relative";V.subtractsBorderForOverflowNotVisible=aa.offsetTop===-5;V.doesNotIncludeMarginInBodyOffset=ka.offsetTop!==1;ka.removeChild(Y);A=null;f.extend(c,V)}});return c}();var Ma=/^(?:\{.*\}|\[.*\])$/,xa=/([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,e,h,i){if(f.acceptData(c)){var k;k=f.expando;var p=typeof e==="string",u=c.nodeType,z=u?f.cache:c,A=u?c[k]:c[k]&&k,N=e==="events";if(!((!A||!z[A]||!N&&!i&&!z[A].data)&&p&&h===b)){if(!A)if(u)c[k]=A=++f.uuid;else A=k;if(!z[A]){z[A]={};if(!u)z[A].toJSON=f.noop}if(typeof e==="object"||typeof e==="function")if(i)z[A]=f.extend(z[A],e);else z[A].data=f.extend(z[A].data,e);k=c=z[A];if(!i){if(!c.data)c.data=
{};c=c.data}if(h!==b)c[f.camelCase(e)]=h;if(N&&!c[e])return k.events;if(p){h=c[e];if(h==null)h=c[f.camelCase(e)]}else h=c;return h}}},removeData:function(c,e,h){if(f.acceptData(c)){var i,k,p,u=f.expando,z=c.nodeType,A=z?f.cache:c,N=z?c[u]:u;if(A[N]){if(e)if(i=h?A[N]:A[N].data){if(!f.isArray(e))if(e in i)e=[e];else{e=f.camelCase(e);e=e in i?[e]:e.split(" ")}k=0;for(p=e.length;k<p;k++)delete i[e[k]];if(!(h?l:f.isEmptyObject)(i))return}if(!h){delete A[N].data;if(!l(A[N]))return}if(f.support.deleteExpando||
!A.setInterval)delete A[N];else A[N]=null;if(z)if(f.support.deleteExpando)delete c[u];else if(c.removeAttribute)c.removeAttribute(u);else c[u]=null}}},_data:function(c,e,h){return f.data(c,e,h,true)},acceptData:function(c){if(c.nodeName){var e=f.noData[c.nodeName.toLowerCase()];if(e)return!(e===true||c.getAttribute("classid")!==e)}return true}});f.fn.extend({data:function(c,e){var h,i,k,p=null;if(typeof c==="undefined"){if(this.length){p=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){i=
this[0].attributes;for(var u=0,z=i.length;u<z;u++){k=i[u].name;if(k.indexOf("data-")===0){k=f.camelCase(k.substring(5));g(this[0],k,p[k])}}f._data(this[0],"parsedAttrs",true)}}return p}else if(typeof c==="object")return this.each(function(){f.data(this,c)});h=c.split(".");h[1]=h[1]?"."+h[1]:"";if(e===b){p=this.triggerHandler("getData"+h[1]+"!",[h[0]]);if(p===b&&this.length){p=f.data(this[0],c);p=g(this[0],c,p)}return p===b&&h[1]?this.data(h[0]):p}else return this.each(function(){var A=f(this),N=[h[0],
e];A.triggerHandler("setData"+h[1]+"!",N);f.data(this,c,e);A.triggerHandler("changeData"+h[1]+"!",N)})},removeData:function(c){return this.each(function(){f.removeData(this,c)})}});f.extend({_mark:function(c,e){if(c){e=(e||"fx")+"mark";f._data(c,e,(f._data(c,e)||0)+1)}},_unmark:function(c,e,h){if(c!==true){h=e;e=c;c=false}if(e){h=h||"fx";var i=h+"mark";if(c=c?0:(f._data(e,i)||1)-1)f._data(e,i,c);else{f.removeData(e,i,true);n(e,h,"mark")}}},queue:function(c,e,h){var i;if(c){e=(e||"fx")+"queue";i=f._data(c,
e);if(h)if(!i||f.isArray(h))i=f._data(c,e,f.makeArray(h));else i.push(h);return i||[]}},dequeue:function(c,e){e=e||"fx";var h=f.queue(c,e),i=h.shift(),k={};if(i==="inprogress")i=h.shift();if(i){e==="fx"&&h.unshift("inprogress");f._data(c,e+".run",k);i.call(c,function(){f.dequeue(c,e)},k)}if(!h.length){f.removeData(c,e+"queue "+e+".run",true);n(c,e,"queue")}}});f.fn.extend({queue:function(c,e){if(typeof c!=="string"){e=c;c="fx"}if(e===b)return f.queue(this[0],c);return this.each(function(){var h=f.queue(this,
c,e);c==="fx"&&h[0]!=="inprogress"&&f.dequeue(this,c)})},dequeue:function(c){return this.each(function(){f.dequeue(this,c)})},delay:function(c,e){c=f.fx?f.fx.speeds[c]||c:c;e=e||"fx";return this.queue(e,function(h,i){var k=setTimeout(h,c);i.stop=function(){clearTimeout(k)}})},clearQueue:function(c){return this.queue(c||"fx",[])},promise:function(c){function e(){--p||h.resolveWith(i,[i])}if(typeof c!=="string")c=b;c=c||"fx";var h=f.Deferred(),i=this,k=i.length,p=1,u=c+"defer",z=c+"queue";c=c+"mark";
for(var A;k--;)if(A=f.data(i[k],u,b,true)||(f.data(i[k],z,b,true)||f.data(i[k],c,b,true))&&f.data(i[k],u,f.Callbacks("once memory"),true)){p++;A.add(e)}e();return h.promise()}});var Ba=/[\n\t\r]/g,qa=/\s+/,Ia=/\r/g,Oa=/^(?:button|input)$/i,ha=/^(?:button|input|object|select|textarea)$/i,J=/^a(?:rea)?$/i,R=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Z=f.support.getSetAttribute,ca,ga,oa;f.fn.extend({attr:function(c,e){return f.access(this,
c,e,true,f.attr)},removeAttr:function(c){return this.each(function(){f.removeAttr(this,c)})},prop:function(c,e){return f.access(this,c,e,true,f.prop)},removeProp:function(c){c=f.propFix[c]||c;return this.each(function(){try{this[c]=b;delete this[c]}catch(e){}})},addClass:function(c){var e,h,i,k,p,u,z;if(f.isFunction(c))return this.each(function(A){f(this).addClass(c.call(this,A,this.className))});if(c&&typeof c==="string"){e=c.split(qa);h=0;for(i=this.length;h<i;h++){k=this[h];if(k.nodeType===1)if(!k.className&&
e.length===1)k.className=c;else{p=" "+k.className+" ";u=0;for(z=e.length;u<z;u++)~p.indexOf(" "+e[u]+" ")||(p+=e[u]+" ");k.className=f.trim(p)}}}return this},removeClass:function(c){var e,h,i,k,p,u,z;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){e=(c||"").split(qa);h=0;for(i=this.length;h<i;h++){k=this[h];if(k.nodeType===1&&k.className)if(c){p=(" "+k.className+" ").replace(Ba," ");u=0;for(z=e.length;u<z;u++)p=
p.replace(" "+e[u]+" "," ");k.className=f.trim(p)}else k.className=""}}return this},toggleClass:function(c,e){var h=typeof c,i=typeof e==="boolean";if(f.isFunction(c))return this.each(function(k){f(this).toggleClass(c.call(this,k,this.className,e),e)});return this.each(function(){if(h==="string")for(var k,p=0,u=f(this),z=e,A=c.split(qa);k=A[p++];){z=i?z:!u.hasClass(k);u[z?"addClass":"removeClass"](k)}else if(h==="undefined"||h==="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 e=0,h=this.length;e<h;e++)if(this[e].nodeType===1&&(" "+this[e].className+" ").replace(Ba," ").indexOf(c)>-1)return true;return false},val:function(c){var e,h,i,k=this[0];if(arguments.length){i=f.isFunction(c);return this.each(function(p){var u=f(this);if(this.nodeType===1){p=i?c.call(this,p,u.val()):c;if(p==null)p="";else if(typeof p==="number")p+="";else if(f.isArray(p))p=f.map(p,
function(z){return z==null?"":z+""});e=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!e||!("set"in e)||e.set(this,p,"value")===b)this.value=p}})}else if(k){if((e=f.valHooks[k.nodeName.toLowerCase()]||f.valHooks[k.type])&&"get"in e&&(h=e.get(k,"value"))!==b)return h;h=k.value;return typeof h==="string"?h.replace(Ia,""):h==null?"":h}}});f.extend({valHooks:{option:{get:function(c){var e=c.attributes.value;return!e||e.specified?c.value:c.text}},select:{get:function(c){var e,h,i=c.selectedIndex,
k=[],p=c.options,u=c.type==="select-one";if(i<0)return null;c=u?i:0;for(h=u?i+1:p.length;c<h;c++){e=p[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){e=f(e).val();if(u)return e;k.push(e)}}if(u&&!k.length&&p.length)return f(p[i]).val();return k},set:function(c,e){var h=f.makeArray(e);f(c).find("option").each(function(){this.selected=f.inArray(f(this).val(),h)>=0});if(!h.length)c.selectedIndex=-1;
return h}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(c,e,h,i){var k,p,u=c.nodeType;if(!(!c||u===3||u===8||u===2)){if(i&&e in f.attrFn)return f(c)[e](h);if(typeof c.getAttribute==="undefined")return f.prop(c,e,h);if(i=u!==1||!f.isXMLDoc(c)){e=e.toLowerCase();p=f.attrHooks[e]||(R.test(e)?ga:ca)}if(h!==b)if(h===null)f.removeAttr(c,e);else if(p&&"set"in p&&i&&(k=p.set(c,h,e))!==b)return k;else{c.setAttribute(e,""+h);return h}else if(p&&
"get"in p&&i&&(k=p.get(c,e))!==null)return k;else{k=c.getAttribute(e);return k===null?b:k}}},removeAttr:function(c,e){var h,i,k,p,u=0;if(e&&c.nodeType===1){i=e.toLowerCase().split(qa);for(p=i.length;u<p;u++)if(k=i[u]){h=f.propFix[k]||k;f.attr(c,k,"");c.removeAttribute(Z?k:h);if(R.test(k)&&h in c)c[h]=false}}},attrHooks:{type:{set:function(c,e){if(Oa.test(c.nodeName)&&c.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&e==="radio"&&f.nodeName(c,"input")){var h=c.value;
c.setAttribute("type",e);if(h)c.value=h;return e}}},value:{get:function(c,e){if(ca&&f.nodeName(c,"button"))return ca.get(c,e);return e in c?c.value:null},set:function(c,e,h){if(ca&&f.nodeName(c,"button"))return ca.set(c,e,h);c.value=e}}},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,e,h){var i,k,p=c.nodeType;if(!(!c||p===3||p===8||p===2)){if(p!==1||!f.isXMLDoc(c)){e=f.propFix[e]||e;k=f.propHooks[e]}return h!==b?k&&"set"in k&&(i=k.set(c,h,e))!==b?i:c[e]=h:k&&"get"in k&&(i=k.get(c,e))!==null?i:c[e]}},propHooks:{tabIndex:{get:function(c){var e=c.getAttributeNode("tabindex");return e&&e.specified?parseInt(e.value,10):ha.test(c.nodeName)||J.test(c.nodeName)&&c.href?0:b}}}});f.attrHooks.tabindex=f.propHooks.tabIndex;ga={get:function(c,e){var h,i=f.prop(c,e);return i===
true||typeof i!=="boolean"&&(h=c.getAttributeNode(e))&&h.nodeValue!==false?e.toLowerCase():b},set:function(c,e,h){if(e===false)f.removeAttr(c,h);else{e=f.propFix[h]||h;if(e in c)c[e]=true;c.setAttribute(h,h.toLowerCase())}return h}};if(!Z){oa={name:true,id:true};ca=f.valHooks.button={get:function(c,e){var h;return(h=c.getAttributeNode(e))&&(oa[e]?h.nodeValue!=="":h.specified)?h.nodeValue:b},set:function(c,e,h){var i=c.getAttributeNode(h);if(!i){i=F.createAttribute(h);c.setAttributeNode(i)}return i.nodeValue=
e+""}};f.attrHooks.tabindex.set=ca.set;f.each(["width","height"],function(c,e){f.attrHooks[e]=f.extend(f.attrHooks[e],{set:function(h,i){if(i===""){h.setAttribute(e,"auto");return i}}})});f.attrHooks.contenteditable={get:ca.get,set:function(c,e,h){if(e==="")e="false";ca.set(c,e,h)}}}f.support.hrefNormalized||f.each(["href","src","width","height"],function(c,e){f.attrHooks[e]=f.extend(f.attrHooks[e],{get:function(h){h=h.getAttribute(e,2);return h===null?b:h}})});if(!f.support.style)f.attrHooks.style=
{get:function(c){return c.style.cssText.toLowerCase()||b},set:function(c,e){return c.style.cssText=""+e}};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,
e){if(f.isArray(e))return c.checked=f.inArray(f(c).val(),e)>=0}})});var na=/^(?:textarea|input|select)$/i,va=/^([^\.]*)?(?:\.(.+))?$/,za=/\bhover(\.\S+)?\b/,Sa=/^key/,Za=/^(?:mouse|contextmenu)|click/,Ja=/^(?:focusinfocus|focusoutblur)$/,Ka=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,$a=function(c){if(c=Ka.exec(c)){c[1]=(c[1]||"").toLowerCase();c[3]=c[3]&&RegExp("(?:^|\\s)"+c[3]+"(?:\\s|$)")}return c},Ta=function(c){return f.event.special.hover?c:c.replace(za,"mouseenter$1 mouseleave$1")};f.event={add:function(c,
e,h,i,k){var p,u,z,A,N,Y,P,aa,V;if(!(c.nodeType===3||c.nodeType===8||!e||!h||!(p=f._data(c)))){if(h.handler){P=h;h=P.handler}if(!h.guid)h.guid=f.guid++;z=p.events;if(!z)p.events=z={};u=p.handle;if(!u){p.handle=u=function(ka){return typeof f!=="undefined"&&(!ka||f.event.triggered!==ka.type)?f.event.dispatch.apply(u.elem,arguments):b};u.elem=c}e=f.trim(Ta(e)).split(" ");for(p=0;p<e.length;p++){A=va.exec(e[p])||[];N=A[1];Y=(A[2]||"").split(".").sort();V=f.event.special[N]||{};N=(k?V.delegateType:V.bindType)||
N;V=f.event.special[N]||{};A=f.extend({type:N,origType:A[1],data:i,handler:h,guid:h.guid,selector:k,quick:$a(k),namespace:Y.join(".")},P);aa=z[N];if(!aa){aa=z[N]=[];aa.delegateCount=0;if(!V.setup||V.setup.call(c,i,Y,u)===false)if(c.addEventListener)c.addEventListener(N,u,false);else c.attachEvent&&c.attachEvent("on"+N,u)}if(V.add){V.add.call(c,A);if(!A.handler.guid)A.handler.guid=h.guid}k?aa.splice(aa.delegateCount++,0,A):aa.push(A);f.event.global[N]=true}c=null}},global:{},remove:function(c,e,h,
i,k){var p=f.hasData(c)&&f._data(c),u,z,A,N,Y,P,aa,V,ka,pa;if(p&&(aa=p.events)){e=f.trim(Ta(e||"")).split(" ");for(u=0;u<e.length;u++){z=va.exec(e[u])||[];A=N=z[1];z=z[2];if(A){V=f.event.special[A]||{};A=(i?V.delegateType:V.bindType)||A;ka=aa[A]||[];Y=ka.length;z=z?RegExp("(^|\\.)"+z.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(P=0;P<ka.length;P++){pa=ka[P];if((k||N===pa.origType)&&(!h||h.guid===pa.guid)&&(!z||z.test(pa.namespace))&&(!i||i===pa.selector||i==="**"&&pa.selector)){ka.splice(P--,
1);pa.selector&&ka.delegateCount--;V.remove&&V.remove.call(c,pa)}}if(ka.length===0&&Y!==ka.length){if(!V.teardown||V.teardown.call(c,z)===false)f.removeEvent(c,A,p.handle);delete aa[A]}}else for(A in aa)f.event.remove(c,A+e[u],h,i,true)}if(f.isEmptyObject(aa)){if(e=p.handle)e.elem=null;f.removeData(c,["events","handle"],true)}}},customEvent:{getData:true,setData:true,changeData:true},trigger:function(c,e,h,i){if(!(h&&(h.nodeType===3||h.nodeType===8))){var k=c.type||c,p=[],u,z,A,N,Y;if(!Ja.test(k+
f.event.triggered)){if(k.indexOf("!")>=0){k=k.slice(0,-1);u=true}if(k.indexOf(".")>=0){p=k.split(".");k=p.shift();p.sort()}if(!((!h||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=u;c.namespace=p.join(".");c.namespace_re=c.namespace?RegExp("(^|\\.)"+p.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;u=k.indexOf(":")<0?"on"+k:"";if(h){c.result=b;if(!c.target)c.target=h;e=e!=null?f.makeArray(e):[];e.unshift(c);
A=f.event.special[k]||{};if(!(A.trigger&&A.trigger.apply(h,e)===false)){Y=[[h,A.bindType||k]];if(!i&&!A.noBubble&&!f.isWindow(h)){N=A.delegateType||k;p=Ja.test(N+k)?h:h.parentNode;for(z=null;p;p=p.parentNode){Y.push([p,N]);z=p}if(z&&z===h.ownerDocument)Y.push([z.defaultView||z.parentWindow||a,N])}for(z=0;z<Y.length&&!c.isPropagationStopped();z++){p=Y[z][0];c.type=Y[z][1];(N=(f._data(p,"events")||{})[c.type]&&f._data(p,"handle"))&&N.apply(p,e);(N=u&&p[u])&&f.acceptData(p)&&N.apply(p,e)===false&&c.preventDefault()}c.type=
k;if(!i&&!c.isDefaultPrevented())if((!A._default||A._default.apply(h.ownerDocument,e)===false)&&!(k==="click"&&f.nodeName(h,"a"))&&f.acceptData(h))if(u&&h[k]&&(k!=="focus"&&k!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(h)){if(z=h[u])h[u]=null;f.event.triggered=k;h[k]();f.event.triggered=b;if(z)h[u]=z}return c.result}}else{h=f.cache;for(z in h)h[z].events&&h[z].events[k]&&f.event.trigger(c,e,h[z].handle.elem,true)}}}}},dispatch:function(c){c=f.event.fix(c||a.event);var e=(f._data(this,"events")||
{})[c.type]||[],h=e.delegateCount,i=[].slice.call(arguments,0),k=!c.exclusive&&!c.namespace,p=[],u,z,A,N,Y,P,aa;i[0]=c;c.delegateTarget=this;if(h&&!c.target.disabled&&!(c.button&&c.type==="click")){A=f(this);A.context=this.ownerDocument||this;for(z=c.target;z!=this;z=z.parentNode||this){Y={};P=[];A[0]=z;for(u=0;u<h;u++){N=e[u];aa=N.selector;if(Y[aa]===b){var V=Y,ka=aa,pa;if(N.quick){pa=N.quick;var ua=z.attributes||{};pa=(!pa[1]||z.nodeName.toLowerCase()===pa[1])&&(!pa[2]||(ua.id||{}).value===pa[2])&&
(!pa[3]||pa[3].test((ua["class"]||{}).value))}else pa=A.is(aa);V[ka]=pa}Y[aa]&&P.push(N)}P.length&&p.push({elem:z,matches:P})}}e.length>h&&p.push({elem:this,matches:e.slice(h)});for(u=0;u<p.length&&!c.isPropagationStopped();u++){h=p[u];c.currentTarget=h.elem;for(e=0;e<h.matches.length&&!c.isImmediatePropagationStopped();e++){N=h.matches[e];if(k||!c.namespace&&!N.namespace||c.namespace_re&&c.namespace_re.test(N.namespace)){c.data=N.data;c.handleObj=N;N=((f.event.special[N.origType]||{}).handle||N.handler).apply(h.elem,
i);if(N!==b){c.result=N;if(N===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,e){if(c.which==null)c.which=e.charCode!=null?e.charCode:e.keyCode;return c}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter:function(c,e){var h,i,k=e.button,p=e.fromElement;if(c.pageX==null&&e.clientX!=null){h=c.target.ownerDocument||F;i=h.documentElement;h=h.body;c.pageX=e.clientX+(i&&i.scrollLeft||h&&h.scrollLeft||0)-(i&&i.clientLeft||h&&h.clientLeft||0);c.pageY=e.clientY+(i&&i.scrollTop||h&&h.scrollTop||0)-(i&&i.clientTop||h&&h.clientTop||0)}if(!c.relatedTarget&&p)c.relatedTarget=p===c.target?e.toElement:p;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 e,
h,i=c,k=f.event.fixHooks[c.type]||{},p=k.props?this.props.concat(k.props):this.props;c=f.Event(i);for(e=p.length;e;){h=p[--e];c[h]=i[h]}if(!c.target)c.target=i.srcElement||F;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,e,h){if(f.isWindow(this))this.onbeforeunload=h},teardown:function(c,
e){if(this.onbeforeunload===e)this.onbeforeunload=null}}},simulate:function(c,e,h,i){c=f.extend(new f.Event,h,{type:c,isSimulated:true,originalEvent:{}});i?f.event.trigger(c,null,e):f.event.dispatch.call(e,c);c.isDefaultPrevented()&&h.preventDefault()}};f.event.handle=f.event.dispatch;f.removeEvent=F.removeEventListener?function(c,e,h){c.removeEventListener&&c.removeEventListener(e,h,false)}:function(c,e,h){c.detachEvent&&c.detachEvent("on"+e,h)};f.Event=function(c,e){if(!(this instanceof f.Event))return new f.Event(c,
e);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;e&&f.extend(this,e);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,e){f.event.special[c]={delegateType:e,bindType:e,handle:function(h){var i=h.relatedTarget,k=h.handleObj,p;if(!i||i!==this&&!f.contains(this,i)){h.type=k.origType;p=k.handler.apply(this,arguments);
h.type=e}return p}}});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(e){this.parentNode&&!e.isTrigger&&f.event.simulate("submit",this.parentNode,e,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(na.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(na.test(c.nodeName)&&!c._change_attached){f.event.add(c,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&f.event.simulate("change",this.parentNode,e,true)});c._change_attached=true}})},handle:function(c){var e=c.target;if(this!==e||c.isSimulated||c.isTrigger||e.type!=="radio"&&e.type!=="checkbox")return c.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return na.test(this.nodeName)}};f.support.focusinBubbles||
f.each({focus:"focusin",blur:"focusout"},function(c,e){var h=0,i=function(k){f.event.simulate(e,k.target,f.event.fix(k),true)};f.event.special[e]={setup:function(){h++===0&&F.addEventListener(c,i,true)},teardown:function(){--h===0&&F.removeEventListener(c,i,true)}}});f.fn.extend({on:function(c,e,h,i,k){var p,u;if(typeof c==="object"){if(typeof e!=="string"){h=e;e=b}for(u in c)this.on(u,e,h,c[u],k);return this}if(h==null&&i==null){i=e;h=e=b}else if(i==null)if(typeof e==="string"){i=h;h=b}else{i=h;
h=e;e=b}if(i===false)i=j;else if(!i)return this;if(k===1){p=i;i=function(z){f().off(z);return p.apply(this,arguments)};i.guid=p.guid||(p.guid=f.guid++)}return this.each(function(){f.event.add(this,c,i,h,e)})},one:function(c,e,h,i){return this.on.call(this,c,e,h,i,1)},off:function(c,e,h){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,e,c[i]);return this}if(e===
false||typeof e==="function"){h=e;e=b}if(h===false)h=j;return this.each(function(){f.event.remove(this,c,h,e)})},bind:function(c,e,h){return this.on(c,null,e,h)},unbind:function(c,e){return this.off(c,null,e)},live:function(c,e,h){f(this.context).on(c,this.selector,e,h);return this},die:function(c,e){f(this.context).off(c,this.selector||"**",e);return this},delegate:function(c,e,h,i){return this.on(e,c,h,i)},undelegate:function(c,e,h){return arguments.length==1?this.off(c,"**"):this.off(e,c,h)},trigger:function(c,
e){return this.each(function(){f.event.trigger(c,e,this)})},triggerHandler:function(c,e){if(this[0])return f.event.trigger(c,e,this[0],true)},toggle:function(c){var e=arguments,h=c.guid||f.guid++,i=0,k=function(p){var u=(f._data(this,"lastToggle"+c.guid)||0)%i;f._data(this,"lastToggle"+c.guid,u+1);p.preventDefault();return e[u].apply(this,arguments)||false};for(k.guid=h;i<e.length;)e[i++].guid=h;return this.click(k)},hover:function(c,e){return this.mouseenter(c).mouseleave(e||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,e){f.fn[e]=function(h,i){if(i==null){i=h;h=null}return arguments.length>0?this.on(e,null,h,i):this.trigger(e)};if(f.attrFn)f.attrFn[e]=true;if(Sa.test(e))f.event.fixHooks[e]=f.event.keyHooks;if(Za.test(e))f.event.fixHooks[e]=f.event.mouseHooks});(function(){function c(r,v,H,I,L,O){L=0;for(var ba=I.length;L<ba;L++){var W=I[L];if(W){var ma=false;for(W=W[r];W;){if(W[i]===H){ma=I[W.sizset];break}if(W.nodeType===1&&!O){W[i]=H;W.sizset=L}if(W.nodeName.toLowerCase()===v){ma=W;break}W=W[r]}I[L]=
ma}}}function e(r,v,H,I,L,O){L=0;for(var ba=I.length;L<ba;L++){var W=I[L];if(W){var ma=false;for(W=W[r];W;){if(W[i]===H){ma=I[W.sizset];break}if(W.nodeType===1){if(!O){W[i]=H;W.sizset=L}if(typeof v!=="string"){if(W===v){ma=true;break}}else if(P.filter(v,[W]).length>0){ma=W;break}}W=W[r]}I[L]=ma}}}var h=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),k=0,p=Object.prototype.toString,
u=false,z=true,A=/\\/g,N=/\r\n/g,Y=/\W/;[0,0].sort(function(){z=false;return 0});var P=function(r,v,H,I){H=H||[];var L=v=v||F;if(v.nodeType!==1&&v.nodeType!==9)return[];if(!r||typeof r!=="string")return H;var O,ba,W,ma,w,S=true,X=P.isXML(v),U=[],ia=r;do{h.exec("");if(O=h.exec(ia)){ia=O[3];U.push(O[1]);if(O[2]){ma=O[3];break}}}while(O);if(U.length>1&&ka.exec(r))if(U.length===2&&V.relative[U[0]])ba=Ha(U[0]+U[1],v,I);else for(ba=V.relative[U[0]]?[v]:P(U.shift(),v);U.length;){r=U.shift();if(V.relative[r])r+=
U.shift();ba=Ha(r,ba,I)}else{if(!I&&U.length>1&&v.nodeType===9&&!X&&V.match.ID.test(U[0])&&!V.match.ID.test(U[U.length-1])){O=P.find(U.shift(),v,X);v=O.expr?P.filter(O.expr,O.set)[0]:O.set[0]}if(v){O=I?{expr:U.pop(),set:ra(I)}:P.find(U.pop(),U.length===1&&(U[0]==="~"||U[0]==="+")&&v.parentNode?v.parentNode:v,X);ba=O.expr?P.filter(O.expr,O.set):O.set;if(U.length>0)W=ra(ba);else S=false;for(;U.length;){O=w=U.pop();if(V.relative[w])O=U.pop();else w="";if(O==null)O=v;V.relative[w](W,O,X)}}else W=[]}W||
(W=ba);W||P.error(w||r);if(p.call(W)==="[object Array]")if(S)if(v&&v.nodeType===1)for(r=0;W[r]!=null;r++){if(W[r]&&(W[r]===true||W[r].nodeType===1&&P.contains(v,W[r])))H.push(ba[r])}else for(r=0;W[r]!=null;r++)W[r]&&W[r].nodeType===1&&H.push(ba[r]);else H.push.apply(H,W);else ra(W,H);if(ma){P(ma,L,H,I);P.uniqueSort(H)}return H};P.uniqueSort=function(r){if(Fa){u=z;r.sort(Fa);if(u)for(var v=1;v<r.length;v++)r[v]===r[v-1]&&r.splice(v--,1)}return r};P.matches=function(r,v){return P(r,null,null,v)};P.matchesSelector=
function(r,v){return P(v,null,null,[r]).length>0};P.find=function(r,v,H){var I,L,O,ba,W,ma;if(!r)return[];L=0;for(O=V.order.length;L<O;L++){W=V.order[L];if(ba=V.leftMatch[W].exec(r)){ma=ba[1];ba.splice(1,1);if(ma.substr(ma.length-1)!=="\\"){ba[1]=(ba[1]||"").replace(A,"");I=V.find[W](ba,v,H);if(I!=null){r=r.replace(V.match[W],"");break}}}}I||(I=typeof v.getElementsByTagName!=="undefined"?v.getElementsByTagName("*"):[]);return{set:I,expr:r}};P.filter=function(r,v,H,I){for(var L,O,ba,W,ma,w,S,X,U=r,
ia=[],ea=v,sa=v&&v[0]&&P.isXML(v[0]);r&&v.length;){for(ba in V.filter)if((L=V.leftMatch[ba].exec(r))!=null&&L[2]){w=V.filter[ba];ma=L[1];O=false;L.splice(1,1);if(ma.substr(ma.length-1)!=="\\"){if(ea===ia)ia=[];if(V.preFilter[ba])if(L=V.preFilter[ba](L,ea,H,ia,I,sa)){if(L===true)continue}else O=W=true;if(L)for(S=0;(ma=ea[S])!=null;S++)if(ma){W=w(ma,L,S,ea);X=I^W;if(H&&W!=null)if(X)O=true;else ea[S]=false;else if(X){ia.push(ma);O=true}}if(W!==b){H||(ea=ia);r=r.replace(V.match[ba],"");if(!O)return[];
break}}}if(r===U)if(O==null)P.error(r);else break;U=r}return ea};P.error=function(r){throw Error("Syntax error, unrecognized expression: "+r);};var aa=P.getText=function(r){var v,H;v=r.nodeType;var I="";if(v)if(v===1||v===9)if(typeof r.textContent==="string")return r.textContent;else if(typeof r.innerText==="string")return r.innerText.replace(N,"");else for(r=r.firstChild;r;r=r.nextSibling)I+=aa(r);else{if(v===3||v===4)return r.nodeValue}else for(v=0;H=r[v];v++)if(H.nodeType!==8)I+=aa(H);return I},
V=P.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(r){return r.getAttribute("href")},type:function(r){return r.getAttribute("type")}},relative:{"+":function(r,v){var H=typeof v==="string",I=H&&!Y.test(v);H=H&&!I;if(I)v=v.toLowerCase();I=0;for(var L=r.length,O;I<L;I++)if(O=r[I]){for(;(O=O.previousSibling)&&O.nodeType!==1;);r[I]=H||O&&O.nodeName.toLowerCase()===v?O||false:O===v}H&&
P.filter(v,r,true)},">":function(r,v){var H,I=typeof v==="string",L=0,O=r.length;if(I&&!Y.test(v))for(v=v.toLowerCase();L<O;L++){if(H=r[L]){H=H.parentNode;r[L]=H.nodeName.toLowerCase()===v?H:false}}else{for(;L<O;L++)if(H=r[L])r[L]=I?H.parentNode:H.parentNode===v;I&&P.filter(v,r,true)}},"":function(r,v,H){var I,L=k++,O=e;if(typeof v==="string"&&!Y.test(v)){I=v=v.toLowerCase();O=c}O("parentNode",v,L,r,I,H)},"~":function(r,v,H){var I,L=k++,O=e;if(typeof v==="string"&&!Y.test(v)){I=v=v.toLowerCase();
O=c}O("previousSibling",v,L,r,I,H)}},find:{ID:function(r,v,H){if(typeof v.getElementById!=="undefined"&&!H)return(r=v.getElementById(r[1]))&&r.parentNode?[r]:[]},NAME:function(r,v){if(typeof v.getElementsByName!=="undefined"){for(var H=[],I=v.getElementsByName(r[1]),L=0,O=I.length;L<O;L++)I[L].getAttribute("name")===r[1]&&H.push(I[L]);return H.length===0?null:H}},TAG:function(r,v){if(typeof v.getElementsByTagName!=="undefined")return v.getElementsByTagName(r[1])}},preFilter:{CLASS:function(r,v,H,
I,L,O){r=" "+r[1].replace(A,"")+" ";if(O)return r;O=0;for(var ba;(ba=v[O])!=null;O++)if(ba)if(L^(ba.className&&(" "+ba.className+" ").replace(/[\t\n\r]/g," ").indexOf(r)>=0))H||I.push(ba);else if(H)v[O]=false;return false},ID:function(r){return r[1].replace(A,"")},TAG:function(r){return r[1].replace(A,"").toLowerCase()},CHILD:function(r){if(r[1]==="nth"){r[2]||P.error(r[0]);r[2]=r[2].replace(/^\+|\s*/g,"");var v=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(r[2]==="even"&&"2n"||r[2]==="odd"&&"2n+1"||!/\D/.test(r[2])&&
"0n+"+r[2]||r[2]);r[2]=v[1]+(v[2]||1)-0;r[3]=v[3]-0}else r[2]&&P.error(r[0]);r[0]=k++;return r},ATTR:function(r,v,H,I,L,O){v=r[1]=r[1].replace(A,"");if(!O&&V.attrMap[v])r[1]=V.attrMap[v];r[4]=(r[4]||r[5]||"").replace(A,"");if(r[2]==="~=")r[4]=" "+r[4]+" ";return r},PSEUDO:function(r,v,H,I,L){if(r[1]==="not")if((h.exec(r[3])||"").length>1||/^\w/.test(r[3]))r[3]=P(r[3],null,null,v);else{r=P.filter(r[3],v,H,true^L);H||I.push.apply(I,r);return false}else if(V.match.POS.test(r[0])||V.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,v,H){return!!P(H[3],r).length},header:function(r){return/h\d/i.test(r.nodeName)},text:function(r){var v=r.getAttribute("type"),H=r.type;return r.nodeName.toLowerCase()===
"input"&&"text"===H&&(v===H||v===null)},radio:function(r){return r.nodeName.toLowerCase()==="input"&&"radio"===r.type},checkbox:function(r){return r.nodeName.toLowerCase()==="input"&&"checkbox"===r.type},file:function(r){return r.nodeName.toLowerCase()==="input"&&"file"===r.type},password:function(r){return r.nodeName.toLowerCase()==="input"&&"password"===r.type},submit:function(r){var v=r.nodeName.toLowerCase();return(v==="input"||v==="button")&&"submit"===r.type},image:function(r){return r.nodeName.toLowerCase()===
"input"&&"image"===r.type},reset:function(r){var v=r.nodeName.toLowerCase();return(v==="input"||v==="button")&&"reset"===r.type},button:function(r){var v=r.nodeName.toLowerCase();return v==="input"&&"button"===r.type||v==="button"},input:function(r){return/input|select|textarea|button/i.test(r.nodeName)},focus:function(r){return r===r.ownerDocument.activeElement}},setFilters:{first:function(r,v){return v===0},last:function(r,v,H,I){return v===I.length-1},even:function(r,v){return v%2===0},odd:function(r,
v){return v%2===1},lt:function(r,v,H){return v<H[3]-0},gt:function(r,v,H){return v>H[3]-0},nth:function(r,v,H){return H[3]-0===v},eq:function(r,v,H){return H[3]-0===v}},filter:{PSEUDO:function(r,v,H,I){var L=v[1],O=V.filters[L];if(O)return O(r,H,v,I);else if(L==="contains")return(r.textContent||r.innerText||aa([r])||"").indexOf(v[3])>=0;else if(L==="not"){v=v[3];H=0;for(I=v.length;H<I;H++)if(v[H]===r)return false;return true}else P.error(L)},CHILD:function(r,v){var H,I,L,O,ba,W;H=v[1];W=r;switch(H){case "only":case "first":for(;W=
W.previousSibling;)if(W.nodeType===1)return false;if(H==="first")return true;W=r;case "last":for(;W=W.nextSibling;)if(W.nodeType===1)return false;return true;case "nth":H=v[2];I=v[3];if(H===1&&I===0)return true;L=v[0];if((O=r.parentNode)&&(O[i]!==L||!r.nodeIndex)){ba=0;for(W=O.firstChild;W;W=W.nextSibling)if(W.nodeType===1)W.nodeIndex=++ba;O[i]=L}W=r.nodeIndex-I;return H===0?W===0:W%H===0&&W/H>=0}},ID:function(r,v){return r.nodeType===1&&r.getAttribute("id")===v},TAG:function(r,v){return v==="*"&&
r.nodeType===1||!!r.nodeName&&r.nodeName.toLowerCase()===v},CLASS:function(r,v){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(v)>-1},ATTR:function(r,v){var H=v[1];H=P.attr?P.attr(r,H):V.attrHandle[H]?V.attrHandle[H](r):r[H]!=null?r[H]:r.getAttribute(H);var I=H+"",L=v[2],O=v[4];return H==null?L==="!=":!L&&P.attr?H!=null:L==="="?I===O:L==="*="?I.indexOf(O)>=0:L==="~="?(" "+I+" ").indexOf(O)>=0:!O?I&&H!==false:L==="!="?I!==O:L==="^="?I.indexOf(O)===0:L==="$="?I.substr(I.length-O.length)===
O:L==="|="?I===O||I.substr(0,O.length+1)===O+"-":false},POS:function(r,v,H,I){var L=V.setFilters[v[2]];if(L)return L(r,H,v,I)}}},ka=V.match.POS,pa=function(r,v){return"\\"+(v-0+1)},ua;for(ua in V.match){V.match[ua]=RegExp(V.match[ua].source+/(?![^\[]*\])(?![^\(]*\))/.source);V.leftMatch[ua]=RegExp(/(^(?:.|\r|\n)*?)/.source+V.match[ua].source.replace(/\\(\d+)/g,pa))}var ra=function(r,v){r=Array.prototype.slice.call(r,0);if(v){v.push.apply(v,r);return v}return r};try{Array.prototype.slice.call(F.documentElement.childNodes,
0)}catch(Na){ra=function(r,v){var H=0,I=v||[];if(p.call(r)==="[object Array]")Array.prototype.push.apply(I,r);else if(typeof r.length==="number")for(var L=r.length;H<L;H++)I.push(r[H]);else for(;r[H];H++)I.push(r[H]);return I}}var Fa,la;if(F.documentElement.compareDocumentPosition)Fa=function(r,v){if(r===v){u=true;return 0}if(!r.compareDocumentPosition||!v.compareDocumentPosition)return r.compareDocumentPosition?-1:1;return r.compareDocumentPosition(v)&4?-1:1};else{Fa=function(r,v){if(r===v){u=true;
return 0}else if(r.sourceIndex&&v.sourceIndex)return r.sourceIndex-v.sourceIndex;var H,I,L=[],O=[];H=r.parentNode;I=v.parentNode;var ba=H;if(H===I)return la(r,v);else if(H){if(!I)return 1}else return-1;for(;ba;){L.unshift(ba);ba=ba.parentNode}for(ba=I;ba;){O.unshift(ba);ba=ba.parentNode}H=L.length;I=O.length;for(ba=0;ba<H&&ba<I;ba++)if(L[ba]!==O[ba])return la(L[ba],O[ba]);return ba===H?la(r,O[ba],-1):la(L[ba],v,1)};la=function(r,v,H){if(r===v)return H;for(r=r.nextSibling;r;){if(r===v)return-1;r=r.nextSibling}return 1}}(function(){var r=
F.createElement("div"),v="script"+(new Date).getTime(),H=F.documentElement;r.innerHTML="<a name='"+v+"'/>";H.insertBefore(r,H.firstChild);if(F.getElementById(v)){V.find.ID=function(I,L,O){if(typeof L.getElementById!=="undefined"&&!O)return(L=L.getElementById(I[1]))?L.id===I[1]||typeof L.getAttributeNode!=="undefined"&&L.getAttributeNode("id").nodeValue===I[1]?[L]:b:[]};V.filter.ID=function(I,L){var O=typeof I.getAttributeNode!=="undefined"&&I.getAttributeNode("id");return I.nodeType===1&&O&&O.nodeValue===
L}}H.removeChild(r);H=r=null})();(function(){var r=F.createElement("div");r.appendChild(F.createComment(""));if(r.getElementsByTagName("*").length>0)V.find.TAG=function(v,H){var I=H.getElementsByTagName(v[1]);if(v[1]==="*"){for(var L=[],O=0;I[O];O++)I[O].nodeType===1&&L.push(I[O]);I=L}return I};r.innerHTML="<a href='#'></a>";if(r.firstChild&&typeof r.firstChild.getAttribute!=="undefined"&&r.firstChild.getAttribute("href")!=="#")V.attrHandle.href=function(v){return v.getAttribute("href",2)};r=null})();
F.querySelectorAll&&function(){var r=P,v=F.createElement("div");v.innerHTML="<p class='TEST'></p>";if(!(v.querySelectorAll&&v.querySelectorAll(".TEST").length===0)){P=function(I,L,O,ba){L=L||F;if(!ba&&!P.isXML(L)){var W=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(I);if(W&&(L.nodeType===1||L.nodeType===9))if(W[1])return ra(L.getElementsByTagName(I),O);else if(W[2]&&V.find.CLASS&&L.getElementsByClassName)return ra(L.getElementsByClassName(W[2]),O);if(L.nodeType===9){if(I==="body"&&L.body)return ra([L.body],
O);else if(W&&W[3]){var ma=L.getElementById(W[3]);if(ma&&ma.parentNode){if(ma.id===W[3])return ra([ma],O)}else return ra([],O)}try{return ra(L.querySelectorAll(I),O)}catch(w){}}else if(L.nodeType===1&&L.nodeName.toLowerCase()!=="object"){W=L;var S=(ma=L.getAttribute("id"))||"__sizzle__",X=L.parentNode,U=/^\s*[+~]/.test(I);if(ma)S=S.replace(/'/g,"\\$&");else L.setAttribute("id",S);if(U&&X)L=L.parentNode;try{if(!U||X)return ra(L.querySelectorAll("[id='"+S+"'] "+I),O)}catch(ia){}finally{ma||W.removeAttribute("id")}}}return r(I,
L,O,ba)};for(var H in r)P[H]=r[H];v=null}}();(function(){var r=F.documentElement,v=r.matchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.msMatchesSelector;if(v){var H=!v.call(F.createElement("div"),"div"),I=false;try{v.call(F.documentElement,"[test!='']:sizzle")}catch(L){I=true}P.matchesSelector=function(O,ba){ba=ba.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!P.isXML(O))try{if(I||!V.match.PSEUDO.test(ba)&&!/!=/.test(ba)){var W=v.call(O,ba);if(W||!H||O.document&&O.document.nodeType!==
11)return W}}catch(ma){}return P(ba,null,null,[O]).length>0}}})();(function(){var r=F.createElement("div");r.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!r.getElementsByClassName||r.getElementsByClassName("e").length===0)){r.lastChild.className="e";if(r.getElementsByClassName("e").length!==1){V.order.splice(1,0,"CLASS");V.find.CLASS=function(v,H,I){if(typeof H.getElementsByClassName!=="undefined"&&!I)return H.getElementsByClassName(v[1])};r=null}}})();P.contains=F.documentElement.contains?
function(r,v){return r!==v&&(r.contains?r.contains(v):true)}:F.documentElement.compareDocumentPosition?function(r,v){return!!(r.compareDocumentPosition(v)&16)}:function(){return false};P.isXML=function(r){return(r=(r?r.ownerDocument||r:0).documentElement)?r.nodeName!=="HTML":false};var Ha=function(r,v,H){var I,L=[],O="";for(v=v.nodeType?[v]:v;I=V.match.PSEUDO.exec(r);){O+=I[0];r=r.replace(V.match.PSEUDO,"")}r=V.relative[r]?r+"*":r;I=0;for(var ba=v.length;I<ba;I++)P(r,v[I],L,H);return P.filter(O,L)};
P.attr=f.attr;P.selectors.attrMap={};f.find=P;f.expr=P.selectors;f.expr[":"]=f.expr.filters;f.unique=P.uniqueSort;f.text=P.getText;f.isXMLDoc=P.isXML;f.contains=P.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 e=this,h,i;if(typeof c!=="string")return f(c).filter(function(){h=0;for(i=e.length;h<i;h++)if(f.contains(e[h],this))return true});
var k=this.pushStack("","find",c),p,u,z;h=0;for(i=this.length;h<i;h++){p=k.length;f.find(c,this[h],k);if(h>0)for(u=p;u<k.length;u++)for(z=0;z<p;z++)if(k[z]===k[u]){k.splice(u--,1);break}}return k},has:function(c){var e=f(c);return this.filter(function(){for(var h=0,i=e.length;h<i;h++)if(f.contains(this,e[h]))return true})},not:function(c){return this.pushStack(o(this,c,false),"not",c)},filter:function(c){return this.pushStack(o(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,e){var h=[],i,k,p=this[0];if(f.isArray(c)){for(k=1;p&&p.ownerDocument&&p!==e;){for(i=0;i<c.length;i++)f(p).is(c[i])&&h.push({selector:c[i],elem:p,level:k});p=p.parentNode;k++}return h}var u=sb.test(c)||typeof c!=="string"?f(c,e||this.context):0;i=0;for(k=this.length;i<k;i++)for(p=this[i];p;)if(u?u.index(p)>-1:f.find.matchesSelector(p,c)){h.push(p);break}else{p=p.parentNode;if(!p||
!p.ownerDocument||p===e||p.nodeType===11)break}h=h.length>1?f.unique(h):h;return this.pushStack(h,"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,e){var h=typeof c==="string"?f(c,e):f.makeArray(c&&c.nodeType?[c]:c),i=f.merge(this.get(),h);return this.pushStack(!h[0]||!h[0].parentNode||h[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,e,h){return f.dir(c,"parentNode",h)},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,
e,h){return f.dir(c,"nextSibling",h)},prevUntil:function(c,e,h){return f.dir(c,"previousSibling",h)},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,e){f.fn[c]=function(h,i){var k=f.map(this,e,h);Nb.test(c)||(i=h);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,e,h){if(h)c=":not("+c+")";return e.length===1?f.find.matchesSelector(e[0],c)?[e[0]]:[]:f.find.matches(c,e)},dir:function(c,e,h){var i=[];for(c=c[e];c&&c.nodeType!==9&&(h===b||c.nodeType!==1||!f(c).is(h));){c.nodeType===1&&i.push(c);c=c[e]}return i},nth:function(c,e,h){e=e||1;for(var i=0;c;c=c[h])if(c.nodeType===1&&++i===e)break;return c},sibling:function(c,e){for(var h=[];c;c=
c.nextSibling)c.nodeType===1&&c!==e&&h.push(c);return h}});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\[|\-\-)/,Ga={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(F);Ga.optgroup=Ga.option;Ga.tbody=Ga.tfoot=Ga.colgroup=Ga.caption=Ga.thead;Ga.th=Ga.td;if(!f.support.htmlSerialize)Ga._default=
[1,"div<div>","</div>"];f.fn.extend({text:function(c){if(f.isFunction(c))return this.each(function(e){var h=f(this);h.text(c.call(this,e,h.text()))});if(typeof c!=="object"&&c!==b)return this.empty().append((this[0]&&this[0].ownerDocument||F).createTextNode(c));return f.text(this)},wrapAll:function(c){if(f.isFunction(c))return this.each(function(h){f(this).wrapAll(c.call(this,h))});if(this[0]){var e=f(c,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&e.insertBefore(this[0]);e.map(function(){for(var h=
this;h.firstChild&&h.firstChild.nodeType===1;)h=h.firstChild;return h}).append(this)}return this},wrapInner:function(c){if(f.isFunction(c))return this.each(function(e){f(this).wrapInner(c.call(this,e))});return this.each(function(){var e=f(this),h=e.contents();h.length?h.wrapAll(c):e.append(c)})},wrap:function(c){var e=f.isFunction(c);return this.each(function(h){f(this).wrapAll(e?c.call(this,h):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(e){this.parentNode.insertBefore(e,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(e){this.parentNode.insertBefore(e,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,e){for(var h=0,i;(i=this[h])!=null;h++)if(!c||f.filter(c,[i]).length){if(!e&&i.nodeType===1){f.cleanData(i.getElementsByTagName("*"));f.cleanData([i])}i.parentNode&&i.parentNode.removeChild(i)}return this},empty:function(){for(var c=0,e;(e=this[c])!=
null;c++)for(e.nodeType===1&&f.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(c,e){c=c==null?false:c;e=e==null?c:e;return this.map(function(){return f.clone(this,c,e)})},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))&&!Ga[(ub.exec(c)||["",""])[1].toLowerCase()]){c=c.replace(tb,"<$1></$2>");try{for(var e=
0,h=this.length;e<h;e++)if(this[e].nodeType===1){f.cleanData(this[e].getElementsByTagName("*"));this[e].innerHTML=c}}catch(i){this.empty().append(c)}}else f.isFunction(c)?this.each(function(k){var p=f(this);p.html(c.call(this,k,p.html()))}):this.empty().append(c);return this},replaceWith:function(c){if(this[0]&&this[0].parentNode){if(f.isFunction(c))return this.each(function(e){var h=f(this),i=h.html();h.replaceWith(c.call(this,e,i))});if(typeof c!=="string")c=f(c).detach();return this.each(function(){var e=
this.nextSibling,h=this.parentNode;f(this).remove();e?f(e).before(c):f(h).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,e,h){var i,k,p,u=c[0],z=[];if(!f.support.checkClone&&arguments.length===3&&typeof u==="string"&&wb.test(u))return this.each(function(){f(this).domManip(c,e,h,true)});if(f.isFunction(u))return this.each(function(Y){var P=f(this);c[0]=u.call(this,Y,e?P.html():b);
P.domManip(c,e,h)});if(this[0]){i=u&&u.parentNode;i=f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?{fragment:i}:f.buildFragment(c,this,z);p=i.fragment;if(k=p.childNodes.length===1?p=p.firstChild:p.firstChild){e=e&&f.nodeName(k,"tr");k=0;for(var A=this.length,N=A-1;k<A;k++)h.call(e?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<N?f.clone(p,true,true):
p)}z.length&&f.each(z,Ea)}return this}});f.buildFragment=function(c,e,h){var i,k,p,u,z=c[0];if(e&&e[0])u=e[0].ownerDocument||e[0];u.createDocumentFragment||(u=F);if(c.length===1&&typeof z==="string"&&z.length<512&&u===F&&z.charAt(0)==="<"&&!Wb.test(z)&&(f.support.checkClone||!wb.test(z))&&(f.support.html5Clone||!vb.test(z))){k=true;if((p=f.fragments[z])&&p!==1)i=p}if(!i){i=u.createDocumentFragment();f.clean(c,u,i,h)}if(k)f.fragments[z]=p?i:1;return{fragment:i,cacheable:k}};f.fragments={};f.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(c,e){f.fn[c]=function(h){var i=[];h=f(h);var k=this.length===1&&this[0].parentNode;if(k&&k.nodeType===11&&k.childNodes.length===1&&h.length===1){h[e](this[0]);return this}else{k=0;for(var p=h.length;k<p;k++){var u=(k>0?this.clone(true):this).get();f(h[k])[e](u);i=i.concat(u)}return this.pushStack(i,c,h.selector)}}});f.extend({clone:function(c,e,h){var i,k,p;if(f.support.html5Clone||!vb.test("<"+c.nodeName))i=
c.cloneNode(true);else{i=F.createElement("div");xb.appendChild(i);i.innerHTML=c.outerHTML;i=i.firstChild}var u=i;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(c.nodeType===1||c.nodeType===11)&&!f.isXMLDoc(c)){T(c,u);i=ja(c);k=ja(u);for(p=0;i[p];++p)k[p]&&T(i[p],k[p])}if(e){D(c,u);if(h){i=ja(c);k=ja(u);for(p=0;i[p];++p)D(i[p],k[p])}}return u},clean:function(c,e,h,i){e=e||F;if(typeof e.createElement==="undefined")e=e.ownerDocument||e[0]&&e[0].ownerDocument||F;for(var k=[],p,u=0,z;(z=c[u])!=
null;u++){if(typeof z==="number")z+="";if(z){if(typeof z==="string")if(Ub.test(z)){z=z.replace(tb,"<$1></$2>");p=(ub.exec(z)||["",""])[1].toLowerCase();var A=Ga[p]||Ga._default,N=A[0],Y=e.createElement("div");e===F?xb.appendChild(Y):s(e).appendChild(Y);for(Y.innerHTML=A[1]+z+A[2];N--;)Y=Y.lastChild;if(!f.support.tbody){N=Tb.test(z);A=p==="table"&&!N?Y.firstChild&&Y.firstChild.childNodes:A[1]==="<table>"&&!N?Y.childNodes:[];for(p=A.length-1;p>=0;--p)f.nodeName(A[p],"tbody")&&!A[p].childNodes.length&&
A[p].parentNode.removeChild(A[p])}!f.support.leadingWhitespace&&lb.test(z)&&Y.insertBefore(e.createTextNode(lb.exec(z)[0]),Y.firstChild);z=Y.childNodes}else z=e.createTextNode(z);var P;if(!f.support.appendChecked)if(z[0]&&typeof(P=z.length)==="number")for(p=0;p<P;p++)wa(z[p]);else wa(z);if(z.nodeType)k.push(z);else k=f.merge(k,z)}}if(h){c=function(aa){return!aa.type||Xb.test(aa.type)};for(u=0;k[u];u++)if(i&&f.nodeName(k[u],"script")&&(!k[u].type||k[u].type.toLowerCase()==="text/javascript"))i.push(k[u].parentNode?
k[u].parentNode.removeChild(k[u]):k[u]);else{if(k[u].nodeType===1){e=f.grep(k[u].getElementsByTagName("script"),c);k.splice.apply(k,[u+1,0].concat(e))}h.appendChild(k[u])}}return k},cleanData:function(c){for(var e,h,i=f.cache,k=f.event.special,p=f.support.deleteExpando,u=0,z;(z=c[u])!=null;u++)if(!(z.nodeName&&f.noData[z.nodeName.toLowerCase()]))if(h=z[f.expando]){if((e=i[h])&&e.events){for(var A in e.events)k[A]?f.event.remove(z,A):f.removeEvent(z,A,e.handle);if(e.handle)e.handle.elem=null}if(p)delete z[f.expando];
else z.removeAttribute&&z.removeAttribute(f.expando);delete i[h]}}});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"],Xa,zb,Ab;f.fn.css=function(c,e){if(arguments.length===2&&e===b)return this;return f.access(this,c,e,true,function(h,i,k){return k!==b?f.style(h,i,k):f.css(h,i)})};f.extend({cssHooks:{opacity:{get:function(c,e){if(e){var h=
Xa(c,"opacity","opacity");return h===""?"1":h}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,e,h,i){if(!(!c||c.nodeType===3||c.nodeType===8||!c.style)){var k,p=f.camelCase(e),u=c.style,z=f.cssHooks[p];e=f.cssProps[p]||p;if(h!==b){i=typeof h;if(i==="string"&&(k=ac.exec(h))){h=+(k[1]+1)*+k[2]+parseFloat(f.css(c,e));i=
"number"}if(!(h==null||i==="number"&&isNaN(h))){if(i==="number"&&!f.cssNumber[p])h+="px";if(!z||!("set"in z)||(h=z.set(c,h))!==b)try{u[e]=h}catch(A){}}}else{if(z&&"get"in z&&(k=z.get(c,false,i))!==b)return k;return u[e]}}},css:function(c,e,h){var i,k;e=f.camelCase(e);k=f.cssHooks[e];e=f.cssProps[e]||e;if(e==="cssFloat")e="float";if(k&&"get"in k&&(i=k.get(c,true,h))!==b)return i;else if(Xa)return Xa(c,e)},swap:function(c,e,h){var i={},k;for(k in e){i[k]=c.style[k];c.style[k]=e[k]}h.call(c);for(k in e)c.style[k]=
i[k]}});f.curCSS=f.css;f.each(["height","width"],function(c,e){f.cssHooks[e]={get:function(h,i,k){var p;if(i){if(h.offsetWidth!==0)return ta(h,e,k);else f.swap(h,bc,function(){p=ta(h,e,k)});return p}},set:function(h,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,e){return Yb.test((e&&c.currentStyle?c.currentStyle.filter:c.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(c,e){var h=c.style,i=c.currentStyle,
k=f.isNumeric(e)?"alpha(opacity="+e*100+")":"",p=i&&i.filter||h.filter||"";h.zoom=1;if(e>=1&&f.trim(p.replace(mb,""))===""){h.removeAttribute("filter");if(i&&!i.filter)return}h.filter=mb.test(p)?p.replace(mb,k):p+" "+k}};f(function(){if(!f.support.reliableMarginRight)f.cssHooks.marginRight={get:function(c,e){var h;f.swap(c,{display:"inline-block"},function(){h=e?Xa(c,"margin-right","marginRight"):c.style.marginRight});return h}}});if(F.defaultView&&F.defaultView.getComputedStyle)zb=function(c,e){var h,
i,k;e=e.replace(Zb,"-$1").toLowerCase();if((i=c.ownerDocument.defaultView)&&(k=i.getComputedStyle(c,null))){h=k.getPropertyValue(e);if(h===""&&!f.contains(c.ownerDocument.documentElement,c))h=f.style(c,e)}return h};if(F.documentElement.currentStyle)Ab=function(c,e){var h,i,k=c.currentStyle&&c.currentStyle[e],p=c.style;if(k===null&&p&&(h=p[e]))k=h;if(!yb.test(k)&&$b.test(k)){h=p.left;if(i=c.runtimeStyle&&c.runtimeStyle.left)c.runtimeStyle.left=c.currentStyle.left;p.left=e==="fontSize"?"1em":k||0;k=
p.pixelLeft+"px";p.left=h;if(i)c.runtimeStyle.left=i}return k===""?"auto":k};Xa=zb||Ab;if(f.expr&&f.expr.filters){f.expr.filters.hidden=function(c){var e=c.offsetHeight;return c.offsetWidth===0&&e===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={},Ua,Va,Gb=["*/"]+["*"];try{Ua=da.href}catch(sc){Ua=F.createElement("a");Ua.href="";Ua=Ua.href}Va=Db.exec(Ua.toLowerCase())||[];f.fn.extend({load:function(c,e,h){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(e)if(f.isFunction(e)){h=e;e=b}else if(typeof e==="object"){e=f.param(e,f.ajaxSettings.traditional);i="POST"}var p=this;f.ajax({url:c,type:i,dataType:"html",data:e,complete:function(u,z,A){A=u.responseText;if(u.isResolved()){u.done(function(N){A=N});p.html(k?f("<div>").append(A.replace(ic,"")).find(k):A)}h&&p.each(h,[A,z,u])}});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,e){var h=f(this).val();return h==null?null:f.isArray(h)?f.map(h,function(i){return{name:e.name,value:i.replace(Bb,"\r\n")}}):{name:e.name,value:h.replace(Bb,"\r\n")}}).get()}});f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(c,e){f.fn[e]=function(h){return this.on(e,h)}});f.each(["get","post"],
function(c,e){f[e]=function(h,i,k,p){if(f.isFunction(i)){p=p||k;k=i;i=b}return f.ajax({type:e,url:h,data:i,success:k,dataType:p})}});f.extend({getScript:function(c,e){return f.get(c,b,e,"script")},getJSON:function(c,e,h){return f.get(c,e,h,"json")},ajaxSetup:function(c,e){if(e)G(c,f.ajaxSettings);else{e=c;c=f.ajaxSettings}G(c,e);return c},ajaxSettings:{url:Ua,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Va[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:t(jb),ajaxTransport:t(Fb),ajax:function(c,e){function h(v,H,I,L){if(ra!==2){ra=2;pa&&clearTimeout(pa);ka=
b;aa=L||"";la.readyState=v>0?4:0;var O,ba,W;L=H;if(I){var ma=i,w=la,S=ma.contents,X=ma.dataTypes,U=ma.responseFields,ia,ea,sa,ya;for(ea in U)if(ea in I)w[U[ea]]=I[ea];for(;X[0]==="*";){X.shift();if(ia===b)ia=ma.mimeType||w.getResponseHeader("content-type")}if(ia)for(ea in S)if(S[ea]&&S[ea].test(ia)){X.unshift(ea);break}if(X[0]in I)sa=X[0];else{for(ea in I){if(!X[0]||ma.converters[ea+" "+X[0]]){sa=ea;break}ya||(ya=ea)}sa=sa||ya}if(sa){sa!==X[0]&&X.unshift(sa);I=I[sa]}else I=void 0}else I=b;I=I;if(v>=
200&&v<300||v===304){if(i.ifModified){if(ia=la.getResponseHeader("Last-Modified"))f.lastModified[N]=ia;if(ia=la.getResponseHeader("Etag"))f.etag[N]=ia}if(v===304){L="notmodified";O=true}else try{ia=i;I=I;if(ia.dataFilter)I=ia.dataFilter(I,ia.dataType);var Ra=ia.dataTypes;ea={};var db,fb,lc=Ra.length,gb,Pa=Ra[0],ab,nb,Qa,Wa,bb;for(db=1;db<lc;db++){if(db===1)for(fb in ia.converters)if(typeof fb==="string")ea[fb.toLowerCase()]=ia.converters[fb];ab=Pa;Pa=Ra[db];if(Pa==="*")Pa=ab;else if(ab!=="*"&&ab!==
Pa){nb=ab+" "+Pa;Qa=ea[nb]||ea["* "+Pa];if(!Qa){bb=b;for(Wa in ea){gb=Wa.split(" ");if(gb[0]===ab||gb[0]==="*")if(bb=ea[gb[1]+" "+Pa]){Wa=ea[Wa];if(Wa===true)Qa=bb;else if(bb===true)Qa=Wa;break}}}Qa||bb||f.error("No conversion from "+nb.replace(" "," to "));if(Qa!==true)I=Qa?Qa(I):bb(Wa(I))}}ba=I;L="success";O=true}catch(mc){L="parsererror";W=mc}}else{W=L;if(!L||v){L="error";if(v<0)v=0}}la.status=v;la.statusText=""+(H||L);O?u.resolveWith(k,[ba,L,la]):u.rejectWith(k,[la,L,W]);la.statusCode(A);A=b;
if(Na)p.trigger("ajax"+(O?"Success":"Error"),[la,i,O?ba:W]);z.fireWith(k,[la,L]);if(Na){p.trigger("ajaxComplete",[la,i]);--f.active||f.event.trigger("ajaxStop")}}}if(typeof c==="object"){e=c;c=b}e=e||{};var i=f.ajaxSetup({},e),k=i.context||i,p=k!==i&&(k.nodeType||k instanceof f)?f(k):f.event,u=f.Deferred(),z=f.Callbacks("once memory"),A=i.statusCode||{},N,Y={},P={},aa,V,ka,pa,ua,ra=0,Na,Fa,la={readyState:0,setRequestHeader:function(v,H){if(!ra){var I=v.toLowerCase();v=P[I]=P[I]||v;Y[v]=H}return this},
getAllResponseHeaders:function(){return ra===2?aa:null},getResponseHeader:function(v){var H;if(ra===2){if(!V)for(V={};H=ec.exec(aa);)V[H[1].toLowerCase()]=H[2];H=V[v.toLowerCase()]}return H===b?null:H},overrideMimeType:function(v){if(!ra)i.mimeType=v;return this},abort:function(v){v=v||"abort";ka&&ka.abort(v);h(0,v);return this}};u.promise(la);la.success=la.done;la.error=la.fail;la.complete=z.add;la.statusCode=function(v){if(v){var H;if(ra<2)for(H in v)A[H]=[A[H],v[H]];else{H=v[la.status];la.then(H,
H)}}return this};i.url=((c||i.url)+"").replace(dc,"").replace(hc,Va[1]+"//");i.dataTypes=f.trim(i.dataType||"*").toLowerCase().split(qb);if(i.crossDomain==null){ua=Db.exec(i.url.toLowerCase());i.crossDomain=!!(ua&&(ua[1]!=Va[1]||ua[2]!=Va[2]||(ua[3]||(ua[1]==="http:"?80:443))!=(Va[3]||(Va[1]==="http:"?80:443))))}if(i.data&&i.processData&&typeof i.data!=="string")i.data=f.param(i.data,i.traditional);y(jb,i,e,la);if(ra===2)return false;Na=i.global;i.type=i.type.toUpperCase();i.hasContent=!gc.test(i.type);
Na&&f.active++===0&&f.event.trigger("ajaxStart");if(!i.hasContent){if(i.data){i.url+=(Cb.test(i.url)?"&":"?")+i.data;delete i.data}N=i.url;if(i.cache===false){ua=f.now();var Ha=i.url.replace(kc,"$1_="+ua);i.url=Ha+(Ha===i.url?(Cb.test(i.url)?"&":"?")+"_="+ua:"")}}if(i.data&&i.hasContent&&i.contentType!==false||e.contentType)la.setRequestHeader("Content-Type",i.contentType);if(i.ifModified){N=N||i.url;f.lastModified[N]&&la.setRequestHeader("If-Modified-Since",f.lastModified[N]);f.etag[N]&&la.setRequestHeader("If-None-Match",
f.etag[N])}la.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(Fa in i.headers)la.setRequestHeader(Fa,i.headers[Fa]);if(i.beforeSend&&(i.beforeSend.call(k,la,i)===false||ra===2)){la.abort();return false}for(Fa in{success:1,error:1,complete:1})la[Fa](i[Fa]);if(ka=y(Fb,i,e,la)){la.readyState=1;Na&&p.trigger("ajaxSend",[la,i]);if(i.async&&i.timeout>0)pa=setTimeout(function(){la.abort("timeout")},
i.timeout);try{ra=1;ka.send(Y,h)}catch(r){if(ra<2)h(-1,r);else throw r;}}else h(-1,"No Transport");return la},param:function(c,e){var h=[],i=function(p,u){u=f.isFunction(u)?u():u;h[h.length]=encodeURIComponent(p)+"="+encodeURIComponent(u)};if(e===b)e=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],e,i);return h.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,e,h){e=c.contentType==="application/x-www-form-urlencoded"&&typeof c.data==="string";if(c.dataTypes[0]==="jsonp"||c.jsonp!==false&&(hb.test(c.url)||e&&hb.test(c.data))){var i,k=c.jsonpCallback=f.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,p=a[k],u=c.url,z=c.data,A="$1"+k+"$2";if(c.jsonp!==false){u=u.replace(hb,A);if(c.url===u){if(e)z=
z.replace(hb,A);if(c.data===z)u+=(/\?/.test(u)?"&":"?")+c.jsonp+"="+k}}c.url=u;c.data=z;a[k]=function(N){i=[N]};h.always(function(){a[k]=p;i&&f.isFunction(p)&&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 e,h=F.head||F.getElementsByTagName("head")[0]||F.documentElement;return{send:function(i,k){e=F.createElement("script");e.async="async";if(c.scriptCharset)e.charset=c.scriptCharset;e.src=c.url;e.onload=e.onreadystatechange=function(p,u){if(u||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=
null;h&&e.parentNode&&h.removeChild(e);e=b;u||k(200,"success")}};h.insertBefore(e,h.firstChild)},abort:function(){e&&e.onload(0,1)}}}});var ob=a.ActiveXObject?function(){for(var c in cb)cb[c](0,1)}:false,oc=0,cb;f.ajaxSettings.xhr=a.ActiveXObject?function(){var c;if(!(c=!this.isLocal&&K()))a:{try{c=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(e){}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 e;return{send:function(h,i){var k=c.xhr(),p,u;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(u in c.xhrFields)k[u]=c.xhrFields[u];c.mimeType&&k.overrideMimeType&&k.overrideMimeType(c.mimeType);if(!c.crossDomain&&!h["X-Requested-With"])h["X-Requested-With"]="XMLHttpRequest";try{for(u in h)k.setRequestHeader(u,h[u])}catch(z){}k.send(c.hasContent&&c.data||null);e=function(A,N){var Y,P,aa,V,ka;try{if(e&&(N||k.readyState===
4)){e=b;if(p){k.onreadystatechange=f.noop;ob&&delete cb[p]}if(N)k.readyState!==4&&k.abort();else{Y=k.status;aa=k.getAllResponseHeaders();V={};if((ka=k.responseXML)&&ka.documentElement)V.xml=ka;V.text=k.responseText;try{P=k.statusText}catch(pa){P=""}if(!Y&&c.isLocal&&!c.crossDomain)Y=V.text?200:404;else if(Y===1223)Y=204}}}catch(ua){N||i(-1,ua)}V&&i(Y,P,V,aa)};if(!c.async||k.readyState===4)e();else{p=++oc;if(ob){if(!cb){cb={};f(a).unload(ob)}cb[p]=e}k.onreadystatechange=e}},abort:function(){e&&e(0,
1)}}}});var kb={},La,Ya,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,e,h){if(c||c===0)return this.animate(C("show",3),c,e,h);else{h=0;for(var i=this.length;h<i;h++){c=this[h];if(c.style){e=c.style.display;if(!f._data(c,"olddisplay")&&e==="none")e=c.style.display="";e===""&&f.css(c,"display")===
"none"&&f._data(c,"olddisplay",E(c.nodeName))}}for(h=0;h<i;h++){c=this[h];if(c.style){e=c.style.display;if(e===""||e==="none")c.style.display=f._data(c,"olddisplay")||""}}return this}},hide:function(c,e,h){if(c||c===0)return this.animate(C("hide",3),c,e,h);else{h=0;for(var i=this.length;h<i;h++){c=this[h];if(c.style){e=f.css(c,"display");e!=="none"&&!f._data(c,"olddisplay")&&f._data(c,"olddisplay",e)}}for(h=0;h<i;h++)if(this[h].style)this[h].style.display="none";return this}},_toggle:f.fn.toggle,
toggle:function(c,e,h){var i=typeof c==="boolean";if(f.isFunction(c)&&f.isFunction(e))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(C("toggle",3),c,e,h);return this},fadeTo:function(c,e,h,i){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},c,h,i)},animate:function(c,e,h,i){function k(){p.queue===false&&f._mark(this);var u=f.extend({},p),z=this.nodeType===1,A=z&&f(this).is(":hidden"),
N,Y,P,aa,V;u.animatedProperties={};for(P in c){N=f.camelCase(P);if(P!==N){c[N]=c[P];delete c[P]}Y=c[N];if(f.isArray(Y)){u.animatedProperties[N]=Y[1];Y=c[N]=Y[0]}else u.animatedProperties[N]=u.specialEasing&&u.specialEasing[N]||u.easing||"swing";if(Y==="hide"&&A||Y==="show"&&!A)return u.complete.call(this);if(z&&(N==="height"||N==="width")){u.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||
E(this.nodeName)==="inline")this.style.display="inline-block";else this.style.zoom=1}}if(u.overflow!=null)this.style.overflow="hidden";for(P in c){z=new f.fx(this,u,P);Y=c[P];if(pc.test(Y))if(N=f._data(this,"toggle"+P)||(Y==="toggle"?A?"show":"hide":0)){f._data(this,"toggle"+P,N==="show"?"hide":"show");z[N]()}else z[Y]();else{N=qc.exec(Y);aa=z.cur();if(N){Y=parseFloat(N[2]);V=N[3]||(f.cssNumber[P]?"":"px");if(V!=="px"){f.style(this,P,(Y||1)+V);aa=(Y||1)/z.cur()*aa;f.style(this,P,aa+V)}if(N[1])Y=(N[1]===
"-="?-1:1)*Y+aa;z.custom(aa,Y,V)}else z.custom(aa,Y,"")}}return true}var p=f.speed(e,h,i);if(f.isEmptyObject(c))return this.each(p.complete,[false]);c=f.extend({},c);return p.queue===false?this.each(k):this.queue(p.queue,k)},stop:function(c,e,h){if(typeof c!=="string"){h=e;e=c;c=b}if(e&&c!==false)this.queue(c||"fx",[]);return this.each(function(){function i(A,N,Y){N=N[Y];f.removeData(A,Y,true);N.stop(h)}var k,p=false,u=f.timers,z=f._data(this);h||f._unmark(true,this);if(c==null)for(k in z)z[k]&&z[k].stop&&
k.indexOf(".run")===k.length-4&&i(this,z,k);else if(z[k=c+".run"]&&z[k].stop)i(this,z,k);for(k=u.length;k--;)if(u[k].elem===this&&(c==null||u[k].queue===c)){h?u[k](true):u[k].saveState();p=true;u.splice(k,1)}h&&p||f.dequeue(this,c)})}});f.each({slideDown:C("show",1),slideUp:C("hide",1),slideToggle:C("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(c,e){f.fn[c]=function(h,i,k){return this.animate(e,h,i,k)}});f.extend({speed:function(c,e,h){var i=
c&&typeof c==="object"?f.extend({},c):{complete:h||!h&&e||f.isFunction(c)&&c,duration:c,easing:h&&e||e&&!f.isFunction(e)&&e};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,e,h,i){return h+
i*c},swing:function(c,e,h,i){return(-Math.cos(c*Math.PI)/2+0.5)*i+h}},timers:[],fx:function(c,e,h){this.options=e;this.elem=c;this.prop=h;e.orig=e.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,e=f.css(this.elem,this.prop);return isNaN(c=parseFloat(e))?
!e||e==="auto"?0:e:c},custom:function(c,e,h){function i(u){return k.step(u)}var k=this,p=f.fx;this.startTime=eb||M();this.end=e;this.now=this.start=c;this.pos=this.state=0;this.unit=h||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(p.tick,p.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 e,h=eb||M(),i=true,k=this.elem,p=this.options;if(c||h>=p.duration+this.startTime){this.now=this.end;
this.pos=this.state=1;this.update();p.animatedProperties[this.prop]=true;for(e in p.animatedProperties)if(p.animatedProperties[e]!==true)i=false;if(i){p.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(u,z){k.style["overflow"+z]=p.overflow[u]});p.hide&&f(k).hide();if(p.hide||p.show)for(e in p.animatedProperties){f.style(k,e,p.orig[e]);f.removeData(k,"fxshow"+e,true);f.removeData(k,"toggle"+e,true)}if(c=p.complete){p.complete=false;c.call(k)}}return false}else{if(p.duration==
Infinity)this.now=h;else{c=h-this.startTime;this.state=c/p.duration;this.pos=f.easing[p.animatedProperties[this.prop]](this.state,c,0,1,p.duration);this.now=this.start+(this.end-this.start)*this.pos}this.update()}return true}};f.extend(f.fx,{tick:function(){for(var c,e=f.timers,h=0;h<e.length;h++){c=e[h];!c()&&e[h]===c&&e.splice(h--,1)}e.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,e){f.fx.step[e]=function(h){f.style(h.elem,e,Math.max(0,h.now)+h.unit)}});if(f.expr&&f.expr.filters)f.expr.filters.animated=function(c){return f.grep(f.timers,function(e){return c===e.elem}).length};var rc=/^t(?:able|d|h)$/i,Hb=/^(?:body|html)$/i;f.fn.offset="getBoundingClientRect"in F.documentElement?function(c){var e=this[0],
h;if(c)return this.each(function(u){f.offset.setOffset(this,c,u)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return f.offset.bodyOffset(e);try{h=e.getBoundingClientRect()}catch(i){}var k=e.ownerDocument,p=k.documentElement;if(!h||!f.contains(p,e))return h?{top:h.top,left:h.left}:{top:0,left:0};e=k.body;k=Q(k);return{top:h.top+(k.pageYOffset||f.support.boxModel&&p.scrollTop||e.scrollTop)-(p.clientTop||e.clientTop||0),left:h.left+(k.pageXOffset||f.support.boxModel&&p.scrollLeft||
e.scrollLeft)-(p.clientLeft||e.clientLeft||0)}}:function(c){var e=this[0];if(c)return this.each(function(N){f.offset.setOffset(this,c,N)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return f.offset.bodyOffset(e);var h,i=e.offsetParent,k=e.ownerDocument,p=k.documentElement,u=k.body;h=(k=k.defaultView)?k.getComputedStyle(e,null):e.currentStyle;for(var z=e.offsetTop,A=e.offsetLeft;(e=e.parentNode)&&e!==u&&e!==p;){if(f.support.fixedPosition&&h.position==="fixed")break;h=k?k.getComputedStyle(e,
null):e.currentStyle;z-=e.scrollTop;A-=e.scrollLeft;if(e===i){z+=e.offsetTop;A+=e.offsetLeft;if(f.support.doesNotAddBorder&&!(f.support.doesAddBorderForTableAndCells&&rc.test(e.nodeName))){z+=parseFloat(h.borderTopWidth)||0;A+=parseFloat(h.borderLeftWidth)||0}i=e.offsetParent}if(f.support.subtractsBorderForOverflowNotVisible&&h.overflow!=="visible"){z+=parseFloat(h.borderTopWidth)||0;A+=parseFloat(h.borderLeftWidth)||0}h=h}if(h.position==="relative"||h.position==="static"){z+=u.offsetTop;A+=u.offsetLeft}if(f.support.fixedPosition&&
h.position==="fixed"){z+=Math.max(p.scrollTop,u.scrollTop);A+=Math.max(p.scrollLeft,u.scrollLeft)}return{top:z,left:A}};f.offset={bodyOffset:function(c){var e=c.offsetTop,h=c.offsetLeft;if(f.support.doesNotIncludeMarginInBodyOffset){e+=parseFloat(f.css(c,"marginTop"))||0;h+=parseFloat(f.css(c,"marginLeft"))||0}return{top:e,left:h}},setOffset:function(c,e,h){var i=f.css(c,"position");if(i==="static")c.style.position="relative";var k=f(c),p=k.offset(),u=f.css(c,"top"),z=f.css(c,"left"),A={},N={};if((i===
"absolute"||i==="fixed")&&f.inArray("auto",[u,z])>-1){N=k.position();i=N.top;z=N.left}else{i=parseFloat(u)||0;z=parseFloat(z)||0}if(f.isFunction(e))e=e.call(c,h,p);if(e.top!=null)A.top=e.top-p.top+i;if(e.left!=null)A.left=e.left-p.left+z;"using"in e?e.using.call(c,A):k.css(A)}};f.fn.extend({position:function(){if(!this[0])return null;var c=this[0],e=this.offsetParent(),h=this.offset(),i=Hb.test(e[0].nodeName)?{top:0,left:0}:e.offset();h.top-=parseFloat(f.css(c,"marginTop"))||0;h.left-=parseFloat(f.css(c,
"marginLeft"))||0;i.top+=parseFloat(f.css(e[0],"borderTopWidth"))||0;i.left+=parseFloat(f.css(e[0],"borderLeftWidth"))||0;return{top:h.top-i.top,left:h.left-i.left}},offsetParent:function(){return this.map(function(){for(var c=this.offsetParent||F.body;c&&!Hb.test(c.nodeName)&&f.css(c,"position")==="static";)c=c.offsetParent;return c})}});f.each(["Left","Top"],function(c,e){var h="scroll"+e;f.fn[h]=function(i){var k,p;if(i===b){k=this[0];if(!k)return null;return(p=Q(k))?"pageXOffset"in p?p[c?"pageYOffset":
"pageXOffset"]:f.support.boxModel&&p.document.documentElement[h]||p.document.body[h]:k[h]}return this.each(function(){if(p=Q(this))p.scrollTo(!c?i:f(p).scrollLeft(),c?i:f(p).scrollTop());else this[h]=i})}});f.each(["Height","Width"],function(c,e){var h=e.toLowerCase();f.fn["inner"+e]=function(){var i=this[0];return i?i.style?parseFloat(f.css(i,h,"padding")):this[h]():null};f.fn["outer"+e]=function(i){var k=this[0];return k?k.style?parseFloat(f.css(k,h,i?"margin":"border")):this[h]():null};f.fn[h]=
function(i){var k=this[0];if(!k)return i==null?null:this;if(f.isFunction(i))return this.each(function(z){var A=f(this);A[h](i.call(this,z,A[h]()))});if(f.isWindow(k)){var p=k.document.documentElement["client"+e],u=k.document.body;return k.document.compatMode==="CSS1Compat"&&p||u&&u["client"+e]||p}else if(k.nodeType===9)return Math.max(k.documentElement["client"+e],k.body["scroll"+e],k.documentElement["scroll"+e],k.body["offset"+e],k.documentElement["offset"+e]);else if(i===b){k=f.css(k,h);p=parseFloat(k);
return f.isNumeric(p)?p:k}else return this.css(h,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){function b(q,C,E,Q){Q={data:Q||(C?C.data:{}),_wrap:C?C._wrap:null,tmpl:null,parent:C||null,nodes:[],calls:o,nest:s,wrap:D,html:T,update:ja};q&&a.extend(Q,q,{nodes:[],parent:C});if(E){Q.tmpl=E;Q._ctnt=Q._ctnt||Q.tmpl(a,Q);Q.key=++B;(M.length?t:ta)[B]=Q}return Q}function d(q,C,E){var Q;E=E?a.map(E,function(F){return typeof F==="string"?q.key?F.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+wa+'="'+q.key+'" $2'):F:d(F,q,F._ctnt)}):q;if(C)return E;E=E.join("");E.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(F,fa,da,f){Q=a(da).get();m(Q);if(fa)Q=g(fa).concat(Q);if(f)Q=Q.concat(g(f))});return Q?Q:g(E)}function g(q){var C=document.createElement("div");C.innerHTML=q;return a.makeArray(C.childNodes)}function l(q){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+a.trim(q).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(C,E,Q,F,fa,da,f){C=a.tmpl.tag[Q];if(!C)throw"Template command not found: "+Q;Q=C._default||[];if(da&&!/\w$/.test(fa)){fa+=da;da=""}if(fa){fa=j(fa);f=f?","+j(f)+")":da?")":"";f=da?fa.indexOf(".")>-1?fa+da:"("+fa+").call($item"+f:fa;da=da?f:"(typeof("+fa+")==='function'?("+fa+").call($item):("+fa+"))"}else da=f=Q.$1||"null";F=j(F);return"');"+C[E?"close":"open"].split("$notnull_1").join(fa?"typeof("+fa+")!=='undefined' && ("+fa+")!=null":"true").split("$1a").join(da).split("$1").join(f).split("$2").join(F?
F.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(Ca,Da,Ma,xa){return(xa=xa?","+xa+")":Ma?")":"")?"("+Da+").call($item"+xa:Ca}):Q.$2||"")+"_.push('"})+"');}return _;")}function n(q,C){q._wrap=d(q,true,a.isArray(C)?C:[Ea.test(C)?C:a(C).html()]).join("")}function j(q){return q?q.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function m(q){function C(Da){function Ma(Oa){Oa+=E;qa=fa[Oa]=fa[Oa]||b(qa,ta[qa.parent.key+E]||qa.parent,null,true)}var xa,Ba=Da,qa,Ia;if(Ia=Da.getAttribute(wa)){for(;Ba.parentNode&&
(Ba=Ba.parentNode).nodeType===1&&!(xa=Ba.getAttribute(wa)););if(xa!==Ia){Ba=Ba.parentNode?Ba.nodeType===11?0:Ba.getAttribute(wa)||0:0;if(!(qa=ta[Ia])){qa=t[Ia];qa=b(qa,ta[Ba]||t[Ba],null,true);qa.key=++B;ta[B]=qa}K&&Ma(Ia)}Da.removeAttribute(wa)}else if(K&&(qa=a.data(Da,"tmplItem"))){Ma(qa.key);ta[qa.key]=qa;Ba=(Ba=a.data(Da.parentNode,"tmplItem"))?Ba.key:0}if(qa){for(xa=qa;xa&&xa.key!=Ba;){xa.nodes.push(Da);xa=xa.parent}delete qa._ctnt;delete qa._wrap;a.data(Da,"tmplItem",qa)}}var E="_"+K,Q,F,fa=
{},da,f,Ca;da=0;for(f=q.length;da<f;da++)if((Q=q[da]).nodeType===1){F=Q.getElementsByTagName("*");for(Ca=F.length-1;Ca>=0;Ca--)C(F[Ca]);C(Q)}}function o(q,C,E,Q){if(!q)return M.pop();M.push({_:q,tmpl:C,item:this,data:E,options:Q})}function s(q,C,E){return a.tmpl(a.template(q),C,E,this)}function D(q,C){var E=q.options||{};E.wrapped=C;return a.tmpl(a.template(q.tmpl),q.data,E,q.item)}function T(q,C){var E=this._wrap;return a.map(a(a.isArray(E)?E.join(""):E).filter(q||"*"),function(Q){if(C)Q=Q.innerText||
Q.textContent;else{var F;if(!(F=Q.outerHTML)){F=document.createElement("div");F.appendChild(Q.cloneNode(true));F=F.innerHTML}Q=F}return Q})}function ja(){var q=this.nodes;a.tmpl(null,null,null,this).insertBefore(q[0]);a(q).remove()}var Aa=a.fn.domManip,wa="_tmplitem",Ea=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,ta={},t={},y,G={key:0,data:{}},B=0,K=0,M=[];a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(q,C){a.fn[q]=function(E){var Q=
[];E=a(E);var F,fa,da;F=this.length===1&&this[0].parentNode;y=ta||{};if(F&&F.nodeType===11&&F.childNodes.length===1&&E.length===1){E[C](this[0]);Q=this}else{fa=0;for(da=E.length;fa<da;fa++){K=fa;F=(fa>0?this.clone(true):this).get();a.fn[C].apply(a(E[fa]),F);Q=Q.concat(F)}K=0;Q=this.pushStack(Q,q,E.selector)}E=y;y=null;a.tmpl.complete(E);return Q}});a.fn.extend({tmpl:function(q,C,E){return a.tmpl(this[0],q,C,E)},tmplItem:function(){return a.tmplItem(this[0])},template:function(q){return a.template(q,
this[0])},domManip:function(q,C,E){if(q[0]&&q[0].nodeType){for(var Q=a.makeArray(arguments),F=q.length,fa=0,da;fa<F&&!(da=a.data(q[fa++],"tmplItem")););if(F>1)Q[0]=[a.makeArray(q)];if(da&&K)Q[2]=function(f){a.tmpl.afterManip(this,f,E)};Aa.apply(this,Q)}else Aa.apply(this,arguments);K=0;!y&&a.tmpl.complete(ta);return this}});a.extend({tmpl:function(q,C,E,Q){var F=!Q;if(F){Q=G;q=a.template[q]||a.template(null,q);t={}}else if(!q){q=Q.tmpl;ta[Q.key]=Q;Q.nodes=[];Q.wrapped&&n(Q,Q.wrapped);return a(d(Q,
null,Q.tmpl(a,Q)))}if(!q)return[];if(typeof C==="function")C=C.call(Q||{});E&&E.wrapped&&n(E,E.wrapped);C=a.isArray(C)?a.map(C,function(fa){return fa?b(E,Q,q,fa):null}):[b(E,Q,q,C)];return F?a(d(Q,null,C)):C},tmplItem:function(q){var C;if(q instanceof a)q=q[0];for(;q&&q.nodeType===1&&!(C=a.data(q,"tmplItem"))&&(q=q.parentNode););return C||G},template:function(q,C){if(C){if(typeof C==="string")C=l(C);else if(C instanceof a)C=C[0]||{};if(C.nodeType)C=a.data(C,"tmpl")||a.data(C,"tmpl",l(C.innerHTML));
return typeof q==="string"?a.template[q]=C:C}return q?typeof q!=="string"?a.template(null,q):a.template[q]||a.template(null,Ea.test(q)?q:a(q)):null},encode:function(q){return(""+q).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},
each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){ta={}},afterManip:function(q,C,E){var Q=C.nodeType===11?a.makeArray(C.childNodes):C.nodeType===1?[C]:[];E.call(q,C);m(Q);K++}})})(jQuery);
Function.prototype.debounce=function(a,b){var d=this,g;return function(){var l=this,n=arguments;if(g)clearTimeout(g);else b&&d.apply(l,n);g=setTimeout(function(){b||d.apply(l,n);g=null},a||100)}};
var swfobject=function(){function a(){if(!xa){try{var J=q.getElementsByTagName("body")[0].appendChild(q.createElement("span"));J.parentNode.removeChild(J)}catch(R){return}xa=true;J=Q.length;for(var Z=0;Z<J;Z++)Q[Z]()}}function b(J){if(xa)J();else Q[Q.length]=J}function d(J){if(typeof M.addEventListener!=y)M.addEventListener("load",J,false);else if(typeof q.addEventListener!=y)q.addEventListener("load",J,false);else if(typeof M.attachEvent!=y)Aa(M,"onload",J);else if(typeof M.onload=="function"){var R=
M.onload;M.onload=function(){R();J()}}else M.onload=J}function g(){var J=q.getElementsByTagName("body")[0],R=q.createElement(G);R.setAttribute("type",B);var Z=J.appendChild(R);if(Z){var ca=0;(function(){if(typeof Z.GetVariable!=y){var ga=Z.GetVariable("$version");if(ga){ga=ga.split(" ")[1].split(",");ha.pv=[parseInt(ga[0],10),parseInt(ga[1],10),parseInt(ga[2],10)]}}else if(ca<10){ca++;setTimeout(arguments.callee,10);return}J.removeChild(R);Z=null;l()})()}else l()}function l(){var J=F.length;if(J>
0)for(var R=0;R<J;R++){var Z=F[R].id,ca=F[R].callbackFn,ga={success:false,id:Z};if(ha.pv[0]>0){var oa=ja(Z);if(oa)if(wa(F[R].swfVersion)&&!(ha.wk&&ha.wk<312)){ta(Z,true);if(ca){ga.success=true;ga.ref=n(Z);ca(ga)}}else if(F[R].expressInstall&&j()){ga={};ga.data=F[R].expressInstall;ga.width=oa.getAttribute("width")||"0";ga.height=oa.getAttribute("height")||"0";if(oa.getAttribute("class"))ga.styleclass=oa.getAttribute("class");if(oa.getAttribute("align"))ga.align=oa.getAttribute("align");var na={};oa=
oa.getElementsByTagName("param");for(var va=oa.length,za=0;za<va;za++)if(oa[za].getAttribute("name").toLowerCase()!="movie")na[oa[za].getAttribute("name")]=oa[za].getAttribute("value");m(ga,na,Z,ca)}else{o(oa);ca&&ca(ga)}}else{ta(Z,true);if(ca){if((Z=n(Z))&&typeof Z.SetVariable!=y){ga.success=true;ga.ref=Z}ca(ga)}}}}function n(J){var R=null;if((J=ja(J))&&J.nodeName=="OBJECT")if(typeof J.SetVariable!=y)R=J;else if(J=J.getElementsByTagName(G)[0])R=J;return R}function j(){return!Ba&&wa("6.0.65")&&(ha.win||
ha.mac)&&!(ha.wk&&ha.wk<312)}function m(J,R,Z,ca){Ba=true;Da=ca||null;Ma={success:false,id:Z};var ga=ja(Z);if(ga){if(ga.nodeName=="OBJECT"){f=s(ga);Ca=null}else{f=ga;Ca=Z}J.id=K;if(typeof J.width==y||!/%$/.test(J.width)&&parseInt(J.width,10)<310)J.width="310";if(typeof J.height==y||!/%$/.test(J.height)&&parseInt(J.height,10)<137)J.height="137";q.title=q.title.slice(0,47)+" - Flash Player Installation";ca=ha.ie&&ha.win?"ActiveX":"PlugIn";ca="MMredirectURL="+M.location.toString().replace(/&/g,"%26")+
"&MMplayerType="+ca+"&MMdoctitle="+q.title;if(typeof R.flashvars!=y)R.flashvars+="&"+ca;else R.flashvars=ca;if(ha.ie&&ha.win&&ga.readyState!=4){ca=q.createElement("div");Z+="SWFObjectNew";ca.setAttribute("id",Z);ga.parentNode.insertBefore(ca,ga);ga.style.display="none";(function(){ga.readyState==4?ga.parentNode.removeChild(ga):setTimeout(arguments.callee,10)})()}D(J,R,Z)}}function o(J){if(ha.ie&&ha.win&&J.readyState!=4){var R=q.createElement("div");J.parentNode.insertBefore(R,J);R.parentNode.replaceChild(s(J),
R);J.style.display="none";(function(){J.readyState==4?J.parentNode.removeChild(J):setTimeout(arguments.callee,10)})()}else J.parentNode.replaceChild(s(J),J)}function s(J){var R=q.createElement("div");if(ha.win&&ha.ie)R.innerHTML=J.innerHTML;else if(J=J.getElementsByTagName(G)[0])if(J=J.childNodes)for(var Z=J.length,ca=0;ca<Z;ca++)!(J[ca].nodeType==1&&J[ca].nodeName=="PARAM")&&J[ca].nodeType!=8&&R.appendChild(J[ca].cloneNode(true));return R}function D(J,R,Z){var ca,ga=ja(Z);if(ha.wk&&ha.wk<312)return ca;
if(ga){if(typeof J.id==y)J.id=Z;if(ha.ie&&ha.win){var oa="",na;for(na in J)if(J[na]!=Object.prototype[na])if(na.toLowerCase()=="data")R.movie=J[na];else if(na.toLowerCase()=="styleclass")oa+=' class="'+J[na]+'"';else if(na.toLowerCase()!="classid")oa+=" "+na+'="'+J[na]+'"';na="";for(var va in R)if(R[va]!=Object.prototype[va])na+='<param name="'+va+'" value="'+R[va]+'" />';ga.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+oa+">"+na+"</object>";fa[fa.length]=J.id;ca=ja(J.id)}else{va=
q.createElement(G);va.setAttribute("type",B);for(var za in J)if(J[za]!=Object.prototype[za])if(za.toLowerCase()=="styleclass")va.setAttribute("class",J[za]);else za.toLowerCase()!="classid"&&va.setAttribute(za,J[za]);for(oa in R)if(R[oa]!=Object.prototype[oa]&&oa.toLowerCase()!="movie"){J=va;na=oa;za=R[oa];Z=q.createElement("param");Z.setAttribute("name",na);Z.setAttribute("value",za);J.appendChild(Z)}ga.parentNode.replaceChild(va,ga);ca=va}}return ca}function T(J){var R=ja(J);if(R&&R.nodeName=="OBJECT")if(ha.ie&&
ha.win){R.style.display="none";(function(){if(R.readyState==4){var Z=ja(J);if(Z){for(var ca in Z)if(typeof Z[ca]=="function")Z[ca]=null;Z.parentNode.removeChild(Z)}}else setTimeout(arguments.callee,10)})()}else R.parentNode.removeChild(R)}function ja(J){var R=null;try{R=q.getElementById(J)}catch(Z){}return R}function Aa(J,R,Z){J.attachEvent(R,Z);da[da.length]=[J,R,Z]}function wa(J){var R=ha.pv;J=J.split(".");J[0]=parseInt(J[0],10);J[1]=parseInt(J[1],10)||0;J[2]=parseInt(J[2],10)||0;return R[0]>J[0]||
R[0]==J[0]&&R[1]>J[1]||R[0]==J[0]&&R[1]==J[1]&&R[2]>=J[2]?true:false}function Ea(J,R,Z,ca){if(!(ha.ie&&ha.mac)){var ga=q.getElementsByTagName("head")[0];if(ga){Z=Z&&typeof Z=="string"?Z:"screen";if(ca)Ia=qa=null;if(!qa||Ia!=Z){ca=q.createElement("style");ca.setAttribute("type","text/css");ca.setAttribute("media",Z);qa=ga.appendChild(ca);if(ha.ie&&ha.win&&typeof q.styleSheets!=y&&q.styleSheets.length>0)qa=q.styleSheets[q.styleSheets.length-1];Ia=Z}if(ha.ie&&ha.win)qa&&typeof qa.addRule==G&&qa.addRule(J,
R);else qa&&typeof q.createTextNode!=y&&qa.appendChild(q.createTextNode(J+" {"+R+"}"))}}}function ta(J,R){if(Oa){var Z=R?"visible":"hidden";if(xa&&ja(J))ja(J).style.visibility=Z;else Ea("#"+J,"visibility:"+Z)}}function t(J){return/[\\\"<>\.;]/.exec(J)!=null&&typeof encodeURIComponent!=y?encodeURIComponent(J):J}var y="undefined",G="object",B="application/x-shockwave-flash",K="SWFObjectExprInst",M=window,q=document,C=navigator,E=false,Q=[function(){E?g():l()}],F=[],fa=[],da=[],f,Ca,Da,Ma,xa=false,Ba=
false,qa,Ia,Oa=true,ha=function(){var J=typeof q.getElementById!=y&&typeof q.getElementsByTagName!=y&&typeof q.createElement!=y,R=C.userAgent.toLowerCase(),Z=C.platform.toLowerCase(),ca=Z?/win/.test(Z):/win/.test(R);Z=Z?/mac/.test(Z):/mac/.test(R);R=/webkit/.test(R)?parseFloat(R.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var ga=!+"\u000b1",oa=[0,0,0],na=null;if(typeof C.plugins!=y&&typeof C.plugins["Shockwave Flash"]==G){if((na=C.plugins["Shockwave Flash"].description)&&!(typeof C.mimeTypes!=
y&&C.mimeTypes[B]&&!C.mimeTypes[B].enabledPlugin)){E=true;ga=false;na=na.replace(/^.*\s+(\S+\s+\S+$)/,"$1");oa[0]=parseInt(na.replace(/^(.*)\..*$/,"$1"),10);oa[1]=parseInt(na.replace(/^.*\.(.*)\s.*$/,"$1"),10);oa[2]=/[a-zA-Z]/.test(na)?parseInt(na.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else if(typeof M.ActiveXObject!=y)try{var va=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(va)if(na=va.GetVariable("$version")){ga=true;na=na.split(" ")[1].split(",");oa=[parseInt(na[0],10),parseInt(na[1],
10),parseInt(na[2],10)]}}catch(za){}return{w3:J,pv:oa,wk:R,ie:ga,win:ca,mac:Z}}();(function(){if(ha.w3){if(typeof q.readyState!=y&&q.readyState=="complete"||typeof q.readyState==y&&(q.getElementsByTagName("body")[0]||q.body))a();if(!xa){typeof q.addEventListener!=y&&q.addEventListener("DOMContentLoaded",a,false);if(ha.ie&&ha.win){q.attachEvent("onreadystatechange",function(){if(q.readyState=="complete"){q.detachEvent("onreadystatechange",arguments.callee);a()}});M==top&&function(){if(!xa){try{q.documentElement.doScroll("left")}catch(J){setTimeout(arguments.callee,
0);return}a()}}()}ha.wk&&function(){xa||(/loaded|complete/.test(q.readyState)?a():setTimeout(arguments.callee,0))}();d(a)}}})();(function(){ha.ie&&ha.win&&window.attachEvent("onunload",function(){for(var J=da.length,R=0;R<J;R++)da[R][0].detachEvent(da[R][1],da[R][2]);J=fa.length;for(R=0;R<J;R++)T(fa[R]);for(var Z in ha)ha[Z]=null;ha=null;for(var ca in swfobject)swfobject[ca]=null;swfobject=null})})();return{registerObject:function(J,R,Z,ca){if(ha.w3&&J&&R){var ga={};ga.id=J;ga.swfVersion=R;ga.expressInstall=
Z;ga.callbackFn=ca;F[F.length]=ga;ta(J,false)}else ca&&ca({success:false,id:J})},getObjectById:function(J){if(ha.w3)return n(J)},embedSWF:function(J,R,Z,ca,ga,oa,na,va,za,Sa){var Za={success:false,id:R};if(ha.w3&&!(ha.wk&&ha.wk<312)&&J&&R&&Z&&ca&&ga){ta(R,false);b(function(){Z+="";ca+="";var Ja={};if(za&&typeof za===G)for(var Ka in za)Ja[Ka]=za[Ka];Ja.data=J;Ja.width=Z;Ja.height=ca;Ka={};if(va&&typeof va===G)for(var $a in va)Ka[$a]=va[$a];if(na&&typeof na===G)for(var Ta in na)if(typeof Ka.flashvars!=
y)Ka.flashvars+="&"+Ta+"="+na[Ta];else Ka.flashvars=Ta+"="+na[Ta];if(wa(ga)){$a=D(Ja,Ka,R);Ja.id==R&&ta(R,true);Za.success=true;Za.ref=$a}else if(oa&&j()){Ja.data=oa;m(Ja,Ka,R,Sa);return}else ta(R,true);Sa&&Sa(Za)})}else Sa&&Sa(Za)},switchOffAutoHideShow:function(){Oa=false},ua:ha,getFlashPlayerVersion:function(){return{major:ha.pv[0],minor:ha.pv[1],release:ha.pv[2]}},hasFlashPlayerVersion:wa,createSWF:function(J,R,Z){if(ha.w3)return D(J,R,Z)},showExpressInstall:function(J,R,Z,ca){ha.w3&&j()&&m(J,
R,Z,ca)},removeSWF:function(J){ha.w3&&T(J)},createCSS:function(J,R,Z,ca){ha.w3&&Ea(J,R,Z,ca)},addDomLoadEvent:b,addLoadEvent:d,getQueryParamValue:function(J){var R=q.location.search||q.location.hash;if(R){if(/\?/.test(R))R=R.split("?")[1];if(J==null)return t(R);R=R.split("&");for(var Z=0;Z<R.length;Z++)if(R[Z].substring(0,R[Z].indexOf("="))==J)return t(R[Z].substring(R[Z].indexOf("=")+1))}return""},expressInstallCallback:function(){if(Ba){var J=ja(K);if(J&&f){J.parentNode.replaceChild(f,J);if(Ca){ta(Ca,
true);if(ha.ie&&ha.win)f.style.display="block"}Da&&Da(Ma)}Ba=false}}}}();function createEmptyDiv(a,b){if(!document.getElementById(b)){var d=document.createElement("div");d.id=b;document.getElementById(a).appendChild(d)}}function addSWF(a,b,d,g,l,n,j,m){g=g||{allowScriptAccess:"always"};l=l||"";n=n||"0";j=j||"0";m=m||"9";createEmptyDiv(b,d);swfobject.embedSWF(unescape(a),d,n,j,m,"/widgets/expressinstall.swf","",g,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,d,g,l){g||(g="/");if(d){var n=new Date;n.setTime(n.getTime()+d*1E3);d="; expires="+n.toGMTString()}else d="";a=a+"="+b+d+"; path="+g;if(l==null)document.cookie=a+"; domain=."+BaseDomain;else if(l=="")document.cookie=a}function readCookie(a){a+="=";for(var b=document.cookie.split(";"),d=0;d<b.length;d++){for(var g=b[d];g.charAt(0)==" ";)g=g.substring(1,g.length);if(g.indexOf(a)==0)return g.substring(a.length,g.length)}return null}
function ajax_url_params(a){var b=[],d=window.location.hash.slice(2);d.length>0&&b.push(d);d=window.location.search.slice(1);d.length>0&&b.push(d);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,d){if(!readCookie(b)){createCookie(b,"true",d);a()}}function add_hash_param(a,b){var d=window.location.hash.slice(2).toQueryParams();d[a]=b;window.location.hash="!"+Object.toQueryString(d)}function iframe_request(a,b){var d=document.createElement("iframe");d.src=a;d.style.display="none";d.style.visibility="hidden";d.onload=function(){b(d.contentWindow.document.body.innerHTML);document.body.removeChild(d)};on_dom_load(function(){document.body.appendChild(d)})}
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 d=document.createElement("div");d.style.display="none";document.body.appendChild(d);d.innerHTML=b;for(var g=0;g<d.childNodes.length;g++)a.appendChild($(d.childNodes[g]).remove());$(d).remove()}function set_volume(a){createCookie("volume",a,604800)}
function get_volume(){return readCookie("volume")||100}function limit_tags(a,b,d,g){for(a=$(a).getElementsByTagName(b);a.length>d;)if(g){b=a[a.length-1];b.parentNode.removeChild(b)}else a[0].parentNode.removeChild(a[0])}function addEvent(a,b,d){if(a.addEventListener)a.addEventListener(b,d,false);else if(a.attachEvent){a["e"+b+d]=d;a[b+d]=function(){a["e"+b+d](window.event)};a.attachEvent("on"+b,a[b+d])}}
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(d){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 d=function(){return{x:a(),y:b()}};d.x=a;d.y=b;return d}(),shorten=function(a,b){new Ajax.Request("/sharing/shorten",{method:"get",parameters:{url:a},onSuccess:function(d){b(d.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 d=Math.pow(10,b);return Math.round(a*d)/d}function bound(a,b,d){if(a<b)return b;if(a>d)return d;return a}function length_as_clock(a){var b=Math.floor(a%60),d=Math.floor(a%3600/60);return(a=Math.floor(a/3600))?a+":"+two_digit(d)+":"+two_digit(b):d+":"+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 d=[_("Sun"),_("Mon"),_("Tue"),_("Wed"),_("Thu"),_("Fri"),_("Sat")],g=[_("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()),
o=two_digit(a.getHours()),s=two_digit(a.getMinutes()),D=two_digit(a.getSeconds()),T=a.is_today(),ja=a.is_tomorrow(),Aa=g[a.getDay()]+" "+n[a.getMonth()]+" "+ordinalize(a.getDate());d=[["%a",d[a.getDay()]],["%A",g[a.getDay()]],["%b",l[a.getMonth()]],["%B",n[a.getMonth()]],["%c",a.toString()],["%d",two_digit(a.getDate())],["$d",a.getDate()],["%H",o],["%I",two_digit(m)],["%m",two_digit(a.getMonth()+1)],["%M",s],["%p",j],["%P",j.toUpperCase()],["%S",D],["%w",a.getDay()],["%x",time_to_date_string(a)],
["%X",m+":"+s+":"+D+" "+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"):ja?_("Tomorrow at"):Aa]];for(g=0;g<d.length;g++)b=b.replace(d[g][0],d[g][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(d){return 0}}
flash=function(){var a={},b=false,d=function(){};a.swfObjectCallback=function(g,l,n,j){g=/([0-9]+)/.exec(g)[1];var m=/([0-9]+)/.exec(l)[1];if(!j){if(!b){d();b=true}if(g>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(g){var l=d;d=function(){l();g()}};return a}();function checkAll(a,b,d){a=$(a).getElementsByClassName(a,b);for(b=0;b<a.length;b++)a[b].checked=d}function checkAllBoxes(a,b){for(var d=$(a).getElementsByTagName("input"),g=0;g<d.length;g++)if(d[g].type=="checkbox")d[g].checked=b}
function showTab(a,b){for(var d=0;d<b.length;d++){Element.hide(b[d]+"_panel");Element.removeClassName(b[d]+"_tab","selected")}Element.show(a+"_panel");Element.addClassName(a+"_tab","selected")}function setClassForDuration(a,b,d){Element.addClassName(a,b);setTimeout(function(){Element.removeClassName(a,b)},d*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(d){return d+"<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,d){return(d==1?a:b).replace("%d",commatize(d))}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(d,g){return b[g]})}function l_(a,b){var d=$A(arguments).slice(2);return b.replace(/\$(.+?)\$/g,function(g,l){return a.apply(this,[l].concat(d))})}function enclose(a,b,d){return b+a+d}function get_username(){return PP.login}
function log_stat(a,b,d){b=b||[];var g=new Image(1,1);if(d)g.onload=d;try{query_string=[encodeURIComponent(a),b.map(encodeURI),get_page_log_params().toQueryString()].flatten().join("&");g.src="http://stats.jtvnw.net/"+Math.round(Math.random()*1E4)+"?"+query_string;return g}catch(l){}}
function get_page_log_params(){var a=$H(),b=function(d,g){g&&g!==""&&a.set(d,g)};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(d){b(d,PP[d])});return a}function log_stat_afterload(a,b,d){Event.observe(window,"load",function(){log_stat(a,b,d)})}
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 d=this.list().concat([[a,b]]).map(this.combine);d=d.slice(-4);createCookie("recent-cats",this.combine_all(d))},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 d=a.getHours();if(d>12)d-=12;else if(d==0)d=12;var g=PP.user_id;if(new Date(2007,11,24,0,0,0)<new Date&&(g==7824||g==39980||g==6356))return d+":"+b+" "+(a.getHours()>11?"pm":"am");return d+":"+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.*/},d=null;a.os=function(){d=$H(b).keys().detect(function(n){return b[n].test(navigator.platform)})||"unknown";a.os=function(){return d};return d};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 g=["IE","Opera","WebKit","MobileSafari","Gecko"],l=null;a.browser=function(){l=$A(g).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,d){log_stat("change_language_clicked",["current_language="+a,"new_language="+b,"logged_in="+(PP.login==null)],function(){var g=d;if(a!==b){g=d.replace("://"+a+".","://"+b+".");if(g===d)g=d.match("www.")?d.replace("www",b):d.replace(LanguageBaseDomain,b+"."+LanguageBaseDomain)}redirect_respecting_analytics(g)})}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 d=[];if(b.startsWith("from-")){d.push("from");d.push(b.substr(5))}else if(b.startsWith("my")){d.push("chat");d.push(b.substr(2))}else d=b.split("=");if(d.length>=2)a[d[0]]=d[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,d,g){growl('<a href="'+g+'" style="display:block;"><table><tr><td><img style="height:40px;width:40px" src="'+d+'" /></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,d){if(!$$(".notification_holder .content").any(function(l){return l.innerHTML.replace(/\s/,"")==a.replace(/\s/,"")})){var g="growl_"+growl.growl_id++;b=['<div class="notification_holder" id="',g,'"><div class="notification"><a href="#" class="close" onclick="$(\'',g,'\').hide(); return false;">X</a><div class="content ',b,'">',a,"</div></div></div>"].join("");appendHTML("growl_slider",b);$(g).onmouseover=function(){x=$(g).down("a.close");x.style.display="block"};$(g).onmouseout=
function(){x=$(g).down("a.close");x.style.display=""};$("growl_container").show();d||(d=7);new Effect.Fade(g,{duration:3,delay:d,queue:{scope:g},afterFinish:function(){var l=$(g).offsetHeight;new Effect.Move("growl_slider",{y:0-l,x:0,mode:"relative",afterFinish:function(){$(g).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,d,g){$("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(){d&&d();hide_info_popup();return false};$("info_popup").removeClassName("single");$("info_popup").removeClassName("narrow");$("info_popup").removeClassName("double");$("info_popup").addClassName(g?g:"single")}
function hide_info_popup(){$("info_popup_container").hide();$("info_popup_cover").hide()}function user_profile_image(a){var b=PP.profile_image,d=PP.login;if(b){var g=b.match(/:uid=>"(\w+)"/);if(g)b=b.match(/:format=>"(\w+)"/);else{g=b.match(/:uid:\s*(\w+)/);b=b.match(/:format:\s*(\w+)/)}return"http://s.jtvnw.net/jtv_user_pictures/"+d+"-profile_image-"+g[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(g){g.apply(EventBank,b)});var d=EventBank.prefix_handlers[a.split(":")[0]]||[];$A(d).each(function(g){g.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 d,g=EventBank.backlog[a];d=g.pop();)b.apply(EventBank,d)};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(d){$("login_validation").src="/images/"+b+"-"+d.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 d in sharing_login_windows)sharing_login_windows.hasOwnProperty(d)&&a!=d&&sharing_login_windows[d].close();for(d in sharing_login_windows)sharing_login_windows.hasOwnProperty(d)&&a!==d&&sharing_login_callbacks[d].onFailure({message:_("You started to log in to another messaging service.")});log_stat("sharing/login_prompt",["status=start","service="+a,"prompt_type="+b.type]);d=window.open("/sharing/begin_login?service="+a+"&login_prompt_type="+b.type,
"sharing_login_window","width=1024,height=400");sharing_login_windows[a]=d;if(!d.opener)d.opener=window;window.focus&&d.focus();sharing_login_callbacks[a]={onSuccess:function(g){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(g)},onFailure:function(g){delete sharing_login_callbacks[a];delete sharing_login_windows[a];log_stat("sharing/login_prompt",["status=failure","service="+
a]);return b.onFailure(g)}}};
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(),d=broadcast_part_from_url();if(b&&d){a.type="broadcast";a.id=PP.channel+":"+b+":"+d}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,d,g){a=["_trackEvent",a,b];d!=null&&a.push(d);g!=null&&a.push(g);_gaq.push(a);return true}function track_analytics_event(a){_gaq.push(["_trackPageview",a])}
function redirect_respecting_analytics(a){var b=/\?/.test(a)?"&":"?",d=$A(window.location.search.slice(1).split("&")).map(function(g){return g.split("=")}).findAll(function(g){return g[0]in{utm_source:1,utm_medium:1,utm_campaign:1,utm_term:1,utm_content:1}}).map(function(g){return g.join("=")}).join("&");if(d)a=a+b+d;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,d,g,l){if((g=="true"||g===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(d+"/dmca_violation");else if(b=="tos")redirect_respecting_analytics(d+"/tos_violation");else if(b&&b!="directory_hidden")a=="archive"?redirect_respecting_analytics(d):redirect_respecting_analytics(d+"/dmca_violation")}
Mixpanel={track_with_swf:function(a,b){Mixpanel._init();var d="_mpq_"+window._mp.count;window._mp.count=(window._mp.count+1)%window._mp.cap;var g={allowScriptAccess:"always",allowNetworking:"all",flashvars:Mixpanel._build_flashvars(a,b)};addSWF("/widgets/mixpanel_beacon.swf","_mpq",d,g,{id:d,name:"left",bgcolor:"#000000"})},_build_flashvars:function(a,b){b=Object.clone(b);b.login=PP.login;var d,g,l,n=0,j=[];j[n++]="event="+a.toString();for(d in b)if(d)if(d!="event"){val=b[d];g=val==null?"":val.toString();
l=d;j[n++]=l+"="+g}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,d){a.ajax({url:"/discovery/game",dataType:"json",data:{name:b},success:function(g){d(g)},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",d=a.length-1;d>=0;d--)if(a[d][1]=="white")a[d][2].indexOf(b)!=-1||LateLoader.prevent_ad(a[d][0]);else a[d][2].indexOf(b)!=-1&&LateLoader.prevent_ad(a[d][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 d=a.getAttribute("src1");a.id="lateload"+b;LateLoader.images.push({id:a.id,src:d})}})},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 o=m.cumulativeOffset().top-
(m.cumulativeScrollOffset().top-a);if(b>=o-20&&m.clientWidth>0){m.src=j.src;return false}}return true});if(LateLoader.channel_about_me){var d=$("about_me_container"),g=d.cumulativeOffset();if(b>=g.top-20){d.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()});d=-50;if($("clips"))d+=$("clips").getHeight();if($("about"))d+=$("about").getHeight();d=Math.min(l,d,400);g=$("related_list");if(d>
g.getHeight())g.style.height=d+"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),d=$(a+"_holder");if(b&&d)if(PP.is_pro||
PP.active_channel_subscriber||$("right_col")&&!$("right_col").hasClassName("ad")){if(!d.hidden){d.hide();d.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 g=0,l=0;if(a.indexOf("Leaderv")>-1){LateLoader.leader_ad=true;g=b.getHeight();l=b.getWidth();g>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=d.positionedOffset();if(a.indexOf("Leaderv")>-1){if(g>0)b.style.top=n.top+(d.getHeight()-g)/2+"px";if(l>0)b.style.left=n.left+(d.getWidth()-l)/2+"px"}else{b.style.top=n.top+"px";b.style.left=n.left+"px";b.style.width=d.offsetWidth+"px";if(b.offsetHeight>0)d.style.height=b.offsetHeight+"px";else Event.observe(window,"load",function(){if($(a).offsetHeight>0)d.style.height=$(a).offsetHeight+"px";LateLoader.leader_ad&&
LateLoader.reposition_all_ads()})}b.show();(b=$(a+"_load_text"))&&b.remove();d.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 d=$(a);if(d){max_height=0;d.descendants().each(function(g){if(g.tagName.toUpperCase()=="DIV"){var l=g.getStyle("clip");if(l)try{ss=l.split(",");if(ss.length<2)ss=l.split(" ");parseInt(ss[2])>0?g.setStyle({height:parseInt(ss[2])+"px"}):g.setStyle({height:null})}catch(n){}g=
g.getHeight();if(g>max_height)max_height=g}});$(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(d){return d.match(b)[1]}).map(function(d){$$("body")[0].insert(new Element("script",{src:d}))});$$("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(d){}});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(d){var g=$(b+d);if(g)new Effect.Move(g,{x:0,y:a,mode:"relative"});else(g=$("Staging_"+b+d))&&new Effect.Move(g,{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,d,g,l,n){d||(d=310);g||(g=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="'+g+'" width="'+d+'" id="ad_iframe" scrolling="no"></iframe>';$(a).innerHTML=m;$(a).show();if(n){$(a).setStyle({width:d+"px",height:g+"px"});$(a).ancestors()[0].setStyle({width:d+35+"px",height:g+"px"})}LateLoader.reposition_all_ads()};url="/ad/iframe_ad?";
url+="ad_slot="+b+"&just_ad="+l+"&height="+g+"&width="+d;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,d){this.disabled=d.disabled||false;this.options=d;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],d.delay);this.tip_parts.push(b[a])}try{b[0].parentNode.show()}catch(g){}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(d){d.style.position="absolute";d.style.left=this._pointer.x+a+"px";d.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(d){return Position.within(d,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(d){Event.pointer(d);this._logEvent(d);this._control()}.bindAsEventListener(this);a.observe("mouseover",b);b=a.select(".close");a.hasClassName("close")&&b.push(a);b.each(function(d){d.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 d=get_coordinates(a),g=get_coordinates(b);d={top:Math.max(d.top,g.top),left:Math.max(d.left,g.left),right:Math.min(d.right,g.right),bottom:Math.min(d.bottom,g.bottom)};return d.right>d.left&&d.bottom>d.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(d){return b.getElementsByTagName(d).length>0}))return false;return $A(a.tip_parts).any(function(d){return check_overlap(b,d)})}).invoke("hide")},onHide:function(){$$(".managed_ad").invoke("show")}};
function ajaxMenu(a,b,d,g,l){d=$(d);var n={pageX:0,pageY:0,timestamp:0},j=function(o){n.pageX=Event.pointerX(o);n.pageY=Event.pointerY(o)},m=function(o){if(!d.loading){d.loading=true;n.timestamp=(new Date).valueOf();j(o);Event.observe(document.body,"mousemove",j);new Ajax.Request(a,{method:"get",onSuccess:function(s){Event.stopObserving(d,"mouseover",m);Event.stopObserving(document.body,"mousemove",j);$(g).insert(s.responseText);s.responseText.evalScripts();s=dropmenus.push((new Tooltip.Fixed(b,l)).attach(d))-
1;l.on_load&&l.on_load(d,dropmenus[s]);dropmenus[s]._logEvent(n);dropmenus[s]._control()},onComplete:function(){if($(d).identify()=="usermgmt_dropmenu_toggle"||$(d).identify()=="header_language_dropmenu_toggle")position_to_container(b,d,"right");else if($(d).identify()=="category_dropmenu_toggle"||$(d).identify()=="subcategory_dropmenu_toggle"||$(d).identify()=="language_filter_dropmenu_toggle"){var s=1,D=$("DiropaBanner_holder");D||(D=$("Staging_DiropaBanner_holder"));if(D)s+=D.offsetHeight+13;s>
0&&b[0].setStyle({marginTop:s+"px"});b[1].setStyle({marginTop:s+"px"})}$("header_dropmenus")&&$("header_dropmenus").show()}})}};Event.observe(d,"mouseover",m.bindAsEventListener(window))}function position_to_container(a,b,d){var g=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"});d=d=="right"?b-$(g).getWidth()+$(a).getWidth():b;$(g).setStyle({left:d+"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,d){a.observe("click",function(){log_stat(b,d)})}function track_promoted_links(a,b,d){for(var g in d)for(var l=$$(a+" "+d[g]),n=0;n<l.length;n++)track_link_click(l[n],"promoted_click",["source="+b,"link_type="+g,"pos="+n])}
function track_promoted_links_with_id(a,b,d,g){a=$$(a);$A(a).each(function(l,n){var j=$H(g).map(function(s){return l.hasClassName(s[0])?s[1]:""}).join(""),m;for(m in d){var o=$$("#"+l.id+" "+d[m]);$A(o).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"})});String.prototype.parseColor=function(a){var b="#";if(this.slice(0,4)=="rgb("){var d=this.slice(4,this.length-1).split(","),g=0;do b+=parseInt(d[g]).toColorPart();while(++g<3)}else if(this.slice(0,1)=="#"){if(this.length==4)for(g=1;g<4;g++)b+=(this.charAt(g)+this.charAt(g)).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(d){return d.nodeType==3?d.nodeValue:d.hasChildNodes()&&!Element.hasClassName(d,b)?Element.collectTextNodesIgnoreClass(d,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(d){}};
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(d){if(d.nodeType==3){d.nodeValue.toArray().each(function(g){a.insertBefore((new Element("span",{style:b})).update(g==" "?String.fromCharCode(160):g),d)});Element.remove(d)}})},multiple:function(a,b,d){a=
(typeof a=="object"||Object.isFunction(a))&&a.length?a:$(a).childNodes;var g=Object.extend({speed:0.1,delay:0},d||{}),l=g.delay;$A(a).each(function(n,j){new b(n,Object.extend(g,{delay:j*g.speed+l}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(a,b,d){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}},d||{}))}};
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(d){return d.state=="idle"}).each(function(d){d.startOn+=a.finishOn;d.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,d=this.effects.length;b<d;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(d,
g){d.options[g+"Internal"]&&d.options[g+"Internal"](d);d.options[g]&&d.options[g](d)}return function(d){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");this.setup&&this.setup();b(this,"afterSetup")}if(this.state==="running"){this.position=d=this.options.transition(d)*this.fromToDelta+this.options.from;b(this,"beforeUpdate");this.update&&this.update(d);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,d){a=Object.isString(a)?$(a):a;var g=$A(arguments),l=g.last();g=g.length==5?g[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:d},g||{}))},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,d,g){return new Effect.Move(a,Object.extend({x:d,y:b},g||{}))};
Effect.Scale=Class.create(Effect.Base,{initialize:function(a,b,d){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},d||{}))},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 d={};
if(this.options.scaleX)d.width=b.round()+"px";if(this.options.scaleY)d.height=a.round()+"px";if(this.options.scaleFromCenter){var g=(a-this.dims[0])/2,l=(b-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY)d.top=this.originalTop-g+"px";if(this.options.scaleX)d.left=this.originalLeft-l+"px"}else{if(this.options.scaleY)d.top=-g+"px";if(this.options.scaleX)d.left=-l+"px"}}this.element.setStyle(d)}});
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,d,g){return b+
(this._base[g]+this._delta[g]*a).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(a,b){var d=b||{},g=document.viewport.getScrollOffsets(),l=$(a).cumulativeOffset();if(d.offset)l[1]+=d.offset;return new Effect.Tween(null,g.top,l[1],d,function(n){scrollTo(g.left,n.round())})};
Effect.Fade=function(a,b){a=$(a);var d=a.getInlineOpacity(),g=Object.extend({from:a.getOpacity()||1,to:0,afterFinishInternal:function(l){l.options.to==0&&l.element.hide().setStyle({opacity:d})}},b||{});return new Effect.Opacity(a,g)};
Effect.Appear=function(a,b){a=$(a);var d=Object.extend({from:a.getStyle("display")=="none"?0:a.getOpacity()||0,to:1,afterFinishInternal:function(g){g.element.forceRerendering()},beforeSetup:function(g){g.element.setOpacity(g.options.from).show()}},b||{});return new Effect.Opacity(a,d)};
Effect.Puff=function(a,b){a=$(a);var d={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(g){Position.absolutize(g.effects[0].element)},afterFinishInternal:function(g){g.effects[0].element.hide().setStyle(d)}},
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(d){d.element.hide().undoClipping()}},b||{}))};
Effect.BlindDown=function(a,b){a=$(a);var d=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:d.height,originalWidth:d.width},restoreAfterFinish:true,afterSetup:function(g){g.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(g){g.element.undoClipping()}},b||{}))};
Effect.SwitchOff=function(a,b){a=$(a);var d=a.getInlineOpacity();return new Effect.Appear(a,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(g){new Effect.Scale(g.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:d})}})}},b||{}))};
Effect.DropOut=function(a,b){a=$(a);var d={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(g){g.effects[0].element.makePositioned()},afterFinishInternal:function(g){g.effects[0].element.hide().undoPositioned().setStyle(d)}},b||{}))};
Effect.Shake=function(a,b){a=$(a);var d=Object.extend({distance:20,duration:0.5},b||{}),g=parseFloat(d.distance),l=parseFloat(d.duration)/10,n={top:a.getStyle("top"),left:a.getStyle("left")};return new Effect.Move(a,{x:g,y:0,duration:l,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-g*2,y:0,duration:l*2,afterFinishInternal:function(m){new Effect.Move(m.element,{x:g*2,y:0,duration:l*2,afterFinishInternal:function(o){new Effect.Move(o.element,{x:-g*2,y:0,duration:l*2,afterFinishInternal:function(s){new Effect.Move(s.element,
{x:g*2,y:0,duration:l*2,afterFinishInternal:function(D){new Effect.Move(D.element,{x:-g,y:0,duration:l,afterFinishInternal:function(T){T.element.undoPositioned().setStyle(n)}})}})}})}})}})}})};
Effect.SlideDown=function(a,b){a=$(a).cleanWhitespace();var d=a.down().getStyle("bottom"),g=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:g.height,originalWidth:g.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:d})}},b||{}))};
Effect.SlideUp=function(a,b){a=$(a).cleanWhitespace();var d=a.down().getStyle("bottom"),g=a.getDimensions();return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:g.height,originalWidth:g.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:d})}},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 d=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},b||{}),g={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,o;switch(d.direction){case "top-left":n=j=m=o=0;break;case "top-right":n=l.width;j=o=0;m=-l.width;break;case "bottom-left":n=m=0;j=l.height;o=-l.height;break;
case "bottom-right":n=l.width;j=l.height;m=-l.width;o=-l.height;break;case "center":n=l.width/2;j=l.height/2;m=-l.width/2;o=-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:d.opacityTransition}),new Effect.Move(s.element,{x:m,y:o,sync:true,transition:d.moveTransition}),new Effect.Scale(s.element,100,
{scaleMode:{originalHeight:l.height,originalWidth:l.width},sync:true,scaleFrom:window.opera?1:0,transition:d.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(D){D.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(D){D.effects[0].element.undoClipping().undoPositioned().setStyle(g)}},d))}})};
Effect.Shrink=function(a,b){a=$(a);var d=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},b||{}),g={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(d.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:d.opacityTransition}),new Effect.Scale(a,window.opera?1:0,{sync:true,transition:d.scaleTransition,restoreAfterFinish:true}),new Effect.Move(a,{x:n,y:j,sync:true,transition:d.moveTransition})],Object.extend({beforeStartInternal:function(m){m.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(m){m.effects[0].element.hide().undoClipping().undoPositioned().setStyle(g)}},
d))};Effect.Pulsate=function(a,b){a=$(a);var d=b||{},g=a.getInlineOpacity(),l=d.transition||Effect.Transitions.linear;return new Effect.Opacity(a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(n){n.element.setStyle({opacity:g})}},d),{transition:function(n){return 1-l(-Math.cos(n*(d.pulses||5)*2*Math.PI)/2+0.5)}}))};
Effect.Fold=function(a,b){a=$(a);var d={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(g){g.element.hide().undoClipping().setStyle(d)}})}},b||{}))};
Effect.Morph=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;var d=Object.extend({style:{}},b||{});if(Object.isString(d.style))if(d.style.include(":"))this.style=d.style.parseStyle();else{this.element.addClassName(d.style);this.style=$H(this.element.getStyles());this.element.removeClassName(d.style);var g=this.element.getStyles();this.style=this.style.reject(function(l){return l.value==g[l.key]});d.afterFinishInternal=function(l){l.element.addClassName(l.options.style);
l.transforms.each(function(n){l.element.style[n.style]=""})}}else this.style=$H(d.style);this.start(d)},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(d){return parseInt(b.slice(d*2+1,d*2+3),16)})}this.transforms=this.style.map(function(b){var d=b[0];b=b[1];var g=null;if(b.parseColor("#zzzzzz")!="#zzzzzz"){b=b.parseColor();g="color"}else if(d=="opacity"){b=parseFloat(b);Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&
this.element.setStyle({zoom:1})}else if(Element.CSS_LENGTH.test(b)){g=b.match(/^([\+\-]?[0-9\.]+)(.*)$/);b=parseFloat(g[1]);g=g.length==3?g[2]:null}var l=this.element.getStyle(d);return{style:d.camelize(),originalValue:g=="color"?a(l):parseFloat(l||0),targetValue:g=="color"?a(b):b,unit:g}}.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={},d,g=this.transforms.length;g--;)b[(d=this.transforms[g]).style]=
d.unit=="color"?"#"+Math.round(d.originalValue[0]+(d.targetValue[0]-d.originalValue[0])*a).toColorPart()+Math.round(d.originalValue[1]+(d.targetValue[1]-d.originalValue[1])*a).toColorPart()+Math.round(d.originalValue[2]+(d.targetValue[2]-d.originalValue[2])*a).toColorPart():(d.originalValue+(d.targetValue-d.originalValue)*a).toFixed(3)+(d.unit===null?"":d.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 d=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:d}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var b=a.get("ids"),d=a.get("effect"),g=a.get("options");return[$(b)||$$(b)].flatten().map(function(l){return new d(l,Object.extend({sync:true},
g))})}).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(d){a[d]&&b.set(d,a[d])});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(d,g){d[g]=b[g];return d})}:function(a){a=$(a);var b=a.currentStyle,d;d=Element.CSS_PROPERTIES.inject({},function(g,l){g[l]=b[l];return g});if(!d.opacity)d.opacity=a.getOpacity();return d};
Effect.Methods={morph:function(a,b,d){a=$(a);new Effect.Morph(a,Object.extend({style:b},d||{}));return a},visualEffect:function(a,b,d){a=$(a);b=b.dasherize().camelize();b=b.charAt(0).toUpperCase()+b.substring(1);new Effect[b](a,d);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,d){b=$(b);Effect[a.charAt(0).toUpperCase()+a.substring(1)](b,d);return b}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
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,d){function g(l,n){function j(s){a(m).each(function(){var D=a(this);this!==s.target&&!D.has(s.target).length&&D.triggerHandler(n,[s.target])})}n=n||l+d;var m=a(),o=l+"."+n+"-special-event";a.event.special[n]={setup:function(){m=m.add(this);m.length===1&&a(b).bind(o,j)},teardown:function(){m=m.not(this);m.length===0&&a(b).unbind(o)},add:function(s){var D=s.handler;s.handler=function(T,ja){T.target=ja;D.apply(this,arguments)}}}}a.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "),
function(l){g(l)});g("focusin","focus"+d);g("focusout","blur"+d);a.addOutsideEvent=g})(jQuery,document,"outside");
(function(a){function b(g,l){l=a.extend({side:"left",above:false},l);g.hide();g.css({position:"absolute","z-index":10,top:0,left:0});g.find(".close").click(function(n){n.preventDefault();g.is(":visible")&&g.hide()});a("body").keyup(function(n){n.keyCode===27&&g.is(":visible")&&g.hide()});return this.each(function(){var n=a(this),j=function(){var o=n.offset(),s=l.above?o.top-g.outerHeight()-5:o.top+n.outerHeight()+5,D=o.left+n.outerWidth();o=l.side==="left"?D-g.outerWidth():o.left;g.css("top",s);g.css("left",
o)};a(window).bind("resize",j);var m=function(){if(!g.is(":visible")){j();g.show();g.css("outline","none")}};n.bind("click display",function(o){o.preventDefault();o.stopPropagation();if(g.is(":visible"))g.hide();else if(g._contentFn){var s=g._contentFn;s(g,m,o);g._contentFn=false}else m(o)})})}var d={close_on_outside_click:function(g,l){var n=a(this);b.call(n,g,l);g.bind("clickoutside",function(){g.is(":visible")&&g.hide()})},click_to_close:function(g,l){var n=a(this);b.call(n,g,l)},close_on_click:function(g,
l){var n=a(this);b.call(n,g,l);g.click(function(){g.hide()})}};a.fn.popup=function(g,l,n){if(typeof g!=="string"){n=l;l=g;g="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 o;if(o=d[g])return this.each(function(){o.call(this,l,n)});else throw"No method with name: "+g;}})($j);
(function(a){a.fn.placeholder=function(){function b(d){return a(d).val()==a(d).attr("placeholder")}return this.each(function(){a(this).find("[placeholder]").each(function(){if(a(this).attr("type")=="password"){var d=a("<input type='text'>");d.attr("rel",a(this).attr("id"));d.attr("value",a(this).attr("placeholder"));a(this).parent().append(d);d.hide();var g=function(n){if(a(n).val()==""||b(n)){a(n).hide();a("input[rel="+a(n).attr("id")+"]").show()}};d.focus(function(){a(this).hide();a("input#"+a(this).attr("rel")).show().focus()});
a(this).blur(function(){g(this,false)});g(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){function b(d,g){this.$element=a(d);this.options=g;this.enabled=true;this.fixTitle()}b.prototype={show:function(){var d=this.getTitle();if(d&&this.enabled){var g=this.tip();g.find(".tipsy-inner")[this.options.html?"html":"text"](d);g[0].className="tipsy";g.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);d=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var l=g[0].offsetWidth,n=g[0].offsetHeight,
j=typeof this.options.gravity=="function"?this.options.gravity.call(this.$element[0]):this.options.gravity,m;switch(j.charAt(0)){case "n":m={top:d.top+d.height+this.options.offset,left:d.left+d.width/2-l/2};break;case "s":m={top:d.top-n-this.options.offset,left:d.left+d.width/2-l/2};break;case "e":m={top:d.top+d.height/2-n/2,left:d.left-l-this.options.offset};break;case "w":m={top:d.top+d.height/2-n/2,left:d.left+d.width+this.options.offset}}if(j.length==2)m.left=j.charAt(1)=="w"?d.left+d.width/2-
15:d.left+d.width/2-l+15;g.css(m).addClass("tipsy-"+j);g.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+j.charAt(0);this.options.className&&g.addClass(typeof this.options.className=="function"?this.options.className.call(this.$element[0]):this.options.className);this.options.fade?g.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):g.css({visibility:"visible",opacity:this.options.opacity});this.options.clickClose&&g.bind("click",{element:this.$element,
callback:this.options.closeCallback},function(o){o.data.element.tipsy("hide");o.data.callback&&o.data.callback()})}},showTimed:function(){var d=this;d.show();d.$element.delay(this.options.timerLength).queue(function(g){d.hide();g()})},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){a(this).remove()}):this.tip().remove()},fixTitle:function(){var d=this.$element;if(d.attr("title")||typeof d.attr("original-title")!="string")d.attr("original-title",d.attr("title")||"").removeAttr("title")},
getTitle:function(){var d,g=this.$element,l=this.options;this.fixTitle();l=this.options;if(typeof l.title=="string")d=g.attr(l.title=="title"?"original-title":l.title);else if(typeof l.title=="function")d=l.title.call(g[0]);return(""+d).replace(/(^\s*|\s*$)/,"")||l.fallback},tip:function(){if(!this.$tip)this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.options=
this.$element=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};a.fn.tipsy=function(d){function g(o){var s=a.data(o,"tipsy");if(!s){s=new b(o,a.fn.tipsy.elementOptions(o,d));a.data(o,"tipsy",s)}return s}function l(){var o=g(this);o.hoverState="in";if(d.delayIn==0)o.show();else{o.fixTitle();setTimeout(function(){o.hoverState=="in"&&o.show()},d.delayIn)}}function n(){var o=g(this);o.hoverState="out";d.delayOut==0?
o.hide():setTimeout(function(){o.hoverState=="out"&&o.hide()},d.delayOut)}if(d===true)return this.data("tipsy");else if(typeof d=="string"){var j=this.data("tipsy");j&&j[d]();return this}d=a.extend({},a.fn.tipsy.defaults,d);d.live||this.each(function(){g(this)});if(d.trigger!="manual"){j=d.live?"live":"bind";var m=d.trigger=="hover"?"mouseleave":"blur";this[j](d.trigger=="hover"?"mouseenter":"focus",l)[j](m,n)}return this};a.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:false,fallback:"",
gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover",clickClose:false,closeCallback:null,timerLength:3E3};a.fn.tipsy.elementOptions=function(d,g){return a.metadata?a.extend({},g,a(d).metadata()):g};a.fn.tipsy.autoNS=function(){return a(this).offset().top>a(document).scrollTop()+a(window).height()/2?"s":"n"};a.fn.tipsy.autoWE=function(){return a(this).offset().left>a(document).scrollLeft()+a(window).width()/2?"e":"w"};a.fn.tipsy.autoBounds=function(d,g){return function(){var l=
{ns:g[0],ew:g.length>1?g[1]:false},n=a(document).scrollTop()+d,j=a(document).scrollLeft()+d,m=a(this);if(m.offset().top<n)l.ns="n";if(m.offset().left<j)l.ew="w";if(a(window).width()+a(document).scrollLeft()-m.offset().left<d)l.ew="e";if(a(window).height()+a(document).scrollTop()-m.offset().top<d)l.ns="s";return l.ns+(l.ew?l.ew:"")}}})(jQuery);
(function(a){a(function(){var b=a("body");b.bind("login.overlay.show",function(d,g){b.overlay(g.url,function(){a("#subwindow_close").click(function(l){l.preventDefault();a(this).trigger("overlay.hide")})},g)})});a.login=function(){var b=a("body"),d={url:"/user/login_popup",width:"640px",id:"login_subwindow",focusOnLoad:"#login_user_login",destroyOnHide:false};if(b.innerWidth()<640)d=a.extend({},d,{url:"/user/login_popup_small",width:"326px"});b.trigger("login.overlay.show",[d])};a.fn.login=function(b){b=
a.extend({},b,{events:"click"});return this.each(function(){a(this).bind(b.events,function(d){d.preventDefault();a.login()})})}})($j);
(function(a){a.fn.siteNotification=function(b){return this.each(function(){var d=a(this),g=d.children(".body"),l=d.children(".close"),n=readCookie("notification_closed/"+b,n),j=function(){createCookie("notification_closed/"+b,n,6048E5);d.slideUp("fast")},m=function(){a.ajax({url:"/site_announce/"+b+".html",dataType:"json",success:function(o){if(o.alert_id!=n){n=o.alert_id;g.html(o.html);["notice","error","warning","success","purple"].each(function(s){d.removeClass(s)});d.addClass(o.type||"notice");
d.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,d){if(typeof d=="undefined"){d=b;b=null}else d.url=b;var g=d.error;d.error=function(l){l.status==403&&a.forceLogIn();g&&g.apply(this,arguments)};return a.ajax(d)};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,
d,g){a.get("/dropmenu/languages").success(function(l){b.html(l);d(g)})},{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,d,g){g=a.extend({closeOnEsc:true,width:"640px",useIframe:false,destroyOnHide:true},g);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);g.focusOnLoad&&a(g.focusOnLoad).focus()}else{var n,
j=function(){if(!n){n=a("<div></div>").addClass("twitch_cover");g.cover_opacity&&n.css("opacity",g.cover_opacity);l.prepend(n).show()}};g.cover_immediately&&j();a.get(b).success(function(m){var o,s;try{o=g.isIframe?"<iframe></iframe>":"<div></div>";s=a(o).addClass("twitch_subwindow").addClass("rounder").html(m)}catch(D){throw"Invalid data";}g.id&&s.attr("id",g.id);s.css("width",g.width);var T=a("<div></div>").addClass("twitch_subwindow_container");j();l.prepend(T).show();T.prepend(s).show();l.scrollTop(0);
g.focusOnLoad&&a(g.focusOnLoad).focus();g.closeOnEsc&&l.bind("keyup",function(ja){ja.keyCode===27&&l.trigger("overlay.hide")});l.bind("overlay.hide",function(ja){ja.stopPropagation();if(g.destroyOnHide){s.remove();T.remove();n.remove()}else{s.hide();T.hide();n.hide()}});d()})}})}})(jQuery);

