var Prototype={Version:"1.6.0.3",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div")["__proto__"]&&document.createElement("div")["__proto__"]!==document.createElement("form")["__proto__"]},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(B){return B}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var J=null,I=$A(arguments);if(Object.isFunction(I[0])){J=I.shift()}function F(){this.initialize.apply(this,arguments)}Object.extend(F,Class.Methods);F.superclass=J;F.subclasses=[];if(J){var G=function(){};G.prototype=J.prototype;F.prototype=new G;J.subclasses.push(F)}for(var H=0;H<I.length;H++){F.addMethods(I[H])}if(!F.prototype.initialize){F.prototype.initialize=Prototype.emptyFunction}F.prototype.constructor=F;return F}};Class.Methods={addMethods:function(P){var M=this.superclass&&this.superclass.prototype;var N=Object.keys(P);if(!Object.keys({toString:true}).length){N.push("toString","valueOf")}for(var L=0,O=N.length;L<O;L++){var I=N[L],K=P[I];if(M&&Object.isFunction(K)&&K.argumentNames().first()=="$super"){var J=K;K=(function(A){return function(){return M[A].apply(this,arguments)}})(I).wrap(J);K.valueOf=J.valueOf.bind(J);K.toString=J.toString.bind(J)}this.prototype[I]=K}return this}};var Abstract={};Object.extend=function(E,F){for(var D in F){E[D]=F[D]}return E};Object.extend(Object,{inspect:function(C){try{if(Object.isUndefined(C)){return"undefined"}if(C===null){return"null"}return C.inspect?C.inspect():String(C)}catch(D){if(D instanceof RangeError){return"..."}throw D}},toJSON:function(I){var H=typeof I;switch(H){case"undefined":case"function":case"unknown":return ;case"boolean":return I.toString()}if(I===null){return"null"}if(I.toJSON){return I.toJSON()}if(Object.isElement(I)){return }var J=[];for(var F in I){var G=Object.toJSON(I[F]);if(!Object.isUndefined(G)){J.push(F.toJSON()+": "+G)}}return"{"+J.join(", ")+"}"},toQueryString:function(B){return $H(B).toQueryString()},toHTML:function(B){return B&&B.toHTML?B.toHTML():String.interpret(B)},keys:function(F){var E=[];for(var D in F){E.push(D)}return E},values:function(F){var E=[];for(var D in F){E.push(F[D])}return E},clone:function(B){return Object.extend({},B)},isElement:function(B){return !!(B&&B.nodeType==1)},isArray:function(B){return B!=null&&typeof B=="object"&&"splice" in B&&"join" in B},isHash:function(B){return B instanceof Hash},isFunction:function(B){return typeof B=="function"},isString:function(B){return typeof B=="string"},isNumber:function(B){return typeof B=="number"},isUndefined:function(B){return typeof B=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var B=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return B.length==1&&!B[0]?[]:B},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var E=this,D=$A(arguments),F=D.shift();return function(){return E.apply(F,D.concat($A(arguments)))}},bindAsEventListener:function(){var E=this,D=$A(arguments),F=D.shift();return function(A){return E.apply(F,[A||window.event].concat(D))}},curry:function(){if(!arguments.length){return this}var D=this,C=$A(arguments);return function(){return D.apply(this,C.concat($A(arguments)))}},delay:function(){var E=this,F=$A(arguments),D=F.shift()*1000;return window.setTimeout(function(){return E.apply(E,F)},D)},defer:function(){var B=[0.01].concat($A(arguments));return this.delay.apply(this,B)},wrap:function(D){var C=this;return function(){return D.apply(this,[C.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var B=this;return this._methodized=function(){return B.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){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"'};var Try={these:function(){var J;for(var I=0,F=arguments.length;I<F;I++){var H=arguments[I];try{J=H();break}catch(G){}}return J}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(B){return String(B).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(C,D){this.callback=C;this.frequency=D;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(B){return B==null?"":String(B)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(J,H){var G="",F=this,I;H=arguments.callee.prepareReplacement(H);while(F.length>0){if(I=F.match(J)){G+=F.slice(0,I.index);G+=String.interpret(H(I));F=F.slice(I.index+I[0].length)}else{G+=F,F=""}}return G},sub:function(D,F,E){F=this.gsub.prepareReplacement(F);E=Object.isUndefined(E)?1:E;return this.gsub(D,function(A){if(--E<0){return A[0]}return F(A)})},scan:function(C,D){this.gsub(C,D);return String(this)},truncate:function(C,D){C=C||30;D=Object.isUndefined(D)?"...":D;return this.length>C?this.slice(0,C-D.length)+D:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var D=new RegExp(Prototype.ScriptFragment,"img");var C=new RegExp(Prototype.ScriptFragment,"im");return(this.match(D)||[]).map(function(A){return(A.match(C)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var B=arguments.callee;B.text.data=this;return B.div.innerHTML},unescapeHTML:function(){var B=new Element("div");B.innerHTML=this.stripTags();return B.childNodes[0]?(B.childNodes.length>1?$A(B.childNodes).inject("",function(D,A){return D+A.nodeValue}):B.childNodes[0].nodeValue):""},toQueryParams:function(D){var C=this.strip().match(/([^?#]*)(#.*)?$/);if(!C){return{}}return C[1].split(D||"&").inject({},function(B,A){if((A=A.split("="))[0]){var H=decodeURIComponent(A.shift());var G=A.length>1?A.join("="):A[0];if(G!=undefined){G=decodeURIComponent(G)}if(H in B){if(!Object.isArray(B[H])){B[H]=[B[H]]}B[H].push(G)}else{B[H]=G}}return B})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(B){return B<1?"":new Array(B+1).join(this)},camelize:function(){var F=this.split("-"),E=F.length;if(E==1){return F[0]}var H=this.charAt(0)=="-"?F[0].charAt(0).toUpperCase()+F[0].substring(1):F[0];for(var G=1;G<E;G++){H+=F[G].charAt(0).toUpperCase()+F[G].substring(1)}return H},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(D){var C=this.gsub(/[\x00-\x1f\\]/,function(B){var A=String.specialChar[B[0]];return A?A:"\\u00"+B[0].charCodeAt().toPaddedString(2,16)});if(D){return'"'+C.replace(/"/g,'\\"')+'"'}return"'"+C.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(B){return this.sub(B||Prototype.JSONFilter,"#{1}")},isJSON:function(){var B=this;if(B.blank()){return false}B=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(B)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(B){return this.indexOf(B)>-1},startsWith:function(B){return this.indexOf(B)===0},endsWith:function(C){var D=this.length-C.length;return D>=0&&this.lastIndexOf(C)===D},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(D,C){return new Template(this,C).evaluate(D)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(D){if(Object.isFunction(D)){return D}var C=new Template(D);return function(A){return C.evaluate(A)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(D,C){this.template=D.toString();this.pattern=C||Template.Pattern},evaluate:function(B){if(Object.isFunction(B.toTemplateReplacements)){B=B.toTemplateReplacements()}return this.template.gsub(this.pattern,function(H){if(B==null){return""}var K=H[1]||"";if(K=="\\"){return H[2]}var J=B,A=H[3];var L=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;H=L.exec(A);if(H==null){return K}while(H!=null){var I=H[1].startsWith("[")?H[2].gsub("\\\\]","]"):H[1];J=J[I];if(null==J||""==H[3]){break}A=A.substring("["==H[3]?H[1].length:H[0].length);H=L.exec(A)}return K+String.interpret(J)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(G,H){var E=0;try{this._each(function(A){G.call(H,A,E++)})}catch(F){if(F!=$break){throw F}}return this},eachSlice:function(G,J,K){var L=-G,I=[],H=this.toArray();if(G<1){return H}while((L+=G)<H.length){I.push(H.slice(L,L+G))}return I.collect(J,K)},all:function(F,D){F=F||Prototype.K;var E=true;this.each(function(A,B){E=E&&!!F.call(D,A,B);if(!E){throw $break}});return E},any:function(F,D){F=F||Prototype.K;var E=false;this.each(function(A,B){if(E=!!F.call(D,A,B)){throw $break}});return E},collect:function(E,F){E=E||Prototype.K;var D=[];this.each(function(A,B){D.push(E.call(F,A,B))});return D},detect:function(F,D){var E;this.each(function(A,B){if(F.call(D,A,B)){E=A;throw $break}});return E},findAll:function(E,F){var D=[];this.each(function(A,B){if(E.call(F,A,B)){D.push(A)}});return D},grep:function(E,F,G){F=F||Prototype.K;var H=[];if(Object.isString(E)){E=new RegExp(E)}this.each(function(A,B){if(E.match(A)){H.push(F.call(G,A,B))}});return H},include:function(C){if(Object.isFunction(this.indexOf)){if(this.indexOf(C)!=-1){return true}}var D=false;this.each(function(A){if(A==C){D=true;throw $break}});return D},inGroupsOf:function(C,D){D=Object.isUndefined(D)?null:D;return this.eachSlice(C,function(A){while(A.length<C){A.push(D)}return A})},inject:function(D,E,F){this.each(function(A,B){D=E.call(F,D,A,B)});return D},invoke:function(D){var C=$A(arguments).slice(1);return this.map(function(A){return A[D].apply(A,C)})},max:function(F,D){F=F||Prototype.K;var E;this.each(function(A,B){A=F.call(D,A,B);if(E==null||A>=E){E=A}});return E},min:function(F,D){F=F||Prototype.K;var E;this.each(function(A,B){A=F.call(D,A,B);if(E==null||A<E){E=A}});return E},partition:function(F,H){F=F||Prototype.K;var G=[],E=[];this.each(function(A,B){(F.call(H,A,B)?G:E).push(A)});return[G,E]},pluck:function(C){var D=[];this.each(function(A){D.push(A[C])});return D},reject:function(E,F){var D=[];this.each(function(A,B){if(!E.call(F,A,B)){D.push(A)}});return D},sortBy:function(D,C){return this.map(function(A,B){return{value:A,criteria:D.call(C,A,B)}}).sort(function(A,B){var G=A.criteria,H=B.criteria;return G<H?-1:G>H?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var F=Prototype.K,D=$A(arguments);if(Object.isFunction(D.last())){F=D.pop()}var E=[this].concat(D).map($A);return this.map(function(A,B){return F(E.pluck(B))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(E){if(!E){return[]}if(E.toArray){return E.toArray()}var D=E.length||0,F=new Array(D);while(D--){F[D]=E[D]}return F}if(Prototype.Browser.WebKit){$A=function(E){if(!E){return[]}if(!(typeof E==="function"&&typeof E.length==="number"&&typeof E.item==="function")&&E.toArray){return E.toArray()}var D=E.length||0,F=new Array(D);while(D--){F[D]=E[D]}return F}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(E){for(var F=0,D=this.length;F<D;F++){E(this[F])}},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(B){return B!=null})},flatten:function(){return this.inject([],function(D,C){return D.concat(Object.isArray(C)?C.flatten():[C])})},without:function(){var B=$A(arguments);return this.select(function(A){return !B.include(A)})},reverse:function(B){return(B!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(B){return this.inject([],function(A,E,F){if(0==F||(B?A.last()!=E:!A.include(E))){A.push(E)}return A})},intersect:function(B){return this.uniq().findAll(function(A){return B.detect(function(D){return A===D})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var B=[];this.each(function(D){var A=Object.toJSON(D);if(!Object.isUndefined(A)){B.push(A)}});return"["+B.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(E,F){F||(F=0);var D=this.length;if(F<0){F=D+F}for(;F<D;F++){if(this[F]===E){return F}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(F,D){D=isNaN(D)?this.length:(D<0?this.length+D:D)+1;var E=this.slice(0,D).reverse().indexOf(F);return(E<0)?E:D-E-1}}Array.prototype.toArray=Array.prototype.clone;function $w(B){if(!Object.isString(B)){return[]}B=B.strip();return B?B.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var G=[];for(var I=0,F=this.length;I<F;I++){G.push(this[I])}for(var I=0,F=arguments.length;I<F;I++){if(Object.isArray(arguments[I])){for(var J=0,H=arguments[I].length;J<H;J++){G.push(arguments[I][J])}}else{G.push(arguments[I])}}return G}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(D,C){$R(0,this,true).each(D,C);return this},toPaddedString:function(D,E){var F=this.toString(E||10);return"0".times(D-F.length)+F},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(B){Number.prototype[B]=Math[B].methodize()});function $H(B){return new Hash(B)}var Hash=Class.create(Enumerable,(function(){function B(D,A){if(Object.isUndefined(A)){return D}return D+"="+encodeURIComponent(String.interpret(A))}return{initialize:function(A){this._object=Object.isHash(A)?A.toObject():Object.clone(A)},_each:function(G){for(var H in this._object){var F=this._object[H],A=[H,F];A.key=H;A.value=F;G(A)}},set:function(D,A){return this._object[D]=A},get:function(A){if(this._object[A]!==Object.prototype[A]){return this._object[A]}},unset:function(D){var A=this._object[D];delete this._object[D];return A},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(A){var D=this.detect(function(C){return C.value===A});return D&&D.key},merge:function(A){return this.clone().update(A)},update:function(A){return new Hash(A).inject(this,function(F,E){F.set(E.key,E.value);return F})},toQueryString:function(){return this.inject([],function(G,A){var H=encodeURIComponent(A.key),F=A.value;if(F&&typeof F=="object"){if(Object.isArray(F)){return G.concat(F.map(B.curry(H)))}}else{G.push(B(H,F))}return G}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(E,D,F){this.start=E;this.end=D;this.exclusive=F},_each:function(C){var D=this.start;while(this.include(D)){C(D);D=D.succ()}},include:function(B){if(B<this.start){return false}if(this.exclusive){return B<this.end}return B<=this.end}});var $R=function(E,D,F){return new ObjectRange(E,D,F)};var 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(B){this.responders._each(B)},register:function(B){if(!this.include(B)){this.responders.push(B)}},unregister:function(B){this.responders=this.responders.without(B)},dispatch:function(G,H,F,E){this.each(function(B){if(Object.isFunction(B[G])){try{B[G].apply(B,[H,F,E])}catch(A){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(B){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,B||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,C,D){$super(D);this.transport=Ajax.getTransport();this.request(C)},request:function(E){this.url=E;this.method=this.options.method;var F=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){F._method=this.method;this.method="post"}this.parameters=F;if(F=Object.toQueryString(F)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+F}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){F+="&_="}}}try{var H=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(H)}Ajax.Responders.dispatch("onCreate",this,H);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(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||F):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(G){this.dispatchException(G)}},onStateChange:function(){var B=this.transport.readyState;if(B>1&&!((B==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var G={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){G["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){G.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var J=this.options.requestHeaders;if(Object.isFunction(J.push)){for(var H=0,F=J.length;H<F;H+=2){G[J[H]]=J[H+1]}}else{$H(J).each(function(A){G[A.key]=A.value})}}for(var I in G){this.transport.setRequestHeader(I,G[I])}},success:function(){var B=this.getStatus();return !B||(B>=200&&B<300)},getStatus:function(){try{return this.transport.status||0}catch(B){return 0}},respondToReadyState:function(F){var I=Ajax.Request.Events[F],J=new Ajax.Response(this);if(I=="Complete"){try{this._complete=true;(this.options["on"+J.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(J,J.headerJSON)}catch(G){this.dispatchException(G)}var H=J.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&H&&H.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+I]||Prototype.emptyFunction)(J,J.headerJSON);Ajax.Responders.dispatch("on"+I,this,J,J.headerJSON)}catch(G){this.dispatchException(G)}if(I=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var B=this.url.match(/^\s*https?:\/\/[^\/]*/);return !B||(B[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(C){try{return this.transport.getResponseHeader(C)||null}catch(D){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(B){(this.options.onException||Prototype.emptyFunction)(this,B);Ajax.Responders.dispatch("onException",this,B)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(G){this.request=G;var F=this.transport=G.transport,E=this.readyState=F.readyState;if((E>2&&!Prototype.Browser.IE)||E==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(F.responseText);this.headerJSON=this._getHeaderJSON()}if(E==4){var H=F.responseXML;this.responseXML=Object.isUndefined(H)?null:H;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(B){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(B){return null}},getResponseHeader:function(B){return this.transport.getResponseHeader(B)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var C=this.getHeader("X-JSON");if(!C){return null}C=decodeURIComponent(escape(C));try{return C.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(D){this.request.dispatchException(D)}},_getResponseJSON:function(){var C=this.request.options;if(!C.evalJSON||(C.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(C.sanitizeJSON||!this.request.isSameOrigin())}catch(D){this.request.dispatchException(D)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,G,E,H){this.container={success:(G.success||G),failure:(G.failure||(G.success?null:G))};H=Object.clone(H);var F=H.onComplete;H.onComplete=(function(A,B){this.updateContent(A.responseText);if(Object.isFunction(F)){F(A,B)}}).bind(this);$super(E,H)},updateContent:function(F){var H=this.container[this.success()?"success":"failure"],G=this.options;if(!G.evalScripts){F=F.stripScripts()}if(H=$(H)){if(G.insertion){if(Object.isString(G.insertion)){var E={};E[G.insertion]=F;H.insert(E)}else{G.insertion(H,F)}}else{H.update(F)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,E,D,F){$super(F);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=E;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(B){if(this.options.decay){this.decay=(B.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=B.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 $(G){if(arguments.length>1){for(var F=0,E=[],H=arguments.length;F<H;F++){E.push($(arguments[F]))}return E}if(Object.isString(G)){G=document.getElementById(G)}return Element.extend(G)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(H,J){var K=[];var I=document.evaluate(H,$(J)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var L=0,G=I.snapshotLength;L<G;L++){K.push(Element.extend(I.snapshotItem(L)))}return K}}if(!window.Node){var Node={}}if(!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(){var B=this.Element;this.Element=function(A,E){E=E||{};A=A.toLowerCase();var F=Element.cache;if(Prototype.Browser.IE&&E.name){A="<"+A+' name="'+E.name+'">';delete E.name;return Element.writeAttribute(document.createElement(A),E)}if(!F[A]){F[A]=Element.extend(document.createElement(A))}return Element.writeAttribute(F[A].cloneNode(false),E)};Object.extend(this.Element,B||{});if(B){this.Element.prototype=B.prototype}}).call(window);Element.cache={};Element.Methods={visible:function(B){return $(B).style.display!="none"},toggle:function(B){B=$(B);Element[Element.visible(B)?"hide":"show"](B);return B},hide:function(B){B=$(B);B.style.display="none";return B},show:function(B){B=$(B);B.style.display="";return B},remove:function(B){B=$(B);B.parentNode.removeChild(B);return B},update:function(C,D){C=$(C);if(D&&D.toElement){D=D.toElement()}if(Object.isElement(D)){return C.update().insert(D)}D=Object.toHTML(D);C.innerHTML=D.stripScripts();D.evalScripts.bind(D).defer();return C},replace:function(F,E){F=$(F);if(E&&E.toElement){E=E.toElement()}else{if(!Object.isElement(E)){E=Object.toHTML(E);var D=F.ownerDocument.createRange();D.selectNode(F);E.evalScripts.bind(E).defer();E=D.createContextualFragment(E.stripScripts())}}F.parentNode.replaceChild(E,F);return F},insert:function(L,J){L=$(L);if(Object.isString(J)||Object.isNumber(J)||Object.isElement(J)||(J&&(J.toElement||J.toHTML))){J={bottom:J}}var K,N,M,I;for(var H in J){K=J[H];H=H.toLowerCase();N=Element._insertionTranslations[H];if(K&&K.toElement){K=K.toElement()}if(Object.isElement(K)){N(L,K);continue}K=Object.toHTML(K);M=((H=="before"||H=="after")?L.parentNode:L).tagName.toUpperCase();I=Element._getContentFromAnonymousElement(M,K.stripScripts());if(H=="top"||H=="after"){I.reverse()}I.each(N.curry(L));K.evalScripts.bind(K).defer()}return L},wrap:function(F,E,D){F=$(F);if(Object.isElement(E)){$(E).writeAttribute(D||{})}else{if(Object.isString(E)){E=new Element(E,D)}else{E=new Element("div",E)}}if(F.parentNode){F.parentNode.replaceChild(E,F)}E.appendChild(F);return E},inspect:function(C){C=$(C);var D="<"+C.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(A){var H=A.first(),G=A.last();var B=(C[H]||"").toString();if(B){D+=" "+G+"="+B.inspect(true)}});return D+">"},recursivelyCollect:function(E,F){E=$(E);var D=[];while(E=E[F]){if(E.nodeType==1){D.push(Element.extend(E))}}return D},ancestors:function(B){return $(B).recursivelyCollect("parentNode")},descendants:function(B){return $(B).select("*")},firstDescendant:function(B){B=$(B).firstChild;while(B&&B.nodeType!=1){B=B.nextSibling}return $(B)},immediateDescendants:function(B){if(!(B=$(B).firstChild)){return[]}while(B&&B.nodeType!=1){B=B.nextSibling}if(B){return[B].concat($(B).nextSiblings())}return[]},previousSiblings:function(B){return $(B).recursivelyCollect("previousSibling")},nextSiblings:function(B){return $(B).recursivelyCollect("nextSibling")},siblings:function(B){B=$(B);return B.previousSiblings().reverse().concat(B.nextSiblings())},match:function(D,C){if(Object.isString(C)){C=new Selector(C)}return C.match($(D))},up:function(G,F,H){G=$(G);if(arguments.length==1){return $(G.parentNode)}var E=G.ancestors();return Object.isNumber(F)?E[F]:Selector.findElement(E,F,H)},down:function(F,E,D){F=$(F);if(arguments.length==1){return F.firstDescendant()}return Object.isNumber(E)?F.descendants()[E]:Element.select(F,E)[D||0]},previous:function(H,F,E){H=$(H);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(H))}var G=H.previousSiblings();return Object.isNumber(F)?G[F]:Selector.findElement(G,F,E)},next:function(H,F,E){H=$(H);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(H))}var G=H.nextSiblings();return Object.isNumber(F)?G[F]:Selector.findElement(G,F,E)},select:function(){var D=$A(arguments),C=$(D.shift());return Selector.findChildElements(C,D)},adjacent:function(){var D=$A(arguments),C=$(D.shift());return Selector.findChildElements(C.parentNode,D).without(C)},identify:function(F){F=$(F);var E=F.readAttribute("id"),D=arguments.callee;if(E){return E}do{E="anonymous_element_"+D.counter++}while($(E));F.writeAttribute("id",E);return E},readAttribute:function(F,D){F=$(F);if(Prototype.Browser.IE){var E=Element._attributeTranslations.read;if(E.values[D]){return E.values[D](F,D)}if(E.names[D]){D=E.names[D]}if(D.include(":")){return(!F.attributes||!F.attributes[D])?null:F.attributes[D].value}}return F.getAttribute(D)},writeAttribute:function(J,K,H){J=$(J);var L={},I=Element._attributeTranslations.write;if(typeof K=="object"){L=K}else{L[K]=Object.isUndefined(H)?true:H}for(var G in L){K=I.names[G]||G;H=L[G];if(I.values[G]){K=I.values[G](J,H)}if(H===false||H===null){J.removeAttribute(K)}else{if(H===true){J.setAttribute(K,K)}else{J.setAttribute(K,H)}}}return J},getHeight:function(B){return $(B).getDimensions().height},getWidth:function(B){return $(B).getDimensions().width},classNames:function(B){return new Element.ClassNames(B)},hasClassName:function(F,D){if(!(F=$(F))){return }var E=F.className;return(E.length>0&&(E==D||new RegExp("(^|\\s)"+D+"(\\s|$)").test(E)))},addClassName:function(D,C){if(!(D=$(D))){return }if(!D.hasClassName(C)){D.className+=(D.className?" ":"")+C}return D},removeClassName:function(D,C){if(!(D=$(D))){return }D.className=D.className.replace(new RegExp("(^|\\s+)"+C+"(\\s+|$)")," ").strip();return D},toggleClassName:function(D,C){if(!(D=$(D))){return }return D[D.hasClassName(C)?"removeClassName":"addClassName"](C)},cleanWhitespace:function(F){F=$(F);var E=F.firstChild;while(E){var D=E.nextSibling;if(E.nodeType==3&&!/\S/.test(E.nodeValue)){F.removeChild(E)}E=D}return F},empty:function(B){return $(B).innerHTML.blank()},descendantOf:function(D,C){D=$(D),C=$(C);if(D.compareDocumentPosition){return(D.compareDocumentPosition(C)&8)===8}if(C.contains){return C.contains(D)&&C!==D}while(D=D.parentNode){if(D==C){return true}}return false},scrollTo:function(C){C=$(C);var D=C.cumulativeOffset();window.scrollTo(D[0],D[1]);return C},getStyle:function(E,G){E=$(E);G=G=="float"?"cssFloat":G.camelize();var F=E.style[G];if(!F||F=="auto"){var H=document.defaultView.getComputedStyle(E,null);F=H?H[G]:null}if(G=="opacity"){return F?parseFloat(F):1}return F=="auto"?null:F},getOpacity:function(B){return $(B).getStyle("opacity")},setStyle:function(G,I){G=$(G);var J=G.style,H;if(Object.isString(I)){G.style.cssText+=";"+I;return I.include("opacity")?G.setOpacity(I.match(/opacity:\s*(\d?\.?\d*)/)[1]):G}for(var F in I){if(F=="opacity"){G.setOpacity(I[F])}else{J[(F=="float"||F=="cssFloat")?(Object.isUndefined(J.styleFloat)?"cssFloat":"styleFloat"):F]=I[F]}}return G},setOpacity:function(C,D){C=$(C);C.style.opacity=(D==1||D==="")?"":(D<0.00001)?0:D;return C},getDimensions:function(O){O=$(O);var K=O.getStyle("display");if(K!="none"&&K!=null){return{width:O.offsetWidth,height:O.offsetHeight}}var M=O.style;var I=M.visibility;var P=M.position;var N=M.display;M.visibility="hidden";M.position="absolute";M.display="block";var J=O.clientWidth;var L=O.clientHeight;M.display=N;M.position=P;M.visibility=I;return{width:J,height:L}},makePositioned:function(C){C=$(C);var D=Element.getStyle(C,"position");if(D=="static"||!D){C._madePositioned=true;C.style.position="relative";if(Prototype.Browser.Opera){C.style.top=0;C.style.left=0}}return C},undoPositioned:function(B){B=$(B);if(B._madePositioned){B._madePositioned=undefined;B.style.position=B.style.top=B.style.left=B.style.bottom=B.style.right=""}return B},makeClipping:function(B){B=$(B);if(B._overflow){return B}B._overflow=Element.getStyle(B,"overflow")||"auto";if(B._overflow!=="hidden"){B.style.overflow="hidden"}return B},undoClipping:function(B){B=$(B);if(!B._overflow){return B}B.style.overflow=B._overflow=="auto"?"":B._overflow;B._overflow=null;return B},cumulativeOffset:function(D){var F=0,E=0;do{F+=D.offsetTop||0;E+=D.offsetLeft||0;D=D.offsetParent}while(D);return Element._returnOffset(E,F)},positionedOffset:function(E){var H=0,F=0;do{H+=E.offsetTop||0;F+=E.offsetLeft||0;E=E.offsetParent;if(E){if(E.tagName.toUpperCase()=="BODY"){break}var G=Element.getStyle(E,"position");if(G!=="static"){break}}}while(E);return Element._returnOffset(F,H)},absolutize:function(L){L=$(L);if(L.getStyle("position")=="absolute"){return L}var G=L.positionedOffset();var H=G[1];var I=G[0];var K=L.clientWidth;var J=L.clientHeight;L._originalLeft=I-parseFloat(L.style.left||0);L._originalTop=H-parseFloat(L.style.top||0);L._originalWidth=L.style.width;L._originalHeight=L.style.height;L.style.position="absolute";L.style.top=H+"px";L.style.left=I+"px";L.style.width=K+"px";L.style.height=J+"px";return L},relativize:function(D){D=$(D);if(D.getStyle("position")=="relative"){return D}D.style.position="relative";var E=parseFloat(D.style.top||0)-(D._originalTop||0);var F=parseFloat(D.style.left||0)-(D._originalLeft||0);D.style.top=E+"px";D.style.left=F+"px";D.style.height=D._originalHeight;D.style.width=D._originalWidth;return D},cumulativeScrollOffset:function(D){var F=0,E=0;do{F+=D.scrollTop||0;E+=D.scrollLeft||0;D=D.parentNode}while(D);return Element._returnOffset(E,F)},getOffsetParent:function(B){if(B.offsetParent){return $(B.offsetParent)}if(B==document.body){return $(B)}while((B=B.parentNode)&&B!=document.body){if(Element.getStyle(B,"position")!="static"){return $(B)}}return $(document.body)},viewportOffset:function(G){var H=0,F=0;var E=G;do{H+=E.offsetTop||0;F+=E.offsetLeft||0;if(E.offsetParent==document.body&&Element.getStyle(E,"position")=="absolute"){break}}while(E=E.offsetParent);E=G;do{if(!Prototype.Browser.Opera||(E.tagName&&(E.tagName.toUpperCase()=="BODY"))){H-=E.scrollTop||0;F-=E.scrollLeft||0}}while(E=E.parentNode);return Element._returnOffset(F,H)},clonePosition:function(K,G){var J=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});G=$(G);var I=G.viewportOffset();K=$(K);var H=[0,0];var L=null;if(Element.getStyle(K,"position")=="absolute"){L=K.getOffsetParent();H=L.viewportOffset()}if(L==document.body){H[0]-=document.body.offsetLeft;H[1]-=document.body.offsetTop}if(J.setLeft){K.style.left=(I[0]-H[0]+J.offsetLeft)+"px"}if(J.setTop){K.style.top=(I[1]-H[1]+J.offsetTop)+"px"}if(J.setWidth){K.style.width=G.offsetWidth+"px"}if(J.setHeight){K.style.height=G.offsetHeight+"px"}return K}};Element.Methods.identify.counter=1;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(F,I,H){switch(H){case"left":case"top":case"right":case"bottom":if(F(I,"position")==="static"){return null}case"height":case"width":if(!Element.visible(I)){return null}var G=parseInt(F(I,H),10);if(G!==I["offset"+H.capitalize()]){return G+"px"}var J;if(H==="height"){J=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{J=["border-left-width","padding-left","padding-right","border-right-width"]}return J.inject(G,function(B,C){var A=F(I,C);return A===null?B:B-parseInt(A,10)})+"px";default:return F(I,H)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(D,F,E){if(E==="title"){return F.title}return D(F,E)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(J,I){I=$(I);try{I.offsetParent}catch(G){return $(document.body)}var F=I.getStyle("position");if(F!=="static"){return J(I)}I.setStyle({position:"relative"});var H=J(I);I.setStyle({position:F});return H});$w("positionedOffset viewportOffset").each(function(B){Element.Methods[B]=Element.Methods[B].wrap(function(K,J){J=$(J);try{J.offsetParent}catch(A){return Element._returnOffset(0,0)}var L=J.getStyle("position");if(L!=="static"){return K(J)}var I=J.getOffsetParent();if(I&&I.getStyle("position")==="fixed"){I.setStyle({zoom:1})}J.setStyle({position:"relative"});var H=K(J);J.setStyle({position:L});return H})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(D,F){try{F.offsetParent}catch(E){return Element._returnOffset(0,0)}return D(F)});Element.Methods.getStyle=function(D,F){D=$(D);F=(F=="float"||F=="cssFloat")?"styleFloat":F.camelize();var E=D.style[F];if(!E&&D.currentStyle){E=D.currentStyle[F]}if(F=="opacity"){if(E=(D.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(E[1]){return parseFloat(E[1])/100}}return 1}if(E=="auto"){if((F=="width"||F=="height")&&(D.getStyle("display")!="none")){return D["offset"+F.capitalize()]+"px"}return null}return E};Element.Methods.setOpacity=function(K,I){function H(A){return A.replace(/alpha\([^\)]*\)/gi,"")}K=$(K);var L=K.currentStyle;if((L&&!L.hasLayout)||(!L&&K.style.zoom=="normal")){K.style.zoom=1}var G=K.getStyle("filter"),J=K.style;if(I==1||I===""){(G=H(G))?J.filter=G:J.removeAttribute("filter");return K}else{if(I<0.00001){I=0}}J.filter=H(G)+"alpha(opacity="+(I*100)+")";return K};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(C,D){return C.getAttribute(D,2)},_getAttrNode:function(D,E){var F=D.getAttributeNode(E);return F?F.value:""},_getEv:function(C,D){D=C.getAttribute(D);return D?D.toString().slice(23,-2):null},_flag:function(C,D){return $(C).hasAttribute(D)?D:null},style:function(B){return B.style.cssText.toLowerCase()},title:function(B){return B.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(C,D){C.checked=!!D},style:function(C,D){C.style.cssText=D?D:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(B){Element._attributeTranslations.write.names[B.toLowerCase()]=B;Element._attributeTranslations.has[B.toLowerCase()]=B});(function(B){Object.extend(B,{href:B._getAttr,src:B._getAttr,type:B._getAttr,action:B._getAttrNode,disabled:B._flag,checked:B._flag,readonly:B._flag,multiple:B._flag,onload:B._getEv,onunload:B._getEv,onclick:B._getEv,ondblclick:B._getEv,onmousedown:B._getEv,onmouseup:B._getEv,onmouseover:B._getEv,onmousemove:B._getEv,onmouseout:B._getEv,onfocus:B._getEv,onblur:B._getEv,onkeypress:B._getEv,onkeydown:B._getEv,onkeyup:B._getEv,onsubmit:B._getEv,onreset:B._getEv,onselect:B._getEv,onchange:B._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(C,D){C=$(C);C.style.opacity=(D==1)?0.999999:(D==="")?"":(D<0.00001)?0:D;return C}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(E,H){E=$(E);E.style.opacity=(H==1||H==="")?"":(H<0.00001)?0:H;if(H==1){if(E.tagName.toUpperCase()=="IMG"&&E.width){E.width++;E.width--}else{try{var F=document.createTextNode(" ");E.appendChild(F);E.removeChild(F)}catch(G){}}}return E};Element.Methods.cumulativeOffset=function(D){var F=0,E=0;do{F+=D.offsetTop||0;E+=D.offsetLeft||0;if(D.offsetParent==document.body){if(Element.getStyle(D,"position")=="absolute"){break}}D=D.offsetParent}while(D);return Element._returnOffset(E,F)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(F,E){F=$(F);if(E&&E.toElement){E=E.toElement()}if(Object.isElement(E)){return F.update().insert(E)}E=Object.toHTML(E);var D=F.tagName.toUpperCase();if(D in Element._insertionTranslations.tags){$A(F.childNodes).each(function(A){F.removeChild(A)});Element._getContentFromAnonymousElement(D,E.stripScripts()).each(function(A){F.appendChild(A)})}else{F.innerHTML=E.stripScripts()}E.evalScripts.bind(E).defer();return F}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(I,H){I=$(I);if(H&&H.toElement){H=H.toElement()}if(Object.isElement(H)){I.parentNode.replaceChild(H,I);return I}H=Object.toHTML(H);var K=I.parentNode,J=K.tagName.toUpperCase();if(Element._insertionTranslations.tags[J]){var L=I.next();var G=Element._getContentFromAnonymousElement(J,H.stripScripts());K.removeChild(I);if(L){G.each(function(A){K.insertBefore(A,L)})}else{G.each(function(A){K.appendChild(A)})}}else{I.outerHTML=H.stripScripts()}H.evalScripts.bind(H).defer();return I}}Element._returnOffset=function(D,F){var E=[D,F];E.left=D;E.top=F;return E};Element._getContentFromAnonymousElement=function(E,G){var F=new Element("div"),H=Element._insertionTranslations.tags[E];if(H){F.innerHTML=H[0]+G+H[1];H[2].times(function(){F=F.firstChild})}else{F.innerHTML=G}return $A(F.childNodes)};Element._insertionTranslations={before:function(C,D){C.parentNode.insertBefore(D,C)},top:function(C,D){C.insertBefore(D,C.firstChild)},bottom:function(C,D){C.appendChild(D)},after:function(C,D){C.parentNode.insertBefore(D,C.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(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(D,E){E=Element._attributeTranslations.has[E]||E;var F=$(D).getAttributeNode(E);return !!(F&&F.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div")["__proto__"]){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div")["__proto__"];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var F={},D=Element.Methods.ByTag;var E=Object.extend(function(B){if(!B||B._extendedByPrototype||B.nodeType!=1||B==window){return B}var I=Object.clone(F),C=B.tagName.toUpperCase(),J,A;if(D[C]){Object.extend(I,D[C])}for(J in I){A=I[J];if(Object.isFunction(A)&&!(J in B)){B[J]=A.methodize()}}B._extendedByPrototype=Prototype.emptyFunction;return B},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(F,Element.Methods);Object.extend(F,Element.Methods.Simulated)}}});E.refresh();return E})();Element.hasAttribute=function(C,D){if(C.hasAttribute){return C.hasAttribute(D)}return Element.Methods.Simulated.hasAttribute(C,D)};Element.addMethods=function(K){var O=Prototype.BrowserFeatures,F=Element.Methods.ByTag;if(!K){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)})}if(arguments.length==2){var Q=K;K=arguments[1]}if(!Q){Object.extend(Element.Methods,K||{})}else{if(Object.isArray(Q)){Q.each(M)}else{M(Q)}}function M(A){A=A.toUpperCase();if(!Element.Methods.ByTag[A]){Element.Methods.ByTag[A]={}}Object.extend(Element.Methods.ByTag[A],K)}function L(B,D,E){E=E||false;for(var C in B){var A=B[C];if(!Object.isFunction(A)){continue}if(!E||!(C in D)){D[C]=A.methodize()}}}function R(B){var C;var A={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(A[B]){C="HTML"+A[B]+"Element"}if(window[C]){return window[C]}C="HTML"+B+"Element";if(window[C]){return window[C]}C="HTML"+B.capitalize()+"Element";if(window[C]){return window[C]}window[C]={};window[C].prototype=document.createElement(B)["__proto__"];return window[C]}if(O.ElementExtensions){L(Element.Methods,HTMLElement.prototype);L(Element.Methods.Simulated,HTMLElement.prototype,true)}if(O.SpecificElementExtensions){for(var N in Element.Methods.ByTag){var P=R(N);if(Object.isUndefined(P)){continue}L(F[N],P.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var B={},D=Prototype.Browser;$w("width height").each(function(A){var C=A.capitalize();if(D.WebKit&&!document.evaluate){B[A]=self["inner"+C]}else{if(D.Opera&&parseFloat(window.opera.version())<9.5){B[A]=document.body["client"+C]}else{B[A]=document.documentElement["client"+C]}}});return B},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(B){this.expression=B.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var B=this.expression;if(Prototype.Browser.WebKit&&(B.include("-of-type")||B.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(B)){return false}return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(B){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var I=this.expression,H=Selector.patterns,L=Selector.xpath,J,G;if(Selector._cache[I]){this.xpath=Selector._cache[I];return }this.matcher=[".//*"];while(I&&J!=I&&(/\S/).test(I)){J=I;for(var K in H){if(G=I.match(H[K])){this.matcher.push(Object.isFunction(L[K])?L[K](G):new Template(L[K]).evaluate(G));I=I.replace(G[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(F){F=F||document;var I=this.expression,J;switch(this.mode){case"selectorsAPI":if(F!==document){var H=F.id,G=$(F).identify();I="#"+G+" "+I}J=$A(F.querySelectorAll(I)).map(Element.extend);F.id=H;return J;case"xpath":return document._getElementsByXPath(this.xpath,F);default:return this.matcher(F)}},match:function(U){this.tokens=[];var Q=this.expression,O=Selector.patterns,W=Selector.assertions;var P,M,X;while(Q&&P!==Q&&(/\S/).test(Q)){P=Q;for(var T in O){M=O[T];if(X=Q.match(M)){if(W[T]){this.tokens.push([T,Object.clone(X)]);Q=Q.replace(X[0],"")}else{return this.findElements(document).include(U)}}}}var R=true,N,S;for(var T=0,V;V=this.tokens[T];T++){N=V[0],S=V[1];if(!Selector.assertions[N](U,S)){R=false;break}}return R},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(B){if(B[1]=="*"){return""}return"[local-name()='"+B[1].toLowerCase()+"' or local-name()='"+B[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(B){B[1]=B[1].toLowerCase();return new Template("[@#{1}]").evaluate(B)},attr:function(B){B[1]=B[1].toLowerCase();B[3]=B[5]||B[6];return new Template(Selector.xpath.operators[B[2]]).evaluate(B)},pseudo:function(C){var D=Selector.xpath.pseudos[C[1]];if(!D){return""}if(Object.isFunction(D)){return D(C)}return new Template(Selector.xpath.pseudos[C[1]]).evaluate(C)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(P){var J=P[6],K=Selector.patterns,I=Selector.xpath,M,O;var L=[];while(J&&M!=J&&(/\S/).test(J)){M=J;for(var N in K){if(P=J.match(K[N])){O=Object.isFunction(I[N])?I[N](P):new Template(I[N]).evaluate(P);L.push("("+O.substring(1,O.length-1)+")");J=J.replace(P[0],"");break}}}return"[not("+L.join(" and ")+")]"},"nth-child":function(B){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",B)},"nth-last-child":function(B){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",B)},"nth-of-type":function(B){return Selector.xpath.pseudos.nth("position() ",B)},"nth-last-of-type":function(B){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",B)},"first-of-type":function(B){B[6]="1";return Selector.xpath.pseudos["nth-of-type"](B)},"last-of-type":function(B){B[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](B)},"only-of-type":function(C){var D=Selector.xpath.pseudos;return D["first-of-type"](C)+D["last-of-type"](C)},nth:function(L,N){var I,J=N[6],K;if(J=="even"){J="2n+0"}if(J=="odd"){J="2n+1"}if(I=J.match(/^(\d+)$/)){return"["+L+"= "+I[1]+"]"}if(I=J.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(I[1]=="-"){I[1]=-1}var M=I[1]?Number(I[1]):1;var H=I[2]?Number(I[2]):0;K="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(K).evaluate({fragment:L,a:M,b:H})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(B){B[3]=(B[5]||B[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(B)},pseudo:function(B){if(B[6]){B[6]=B[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(B)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(C,D){return D[1].toUpperCase()==C.tagName.toUpperCase()},className:function(C,D){return Element.hasClassName(C,D[1])},id:function(C,D){return C.id===D[1]},attrPresence:function(C,D){return Element.hasAttribute(C,D[1])},attr:function(F,E){var D=Element.readAttribute(F,E[1]);return D&&Selector.operators[E[2]](D,E[5]||E[6])}},handlers:{concat:function(H,E){for(var G=0,F;F=E[G];G++){H.push(F)}return H},mark:function(E){var F=Prototype.emptyFunction;for(var H=0,G;G=E[H];H++){G._countedByPrototype=F}return E},unmark:function(D){for(var F=0,E;E=D[F];F++){E._countedByPrototype=undefined}return D},index:function(J,M,I){J._countedByPrototype=Prototype.emptyFunction;if(M){for(var H=J.childNodes,L=H.length-1,N=1;L>=0;L--){var K=H[L];if(K.nodeType==1&&(!I||K._countedByPrototype)){K.nodeIndex=N++}}}else{for(var L=0,N=1,H=J.childNodes;K=H[L];L++){if(K.nodeType==1&&(!I||K._countedByPrototype)){K.nodeIndex=N++}}}},unique:function(J){if(J.length==0){return J}var H=[],G;for(var I=0,F=J.length;I<F;I++){if(!(G=J[I])._countedByPrototype){G._countedByPrototype=Prototype.emptyFunction;H.push(Element.extend(G))}}return Selector.handlers.unmark(H)},descendant:function(F){var H=Selector.handlers;for(var I=0,J=[],G;G=F[I];I++){H.concat(J,G.getElementsByTagName("*"))}return J},child:function(H){var K=Selector.handlers;for(var L=0,M=[],J;J=H[L];L++){for(var N=0,I;I=J.childNodes[N];N++){if(I.nodeType==1&&I.tagName!="!"){M.push(I)}}}return M},adjacent:function(F){for(var I=0,J=[],G;G=F[I];I++){var H=this.nextElementSibling(G);if(H){J.push(H)}}return J},laterSibling:function(F){var H=Selector.handlers;for(var I=0,J=[],G;G=F[I];I++){H.concat(J,Element.nextSiblings(G))}return J},nextElementSibling:function(B){while(B=B.nextSibling){if(B.nodeType==1){return B}}return null},previousElementSibling:function(B){while(B=B.previousSibling){if(B.nodeType==1){return B}}return null},tagName:function(M,O,Q,P){var N=Q.toUpperCase();var J=[],R=Selector.handlers;if(M){if(P){if(P=="descendant"){for(var K=0,L;L=M[K];K++){R.concat(J,L.getElementsByTagName(Q))}return J}else{M=this[P](M)}if(Q=="*"){return M}}for(var K=0,L;L=M[K];K++){if(L.tagName.toUpperCase()===N){J.push(L)}}return J}else{return O.getElementsByTagName(Q)}},id:function(O,P,J,I){var K=$(J),M=Selector.handlers;if(!K){return[]}if(!O&&P==document){return[K]}if(O){if(I){if(I=="child"){for(var N=0,L;L=O[N];N++){if(K.parentNode==L){return[K]}}}else{if(I=="descendant"){for(var N=0,L;L=O[N];N++){if(Element.descendantOf(K,L)){return[K]}}}else{if(I=="adjacent"){for(var N=0,L;L=O[N];N++){if(Selector.handlers.previousElementSibling(K)==L){return[K]}}}else{O=M[I](O)}}}}for(var N=0,L;L=O[N];N++){if(L==K){return[K]}}return[]}return(K&&Element.descendantOf(K,P))?[K]:[]},className:function(F,H,G,E){if(F&&E){F=this[E](F)}return Selector.handlers.byClassName(F,H,G)},byClassName:function(O,I,P){if(!O){O=Selector.handlers.descendant([I])}var J=" "+P+" ";for(var M=0,N=[],K,L;K=O[M];M++){L=K.className;if(L.length==0){continue}if(L==P||(" "+L+" ").include(J)){N.push(K)}}return N},attrPresence:function(L,M,H,N){if(!L){L=M.getElementsByTagName("*")}if(L&&N){L=this[N](L)}var J=[];for(var K=0,I;I=L[K];K++){if(Element.hasAttribute(I,H)){J.push(I)}}return J},attr:function(O,R,S,Q,T,U){if(!O){O=R.getElementsByTagName("*")}if(O&&U){O=this[U](O)}var P=Selector.operators[T],L=[];for(var M=0,N;N=O[M];M++){var V=Element.readAttribute(N,S);if(V===null){continue}if(P(V,Q)){L.push(N)}}return L},pseudo:function(I,H,G,J,F){if(I&&F){I=this[F](I)}if(!I){I=J.getElementsByTagName("*")}return Selector.pseudos[H](I,G,J)}},pseudos:{"first-child":function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(Selector.handlers.previousElementSibling(I)){continue}K.push(I)}return K},"last-child":function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(Selector.handlers.nextElementSibling(I)){continue}K.push(I)}return K},"only-child":function(N,I,H){var K=Selector.handlers;for(var L=0,M=[],J;J=N[L];L++){if(!K.previousElementSibling(J)&&!K.nextElementSibling(J)){M.push(J)}}return M},"nth-child":function(F,E,D){return Selector.pseudos.nth(F,E,D)},"nth-last-child":function(F,E,D){return Selector.pseudos.nth(F,E,D,true)},"nth-of-type":function(F,E,D){return Selector.pseudos.nth(F,E,D,false,true)},"nth-last-of-type":function(F,E,D){return Selector.pseudos.nth(F,E,D,true,true)},"first-of-type":function(F,E,D){return Selector.pseudos.nth(F,"1",D,false,true)},"last-of-type":function(F,E,D){return Selector.pseudos.nth(F,"1",D,true,true)},"only-of-type":function(H,F,E){var G=Selector.pseudos;return G["last-of-type"](G["first-of-type"](H,F,E),F,E)},getIndices:function(F,D,E){if(F==0){return D>0?[D]:[]}return $R(1,E).inject([],function(B,A){if(0==(A-D)%F&&(A-D)/F>=0){B.push(A)}return B})},nth:function(T,S,W,Y,Z){if(T.length==0){return[]}if(S=="even"){S="2n+0"}if(S=="odd"){S="2n+1"}var a=Selector.handlers,b=[],R=[],f;a.mark(T);for(var c=0,Q;Q=T[c];c++){if(!Q.parentNode._countedByPrototype){a.index(Q.parentNode,Y,Z);R.push(Q.parentNode)}}if(S.match(/^\d+$/)){S=Number(S);for(var c=0,Q;Q=T[c];c++){if(Q.nodeIndex==S){b.push(Q)}}}else{if(f=S.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(f[1]=="-"){f[1]=-1}var V=f[1]?Number(f[1]):1;var X=f[2]?Number(f[2]):0;var U=Selector.pseudos.getIndices(V,X,T.length);for(var c=0,Q,e=U.length;Q=T[c];c++){for(var d=0;d<e;d++){if(Q.nodeIndex==U[d]){b.push(Q)}}}}}a.unmark(T);a.unmark(R);return b},empty:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.tagName=="!"||I.firstChild){continue}K.push(I)}return K},not:function(N,K,P){var R=Selector.handlers,O,L;var Q=new Selector(K).findElements(P);R.mark(Q);for(var S=0,T=[],M;M=N[S];S++){if(!M._countedByPrototype){T.push(M)}}R.unmark(Q);return T},enabled:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(!I.disabled&&(!I.type||I.type!=="hidden")){K.push(I)}}return K},disabled:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.disabled){K.push(I)}}return K},checked:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.checked){K.push(I)}}return K}},operators:{"=":function(D,C){return D==C},"!=":function(D,C){return D!=C},"^=":function(D,C){return D==C||D&&D.startsWith(C)},"$=":function(D,C){return D==C||D&&D.endsWith(C)},"*=":function(D,C){return D==C||D&&D.include(C)},"$=":function(D,C){return D.endsWith(C)},"*=":function(D,C){return D.include(C)},"~=":function(D,C){return(" "+D+" ").include(" "+C+" ")},"|=":function(D,C){return("-"+(D||"").toUpperCase()+"-").include("-"+(C||"").toUpperCase()+"-")}},split:function(D){var C=[];D.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(A){C.push(A[1].strip())});return C},matchElements:function(H,I){var J=$$(I),K=Selector.handlers;K.mark(J);for(var L=0,M=[],N;N=H[L];L++){if(N._countedByPrototype){M.push(N)}}K.unmark(J);return M},findElement:function(D,E,F){if(Object.isNumber(E)){F=E;E=false}return Selector.matchElements(D,E||"*")[F||0]},findChildElements:function(M,I){I=Selector.split(I.join(","));var K=[],J=Selector.handlers;for(var L=0,N=I.length,H;L<N;L++){H=new Selector(I[L].strip());J.concat(K,H.findElements(M))}return(N>1)?J.unique(K):K}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(H,E){for(var G=0,F;F=E[G];G++){if(F.tagName!=="!"){H.push(F)}}return H},unmark:function(D){for(var F=0,E;E=D[F];F++){E.removeAttribute("_countedByPrototype")}return D}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(B){$(B).reset();return B},serializeElements:function(M,K){if(typeof K!="object"){K={hash:!!K}}else{if(Object.isUndefined(K.hash)){K.hash=true}}var L,I,N=false,H=K.submit;var J=M.inject({},function(A,B){if(!B.disabled&&B.name){L=B.name;I=$(B).getValue();if(I!=null&&B.type!="file"&&(B.type!="submit"||(!N&&H!==false&&(!H||L==H)&&(N=true)))){if(L in A){if(!Object.isArray(A[L])){A[L]=[A[L]]}A[L].push(I)}else{A[L]=I}}}return A});return K.hash?J:Object.toQueryString(J)}};Form.Methods={serialize:function(D,C){return Form.serializeElements(Form.getElements(D),C)},getElements:function(B){return $A($(B).getElementsByTagName("*")).inject([],function(D,A){if(Form.Element.Serializers[A.tagName.toLowerCase()]){D.push(Element.extend(A))}return D})},getInputs:function(K,M,O){K=$(K);var L=K.getElementsByTagName("input");if(!M&&!O){return $A(L).map(Element.extend)}for(var N=0,J=[],I=L.length;N<I;N++){var P=L[N];if((M&&P.type!=M)||(O&&P.name!=O)){continue}J.push(Element.extend(P))}return J},disable:function(B){B=$(B);Form.getElements(B).invoke("disable");return B},enable:function(B){B=$(B);Form.getElements(B).invoke("enable");return B},findFirstElement:function(E){var D=$(E).getElements().findAll(function(A){return"hidden"!=A.type&&!A.disabled});var F=D.findAll(function(A){return A.hasAttribute("tabIndex")&&A.tabIndex>=0}).sortBy(function(A){return A.tabIndex}).first();return F?F:D.find(function(A){return["input","select","textarea"].include(A.tagName.toLowerCase())})},focusFirstElement:function(B){B=$(B);B.findFirstElement().activate();return B},request:function(G,H){G=$(G),H=Object.clone(H||{});var F=H.parameters,E=G.readAttribute("action")||"";if(E.blank()){E=window.location.href}H.parameters=G.serialize(true);if(F){if(Object.isString(F)){F=F.toQueryParams()}Object.extend(H.parameters,F)}if(G.hasAttribute("method")&&!H.method){H.method=G.method}return new Ajax.Request(E,H)}};Form.Element={focus:function(B){$(B).focus();return B},select:function(B){$(B).select();return B}};Form.Element.Methods={serialize:function(D){D=$(D);if(!D.disabled&&D.name){var F=D.getValue();if(F!=undefined){var E={};E[D.name]=F;return Object.toQueryString(E)}}return""},getValue:function(C){C=$(C);var D=C.tagName.toLowerCase();return Form.Element.Serializers[D](C)},setValue:function(D,F){D=$(D);var E=D.tagName.toLowerCase();Form.Element.Serializers[E](D,F);return D},clear:function(B){$(B).value="";return B},present:function(B){return $(B).value!=""},activate:function(C){C=$(C);try{C.focus();if(C.select&&(C.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(C.type))){C.select()}}catch(D){}return C},disable:function(B){B=$(B);B.disabled=true;return B},enable:function(B){B=$(B);B.disabled=false;return B}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(C,D){switch(C.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(C,D);default:return Form.Element.Serializers.textarea(C,D)}},inputSelector:function(C,D){if(Object.isUndefined(D)){return C.checked?C.value:null}else{C.checked=!!D}},textarea:function(C,D){if(Object.isUndefined(D)){return C.value}else{C.value=D}},select:function(N,J){if(Object.isUndefined(J)){return this[N.type=="select-one"?"selectOne":"selectMany"](N)}else{var L,K,I=!Object.isArray(J);for(var M=0,H=N.length;M<H;M++){L=N.options[M];K=this.optionValue(L);if(I){if(K==J){L.selected=true;return }}else{L.selected=J.include(K)}}}},selectOne:function(D){var C=D.selectedIndex;return C>=0?this.optionValue(D.options[C]):null},selectMany:function(J){var G,F=J.length;if(!F){return null}for(var H=0,G=[];H<F;H++){var I=J.options[H];if(I.selected){G.push(this.optionValue(I))}}return G},optionValue:function(B){return Element.extend(B).hasAttribute("value")?B.value:B.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,D,E,F){$super(F,E);this.element=$(D);this.lastValue=this.getValue()},execute:function(){var B=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(B)?this.lastValue!=B:String(this.lastValue)!=String(B)){this.callback(this.element,B);this.lastValue=B}}});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(C,D){this.element=$(C);this.callback=D;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var B=this.getValue();if(this.lastValue!=B){this.callback(this.element,B);this.lastValue=B}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(B){if(B.type){switch(B.type.toLowerCase()){case"checkbox":case"radio":Event.observe(B,"click",this.onElementEvent.bind(this));break;default:Event.observe(B,"change",this.onElementEvent.bind(this));break}}}});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)}});if(!window.Event){var Event={}}Object.extend(Event,{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:{},relatedTarget:function(D){var C;switch(D.type){case"mouseover":C=D.fromElement;break;case"mouseout":C=D.toElement;break;default:return null}return Element.extend(C)}});Event.Methods=(function(){var D;if(Prototype.Browser.IE){var C={0:1,1:4,2:2};D=function(A,B){return A.button==C[B]}}else{if(Prototype.Browser.WebKit){D=function(A,B){switch(B){case 0:return A.which==1&&!A.metaKey;case 1:return A.which==1&&A.metaKey;default:return false}}}else{D=function(A,B){return A.which?(A.which===B+1):(A.button===B)}}}return{isLeftClick:function(A){return D(A,0)},isMiddleClick:function(A){return D(A,1)},isRightClick:function(A){return D(A,2)},element:function(B){B=Event.extend(B);var G=B.target,H=B.type,A=B.currentTarget;if(A&&A.tagName){if(H==="load"||H==="error"||(H==="click"&&A.tagName.toLowerCase()==="input"&&A.type==="radio")){G=A}}if(G.nodeType==Node.TEXT_NODE){G=G.parentNode}return Element.extend(G)},findElement:function(B,A){var G=Event.element(B);if(!A){return G}var H=[G].concat(G.ancestors());return Selector.findElement(H,A,0)},pointer:function(A){var B=document.documentElement,F=document.body||{scrollLeft:0,scrollTop:0};return{x:A.pageX||(A.clientX+(B.scrollLeft||F.scrollLeft)-(B.clientLeft||0)),y:A.pageY||(A.clientY+(B.scrollTop||F.scrollTop)-(B.clientTop||0))}},pointerX:function(A){return Event.pointer(A).x},pointerY:function(A){return Event.pointer(A).y},stop:function(A){Event.extend(A);A.preventDefault();A.stopPropagation();A.stopped=true}}})();Event.extend=(function(){var B=Object.keys(Event.Methods).inject({},function(D,A){D[A]=Event.Methods[A].methodize();return D});if(Prototype.Browser.IE){Object.extend(B,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(D){if(!D){return false}if(D._extendedByPrototype){return D}D._extendedByPrototype=Prototype.emptyFunction;var A=Event.pointer(D);Object.extend(D,{target:D.srcElement,relatedTarget:Event.relatedTarget(D),pageX:A.x,pageY:A.y});return Object.extend(D,B)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")["__proto__"];Object.extend(Event.prototype,B);return Prototype.K}})();Object.extend(Event,(function(){var M=Event.cache;function J(A){if(A._prototypeEventID){return A._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return A._prototypeEventID=[++arguments.callee.id]}function R(A){if(A&&A.include(":")){return"dataavailable"}return A}function P(A){return M[A]=M[A]||{}}function Q(A,C){var B=P(A);return B[C]=B[C]||[]}function N(B,C,A){var D=J(B);var E=Q(D,C);if(E.pluck("handler").include(A)){return false}var F=function(G){if(!Event||!Event.extend||(G.eventName&&G.eventName!=C)){return false}Event.extend(G);A.call(B,G)};F.handler=A;E.push(F);return F}function O(D,C,B){var A=Q(D,C);return A.find(function(E){return E.handler==B})}function L(D,C,B){var A=P(D);if(!A[C]){return false}A[C]=A[C].without(O(D,C,B))}function K(){for(var A in M){for(var B in M[A]){M[A][B]=null}}}if(window.attachEvent){window.attachEvent("onunload",K)}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}return{observe:function(A,C,E){A=$(A);var B=R(C);var D=N(A,C,E);if(!D){return A}if(A.addEventListener){A.addEventListener(B,D,false)}else{A.attachEvent("on"+B,D)}return A},stopObserving:function(A,C,F){A=$(A);var D=J(A),B=R(C);if(!F&&C){Q(D,C).each(function(G){A.stopObserving(C,G.handler)});return A}else{if(!C){Object.keys(P(D)).each(function(G){A.stopObserving(G)});return A}}var E=O(D,C,F);if(!E){return A}if(A.removeEventListener){A.removeEventListener(B,E,false)}else{A.detachEvent("on"+B,E)}L(D,C,F);return A},fire:function(A,B,C){A=$(A);if(A==document&&document.createEvent&&!A.dispatchEvent){A=document.documentElement}var D;if(document.createEvent){D=document.createEvent("HTMLEvents");D.initEvent("dataavailable",true,true)}else{D=document.createEventObject();D.eventType="ondataavailable"}D.eventName=B;D.memo=C||{};if(document.createEvent){A.dispatchEvent(D)}else{A.fireEvent(D.eventType,D)}return Event.extend(D)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var D;function C(){if(document.loaded){return }if(D){window.clearInterval(D)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){D=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){C()}},0);Event.observe(window,"load",C)}else{document.addEventListener("DOMContentLoaded",C,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;C()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(C,D){return Element.insert(C,{before:D})},Top:function(C,D){return Element.insert(C,{top:D})},Bottom:function(C,D){return Element.insert(C,{bottom:D})},After:function(C,D){return Element.insert(C,{after:D})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var 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(F,D,E){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(F,D,E)}this.xcomp=D;this.ycomp=E;this.offset=Element.cumulativeOffset(F);return(E>=this.offset[1]&&E<this.offset[1]+F.offsetHeight&&D>=this.offset[0]&&D<this.offset[0]+F.offsetWidth)},withinIncludingScrolloffsets:function(H,E,F){var G=Element.cumulativeScrollOffset(H);this.xcomp=E+G[0]-this.deltaX;this.ycomp=F+G[1]-this.deltaY;this.offset=Element.cumulativeOffset(H);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+H.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+H.offsetWidth)},overlap:function(D,C){if(!D){return 0}if(D=="vertical"){return((this.offset[1]+C.offsetHeight)-this.ycomp)/C.offsetHeight}if(D=="horizontal"){return((this.offset[0]+C.offsetWidth)-this.xcomp)/C.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(B){Position.prepare();return Element.absolutize(B)},relativize:function(B){Position.prepare();return Element.relativize(B)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(D,E,F){F=F||{};return Element.clonePosition(E,D,F)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(D){function C(A){return A.blank()?null:"[contains(concat(' ', @class, ' '), ' "+A+" ')]"}D.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(B,F){F=F.toString().strip();var A=/\s/.test(F)?$w(F).map(C).join(""):C(F);return A?document._getElementsByXPath(".//*"+A,B):[]}:function(M,N){N=N.toString().strip();var P=[],K=(/\s/.test(N)?$w(N):null);if(!K&&!N){return P}var O=$(M).getElementsByTagName("*");N=" "+N+" ";for(var L=0,A,B;A=O[L];L++){if(A.className&&(B=" "+A.className+" ")&&(B.include(N)||(K&&K.all(function(E){return !E.toString().blank()&&B.include(" "+E+" ")})))){P.push(Element.extend(A))}}return P};return function(B,A){return $(A||document.body).getElementsByClassName(B)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(B){this.element=$(B)},_each:function(B){this.element.className.split(/\s+/).select(function(A){return A.length>0})._each(B)},set:function(B){this.element.className=B},add:function(B){if(this.include(B)){return }this.set($A(this).concat(B).join(" "))},remove:function(B){if(!this.include(B)){return }this.set($A(this).without(B).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(G){G=G.toUpperCase();var H=this.NODEMAP[G]||"div";var J=document.createElement(H);try{J.innerHTML="<"+G+"></"+G+">"}catch(I){}var K=J.firstChild||null;if(K&&(K.tagName.toUpperCase()!=G)){K=K.getElementsByTagName(G)[0]}if(!K){K=document.createElement(G)}if(!K){return }if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(K,arguments[1])}else{var L=this._attributes(arguments[1]);if(L.length){try{J.innerHTML="<"+G+" "+L+"></"+G+">"}catch(I){}K=J.firstChild||null;if(!K){K=document.createElement(G);for(attr in arguments[1]){K[attr=="class"?"className":attr]=arguments[1][attr]}}if(K.tagName.toUpperCase()!=G){K=J.getElementsByTagName(G)[0]}}}}if(arguments[2]){this._children(K,arguments[2])}return $(K)},_text:function(B){return document.createTextNode(B)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(C){var D=[];for(attribute in C){D.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+C[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"')}return D.join(" ")},_children:function(C,D){if(D.tagName){C.appendChild(D);return }if(typeof D=="object"){D.flatten().each(function(A){if(typeof A=="object"){C.appendChild(A)}else{if(Builder._isStringOrNumber(A)){C.appendChild(Builder._text(A))}}})}else{if(Builder._isStringOrNumber(D)){C.appendChild(Builder._text(D))}}},_isStringOrNumber:function(B){return(typeof B=="string"||typeof B=="number")},build:function(D){var C=this.node("div");$(C).update(D.strip());return C.down()},dump:function(D){if(typeof D!="object"&&typeof D!="function"){D=window}var C=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);C.each(function(A){D[A]=function(){return Builder.node.apply(Builder,[A].concat($A(arguments)))}})}};String.prototype.parseColor=function(){var D="#";if(this.slice(0,4)=="rgb("){var E=this.slice(4,this.length-1).split(",");var F=0;do{D+=parseInt(E[F]).toColorPart()}while(++F<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var F=1;F<4;F++){D+=(this.charAt(F)+this.charAt(F)).toLowerCase()}}if(this.length==7){D=this.toLowerCase()}}}return(D.length==7?D:(arguments[0]||this))};Element.collectTextNodes=function(B){return $A($(B).childNodes).collect(function(A){return(A.nodeType==3?A.nodeValue:(A.hasChildNodes()?Element.collectTextNodes(A):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(D,C){return $A($(D).childNodes).collect(function(A){return(A.nodeType==3?A.nodeValue:((A.hasChildNodes()&&!Element.hasClassName(A,C))?Element.collectTextNodesIgnoreClass(A,C):""))}).flatten().join("")};Element.setContentZoom=function(D,C){D=$(D);D.setStyle({fontSize:(C/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return D};Element.getInlineOpacity=function(B){return $(B).style.opacity||""};Element.forceRerendering=function(D){try{D=$(D);var E=document.createTextNode(" ");D.appendChild(E);D.removeChild(E)}catch(F){}};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(B){return(-Math.cos(B*Math.PI)/2)+0.5},reverse:function(B){return 1-B},flicker:function(B){var B=((-Math.cos(B*Math.PI)/4)+0.75)+Math.random()/4;return B>1?1:B},wobble:function(B){return(-Math.cos(B*Math.PI*(9*B))/2)+0.5},pulse:function(D,C){return(-Math.cos((D*((C||5)-0.5)*2)*Math.PI)/2)+0.5},spring:function(B){return 1-(Math.cos(B*4.5*Math.PI)*Math.exp(-B*6))},none:function(B){return 0},full:function(B){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(C){var D="position:relative";if(Prototype.Browser.IE){D+=";zoom:1"}C=$(C);$A(C.childNodes).each(function(A){if(A.nodeType==3){A.nodeValue.toArray().each(function(B){C.insertBefore(new Element("span",{style:D}).update(B==" "?String.fromCharCode(160):B),A)});Element.remove(A)}})},multiple:function(I,J){var F;if(((typeof I=="object")||Object.isFunction(I))&&(I.length)){F=I}else{F=$(I).childNodes}var H=Object.extend({speed:0.1,delay:0},arguments[2]||{});var G=H.delay;$A(F).each(function(A,B){new J(A,Object.extend(H,{delay:B*H.speed+G}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(F,D){F=$(F);D=(D||"appear").toLowerCase();var E=Object.extend({queue:{position:"end",scope:(F.id||"global"),limit:1}},arguments[2]||{});Effect[F.visible()?Effect.PAIRS[D][1]:Effect.PAIRS[D][0]](F,E)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(B){this.effects._each(B)},add:function(F){var E=new Date().getTime();var D=Object.isString(F.options.queue)?F.options.queue:F.options.queue.position;switch(D){case"front":this.effects.findAll(function(A){return A.state=="idle"}).each(function(A){A.startOn+=F.finishOn;A.finishOn+=F.finishOn});break;case"with-last":E=this.effects.pluck("startOn").max()||E;break;case"end":E=this.effects.pluck("finishOn").max()||E;break}F.startOn+=E;F.finishOn+=E;if(!F.options.queue.limit||(this.effects.length<F.options.queue.limit)){this.effects.push(F)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(B){this.effects=this.effects.reject(function(A){return A==B});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var E=new Date().getTime();for(var F=0,D=this.effects.length;F<D;F++){this.effects[F]&&this.effects[F].loop(E)}}});Effect.Queues={instances:$H(),get:function(B){if(!Object.isString(B)){return B}return this.instances.get(B)||this.instances.set(B,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(C){function D(A,B){return((A[B+"Internal"]?"this.options."+B+"Internal(this);":"")+(A[B]?"this.options."+B+"(this);":""))}if(C&&C.transition===false){C.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),C||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);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 A(B,F){if(B.options[F+"Internal"]){B.options[F+"Internal"](B)}if(B.options[F]){B.options[F](B)}}return function(B){if(this.state==="idle"){this.state="running";A(this,"beforeSetup");if(this.setup){this.setup()}A(this,"afterSetup")}if(this.state==="running"){B=(this.options.transition(B)*this.fromToDelta)+this.options.from;this.position=B;A(this,"beforeUpdate");if(this.update){this.update(B)}A(this,"afterUpdate")}}})();this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(D){if(D>=this.startOn){if(D>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var E=(D-this.startOn)/this.totalTime,F=(E*this.totalFrames).round();if(F>this.currentFrame){this.render(E);this.currentFrame=F}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(B){if(this.options[B+"Internal"]){this.options[B+"Internal"](this)}if(this.options[B]){this.options[B](this)}},inspect:function(){var B=$H();for(property in this){if(!Object.isFunction(this[property])){B.set(property,this[property])}}return"#<Effect:"+B.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(B){this.effects=B||[];this.start(arguments[1])},update:function(B){this.effects.invoke("render",B)},finish:function(B){this.effects.each(function(A){A.render(1);A.cancel();A.event("beforeFinish");if(A.finish){A.finish(B)}A.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(K,H,I){K=Object.isString(K)?$(K):K;var G=$A(arguments),J=G.last(),L=G.length==5?G[3]:null;this.method=Object.isFunction(J)?J.bind(K):Object.isFunction(K[J])?K[J].bind(K):function(A){K[J]=A};this.start(Object.extend({from:H,to:I},L||{}))},update:function(B){this.method(B)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var D=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(D)},update:function(B){this.element.setOpacity(B)}});Effect.Move=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}var D=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(D)},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.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(B){this.element.setStyle({left:(this.options.x*B+this.originalLeft).round()+"px",top:(this.options.y*B+this.originalTop).round()+"px"})}});Effect.MoveBy=function(F,E,D){return new Effect.Move(F,Object.extend({x:D,y:E},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(F,D){this.element=$(F);if(!this.element){throw (Effect._elementDoesNotExistError)}var E=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:D},arguments[2]||{});this.start(E)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(A){this.originalStyle[A]=this.element.style[A]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var B=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(A){if(B.indexOf(A)>0){this.fontSize=parseFloat(B);this.fontSizeType=A}}.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(C){var D=(this.options.scaleFrom/100)+(this.factor*C);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*D+this.fontSizeType})}this.setDimensions(this.dims[0]*D,this.dims[1]*D)},finish:function(B){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(H,I){var G={};if(this.options.scaleX){G.width=I.round()+"px"}if(this.options.scaleY){G.height=H.round()+"px"}if(this.options.scaleFromCenter){var J=(H-this.dims[0])/2;var F=(I-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){G.top=this.originalTop-J+"px"}if(this.options.scaleX){G.left=this.originalLeft-F+"px"}}else{if(this.options.scaleY){G.top=-J+"px"}if(this.options.scaleX){G.left=-F+"px"}}}this.element.setStyle(G)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(C){this.element=$(C);if(!this.element){throw (Effect._elementDoesNotExistError)}var D=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(D)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }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(B){return parseInt(this.options.startcolor.slice(B*2+1,B*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(B){return parseInt(this.options.endcolor.slice(B*2+1,B*2+3),16)-this._base[B]}.bind(this))},update:function(B){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(F,E,A){return F+((this._base[A]+(this._delta[A]*B)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(E){var H=arguments[1]||{},F=document.viewport.getScrollOffsets(),G=$(E).cumulativeOffset();if(H.offset){G[1]+=H.offset}return new Effect.Tween(null,F.top,G[1],H,function(A){scrollTo(F.left,A.round())})};Effect.Fade=function(F){F=$(F);var D=F.getInlineOpacity();var E=Object.extend({from:F.getOpacity()||1,to:0,afterFinishInternal:function(A){if(A.options.to!=0){return }A.element.hide().setStyle({opacity:D})}},arguments[1]||{});return new Effect.Opacity(F,E)};Effect.Appear=function(C){C=$(C);var D=Object.extend({from:(C.getStyle("display")=="none"?0:C.getOpacity()||0),to:1,afterFinishInternal:function(A){A.element.forceRerendering()},beforeSetup:function(A){A.element.setOpacity(A.options.from).show()}},arguments[1]||{});return new Effect.Opacity(C,D)};Effect.Puff=function(D){D=$(D);var C={opacity:D.getInlineOpacity(),position:D.getStyle("position"),top:D.style.top,left:D.style.left,width:D.style.width,height:D.style.height};return new Effect.Parallel([new Effect.Scale(D,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(D,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(A){Position.absolutize(A.effects[0].element)},afterFinishInternal:function(A){A.effects[0].element.hide().setStyle(C)}},arguments[1]||{}))};Effect.BlindUp=function(B){B=$(B);B.makeClipping();return new Effect.Scale(B,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(A){A.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(D){D=$(D);var C=D.getDimensions();return new Effect.Scale(D,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:C.height,originalWidth:C.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(A){A.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(D){D=$(D);var C=D.getInlineOpacity();return new Effect.Appear(D,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(A){new Effect.Scale(A.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(B){B.element.makePositioned().makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping().undoPositioned().setStyle({opacity:C})}})}},arguments[1]||{}))};Effect.DropOut=function(D){D=$(D);var C={top:D.getStyle("top"),left:D.getStyle("left"),opacity:D.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(D,{x:0,y:100,sync:true}),new Effect.Opacity(D,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(A){A.effects[0].element.makePositioned()},afterFinishInternal:function(A){A.effects[0].element.hide().undoPositioned().setStyle(C)}},arguments[1]||{}))};Effect.Shake=function(J){J=$(J);var H=Object.extend({distance:20,duration:0.5},arguments[1]||{});var G=parseFloat(H.distance);var I=parseFloat(H.duration)/10;var F={top:J.getStyle("top"),left:J.getStyle("left")};return new Effect.Move(J,{x:G,y:0,duration:I,afterFinishInternal:function(A){new Effect.Move(A.element,{x:-G*2,y:0,duration:I*2,afterFinishInternal:function(B){new Effect.Move(B.element,{x:G*2,y:0,duration:I*2,afterFinishInternal:function(C){new Effect.Move(C.element,{x:-G*2,y:0,duration:I*2,afterFinishInternal:function(D){new Effect.Move(D.element,{x:G*2,y:0,duration:I*2,afterFinishInternal:function(E){new Effect.Move(E.element,{x:-G,y:0,duration:I,afterFinishInternal:function(L){L.element.undoPositioned().setStyle(F)}})}})}})}})}})}})};Effect.SlideDown=function(F){F=$(F).cleanWhitespace();var E=F.down().getStyle("bottom");var D=F.getDimensions();return new Effect.Scale(F,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:D.height,originalWidth:D.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makePositioned();A.element.down().makePositioned();if(window.opera){A.element.setStyle({top:""})}A.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(A){A.element.down().setStyle({bottom:(A.dims[0]-A.element.clientHeight)+"px"})},afterFinishInternal:function(A){A.element.undoClipping().undoPositioned();A.element.down().undoPositioned().setStyle({bottom:E})}},arguments[1]||{}))};Effect.SlideUp=function(F){F=$(F).cleanWhitespace();var E=F.down().getStyle("bottom");var D=F.getDimensions();return new Effect.Scale(F,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:D.height,originalWidth:D.width},restoreAfterFinish:true,afterSetup:function(A){A.element.makePositioned();A.element.down().makePositioned();if(window.opera){A.element.setStyle({top:""})}A.element.makeClipping().show()},afterUpdateInternal:function(A){A.element.down().setStyle({bottom:(A.dims[0]-A.element.clientHeight)+"px"})},afterFinishInternal:function(A){A.element.hide().undoClipping().undoPositioned();A.element.down().undoPositioned().setStyle({bottom:E})}},arguments[1]||{}))};Effect.Squish=function(B){return new Effect.Scale(B,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(A){A.element.makeClipping()},afterFinishInternal:function(A){A.element.hide().undoClipping()}})};Effect.Grow=function(P){P=$(P);var O=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var I={top:P.style.top,left:P.style.left,height:P.style.height,width:P.style.width,opacity:P.getInlineOpacity()};var J=P.getDimensions();var L,K;var M,N;switch(O.direction){case"top-left":L=K=M=N=0;break;case"top-right":L=J.width;K=N=0;M=-J.width;break;case"bottom-left":L=M=0;K=J.height;N=-J.height;break;case"bottom-right":L=J.width;K=J.height;M=-J.width;N=-J.height;break;case"center":L=J.width/2;K=J.height/2;M=-J.width/2;N=-J.height/2;break}return new Effect.Move(P,{x:L,y:K,duration:0.01,beforeSetup:function(A){A.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(A){new Effect.Parallel([new Effect.Opacity(A.element,{sync:true,to:1,from:0,transition:O.opacityTransition}),new Effect.Move(A.element,{x:M,y:N,sync:true,transition:O.moveTransition}),new Effect.Scale(A.element,100,{scaleMode:{originalHeight:J.height,originalWidth:J.width},sync:true,scaleFrom:window.opera?1:0,transition:O.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(B){B.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(B){B.effects[0].element.undoClipping().undoPositioned().setStyle(I)}},O))}})};Effect.Shrink=function(L){L=$(L);var K=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var G={top:L.style.top,left:L.style.left,height:L.style.height,width:L.style.width,opacity:L.getInlineOpacity()};var H=L.getDimensions();var I,J;switch(K.direction){case"top-left":I=J=0;break;case"top-right":I=H.width;J=0;break;case"bottom-left":I=0;J=H.height;break;case"bottom-right":I=H.width;J=H.height;break;case"center":I=H.width/2;J=H.height/2;break}return new Effect.Parallel([new Effect.Opacity(L,{sync:true,to:0,from:1,transition:K.opacityTransition}),new Effect.Scale(L,window.opera?1:0,{sync:true,transition:K.scaleTransition,restoreAfterFinish:true}),new Effect.Move(L,{x:I,y:J,sync:true,transition:K.moveTransition})],Object.extend({beforeStartInternal:function(A){A.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(A){A.effects[0].element.hide().undoClipping().undoPositioned().setStyle(G)}},K))};Effect.Pulsate=function(I){I=$(I);var H=arguments[1]||{},J=I.getInlineOpacity(),G=H.transition||Effect.Transitions.linear,F=function(A){return 1-G((-Math.cos((A*(H.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(I,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(A){A.element.setStyle({opacity:J})}},H),{transition:F}))};Effect.Fold=function(D){D=$(D);var C={top:D.style.top,left:D.style.left,width:D.style.width,height:D.style.height};D.makeClipping();return new Effect.Scale(D,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(A){new Effect.Scale(D,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(B){B.element.hide().undoClipping().setStyle(C)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(D){this.element=$(D);if(!this.element){throw (Effect._elementDoesNotExistError)}var E=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(E.style)){this.style=$H(E.style)}else{if(E.style.include(":")){this.style=E.style.parseStyle()}else{this.element.addClassName(E.style);this.style=$H(this.element.getStyles());this.element.removeClassName(E.style);var F=this.element.getStyles();this.style=this.style.reject(function(A){return A.value==F[A.key]});E.afterFinishInternal=function(A){A.element.addClassName(A.options.style);A.transforms.each(function(B){A.element.style[B.style]=""})}}}this.start(E)},setup:function(){function B(A){if(!A||["rgba(0, 0, 0, 0)","transparent"].include(A)){A="#ffffff"}A=A.parseColor();return $R(0,2).map(function(D){return parseInt(A.slice(D*2+1,D*2+3),16)})}this.transforms=this.style.map(function(A){var L=A[0],H=A[1],I=null;if(H.parseColor("#zzzzzz")!="#zzzzzz"){H=H.parseColor();I="color"}else{if(L=="opacity"){H=parseFloat(H);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(H)){var J=H.match(/^([\+\-]?[0-9\.]+)(.*)$/);H=parseFloat(J[1]);I=(J.length==3)?J[2]:null}}}var K=this.element.getStyle(L);return{style:L.camelize(),originalValue:I=="color"?B(K):parseFloat(K||0),targetValue:I=="color"?B(H):H,unit:I}}.bind(this)).reject(function(A){return((A.originalValue==A.targetValue)||(A.unit!="color"&&(isNaN(A.originalValue)||isNaN(A.targetValue))))})},update:function(E){var F={},H,G=this.transforms.length;while(G--){F[(H=this.transforms[G]).style]=H.unit=="color"?"#"+(Math.round(H.originalValue[0]+(H.targetValue[0]-H.originalValue[0])*E)).toColorPart()+(Math.round(H.originalValue[1]+(H.targetValue[1]-H.originalValue[1])*E)).toColorPart()+(Math.round(H.originalValue[2]+(H.targetValue[2]-H.originalValue[2])*E)).toColorPart():(H.originalValue+(H.targetValue-H.originalValue)*E).toFixed(3)+(H.unit===null?"":H.unit)}this.element.setStyle(F,true)}});Effect.Transform=Class.create({initialize:function(B){this.tracks=[];this.options=arguments[1]||{};this.addTracks(B)},addTracks:function(B){B.each(function(D){D=$H(D);var A=D.values().first();this.tracks.push($H({ids:D.keys().first(),effect:Effect.Morph,options:{style:A}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(J){var G=J.get("ids"),I=J.get("effect"),H=J.get("options");var F=[$(G)||$$(G)].flatten();return F.map(function(A){return new I(A,Object.extend({sync:true},H))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var D,C=$H();if(Prototype.Browser.WebKit){D=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';D=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(A){if(D[A]){C.set(A,D[A])}});if(Prototype.Browser.IE&&this.include("opacity")){C.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return C};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(C){var D=document.defaultView.getComputedStyle($(C),null);return Element.CSS_PROPERTIES.inject({},function(A,B){A[B]=D[B];return A})}}else{Element.getStyles=function(F){F=$(F);var E=F.currentStyle,D;D=Element.CSS_PROPERTIES.inject({},function(A,B){A[B]=E[B];return A});if(!D.opacity){D.opacity=F.getOpacity()}return D}}Effect.Methods={morph:function(C,D){C=$(C);new Effect.Morph(C,Object.extend({style:D},arguments[2]||{}));return C},visualEffect:function(I,J,H){I=$(I);var G=J.dasherize().camelize(),F=G.charAt(0).toUpperCase()+G.substring(1);new Effect[F](I,H);return I},highlight:function(C,D){C=$(C);new Effect.Highlight(C,D);return C}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(B){Effect.Methods[B]=function(D,A){D=$(D);Effect[B.charAt(0).toUpperCase()+B.substring(1)](D,A);return D}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(B){Effect.Methods[B]=Element[B]});Element.addMethods(Effect.Methods);if(typeof Effect=="undefined"){throw ("controls.js requires including script.aculo.us' effects.js library")}var Autocompleter={};Autocompleter.Base=Class.create({baseInitialize:function(D,E,F){D=$(D);this.element=D;this.update=$(E);this.hasFocus=false;this.changed=false;this.active=false;this.index=0;this.entryCount=0;this.oldElementValue=this.element.value;if(this.setOptions){this.setOptions(F)}else{this.options=F||{}}this.options.paramName=this.options.paramName||this.element.name;this.options.tokens=this.options.tokens||[];this.options.frequency=this.options.frequency||0.4;this.options.minChars=this.options.minChars||1;this.options.onShow=this.options.onShow||function(B,A){if(!A.style.position||A.style.position=="absolute"){A.style.position="absolute";Position.clone(B,A,{setHeight:false,offsetTop:B.offsetHeight})}Effect.Appear(A,{duration:0.15})};this.options.onHide=this.options.onHide||function(B,A){new Effect.Fade(A,{duration:0.15})};if(typeof (this.options.tokens)=="string"){this.options.tokens=new Array(this.options.tokens)}if(!this.options.tokens.include("\n")){this.options.tokens.push("\n")}this.observer=null;this.element.setAttribute("autocomplete","off");Element.hide(this.update);Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))},show:function(){if(Element.getStyle(this.update,"display")=="none"){this.options.onShow(this.element,this.update)}if(!this.iefix&&(Prototype.Browser.IE)&&(Element.getStyle(this.update,"position")=="absolute")){new Insertion.After(this.update,'<iframe id="'+this.update.id+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');this.iefix=$(this.update.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:(!this.update.style.height)});this.iefix.style.zIndex=1;this.update.style.zIndex=2;Element.show(this.iefix)},hide:function(){this.stopIndicator();if(Element.getStyle(this.update,"display")!="none"){this.options.onHide(this.element,this.update)}if(this.iefix){Element.hide(this.iefix)}},startIndicator:function(){if(this.options.indicator){Element.show(this.options.indicator)}},stopIndicator:function(){if(this.options.indicator){Element.hide(this.options.indicator)}},onKeyPress:function(B){if(this.active){switch(B.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();Event.stop(B);case Event.KEY_ESC:this.hide();this.active=false;Event.stop(B);return ;case Event.KEY_LEFT:case Event.KEY_RIGHT:return ;case Event.KEY_UP:this.markPrevious();this.render();Event.stop(B);return ;case Event.KEY_DOWN:this.markNext();this.render();Event.stop(B);return }}else{if(B.keyCode==Event.KEY_TAB||B.keyCode==Event.KEY_RETURN||(Prototype.Browser.WebKit>0&&B.keyCode==0)){return }}this.changed=true;this.hasFocus=true;if(this.observer){clearTimeout(this.observer)}this.observer=setTimeout(this.onObserverEvent.bind(this),this.options.frequency*1000)},activate:function(){this.changed=false;this.hasFocus=true;this.getUpdatedChoices()},onHover:function(D){var C=Event.findElement(D,"LI");if(this.index!=C.autocompleteIndex){this.index=C.autocompleteIndex;this.render()}Event.stop(D)},onClick:function(D){var C=Event.findElement(D,"LI");this.index=C.autocompleteIndex;this.selectEntry();this.hide()},onBlur:function(B){setTimeout(this.hide.bind(this),250);this.hasFocus=false;this.active=false},render:function(){if(this.entryCount>0){for(var B=0;B<this.entryCount;B++){this.index==B?Element.addClassName(this.getEntry(B),"selected"):Element.removeClassName(this.getEntry(B),"selected")}if(this.hasFocus){this.show();this.active=true}}else{this.active=false;this.hide()}},markPrevious:function(){if(this.index>0){this.index--}else{this.index=this.entryCount-1}this.getEntry(this.index).scrollIntoView(true)},markNext:function(){if(this.index<this.entryCount-1){this.index++}else{this.index=0}this.getEntry(this.index).scrollIntoView(false)},getEntry:function(B){return this.update.firstChild.childNodes[B]},getCurrentEntry:function(){return this.getEntry(this.index)},selectEntry:function(){this.active=false;this.updateElement(this.getCurrentEntry())},updateElement:function(H){if(this.options.updateElement){this.options.updateElement(H);return }var J="";if(this.options.select){var L=$(H).select("."+this.options.select)||[];if(L.length>0){J=Element.collectTextNodes(L[0],this.options.select)}}else{J=Element.collectTextNodesIgnoreClass(H,"informal")}var G=this.getTokenBounds();if(G[0]!=-1){var I=this.element.value.substr(0,G[0]);var K=this.element.value.substr(G[0]).match(/^\s+/);if(K){I+=K[0]}this.element.value=I+J+this.element.value.substr(G[1])}else{this.element.value=J}this.oldElementValue=this.element.value;this.element.focus();if(this.options.afterUpdateElement){this.options.afterUpdateElement(this.element,H)}},updateChoices:function(E){if(!this.changed&&this.hasFocus){this.update.innerHTML=E;Element.cleanWhitespace(this.update);Element.cleanWhitespace(this.update.down());if(this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;for(var D=0;D<this.entryCount;D++){var F=this.getEntry(D);F.autocompleteIndex=D;this.addObservers(F)}}else{this.entryCount=0}this.stopIndicator();this.index=0;if(this.entryCount==1&&this.options.autoSelect){this.selectEntry();this.hide()}else{this.render()}}},addObservers:function(B){Event.observe(B,"mouseover",this.onHover.bindAsEventListener(this));Event.observe(B,"click",this.onClick.bindAsEventListener(this))},onObserverEvent:function(){this.changed=false;this.tokenBounds=null;if(this.getToken().length>=this.options.minChars){this.getUpdatedChoices()}else{this.active=false;this.hide()}this.oldElementValue=this.element.value},getToken:function(){var B=this.getTokenBounds();return this.element.value.substring(B[0],B[1]).strip()},getTokenBounds:function(){if(null!=this.tokenBounds){return this.tokenBounds}var M=this.element.value;if(M.strip().empty()){return[-1,0]}var L=arguments.callee.getFirstDifferencePos(M,this.oldElementValue);var J=(L==this.oldElementValue.length?1:0);var N=-1,O=M.length;var K;for(var P=0,I=this.options.tokens.length;P<I;++P){K=M.lastIndexOf(this.options.tokens[P],L+J-1);if(K>N){N=K}K=M.indexOf(this.options.tokens[P],L+J);if(-1!=K&&K<O){O=K}}return(this.tokenBounds=[N+1,O])}});Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(G,E){var F=Math.min(G.length,E.length);for(var H=0;H<F;++H){if(G[H]!=E[H]){return H}}return F};Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(H,F,E,G){this.baseInitialize(H,F,G);this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;this.url=E},getUpdatedChoices:function(){this.startIndicator();var B=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,B):B;if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}new Ajax.Request(this.url,this.options)},onComplete:function(B){this.updateChoices(B.responseText)}});Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(E,G,F,H){this.baseInitialize(E,G,H);this.options.array=F},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))},setOptions:function(B){this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(P){var O=[];var M=[];var J=P.getToken();var K=0;for(var N=0;N<P.options.array.length&&O.length<P.options.choices;N++){var L=P.options.array[N];var A=P.options.ignoreCase?L.toLowerCase().indexOf(J.toLowerCase()):L.indexOf(J);while(A!=-1){if(A==0&&L.length!=J.length){O.push("<li><strong>"+L.substr(0,J.length)+"</strong>"+L.substr(J.length)+"</li>");break}else{if(J.length>=P.options.partialChars&&P.options.partialSearch&&A!=-1){if(P.options.fullSearch||/\s/.test(L.substr(A-1,1))){M.push("<li>"+L.substr(0,A)+"<strong>"+L.substr(A,J.length)+"</strong>"+L.substr(A+J.length)+"</li>");break}}}A=P.options.ignoreCase?L.toLowerCase().indexOf(J.toLowerCase(),A+1):L.indexOf(J,A+1)}}if(M.length){O=O.concat(M.slice(0,P.options.choices-O.length))}return"<ul>"+O.join("")+"</ul>"}},B||{})}});Field.scrollFreeActivate=function(B){setTimeout(function(){Field.activate(B)},1)};Ajax.InPlaceEditor=Class.create({initialize:function(F,D,E){this.url=D;this.element=F=$(F);this.prepareOptions();this._controls={};arguments.callee.dealWithDeprecatedOptions(E);Object.extend(this.options,E||{});if(!this.options.formId&&this.element.id){this.options.formId=this.element.id+"-inplaceeditor";if($(this.options.formId)){this.options.formId=""}}if(this.options.externalControl){this.options.externalControl=$(this.options.externalControl)}if(!this.options.externalControl){this.options.externalControlOnly=false}this._originalBackground=this.element.getStyle("background-color")||"transparent";this.element.title=this.options.clickToEditText;this._boundCancelHandler=this.handleFormCancellation.bind(this);this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this);this._boundFailureHandler=this.handleAJAXFailure.bind(this);this._boundSubmitHandler=this.handleFormSubmission.bind(this);this._boundWrapperHandler=this.wrapUp.bind(this);this.registerListeners()},checkForEscapeOrReturn:function(B){if(!this._editing||B.ctrlKey||B.altKey||B.shiftKey){return }if(Event.KEY_ESC==B.keyCode){this.handleFormCancellation(B)}else{if(Event.KEY_RETURN==B.keyCode){this.handleFormSubmission(B)}}},createControl:function(I,M,N){var K=this.options[I+"Control"];var J=this.options[I+"Text"];if("button"==K){var H=document.createElement("input");H.type="submit";H.value=J;H.className="editor_"+I+"_button";if("cancel"==I){H.onclick=this._boundCancelHandler}this._form.appendChild(H);this._controls[I]=H}else{if("link"==K){var L=document.createElement("a");L.href="#";L.appendChild(document.createTextNode(J));L.onclick="cancel"==I?this._boundCancelHandler:this._boundSubmitHandler;L.className="editor_"+I+"_link";if(N){L.className+=" "+N}this._form.appendChild(L);this._controls[I]=L}}},createEditField:function(){var E=(this.options.loadTextURL?this.options.loadingText:this.getText());var F;if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){F=document.createElement("input");F.type="text";var D=this.options.size||this.options.cols||0;if(0<D){F.size=D}}else{F=document.createElement("textarea");F.rows=(1>=this.options.rows?this.options.autoRows:this.options.rows);F.cols=this.options.cols||40}F.name=this.options.paramName;F.value=E;F.className="editor_field";if(this.options.submitOnBlur){F.onblur=this._boundSubmitHandler}this._controls.editor=F;if(this.options.loadTextURL){this.loadExternalText()}this._form.appendChild(this._controls.editor)},createForm:function(){var D=this;function C(A,F){var B=D.options["text"+A+"Controls"];if(!B||F===false){return }D._form.appendChild(document.createTextNode(B))}this._form=$(document.createElement("form"));this._form.id=this.options.formId;this._form.addClassName(this.options.formClassName);this._form.onsubmit=this._boundSubmitHandler;this.createEditField();if("textarea"==this._controls.editor.tagName.toLowerCase()){this._form.appendChild(document.createElement("br"))}if(this.options.onFormCustomization){this.options.onFormCustomization(this,this._form)}C("Before",this.options.okControl||this.options.cancelControl);this.createControl("ok",this._boundSubmitHandler);C("Between",this.options.okControl&&this.options.cancelControl);this.createControl("cancel",this._boundCancelHandler,"editor_cancel");C("After",this.options.okControl||this.options.cancelControl)},destroy:function(){if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML}this.leaveEditMode();this.unregisterListeners()},enterEditMode:function(B){if(this._saving||this._editing){return }this._editing=true;this.triggerCallback("onEnterEditMode");if(this.options.externalControl){this.options.externalControl.hide()}this.element.hide();this.createForm();this.element.parentNode.insertBefore(this._form,this.element);if(!this.options.loadTextURL){this.postProcessEditField()}if(B){Event.stop(B)}},enterHover:function(B){if(this.options.hoverClassName){this.element.addClassName(this.options.hoverClassName)}if(this._saving){return }this.triggerCallback("onEnterHover")},getText:function(){return this.element.innerHTML.unescapeHTML()},handleAJAXFailure:function(B){this.triggerCallback("onFailure",B);if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML;this._oldInnerHTML=null}},handleFormCancellation:function(B){this.wrapUp();if(B){Event.stop(B)}},handleFormSubmission:function(H){var J=this._form;var I=$F(this._controls.editor);this.prepareSubmission();var G=this.options.callback(J,I)||"";if(Object.isString(G)){G=G.toQueryParams()}G.editorId=this.element.id;if(this.options.htmlResponse){var F=Object.extend({evalScripts:true},this.options.ajaxOptions);Object.extend(F,{parameters:G,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Updater({success:this.element},this.url,F)}else{var F=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(F,{parameters:G,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});new Ajax.Request(this.url,F)}if(H){Event.stop(H)}},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName);this.removeForm();this.leaveHover();this.element.style.backgroundColor=this._originalBackground;this.element.show();if(this.options.externalControl){this.options.externalControl.show()}this._saving=false;this._editing=false;this._oldInnerHTML=null;this.triggerCallback("onLeaveEditMode")},leaveHover:function(B){if(this.options.hoverClassName){this.element.removeClassName(this.options.hoverClassName)}if(this._saving){return }this.triggerCallback("onLeaveHover")},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName);this._controls.editor.disabled=true;var B=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(B,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(A){this._form.removeClassName(this.options.loadingClassName);var D=A.responseText;if(this.options.stripLoadedTextTags){D=D.stripTags()}this._controls.editor.value=D;this._controls.editor.disabled=false;this.postProcessEditField()}.bind(this),onFailure:this._boundFailureHandler});new Ajax.Request(this.options.loadTextURL,B)},postProcessEditField:function(){var B=this.options.fieldPostCreation;if(B){$(this._controls.editor)["focus"==B?"focus":"activate"]()}},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions);Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks);[this._extraDefaultOptions].flatten().compact().each(function(B){Object.extend(this.options,B)}.bind(this))},prepareSubmission:function(){this._saving=true;this.removeForm();this.leaveHover();this.showSaving()},registerListeners:function(){this._listeners={};var B;$H(Ajax.InPlaceEditor.Listeners).each(function(A){B=this[A.value].bind(this);this._listeners[A.key]=B;if(!this.options.externalControlOnly){this.element.observe(A.key,B)}if(this.options.externalControl){this.options.externalControl.observe(A.key,B)}}.bind(this))},removeForm:function(){if(!this._form){return }this._form.remove();this._form=null;this._controls={}},showSaving:function(){this._oldInnerHTML=this.element.innerHTML;this.element.innerHTML=this.options.savingText;this.element.addClassName(this.options.savingClassName);this.element.style.backgroundColor=this._originalBackground;this.element.show()},triggerCallback:function(D,C){if("function"==typeof this.options[D]){this.options[D](this,C)}},unregisterListeners:function(){$H(this._listeners).each(function(B){if(!this.options.externalControlOnly){this.element.stopObserving(B.key,B.value)}if(this.options.externalControl){this.options.externalControl.stopObserving(B.key,B.value)}}.bind(this))},wrapUp:function(B){this.leaveEditMode();this._boundComplete(B,this.element)}});Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy});Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function($super,F,D,E){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions;$super(F,D,E)},createEditField:function(){var B=document.createElement("select");B.name=this.options.paramName;B.size=1;this._controls.editor=B;this._collection=this.options.collection||[];if(this.options.loadCollectionURL){this.loadCollection()}else{this.checkForExternalText()}this._form.appendChild(this._controls.editor)},loadCollection:function(){this._form.addClassName(this.options.loadingClassName);this.showLoadingText(this.options.loadingCollectionText);var options=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();if(!/^\[.*\]$/.test(js)){throw ("Server returned an invalid collection representation.")}this._collection=eval(js);this.checkForExternalText()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadCollectionURL,options)},showLoadingText:function(D){this._controls.editor.disabled=true;var C=this._controls.editor.firstChild;if(!C){C=document.createElement("option");C.value="";this._controls.editor.appendChild(C);C.selected=true}C.update((D||"").stripScripts().stripTags())},checkForExternalText:function(){this._text=this.getText();if(this.options.loadTextURL){this.loadExternalText()}else{this.buildOptionList()}},loadExternalText:function(){this.showLoadingText(this.options.loadingText);var B=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(B,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(A){this._text=A.responseText.strip();this.buildOptionList()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadTextURL,B)},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName);this._collection=this._collection.map(function(A){return 2===A.length?A:[A,A].flatten()});var F=("value" in this.options)?this.options.value:this._text;var E=this._collection.any(function(A){return A[0]==F}.bind(this));this._controls.editor.update("");var D;this._collection.each(function(A,B){D=document.createElement("option");D.value=A[0];D.selected=E?A[0]==F:0==B;D.appendChild(document.createTextNode(A[1]));this._controls.editor.appendChild(D)}.bind(this));this._controls.editor.disabled=false;Field.scrollFreeActivate(this._controls.editor)}});Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(C){if(!C){return }function D(B,A){if(B in C||A===undefined){return }C[B]=A}D("cancelControl",(C.cancelLink?"link":(C.cancelButton?"button":C.cancelLink==C.cancelButton==false?false:undefined)));D("okControl",(C.okLink?"link":(C.okButton?"button":C.okLink==C.okButton==false?false:undefined)));D("highlightColor",C.highlightcolor);D("highlightEndColor",C.highlightendcolor)};Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:false,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:true,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:false,submitOnBlur:false,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(B){return Form.serialize(B)},onComplete:function(D,C){new Effect.Highlight(C,{startcolor:this.options.highlightColor,keepBackgroundImage:true})},onEnterEditMode:null,onEnterHover:function(B){B.element.style.backgroundColor=B.options.highlightColor;if(B._effect){B._effect.cancel()}},onFailure:function(D,C){alert("Error communication with the server: "+D.responseText.stripTags())},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(B){B._effect=new Effect.Highlight(B.element,{startcolor:B.options.highlightColor,endcolor:B.options.highlightEndColor,restorecolor:B._originalBackground,keepBackgroundImage:true})}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}});Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."};Form.Element.DelayedObserver=Class.create({initialize:function(F,D,E){this.delay=D||0.5;this.element=$(F);this.callback=E;this.timer=null;this.lastValue=$F(this.element);Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))},delayedListener:function(B){if(this.lastValue==$F(this.element)){return }if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);this.lastValue=$F(this.element)},onTimerEvent:function(){this.timer=null;this.callback(this.element,$F(this.element))}});if(Object.isUndefined(Effect)){throw ("dragdrop.js requires including script.aculo.us' effects.js library")}var Droppables={drops:[],remove:function(B){this.drops=this.drops.reject(function(A){return A.element==$(B)})},add:function(D){D=$(D);var F=Object.extend({greedy:true,hoverclass:null,tree:false},arguments[1]||{});if(F.containment){F._containers=[];var E=F.containment;if(Object.isArray(E)){E.each(function(A){F._containers.push($(A))})}else{F._containers.push($(E))}}if(F.accept){F.accept=[F.accept].flatten()}Element.makePositioned(D);F.element=D;this.drops.push(F)},findDeepestChild:function(B){deepest=B[0];for(i=1;i<B.length;++i){if(Element.isParent(B[i].element,deepest.element)){deepest=B[i]}}return deepest},isContained:function(F,D){var E;if(D.tree){E=F.treeNode}else{E=F.parentNode}return D._containers.detect(function(A){return E==A})},isAffected:function(D,E,F){return((F.element!=E)&&((!F._containers)||this.isContained(E,F))&&((!F.accept)||(Element.classNames(E).detect(function(A){return F.accept.include(A)})))&&Position.within(F.element,D[0],D[1]))},deactivate:function(B){if(B.hoverclass){Element.removeClassName(B.element,B.hoverclass)}this.last_active=null},activate:function(B){if(B.hoverclass){Element.addClassName(B.element,B.hoverclass)}this.last_active=B},show:function(E,G){if(!this.drops.length){return }var H,F=[];this.drops.each(function(A){if(Droppables.isAffected(E,G,A)){F.push(A)}});if(F.length>0){H=Droppables.findDeepestChild(F)}if(this.last_active&&this.last_active!=H){this.deactivate(this.last_active)}if(H){Position.within(H.element,E[0],E[1]);if(H.onHover){H.onHover(G,H.element,Position.overlap(H.overlap,H.element))}if(H!=this.last_active){Droppables.activate(H)}}},fire:function(D,C){if(!this.last_active){return }Position.prepare();if(this.isAffected([Event.pointerX(D),Event.pointerY(D)],C,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(C,this.last_active.element,D);return true}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(B){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,"mouseup",this.eventMouseUp);Event.observe(document,"mousemove",this.eventMouseMove);Event.observe(document,"keypress",this.eventKeypress)}this.drags.push(B)},unregister:function(B){this.drags=this.drags.reject(function(A){return A==B});if(this.drags.length==0){Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);Event.stopObserving(document,"keypress",this.eventKeypress)}},activate:function(B){if(B.options.delay){this._timeout=setTimeout(function(){Draggables._timeout=null;window.focus();Draggables.activeDraggable=B}.bind(this),B.options.delay)}else{window.focus();this.activeDraggable=B}},deactivate:function(){this.activeDraggable=null},updateDrag:function(C){if(!this.activeDraggable){return }var D=[Event.pointerX(C),Event.pointerY(C)];if(this._lastPointer&&(this._lastPointer.inspect()==D.inspect())){return }this._lastPointer=D;this.activeDraggable.updateDrag(C,D)},endDrag:function(B){if(this._timeout){clearTimeout(this._timeout);this._timeout=null}if(!this.activeDraggable){return }this._lastPointer=null;this.activeDraggable.endDrag(B);this.activeDraggable=null},keyPress:function(B){if(this.activeDraggable){this.activeDraggable.keyPress(B)}},addObserver:function(B){this.observers.push(B);this._cacheObserverCallbacks()},removeObserver:function(B){this.observers=this.observers.reject(function(A){return A.element==B});this._cacheObserverCallbacks()},notify:function(D,E,F){if(this[D+"Count"]>0){this.observers.each(function(A){if(A[D]){A[D](D,E,F)}})}if(E.options[D]){E.options[D](E,F)}},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(B){Draggables[B+"Count"]=Draggables.observers.select(function(A){return A[B]}).length})}};var Draggable=Class.create({initialize:function(D){var E={handle:false,reverteffect:function(H,A,B){var C=Math.sqrt(Math.abs(A^2)+Math.abs(B^2))*0.02;new Effect.Move(H,{x:-B,y:-A,duration:C,queue:{scope:"_draggable",position:"end"}})},endeffect:function(A){var B=Object.isNumber(A._opacity)?A._opacity:1;new Effect.Opacity(A,{duration:0.2,from:0.7,to:B,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[A]=false}})},zindex:1000,revert:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false,delay:0};if(!arguments[1]||Object.isUndefined(arguments[1].endeffect)){Object.extend(E,{starteffect:function(A){A._opacity=Element.getOpacity(A);Draggable._dragging[A]=true;new Effect.Opacity(A,{duration:0.2,from:A._opacity,to:0.7})}})}var F=Object.extend(E,arguments[1]||{});this.element=$(D);if(F.handle&&Object.isString(F.handle)){this.handle=this.element.down("."+F.handle,0)}if(!this.handle){this.handle=$(F.handle)}if(!this.handle){this.handle=this.element}if(F.scroll&&!F.scroll.scrollTo&&!F.scroll.outerHTML){F.scroll=$(F.scroll);this._isScrollChild=Element.childOf(this.element,F.scroll)}Element.makePositioned(this.element);this.options=F;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")])},initDrag:function(E){if(!Object.isUndefined(Draggable._dragging[this.element])&&Draggable._dragging[this.element]){return }if(Event.isLeftClick(E)){var G=Event.element(E);if((tag_name=G.tagName.toUpperCase())&&(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA")){return }var H=[Event.pointerX(E),Event.pointerY(E)];var F=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(A){return(H[A]-F[A])});Draggables.activate(this);Event.stop(E)}},startDrag:function(D){this.dragging=true;if(!this.delta){this.delta=this.currentDelta()}if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);this._originallyAbsolute=(this.element.getStyle("position")=="absolute");if(!this._originallyAbsolute){Position.absolutize(this.element)}this.element.parentNode.insertBefore(this._clone,this.element)}if(this.options.scroll){if(this.options.scroll==window){var C=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=C.left;this.originalScrollTop=C.top}else{this.originalScrollLeft=this.options.scroll.scrollLeft;this.originalScrollTop=this.options.scroll.scrollTop}}Draggables.notify("onStart",this,D);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(event,pointer){if(!this.dragging){this.startDrag(event)}if(!this.options.quiet){Position.prepare();Droppables.show(pointer,this.element)}Draggables.notify("onDrag",this,event);this.draw(pointer);if(this.options.change){this.options.change(this)}if(this.options.scroll){this.stopScrolling();var p;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){p=[left,top,left+width,top+height]}}else{p=Position.page(this.options.scroll);p[0]+=this.options.scroll.scrollLeft+Position.deltaX;p[1]+=this.options.scroll.scrollTop+Position.deltaY;p.push(p[0]+this.options.scroll.offsetWidth);p.push(p[1]+this.options.scroll.offsetHeight)}var speed=[0,0];if(pointer[0]<(p[0]+this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[0]+this.options.scrollSensitivity)}if(pointer[1]<(p[1]+this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[1]+this.options.scrollSensitivity)}if(pointer[0]>(p[2]-this.options.scrollSensitivity)){speed[0]=pointer[0]-(p[2]-this.options.scrollSensitivity)}if(pointer[1]>(p[3]-this.options.scrollSensitivity)){speed[1]=pointer[1]-(p[3]-this.options.scrollSensitivity)}this.startScrolling(speed)}if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(event)},finishDrag:function(L,I){this.dragging=false;if(this.options.quiet){Position.prepare();var J=[Event.pointerX(L),Event.pointerY(L)];Droppables.show(J,this.element)}if(this.options.ghosting){if(!this._originallyAbsolute){Position.relativize(this.element)}delete this._originallyAbsolute;Element.remove(this._clone);this._clone=null}var H=false;if(I){H=Droppables.fire(L,this.element);if(!H){H=false}}if(H&&this.options.onDropped){this.options.onDropped(this.element)}Draggables.notify("onEnd",this,L);var G=this.options.revert;if(G&&Object.isFunction(G)){G=G(this.element)}var K=this.currentDelta();if(G&&this.options.reverteffect){if(H==0||G!="failure"){this.options.reverteffect(this.element,K[1]-this.delta[1],K[0]-this.delta[0])}}else{this.delta=K}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(B){if(B.keyCode!=Event.KEY_ESC){return }this.finishDrag(B,false);Event.stop(B)},endDrag:function(B){if(!this.dragging){return }this.stopScrolling();this.finishDrag(B,true);Event.stop(B)},draw:function(G){var H=Position.cumulativeOffset(this.element);if(this.options.ghosting){var K=Position.realOffset(this.element);H[0]+=K[0]-Position.deltaX;H[1]+=K[1]-Position.deltaY}var I=this.currentDelta();H[0]-=I[0];H[1]-=I[1];if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){H[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft;H[1]-=this.options.scroll.scrollTop-this.originalScrollTop}var J=[0,1].map(function(A){return(G[A]-H[A]-this.offset[A])}.bind(this));if(this.options.snap){if(Object.isFunction(this.options.snap)){J=this.options.snap(J[0],J[1],this)}else{if(Object.isArray(this.options.snap)){J=J.map(function(B,A){return(B/this.options.snap[A]).round()*this.options.snap[A]}.bind(this))}else{J=J.map(function(A){return(A/this.options.snap).round()*this.options.snap}.bind(this))}}}var L=this.element.style;if((!this.options.constraint)||(this.options.constraint=="horizontal")){L.left=J[0]+"px"}if((!this.options.constraint)||(this.options.constraint=="vertical")){L.top=J[1]+"px"}if(L.visibility=="hidden"){L.visibility=""}},stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null;Draggables._lastScrollPointer=null}},startScrolling:function(B){if(!(B[0]||B[1])){return }this.scrollSpeed=[B[0]*this.options.scrollSpeed,B[1]*this.options.scrollSpeed];this.lastScrolled=new Date();this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var current=new Date();var delta=current-this.lastScrolled;this.lastScrolled=current;if(this.options.scroll==window){with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1]){var d=delta/1000;this.options.scroll.scrollTo(left+d*this.scrollSpeed[0],top+d*this.scrollSpeed[1])}}}else{this.options.scroll.scrollLeft+=this.scrollSpeed[0]*delta/1000;this.options.scroll.scrollTop+=this.scrollSpeed[1]*delta/1000}Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild){Draggables._lastScrollPointer=Draggables._lastScrollPointer||$A(Draggables._lastPointer);Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*delta/1000;Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*delta/1000;if(Draggables._lastScrollPointer[0]<0){Draggables._lastScrollPointer[0]=0}if(Draggables._lastScrollPointer[1]<0){Draggables._lastScrollPointer[1]=0}this.draw(Draggables._lastScrollPointer)}if(this.options.change){this.options.change(this)}},_getWindowScroll:function(w){var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft}else{if(w.document.body){T=body.scrollTop;L=body.scrollLeft}}if(w.innerWidth){W=w.innerWidth;H=w.innerHeight}else{if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight}else{W=body.offsetWidth;H=body.offsetHeight}}}return{top:T,left:L,width:W,height:H}}});Draggable._dragging={};var SortableObserver=Class.create({initialize:function(D,C){this.element=$(D);this.observer=C;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}});var Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(B){while(B.tagName.toUpperCase()!="BODY"){if(B.id&&Sortable.sortables[B.id]){return B}B=B.parentNode}},options:function(B){B=Sortable._findRootElement($(B));if(!B){return }return Sortable.sortables[B.id]},destroy:function(C){C=$(C);var D=Sortable.sortables[C.id];if(D){Draggables.removeObserver(D.element);D.droppables.each(function(A){Droppables.remove(A)});D.draggables.invoke("destroy");delete Sortable.sortables[D.element.id]}},create:function(F){F=$(F);var J=Object.extend({element:F,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:F,handle:false,only:false,delay:0,hoverclass:null,ghosting:false,quiet:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:false,handles:false,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(F);var I={revert:true,quiet:J.quiet,scroll:J.scroll,scrollSpeed:J.scrollSpeed,scrollSensitivity:J.scrollSensitivity,delay:J.delay,ghosting:J.ghosting,constraint:J.constraint,handle:J.handle};if(J.starteffect){I.starteffect=J.starteffect}if(J.reverteffect){I.reverteffect=J.reverteffect}else{if(J.ghosting){I.reverteffect=function(A){A.style.top=0;A.style.left=0}}}if(J.endeffect){I.endeffect=J.endeffect}if(J.zindex){I.zindex=J.zindex}var G={overlap:J.overlap,containment:J.containment,tree:J.tree,hoverclass:J.hoverclass,onHover:Sortable.onHover};var H={onHover:Sortable.onEmptyHover,overlap:J.overlap,containment:J.containment,hoverclass:J.hoverclass};Element.cleanWhitespace(F);J.draggables=[];J.droppables=[];if(J.dropOnEmpty||J.tree){Droppables.add(F,H);J.droppables.push(F)}(J.elements||this.findElements(F,J)||[]).each(function(A,B){var C=J.handles?$(J.handles[B]):(J.handle?$(A).select("."+J.handle)[0]:A);J.draggables.push(new Draggable(A,Object.extend(I,{handle:C})));Droppables.add(A,G);if(J.tree){A.treeNode=F}J.droppables.push(A)});if(J.tree){(Sortable.findTreeElements(F,J)||[]).each(function(A){Droppables.add(A,H);A.treeNode=F;J.droppables.push(A)})}this.sortables[F.id]=J;Draggables.addObserver(new SortableObserver(F,J.onUpdate))},findElements:function(C,D){return Element.findChildren(C,D.only,D.tree?true:false,D.tag)},findTreeElements:function(C,D){return Element.findChildren(C,D.only,D.tree?true:false,D.treeTag)},onHover:function(H,I,G){if(Element.isParent(I,H)){return }if(G>0.33&&G<0.66&&Sortable.options(I).tree){return }else{if(G>0.5){Sortable.mark(I,"before");if(I.previousSibling!=H){var J=H.parentNode;H.style.visibility="hidden";I.parentNode.insertBefore(H,I);if(I.parentNode!=J){Sortable.options(J).onChange(H)}Sortable.options(I.parentNode).onChange(H)}}else{Sortable.mark(I,"after");var F=I.nextSibling||null;if(F!=H){var J=H.parentNode;H.style.visibility="hidden";I.parentNode.insertBefore(H,F);if(I.parentNode!=J){Sortable.options(J).onChange(H)}Sortable.options(I.parentNode).onChange(H)}}}},onEmptyHover:function(J,P,O){var N=J.parentNode;var M=Sortable.options(P);if(!Element.isParent(P,J)){var Q;var L=Sortable.findElements(P,{tag:M.tag,only:M.only});var K=null;if(L){var R=Element.offsetSize(P,M.overlap)*(1-O);for(Q=0;Q<L.length;Q+=1){if(R-Element.offsetSize(L[Q],M.overlap)>=0){R-=Element.offsetSize(L[Q],M.overlap)}else{if(R-(Element.offsetSize(L[Q],M.overlap)/2)>=0){K=Q+1<L.length?L[Q+1]:null;break}else{K=L[Q];break}}}}P.insertBefore(J,K);Sortable.options(N).onChange(J);M.onChange(J)}},unmark:function(){if(Sortable._marker){Sortable._marker.hide()}},mark:function(G,E){var F=Sortable.options(G.parentNode);if(F&&!F.ghosting){return }if(!Sortable._marker){Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"});document.getElementsByTagName("body").item(0).appendChild(Sortable._marker)}var H=Position.cumulativeOffset(G);Sortable._marker.setStyle({left:H[0]+"px",top:H[1]+"px"});if(E=="after"){if(F.overlap=="horizontal"){Sortable._marker.setStyle({left:(H[0]+G.clientWidth)+"px"})}else{Sortable._marker.setStyle({top:(H[1]+G.clientHeight)+"px"})}}Sortable._marker.show()},_tree:function(M,J,H){var K=Sortable.findElements(M,J)||[];for(var L=0;L<K.length;++L){var N=K[L].id.match(J.format);if(!N){continue}var I={id:encodeURIComponent(N?N[1]:null),element:M,parent:H,children:[],position:H.children.length,container:$(K[L]).down(J.treeTag)};if(I.container){this._tree(I.container,J,I)}H.children.push(I)}return H},tree:function(G){G=$(G);var H=this.options(G);var F=Object.extend({tag:H.tag,treeTag:H.treeTag,only:H.only,name:G.id,format:H.format},arguments[1]||{});var E={id:null,parent:null,children:[],container:G,position:0};return Sortable._tree(G,F,E)},_constructIndex:function(D){var C="";do{if(D.id){C="["+D.position+"]"+C}}while((D=D.parent)!=null);return C},sequence:function(C){C=$(C);var D=Object.extend(this.options(C),arguments[1]||{});return $(this.findElements(C,D)||[]).map(function(A){return A.id.match(D.format)?A.id.match(D.format)[1]:""})},setSequence:function(H,E){H=$(H);var G=Object.extend(this.options(H),arguments[2]||{});var F={};this.findElements(H,G).each(function(A){if(A.id.match(G.format)){F[A.id.match(G.format)[1]]=[A,A.parentNode]}A.parentNode.removeChild(A)});E.each(function(B){var A=F[B];if(A){A[1].appendChild(A[0]);delete F[B]}})},serialize:function(F){F=$(F);var E=Object.extend(Sortable.options(F),arguments[1]||{});var D=encodeURIComponent((arguments[1]&&arguments[1].name)?arguments[1].name:F.id);if(E.tree){return Sortable.tree(F,arguments[1]).children.map(function(A){return[D+Sortable._constructIndex(A)+"[id]="+encodeURIComponent(A.id)].concat(A.children.map(arguments.callee))}).flatten().join("&")}else{return Sortable.sequence(F,arguments[1]).map(function(A){return D+"[]="+encodeURIComponent(A)}).join("&")}}};Element.isParent=function(D,C){if(!D.parentNode||D==C){return false}if(D.parentNode==C){return true}return Element.isParent(D.parentNode,C)};Element.findChildren=function(G,H,I,J){if(!G.hasChildNodes()){return null}J=J.toUpperCase();if(H){H=[H].flatten()}var F=[];$A(G.childNodes).each(function(A){if(A.tagName&&A.tagName.toUpperCase()==J&&(!H||(Element.classNames(A).detect(function(C){return H.include(C)})))){F.push(A)}if(I){var B=Element.findChildren(A,H,I,J);if(B){F.push(B)}}});return(F.length>0?F.flatten():[])};Element.offsetSize=function(C,D){return C["offset"+((D=="vertical"||D=="height")?"Height":"Width")]};if(!Control){var Control={}}Control.Slider=Class.create({initialize:function(E,G,F){var H=this;if(Object.isArray(E)){this.handles=E.collect(function(A){return $(A)})}else{this.handles=[$(E)]}this.track=$(G);this.options=F||{};this.axis=this.options.axis||"horizontal";this.increment=this.options.increment||1;this.step=parseInt(this.options.step||"1");this.range=this.options.range||$R(0,1);this.value=0;this.values=this.handles.map(function(){return 0});this.spans=this.options.spans?this.options.spans.map(function(A){return $(A)}):false;this.options.startSpan=$(this.options.startSpan||null);this.options.endSpan=$(this.options.endSpan||null);this.restricted=this.options.restricted||false;this.maximum=this.options.maximum||this.range.end;this.minimum=this.options.minimum||this.range.start;this.alignX=parseInt(this.options.alignX||"0");this.alignY=parseInt(this.options.alignY||"0");this.trackLength=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""));this.active=false;this.dragging=false;this.disabled=false;if(this.options.disabled){this.setDisabled()}this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):false;if(this.allowedValues){this.minimum=this.allowedValues.min();this.maximum=this.allowedValues.max()}this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.handles.each(function(A,B){B=H.handles.length-1-B;H.setValue(parseFloat((Object.isArray(H.options.sliderValue)?H.options.sliderValue[B]:H.options.sliderValue)||H.range.start),B);A.makePositioned().observe("mousedown",H.eventMouseDown)});this.track.observe("mousedown",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document.observe("mousemove",this.eventMouseMove);this.initialized=true},dispose:function(){var B=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown);Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);this.handles.each(function(A){Event.stopObserving(A,"mousedown",B.eventMouseDown)})},setDisabled:function(){this.disabled=true},setEnabled:function(){this.disabled=false},getNearestValue:function(D){if(this.allowedValues){if(D>=this.allowedValues.max()){return(this.allowedValues.max())}if(D<=this.allowedValues.min()){return(this.allowedValues.min())}var E=Math.abs(this.allowedValues[0]-D);var F=this.allowedValues[0];this.allowedValues.each(function(B){var A=Math.abs(B-D);if(A<=E){F=B;E=A}});return F}if(D>this.range.end){return this.range.end}if(D<this.range.start){return this.range.start}return D},setValue:function(D,C){if(!this.active){this.activeHandleIdx=C||0;this.activeHandle=this.handles[this.activeHandleIdx];this.updateStyles()}C=C||this.activeHandleIdx||0;if(this.initialized&&this.restricted){if((C>0)&&(D<this.values[C-1])){D=this.values[C-1]}if((C<(this.handles.length-1))&&(D>this.values[C+1])){D=this.values[C+1]}}D=this.getNearestValue(D);this.values[C]=D;this.value=this.values[0];this.handles[C].style[this.isVertical()?"top":"left"]=this.translateToPx(D);this.drawSpans();if(!this.dragging||!this.event){this.updateFinished()}},setValueBy:function(D,C){this.setValue(this.values[C||this.activeHandleIdx||0]+D,C||this.activeHandleIdx||0)},translateToPx:function(B){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(B-this.range.start))+"px"},translateToValue:function(B){return((B/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)},getRange:function(D){var C=this.values.sortBy(Prototype.K);D=D||0;return $R(C[D],C[D+1])},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX)},isVertical:function(){return(this.axis=="vertical")},drawSpans:function(){var B=this;if(this.spans){$R(0,this.spans.length-1).each(function(A){B.setSpan(B.spans[A],B.getRange(A))})}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))}},setSpan:function(D,C){if(this.isVertical()){D.style.top=this.translateToPx(C.start);D.style.height=this.translateToPx(C.end-C.start+this.range.start)}else{D.style.left=this.translateToPx(C.start);D.style.width=this.translateToPx(C.end-C.start+this.range.start)}},updateStyles:function(){this.handles.each(function(B){Element.removeClassName(B,"selected")});Element.addClassName(this.activeHandle,"selected")},startDrag:function(H){if(Event.isLeftClick(H)){if(!this.disabled){this.active=true;var F=Event.element(H);var G=[Event.pointerX(H),Event.pointerY(H)];var I=F;if(I==this.track){var J=Position.cumulativeOffset(this.track);this.event=H;this.setValue(this.translateToValue((this.isVertical()?G[1]-J[1]:G[0]-J[0])-(this.handleLength/2)));var J=Position.cumulativeOffset(this.activeHandle);this.offsetX=(G[0]-J[0]);this.offsetY=(G[1]-J[1])}else{while((this.handles.indexOf(F)==-1)&&F.parentNode){F=F.parentNode}if(this.handles.indexOf(F)!=-1){this.activeHandle=F;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateStyles();var J=Position.cumulativeOffset(this.activeHandle);this.offsetX=(G[0]-J[0]);this.offsetY=(G[1]-J[1])}}}Event.stop(H)}},update:function(B){if(this.active){if(!this.dragging){this.dragging=true}this.draw(B);if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(B)}},draw:function(F){var E=[Event.pointerX(F),Event.pointerY(F)];var D=Position.cumulativeOffset(this.track);E[0]-=this.offsetX+D[0];E[1]-=this.offsetY+D[1];this.event=F;this.setValue(this.translateToValue(this.isVertical()?E[1]:E[0]));if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)}},endDrag:function(B){if(this.active&&this.dragging){this.finishDrag(B,true);Event.stop(B)}this.active=false;this.dragging=false},finishDrag:function(C,D){this.active=false;this.dragging=false;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)}this.event=null}});Event.simulateMouse=function(H,E){var G=Object.extend({pointerX:0,pointerY:0,buttons:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},arguments[2]||{});var F=document.createEvent("MouseEvents");F.initMouseEvent(E,true,true,document.defaultView,G.buttons,G.pointerX,G.pointerY,G.pointerX,G.pointerY,G.ctrlKey,G.altKey,G.shiftKey,G.metaKey,0,$(H));if(this.mark){Element.remove(this.mark)}this.mark=document.createElement("div");this.mark.appendChild(document.createTextNode(" "));document.body.appendChild(this.mark);this.mark.style.position="absolute";this.mark.style.top=G.pointerY+"px";this.mark.style.left=G.pointerX+"px";this.mark.style.width="5px";this.mark.style.height="5px;";this.mark.style.borderTop="1px solid red;";this.mark.style.borderLeft="1px solid red;";if(this.step){alert("["+new Date().getTime().toString()+"] "+E+"/"+Test.Unit.inspect(G))}$(H).dispatchEvent(F)};Event.simulateKey=function(H,E){var G=Object.extend({ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,keyCode:0,charCode:0},arguments[2]||{});var F=document.createEvent("KeyEvents");F.initKeyEvent(E,true,true,window,G.ctrlKey,G.altKey,G.shiftKey,G.metaKey,G.keyCode,G.charCode);$(H).dispatchEvent(F)};Event.simulateKeys=function(D,E){for(var F=0;F<E.length;F++){Event.simulateKey(D,"keypress",{charCode:E.charCodeAt(F)})}};var Test={};Test.Unit={};Test.Unit.inspect=Object.inspect;Test.Unit.Logger=Class.create();Test.Unit.Logger.prototype={initialize:function(B){this.log=$(B);if(this.log){this._createLogTable()}},start:function(B){if(!this.log){return }this.testName=B;this.lastLogLine=document.createElement("tr");this.statusCell=document.createElement("td");this.nameCell=document.createElement("td");this.nameCell.className="nameCell";this.nameCell.appendChild(document.createTextNode(B));this.messageCell=document.createElement("td");this.lastLogLine.appendChild(this.statusCell);this.lastLogLine.appendChild(this.nameCell);this.lastLogLine.appendChild(this.messageCell);this.loglines.appendChild(this.lastLogLine)},finish:function(D,C){if(!this.log){return }this.lastLogLine.className=D;this.statusCell.innerHTML=D;this.messageCell.innerHTML=this._toHTML(C);this.addLinksToResults()},message:function(B){if(!this.log){return }this.messageCell.innerHTML=this._toHTML(B)},summary:function(B){if(!this.log){return }this.logsummary.innerHTML=this._toHTML(B)},_createLogTable:function(){this.log.innerHTML='<div id="logsummary"></div><table id="logtable"><thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead><tbody id="loglines"></tbody></table>';this.logsummary=$("logsummary");this.loglines=$("loglines")},_toHTML:function(B){return B.escapeHTML().replace(/\n/g,"<br/>")},addLinksToResults:function(){$$("tr.failed .nameCell").each(function(B){B.title="Run only this test";Event.observe(B,"click",function(){window.location.search="?tests="+B.innerHTML})});$$("tr.passed .nameCell").each(function(B){B.title="Run all tests";Event.observe(B,"click",function(){window.location.search=""})})}};Test.Unit.Runner=Class.create();Test.Unit.Runner.prototype={initialize:function(E){this.options=Object.extend({testLog:"testlog"},arguments[1]||{});this.options.resultsURL=this.parseResultsURLQueryParameter();this.options.tests=this.parseTestsQueryParameter();if(this.options.testLog){this.options.testLog=$(this.options.testLog)||null}if(this.options.tests){this.tests=[];for(var F=0;F<this.options.tests.length;F++){if(/^test/.test(this.options.tests[F])){this.tests.push(new Test.Unit.Testcase(this.options.tests[F],E[this.options.tests[F]],E.setup,E.teardown))}}}else{if(this.options.test){this.tests=[new Test.Unit.Testcase(this.options.test,E[this.options.test],E.setup,E.teardown)]}else{this.tests=[];for(var D in E){if(/^test/.test(D)){this.tests.push(new Test.Unit.Testcase(this.options.context?" -> "+this.options.titles[D]:D,E[D],E.setup,E.teardown))}}}}this.currentTest=0;this.logger=new Test.Unit.Logger(this.options.testLog);setTimeout(this.runTests.bind(this),1000)},parseResultsURLQueryParameter:function(){return window.location.search.parseQuery()["resultsURL"]},parseTestsQueryParameter:function(){if(window.location.search.parseQuery()["tests"]){return window.location.search.parseQuery()["tests"].split(",")}},getResult:function(){var D=false;for(var C=0;C<this.tests.length;C++){if(this.tests[C].errors>0){return"ERROR"}if(this.tests[C].failures>0){D=true}}if(D){return"FAILURE"}else{return"SUCCESS"}},postResults:function(){if(this.options.resultsURL){new Ajax.Request(this.options.resultsURL,{method:"get",parameters:"result="+this.getResult(),asynchronous:false})}},runTests:function(){var B=this.tests[this.currentTest];if(!B){this.postResults();this.logger.summary(this.summary());return }if(!B.isWaiting){this.logger.start(B.name)}B.run();if(B.isWaiting){this.logger.message("Waiting for "+B.timeToWait+"ms");setTimeout(this.runTests.bind(this),B.timeToWait||1000)}else{this.logger.finish(B.status(),B.summary());this.currentTest++;this.runTests()}},summary:function(){var H=0;var I=0;var G=0;var F=[];for(var J=0;J<this.tests.length;J++){H+=this.tests[J].assertions;I+=this.tests[J].failures;G+=this.tests[J].errors}return((this.options.context?this.options.context+": ":"")+this.tests.length+" tests, "+H+" assertions, "+I+" failures, "+G+" errors")}};Test.Unit.Assertions=Class.create();Test.Unit.Assertions.prototype={initialize:function(){this.assertions=0;this.failures=0;this.errors=0;this.messages=[]},summary:function(){return(this.assertions+" assertions, "+this.failures+" failures, "+this.errors+" errors\n"+this.messages.join("\n"))},pass:function(){this.assertions++},fail:function(B){this.failures++;this.messages.push("Failure: "+B)},info:function(B){this.messages.push("Info: "+B)},error:function(B){this.errors++;this.messages.push(B.name+": "+B.message+"("+Test.Unit.inspect(B)+")")},status:function(){if(this.failures>0){return"failed"}if(this.errors>0){return"error"}return"passed"},assert:function(E){var D=arguments[1]||'assert: got "'+Test.Unit.inspect(E)+'"';try{E?this.pass():this.fail(D)}catch(F){this.error(F)}},assertEqual:function(E,F){var H=arguments[2]||"assertEqual";try{(E==F)?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+Test.Unit.inspect(F)+'"')}catch(G){this.error(G)}},assertInspect:function(E,F){var H=arguments[2]||"assertInspect";try{(E==F.inspect())?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+Test.Unit.inspect(F)+'"')}catch(G){this.error(G)}},assertEnumEqual:function(E,F){var H=arguments[2]||"assertEnumEqual";try{$A(E).length==$A(F).length&&E.zip(F).all(function(A){return A[0]==A[1]})?this.pass():this.fail(H+": expected "+Test.Unit.inspect(E)+", actual "+Test.Unit.inspect(F))}catch(G){this.error(G)}},assertNotEqual:function(E,F){var H=arguments[2]||"assertNotEqual";try{(E!=F)?this.pass():this.fail(H+': got "'+Test.Unit.inspect(F)+'"')}catch(G){this.error(G)}},assertIdentical:function(E,F){var H=arguments[2]||"assertIdentical";try{(E===F)?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+Test.Unit.inspect(F)+'"')}catch(G){this.error(G)}},assertNotIdentical:function(E,F){var H=arguments[2]||"assertNotIdentical";try{!(E===F)?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+Test.Unit.inspect(F)+'"')}catch(G){this.error(G)}},assertNull:function(E){var D=arguments[1]||"assertNull";try{(E==null)?this.pass():this.fail(D+': got "'+Test.Unit.inspect(E)+'"')}catch(F){this.error(F)}},assertMatch:function(F,G){var I=arguments[2]||"assertMatch";var J=new RegExp(F);try{(J.exec(G))?this.pass():this.fail(I+' : regex: "'+Test.Unit.inspect(F)+" did not match: "+Test.Unit.inspect(G)+'"')}catch(H){this.error(H)}},assertHidden:function(C){var D=arguments[1]||"assertHidden";this.assertEqual("none",C.style.display,D)},assertNotNull:function(C){var D=arguments[1]||"assertNotNull";this.assert(C!=null,D)},assertType:function(E,F){var H=arguments[2]||"assertType";try{(F.constructor==E)?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+(F.constructor)+'"')}catch(G){this.error(G)}},assertNotOfType:function(E,F){var H=arguments[2]||"assertNotOfType";try{(F.constructor!=E)?this.pass():this.fail(H+': expected "'+Test.Unit.inspect(E)+'", actual "'+(F.constructor)+'"')}catch(G){this.error(G)}},assertInstanceOf:function(E,F){var H=arguments[2]||"assertInstanceOf";try{(F instanceof E)?this.pass():this.fail(H+": object was not an instance of the expected type")}catch(G){this.error(G)}},assertNotInstanceOf:function(E,F){var H=arguments[2]||"assertNotInstanceOf";try{!(F instanceof E)?this.pass():this.fail(H+": object was an instance of the not expected type")}catch(G){this.error(G)}},assertRespondsTo:function(F,G){var E=arguments[2]||"assertRespondsTo";try{(G[F]&&typeof G[F]=="function")?this.pass():this.fail(E+": object doesn't respond to ["+F+"]")}catch(H){this.error(H)}},assertReturnsTrue:function(G,H){var J=arguments[2]||"assertReturnsTrue";try{var F=H[G];if(!F){F=H["is"+G.charAt(0).toUpperCase()+G.slice(1)]}F()?this.pass():this.fail(J+": method returned false")}catch(I){this.error(I)}},assertReturnsFalse:function(G,H){var J=arguments[2]||"assertReturnsFalse";try{var F=H[G];if(!F){F=H["is"+G.charAt(0).toUpperCase()+G.slice(1)]}!F()?this.pass():this.fail(J+": method returned true")}catch(I){this.error(I)}},assertRaise:function(E,F){var H=arguments[2]||"assertRaise";try{F();this.fail(H+": exception expected but none was raised")}catch(G){((E==null)||(G.name==E))?this.pass():this.error(G)}},assertElementsMatch:function(){var D=$A(arguments),C=$A(D.shift());if(C.length!=D.length){this.fail("assertElementsMatch: size mismatch: "+C.length+" elements, "+D.length+" expressions");return false}C.zip(D).all(function(A,G){var H=$(A.first()),B=A.last();if(H.match(B)){return true}this.fail("assertElementsMatch: (in index "+G+") expected "+B.inspect()+" but got "+H.inspect())}.bind(this))&&this.pass()},assertElementMatches:function(C,D){this.assertElementsMatch([C],D)},benchmark:function(G,H){var F=new Date();(H||1).times(G);var E=((new Date())-F);this.info((arguments[2]||"Operation")+" finished "+H+" iterations in "+(E/1000)+"s");return E},_isVisible:function(B){B=$(B);if(!B.parentNode){return true}this.assertNotNull(B);if(B.style&&Element.getStyle(B,"display")=="none"){return false}return this._isVisible(B.parentNode)},assertNotVisible:function(B){this.assert(!this._isVisible(B),Test.Unit.inspect(B)+" was not hidden and didn't have a hidden parent either. "+(""||arguments[1]))},assertVisible:function(B){this.assert(this._isVisible(B),Test.Unit.inspect(B)+" was not visible. "+(""||arguments[1]))},benchmark:function(G,H){var F=new Date();(H||1).times(G);var E=((new Date())-F);this.info((arguments[2]||"Operation")+" finished "+H+" iterations in "+(E/1000)+"s");return E}};Test.Unit.Testcase=Class.create();Object.extend(Object.extend(Test.Unit.Testcase.prototype,Test.Unit.Assertions.prototype),{initialize:function(name,test,setup,teardown){Test.Unit.Assertions.prototype.initialize.bind(this)();this.name=name;if(typeof test=="string"){test=test.gsub(/(\.should[^\(]+\()/,"#{0}this,");test=test.gsub(/(\.should[^\(]+)\(this,\)/,"#{1}(this)");this.test=function(){eval("with(this){"+test+"}")}}else{this.test=test||function(){}}this.setup=setup||function(){};this.teardown=teardown||function(){};this.isWaiting=false;this.timeToWait=1000},wait:function(D,C){this.isWaiting=true;this.test=C;this.timeToWait=D},run:function(){try{try{if(!this.isWaiting){this.setup.bind(this)()}this.isWaiting=false;this.test.bind(this)()}finally{if(!this.isWaiting){this.teardown.bind(this)()}}}catch(B){this.error(B)}}});Test.setupBDDExtensionMethods=function(){var D={shouldEqual:"assertEqual",shouldNotEqual:"assertNotEqual",shouldEqualEnum:"assertEnumEqual",shouldBeA:"assertType",shouldNotBeA:"assertNotOfType",shouldBeAn:"assertType",shouldNotBeAn:"assertNotOfType",shouldBeNull:"assertNull",shouldNotBeNull:"assertNotNull",shouldBe:"assertReturnsTrue",shouldNotBe:"assertReturnsFalse",shouldRespondTo:"assertRespondsTo"};var C=function(F,B,A){this[F].apply(this,(B||[]).concat([A]))};Test.BDDMethods={};$H(D).each(function(A){Test.BDDMethods[A.key]=function(){var F=$A(arguments);var B=F.shift();C.apply(B,[A.value,F,this])}});[Array.prototype,String.prototype,Number.prototype,Boolean.prototype].each(function(A){Object.extend(A,Test.BDDMethods)})};Test.context=function(M,N,K){Test.setupBDDExtensionMethods();var L={};var I={};for(specName in N){switch(specName){case"setup":case"teardown":L[specName]=N[specName];break;default:var J="test"+specName.gsub(/\s+/,"-").camelize();var H=N[specName].toString().split("\n").slice(1);if(/^\{/.test(H[0])){H=H.slice(1)}H.pop();H=H.map(function(A){return A.strip()});L[J]=H.join("\n");I[J]=specName}}new Test.Unit.Runner(L,{titles:I,testLog:K||"testlog",context:M})};function getJSON(text){var json=eval('({"error":""})');if(text.substr(0,1)=="{"){try{var json=eval("("+text+")")}catch(error){}}return json}function displayError(A){jQuery("#errorContainer").fadeOut("normal",function(){jQuery(this).html(A).fadeIn()})}function submitForgotPass(){var A={mode:"forgotPassSubmit"};jQuery.post("index.php",jQuery.param(A)+"&"+jQuery("#forgotPassForm").serialize(),function(C){var B=getJSON(C);if(B&&B.error){displayError(B.error)}else{jQuery("#ajaxContent").fadeOut("normal",function(){jQuery(this).html(C).fadeIn()})}})}function doLogin(A){var B={mode:"login"};jQuery("#errorContainer").fadeOut();jQuery.post("index.php",jQuery.param(B)+"&"+jQuery("#loginForm").serialize(),function(D){var C=getJSON(D);if(C&&C.error){displayError(C.error)}else{jQuery("#ajaxContent").fadeOut("normal",function(){if(A){window.location="index.php"}else{window.history.go(0)}})}})}function doLogout(){var A={mode:"logout"};jQuery.post("index.php",A,function(){window.history.go(0)})}function reloadPage(){window.history.go(0)};function toggleChildren(B){var A={id:B,mode:"getChildren"};if(jQuery("#post_"+B+"_children").css("display")=="none"){jQuery.post("index.php",A,function(D){var C=getJSON(D);if(C&&C.error){alert(C.error)}else{jQuery("#post_"+B+"_children").html(D).slideDown();jQuery("#arrow_"+B).attr("src","images/arrowDown.png")}})}else{jQuery("#post_"+B+"_children").slideUp();jQuery("#arrow_"+B).attr("src","images/arrowLeft.png")}}function showPost(D,A,C){var B={id:D,mode:C,"class":A};jQuery.post("index.php",B,function(E){jQuery("#post_"+D+"_reply").html(E).slideDown()})}function showThreadForm(C,A){C=C==undefined?0:C;var B={id:C,mode:"getThreadForm",topicID:A};jQuery.post("index.php",B,function(D){if(C){jQuery("#threadFormContainer_"+C).html(D).slideDown()}else{jQuery("#threadFormContainer").html(D).fadeIn()}})}function showTopicForm(A){A=A==undefined?0:A;jQuery(".topicListItem").each(function(){jQuery(this).css("position","static")});jQuery.post("index.php",{id:A,mode:"getTopicForm"},function(B){if(A){jQuery("#topicFormContainer_"+A).html(B).slideDown()}else{jQuery("#topicFormContainer").html(B).fadeIn()}})}function showDeleteTopic(B){var A={id:B,mode:"getDeleteTopicForm"};jQuery(".topicListItem").each(function(){jQuery(this).css("position","static")});jQuery.post("index.php",A,function(C){jQuery("#topic_"+B+"_delete").html(C).slideDown()})}function submitDeleteThread(B){var A={id:B,mode:"deleteThread"};jQuery.post("index.php",A,function(D){var C=getJSON(D);if(C&&C.error){alert(C.error)}else{jQuery("#post_"+B).slideUp("normal",function(){jQuery("#thread_"+B+"_delete").fadeOut("normal",function(){reloadPage()})})}})}function submitDeleteTopic(B){var A={id:B,mode:"deleteTopic"};jQuery.post("index.php",A,function(D){var C=getJSON(D);if(C&&C.error){alert(C.error)}else{jQuery("#topic_"+B).slideUp("normal",function(){jQuery("topic_"+B+"_delete").fadeOut("normal",function(){reloadPage()})})}})}function showDeleteThread(B){var A={id:B,mode:"getDeleteThreadForm"};jQuery.post("index.php",A,function(C){jQuery("#thread_"+B+"_delete").html(C).slideDown()})}function showDeletePost(B){var A={id:B,mode:"getDeletePostForm"};jQuery.post("index.php",A,function(C){jQuery("#post_"+B+"_delete").html(C).slideDown()})}function hideDeleteThread(A){jQuery("#thread_"+A+"_delete").slideUp("normal",function(){jQuery(this).html("")})}function hideDeleteTopic(A){jQuery("#topic_"+A+"_delete").slideUp("normal",function(){jQuery(this).html("");jQuery(".topicListItem").each(function(){jQuery(this).css("position","relative")})})}function hideDeletePost(A){jQuery("#post_"+A+"_delete").slideUp("normal",function(){jQuery(this).html("")})}function hidePostForm(A){jQuery("#post_"+A+"_reply").slideUp("normal",function(){jQuery(this).html("")})}function hideThreadForm(A){if(A){jQuery("#threadFormContainer_"+A).slideUp("normal",function(){jQuery(this).html("")})}else{jQuery("#threadFormContainer").fadeOut("normal",function(){jQuery(this).html("")})}}function hideTopicForm(A){if(A){jQuery("#topicFormContainer_"+A).slideUp("normal",function(){jQuery(".topicListItem").each(function(){jQuery(this).css("position","relative")})})}else{jQuery("#topicFormContainer").fadeOut("normal",function(){jQuery(".topicListItem").each(function(){jQuery(this).css("position","relative")})})}}function saveThread(){var A={mode:"saveThread",title:jQuery("#title").val(),body:jQuery("#body").val(),accessLevel:jQuery("#accessLevel").val(),isLocked:jQuery("#isLocked").val(),isSticky:jQuery("#isSticky").val(),id:jQuery("#id").val(),topicID:jQuery("#topicID").val()};jQuery.post("index.php",A,function(C){var B=getJSON(C);if(B&&B.error){jQuery("#threadError").html(B.error).fadeIn()}else{if(C){jQuery("#threadError").html(C).fadeIn()}else{jQuery("#threadFormContainer").fadeOut("normal",function(){reloadPage()})}}})}function saveTopic(){var A={mode:"saveTopic",name:jQuery("#name").val(),description:jQuery("#description").val(),accessLevel:jQuery("#accessLevel").val(),isLocked:jQuery("#isLocked").val(),id:jQuery("#id").val()};jQuery.post("index.php",A,function(C){var B=getJSON(C);if(B&&B.error){jQuery("#topicError").html(B.error).fadeIn()}else{if(C){jQuery("#topicError").html(C).fadeIn()}else{jQuery("#topicFormContainer").fadeOut("normal",function(){reloadPage()})}}})}function savePost(B){var A={id:B,mode:"savePost",reply:jQuery("#reply_"+B).val(),title:jQuery("#title_"+B).val(),"class":jQuery("#class").val(),action:jQuery("#action").val()};jQuery.post("index.php",A,function(D){var C=getJSON(D);if(C&&C.error){jQuery("#replyError_"+B).html(C.error).fadeIn()}else{jQuery("#post_"+B+"_reply").fadeOut("normal",function(){reloadPage()})}})}function toggleSticky(D){var B=jQuery("#sticky_"+D);if(B.attr("src")=="images/sticky.png"){B.attr("src","images/unsticky.png");var A="0"}else{B.attr("src","images/sticky.png");var A="1"}var C={id:D,mode:"setSticky",value:A};jQuery.post("index.php",C,function(F){var E=getJSON(F);if(E&&E.error){displayError(E.error)}else{reloadPage()}})}function toggleThreadLocked(D){var B=jQuery("#locked_"+D);var A="0";if(B.attr("src")=="images/locked.png"){B.attr("src","images/unlocked.png")}else{B.attr("src","images/locked.png");A="1"}var C={id:D,mode:"setThreadLocked",value:A};jQuery.post("index.php",C,function(F){var E=getJSON(F);if(E&&E.error){displayError(error)}})}function toggleTopicLocked(D){var B=jQuery("#locked_"+D);var A="0";if(B.attr("src")=="images/locked.png"){B.attr("src","images/unlocked.png")}else{B.attr("src","images/locked.png");A="1"}var C={id:D,mode:"setTopicLocked",value:A};jQuery.post("index.php",C,function(F){var E=getJSON(F);if(E&&E.error){displayError(E.error)}})}function toggleWatched(D){var B=jQuery("#watched_"+D);var A="0";if(B.attr("src")=="images/watched.png"){B.attr("src","images/unwatched.png")}else{B.attr("src","images/watched.png");A="1"}var C={id:D,mode:"setWatched",value:A};jQuery.post("index.php",C,function(F){var E=getJSON(F);if(E&&E.error){displayError(E.error)}})}function validateForm(B){var A=getJSON(B.responseText);if(A.error){displayError(A.error);return false}else{return true}}function submitForm(){var A=false;var B={mode:"validateForm"};jQuery.ajaxSetup({async:false});var C=jQuery.post("index.php",jQuery.param(B)+"&"+jQuery("#form").serialize(),function(E){var D=getJSON(E);if(D&&D.error){displayError(D.error)}else{A=true}});jQuery.ajaxSetup({async:true});return A}function setupTopicOrder(){if(jQuery("#topicList").get(0)!=undefined){jQuery("#topicList").sortable({containment:"window",axis:"y",handle:".handle",items:".topicListItem",opacity:0.6,update:function(A,B){var D={mode:"saveTopicOrder"};var C=jQuery(this).sortable("serialize",{key:"topicList[]"});jQuery.post("index.php",jQuery.param(D)+"&"+C,function(F){var E=getJSON(F);if(E&&E.error){displayError(E.error)}else{reloadPage()}})}})}};(function(Br,AR){function Bf(){if(!Z.isReady){try{AQ.documentElement.doScroll("left")}catch(B){setTimeout(Bf,1);return }Z.ready()}}function AT(C,B){B.src?Z.ajax({url:B.src,async:false,dataType:"script"}):Z.globalEval(B.text||B.textContent||B.innerHTML||"");B.parentNode&&B.parentNode.removeChild(B)}function P(I,C,M,D,B,H){var E=I.length;if(typeof C==="object"){for(var S in C){P(I,S,C[S],D,B,M)}return I}if(M!==AR){D=!H&&D&&Z.isFunction(M);for(S=0;S<E;S++){B(I[S],C,D?M.call(I[S],S,B(I[S],C)):M,H)}return I}return E?B(I[0],C):AR}function B3(){return(new Date).getTime()}function Q(){return false}function T(){return true}function Bv(D,B,C){C[0].type=D;return Z.event.handle.apply(B,C)}function c(D){var E,H=[],M=[],I=arguments,U,S,d,a,b,B;S=Z.data(this,"events");if(!(D.liveFired===this||!S||!S.live||D.button&&D.type==="click")){D.liveFired=this;var C=S.live.slice(0);for(a=0;a<C.length;a++){S=C[a];S.origType.replace(CE,"")===D.type?M.push(S.selector):C.splice(a--,1)}U=Z(D.target).closest(M,D.currentTarget);b=0;for(B=U.length;b<B;b++){for(a=0;a<C.length;a++){S=C[a];if(U[b].selector===S.selector){d=U[b].elem;M=null;if(S.preType==="mouseenter"||S.preType==="mouseleave"){M=Z(D.relatedTarget).closest(S.selector)[0]}if(!M||M!==d){H.push({elem:d,handleObj:S})}}}}b=0;for(B=H.length;b<B;b++){U=H[b];D.currentTarget=U.elem;D.data=U.handleObj.data;D.handleObj=U.handleObj;if(U.handleObj.origHandler.apply(U.elem,I)===false){E=false;break}}return E}}function BI(C,B){return"live."+(C&&C!=="*"?C+".":"")+B.replace(/\./g,"`").replace(/ /g,"&")}function BU(B){return !B||!B.parentNode||B.parentNode.nodeType===11}function B0(D,B){var C=0;B.each(function(){if(this.nodeName===(D[C]&&D[C].nodeName)){var E=Z.data(D[C++]),M=Z.data(this,E);if(E=E&&E.events){delete M.handle;M.events={};for(var I in E){for(var H in E[I]){Z.event.add(this,I,E[I][H],E[I][H].data)}}}}})}function AL(I,C,B){var E,D,H;C=C&&C[0]?C[0].ownerDocument||C[0]:AQ;if(I.length===1&&typeof I[0]==="string"&&I[0].length<512&&C===AQ&&!Bq.test(I[0])&&(Z.support.checkClone||!W.test(I[0]))){D=true;if(H=Z.fragments[I[0]]){if(H!==1){E=H}}}if(!E){E=C.createDocumentFragment();Z.clean(I,C,E,B)}if(D){Z.fragments[I[0]]=H?E:1}return{fragment:E,cacheable:D}}function CB(D,B){var C={};Z.each(AU.concat.apply([],AU.slice(0,B)),function(){C[this]=D});return C}function BR(B){return"scrollTo" in B&&B.document?B:B.nodeType===9?B.defaultView||B.parentWindow:false}var Z=function(C,B){return new Z.fn.init(C,B)},BQ=Br.jQuery,Bc=Br.$,AQ=Br.document,L,AH=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Bm=/^.[^:#\[\.,]*$/,R=/\S/,AS=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,BP=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,A=navigator.userAgent,Bd=false,G=[],CC,AN=Object.prototype.toString,Bk=Object.prototype.hasOwnProperty,CF=Array.prototype.push,K=Array.prototype.slice,AI=Array.prototype.indexOf;Z.fn=Z.prototype={init:function(E,B){var C,D;if(!E){return this}if(E.nodeType){this.context=this[0]=E;this.length=1;return this}if(E==="body"&&!B){this.context=AQ;this[0]=AQ.body;this.selector="body";this.length=1;return this}if(typeof E==="string"){if((C=AH.exec(E))&&(C[1]||!B)){if(C[1]){D=B?B.ownerDocument||B:AQ;if(E=BP.exec(E)){if(Z.isPlainObject(B)){E=[AQ.createElement(E[1])];Z.fn.attr.call(E,B,true)}else{E=[D.createElement(E[1])]}}else{E=AL([C[1]],[D]);E=(E.cacheable?E.fragment.cloneNode(true):E.fragment).childNodes}return Z.merge(this,E)}else{if(B=AQ.getElementById(C[2])){if(B.id!==C[2]){return L.find(E)}this.length=1;this[0]=B}this.context=AQ;this.selector=E;return this}}else{if(!B&&/^\w+$/.test(E)){this.selector=E;this.context=AQ;E=AQ.getElementsByTagName(E);return Z.merge(this,E)}else{return !B||B.jquery?(B||L).find(E):Z(B).find(E)}}}else{if(Z.isFunction(E)){return L.ready(E)}}if(E.selector!==AR){this.selector=E.selector;this.context=E.context}return Z.makeArray(E,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return K.call(this,0)},get:function(B){return B==null?this.toArray():B<0?this.slice(B)[0]:this[B]},pushStack:function(E,B,C){var D=Z();Z.isArray(E)?CF.apply(D,E):Z.merge(D,E);D.prevObject=this;D.context=this.context;if(B==="find"){D.selector=this.selector+(this.selector?" ":"")+C}else{if(B){D.selector=this.selector+"."+B+"("+C+")"}}return D},each:function(C,B){return Z.each(this,C,B)},ready:function(B){Z.bindReady();if(Z.isReady){B.call(AQ,Z)}else{G&&G.push(B)}return this},eq:function(B){return B===-1?this.slice(B):this.slice(B,+B+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(K.apply(this,arguments),"slice",K.call(arguments).join(","))},map:function(B){return this.pushStack(Z.map(this,function(D,C){return B.call(D,C,D)}))},end:function(){return this.prevObject||Z(null)},push:CF,sort:[].sort,splice:[].splice};Z.fn.init.prototype=Z.fn;Z.extend=Z.fn.extend=function(){var I=arguments[0]||{},C=1,M=arguments.length,D=false,B,H,E,S;if(typeof I==="boolean"){D=I;I=arguments[1]||{};C=2}if(typeof I!=="object"&&!Z.isFunction(I)){I={}}if(M===C){I=this;--C}for(;C<M;C++){if((B=arguments[C])!=null){for(H in B){E=I[H];S=B[H];if(I!==S){if(D&&S&&(Z.isPlainObject(S)||Z.isArray(S))){E=E&&(Z.isPlainObject(E)||Z.isArray(E))?E:Z.isArray(S)?[]:{};I[H]=Z.extend(D,E,S)}else{if(S!==AR){I[H]=S}}}}}}return I};Z.extend({noConflict:function(B){Br.$=Bc;if(B){Br.jQuery=BQ}return Z},isReady:false,ready:function(){if(!Z.isReady){if(!AQ.body){return setTimeout(Z.ready,13)}Z.isReady=true;if(G){for(var C,B=0;C=G[B++];){C.call(AQ,Z)}G=null}Z.fn.triggerHandler&&Z(AQ).triggerHandler("ready")}},bindReady:function(){if(!Bd){Bd=true;if(AQ.readyState==="complete"){return Z.ready()}if(AQ.addEventListener){AQ.addEventListener("DOMContentLoaded",CC,false);Br.addEventListener("load",Z.ready,false)}else{if(AQ.attachEvent){AQ.attachEvent("onreadystatechange",CC);Br.attachEvent("onload",Z.ready);var C=false;try{C=Br.frameElement==null}catch(B){}AQ.documentElement.doScroll&&C&&Bf()}}}},isFunction:function(B){return AN.call(B)==="[object Function]"},isArray:function(B){return AN.call(B)==="[object Array]"},isPlainObject:function(C){if(!C||AN.call(C)!=="[object Object]"||C.nodeType||C.setInterval){return false}if(C.constructor&&!Bk.call(C,"constructor")&&!Bk.call(C.constructor.prototype,"isPrototypeOf")){return false}var B;for(B in C){}return B===AR||Bk.call(C,B)},isEmptyObject:function(C){for(var B in C){return false}return true},error:function(B){throw B},parseJSON:function(B){if(typeof B!=="string"||!B){return null}B=Z.trim(B);if(/^[\],:{}\s]*$/.test(B.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return Br.JSON&&Br.JSON.parse?Br.JSON.parse(B):(new Function("return "+B))()}else{Z.error("Invalid JSON: "+B)}},noop:function(){},globalEval:function(D){if(D&&R.test(D)){var B=AQ.getElementsByTagName("head")[0]||AQ.documentElement,C=AQ.createElement("script");C.type="text/javascript";if(Z.support.scriptEval){C.appendChild(AQ.createTextNode(D))}else{C.text=D}B.insertBefore(C,B.firstChild);B.removeChild(C)}},nodeName:function(C,B){return C.nodeName&&C.nodeName.toUpperCase()===B.toUpperCase()},each:function(I,C,M){var D,B=0,H=I.length,E=H===AR||Z.isFunction(I);if(M){if(E){for(D in I){if(C.apply(I[D],M)===false){break}}}else{for(;B<H;){if(C.apply(I[B++],M)===false){break}}}}else{if(E){for(D in I){if(C.call(I[D],D,I[D])===false){break}}}else{for(M=I[0];B<H&&C.call(M,B,M)!==false;M=I[++B]){}}}return I},trim:function(B){return(B||"").replace(AS,"")},makeArray:function(C,B){B=B||[];if(C!=null){C.length==null||typeof C==="string"||Z.isFunction(C)||typeof C!=="function"&&C.setInterval?CF.call(B,C):Z.merge(B,C)}return B},inArray:function(E,B){if(B.indexOf){return B.indexOf(E)}for(var C=0,D=B.length;C<D;C++){if(B[C]===E){return C}}return -1},merge:function(H,B){var C=H.length,E=0;if(typeof B.length==="number"){for(var D=B.length;E<D;E++){H[C++]=B[E]}}else{for(;B[E]!==AR;){H[C++]=B[E++]}}H.length=C;return H},grep:function(I,C,B){for(var E=[],D=0,H=I.length;D<H;D++){!B!==!C(I[D],D)&&E.push(I[D])}return E},map:function(I,C,M){for(var D=[],B,H=0,E=I.length;H<E;H++){B=C(I[H],H,M);if(B!=null){D[D.length]=B}}return D.concat.apply([],D)},guid:1,proxy:function(D,B,C){if(arguments.length===2){if(typeof B==="string"){C=D;D=C[B];B=AR}else{if(B&&!Z.isFunction(B)){C=B;B=AR}}}if(!B&&D){B=function(){return D.apply(C||this,arguments)}}if(D){B.guid=D.guid=D.guid||B.guid||Z.guid++}return B},uaMatch:function(B){B=B.toLowerCase();B=/(webkit)[ \/]([\w.]+)/.exec(B)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(B)||/(msie) ([\w.]+)/.exec(B)||!/compatible/.test(B)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(B)||[];return{browser:B[1]||"",version:B[2]||"0"}},browser:{}});A=Z.uaMatch(A);if(A.browser){Z.browser[A.browser]=true;Z.browser.version=A.version}if(Z.browser.webkit){Z.browser.safari=true}if(AI){Z.inArray=function(C,B){return AI.call(B,C)}}L=Z(AQ);if(AQ.addEventListener){CC=function(){AQ.removeEventListener("DOMContentLoaded",CC,false);Z.ready()}}else{if(AQ.attachEvent){CC=function(){if(AQ.readyState==="complete"){AQ.detachEvent("onreadystatechange",CC);Z.ready()}}}}(function(){Z.support={};var C=AQ.documentElement,D=AQ.createElement("script"),E=AQ.createElement("div"),I="script"+B3();E.style.display="none";E.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var H=E.getElementsByTagName("*"),S=E.getElementsByTagName("a")[0];if(!(!H||!H.length||!S)){Z.support={leadingWhitespace:E.firstChild.nodeType===3,tbody:!E.getElementsByTagName("tbody").length,htmlSerialize:!!E.getElementsByTagName("link").length,style:/red/.test(S.getAttribute("style")),hrefNormalized:S.getAttribute("href")==="/a",opacity:/^0.55$/.test(S.style.opacity),cssFloat:!!S.style.cssFloat,checkOn:E.getElementsByTagName("input")[0].value==="on",optSelected:AQ.createElement("select").appendChild(AQ.createElement("option")).selected,parentNode:E.removeChild(E.appendChild(AQ.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};D.type="text/javascript";try{D.appendChild(AQ.createTextNode("window."+I+"=1;"))}catch(M){}C.insertBefore(D,C.firstChild);if(Br[I]){Z.support.scriptEval=true;delete Br[I]}try{delete D.test}catch(B){Z.support.deleteExpando=false}C.removeChild(D);if(E.attachEvent&&E.fireEvent){E.attachEvent("onclick",function U(){Z.support.noCloneEvent=false;E.detachEvent("onclick",U)});E.cloneNode(true).fireEvent("onclick")}E=AQ.createElement("div");E.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";C=AQ.createDocumentFragment();C.appendChild(E.firstChild);Z.support.checkClone=C.cloneNode(true).cloneNode(true).lastChild.checked;Z(function(){var a=AQ.createElement("div");a.style.width=a.style.paddingLeft="1px";AQ.body.appendChild(a);Z.boxModel=Z.support.boxModel=a.offsetWidth===2;AQ.body.removeChild(a).style.display="none"});C=function(d){var a=AQ.createElement("div");d="on"+d;var b=d in a;if(!b){a.setAttribute(d,"return;");b=typeof a[d]==="function"}return b};Z.support.submitBubbles=C("submit");Z.support.changeBubbles=C("change");C=D=E=H=S=null}})();Z.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var By="jQuery"+B3(),Bb=0,Bn={};Z.extend({cache:{},expando:By,noData:{embed:true,object:true,applet:true},data:function(H,B,C){if(!(H.nodeName&&Z.noData[H.nodeName.toLowerCase()])){H=H==Br?Bn:H;var E=H[By],D=Z.cache;if(!E&&typeof B==="string"&&C===AR){return null}E||(E=++Bb);if(typeof B==="object"){H[By]=E;D[E]=Z.extend(true,{},B)}else{if(!D[E]){H[By]=E;D[E]={}}}H=D[E];if(C!==AR){H[B]=C}return typeof B==="string"?H[B]:H}},removeData:function(H,B){if(!(H.nodeName&&Z.noData[H.nodeName.toLowerCase()])){H=H==Br?Bn:H;var C=H[By],E=Z.cache,D=E[C];if(B){if(D){delete D[B];Z.isEmptyObject(D)&&Z.removeData(H)}}else{if(Z.support.deleteExpando){delete H[Z.expando]}else{H.removeAttribute&&H.removeAttribute(Z.expando)}delete E[C]}}}});Z.fn.extend({data:function(E,B){if(typeof E==="undefined"&&this.length){return Z.data(this[0])}else{if(typeof E==="object"){return this.each(function(){Z.data(this,E)})}}var C=E.split(".");C[1]=C[1]?"."+C[1]:"";if(B===AR){var D=this.triggerHandler("getData"+C[1]+"!",[C[0]]);if(D===AR&&this.length){D=Z.data(this[0],E)}return D===AR&&C[1]?this.data(C[0]):D}else{return this.trigger("setData"+C[1]+"!",[C[0],B]).each(function(){Z.data(this,E,B)})}},removeData:function(B){return this.each(function(){Z.removeData(this,B)})}});Z.extend({queue:function(E,B,C){if(E){B=(B||"fx")+"queue";var D=Z.data(E,B);if(!C){return D||[]}if(!D||Z.isArray(C)){D=Z.data(E,B,Z.makeArray(C))}else{D.push(C)}return D}},dequeue:function(E,B){B=B||"fx";var C=Z.queue(E,B),D=C.shift();if(D==="inprogress"){D=C.shift()}if(D){B==="fx"&&C.unshift("inprogress");D.call(E,function(){Z.dequeue(E,B)})}}});Z.fn.extend({queue:function(C,B){if(typeof C!=="string"){B=C;C="fx"}if(B===AR){return Z.queue(this[0],C)}return this.each(function(){var D=Z.queue(this,C,B);C==="fx"&&D[0]!=="inprogress"&&Z.dequeue(this,C)})},dequeue:function(B){return this.each(function(){Z.dequeue(this,B)})},delay:function(C,B){C=Z.fx?Z.fx.speeds[C]||C:C;B=B||"fx";return this.queue(B,function(){var D=this;setTimeout(function(){Z.dequeue(D,B)},C)})},clearQueue:function(B){return this.queue(B||"fx",[])}});var B9=/[\n\t]/g,AO=/\s+/,AG=/\r/g,Bt=/href|src|style/,Bl=/(button|input)/i,F=/(button|input|object|select|textarea)/i,AP=/^(a|area)$/i,Bh=/radio|checkbox/;Z.fn.extend({attr:function(C,B){return P(this,C,B,true,Z.attr)},removeAttr:function(B){return this.each(function(){Z.attr(this,B,"");this.nodeType===1&&this.removeAttribute(B)})},addClass:function(C){if(Z.isFunction(C)){return this.each(function(a){var b=Z(this);b.addClass(C.call(this,a,b.attr("class")))})}if(C&&typeof C==="string"){for(var D=(C||"").split(AO),E=0,I=this.length;E<I;E++){var H=this[E];if(H.nodeType===1){if(H.className){for(var S=" "+H.className+" ",M=H.className,B=0,U=D.length;B<U;B++){if(S.indexOf(" "+D[B]+" ")<0){M+=" "+D[B]}}H.className=Z.trim(M)}else{H.className=C}}}}return this},removeClass:function(I){if(Z.isFunction(I)){return this.each(function(a){var U=Z(this);U.removeClass(I.call(this,a,U.attr("class")))})}if(I&&typeof I==="string"||I===AR){for(var C=(I||"").split(AO),M=0,D=this.length;M<D;M++){var B=this[M];if(B.nodeType===1&&B.className){if(I){for(var H=(" "+B.className+" ").replace(B9," "),E=0,S=C.length;E<S;E++){H=H.replace(" "+C[E]+" "," ")}B.className=Z.trim(H)}else{B.className=""}}}}return this},toggleClass:function(E,B){var C=typeof E,D=typeof B==="boolean";if(Z.isFunction(E)){return this.each(function(H){var I=Z(this);I.toggleClass(E.call(this,H,I.attr("class"),B),B)})}return this.each(function(){if(C==="string"){for(var S,H=0,U=Z(this),M=B,I=E.split(AO);S=I[H++];){M=D?M:!U.hasClass(S);U[M?"addClass":"removeClass"](S)}}else{if(C==="undefined"||C==="boolean"){this.className&&Z.data(this,"__className__",this.className);this.className=this.className||E===false?"":Z.data(this,"__className__")||""}}})},hasClass:function(D){D=" "+D+" ";for(var B=0,C=this.length;B<C;B++){if((" "+this[B].className+" ").replace(B9," ").indexOf(D)>-1){return true}}return false},val:function(I){if(I===AR){var C=this[0];if(C){if(Z.nodeName(C,"option")){return(C.attributes.value||{}).specified?C.value:C.text}if(Z.nodeName(C,"select")){var M=C.selectedIndex,D=[],B=C.options;C=C.type==="select-one";if(M<0){return null}var H=C?M:0;for(M=C?M+1:B.length;H<M;H++){var E=B[H];if(E.selected){I=Z(E).val();if(C){return I}D.push(I)}}return D}if(Bh.test(C.type)&&!Z.support.checkOn){return C.getAttribute("value")===null?"on":C.value}return(C.value||"").replace(AG,"")}return AR}var S=Z.isFunction(I);return this.each(function(d){var U=Z(this),a=I;if(this.nodeType===1){if(S){a=I.call(this,d,U.val())}if(typeof a==="number"){a+=""}if(Z.isArray(a)&&Bh.test(this.type)){this.checked=Z.inArray(U.val(),a)>=0}else{if(Z.nodeName(this,"select")){var b=Z.makeArray(a);Z("option",this).each(function(){this.selected=Z.inArray(Z(this).val(),b)>=0});if(!b.length){this.selectedIndex=-1}}else{this.value=a}}}})}});Z.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(I,C,B,E){if(!I||I.nodeType===3||I.nodeType===8){return AR}if(E&&C in Z.attrFn){return Z(I)[C](B)}E=I.nodeType!==1||!Z.isXMLDoc(I);var D=B!==AR;C=E&&Z.props[C]||C;if(I.nodeType===1){var H=Bt.test(C);if(C in I&&E&&!H){if(D){C==="type"&&Bl.test(I.nodeName)&&I.parentNode&&Z.error("type property can't be changed");I[C]=B}if(Z.nodeName(I,"form")&&I.getAttributeNode(C)){return I.getAttributeNode(C).nodeValue}if(C==="tabIndex"){return(C=I.getAttributeNode("tabIndex"))&&C.specified?C.value:F.test(I.nodeName)||AP.test(I.nodeName)&&I.href?0:AR}return I[C]}if(!Z.support.style&&E&&C==="style"){if(D){I.style.cssText=""+B}return I.style.cssText}D&&I.setAttribute(C,""+B);I=!Z.support.hrefNormalized&&E&&H?I.getAttribute(C,2):I.getAttribute(C);return I===null?AR:I}return Z.style(I,C,B)}});var CE=/\.(.*)$/,BO=function(B){return B.replace(/[^\w\s\.\|`]/g,function(C){return"\\"+C})};Z.event={add:function(D,E,I,S){if(!(D.nodeType===3||D.nodeType===8)){if(D.setInterval&&D!==Br&&!D.frameElement){D=Br}var M,a;if(I.handler){M=I;I=M.handler}if(!I.guid){I.guid=Z.guid++}if(a=Z.data(D)){var U=a.events=a.events||{},e=a.handle;if(!e){a.handle=e=function(){return typeof Z!=="undefined"&&!Z.event.triggered?Z.event.handle.apply(e.elem,arguments):AR}}e.elem=D;E=E.split(" ");for(var b,d=0,B;b=E[d++];){a=M?Z.extend({},M):{handler:I,data:S};if(b.indexOf(".")>-1){B=b.split(".");b=B.shift();a.namespace=B.slice(0).sort().join(".")}else{B=[];a.namespace=""}a.type=b;a.guid=I.guid;var C=U[b],H=Z.event.special[b]||{};if(!C){C=U[b]=[];if(!H.setup||H.setup.call(D,S,B,e)===false){if(D.addEventListener){D.addEventListener(b,e,false)}else{D.attachEvent&&D.attachEvent("on"+b,e)}}}if(H.add){H.add.call(D,a);if(!a.handler.guid){a.handler.guid=I.guid}}C.push(a);Z.event.global[b]=true}D=null}}},global:{},remove:function(D,E,I,S){if(!(D.nodeType===3||D.nodeType===8)){var M,a=0,U,e,b,d,C,B,H=Z.data(D),g=H&&H.events;if(H&&g){if(E&&E.type){I=E.handler;E=E.type}if(!E||typeof E==="string"&&E.charAt(0)==="."){E=E||"";for(M in g){Z.event.remove(D,M+E)}}else{for(E=E.split(" ");M=E[a++];){d=M;U=M.indexOf(".")<0;e=[];if(!U){e=M.split(".");M=e.shift();b=new RegExp("(^|\\.)"+Z.map(e.slice(0).sort(),BO).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(C=g[M]){if(I){d=Z.event.special[M]||{};for(f=S||0;f<C.length;f++){B=C[f];if(I.guid===B.guid){if(U||b.test(B.namespace)){S==null&&C.splice(f--,1);d.remove&&d.remove.call(D,B)}if(S!=null){break}}}if(C.length===0||S!=null&&C.length===1){if(!d.teardown||d.teardown.call(D,e)===false){B1(D,M,H.handle)}delete g[M]}}else{for(var f=0;f<C.length;f++){B=C[f];if(U||b.test(B.namespace)){Z.event.remove(D,d,B.handler,f);C.splice(f--,1)}}}}}if(Z.isEmptyObject(g)){if(E=H.handle){E.elem=null}delete H.events;delete H.handle;Z.isEmptyObject(H)&&Z.removeData(D)}}}}},trigger:function(C,D,E,I){var H=C.type||C;if(!I){C=typeof C==="object"?C[By]?C:Z.extend(Z.Event(H),C):Z.Event(H);if(H.indexOf("!")>=0){C.type=H=H.slice(0,-1);C.exclusive=true}if(!E){C.stopPropagation();Z.event.global[H]&&Z.each(Z.cache,function(){this.events&&this.events[H]&&Z.event.trigger(C,D,this.handle.elem)})}if(!E||E.nodeType===3||E.nodeType===8){return AR}C.result=AR;C.target=E;D=Z.makeArray(D);D.unshift(C)}C.currentTarget=E;(I=Z.data(E,"handle"))&&I.apply(E,D);I=E.parentNode||E.ownerDocument;try{if(!(E&&E.nodeName&&Z.noData[E.nodeName.toLowerCase()])){if(E["on"+H]&&E["on"+H].apply(E,D)===false){C.result=false}}}catch(S){}if(!C.isPropagationStopped()&&I){Z.event.trigger(C,D,I,true)}else{if(!C.isDefaultPrevented()){I=C.target;var M,B=Z.nodeName(I,"a")&&H==="click",U=Z.event.special[H]||{};if((!U._default||U._default.call(E,C)===false)&&!B&&!(I&&I.nodeName&&Z.noData[I.nodeName.toLowerCase()])){try{if(I[H]){if(M=I["on"+H]){I["on"+H]=null}Z.event.triggered=true;I[H]()}}catch(a){}if(M){I["on"+H]=M}Z.event.triggered=false}}}},handle:function(I){var C,M,D,B;I=arguments[0]=Z.event.fix(I||Br.event);I.currentTarget=this;C=I.type.indexOf(".")<0&&!I.exclusive;if(!C){M=I.type.split(".");I.type=M.shift();D=new RegExp("(^|\\.)"+M.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}B=Z.data(this,"events");M=B[I.type];if(B&&M){M=M.slice(0);B=0;for(var H=M.length;B<H;B++){var E=M[B];if(C||D.test(E.namespace)){I.handler=E.handler;I.data=E.data;I.handleObj=E;E=E.handler.apply(this,arguments);if(E!==AR){I.result=E;if(E===false){I.preventDefault();I.stopPropagation()}}if(I.isImmediatePropagationStopped()){break}}}}return I.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(E){if(E[By]){return E}var B=E;E=Z.Event(B);for(var C=this.props.length,D;C;){D=this.props[--C];E[D]=B[D]}if(!E.target){E.target=E.srcElement||AQ}if(E.target.nodeType===3){E.target=E.target.parentNode}if(!E.relatedTarget&&E.fromElement){E.relatedTarget=E.fromElement===E.target?E.toElement:E.fromElement}if(E.pageX==null&&E.clientX!=null){B=AQ.documentElement;C=AQ.body;E.pageX=E.clientX+(B&&B.scrollLeft||C&&C.scrollLeft||0)-(B&&B.clientLeft||C&&C.clientLeft||0);E.pageY=E.clientY+(B&&B.scrollTop||C&&C.scrollTop||0)-(B&&B.clientTop||C&&C.clientTop||0)}if(!E.which&&(E.charCode||E.charCode===0?E.charCode:E.keyCode)){E.which=E.charCode||E.keyCode}if(!E.metaKey&&E.ctrlKey){E.metaKey=E.ctrlKey}if(!E.which&&E.button!==AR){E.which=E.button&1?1:E.button&2?3:E.button&4?2:0}return E},guid:100000000,proxy:Z.proxy,special:{ready:{setup:Z.bindReady,teardown:Z.noop},live:{add:function(B){Z.event.add(this,B.origType,Z.extend({},B,{handler:c}))},remove:function(D){var B=true,C=D.origType.replace(CE,"");Z.each(Z.data(this,"events").live||[],function(){if(C===this.origType.replace(CE,"")){return B=false}});B&&Z.event.remove(this,D.origType,c)}},beforeunload:{setup:function(D,B,C){if(this.setInterval){this.onbeforeunload=C}return false},teardown:function(C,B){if(this.onbeforeunload===B){this.onbeforeunload=null}}}}};var B1=AQ.removeEventListener?function(D,B,C){D.removeEventListener(B,C,false)}:function(D,B,C){D.detachEvent("on"+B,C)};Z.Event=function(B){if(!this.preventDefault){return new Z.Event(B)}if(B&&B.type){this.originalEvent=B;this.type=B.type}else{this.type=B}this.timeStamp=B3();this[By]=true};Z.Event.prototype={preventDefault:function(){this.isDefaultPrevented=T;var B=this.originalEvent;if(B){B.preventDefault&&B.preventDefault();B.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=T;var B=this.originalEvent;if(B){B.stopPropagation&&B.stopPropagation();B.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=T;this.stopPropagation()},isDefaultPrevented:Q,isPropagationStopped:Q,isImmediatePropagationStopped:Q};var w=function(D){var B=D.relatedTarget;try{for(;B&&B!==this;){B=B.parentNode}if(B!==this){D.type=D.data;Z.event.handle.apply(this,arguments)}}catch(C){}},BK=function(B){B.type=B.data;Z.event.handle.apply(this,arguments)};Z.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(C,B){Z.event.special[C]={setup:function(D){Z.event.add(this,B,D&&D.selector?BK:w,C)},teardown:function(D){Z.event.remove(this,B,D&&D.selector?BK:w)}}});if(!Z.support.submitBubbles){Z.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){Z.event.add(this,"click.specialSubmit",function(D){var B=D.target,C=B.type;if((C==="submit"||C==="image")&&Z(B).closest("form").length){return Bv("submit",this,arguments)}});Z.event.add(this,"keypress.specialSubmit",function(D){var B=D.target,C=B.type;if((C==="text"||C==="password")&&Z(B).closest("form").length&&D.keyCode===13){return Bv("submit",this,arguments)}})}else{return false}},teardown:function(){Z.event.remove(this,".specialSubmit")}}}if(!Z.support.changeBubbles){var BN=/textarea|input|select/i,BZ,BW=function(D){var B=D.type,C=D.value;if(B==="radio"||B==="checkbox"){C=D.checked}else{if(B==="select-multiple"){C=D.selectedIndex>-1?Z.map(D.options,function(E){return E.selected}).join("-"):""}else{if(D.nodeName.toLowerCase()==="select"){C=D.selectedIndex}}}return C},CA=function(H,B){var C=H.target,E,D;if(!(!BN.test(C.nodeName)||C.readOnly)){E=Z.data(C,"_change_data");D=BW(C);if(H.type!=="focusout"||C.type!=="radio"){Z.data(C,"_change_data",D)}if(!(E===AR||D===E)){if(E!=null||D){H.type="change";return Z.event.trigger(H,B,C)}}}};Z.event.special.change={filters:{focusout:CA,click:function(D){var B=D.target,C=B.type;if(C==="radio"||C==="checkbox"||B.nodeName.toLowerCase()==="select"){return CA.call(this,D)}},keydown:function(D){var B=D.target,C=B.type;if(D.keyCode===13&&B.nodeName.toLowerCase()!=="textarea"||D.keyCode===32&&(C==="checkbox"||C==="radio")||C==="select-multiple"){return CA.call(this,D)}},beforeactivate:function(B){B=B.target;Z.data(B,"_change_data",BW(B))}},setup:function(){if(this.type==="file"){return false}for(var B in BZ){Z.event.add(this,B+".specialChange",BZ[B])}return BN.test(this.nodeName)},teardown:function(){Z.event.remove(this,".specialChange");return BN.test(this.nodeName)}};BZ=Z.event.special.change.filters}AQ.addEventListener&&Z.each({focus:"focusin",blur:"focusout"},function(D,B){function C(E){E=Z.event.fix(E);E.type=B;return Z.event.handle.call(this,E)}Z.event.special[B]={setup:function(){this.addEventListener(D,C,true)},teardown:function(){this.removeEventListener(D,C,true)}}});Z.each(["bind","one"],function(C,B){Z.fn[B]=function(M,E,D){if(typeof M==="object"){for(var I in M){this[B](I,E,M[I],D)}return this}if(Z.isFunction(E)){D=E;E=AR}var H=B==="one"?Z.proxy(D,function(U){Z(this).unbind(U,H);return D.apply(this,arguments)}):D;if(M==="unload"&&B!=="one"){this.one(M,E,D)}else{I=0;for(var S=this.length;I<S;I++){Z.event.add(this[I],M,H,E)}}return this}});Z.fn.extend({unbind:function(E,B){if(typeof E==="object"&&!E.preventDefault){for(var C in E){this.unbind(C,E[C])}}else{C=0;for(var D=this.length;C<D;C++){Z.event.remove(this[C],E,B)}}return this},delegate:function(E,B,C,D){return this.live(B,C,D,E)},undelegate:function(D,B,C){return arguments.length===0?this.unbind("live"):this.die(B,null,C,D)},trigger:function(C,B){return this.each(function(){Z.event.trigger(C,B,this)})},triggerHandler:function(C,B){if(this[0]){C=Z.Event(C);C.preventDefault();C.stopPropagation();Z.event.trigger(C,B,this[0]);return C.result}},toggle:function(D){for(var B=arguments,C=1;C<B.length;){Z.proxy(D,B[C++])}return this.click(Z.proxy(D,function(H){var E=(Z.data(this,"lastToggle"+D.guid)||0)%C;Z.data(this,"lastToggle"+D.guid,E+1);H.preventDefault();return B[E].apply(this,arguments)||false}))},hover:function(C,B){return this.mouseenter(C).mouseleave(B||C)}});var B5={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};Z.each(["live","die"],function(C,B){Z.fn[B]=function(E,I,H,S){var M,b=0,U,a,d=S||this.selector,D=S?this:Z(this.context);if(Z.isFunction(I)){H=I;I=AR}for(E=(E||"").split(" ");(M=E[b++])!=null;){S=CE.exec(M);U="";if(S){U=S[0];M=M.replace(CE,"")}if(M==="hover"){E.push("mouseenter"+U,"mouseleave"+U)}else{a=M;if(M==="focus"||M==="blur"){E.push(B5[M]+U);M+=U}else{M=(B5[M]||M)+U}B==="live"?D.each(function(){Z.event.add(this,BI(M,d),{data:I,selector:d,handler:H,origType:M,origHandler:H,preType:a})}):D.unbind(BI(M,d),H)}}return this}});Z.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".split(" "),function(C,B){Z.fn[B]=function(D){return D?this.bind(B,D):this.trigger(B)};if(Z.attrFn){Z.attrFn[B]=true}});Br.attachEvent&&!Br.addEventListener&&Br.attachEvent("onunload",function(){for(var C in Z.cache){if(Z.cache[C].handle){try{Z.event.remove(Z.cache[C].handle.elem)}catch(B){}}}});(function(){function B(m){for(var n="",k,l=0;m[l];l++){k=m[l];if(k.nodeType===3||k.nodeType===4){n+=k.nodeValue}else{if(k.nodeType!==8){n+=B(k.childNodes)}}}return n}function C(p,r,k,l,t,q){t=0;for(var n=l.length;t<n;t++){var m=l[t];if(m){m=m[p];for(var o=false;m;){if(m.sizcache===k){o=l[m.sizset];break}if(m.nodeType===1&&!q){m.sizcache=k;m.sizset=t}if(m.nodeName.toLowerCase()===r){o=m;break}m=m[p]}l[t]=o}}}function D(p,r,k,l,t,q){t=0;for(var n=l.length;t<n;t++){var m=l[t];if(m){m=m[p];for(var o=false;m;){if(m.sizcache===k){o=l[m.sizset];break}if(m.nodeType===1){if(!q){m.sizcache=k;m.sizset=t}if(typeof r!=="string"){if(m===r){o=true;break}}else{if(S.filter(r,[m]).length>0){o=m;break}}}m=m[p]}l[t]=o}}}var H=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,E=0,M=Object.prototype.toString,I=false,a=true;[0,0].sort(function(){a=false;return 0});var S=function(t,u,y,k){y=y||[];var x=u=u||AQ;if(u.nodeType!==1&&u.nodeType!==9){return[]}if(!t||typeof t!=="string"){return y}for(var l=[],n,m,q,v,o=true,r=h(u),p=t;(H.exec(""),n=H.exec(p))!==null;){p=n[3];l.push(n[1]);if(n[2]){v=n[3];break}}if(l.length>1&&d.exec(t)){if(l.length===2&&U.relative[l[0]]){m=j(l[0]+l[1],u)}else{for(m=U.relative[l[0]]?[u]:S(l.shift(),u);l.length;){t=l.shift();if(U.relative[t]){t+=l.shift()}m=j(t,m)}}}else{if(!k&&l.length>1&&u.nodeType===9&&!r&&U.match.ID.test(l[0])&&!U.match.ID.test(l[l.length-1])){n=S.find(l.shift(),u,r);u=n.expr?S.filter(n.expr,n.set)[0]:n.set[0]}if(u){n=k?{expr:l.pop(),set:i(k)}:S.find(l.pop(),l.length===1&&(l[0]==="~"||l[0]==="+")&&u.parentNode?u.parentNode:u,r);m=n.expr?S.filter(n.expr,n.set):n.set;if(l.length>0){q=i(m)}else{o=false}for(;l.length;){var z=l.pop();n=z;if(U.relative[z]){n=l.pop()}else{z=""}if(n==null){n=u}U.relative[z](q,n,r)}}else{q=[]}}q||(q=m);q||S.error(z||t);if(M.call(q)==="[object Array]"){if(o){if(u&&u.nodeType===1){for(t=0;q[t]!=null;t++){if(q[t]&&(q[t]===true||q[t].nodeType===1&&f(u,q[t]))){y.push(m[t])}}}else{for(t=0;q[t]!=null;t++){q[t]&&q[t].nodeType===1&&y.push(m[t])}}}else{y.push.apply(y,q)}}else{i(q,y)}if(v){S(v,x,y,k);S.uniqueSort(y)}return y};S.uniqueSort=function(k){if(b){I=a;k.sort(b);if(I){for(var l=1;l<k.length;l++){k[l]===k[l-1]&&k.splice(l--,1)}}}return k};S.matches=function(k,l){return S(k,null,null,l)};S.find=function(p,r,k){var l,t;if(!p){return[]}for(var q=0,n=U.order.length;q<n;q++){var m=U.order[q];if(t=U.leftMatch[m].exec(p)){var o=t[1];t.splice(1,1);if(o.substr(o.length-1)!=="\\"){t[1]=(t[1]||"").replace(/\\/g,"");l=U.find[m](t,r,k);if(l!=null){p=p.replace(U.match[m],"");break}}}}l||(l=r.getElementsByTagName("*"));return{set:l,expr:p}};S.filter=function(u,v,y,k){for(var z=u,l=[],n=v,m,q,x=v&&v[0]&&h(v[0]);u&&v.length;){for(var o in U.filter){if((m=U.leftMatch[o].exec(u))!=null&&m[2]){var t=U.filter[o],p,AB;AB=m[1];q=false;m.splice(1,1);if(AB.substr(AB.length-1)!=="\\"){if(n===l){l=[]}if(U.preFilter[o]){if(m=U.preFilter[o](m,n,y,l,k,x)){if(m===true){continue}}else{q=p=true}}if(m){for(var AA=0;(AB=n[AA])!=null;AA++){if(AB){p=t(AB,m,AA,n);var r=k^!!p;if(y&&p!=null){if(r){q=true}else{n[AA]=false}}else{if(r){l.push(AB);q=true}}}}}if(p!==AR){y||(n=l);u=u.replace(U.match[o],"");if(!q){return[]}break}}}}if(u===z){if(q==null){S.error(u)}else{break}}z=u}return n};S.error=function(k){throw"Syntax error, unrecognized expression: "+k};var U=S.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(k){return k.getAttribute("href")}},relative:{"+":function(o,p){var k=typeof p==="string",n=k&&!/\W/.test(p);k=k&&!n;if(n){p=p.toLowerCase()}n=0;for(var m=o.length,l;n<m;n++){if(l=o[n]){for(;(l=l.previousSibling)&&l.nodeType!==1;){}o[n]=k||l&&l.nodeName.toLowerCase()===p?l||false:l===p}}k&&S.filter(p,o,true)},">":function(o,p){var k=typeof p==="string";if(k&&!/\W/.test(p)){p=p.toLowerCase();for(var n=0,m=o.length;n<m;n++){var l=o[n];if(l){k=l.parentNode;o[n]=k.nodeName.toLowerCase()===p?k:false}}}else{n=0;for(m=o.length;n<m;n++){if(l=o[n]){o[n]=k?l.parentNode:l.parentNode===p}}k&&S.filter(p,o,true)}},"":function(o,p,k){var n=E++,m=D;if(typeof p==="string"&&!/\W/.test(p)){var l=p=p.toLowerCase();m=C}m("parentNode",p,n,o,l,k)},"~":function(o,p,k){var n=E++,m=D;if(typeof p==="string"&&!/\W/.test(p)){var l=p=p.toLowerCase();m=C}m("previousSibling",p,n,o,l,k)}},find:{ID:function(m,k,l){if(typeof k.getElementById!=="undefined"&&!l){return(m=k.getElementById(m[1]))?[m]:[]}},NAME:function(n,o){if(typeof o.getElementsByName!=="undefined"){var k=[];o=o.getElementsByName(n[1]);for(var m=0,l=o.length;m<l;m++){o[m].getAttribute("name")===n[1]&&k.push(o[m])}return k.length===0?null:k}},TAG:function(k,l){return l.getElementsByTagName(k[1])}},preFilter:{CLASS:function(n,p,l,o,m,k){n=" "+n[1].replace(/\\/g,"")+" ";if(k){return n}k=0;for(var q;(q=p[k])!=null;k++){if(q){if(m^(q.className&&(" "+q.className+" ").replace(/[\t\n]/g," ").indexOf(n)>=0)){l||o.push(q)}else{if(l){p[k]=false}}}}return false},ID:function(k){return k[1].replace(/\\/g,"")},TAG:function(k){return k[1].toLowerCase()},CHILD:function(k){if(k[1]==="nth"){var l=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(k[2]==="even"&&"2n"||k[2]==="odd"&&"2n+1"||!/\D/.test(k[2])&&"0n+"+k[2]||k[2]);k[2]=l[1]+(l[2]||1)-0;k[3]=l[3]-0}k[0]=E++;return k},ATTR:function(o,p,k,n,m,l){p=o[1].replace(/\\/g,"");if(!l&&U.attrMap[p]){o[1]=U.attrMap[p]}if(o[2]==="~="){o[4]=" "+o[4]+" "}return o},PSEUDO:function(n,o,k,m,l){if(n[1]==="not"){if((H.exec(n[3])||"").length>1||/^\w/.test(n[3])){n[3]=S(n[3],null,null,o)}else{n=S.filter(n[3],o,k,true^l);k||m.push.apply(m,n);return false}}else{if(U.match.POS.test(n[0])||U.match.CHILD.test(n[0])){return true}}return n},POS:function(k){k.unshift(true);return k}},filters:{enabled:function(k){return k.disabled===false&&k.type!=="hidden"},disabled:function(k){return k.disabled===true},checked:function(k){return k.checked===true},selected:function(k){return k.selected===true},parent:function(k){return !!k.firstChild},empty:function(k){return !k.firstChild},has:function(m,k,l){return !!S(l[3],m).length},header:function(k){return/h\d/i.test(k.nodeName)},text:function(k){return"text"===k.type},radio:function(k){return"radio"===k.type},checkbox:function(k){return"checkbox"===k.type},file:function(k){return"file"===k.type},password:function(k){return"password"===k.type},submit:function(k){return"submit"===k.type},image:function(k){return"image"===k.type},reset:function(k){return"reset"===k.type},button:function(k){return"button"===k.type||k.nodeName.toLowerCase()==="button"},input:function(k){return/input|select|textarea|button/i.test(k.nodeName)}},setFilters:{first:function(k,l){return l===0},last:function(m,n,k,l){return n===l.length-1},even:function(k,l){return l%2===0},odd:function(k,l){return l%2===1},lt:function(m,k,l){return k<l[3]-0},gt:function(m,k,l){return k>l[3]-0},nth:function(m,k,l){return l[3]-0===k},eq:function(m,k,l){return l[3]-0===k}},filter:{PSEUDO:function(o,p,k,n){var m=p[1],l=U.filters[m];if(l){return l(o,k,p,n)}else{if(m==="contains"){return(o.textContent||o.innerText||B([o])||"").indexOf(p[3])>=0}else{if(m==="not"){p=p[3];k=0;for(n=p.length;k<n;k++){if(p[k]===o){return false}}return true}else{S.error("Syntax error, unrecognized expression: "+m)}}}},CHILD:function(n,p){var l=p[1],o=n;switch(l){case"only":case"first":for(;o=o.previousSibling;){if(o.nodeType===1){return false}}if(l==="first"){return true}o=n;case"last":for(;o=o.nextSibling;){if(o.nodeType===1){return false}}return true;case"nth":l=p[2];var m=p[3];if(l===1&&m===0){return true}p=p[0];var k=n.parentNode;if(k&&(k.sizcache!==p||!n.nodeIndex)){var q=0;for(o=k.firstChild;o;o=o.nextSibling){if(o.nodeType===1){o.nodeIndex=++q}}k.sizcache=p}n=n.nodeIndex-m;return l===0?n===0:n%l===0&&n/l>=0}},ID:function(k,l){return k.nodeType===1&&k.getAttribute("id")===l},TAG:function(k,l){return l==="*"&&k.nodeType===1||k.nodeName.toLowerCase()===l},CLASS:function(k,l){return(" "+(k.className||k.getAttribute("class"))+" ").indexOf(l)>-1},ATTR:function(m,n){var k=n[1];m=U.attrHandle[k]?U.attrHandle[k](m):m[k]!=null?m[k]:m.getAttribute(k);k=m+"";var l=n[2];n=n[4];return m==null?l==="!=":l==="="?k===n:l==="*="?k.indexOf(n)>=0:l==="~="?(" "+k+" ").indexOf(n)>=0:!n?k&&m!==false:l==="!="?k!==n:l==="^="?k.indexOf(n)===0:l==="$="?k.substr(k.length-n.length)===n:l==="|="?k===n||k.substr(0,n.length+1)===n+"-":false},POS:function(n,o,k,m){var l=U.setFilters[o[2]];if(l){return l(n,k,o,m)}}}},d=U.match.POS;for(var g in U.match){U.match[g]=new RegExp(U.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source);U.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+U.match[g].source.replace(/\\(\d+)/g,function(k,l){return"\\"+(l-0+1)}))}var i=function(k,l){k=Array.prototype.slice.call(k,0);if(l){l.push.apply(l,k);return l}return k};try{Array.prototype.slice.call(AQ.documentElement.childNodes,0)}catch(e){i=function(m,n){n=n||[];if(M.call(m)==="[object Array]"){Array.prototype.push.apply(n,m)}else{if(typeof m.length==="number"){for(var k=0,l=m.length;k<l;k++){n.push(m[k])}}else{for(k=0;m[k];k++){n.push(m[k])}}}return n}}var b;if(AQ.documentElement.compareDocumentPosition){b=function(k,l){if(!k.compareDocumentPosition||!l.compareDocumentPosition){if(k==l){I=true}return k.compareDocumentPosition?-1:1}k=k.compareDocumentPosition(l)&4?-1:k===l?0:1;if(k===0){I=true}return k}}else{if("sourceIndex" in AQ.documentElement){b=function(k,l){if(!k.sourceIndex||!l.sourceIndex){if(k==l){I=true}return k.sourceIndex?-1:1}k=k.sourceIndex-l.sourceIndex;if(k===0){I=true}return k}}else{if(AQ.createRange){b=function(m,n){if(!m.ownerDocument||!n.ownerDocument){if(m==n){I=true}return m.ownerDocument?-1:1}var k=m.ownerDocument.createRange(),l=n.ownerDocument.createRange();k.setStart(m,0);k.setEnd(m,0);l.setStart(n,0);l.setEnd(n,0);m=k.compareBoundaryPoints(Range.START_TO_END,l);if(m===0){I=true}return m}}}}(function(){var m=AQ.createElement("div"),k="script"+(new Date).getTime();m.innerHTML="<a name='"+k+"'/>";var l=AQ.documentElement;l.insertBefore(m,l.firstChild);if(AQ.getElementById(k)){U.find.ID=function(p,o,n){if(typeof o.getElementById!=="undefined"&&!n){return(o=o.getElementById(p[1]))?o.id===p[1]||typeof o.getAttributeNode!=="undefined"&&o.getAttributeNode("id").nodeValue===p[1]?[o]:AR:[]}};U.filter.ID=function(p,o){var n=typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id");return p.nodeType===1&&n&&n.nodeValue===o}}l.removeChild(m);l=m=null})();(function(){var k=AQ.createElement("div");k.appendChild(AQ.createComment(""));if(k.getElementsByTagName("*").length>0){U.find.TAG=function(m,n){n=n.getElementsByTagName(m[1]);if(m[1]==="*"){m=[];for(var l=0;n[l];l++){n[l].nodeType===1&&m.push(n[l])}n=m}return n}}k.innerHTML="<a href='#'></a>";if(k.firstChild&&typeof k.firstChild.getAttribute!=="undefined"&&k.firstChild.getAttribute("href")!=="#"){U.attrHandle.href=function(l){return l.getAttribute("href",2)}}k=null})();AQ.querySelectorAll&&function(){var m=S,k=AQ.createElement("div");k.innerHTML="<p class='TEST'></p>";if(!(k.querySelectorAll&&k.querySelectorAll(".TEST").length===0)){S=function(r,o,n,q){o=o||AQ;if(!q&&o.nodeType===9&&!h(o)){try{return i(o.querySelectorAll(r),n)}catch(p){}}return m(r,o,n,q)};for(var l in m){S[l]=m[l]}k=null}}();(function(){var k=AQ.createElement("div");k.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!k.getElementsByClassName||k.getElementsByClassName("e").length===0)){k.lastChild.className="e";if(k.getElementsByClassName("e").length!==1){U.order.splice(1,0,"CLASS");U.find.CLASS=function(m,n,l){if(typeof n.getElementsByClassName!=="undefined"&&!l){return n.getElementsByClassName(m[1])}};k=null}}})();var f=AQ.compareDocumentPosition?function(k,l){return !!(k.compareDocumentPosition(l)&16)}:function(k,l){return k!==l&&(k.contains?k.contains(l):true)},h=function(k){return(k=(k?k.ownerDocument||k:0).documentElement)?k.nodeName!=="HTML":false},j=function(o,p){var k=[],n="",m;for(p=p.nodeType?[p]:p;m=U.match.PSEUDO.exec(o);){n+=m[0];o=o.replace(U.match.PSEUDO,"")}o=U.relative[o]?o+"*":o;m=0;for(var l=p.length;m<l;m++){S(o,p[m],k)}return S.filter(n,k)};Z.find=S;Z.expr=S.selectors;Z.expr[":"]=Z.expr.filters;Z.unique=S.uniqueSort;Z.text=B;Z.isXMLDoc=h;Z.contains=f})();var Ba=/Until$/,AF=/^(?:parents|prevUntil|prevAll)/,Bj=/,/;K=Array.prototype.slice;var Bu=function(E,B,C){if(Z.isFunction(B)){return Z.grep(E,function(H,I){return !!B.call(H,I,H)===C})}else{if(B.nodeType){return Z.grep(E,function(H){return H===B===C})}else{if(typeof B==="string"){var D=Z.grep(E,function(H){return H.nodeType===1});if(Bm.test(B)){return Z.filter(B,D,!C)}else{B=Z.filter(B,D)}}}}return Z.grep(E,function(H){return Z.inArray(H,B)>=0===C})};Z.fn.extend({find:function(I){for(var C=this.pushStack("","find",I),M=0,D=0,B=this.length;D<B;D++){M=C.length;Z.find(I,this[D],C);if(D>0){for(var H=M;H<C.length;H++){for(var E=0;E<M;E++){if(C[E]===C[H]){C.splice(H--,1);break}}}}}return C},has:function(C){var B=Z(C);return this.filter(function(){for(var D=0,E=B.length;D<E;D++){if(Z.contains(this,B[D])){return true}}})},not:function(B){return this.pushStack(Bu(this,B,false),"not",B)},filter:function(B){return this.pushStack(Bu(this,B,true),"filter",B)},is:function(B){return !!B&&Z.filter(B,this).length>0},closest:function(C,D){if(Z.isArray(C)){var E=[],I=this[0],H,S={},M;if(I&&C.length){H=0;for(var B=C.length;H<B;H++){M=C[H];S[M]||(S[M]=Z.expr.match.POS.test(M)?Z(M,D||this.context):M)}for(;I&&I.ownerDocument&&I!==D;){for(M in S){H=S[M];if(H.jquery?H.index(I)>-1:Z(I).is(H)){E.push({selector:M,elem:I});delete S[M]}}I=I.parentNode}}return E}var U=Z.expr.match.POS.test(C)?Z(C,D||this.context):null;return this.map(function(a,b){for(;b&&b.ownerDocument&&b!==D;){if(U?U.index(b)>-1:Z(b).is(C)){return b}b=b.parentNode}return null})},index:function(B){if(!B||typeof B==="string"){return Z.inArray(this[0],B?Z(B):this.parent().children())}return Z.inArray(B.jquery?B[0]:B,this)},add:function(C,B){C=typeof C==="string"?Z(C,B||this.context):Z.makeArray(C);B=Z.merge(this.get(),C);return this.pushStack(BU(C[0])||BU(B[0])?B:Z.unique(B))},andSelf:function(){return this.add(this.prevObject)}});Z.each({parent:function(B){return(B=B.parentNode)&&B.nodeType!==11?B:null},parents:function(B){return Z.dir(B,"parentNode")},parentsUntil:function(D,B,C){return Z.dir(D,"parentNode",C)},next:function(B){return Z.nth(B,2,"nextSibling")},prev:function(B){return Z.nth(B,2,"previousSibling")},nextAll:function(B){return Z.dir(B,"nextSibling")},prevAll:function(B){return Z.dir(B,"previousSibling")},nextUntil:function(D,B,C){return Z.dir(D,"nextSibling",C)},prevUntil:function(D,B,C){return Z.dir(D,"previousSibling",C)},siblings:function(B){return Z.sibling(B.parentNode.firstChild,B)},children:function(B){return Z.sibling(B.firstChild)},contents:function(B){return Z.nodeName(B,"iframe")?B.contentDocument||B.contentWindow.document:Z.makeArray(B.childNodes)}},function(C,B){Z.fn[C]=function(D,H){var E=Z.map(this,B,D);Ba.test(C)||(H=D);if(H&&typeof H==="string"){E=Z.filter(H,E)}E=this.length>1?Z.unique(E):E;if((this.length>1||Bj.test(H))&&AF.test(C)){E=E.reverse()}return this.pushStack(E,C,K.call(arguments).join(","))}});Z.extend({filter:function(D,B,C){if(C){D=":not("+D+")"}return Z.find.matches(D,B)},dir:function(E,B,C){var D=[];for(E=E[B];E&&E.nodeType!==9&&(C===AR||E.nodeType!==1||!Z(E).is(C));){E.nodeType===1&&D.push(E);E=E[B]}return D},nth:function(E,B,C){B=B||1;for(var D=0;E;E=E[C]){if(E.nodeType===1&&++D===B){break}}return E},sibling:function(D,B){for(var C=[];D;D=D.nextSibling){D.nodeType===1&&D!==B&&C.push(D)}return C}});var Y=/ jQuery\d+="(?:\d+|null)"/g,N=/^\s+/,Ab=/(<([\w:]+)[^>]*?)\/>/g,B7=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,BT=/<([\w:]+)/,AD=/<tbody/i,BM=/<|&#?\w+;/,Bq=/<script|<object|<embed|<option|<style/i,W=/checked\s*(?:[^=]|=\s*.checked.)/i,Bz=function(D,B,C){return B7.test(C)?D:B+"></"+C+">"},Bw={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,"",""]};Bw.optgroup=Bw.option;Bw.tbody=Bw.tfoot=Bw.colgroup=Bw.caption=Bw.thead;Bw.th=Bw.td;if(!Z.support.htmlSerialize){Bw._default=[1,"div<div>","</div>"]}Z.fn.extend({text:function(B){if(Z.isFunction(B)){return this.each(function(D){var C=Z(this);C.text(B.call(this,D,C.text()))})}if(typeof B!=="object"&&B!==AR){return this.empty().append((this[0]&&this[0].ownerDocument||AQ).createTextNode(B))}return Z.text(this)},wrapAll:function(C){if(Z.isFunction(C)){return this.each(function(D){Z(this).wrapAll(C.call(this,D))})}if(this[0]){var B=Z(C,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&B.insertBefore(this[0]);B.map(function(){for(var D=this;D.firstChild&&D.firstChild.nodeType===1;){D=D.firstChild}return D}).append(this)}return this},wrapInner:function(B){if(Z.isFunction(B)){return this.each(function(C){Z(this).wrapInner(B.call(this,C))})}return this.each(function(){var D=Z(this),C=D.contents();C.length?C.wrapAll(B):D.append(B)})},wrap:function(B){return this.each(function(){Z(this).wrapAll(B)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(B){this.nodeType===1&&this.appendChild(B)})},prepend:function(){return this.domManip(arguments,true,function(B){this.nodeType===1&&this.insertBefore(B,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(C){this.parentNode.insertBefore(C,this)})}else{if(arguments.length){var B=Z(arguments[0]);B.push.apply(B,this.toArray());return this.pushStack(B,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(C){this.parentNode.insertBefore(C,this.nextSibling)})}else{if(arguments.length){var B=this.pushStack(this,"after",arguments);B.push.apply(B,Z(arguments[0]).toArray());return B}}},remove:function(E,B){for(var C=0,D;(D=this[C])!=null;C++){if(!E||Z.filter(E,[D]).length){if(!B&&D.nodeType===1){Z.cleanData(D.getElementsByTagName("*"));Z.cleanData([D])}D.parentNode&&D.parentNode.removeChild(D)}}return this},empty:function(){for(var C=0,B;(B=this[C])!=null;C++){for(B.nodeType===1&&Z.cleanData(B.getElementsByTagName("*"));B.firstChild;){B.removeChild(B.firstChild)}}return this},clone:function(C){var B=this.map(function(){if(!Z.support.noCloneEvent&&!Z.isXMLDoc(this)){var D=this.outerHTML,E=this.ownerDocument;if(!D){D=E.createElement("div");D.appendChild(this.cloneNode(true));D=D.innerHTML}return Z.clean([D.replace(Y,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(N,"")],E)[0]}else{return this.cloneNode(true)}});if(C===true){B0(this,B);B0(this.find("*"),B.find("*"))}return B},html:function(E){if(E===AR){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null}else{if(typeof E==="string"&&!Bq.test(E)&&(Z.support.leadingWhitespace||!N.test(E))&&!Bw[(BT.exec(E)||["",""])[1].toLowerCase()]){E=E.replace(Ab,Bz);try{for(var B=0,C=this.length;B<C;B++){if(this[B].nodeType===1){Z.cleanData(this[B].getElementsByTagName("*"));this[B].innerHTML=E}}}catch(D){this.empty().append(E)}}else{Z.isFunction(E)?this.each(function(M){var I=Z(this),H=I.html();I.empty().append(function(){return E.call(this,M,H)})}):this.empty().append(E)}}return this},replaceWith:function(B){if(this[0]&&this[0].parentNode){if(Z.isFunction(B)){return this.each(function(E){var C=Z(this),D=C.html();C.replaceWith(B.call(this,E,D))})}if(typeof B!=="string"){B=Z(B).detach()}return this.each(function(){var D=this.nextSibling,C=this.parentNode;Z(this).remove();D?Z(D).before(B):Z(C).append(B)})}else{return this.pushStack(Z(Z.isFunction(B)?B():B),"replaceWith",B)}},detach:function(B){return this.remove(B,true)},domManip:function(C,D,E){function I(d){return Z.nodeName(d,"table")?d.getElementsByTagName("tbody")[0]||d.appendChild(d.ownerDocument.createElement("tbody")):d}var H,S,M=C[0],b=[],U;if(!Z.support.checkClone&&arguments.length===3&&typeof M==="string"&&W.test(M)){return this.each(function(){Z(this).domManip(C,D,E,true)})}if(Z.isFunction(M)){return this.each(function(e){var d=Z(this);C[0]=M.call(this,e,D?d.html():AR);d.domManip(C,D,E)})}if(this[0]){H=M&&M.parentNode;H=Z.support.parentNode&&H&&H.nodeType===11&&H.childNodes.length===this.length?{fragment:H}:AL(C,this,b);U=H.fragment;if(S=U.childNodes.length===1?(U=U.firstChild):U.firstChild){D=D&&Z.nodeName(S,"tr");for(var a=0,B=this.length;a<B;a++){E.call(D?I(this[a],S):this[a],a>0||H.cacheable||this.length>1?U.cloneNode(true):U)}}b.length&&Z.each(b,AT)}return this}});Z.fragments={};Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(C,B){Z.fn[C]=function(M){var E=[];M=Z(M);var D=this.length===1&&this[0].parentNode;if(D&&D.nodeType===11&&D.childNodes.length===1&&M.length===1){M[B](this[0]);return this}else{D=0;for(var I=M.length;D<I;D++){var H=(D>0?this.clone(true):this).get();Z.fn[B].apply(Z(M[D]),H);E=E.concat(H)}return this.pushStack(E,C,M.selector)}}});Z.extend({clean:function(C,D,E,I){D=D||AQ;if(typeof D.createElement==="undefined"){D=D.ownerDocument||D[0]&&D[0].ownerDocument||AQ}for(var H=[],S=0,M;(M=C[S])!=null;S++){if(typeof M==="number"){M+=""}if(M){if(typeof M==="string"&&!BM.test(M)){M=D.createTextNode(M)}else{if(typeof M==="string"){M=M.replace(Ab,Bz);var b=(BT.exec(M)||["",""])[1].toLowerCase(),U=Bw[b]||Bw._default,a=U[0],B=D.createElement("div");for(B.innerHTML=U[1]+M+U[2];a--;){B=B.lastChild}if(!Z.support.tbody){a=AD.test(M);b=b==="table"&&!a?B.firstChild&&B.firstChild.childNodes:U[1]==="<table>"&&!a?B.childNodes:[];for(U=b.length-1;U>=0;--U){Z.nodeName(b[U],"tbody")&&!b[U].childNodes.length&&b[U].parentNode.removeChild(b[U])}}!Z.support.leadingWhitespace&&N.test(M)&&B.insertBefore(D.createTextNode(N.exec(M)[0]),B.firstChild);M=B.childNodes}}if(M.nodeType){H.push(M)}else{H=Z.merge(H,M)}}}if(E){for(S=0;H[S];S++){if(I&&Z.nodeName(H[S],"script")&&(!H[S].type||H[S].type.toLowerCase()==="text/javascript")){I.push(H[S].parentNode?H[S].parentNode.removeChild(H[S]):H[S])}else{H[S].nodeType===1&&H.splice.apply(H,[S+1,0].concat(Z.makeArray(H[S].getElementsByTagName("script"))));E.appendChild(H[S])}}}return H},cleanData:function(C){for(var D,E,I=Z.cache,H=Z.event.special,S=Z.support.deleteExpando,M=0,B;(B=C[M])!=null;M++){if(E=B[Z.expando]){D=I[E];if(D.events){for(var U in D.events){H[U]?Z.event.remove(B,U):B1(B,U,D.handle)}}if(S){delete B[Z.expando]}else{B.removeAttribute&&B.removeAttribute(Z.expando)}delete I[E]}}}});var BY=/z-?index|font-?weight|opacity|zoom|line-?height/i,AK=/alpha\([^)]*\)/,Bp=/opacity=([^)]*)/,B4=/float/i,AC=/-([a-z])/ig,B8=/([A-Z])/g,Bg=/^-?\d+(?:px)?$/i,Bx=/^-?\d/,s={position:"absolute",visibility:"hidden",display:"block"},BJ=["Left","Right"],BV=["Top","Bottom"],B2=AQ.defaultView&&AQ.defaultView.getComputedStyle,V=Z.support.cssFloat?"cssFloat":"styleFloat",BL=function(C,B){return B.toUpperCase()};Z.fn.css=function(C,B){return P(this,C,B,true,function(D,H,E){if(E===AR){return Z.curCSS(D,H)}if(typeof E==="number"&&!BY.test(H)){E+="px"}Z.style(D,H,E)})};Z.extend({style:function(H,B,C){if(!H||H.nodeType===3||H.nodeType===8){return AR}if((B==="width"||B==="height")&&parseFloat(C)<0){C=AR}var E=H.style||H,D=C!==AR;if(!Z.support.opacity&&B==="opacity"){if(D){E.zoom=1;B=parseInt(C,10)+""==="NaN"?"":"alpha(opacity="+C*100+")";H=E.filter||Z.curCSS(H,"filter")||"";E.filter=AK.test(H)?H.replace(AK,B):B}return E.filter&&E.filter.indexOf("opacity=")>=0?parseFloat(Bp.exec(E.filter)[1])/100+"":""}if(B4.test(B)){B=V}B=B.replace(AC,BL);if(D){E[B]=C}return E[B]},css:function(I,C,M,D){if(C==="width"||C==="height"){var B,H=C==="width"?BJ:BV;function E(){B=C==="width"?I.offsetWidth:I.offsetHeight;D!=="border"&&Z.each(H,function(){D||(B-=parseFloat(Z.curCSS(I,"padding"+this,true))||0);if(D==="margin"){B+=parseFloat(Z.curCSS(I,"margin"+this,true))||0}else{B-=parseFloat(Z.curCSS(I,"border"+this+"Width",true))||0}})}I.offsetWidth!==0?E():Z.swap(I,s,E);return Math.max(0,Math.round(B))}return Z.curCSS(I,C,M)},curCSS:function(I,C,B){var E,D=I.style;if(!Z.support.opacity&&C==="opacity"&&I.currentStyle){E=Bp.test(I.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return E===""?"1":E}if(B4.test(C)){C=V}if(!B&&D&&D[C]){E=D[C]}else{if(B2){if(B4.test(C)){C="float"}C=C.replace(B8,"-$1").toLowerCase();D=I.ownerDocument.defaultView;if(!D){return null}if(I=D.getComputedStyle(I,null)){E=I.getPropertyValue(C)}if(C==="opacity"&&E===""){E="1"}}else{if(I.currentStyle){B=C.replace(AC,BL);E=I.currentStyle[C]||I.currentStyle[B];if(!Bg.test(E)&&Bx.test(E)){C=D.left;var H=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;D.left=B==="fontSize"?"1em":E||0;E=D.pixelLeft+"px";D.left=C;I.runtimeStyle.left=H}}}}return E},swap:function(H,B,C){var E={};for(var D in B){E[D]=H.style[D];H.style[D]=B[D]}C.call(H);for(D in B){H.style[D]=E[D]}}});if(Z.expr&&Z.expr.filters){Z.expr.filters.hidden=function(E){var B=E.offsetWidth,C=E.offsetHeight,D=E.nodeName.toLowerCase()==="tr";return B===0&&C===0&&!D?true:B>0&&C>0&&!D?false:Z.curCSS(E,"display")==="none"};Z.expr.filters.visible=function(B){return !Z.expr.filters.hidden(B)}}var AM=B3(),Bs=/<script(.|\s)*?\/script>/gi,X=/select|textarea/i,Aa=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,CD=/=\?(&|$)/,BX=/\?/,BS=/(\?|&)_=.*?(&|$)/,Be=/^(\w+:)?\/\/([^\/?#]+)/,AJ=/%20/g,Bo=Z.fn.load;Z.fn.extend({load:function(I,C,B){if(typeof I!=="string"){return Bo.call(this,I)}else{if(!this.length){return this}}var E=I.indexOf(" ");if(E>=0){var D=I.slice(E,I.length);I=I.slice(0,E)}E="GET";if(C){if(Z.isFunction(C)){B=C;C=null}else{if(typeof C==="object"){C=Z.param(C,Z.ajaxSettings.traditional);E="POST"}}}var H=this;Z.ajax({url:I,type:E,dataType:"html",data:C,complete:function(S,M){if(M==="success"||M==="notmodified"){H.html(D?Z("<div />").append(S.responseText.replace(Bs,"")).find(D):S.responseText)}B&&H.each(B,[S.responseText,M,S])}});return this},serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Z.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||X.test(this.nodeName)||Aa.test(this.type))}).map(function(C,B){C=Z(this).val();return C==null?null:Z.isArray(C)?Z.map(C,function(D){return{name:B.name,value:D}}):{name:B.name,value:C}}).get()}});Z.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(C,B){Z.fn[B]=function(D){return this.bind(B,D)}});Z.extend({get:function(E,B,C,D){if(Z.isFunction(B)){D=D||C;C=B;B=null}return Z.ajax({type:"GET",url:E,data:B,success:C,dataType:D})},getScript:function(C,B){return Z.get(C,null,B,"script")},getJSON:function(D,B,C){return Z.get(D,B,C,"json")},post:function(E,B,C,D){if(Z.isFunction(B)){D=D||C;C=B;B={}}return Z.ajax({type:"POST",url:E,data:B,success:C,dataType:D})},ajaxSetup:function(B){Z.extend(Z.ajaxSettings,B)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:Br.XMLHttpRequest&&(Br.location.protocol!=="file:"||!Br.ActiveXObject)?function(){return new Br.XMLHttpRequest}:function(){try{return new Br.ActiveXObject("Microsoft.XMLHTTP")}catch(B){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(C){function i(){n.success&&n.success.call(S,d,I,k);n.global&&D("ajaxSuccess",[k,n])}function l(){n.complete&&n.complete.call(S,k,I);n.global&&D("ajaxComplete",[k,n]);n.global&&!--Z.active&&Z.event.trigger("ajaxStop")}function D(p,o){(n.context?Z(n.context):Z.event).trigger(p,o)}var n=Z.extend(true,{},Z.ajaxSettings,C),M,I,d,S=C&&C.context||n,b=n.type.toUpperCase();if(n.data&&n.processData&&typeof n.data!=="string"){n.data=Z.param(n.data,n.traditional)}if(n.dataType==="jsonp"){if(b==="GET"){CD.test(n.url)||(n.url+=(BX.test(n.url)?"&":"?")+(n.jsonp||"callback")+"=?")}else{if(!n.data||!CD.test(n.data)){n.data=(n.data?n.data+"&":"")+(n.jsonp||"callback")+"=?"}}n.dataType="json"}if(n.dataType==="json"&&(n.data&&CD.test(n.data)||CD.test(n.url))){M=n.jsonpCallback||"jsonp"+AM++;if(n.data){n.data=(n.data+"").replace(CD,"="+M+"$1")}n.url=n.url.replace(CD,"="+M+"$1");n.dataType="script";Br[M]=Br[M]||function(p){d=p;i();l();Br[M]=AR;try{delete Br[M]}catch(o){}m&&m.removeChild(g)}}if(n.dataType==="script"&&n.cache===null){n.cache=false}if(n.cache===false&&b==="GET"){var f=B3(),j=n.url.replace(BS,"$1_="+f+"$2");n.url=j+(j===n.url?(BX.test(n.url)?"&":"?")+"_="+f:"")}if(n.data&&b==="GET"){n.url+=(BX.test(n.url)?"&":"?")+n.data}n.global&&!Z.active++&&Z.event.trigger("ajaxStart");f=(f=Be.exec(n.url))&&(f[1]&&f[1]!==location.protocol||f[2]!==location.host);if(n.dataType==="script"&&b==="GET"&&f){var m=AQ.getElementsByTagName("head")[0]||AQ.documentElement,g=AQ.createElement("script");g.src=n.url;if(n.scriptCharset){g.charset=n.scriptCharset}if(!M){var e=false;g.onload=g.onreadystatechange=function(){if(!e&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){e=true;i();l();g.onload=g.onreadystatechange=null;m&&g.parentNode&&m.removeChild(g)}}}m.insertBefore(g,m.firstChild);return AR}var h=false,k=n.xhr();if(k){n.username?k.open(b,n.url,n.async,n.username,n.password):k.open(b,n.url,n.async);try{if(n.data||C&&C.contentType){k.setRequestHeader("Content-Type",n.contentType)}if(n.ifModified){Z.lastModified[n.url]&&k.setRequestHeader("If-Modified-Since",Z.lastModified[n.url]);Z.etag[n.url]&&k.setRequestHeader("If-None-Match",Z.etag[n.url])}f||k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("Accept",n.dataType&&n.accepts[n.dataType]?n.accepts[n.dataType]+", */*":n.accepts._default)}catch(B){}if(n.beforeSend&&n.beforeSend.call(S,k,n)===false){n.global&&!--Z.active&&Z.event.trigger("ajaxStop");k.abort();return false}n.global&&D("ajaxSend",[k,n]);var E=k.onreadystatechange=function(p){if(!k||k.readyState===0||p==="abort"){h||l();h=true;if(k){k.onreadystatechange=Z.noop}}else{if(!h&&k&&(k.readyState===4||p==="timeout")){h=true;k.onreadystatechange=Z.noop;I=p==="timeout"?"timeout":!Z.httpSuccess(k)?"error":n.ifModified&&Z.httpNotModified(k,n.url)?"notmodified":"success";var o;if(I==="success"){try{d=Z.httpData(k,n.dataType,n)}catch(q){I="parsererror";o=q}}if(I==="success"||I==="notmodified"){M||i()}else{Z.handleError(n,k,I,o)}l();p==="timeout"&&k.abort();if(n.async){k=null}}}};try{var H=k.abort;k.abort=function(){k&&H.call(k);E("abort")}}catch(U){}n.async&&n.timeout>0&&setTimeout(function(){k&&!h&&E("timeout")},n.timeout);try{k.send(b==="POST"||b==="PUT"||b==="DELETE"?n.data:null)}catch(a){Z.handleError(n,k,null,a);l()}n.async||E();return k}},handleError:function(E,B,C,D){if(E.error){E.error.call(E.context||E,B,C,D)}if(E.global){(E.context?Z(E.context):Z.event).trigger("ajaxError",[B,E,D])}},active:0,httpSuccess:function(C){try{return !C.status&&location.protocol==="file:"||C.status>=200&&C.status<300||C.status===304||C.status===1223||C.status===0}catch(B){}return false},httpNotModified:function(E,B){var C=E.getResponseHeader("Last-Modified"),D=E.getResponseHeader("Etag");if(C){Z.lastModified[B]=C}if(D){Z.etag[B]=D}return E.status===304||E.status===0},httpData:function(H,B,C){var E=H.getResponseHeader("content-type")||"",D=B==="xml"||!B&&E.indexOf("xml")>=0;H=D?H.responseXML:H.responseText;D&&H.documentElement.nodeName==="parsererror"&&Z.error("parsererror");if(C&&C.dataFilter){H=C.dataFilter(H,B)}if(typeof H==="string"){if(B==="json"||!B&&E.indexOf("json")>=0){H=Z.parseJSON(H)}else{if(B==="script"||!B&&E.indexOf("javascript")>=0){Z.globalEval(H)}}}return H},param:function(I,C){function B(S,M){if(Z.isArray(M)){Z.each(M,function(a,U){C||/\[\]$/.test(S)?E(S,U):B(S+"["+(typeof U==="object"||Z.isArray(U)?a:"")+"]",U)})}else{!C&&M!=null&&typeof M==="object"?Z.each(M,function(a,U){B(S+"["+a+"]",U)}):E(S,M)}}function E(S,M){M=Z.isFunction(M)?M():M;D[D.length]=encodeURIComponent(S)+"="+encodeURIComponent(M)}var D=[];if(C===AR){C=Z.ajaxSettings.traditional}if(Z.isArray(I)||I.jquery){Z.each(I,function(){E(this.name,this.value)})}else{for(var H in I){B(H,I[H])}}return D.join("&").replace(AJ,"+")}});var B6={},AE=/toggle|show|hide/,Bi=/^([+-]=)?([\d+-.]+)(.*)$/,O,AU=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];Z.fn.extend({show:function(H,B){if(H||H===0){return this.animate(CB("show",3),H,B)}else{H=0;for(B=this.length;H<B;H++){var C=Z.data(this[H],"olddisplay");this[H].style.display=C||"";if(Z.css(this[H],"display")==="none"){C=this[H].nodeName;var E;if(B6[C]){E=B6[C]}else{var D=Z("<"+C+" />").appendTo("body");E=D.css("display");if(E==="none"){E="block"}D.remove();B6[C]=E}Z.data(this[H],"olddisplay",E)}}H=0;for(B=this.length;H<B;H++){this[H].style.display=Z.data(this[H],"olddisplay")||""}return this}},hide:function(D,B){if(D||D===0){return this.animate(CB("hide",3),D,B)}else{D=0;for(B=this.length;D<B;D++){var C=Z.data(this[D],"olddisplay");!C&&C!=="none"&&Z.data(this[D],"olddisplay",Z.css(this[D],"display"))}D=0;for(B=this.length;D<B;D++){this[D].style.display="none"}return this}},_toggle:Z.fn.toggle,toggle:function(D,B){var C=typeof D==="boolean";if(Z.isFunction(D)&&Z.isFunction(B)){this._toggle.apply(this,arguments)}else{D==null||C?this.each(function(){var E=C?D:Z(this).is(":hidden");Z(this)[E?"show":"hide"]()}):this.animate(CB("toggle",3),D,B)}return this},fadeTo:function(D,B,C){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:B},D,C)},animate:function(H,B,C,E){var D=Z.speed(B,C,E);if(Z.isEmptyObject(H)){return this.each(D.complete)}return this[D.queue===false?"each":"queue"](function(){var a=Z.extend({},D),U,S=this.nodeType===1&&Z(this).is(":hidden"),I=this;for(U in H){var M=U.replace(AC,BL);if(U!==M){H[M]=H[U];delete H[U];U=M}if(H[U]==="hide"&&S||H[U]==="show"&&!S){return a.complete.call(this)}if((U==="height"||U==="width")&&this.style){a.display=Z.css(this,"display");a.overflow=this.style.overflow}if(Z.isArray(H[U])){(a.specialEasing=a.specialEasing||{})[U]=H[U][1];H[U]=H[U][0]}}if(a.overflow!=null){this.style.overflow="hidden"}a.curAnim=Z.extend({},H);Z.each(H,function(e,f){var h=new Z.fx(I,a,e);if(AE.test(f)){h[f==="toggle"?S?"show":"hide":f](H)}else{var b=Bi.exec(f),g=h.cur(true)||0;if(b){f=parseFloat(b[2]);var d=b[3]||"px";if(d!=="px"){I.style[e]=(f||1)+d;g=(f||1)/h.cur(true)*g;I.style[e]=g+d}if(b[1]){f=(b[1]==="-="?-1:1)*f+g}h.custom(g,f,d)}else{h.custom(g,f,"")}}});return true})},stop:function(D,B){var C=Z.timers;D&&this.queue([]);this.each(function(){for(var E=C.length-1;E>=0;E--){if(C[E].elem===this){B&&C[E](true);C.splice(E,1)}}});B||this.dequeue();return this}});Z.each({slideDown:CB("show",1),slideUp:CB("hide",1),slideToggle:CB("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(C,B){Z.fn[C]=function(D,E){return this.animate(B,D,E)}});Z.extend({speed:function(E,B,C){var D=E&&typeof E==="object"?E:{complete:C||!C&&B||Z.isFunction(E)&&E,duration:E,easing:C&&B||B&&!Z.isFunction(B)&&B};D.duration=Z.fx.off?0:typeof D.duration==="number"?D.duration:Z.fx.speeds[D.duration]||Z.fx.speeds._default;D.old=D.complete;D.complete=function(){D.queue!==false&&Z(this).dequeue();Z.isFunction(D.old)&&D.old.call(this)};return D},easing:{linear:function(E,B,C,D){return C+D*E},swing:function(E,B,C,D){return(-Math.cos(E*Math.PI)/2+0.5)*D+C}},timers:[],fx:function(D,B,C){this.options=B;this.elem=D;this.prop=C;if(!B.orig){B.orig={}}}});Z.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(Z.fx.step[this.prop]||Z.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(B){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}return(B=parseFloat(Z.css(this.elem,this.prop,B)))&&B>-10000?B:parseFloat(Z.curCSS(this.elem,this.prop))||0},custom:function(H,B,C){function E(I){return D.step(I)}this.startTime=B3();this.start=H;this.end=B;this.unit=C||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;E.elem=this.elem;if(E()&&Z.timers.push(E)&&!O){O=setInterval(Z.fx.tick,13)}},show:function(){this.options.orig[this.prop]=Z.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());Z(this.elem).show()},hide:function(){this.options.orig[this.prop]=Z.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var B=B3(),C=true;if(H||B>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){C=false}}if(C){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;H=Z.data(this.elem,"olddisplay");this.elem.style.display=H?H:this.options.display;if(Z.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&Z(this.elem).hide();if(this.options.hide||this.options.show){for(var D in this.options.curAnim){Z.style(this.elem,D,this.options.orig[D])}}this.options.complete.call(this.elem)}return false}else{D=B-this.startTime;this.state=D/this.options.duration;H=this.options.easing||(Z.easing.swing?"swing":"linear");this.pos=Z.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||H](this.state,D,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};Z.extend(Z.fx,{tick:function(){for(var C=Z.timers,B=0;B<C.length;B++){C[B]()||C.splice(B--,1)}C.length||Z.fx.stop()},stop:function(){clearInterval(O);O=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(B){Z.style(B.elem,"opacity",B.now)},_default:function(B){if(B.elem.style&&B.elem.style[B.prop]!=null){B.elem.style[B.prop]=(B.prop==="width"||B.prop==="height"?Math.max(0,B.now):B.now)+B.unit}else{B.elem[B.prop]=B.now}}}});if(Z.expr&&Z.expr.filters){Z.expr.filters.animated=function(B){return Z.grep(Z.timers,function(C){return B===C.elem}).length}}Z.fn.offset="getBoundingClientRect" in AQ.documentElement?function(E){var B=this[0];if(E){return this.each(function(H){Z.offset.setOffset(this,E,H)})}if(!B||!B.ownerDocument){return null}if(B===B.ownerDocument.body){return Z.offset.bodyOffset(B)}var C=B.getBoundingClientRect(),D=B.ownerDocument;B=D.body;D=D.documentElement;return{top:C.top+(self.pageYOffset||Z.support.boxModel&&D.scrollTop||B.scrollTop)-(D.clientTop||B.clientTop||0),left:C.left+(self.pageXOffset||Z.support.boxModel&&D.scrollLeft||B.scrollLeft)-(D.clientLeft||B.clientLeft||0)}}:function(C){var D=this[0];if(C){return this.each(function(b){Z.offset.setOffset(this,C,b)})}if(!D||!D.ownerDocument){return null}if(D===D.ownerDocument.body){return Z.offset.bodyOffset(D)}Z.offset.initialize();var E=D.offsetParent,I=D,H=D.ownerDocument,S,M=H.documentElement,B=H.body;I=(H=H.defaultView)?H.getComputedStyle(D,null):D.currentStyle;for(var U=D.offsetTop,a=D.offsetLeft;(D=D.parentNode)&&D!==B&&D!==M;){if(Z.offset.supportsFixedPosition&&I.position==="fixed"){break}S=H?H.getComputedStyle(D,null):D.currentStyle;U-=D.scrollTop;a-=D.scrollLeft;if(D===E){U+=D.offsetTop;a+=D.offsetLeft;if(Z.offset.doesNotAddBorder&&!(Z.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(D.nodeName))){U+=parseFloat(S.borderTopWidth)||0;a+=parseFloat(S.borderLeftWidth)||0}I=E;E=D.offsetParent}if(Z.offset.subtractsBorderForOverflowNotVisible&&S.overflow!=="visible"){U+=parseFloat(S.borderTopWidth)||0;a+=parseFloat(S.borderLeftWidth)||0}I=S}if(I.position==="relative"||I.position==="static"){U+=B.offsetTop;a+=B.offsetLeft}if(Z.offset.supportsFixedPosition&&I.position==="fixed"){U+=Math.max(M.scrollTop,B.scrollTop);a+=Math.max(M.scrollLeft,B.scrollLeft)}return{top:U,left:a}};Z.offset={initialize:function(){var I=AQ.body,C=AQ.createElement("div"),B,E,D,H=parseFloat(Z.curCSS(I,"marginTop",true))||0;Z.extend(C.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});C.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";I.insertBefore(C,I.firstChild);B=C.firstChild;E=B.firstChild;D=B.nextSibling.firstChild.firstChild;this.doesNotAddBorder=E.offsetTop!==5;this.doesAddBorderForTableAndCells=D.offsetTop===5;E.style.position="fixed";E.style.top="20px";this.supportsFixedPosition=E.offsetTop===20||E.offsetTop===15;E.style.position=E.style.top="";B.style.overflow="hidden";B.style.position="relative";this.subtractsBorderForOverflowNotVisible=E.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=I.offsetTop!==H;I.removeChild(C);Z.offset.initialize=Z.noop},bodyOffset:function(D){var B=D.offsetTop,C=D.offsetLeft;Z.offset.initialize();if(Z.offset.doesNotIncludeMarginInBodyOffset){B+=parseFloat(Z.curCSS(D,"marginTop",true))||0;C+=parseFloat(Z.curCSS(D,"marginLeft",true))||0}return{top:B,left:C}},setOffset:function(I,C,M){if(/static/.test(Z.curCSS(I,"position"))){I.style.position="relative"}var D=Z(I),B=D.offset(),H=parseInt(Z.curCSS(I,"top",true),10)||0,E=parseInt(Z.curCSS(I,"left",true),10)||0;if(Z.isFunction(C)){C=C.call(I,M,B)}M={top:C.top-B.top+H,left:C.left-B.left+E};"using" in C?C.using.call(I,M):D.css(M)}};Z.fn.extend({position:function(){if(!this[0]){return null}var E=this[0],B=this.offsetParent(),C=this.offset(),D=/^body|html$/i.test(B[0].nodeName)?{top:0,left:0}:B.offset();C.top-=parseFloat(Z.curCSS(E,"marginTop",true))||0;C.left-=parseFloat(Z.curCSS(E,"marginLeft",true))||0;D.top+=parseFloat(Z.curCSS(B[0],"borderTopWidth",true))||0;D.left+=parseFloat(Z.curCSS(B[0],"borderLeftWidth",true))||0;return{top:C.top-D.top,left:C.left-D.left}},offsetParent:function(){return this.map(function(){for(var B=this.offsetParent||AQ.body;B&&!/^body|html$/i.test(B.nodeName)&&Z.css(B,"position")==="static";){B=B.offsetParent}return B})}});Z.each(["Left","Top"],function(D,B){var C="scroll"+B;Z.fn[C]=function(H){var E=this[0],I;if(!E){return null}if(H!==AR){return this.each(function(){if(I=BR(this)){I.scrollTo(!D?H:Z(I).scrollLeft(),D?H:Z(I).scrollTop())}else{this[C]=H}})}else{return(I=BR(E))?"pageXOffset" in I?I[D?"pageYOffset":"pageXOffset"]:Z.support.boxModel&&I.document.documentElement[C]||I.document.body[C]:E[C]}}});Z.each(["Height","Width"],function(D,B){var C=B.toLowerCase();Z.fn["inner"+B]=function(){return this[0]?Z.css(this[0],C,false,"padding"):null};Z.fn["outer"+B]=function(E){return this[0]?Z.css(this[0],C,false,E?"margin":"border"):null};Z.fn[C]=function(H){var E=this[0];if(!E){return H==null?null:this}if(Z.isFunction(H)){return this.each(function(I){var M=Z(this);M[C](H.call(this,I,M[C]()))})}return"scrollTo" in E&&E.document?E.document.compatMode==="CSS1Compat"&&E.document.documentElement["client"+B]||E.document.body["client"+B]:E.nodeType===9?Math.max(E.documentElement["client"+B],E.body["scroll"+B],E.documentElement["scroll"+B],E.body["offset"+B],E.documentElement["offset"+B]):H===AR?Z.css(E,C):this.css(C,typeof H==="string"?H:H+"px")}});Br.jQuery=Br.$=Z})(window);var J=jQuery.noConflict();J.fn.droppy=function(A){A=J.extend({speed:250},A||{});this.each(function(){var C=this,G=1000;function F(I){if(I.nodeName.toLowerCase()=="li"){var H=J("> ul",I);return H.length?H[0]:null}else{return I}}function D(H){if(H.nodeName.toLowerCase()=="ul"){return J(H).parents("li")[0]}else{return H}}function E(){var H=F(this);if(!H){return }J.data(H,"cancelHide",false);setTimeout(function(){if(!J.data(H,"cancelHide")){J(H).fadeOut(A.speed)}},500)}function B(){var I=F(this);if(!I){return }J.data(I,"cancelHide",true);J(I).css({zIndex:G++}).fadeIn(A.speed);if(this.nodeName.toLowerCase()=="ul"){var H=D(this);J(H).addClass("hover");J("> a",H).addClass("hover")}}J("ul, li",this).hover(B,E);J("li",this).hover(function(){J(this).addClass("hover");J("> a",this).addClass("hover")},function(){J(this).removeClass("hover");J("> a",this).removeClass("hover")});J("li",this).each(function(){var H=J(this).find("ul");if(H.html()){J(">a",this).append('<img src="templates/tbg/images/arrow.gif" alt="" align="right" style="vertical-align:bottom;"/>')}})})};J(document).ready(function(){J("#nav").droppy()});J(document).ready(function(){if(J("#map_canvas").get(0)!=undefined){var G='<h2 style="margin:0">New Medical Health Care</h2>Come see our West location.<br/>Questions? More info?<br/><br/>Email us at: <a href="mailto:info@newmedicalhealthcare.com">info@newmedicalhealthcare.com</a>';var C=new google.maps.LatLng(37.722087,-97.427337);var D=new google.maps.LatLng(37.722087,-97.427337);var B={zoom:15,center:D,mapTypeId:google.maps.MapTypeId.ROADMAP};var F=new google.maps.Map(J("#map_canvas").get(0),B);var A=new google.maps.Marker({position:C,map:F});var E=new google.maps.InfoWindow({content:G});E.open(F,A)}});