/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();

//----------------------------------------------------------------------------------------------------
// Must be included after jQuery is defined
//----------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------
// jQuery function for sliding and toggling together.  Used for hints.
jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
    return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); 
};

/**
 * Ajax Queue Plugin
 * 
 * Homepage: http://jquery.com/plugins/project/ajaxqueue
 * Documentation: http://docs.jquery.com/AjaxQueue
 */

/**

<script>
$(function(){
	jQuery.ajaxQueue({
		url: "test.php",
		success: function(html){ jQuery("ul").append(html); }
	});
	jQuery.ajaxQueue({
		url: "test.php",
		success: function(html){ jQuery("ul").append(html); }
	});
	jQuery.ajaxSync({
		url: "test.php",
		success: function(html){ jQuery("ul").append("<b>"+html+"</b>"); }
	});
	jQuery.ajaxSync({
		url: "test.php",
		success: function(html){ jQuery("ul").append("<b>"+html+"</b>"); }
	});
});
</script>
<ul style="position: absolute; top: 5px; right: 5px;"></ul>

 */
/*
 * Queued Ajax requests.
 * A new Ajax request won't be started until the previous queued 
 * request has finished.
 */

/*
 * Synced Ajax requests.
 * The Ajax request will happen as soon as you call this method, but
 * the callbacks (success/error/complete) won't fire until all previous
 * synced requests have been completed.
 */


(function($) {
	
	var ajax = $.ajax;
	
	var pendingRequests = {};
	
	var synced = [];
	var syncedData = [];
	
	$.ajax = function(settings) {
		// create settings for compatibility with ajaxSetup
		settings = jQuery.extend(settings, jQuery.extend({}, jQuery.ajaxSettings, settings));
		
		var port = settings.port;
		
		switch(settings.mode) {
		case "abort": 
			if ( pendingRequests[port] ) {
				pendingRequests[port].abort();
			}
			return pendingRequests[port] = ajax.apply(this, arguments);
		case "queue": 
			var _old = settings.complete;
			settings.complete = function(){
				if ( _old )
					_old.apply( this, arguments );
				jQuery([ajax]).dequeue("ajax" + port );;
			};
		
			jQuery([ ajax ]).queue("ajax" + port, function(){
				ajax( settings );
			});
			return;
		case "sync":
			var pos = synced.length;
	
			synced[ pos ] = {
				error: settings.error,
				success: settings.success,
				complete: settings.complete,
				done: false
			};
		
			syncedData[ pos ] = {
				error: [],
				success: [],
				complete: []
			};
		
			settings.error = function(){ syncedData[ pos ].error = arguments; };
			settings.success = function(){ syncedData[ pos ].success = arguments; };
			settings.complete = function(){
				syncedData[ pos ].complete = arguments;
				synced[ pos ].done = true;
		
				if ( pos == 0 || !synced[ pos-1 ] )
					for ( var i = pos; i < synced.length && synced[i].done; i++ ) {
						if ( synced[i].error ) synced[i].error.apply( jQuery, syncedData[i].error );
						if ( synced[i].success ) synced[i].success.apply( jQuery, syncedData[i].success );
						if ( synced[i].complete ) synced[i].complete.apply( jQuery, syncedData[i].complete );
		
						synced[i] = null;
						syncedData[i] = null;
					}
			};
		}
		return ajax.apply(this, arguments);
	};
	
})(jQuery);

/*
 * Autocomplete - jQuery plugin 1.0.2
 *
 * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.autocomplete.js 5751 2008-06-26 20:12:49Z joern.zaefferer $
 *
 */

;(function($) {
	
$.fn.extend({
	autocomplete: function(urlOrData, options) {
		var isUrl = typeof urlOrData == "string";
		options = $.extend({}, $.Autocompleter.defaults, {
			url: isUrl ? urlOrData : null,
			data: isUrl ? null : urlOrData,
			delay: isUrl ? $.Autocompleter.defaults.delay : 10,
			max: options && !options.scroll ? 10 : 150,
			lastSubmittedData: ''
		}, options);
		
		// if highlight is set to false, replace it with a do-nothing function
		options.highlight = options.highlight || function(value) { return value; };
		
		// if the formatMatch option is not specified, then use formatItem for backwards compatibility
		options.formatMatch = options.formatMatch || options.formatItem;
		
		return this.each(function() {
			new $.Autocompleter(this, options);
		});
	},
	result: function(handler) {
		return this.bind("result", handler);
	},
	search: function(handler) {
		return this.trigger("search", [handler]);
	},
	flushCache: function() {
		return this.trigger("flushCache");
	},
	setOptions: function(options){
		return this.trigger("setOptions", [options]);
	},
	unautocomplete: function() {
		return this.trigger("unautocomplete");
	}
});

$.Autocompleter = function(input, options) {

	var KEY = {
		UP: 38,
		DOWN: 40,
		DEL: 46,
		TAB: 9,
		RETURN: 13,
		ESC: 27,
		COMMA: 188,
		PAGEUP: 33,
		PAGEDOWN: 34,
		BACKSPACE: 8
	};

	// Create $ object for input element
	var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);

	var timeout;
	var previousValue = "";
	var cache = $.Autocompleter.Cache(options);
	var hasFocus = 0;
	var lastKeyPressCode;
	var config = {
		mouseDownOnSelect: false
	};
	var select = $.Autocompleter.Select(options, input, selectCurrent, config);
	
	var blockSubmit;
	
	// prevent form submit in opera when selecting with return key
	$.browser.opera && $(input.form).bind("submit.autocomplete", function() {
		if (blockSubmit) {
			blockSubmit = false;
			return false;
		}
	});
	
	// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
	$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
		// track last key pressed
		lastKeyPressCode = event.keyCode;
		switch(event.keyCode) {
		
			case KEY.UP:
				event.preventDefault();
				if ( select.visible() ) {
					select.prev();
				} else {
					onChange(0, true);
				}
				break;
				
			case KEY.DOWN:
				event.preventDefault();
				if ( select.visible() ) {
					select.next();
				} else {
					onChange(0, true);
				}
				break;
				
			case KEY.PAGEUP:
				event.preventDefault();
				if ( select.visible() ) {
					select.pageUp();
				} else {
					onChange(0, true);
				}
				break;
				
			case KEY.PAGEDOWN:
				event.preventDefault();
				if ( select.visible() ) {
					select.pageDown();
				} else {
					onChange(0, true);
				}
				break;
			
			// matches also semicolon
			case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
			case KEY.TAB:
			case KEY.RETURN:
				if( selectCurrent() ) {
					// stop default to prevent a form submit, Opera needs special handling
					event.preventDefault();
					blockSubmit = true;
					return false;
				}
				break;
				
			case KEY.ESC:
				select.hide();
				break;
				
			default:
				clearTimeout(timeout);
				timeout = setTimeout(onChange, options.delay);
				break;
		}
	}).focus(function(){
		// track whether the field has focus, we shouldn't process any
		// results if the field no longer has focus
		hasFocus++;
	}).blur(function() {
		hasFocus = 0;
		if (!config.mouseDownOnSelect) {
			hideResults();
		}
	}).click(function() {
		// show select when clicking in a focused field
		if ( hasFocus++ > 1 && !select.visible() ) {
			onChange(0, true);
		}
	}).bind("search", function() {
		// TODO why not just specifying both arguments?
		var fn = (arguments.length > 1) ? arguments[1] : null;
		function findValueCallback(q, data) {
			var result;
			if( data && data.length ) {
				for (var i=0; i < data.length; i++) {
					if( data[i].result.toLowerCase() == q.toLowerCase() ) {
						result = data[i];
						break;
					}
				}
			}
			if( typeof fn == "function" ) fn(result);
			else $input.trigger("result", result && [result.data, result.value]);
		}
		$.each(trimWords($input.val()), function(i, value) {
			request(value, findValueCallback, findValueCallback);
		});
	}).bind("flushCache", function() {
		cache.flush();
	}).bind("setOptions", function() {
		$.extend(options, arguments[1]);
		// if we've updated the data, repopulate
		if ( "data" in arguments[1] )
			cache.populate();
	}).bind("unautocomplete", function() {
		select.unbind();
		$input.unbind();
		$(input.form).unbind(".autocomplete");
	});
	
	
	function selectCurrent() {
		var selected = select.selected();
		if( !selected )
			return false;
		
		var v = selected.result;
		previousValue = v;
		
		if ( options.multiple ) {
			var words = trimWords($input.val());
			if ( words.length > 1 ) {
				v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v;
			}
			v += options.multipleSeparator;
		}
		
		$input.val(v);
		hideResultsNow();
		$input.trigger("result", [selected.data, selected.value]);
		return true;
	}
	
	function onChange(crap, skipPrevCheck) {
		if( lastKeyPressCode == KEY.DEL ) {
			select.hide();
			return;
		}
		
		var currentValue = $input.val();
		
		if ( !skipPrevCheck && currentValue == previousValue )
			return;
		
		previousValue = currentValue;
		
		currentValue = lastWord(currentValue);
		if ( currentValue.length >= options.minChars) {
			$input.addClass(options.loadingClass);
			if (!options.matchCase)
				currentValue = currentValue.toLowerCase();
			request(currentValue, receiveData, hideResultsNow);
		} else {
			stopLoading();
			select.hide();
		}
	};
	
	function trimWords(value) {
		if ( !value ) {
			return [""];
		}
		var words = value.split( options.multipleSeparator );
		var result = [];
		$.each(words, function(i, value) {
			if ( $.trim(value) )
				result[i] = $.trim(value);
		});
		return result;
	}
	
	function lastWord(value) {
		if ( !options.multiple )
			return value;
		var words = trimWords(value);
		return words[words.length - 1];
	}
	
	// fills in the input box w/the first match (assumed to be the best match)
	// q: the term entered
	// sValue: the first matching result
	function autoFill(q, sValue){
		// autofill in the complete box w/the first match as long as the user hasn't entered in more data
		// if the last user key pressed was backspace, don't autofill
		if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
			// fill in the value (keep the case the user has typed)
			$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
			// select the portion of the value not typed by the user (so the next character will erase)
			$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length);
		}
	};

	function hideResults() {
		clearTimeout(timeout);
		timeout = setTimeout(hideResultsNow, 200);
	};

	function hideResultsNow() {
		var wasVisible = select.visible();
		select.hide();
		clearTimeout(timeout);
		stopLoading();
		if (options.mustMatch) {
			// call search and run callback
			$input.search(
				function (result){
					// if no value found, clear the input box
					if( !result ) {
						if (options.multiple) {
							var words = trimWords($input.val()).slice(0, -1);
							$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
						}
						else
							$input.val( "" );
					}
				}
			);
		}
		if (wasVisible)
			// position cursor at end of input field
			$.Autocompleter.Selection(input, input.value.length, input.value.length);
	};

	function receiveData(q, data) {
		if ( data && data.length && hasFocus ) {
			stopLoading();
			select.display(data, q);
			autoFill(q, data[0].value);
			select.show();
		} else {
			hideResultsNow();
		}
	};

	function request(term, success, failure) {
		if (!options.matchCase)
			term = term.toLowerCase();
		var data = cache.load(term);
		// recieve the cached data
		if (data && data.length) {
			success(term, data);
		// if an AJAX url has been supplied, try loading the data now
		} else if( (typeof options.url == "string") && (options.url.length > 0) && (options.lastSubmittedData != term)){
			// Ensure we won't resubmit this under any circumstances (such as a double click) if the user hasn't changed their query term 
			options.lastSubmittedData = term;
			
			var extraParams = {
				timestamp: +new Date()
			};
			$.each(options.extraParams, function(key, param) {
				extraParams[key] = typeof param == "function" ? param() : param;
			});
			
			$.ajax({
				// try to leverage ajaxQueue plugin to abort previous requests
				mode: "abort",
				// limit abortion to this input
				port: "autocomplete" + input.name,
				dataType: options.dataType,
				url: options.url,
				data: $.extend({
					q: lastWord(term),
					limit: options.max
				}, extraParams),
				success: function(data) {
					var parsed = options.parse && options.parse(data) || parse(data);
					cache.add(term, parsed);
					success(term, parsed);
				}
			});
		} else {
			// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
			select.emptyList();
			failure(term);
		}
	};
	
	function parse(data) {
		var parsed = [];
		var rows = data.split("\n");
		for (var i=0; i < rows.length; i++) {
			var row = $.trim(rows[i]);
			if (row) {
				row = row.split("|");
				parsed[parsed.length] = {
					data: row,
					value: row[0],
					result: options.formatResult && options.formatResult(row, row[0]) || row[0]
				};
			}
		}
		return parsed;
	};

	function stopLoading() {
		$input.removeClass(options.loadingClass);
	};

};

$.Autocompleter.defaults = {
	inputClass: "ac_input",
	resultsClass: "ac_results",
	loadingClass: "ac_loading",
	minChars: 1,
	delay: 400,
	matchCase: false,
	matchSubset: true,
	matchContains: false,
	cacheLength: 10,
	max: 100,
	mustMatch: false,
	extraParams: {},
	selectFirst: true,
	formatItem: function(row) { return row[0]; },
	formatMatch: null,
	autoFill: false,
	width: 0,
	multiple: false,
	multipleSeparator: ", ",
	highlight: function(value, term) {
		return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
	},
    scroll: true,
    scrollHeight: 180
};

$.Autocompleter.Cache = function(options) {

	var data = {};
	var length = 0;
	
	function matchSubset(s, sub) {
		if (!options.matchCase) 
			s = s.toLowerCase();
		var i = s.indexOf(sub);
		if (i == -1) return false;
		return i == 0 || options.matchContains;
	};
	
	function add(q, value) {
		if (length > options.cacheLength){
			flush();
		}
		if (!data[q]){ 
			length++;
		}
		data[q] = value;
	}
	
	function populate(){
		if( !options.data ) return false;
		// track the matches
		var stMatchSets = {},
			nullData = 0;

		// no url was specified, we need to adjust the cache length to make sure it fits the local data store
		if( !options.url ) options.cacheLength = 1;
		
		// track all options for minChars = 0
		stMatchSets[""] = [];
		
		// loop through the array and create a lookup structure
		for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
			var rawValue = options.data[i];
			// if rawValue is a string, make an array otherwise just reference the array
			rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
			
			var value = options.formatMatch(rawValue, i+1, options.data.length);
			if ( value === false )
				continue;
				
			var firstChar = value.charAt(0).toLowerCase();
			// if no lookup array for this character exists, look it up now
			if( !stMatchSets[firstChar] ) 
				stMatchSets[firstChar] = [];

			// if the match is a string
			var row = {
				value: value,
				data: rawValue,
				result: options.formatResult && options.formatResult(rawValue) || value
			};
			
			// push the current match into the set list
			stMatchSets[firstChar].push(row);

			// keep track of minChars zero items
			if ( nullData++ < options.max ) {
				stMatchSets[""].push(row);
			}
		};

		// add the data items to the cache
		$.each(stMatchSets, function(i, value) {
			// increase the cache size
			options.cacheLength++;
			// add to the cache
			add(i, value);
		});
	}
	
	// populate any existing data
	setTimeout(populate, 25);
	
	function flush(){
		data = {};
		length = 0;
	}
	
	return {
		flush: flush,
		add: add,
		populate: populate,
		load: function(q) {
			if (!options.cacheLength || !length)
				return null;
			/* 
			 * if dealing w/local data and matchContains than we must make sure
			 * to loop through all the data collections looking for matches
			 */
			if( !options.url && options.matchContains ){
				// track all matches
				var csub = [];
				// loop through all the data grids for matches
				for( var k in data ){
					// don't search through the stMatchSets[""] (minChars: 0) cache
					// this prevents duplicates
					if( k.length > 0 ){
						var c = data[k];
						$.each(c, function(i, x) {
							// if we've got a match, add it to the array
							if (matchSubset(x.value, q)) {
								csub.push(x);
							}
						});
					}
				}				
				return csub;
			} else 
			// if the exact item exists, use it
			if (data[q]){
				return data[q];
			} else
			if (options.matchSubset) {
				for (var i = q.length - 1; i >= options.minChars; i--) {
					var c = data[q.substr(0, i)];
					if (c) {
						var csub = [];
						$.each(c, function(i, x) {
							if (matchSubset(x.value, q)) {
								csub[csub.length] = x;
							}
						});
						return csub;
					}
				}
			}
			return null;
		}
	};
};

$.Autocompleter.Select = function (options, input, select, config) {
	var CLASSES = {
		ACTIVE: "ac_over"
	};
	
	var listItems,
		active = -1,
		data,
		term = "",
		needsInit = true,
		element,
		list;
	
	// Create results
	function init() {
		if (!needsInit)
			return;
		element = $("<div/>")
		.hide()
		.addClass(options.resultsClass)
		.css("position", "absolute")
		.appendTo(document.body);
	
		list = $("<ul/>").appendTo(element).mouseover( function(event) {
			if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
	            active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
			    $(target(event)).addClass(CLASSES.ACTIVE);            
	        }
		}).click(function(event) {
			$(target(event)).addClass(CLASSES.ACTIVE);
			select();
			// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
			input.focus();
			return false;
		}).mousedown(function() {
			config.mouseDownOnSelect = true;
		}).mouseup(function() {
			config.mouseDownOnSelect = false;
		});
		
		if( options.width > 0 )
			element.css("width", options.width);
			
		needsInit = false;
	} 
	
	function target(event) {
		var element = event.target;
		while(element && element.tagName != "LI")
			element = element.parentNode;
		// more fun with IE, sometimes event.target is empty, just ignore it then
		if(!element)
			return [];
		return element;
	}

	function moveSelect(step) {
		listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
		movePosition(step);
        var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
        if(options.scroll) {
            var offset = 0;
            listItems.slice(0, active).each(function() {
				offset += this.offsetHeight;
			});
            if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
                list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
            } else if(offset < list.scrollTop()) {
                list.scrollTop(offset);
            }
        }
	};
	
	function movePosition(step) {
		active += step;
		if (active < 0) {
			active = listItems.size() - 1;
		} else if (active >= listItems.size()) {
			active = 0;
		}
	}
	
	function limitNumberOfItems(available) {
		return options.max && options.max < available
			? options.max
			: available;
	}
	
	function fillList() {
		list.empty();
		var max = limitNumberOfItems(data.length);
		for (var i=0; i < max; i++) {
			if (!data[i])
				continue;
			var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
			if ( formatted === false )
				continue;
			var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
			$.data(li, "ac_data", data[i]);
		}
		listItems = list.find("li");
		if ( options.selectFirst ) {
			listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
			active = 0;
		}
		// apply bgiframe if available
		if ( $.fn.bgiframe )
			list.bgiframe();
	}
	
	return {
		display: function(d, q) {
			init();
			data = d;
			term = q;
			fillList();
		},
		next: function() {
			moveSelect(1);
		},
		prev: function() {
			moveSelect(-1);
		},
		pageUp: function() {
			if (active != 0 && active - 8 < 0) {
				moveSelect( -active );
			} else {
				moveSelect(-8);
			}
		},
		pageDown: function() {
			if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
				moveSelect( listItems.size() - 1 - active );
			} else {
				moveSelect(8);
			}
		},
		hide: function() {
			element && element.hide();
			listItems && listItems.removeClass(CLASSES.ACTIVE);
			active = -1;
		},
		visible : function() {
			return element && element.is(":visible");
		},
		current: function() {
			return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
		},
		show: function() {
			var offset = $(input).offset();
			element.css({
				width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
				top: offset.top + input.offsetHeight,
				left: offset.left
			}).show();
            if(options.scroll) {
                list.scrollTop(0);
                list.css({
					maxHeight: options.scrollHeight,
					overflow: 'auto'
				});
				
                if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
					var listHeight = 0;
					listItems.each(function() {
						listHeight += this.offsetHeight;
					});
					var scrollbarsVisible = listHeight > options.scrollHeight;
                    list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
					if (!scrollbarsVisible) {
						// IE doesn't recalculate width when scrollbar disappears
						listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
					}
                }
                
            }
		},
		selected: function() {
			var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
			return selected && selected.length && $.data(selected[0], "ac_data");
		},
		emptyList: function (){
			list && list.empty();
		},
		unbind: function() {
			element && element.remove();
		}
	};
};

$.Autocompleter.Selection = function(field, start, end) {
	if( field.createTextRange ){
		var selRange = field.createTextRange();
		selRange.collapse(true);
		selRange.moveStart("character", start);
		selRange.moveEnd("character", end);
		selRange.select();
	} else if( field.setSelectionRange ){
		field.setSelectionRange(start, end);
	} else {
		if( field.selectionStart ){
			field.selectionStart = start;
			field.selectionEnd = end;
		}
	}
	field.focus();
};

})(jQuery);

/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * jQueryLastChangedDatejQuery
 * jQueryRevjQuery
 *
 * Version 2.1.1
 */

(function(jQuery){

/**
 * The bgiframe is chainable and applies the iframe hack to get 
 * around zIndex issues in IE6. It will only apply itself in IE6 
 * and adds a class to the iframe called 'bgiframe'. The iframe
 * is appeneded as the first child of the matched element(s) 
 * with a tabIndex and zIndex of -1.
 * 
 * By default the plugin will take borders, sized with pixel units,
 * into account. If a different unit is used for the border's width,
 * then you will need to use the top and left settings as explained below.
 *
 * NOTICE: This plugin has been reported to cause perfromance problems
 * when used on elements that change properties (like width, height and
 * opacity) a lot in IE6. Most of these problems have been caused by 
 * the expressions used to calculate the elements width, height and 
 * borders. Some have reported it is due to the opacity filter. All 
 * these settings can be changed if needed as explained below.
 *
 * @example jQuery('div').bgiframe();
 * @before <div><p>Paragraph</p></div>
 * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
 *
 * @param Map settings Optional settings to configure the iframe.
 * @option String|Number top The iframe must be offset to the top
 * 		by the width of the top border. This should be a negative 
 *      number representing the border-top-width. If a number is 
 * 		is used here, pixels will be assumed. Otherwise, be sure
 *		to specify a unit. An expression could also be used. 
 * 		By default the value is "auto" which will use an expression 
 * 		to get the border-top-width if it is in pixels.
 * @option String|Number left The iframe must be offset to the left
 * 		by the width of the left border. This should be a negative 
 *      number representing the border-left-width. If a number is 
 * 		is used here, pixels will be assumed. Otherwise, be sure
 *		to specify a unit. An expression could also be used. 
 * 		By default the value is "auto" which will use an expression 
 * 		to get the border-left-width if it is in pixels.
 * @option String|Number width This is the width of the iframe. If
 *		a number is used here, pixels will be assume. Otherwise, be sure
 * 		to specify a unit. An experssion could also be used.
 *		By default the value is "auto" which will use an experssion
 * 		to get the offsetWidth.
 * @option String|Number height This is the height of the iframe. If
 *		a number is used here, pixels will be assume. Otherwise, be sure
 * 		to specify a unit. An experssion could also be used.
 *		By default the value is "auto" which will use an experssion
 * 		to get the offsetHeight.
 * @option Boolean opacity This is a boolean representing whether or not
 * 		to use opacity. If set to true, the opacity of 0 is applied. If
 *		set to false, the opacity filter is not applied. Default: true.
 * @option String src This setting is provided so that one could change 
 *		the src of the iframe to whatever they need.
 *		Default: "javascript:false;"
 *
 * @name bgiframe
 * @type jQuery
 * @cat Plugins/bgiframe
 * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 */
jQuery.fn.bgIframe = jQuery.fn.bgiframe = function(s) {
	// This is only for IE6
	if ( jQuery.browser.msie && /6.0/.test(navigator.userAgent) ) {
		s = jQuery.extend({
			top     : 'auto', // auto == .currentStyle.borderTopWidth
			left    : 'auto', // auto == .currentStyle.borderLeftWidth
			width   : 'auto', // auto == offsetWidth
			height  : 'auto', // auto == offsetHeight
			opacity : true,
			src     : 'javascript:false;'
		}, s || {});
		var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
		    html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
		               'style="display:block;position:absolute;z-index:-1;'+
			               (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
					       'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
					       'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
					       'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
					       'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
					'"/>';
		return this.each(function() {
			if ( jQuery('> iframe.bgiframe', this).length == 0 )
				this.insertBefore( document.createElement(html), this.firstChild );
		});
	}
	return this;
};

})(jQuery);

﻿/*
 *
 *	jQuery Timer plugin v0.1
 *		Matt Schmidt [http://www.mattptr.net]
 *
 *	Licensed under the BSD License:
 *		http://mattptr.net/license/license.txt
 *
 */
 
 jQuery.timer = function (interval, callback)
 {
 /**
  *
  * timer() provides a cleaner way to handle intervals  
  *
  *	@usage
  * $.timer(interval, callback);
  *
  *
  * @example
  * $.timer(1000, function (timer) {
  * 	alert("hello");
  * 	timer.stop();
  * });
  * @desc Show an alert box after 1 second and stop
  * 
  * @example
  * var second = false;
  *	$.timer(1000, function (timer) {
  *		if (!second) {
  *			alert('First time!');
  *			second = true;
  *			timer.reset(3000);
  *		}
  *		else {
  *			alert('Second time');
  *			timer.stop();
  *		}
  *	});
  * @desc Show an alert box after 1 second and show another after 3 seconds
  *
  * 
  */

	var interval = interval || 100;

	if (!callback)
		return false;
	
	_timer = function (interval, callback) {
		this.stop = function () {
			clearInterval(self.id);
		};
		
		this.internalCallback = function () {
			callback(self);
		};
		
		this.reset = function (val) {
			if (self.id)
				clearInterval(self.id);
			
			var val = val || 100;
			this.id = setInterval(this.internalCallback, val);
		};
		
		this.interval = interval;
		this.id = setInterval(this.internalCallback, this.interval);
		
		var self = this;
	};
	
	return new _timer(interval, callback);
 };

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

(function(jQuery){function toIntegersAtLease(n)
{return n<10?'0'+n:n;}
Date.prototype.toJSON=function(date)
{return this.getUTCFullYear()+'-'+
toIntegersAtLease(this.getUTCMonth())+'-'+
toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'}
jQuery.quoteString=function(string)
{if(escapeable.test(string))
{return'"'+string.replace(escapeable,function(a)
{var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"'}
return'"'+string+'"';}
jQuery.toJSON=function(o,compact)
{var type=typeof(o);if(type=="undefined")
return"undefined";else if(type=="number"||type=="boolean")
return o+"";else if(o===null)
return"null";if(type=="string")
{return jQuery.quoteString(o);}
if(type=="object"&&typeof o.toJSON=="function")
return o.toJSON(compact);if(type!="function"&&typeof(o.length)=="number")
{var ret=[];for(var i=0;i<o.length;i++){ret.push(jQuery.toJSON(o[i],compact));}
if(compact)
return"["+ret.join(",")+"]";else
return"["+ret.join(", ")+"]";}
if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}
ret=[];for(var k in o){var name;var type=typeof(k);if(type=="number")
name='"'+k+'"';else if(type=="string")
name=jQuery.quoteString(k);else
continue;val=jQuery.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}
if(compact)
ret.push(name+":"+val);else
ret.push(name+": "+val);}
return"{"+ret.join(", ")+"}";}
jQuery.compactJSON=function(o)
{return jQuery.toJSON(o,true);}
jQuery.evalJSON=function(src)
{return eval("("+src+")");}
jQuery.secureEvalJSON=function(src)
{var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*jQuery/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");}})(jQuery);

(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*");});})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))
this.reset();});};$.fn.enable=function(){return this.each(function(){this.disabled=false;});};$.fn.disable=function(){return this.each(function(){this.disabled=true;});};})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e='change';if(field.type=='radio'||field.type=='checkbox')e='click';else if(obs&&field.type=='text'||field.type=='textarea')e='keyup';return e;}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=='undefined')window.delayedObserverStack=[];if(typeof window.delayedObserverCallback=='undefined'){window.delayedObserverCallback=function(stackPos){observed=window.delayedObserverStack[stackPos];if(observed.timer)clearTimeout(observed.timer);observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal());},observed.delay*1000);observed.oldVal=observed.obj.formVal();}}
window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=='FORM'){$(':input',el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal)return;else window.delayedObserverCallback(stackPos);});});}else{el.bind($.fieldEvent(el,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal)return;else window.delayedObserverCallback(stackPos);});};},formVal:function(){var el=this[0];if(el.tagName=='FORM')return this.serialize();if(el.type=='checkbox'||self.type=='radio')return this.filter('input:checked').val()||'';else return this.val();}});})(jQuery);(function($){$.fn.extend({visualEffect:function(o){e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase()});return eval('$(this).'+e+'()');},appear:function(speed,callback){return this.fadeIn(speed,callback);},blindDown:function(speed,callback){return this.show('blind',{direction:'vertical'},speed,callback);},blindUp:function(speed,callback){return this.hide('blind',{direction:'vertical'},speed,callback);},blindRight:function(speed,callback){return this.show('blind',{direction:'horizontal'},speed,callback);},blindLeft:function(speed,callback){this.hide('blind',{direction:'horizontal'},speed,callback);return this;},dropOut:function(speed,callback){return this.hide('drop',{direction:'down'},speed,callback);},dropIn:function(speed,callback){return this.show('drop',{direction:'up'},speed,callback);},fade:function(speed,callback){return this.fadeOut(speed,callback);},fadeToggle:function(speed,callback){return this.animate({opacity:'toggle'},speed,callback);},fold:function(speed,callback){return this.hide('fold',{},speed,callback);},foldOut:function(speed,callback){return this.show('fold',{},speed,callback);},grow:function(speed,callback){return this.show('scale',{},speed,callback);},highlight:function(speed,callback){return this.show('highlight',{},speed,callback);},puff:function(speed,callback){return this.hide('puff',{},speed,callback);},pulsate:function(speed,callback){return this.show('pulsate',{},speed,callback);},shake:function(speed,callback){return this.show('shake',{},speed,callback);},shrink:function(speed,callback){return this.hide('scale',{},speed,callback);},squish:function(speed,callback){return this.hide('scale',{origin:['top','left']},speed,callback);},slideUp:function(speed,callback){return this.hide('slide',{direction:'up'},speed,callback);},slideDown:function(speed,callback){return this.show('slide',{direction:'up'},speed,callback);},switchOff:function(speed,callback){return this.hide('clip',{},speed,callback);},switchOn:function(speed,callback){return this.show('clip',{},speed,callback);}});})(jQuery);

// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// A place to store global variables for now; potentially a base for all Bonanzle JS code eventually.
var Bonanzle = {};

// -----------------------------------------------------------------------------
// Use to put variables into a SHARED cookie (a hash in a cookie). Will probably
// only work with simple data objects (string, numbers, booleans, etc.). Works 
// just like Rails companion function of the same name.
function set_json_subcookie(cookie_name, key, val) 
{
	if (val == null /* or undefined */) 
  {
    return null;
  }
	
	var cookie_obj = get_json_cookie(cookie_name);
	
	cookie_obj[key] = val;
	
	set_json_cookie(cookie_name, cookie_obj);
	
	return val;
}

// -----------------------------------------------------------------------------
// Use to get variables from a SHARED cookie (a hash in a cookie). Will probably 
// only work with simple data objects (string, numbers, booleans, etc.). Works 
// just like Rails companion function of the same name.
function get_json_subcookie(cookie_name, key) 
{
	var cookie_val = get_json_cookie(cookie_name);
	
	if (cookie_val)
  {
		return cookie_val[key];
	}
	
	return null;
}

// -----------------------------------------------------------------------------
// Use to put variables into a cookie. Will probably only work with simple data 
// objects (string, numbers, booleans, etc.). Works just like Rails companion 
// function of the same name.
function set_json_cookie(cookie_name, val) 
{
	if (val == null /* or undefined */) 
  {
    return null;
  }
	
	jQuery.cookie(cookie_name, jQuery.toJSON(val), { expires: 10 * 365.25, path: '/' });
	
	return val;
}

// -----------------------------------------------------------------------------
// Use to get variables from a cookie. Will probably only work with simple data 
// objects (string, numbers, booleans, etc.). Works just like Rails companion 
// function of the same name.
function get_json_cookie(cookie_name) 
{
	var result = {};
	var cookie_val = jQuery.cookie(cookie_name);
	if (cookie_val)
  {
  	try
  	{
			result = jQuery.evalJSON(cookie_val);
		} catch(e) { }
	}
	
	return result;
}

// -----------------------------------------------------------------------------
// Please... somebody... show me a better way to make this happen.  jQuery doc
// is weirdly sparse on the topic of setting position 
function setPosition(element, ulXPos, ulYPos)
{
  if(element)
  {
    element.style.top = ulYPos + "px";
    element.style.left = ulXPos + "px";
  }
}

// -----------------------------------------------------------------------------
// RTFN
function setVisible(element,visible)
{
  if(visible)
  {
    element.show();
  }
  else
  {
    element.hide();
  }
}

// -----------------------------------------------------------------------------
// For absolutely positioned elements, any ancestors that are either absolutely
// positioned, relatively positioned, or fixed positioned will add their position
// to the specified element's absolute position as an offset - this function 
// determines the offset that would be added so we can actually do absolute 
// positioning on the given element, regardless of its ancestors.
// 
// I think this does the same thing as Prototype's Position.cumulativeOffset(); TODO: remove if Prototype works the same.
function getCumulativeOffsetPos(element, relativeTo)
{
  var relativePos = [ 0, 0 ];
  var parentEl    = element;
  while (parentEl)
  {
    relativePos[0] += parentEl.offsetLeft;
    relativePos[1] += parentEl.offsetTop;
    
    // If the user specified an element they want to find out position relative to, 
    // stop once we've factored in everything up to that eleement
    if(parentEl == relativeTo) break;
    
    parentEl = parentEl.offsetParent    
  }
  
  return relativePos;
}

// -----------------------------------------------------------------------------
// Creates a new (Prototype extended) DOM element, with the given parent and 
// set of attributes given (as a hash)
function createDOMElement(el_type, parent, attributes)
{
  var element = $(document.createElement(el_type || 'div'));

  if (parent)
  {
    parent.appendChild(element);
  }
  
  if (attributes)
  {
    $H(attributes).each(function(pair) { element.setAttribute(pair.key, pair.value); });  
  }

  return element;
}

//----------------------------------------------------------------------------
// Remove all child nodes from the given element
function removeAllChildren(element)
{
	element = $(element);
	
	if (element != null)
	{
		while (element.hasChildNodes()) 
		{
			element.removeChild(element.firstChild);
		}
	}
}

//----------------------------------------------------------------------------
// Select an option from a select drop down by its value
function selectSortOptionByValue(jSelectElement, valueToSelect)
{
	selectElement = jSelectElement[0];
	
	for(i=0;i<selectElement.length;i++)
	{
		if(selectElement.options[i].value == valueToSelect)
		{
			selectElement.selectedIndex = i
			break;
		}
	}
}

//----------------------------------------------------------------------------
// Destroy all jQuery draggable and droppable objects connected to any descendants
// of the given element - this is necessary when replacing the given element's
// innerHTML/content, as the handlers will not otherwise get removed and may cause
// problems in the future if elements with the same ID are created.
function destroyDragDropHandlers(parent_el_id)
{
  $j("#" + parent_el_id + " .ui-droppable").droppable("destroy");
  $j("#" + parent_el_id + " .ui-draggable").draggable("destroy");
}

//----------------------------------------------------------------------------
// Tests if the given position is in the target element.
function isInElement(position, target_el_id)
{
  var targetElement = $j('#' + target_el_id); 
  var offset = targetElement.offset();
  if (position.top  < offset.top  || position.top  > offset.top  + targetElement.height() ||
      position.left < offset.left || position.left > offset.left + targetElement.width())
  {
    return false;
  } 
  
  return true;
}

//----------------------------------------------------------------------------
// Shows a dynamically generate wait panel overlay (spinner + "Please Wait.." 
// text) over the element with the given id.  Note that, since the generated
// wait panel is appended to the given element, ajax calls that update the given
// element will hide the wait panel when they replace that element's html, so 
// there is no need to manually hide the wait panel once the ajax updater ends.
// Params:
//  el_id => The DOM id of the element to show the wait panel over.
//  text  => Optional text to use instead of the default "Please Wait..."
function showWaitPanel(el_id, text, widthHackAdd, heightHackAdd)
{
  var attachToEl = $j(el_id);
  
  var waitPanel = $j("<div class='WaitPanel'>").append(
    $j("<div class='WaitElementsContainer'>").append(
      $j("<div class='WaitSpinner'>").append($j("<img src='/images/spinners/indicator_medium.gif' />"))
    ).append(
      $j("<div class='WaitText'>")
    )
  );
  
  attachToEl.prepend(waitPanel);
    
  // Position spinner centered vertically
  heightHackAdd = ( heightHackAdd ? heightHackAdd : 0);
  waitPanel.find(".WaitSpinner").css("margin-top", (attachToEl.outerHeight() / 2) + heightHackAdd + "px");
  
  // Add text node
  waitPanel.find(".WaitText").html(text ? text : "Please Wait...");

  // Size wait panel to size of attached element
  // Note: updated on 4/20:  using outer width instead of inner.  Unless we want to go to the trouble of
  // positioning the left inside of the border, using innerWidth means that there will be uncovered (by wait panel) 
  // gaps on the right and bottom of bordered elements
  widthHackAdd = ( widthHackAdd ? widthHackAdd : 0 );
  waitPanel.height(attachToEl.outerHeight());
  waitPanel.width(attachToEl.outerWidth()+widthHackAdd);

}

//----------------------------------------------------------------------------
// Hide (destroy) any wait panels being displayed over the given element id.
function hideWaitPanel(el_id)
{
  $j(el_id + " .WaitPanel").remove();
}

//----------------------------------------------------------------------------
// Show dynamically created HTML over the element specified
// Params:
//  el_id => The DOM id of the element to show the wait panel over.
//  text  => Optional text to use instead of the default "Please Wait..."
function showHTMLPanel(el_id, elements, el_class)
{
  var attachToEl = $j("#" + el_id);
  
  var waitPanel = $j("<div class='GenericPanel " + el_class + "'>").append(
    $j("<div>").prepend(elements)
  );
  
  attachToEl.prepend(waitPanel);
      
  // Size wait panel to size of attached element
  $j("#" + el_id + " .GenericPanel").height(attachToEl.innerHeight());
  $j("#" + el_id + " .GenericPanel").width(attachToEl.innerWidth());
}

//----------------------------------------------------------------------------
// Hide (destroy) any generic HTML panels being displayed over the given element id.
function hideHTMLPanel(el_id)
{
  $j("#" + el_id + " .GenericPanel").remove();
}

//----------------------------------------------------------------------------
// Set a callback to get called when window is blurred
function setWindowBlurFunction(callback) {
  if(isIE()) {
    document.onfocusout = function() { 
      callback();
    };
  }
  else {
    window.document.onblur = function() { 
      callback();
    };
  }
}

//----------------------------------------------------------------------------
// Set a callback to get called when window is focused
function setWindowFocusFunction(callback) {
  if(isIE()) {
    document.onfocusin = function() { 
      callback();
    };
  }
  else {
    window.document.onfocus = function() { 
      callback();
    };
  }
  
}

//----------------------------------------------------------------------------
// Takes a string and returns the digit nested within using a regular expression
function extractDigitFromString(el_id) 
{
  var regex = /\d+/;
  res = ( (match = regex.exec(el_id)) ? match[0] : null);  
  return res;
}

//----------------------------------------------------------------------------
// Takes a selector string and returns the ID of the element found with that selector string
function extractIDFromSelector(el_id) 
{
  el = $j(el_id);
  return $j(el_id).attr('id');
}

//----------------------------------------------------------------------------
// Takes a selector string and returns the ID of the element found with that selector string
function moveElementToElement(move_element, to_element, relative_to)
{
  to_element_bare = $j(to_element).get(0);
  to_pos = getCumulativeOffsetPos(to_element_bare, relative_to);
  if((to_pos[0] + $j(move_element).width()) > 950) {
    to_pos[0] = 950 - $j(move_element).width();
  } 
  $j(move_element).css('left', to_pos[0]).css('top', to_pos[1]);
}

//----------------------------------------------------------------------------
// Make sized_element the same dimensions as model_element
function sizeElementToElement(sized_element, model_element) {
  $j(sized_element).width($j(model_element).width());
  $j(sized_element).height($j(model_element).height());
}

//----------------------------------------------------------------------------
// Copy value to element
function copyValueToElement(guessIndex, copyValue, selectorOfCopyToElement, append, appendString) {
  if(append) {
    appendString = $j(selectorOfCopyToElement).val() + (appendString ? appendString + "\n\n" : "");
    $j(selectorOfCopyToElement).val(appendString + copyValue);
  }
  else {
    $j(selectorOfCopyToElement).val(copyValue);
  }
  
  $j('#extended_item_info_upc').val($j('#guessUPC' + guessIndex).val())
  $j('#extended_item_info_isbn').val($j('#guessISBN' + guessIndex).val());
  $j('#extended_item_info_mpn').val($j('#guessMPN' + guessIndex).val());
}

//----------------------------------------------------------------------------
function isIE() {
  return navigator.appName == "Microsoft Internet Explorer";
}

//----------------------------------------------------------------------------
function isSafari() {
  var detect = navigator.userAgent.toLowerCase();
  var place = detect.indexOf('safari') + 1;
  if (place){
     return true;
  }
  return false;
}

//----------------------------------------------------------------------------
// Convert any text smileys in the given string to images and return the 
// resulting string.
function change_smilies_to_images(message)
{
	function replace_smiley(str, p1, p2, p3, offset, s)
	{
		var img = "smile_1.png";
		switch (p3)
		{
		//case ')': img= "smile_1.png"; break;
		case 'D': img = "smile_7.png"; break;
		case '(': img = "smile_5.png"; break;
		}
		// JS regexes don't have zero-width lookbehind assertions, so p1 is actually the 
		// space before the smiley that was matched, so it should be included in the result
		return p1 + '<img src="/images/emoticons/' + img + '" alt="' + p2 + '" />';
	}
	return message.replace(/(^|\s)(\:\-?(\)|D|\())(?=$|\s|\?|\.|\,|)/g, replace_smiley);
}

//----------------------------------------------------------------------------
function useSmallVersions()
{
  return (screen && screen.width && screen.height && ((screen.width == 800) && (screen.height == 600)));
}

//-----------------------------------------------------------------------------
function itemTagDone(response, hide_el_name) 
{
  $j(hide_el_name).hide();
  var json = jQuery.evalJSON(response.responseText);
  if(json) 
  {
    $j('#' + json.tag_name).attr('class', json.is_set ? 'tagSelect' : 'tagUnselect');
  }
  else 
  {
    $j('#itemTagList').html('<li>Error tagging this item</li>');
  }
}

//-----------------------------------------------------------------------------
function itemAddToHandPicked(response, update_element) {
  $j('#' + update_element).html(response.responseText);
}

//-----------------------------------------------------------------------------
function copyToClipboard(flashClient) {
  $j('.copyLink').removeClass("selected");
  $j(flashClient.domElement).addClass("selected");
}

//-----------------------------------------------------------------------------
function scrollWinTo(selector){
  $j('html, body').animate({
    scrollTop: $(selector).offset().top
   }, 1000);
}

/// <reference path="jquery-intellisense.js" />
//------------------------------------------------------------------------------
focusHandler = function() 
{
  //----------------------------------------------------------------------------
  // Internal prototype
	_focusHandler = function () 
	{
	  this.blurCallbacks    = new Array();
	  this.focusCallbacks   = new Array();
	  this.blurred          = false;
	  
	  //--------------------------------------------------------------------------
	  this.addBlurCallback = function(callback)
	  {
  	 this.blurCallbacks.push(callback);
	  };
	  
	  //--------------------------------------------------------------------------
	  this.addFocusCallback = function(callback)
	  {
  	  this.focusCallbacks.push(callback);
	  };
	  
	  //--------------------------------------------------------------------------
	  this.callBlurs = function()
	  {
      for(var i=0;i<self.blurCallbacks.length;i++) {
        self.blurCallbacks[i]();
      }
	  };
	  
	  //--------------------------------------------------------------------------
	  this.callFocuses = function()
	  {
      for(var i=0;i<self.focusCallbacks.length;i++) {
        self.focusCallbacks[i]();
      }
	  };
	  
	  var self = this;
	};

	theFocusHandler = new _focusHandler()
  setWindowBlurFunction(theFocusHandler.callBlurs);
	setWindowFocusFunction(theFocusHandler.callFocuses);

	return theFocusHandler;
};


/// <reference path="jquery-intellisense.js" />

//------------------------------------------------------------------------------
userPopTextHandler = function(container_selector, output_selector)
{
  //----------------------------------------------------------------------------
  // Internal prototype
	_userPopTextHandler = function (container_selector, output_selector) 
	{
	  this.flash            = true;
	  this.blurred          = false;
	  this.page_title       = document.title;
	  this.messages_queued  = Array();
	  this.output_selector  = output_selector;
	  this.container_selector = container_selector
	  this.current_text     = null;
	  
	  //--------------------------------------------------------------------------
	  // Start the user pop message updater, with the given interval
	  this.start = function(update_interval)
	  {
	    self.read_messages(function()
	    {
	      self.timer = jQuery.timer(update_interval, function(timer) 
        {
          self.read_messages(null);
        });
      });      
	  };
	  
	  //--------------------------------------------------------------------------
	  // Read the latest messages, calling the given callback when done
	  this.read_messages = function(callback)
	  {
	    // No need to grab more messages if user is looking at one currently...
	    if(!this.current_text && (jQuery('#quickTextHeaderReply').css('display') == 'none'))
	    {
	      jQuery.ajax({
	        type: "GET",
	        dataType: "json",
	        cache: false,
	        url: '/handlers/user_pop_text/read', 
	        success: function(json) {
	          // Load all the messages onto our queue of messages
	          for (var i = 0; i < json.length; i++) {
              self.messages_queued.push(json[i]);  
            }
            
            if(self.messages_queued.length > 0) {
              self.messages_queued.reverse();  // Reverse array so we can pop elements off of it in chronological order
              jQuery(self.container_selector).show('slow'); // Make sure the user can see the message
              self.show_message(self.messages_queued.pop()); // And show it
            }
            
            if (callback != null)
            {
              callback();
            }
          }
        });
       }	
    };
    
    //--------------------------------------------------------------------------
	  // Take a json object (as returned by UserPopTextReadHandler) and make it into HTML with "reply" and "close" buttons
	  // TODO: Hide the message after a set amount of time, per user preferences
    this.show_message = function(json_message) 
    {
       var div = jQuery('<div>');
       function bindDoneWithCurrent() { return function() { return self.done_with_current() }; }
       function bindMarkReadHandler() { return function () { return self.mark_as_read(bindDoneWithCurrent()) };  }
       function bindReplyHandler(e) { return function (e) { return self.reply(e) };  }
       previous_message_content = ( json_message.reply_body ? "<div>" + change_smilies_to_images(json_message.reply_body) + "</div>" : '' );
       this_message_content = change_smilies_to_images(json_message.content)
       out_string = null; 

		   if(json_message.custom_intro) {
		    out_string = jQuery("<div name='message_id_" + json_message.id + "'>");
		    out_string.html(json_message.time_in_words + ' <strong style="color:white">' + json_message.custom_intro + '</strong>: <strong>' + this_message_content + '</strong> ');
		   } else {
		    out_string = jQuery("<div id='message_from_" + json_message.from_id + "' name='message_id_" + json_message.id + "'>");
		    out_string.html(previous_message_content + json_message.time_in_words + '<a class="userLink" href="/users/' + json_message.from_id + '/profile">' + json_message.from + '</a> ' + (json_message.reply_body ? 'replied' : 'said') + ': <strong>' + this_message_content + '</strong> ');
		   }	

		   if(!json_message.not_repliable) {
				  out_string.append(jQuery("<a href='#'>Reply</a>").click(bindReplyHandler(jQuery(this))));
		   }

		   out_string.append(jQuery("<a href='#'>Close</a>").click(bindMarkReadHandler()));
       div.append(out_string);        
       self.current_text = json_message;  // Save the current message being shown so when we close window we know who to mark as read
        
       if(self.flash) {
          self.flash_new_message();
       }
      
      // Se the object we created here to be shown in the output element
      jQuery(self.output_selector).html(div);
    };

    //--------------------------------------------------------------------------
	  // Post a quick text message to the DB
    this.post_message = function(to_id, reply_message_id, content, callback)
    {
      jQuery.ajax({
        type: "GET",
        dataType: "json",
        cache: false,
        url: '/handlers/quick_text/post', 
        data: { to_id: to_id, reply_message_id: reply_message_id, content: content }, 
        complete: function(json) {
          jQuery('#quickTextPostSpinner').hide();
          // TODO: tell user that the message was successfully sent.
          // Difficult because of the multiple places quick texts can be sent from
        },
        success: function() {
          if(callback) {
            callback();
          }
        }
     });
    };
    
    //--------------------------------------------------------------------------
	  // Mark a message as having been seen so we know to stop repeatedly showing it.
	  // This avoids needing to ascertain whether a message might have been displayed immediately before a user
	  // changes pages
    this.mark_as_read = function(callback)
    {
      jQuery.ajax({
        type: "GET",
        dataType: "json",
        cache: false,
        url: '/handlers/user_pop_text/close', 
        data: { quick_text_id: self.current_text.id },
        complete: function(json) {
         self.current_text = null; 
         if(callback) {
          callback();
         }
        }
      });
    };
    
    //-----------------------------------------------------------------------------
    // When a user is done reading message, they might see another message, or we might hide the UserPopText container
    // altogether if there are no more messages left
    this.done_with_current = function() 
    {
    	self.initialize_reply();
    	
      if(self.messages_queued.length > 0) {
         self.show_message(self.messages_queued.pop());
       }
       else {
         jQuery(self.output_selector).html('');
         jQuery(self.container_selector).hide('slow');
       }
    };
    
    //-----------------------------------------------------------------------------
    // If user clicks "reply" button in UserPop container, setup the form to respond to whatever user sent the 
    // quick text that had been getting read
    this.reply = function(event) 
    {
      self.mark_as_read(); // Mark the quick text as read so we won't see it again after refresh
      from_id = extractDigitFromString(jQuery(event.target).parent().attr('id')); // Extract user that sent message from the div we setup when showing the user pop text
      reply_id = extractDigitFromString(jQuery(event.target).parent().attr('name')); // Extract user that sent message from the div we setup when showing the user pop text
  
      // Show the form
      jQuery('#quickTextHeaderReply').show(); 
			jQuery('#quickTextHeaderReply .quick_text_to_id').val(from_id); 
			jQuery('#quickTextHeaderReply .quick_reply_to_message_id').val(reply_id);
      jQuery(self.output_selector).html(jQuery('#quickTextHeaderReply'));
      jQuery('#quickTextHeaderReply .quick_text_close').click(function() { $j('#baseQuickTextElement').parent().parent().parent().hide('slow') });
    };

    //-----------------------------------------------------------------------------
    // Eventually, we'll change the title bar to let a user know when a message has been received
    this.flash_new_message = function() {
      if(self.blurred) {
          document.title = "New quick-text - " + self.page_title
      }
    };

    //-----------------------------------------------------------------------------
    // Record whether window is or isn't blurred so we know whether to flash new message
    this.window_blur = function(isBlurred) {
      self.blurred = isBlurred;
      if(!self.blurred) {
        document.title = self.page_title;
      }
    };
    
    //-----------------------------------------------------------------------------
    // Clear out all reply fields, and set up event handlers so reply will work in the future
    this.initialize_reply = function() { 
     // Copy the reply back to the bottom for future usage, and re-initialize it.
			$j('#quickTextHeaderReplyContainer').html($j('#quickTextHeaderReply'));
      $j('#quickTextHeaderReply #quickTextPostSpinner').hide(); // we're done spining
      $j('#quickTextHeaderReply .quick_reply_to_message_id').val(''); // clear out the message being replied to
      $j('#quickTextHeaderReply .quick_text_content').val(''); // clear out the reply text
			$j('#quickTextHeaderReply').hide();  // and hide the container itself
      
      // Hook up callback if user chooses to respond to a quick text
			$j('#quickTextHeaderReply .quick_text .sendButton').unbind();
			$j('#quickTextHeaderReply .quick_text .sendButton').click(function() {
				$j('#quickTextHeaderReply #quickTextPostSpinner').show(); 
				self.post_message($j('#quickTextHeaderReply .quick_text_to_id').val(), 
						$j('#quickTextHeaderReply .quick_reply_to_message_id').val(),
						$j('#quickTextHeaderReply .quick_text_content').val(), 
						self.done_with_current());
			});
				
    }

    var self = this;
	};

	
	return new _userPopTextHandler(container_selector, output_selector);
};


// This is a class for keeping track of the currently latent spinners in a page,
// and activating the appropriate spinner 
SPINNER_MANAGER =
{
  nowSpinning : new Array(),
  registeredSpinnerElements : new Array(),
  
  //-----------------------------------------------------------------------------
  // Desc:        Add this spinner to the list of spinners that might get activated when
  //							an element broadcasts that its spinner should start
  // Param				element 	- The spinner element that has had a list of associated activating elements
	registerListener : function(element)
	{	
	  // Loop through currently registered spinners to make sure this isn't a duplicate  
    if(SPINNER_MANAGER.registeredSpinnerElements[element.id] != null)
    {
    	alert("Error: Trying to register a spinner with an ID that's already been registered")
		}
		else
		{
			SPINNER_MANAGER.registeredSpinnerElements[element.id] = element;
		}
	},	
	
  //-----------------------------------------------------------------------------
  // Desc:        Remove all listeners from the spinner manager
	clearAllListeners : function()
	{
	 registeredSpinnerElements.clear();
  },

  //-----------------------------------------------------------------------------
  // Desc:  See if any of our spinner listeners would be
  //        activated by the elementActivating DOM element.  If so, activate it.
  spinSpinner : function(elementActivatingID)
  {
    var spinnerToSpin = SPINNER_MANAGER.findAssociatedSpinner(elementActivatingID);
    
    if(spinnerToSpin)
    {
      SPINNER_HELPER.startSpinner(spinnerToSpin);
      //alert("found spinner " + thisSpinner.id + " listening to " + thisSpinner.associator.activatingElementIDs[j])
    }   
  },

  //-----------------------------------------------------------------------------
  // Desc:  Loop through our spinner listeners and see if any of them would be
  //        activated by the elementActivating DOM element.  If so, activate it.
  stopSpinner : function(elementActivatingID)
  {
    var spinnerToSpin = SPINNER_MANAGER.findAssociatedSpinner(elementActivatingID);
    
    if(spinnerToStop)
    {
      SPINNER_HELPER.stopSpinner(spinnerToSpin);      
    }
  },   
  
    //-----------------------------------------------------------------------------
  // Desc:  Find the spinner DOM element associated with a given element ID
  findAssociatedSpinner : function(elementActivatingID)
  {
      // Index of the spinner that has been activated by the elementActivating
    var activatedSpinner = null;
    
    for(i in SPINNER_MANAGER.registeredSpinnerElements) // && activatedSpinner < 0;i++)
    { 
      thisSpinner = SPINNER_MANAGER.registeredSpinnerElements[i];
      if(thisSpinner.associator.activatingElementIDs[elementActivatingID] == true)
      {
      	activatedSpinner = thisSpinner;
      	break;
			}
    }

    return activatedSpinner;
  }
  
};

//-----------------------------------------------------------------------------
// Desc:  SPINNER_HELPER handles individual operations that happen on spinners 
SPINNER_HELPER = 
{
  startSpinner : function(spinnerElement)
  {
  	spinnerElement.style.visibility= "visible";
		spinnerElement.style.display="inline";    
  },
  
  stopSpinner : function(spinnerElement)
  {
  	spinnerElement.style.visibility= "hidden";
		spinnerElement.style.display="none";    
  },
  
  positionSpinner : function(spinnerElement,positionType)
  {
    // TODO: positionSpinner
  }
};

//-----------------------------------------------------------------------------
// Desc:  SPINNER_ASSOCIATOR is a Javascript class that associates listener DOM elements
//        with itself.  Coupled with the SPINNER_MANAGER, this allows an arbitrary
//        element to say that its spinner should start, and have the correct spinner
//        element do so.  
SPINNER_ASSOCIATOR = 
{
  activatingElementIDs : new Array(),
  
  //-----------------------------------------------------------------------------
  // Desc:  Associate with this spinner a new element that we'll be listening to 
  addActivatingElementID : function(elementID)
  {
  	// Check if this elementID already is in our activatingID array/hash  
    if(SPINNER_ASSOCIATOR.activatingElementIDs[elementID] != null)
    {
    	alert("Error: Trying to associate a spinner with an ID that's already been associated")
		}
		else
		{
			SPINNER_ASSOCIATOR.activatingElementIDs[elementID] = true;
		}    
  },
  
  //-----------------------------------------------------------------------------
  // Desc:  Provide hookups such that this hashmap can be used like an object 
  createObject : function()
  {
    this.activatingElementIDs = SPINNER_ASSOCIATOR.activatingElementIDs;
    this.addActivatingElementID = SPINNER_ASSOCIATOR.addActivatingElementID;
  }

};

//-----------------------------------------------------------------------------
// Desc:  Associate a listened element with a spinning element.  When the listened
//        element says that it wants spinning to begin, we'll look for any spinners
//        that have the ID of that element.  This function creates the associations that
//        make that magic happen 
function invokeSpinnerOnClick(elementClicked,spinnerElement)
{
  if(spinnerElement.associator == null)
  {
    // Add an ad hoc property to the spinner DOM element
    spinnerElement.associator = new SPINNER_ASSOCIATOR.createObject();
  }
  
  //for(i in listenerElementID)
  {
    spinnerElement.associator.addActivatingElementID(elementClicked.id)
    elementClicked.onclick = "SPINNER_MANAGER.spinSpinner(this.id);" + elementClicked.onclick; 
  //alert(spinnerElement.mySpinner.activatingElementIDs[0])
  }
}

//-----------------------------------------------------------------------------
// Plan B:  This is unrelated to pretty much all of the above.  It is used when 
// simplicity is sought over syntatic lovability.
function spinElement(spinnerElement)
{
	SPINNER_HELPER.startSpinner(spinnerElement);
}

function stopSpinElement(spinnerElement)
{
	SPINNER_HELPER.stopSpinner(spinnerElement);
}


eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(c(C){C.m={1B:{1v:c(E,F,H){b G=C.m[E].4z;21(b D 4W H){G.3u[D]=G.3u[D]||[];G.3u[D].4C([F,H[D]])}},1F:c(D,F,E){b H=D.3u[F];8(!H){h}21(b G=0;G<H.1Q;G++){8(D.f[H[G][0]]){H[G][1].1e(D.o,E)}}}},4B:{},j:c(D){8(C.m.4B[D]){h C.m.4B[D]}b E=C(\'<24 4x="m-96">\').1y(D).j({p:"1u",g:"-6J",d:"-6J",3W:"5d"}).2H("1L");C.m.4B[D]=!!((!(/2v|51/).1f(E.j("1x"))||(/^[1-9]/).1f(E.j("l"))||(/^[1-9]/).1f(E.j("k"))||!(/3v/).1f(E.j("6a"))||!(/3f|7m\\(0, 0, 0, 0\\)/).1f(E.j("3t"))));95{C("1L").2B(0).5U(E.2B(0))}94(F){}h C.m.4B[D]},3X:c(D){C(D).2t("4p","6y").j("6G","3v")},92:c(D){C(D).2t("4p","93").j("6G","")},4b:c(G,E){b D=/g/.1f(E||"g")?"1S":"1P",F=14;8(G[D]>0){h 18}G[D]=1;F=G[D]>0?18:14;G[D]=0;h F}};b B=C.2X.1I;C.2X.1I=c(){C("*",6).1v(6).2R("1I");h B.1e(6,17)};c A(E,F,G){b D=C[E][F].97||[];D=(2m D=="5c"?D.5q(/,?\\s+/):D);h(C.98(G,D)!=-1)}C.3h=c(E,D){b F=E.5q(".")[0];E=E.5q(".")[1];C.2X[E]=c(J){b H=(2m J=="5c"),I=7k.4z.9c.1F(17,1);8(H&&A(F,E,J)){b G=C.1p(6[0],E);h(G?G[J].1e(G,I):3b)}h 6.1D(c(){b K=C.1p(6,E);8(H&&K&&C.6P(K[J])){K[J].1e(K,I)}1q{8(!H){C.1p(6,E,9b C[F][E](6,J))}}})};C[F][E]=c(I,H){b G=6;6.39=E;6.6E=F+"-"+E;6.f=C.1w({},C.3h.3z,C[F][E].3z,H);6.o=C(I).3O("4D."+E,c(L,J,K){h G.4D(J,K)}).3O("5K."+E,c(K,J){h G.5K(J)}).3O("1I",c(){h G.4g()});6.4q()};C[F][E].4z=C.1w({},C.3h.4z,D)};C.3h.4z={4q:c(){},4g:c(){6.o.4c(6.39)},5K:c(D){h 6.f[D]},4D:c(D,E){6.f[D]=E;8(D=="28"){6.o[E?"1y":"2a"](6.6E+"-28")}},99:c(){6.4D("28",14)},91:c(){6.4D("28",18)}};C.3h.3z={28:14};C.m.5i={5C:c(){b D=6;6.o.3O("90."+6.39,c(E){h D.71(E)});8(C.2b.3a){6.79=6.o.2t("4p");6.o.2t("4p","6y")}6.8S=14},6p:c(){6.o.3A("."+6.39);(C.2b.3a&&6.o.2t("4p",6.79))},71:c(F){(6.31&&6.4s(F));6.5b=F;b E=6,G=(F.8R==1),D=(2m 6.f.4j=="5c"?C(F.3B).6s().1v(F.3B).7B(6.f.4j).1Q:14);8(!G||D||!6.5F(F)){h 18}6.5a=!6.f.4h;8(!6.5a){6.8P=7r(c(){E.5a=18},6.f.4h)}8(6.5W(F)&&6.5u(F)){6.31=(6.3E(F)!==14);8(!6.31){F.6f();h 18}}6.5Y=c(H){h E.6Z(H)};6.5J=c(H){h E.4s(H)};C(12).3O("6N."+6.39,6.5Y).3O("6Y."+6.39,6.5J);h 14},6Z:c(D){8(C.2b.3a&&!D.5X){h 6.4s(D)}8(6.31){6.3s(D);h 14}8(6.5W(D)&&6.5u(D)){6.31=(6.3E(6.5b,D)!==14);(6.31?6.3s(D):6.4s(D))}h!6.31},4s:c(D){C(12).3A("6N."+6.39,6.5Y).3A("6Y."+6.39,6.5J);8(6.31){6.31=14;6.43(D)}h 14},5W:c(D){h(v.3R(v.2j(6.5b.2O-D.2O),v.2j(6.5b.2Q-D.2Q))>=6.f.36)},5u:c(D){h 6.5a},3E:c(D){},3s:c(D){},43:c(D){},5F:c(D){h 18}};C.m.5i.3z={4j:1H,36:1,4h:0}})(1o);(c(A){A.3h("m.1r",A.1w({},A.m.5i,{4q:c(){b B=6.f;8(B.t=="5x"&&!(/(1h|1u|2W)/).1f(6.o.j("p"))){6.o.j("p","1h")}6.o.1y("m-1r");(B.28&&6.o.1y("m-1r-28"));6.5C()},3E:c(F){b H=6.f;8(6.t||H.28||A(F.3B).3l(".m-u-1T")){h 14}b C=!6.f.1T||!A(6.f.1T,6.o).1Q?18:14;A(6.f.1T,6.o).4U("*").8V().1D(c(){8(6==F.3B){C=18}});8(!C){h 14}8(A.m.1K){A.m.1K.3o=6}6.t=A.6P(H.t)?A(H.t.1e(6.o[0],[F])):(H.t=="46"?6.o.46():6.o);8(!6.t.6s("1L").1Q){6.t.2H((H.2H=="1i"?6.o[0].3m:H.2H))}8(6.t[0]!=6.o[0]&&!(/(2W|1u)/).1f(6.t.j("p"))){6.t.j("p","1u")}6.2l={d:(Z(6.o.j("3S"),10)||0),g:(Z(6.o.j("3V"),10)||0)};6.2c=6.t.j("p");6.r=6.o.r();6.r={g:6.r.g-6.2l.g,d:6.r.d-6.2l.d};6.r.1M={d:F.2O-6.r.d,g:F.2Q-6.r.g};6.26=6.t.26();b B=6.26.r();8(6.26[0]==12.1L&&A.2b.8Z){B={g:0,d:0}}6.r.1i={g:B.g+(Z(6.26.j("3w"),10)||0),d:B.d+(Z(6.26.j("3n"),10)||0)};b E=6.o.p();6.r.1h=6.2c=="1h"?{g:E.g-(Z(6.t.j("g"),10)||0)+6.26[0].1S,d:E.d-(Z(6.t.j("d"),10)||0)+6.26[0].1P}:{g:0,d:0};6.1N=6.5I(F);6.1J={k:6.t.1Y(),l:6.t.1U()};8(H.38){8(H.38.d!=3b){6.r.1M.d=H.38.d+6.2l.d}8(H.38.2r!=3b){6.r.1M.d=6.1J.k-H.38.2r+6.2l.d}8(H.38.g!=3b){6.r.1M.g=H.38.g+6.2l.g}8(H.38.2w!=3b){6.r.1M.g=6.1J.l-H.38.2w+6.2l.g}}8(H.1j){8(H.1j=="1i"){H.1j=6.t[0].3m}8(H.1j=="12"||H.1j=="3M"){6.1j=[0-6.r.1h.d-6.r.1i.d,0-6.r.1h.g-6.r.1i.g,A(H.1j=="12"?12:3M).k()-6.r.1h.d-6.r.1i.d-6.1J.k-6.2l.d-(Z(6.o.j("3T"),10)||0),(A(H.1j=="12"?12:3M).l()||12.1L.3m.5g)-6.r.1h.g-6.r.1i.g-6.1J.l-6.2l.g-(Z(6.o.j("3U"),10)||0)]}8(!(/^(12|3M|1i)$/).1f(H.1j)){b D=A(H.1j)[0];b G=A(H.1j).r();6.1j=[G.d+(Z(A(D).j("3n"),10)||0)-6.r.1h.d-6.r.1i.d,G.g+(Z(A(D).j("3w"),10)||0)-6.r.1h.g-6.r.1i.g,G.d+v.3R(D.6R,D.4w)-(Z(A(D).j("3n"),10)||0)-6.r.1h.d-6.r.1i.d-6.1J.k-6.2l.d-(Z(6.o.j("3T"),10)||0),G.g+v.3R(D.5g,D.4o)-(Z(A(D).j("3w"),10)||0)-6.r.1h.g-6.r.1i.g-6.1J.l-6.2l.g-(Z(6.o.j("3U"),10)||0)]}}6.2f("1G",F);6.1J={k:6.t.1Y(),l:6.t.1U()};8(A.m.1K&&!H.6W){A.m.1K.6q(6,F)}6.t.1y("m-1r-6g");6.3s(F);h 18},2D:c(C,D){8(!D){D=6.p}b B=C=="1u"?1:-1;h{g:(D.g+6.r.1h.g*B+6.r.1i.g*B-(6.2c=="2W"||(6.2c=="1u"&&6.26[0]==12.1L)?0:6.26[0].1S)*B+(6.2c=="2W"?A(12).1S():0)*B+6.2l.g*B),d:(D.d+6.r.1h.d*B+6.r.1i.d*B-(6.2c=="2W"||(6.2c=="1u"&&6.26[0]==12.1L)?0:6.26[0].1P)*B+(6.2c=="2W"?A(12).1P():0)*B+6.2l.d*B)}},5I:c(E){b F=6.f;b B={g:(E.2Q-6.r.1M.g-6.r.1h.g-6.r.1i.g+(6.2c=="2W"||(6.2c=="1u"&&6.26[0]==12.1L)?0:6.26[0].1S)-(6.2c=="2W"?A(12).1S():0)),d:(E.2O-6.r.1M.d-6.r.1h.d-6.r.1i.d+(6.2c=="2W"||(6.2c=="1u"&&6.26[0]==12.1L)?0:6.26[0].1P)-(6.2c=="2W"?A(12).1P():0))};8(!6.1N){h B}8(6.1j){8(B.d<6.1j[0]){B.d=6.1j[0]}8(B.g<6.1j[1]){B.g=6.1j[1]}8(B.d>6.1j[2]){B.d=6.1j[2]}8(B.g>6.1j[3]){B.g=6.1j[3]}}8(F.1O){b D=6.1N.g+v.4a((B.g-6.1N.g)/F.1O[1])*F.1O[1];B.g=6.1j?(!(D<6.1j[1]||D>6.1j[3])?D:(!(D<6.1j[1])?D-F.1O[1]:D+F.1O[1])):D;b C=6.1N.d+v.4a((B.d-6.1N.d)/F.1O[0])*F.1O[0];B.d=6.1j?(!(C<6.1j[0]||C>6.1j[2])?C:(!(C<6.1j[0])?C-F.1O[0]:C+F.1O[0])):C}h B},3s:c(B){6.p=6.5I(B);6.2g=6.2D("1u");6.p=6.2f("34",B)||6.p;8(!6.f.2p||6.f.2p!="y"){6.t[0].1V.d=6.p.d+"2k"}8(!6.f.2p||6.f.2p!="x"){6.t[0].1V.g=6.p.g+"2k"}8(A.m.1K){A.m.1K.34(6,B)}h 14},43:c(C){b D=14;8(A.m.1K&&!6.f.6W){b D=A.m.1K.2T(6,C)}8((6.f.3p=="9e"&&!D)||(6.f.3p=="9w"&&D)||6.f.3p===18){b B=6;A(6.t).1g(6.1N,Z(6.f.3p,10)||67,c(){B.2f("2o",C);B.64()})}1q{6.2f("2o",C);6.64()}h 14},64:c(){6.t.2a("m-1r-6g");8(6.f.t!="5x"&&!6.4A){6.t.1I()}6.t=1H;6.4A=14},3u:{},5z:c(B){h{t:6.t,p:6.p,5h:6.2g,f:6.f}},2f:c(C,B){A.m.1B.1F(6,C,[B,6.5z()]);8(C=="34"){6.2g=6.2D("1u")}h 6.o.2R(C=="34"?C:"34"+C,[B,6.5z()],6.f[C])},4g:c(){8(!6.o.1p("1r")){h}6.o.4c("1r").3A(".1r").2a("m-1r");6.6p()}}));A.1w(A.m.1r,{3z:{2H:"1i",2p:14,4j:":4O",4h:0,36:1,t:"5x"}});A.m.1B.1v("1r","1x",{1G:c(D,C){b B=A("1L");8(B.j("1x")){C.f.5V=B.j("1x")}B.j("1x",C.f.1x)},2o:c(C,B){8(B.f.5V){A("1L").j("1x",B.f.5V)}}});A.m.1B.1v("1r","1R",{1G:c(D,C){b B=A(C.t);8(B.j("1R")){C.f.6n=B.j("1R")}B.j("1R",C.f.1R)},2o:c(C,B){8(B.f.6n){A(B.t).j("1R",B.f.6n)}}});A.m.1B.1v("1r","1m",{1G:c(D,C){b B=A(C.t);8(B.j("1m")){C.f.6r=B.j("1m")}B.j("1m",C.f.1m)},2o:c(C,B){8(B.f.6r){A(B.t).j("1m",B.f.6r)}}});A.m.1B.1v("1r","5f",{1G:c(C,B){A(B.f.5f===18?"9y":B.f.5f).1D(c(){A(\'<24 4x="m-1r-5f" 1V="52: #9C;"></24>\').j({k:6.4w+"2k",l:6.4o+"2k",p:"1u",1m:"0.9B",1R:6B}).j(A(6).r()).2H("1L")})},2o:c(C,B){A("24.9A").1D(c(){6.3m.5U(6)})}});A.m.1B.1v("1r","4u",{1G:c(D,C){b E=C.f;b B=A(6).1p("1r");E.2M=E.2M||20;E.2V=E.2V||20;B.2E=c(F){66{8(/2v|4u/.1f(F.j("23"))||(/2v|4u/).1f(F.j("23-y"))){h F}F=F.1i()}6j(F[0].3m);h A(12)}(6);B.2C=c(F){66{8(/2v|4u/.1f(F.j("23"))||(/2v|4u/).1f(F.j("23-x"))){h F}F=F.1i()}6j(F[0].3m);h A(12)}(6);8(B.2E[0]!=12&&B.2E[0].4r!="4K"){B.6x=B.2E.r()}8(B.2C[0]!=12&&B.2C[0].4r!="4K"){B.6l=B.2C.r()}},34:c(D,C){b E=C.f;b B=A(6).1p("1r");8(B.2E[0]!=12&&B.2E[0].4r!="4K"){8((B.6x.g+B.2E[0].4o)-D.2Q<E.2M){B.2E[0].1S=B.2E[0].1S+E.2V}8(D.2Q-B.6x.g<E.2M){B.2E[0].1S=B.2E[0].1S-E.2V}}1q{8(D.2Q-A(12).1S()<E.2M){A(12).1S(A(12).1S()-E.2V)}8(A(3M).l()-(D.2Q-A(12).1S())<E.2M){A(12).1S(A(12).1S()+E.2V)}}8(B.2C[0]!=12&&B.2C[0].4r!="4K"){8((B.6l.d+B.2C[0].4w)-D.2O<E.2M){B.2C[0].1P=B.2C[0].1P+E.2V}8(D.2O-B.6l.d<E.2M){B.2C[0].1P=B.2C[0].1P-E.2V}}1q{8(D.2O-A(12).1P()<E.2M){A(12).1P(A(12).1P()-E.2V)}8(A(3M).k()-(D.2O-A(12).1P())<E.2M){A(12).1P(A(12).1P()+E.2V)}}}});A.m.1B.1v("1r","6b",{1G:c(D,C){b B=A(6).1p("1r");B.3q=[];A(C.f.6b===18?".m-1r":C.f.6b).1D(c(){b F=A(6);b E=F.r();8(6!=B.o[0]){B.3q.4C({6H:6,k:F.1Y(),l:F.1U(),g:E.g,d:E.d})}})},34:c(J,N){b I=A(6).1p("1r");b L=N.f.9g||20;b D=N.5h.d,C=D+I.1J.k,P=N.5h.g,O=P+I.1J.l;21(b H=I.3q.1Q-1;H>=0;H--){b E=I.3q[H].d,B=E+I.3q[H].k,R=I.3q[H].g,M=R+I.3q[H].l;8(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<O&&O<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<O&&O<M+L))){5m}8(N.f.6X!="9l"){b K=v.2j(R-O)<=20;b Q=v.2j(M-P)<=20;b G=v.2j(E-C)<=20;b F=v.2j(B-D)<=20;8(K){N.p.g=I.2D("1h",{g:R-I.1J.l,d:0}).g}8(Q){N.p.g=I.2D("1h",{g:M,d:0}).g}8(G){N.p.d=I.2D("1h",{g:0,d:E-I.1J.k}).d}8(F){N.p.d=I.2D("1h",{g:0,d:B}).d}}8(N.f.6X!="9p"){b K=v.2j(R-P)<=20;b Q=v.2j(M-O)<=20;b G=v.2j(E-D)<=20;b F=v.2j(B-C)<=20;8(K){N.p.g=I.2D("1h",{g:R,d:0}).g}8(Q){N.p.g=I.2D("1h",{g:M-I.1J.l,d:0}).g}8(G){N.p.d=I.2D("1h",{g:0,d:E}).d}8(F){N.p.d=I.2D("1h",{g:0,d:B-I.1J.k}).d}}}}});A.m.1B.1v("1r","70",{1G:c(D,C){b B=A(6).1p("1r");B.4R=[];A(C.f.70).1D(c(){8(A.1p(6,"69")){b E=A.1p(6,"69");B.4R.4C({1b:E,6F:E.f.3p});E.9n();E.2f("3I",D,B)}})},2o:c(D,C){b B=A(6).1p("1r");A.1D(B.4R,c(){8(6.1b.40){6.1b.40=0;B.4A=18;6.1b.4A=14;8(6.6F){6.1b.f.3p=18}6.1b.43(D);6.1b.o.2R("8O",[D,A.1w(6.1b.m(),{8N:B.o})],6.1b.f.8g);6.1b.f.t=6.1b.f.6t}1q{6.1b.2f("3C",D,B)}})},34:c(F,E){b D=A(6).1p("1r"),B=6;b C=c(K){b H=K.d,J=H+K.k,I=K.g,G=I+K.l;h(H<(6.2g.d+6.r.1M.d)&&(6.2g.d+6.r.1M.d)<J&&I<(6.2g.g+6.r.1M.g)&&(6.2g.g+6.r.1M.g)<G)};A.1D(D.4R,c(G){8(C.1F(D,6.1b.8e)){8(!6.1b.40){6.1b.40=1;6.1b.2h=A(B).46().2H(6.1b.o).1p("69-6H",18);6.1b.f.6t=6.1b.f.t;6.1b.f.t=c(){h E.t[0]};F.3B=6.1b.2h[0];6.1b.5F(F,18);6.1b.3E(F,18,18);6.1b.r.1M.g=D.r.1M.g;6.1b.r.1M.d=D.r.1M.d;6.1b.r.1i.d-=D.r.1i.d-6.1b.r.1i.d;6.1b.r.1i.g-=D.r.1i.g-6.1b.r.1i.g;D.2f("8i",F)}8(6.1b.2h){6.1b.3s(F)}}1q{8(6.1b.40){6.1b.40=0;6.1b.4A=18;6.1b.f.3p=14;6.1b.43(F,18);6.1b.f.t=6.1b.f.6t;6.1b.2h.1I();8(6.1b.6z){6.1b.6z.1I()}D.2f("8j",F)}}})}});A.m.1B.1v("1r","49",{1G:c(D,B){b C=A.8b(A(B.f.49.8a)).81(c(F,E){h(Z(A(F).j("1R"),10)||B.f.49.3x)-(Z(A(E).j("1R"),10)||B.f.49.3x)});A(C).1D(c(E){6.1V.1R=B.f.49.3x+E});6[0].1V.1R=B.f.49.3x+C.1Q}})})(1o);(c(A){A.3h("m.2i",{4q:c(){6.o.1y("m-2i");6.2K=0;6.3k=1;b C=6.f,B=C.2S;C=A.1w(C,{2S:C.2S&&C.2S.3j==7I?C.2S:c(D){h A(D).3l(B)}});6.5n={k:6.o[0].4w,l:6.o[0].4o};A.m.1K.3F.4C(6)},3u:{},m:c(B){h{1r:(B.2h||B.o),t:B.t,p:B.p,5h:B.2g,f:6.f,o:6.o}},4g:c(){b B=A.m.1K.3F;21(b C=0;C<B.1Q;C++){8(B[C]==6){B.7Z(C,1)}}6.o.2a("m-2i m-2i-28").4c("2i").3A(".2i")},3G:c(C){b B=A.m.1K.3o;8(!B||(B.2h||B.o)[0]==6.o[0]){h}8(6.f.2S.1F(6.o,(B.2h||B.o))){A.m.1B.1F(6,"3G",[C,6.m(B)]);6.o.2R("7X",[C,6.m(B)],6.f.3G)}},3H:c(C){b B=A.m.1K.3o;8(!B||(B.2h||B.o)[0]==6.o[0]){h}8(6.f.2S.1F(6.o,(B.2h||B.o))){A.m.1B.1F(6,"3H",[C,6.m(B)]);6.o.2R("7Y",[C,6.m(B)],6.f.3H)}},2T:c(D,C){b B=C||A.m.1K.3o;8(!B||(B.2h||B.o)[0]==6.o[0]){h 14}b E=14;6.o.4U(".m-2i").82(".m-1r-6g").1D(c(){b F=A.1p(6,"2i");8(F.f.6T&&A.m.3J(B,A.1w(F,{r:F.o.r()}),F.f.5r)){E=18;h 14}});8(E){h 14}8(6.f.2S.1F(6.o,(B.2h||B.o))){A.m.1B.1F(6,"2T",[D,6.m(B)]);6.o.2R("2T",[D,6.m(B)],6.f.2T);h 18}h 14},3I:c(C){b B=A.m.1K.3o;A.m.1B.1F(6,"3I",[C,6.m(B)]);8(B){6.o.2R("83",[C,6.m(B)],6.f.3I)}},3C:c(C){b B=A.m.1K.3o;A.m.1B.1F(6,"3C",[C,6.m(B)]);8(B){6.o.2R("89",[C,6.m(B)],6.f.3C)}}});A.1w(A.m.2i,{3z:{28:14,5r:"3J"}});A.m.3J=c(L,F,J){8(!F.r){h 14}b D=(L.2g||L.p.1u).d,C=D+L.1J.k,I=(L.2g||L.p.1u).g,H=I+L.1J.l;b E=F.r.d,B=E+F.5n.k,K=F.r.g,G=K+F.5n.l;5R(J){2Y"88":h(E<D&&C<B&&K<I&&H<G);2u;2Y"3J":h(E<D+(L.1J.k/2)&&C-(L.1J.k/2)<B&&K<I+(L.1J.l/2)&&H-(L.1J.l/2)<G);2u;2Y"84":h(E<((L.2g||L.p.1u).d+(L.5l||L.r.1M).d)&&((L.2g||L.p.1u).d+(L.5l||L.r.1M).d)<B&&K<((L.2g||L.p.1u).g+(L.5l||L.r.1M).g)&&((L.2g||L.p.1u).g+(L.5l||L.r.1M).g)<G);2u;2Y"8o":h((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));2u;51:h 14;2u}};A.m.1K={3o:1H,3F:[],6q:c(D,F){b B=A.m.1K.3F;b E=F?F.8G:1H;21(b C=0;C<B.1Q;C++){8(B[C].f.28||(D&&!B[C].f.2S.1F(B[C].o,(D.2h||D.o)))){5m}B[C].2Z=B[C].o.j("3W")!="3v";8(!B[C].2Z){5m}B[C].r=B[C].o.r();B[C].5n={k:B[C].o[0].4w,l:B[C].o[0].4o};8(E=="8D"||E=="8H"){B[C].3I.1F(B[C],F)}}},2T:c(B,C){b D=14;A.1D(A.m.1K.3F,c(){8(!6.f){h}8(!6.f.28&&6.2Z&&A.m.3J(B,6,6.f.5r)){D=6.2T.1F(6,C)}8(!6.f.28&&6.2Z&&6.f.2S.1F(6.o,(B.2h||B.o))){6.3k=1;6.2K=0;6.3C.1F(6,C)}});h D},34:c(B,C){8(B.f.8K){A.m.1K.6q(B,C)}A.1D(A.m.1K.3F,c(){8(6.f.28||6.6S||!6.2Z){h}b E=A.m.3J(B,6,6.f.5r);b G=!E&&6.2K==1?"3k":(E&&6.2K==0?"2K":1H);8(!G){h}b F;8(6.f.6T){b D=6.o.6s(".m-2i:8q(0)");8(D.1Q){F=A.1p(D[0],"2i");F.6S=(G=="2K"?1:0)}}8(F&&G=="2K"){F.2K=0;F.3k=1;F.3H.1F(F,C)}6[G]=1;6[G=="3k"?"2K":"3k"]=0;6[G=="2K"?"3G":"3H"].1F(6,C);8(F&&G=="3k"){F.3k=0;F.2K=1;F.3G.1F(F,C)}})}};A.m.1B.1v("2i","5k",{3I:c(C,B){A(6).1y(B.f.5k)},3C:c(C,B){A(6).2a(B.f.5k)},2T:c(C,B){A(6).2a(B.f.5k)}});A.m.1B.1v("2i","5o",{3G:c(C,B){A(6).1y(B.f.5o)},3H:c(C,B){A(6).2a(B.f.5o)},2T:c(C,B){A(6).2a(B.f.5o)}})})(1o);(c(A){A.3h("m.u",A.1w({},A.m.5i,{4q:c(){b M=6,N=6.f;b Q=6.o.j("p");6.5t=6.o;6.o.1y("m-u").j({p:/3r/.1f(Q)?"1h":Q});A.1w(N,{4n:!!(N.2F),t:N.t||N.2n||N.1g?N.t||"aS":1H,30:N.30===18?"m-u-4e-1T":N.30});b H="5M 6K #b3";N.72={"m-u":{3W:"5d"},"m-u-1T":{p:"1u",52:"#6L",7E:"0.5M"},"m-u-n":{1x:"n-1t",l:"2A",d:"1z",2r:"1z",5O:H},"m-u-s":{1x:"s-1t",l:"2A",d:"1z",2r:"1z",5S:H},"m-u-e":{1x:"e-1t",k:"2A",g:"1z",2w:"1z",68:H},"m-u-w":{1x:"w-1t",k:"2A",g:"1z",2w:"1z",5P:H},"m-u-1Z":{1x:"1Z-1t",k:"2A",l:"2A",68:H,5S:H},"m-u-22":{1x:"22-1t",k:"2A",l:"2A",5S:H,5P:H},"m-u-29":{1x:"29-1t",k:"2A",l:"2A",68:H,5O:H},"m-u-27":{1x:"27-1t",k:"2A",l:"2A",5P:H,5O:H}};N.61={"m-u-1T":{52:"#6L",7S:"5M 6K #aH",l:"6D",k:"6D"},"m-u-n":{1x:"n-1t",g:"1z",d:"45%"},"m-u-s":{1x:"s-1t",2w:"1z",d:"45%"},"m-u-e":{1x:"e-1t",2r:"1z",g:"45%"},"m-u-w":{1x:"w-1t",d:"1z",g:"45%"},"m-u-1Z":{1x:"1Z-1t",2r:"1z",2w:"1z"},"m-u-22":{1x:"22-1t",d:"1z",2w:"1z"},"m-u-27":{1x:"27-1t",d:"1z",g:"1z"},"m-u-29":{1x:"29-1t",2r:"1z",g:"1z"}};N.62=6.o[0].4L;8(N.62.41(/aM|58|4O|74|5X|aL/i)){b B=6.o;8(/1h/.1f(B.j("p"))&&A.2b.76){B.j({p:"1h",g:"2v",d:"2v"})}B.6e(A(\'<24 4x="m-6u"	1V="23: 2s;"></24>\').j({p:B.j("p"),k:B.1Y(),l:B.1U(),g:B.j("g"),d:B.j("d")}));b J=6.o;6.o=6.o.1i();6.o.1p("u",6);6.o.j({3S:J.j("3S"),3V:J.j("3V"),3T:J.j("3T"),3U:J.j("3U")});J.j({3S:0,3V:0,3T:0,3U:0});8(A.2b.aK&&N.6f){J.j("1t","3v")}N.33=J.j({p:"3r",aE:1,3W:"5d"});6.o.j({2z:J.j("2z")});6.4f()}8(!N.1X){N.1X=!A(".m-u-1T",6.o).1Q?"e,s,1Z":{n:".m-u-n",e:".m-u-e",s:".m-u-s",w:".m-u-w",1Z:".m-u-1Z",22:".m-u-22",29:".m-u-29",27:".m-u-27"}}8(N.1X.3j==73){N.1R=N.1R||6B;8(N.1X=="av"){N.1X="n,e,s,w,1Z,22,29,27"}b O=N.1X.5q(",");N.1X={};b G={1T:"p: 1u; 3W: 3v; 23:2s;",n:"g: 3c; k:2q%;",e:"2r: 3c; l:2q%;",s:"2w: 3c; k:2q%;",w:"d: 3c; l:2q%;",1Z:"2w: 3c; 2r: 1z;",22:"2w: 3c; d: 1z;",29:"g: 3c; 2r: 1z;",27:"g: 3c; d: 1z;"};21(b R=0;R<O.1Q;R++){b S=A.7n(O[R]),L=N.72,F="m-u-"+S,C=!A.m.j(F)&&!N.30,P=A.m.j("m-u-4e-1T"),T=A.1w(L[F],L["m-u-1T"]),D=A.1w(N.61[F],!P?N.61["m-u-1T"]:{});b K=/22|1Z|29|27/.1f(S)?{1R:++N.1R}:{};b I=(C?G[S]:""),E=A([\'<24 4x="m-u-1T \',F,\'" 1V="\',I,G.1T,\'"></24>\'].4N("")).j(K);N.1X[S]=".m-u-"+S;6.o.6O(E.j(C?T:{}).j(N.30?D:{}).1y(N.30?"m-u-4e-1T":"").1y(N.30))}8(N.30){6.o.1y("m-u-4e").j(!A.m.j("m-u-4e")?{}:{})}}6.6Q=c(Y){Y=Y||6.o;21(b V 4W N.1X){8(N.1X[V].3j==73){N.1X[V]=A(N.1X[V],6.o).13()}8(N.3f){N.1X[V].j({1m:0})}8(6.o.3l(".m-6u")&&N.62.41(/58|4O|74|5X/i)){b W=A(N.1X[V],6.o),X=0;X=/22|29|27|1Z|n|s/.1f(V)?W.1U():W.1Y();b U=["7T",/29|27|n/.1f(V)?"aQ":/1Z|22|s/.1f(V)?"aT":/^e$/.1f(V)?"aX":"aW"].4N("");8(!N.3f){Y.j(U,X)}6.4f()}8(!A(N.1X[V]).1Q){5m}}};6.6Q(6.o);N.3D=A(".m-u-1T",M.o);8(N.3X){N.3D.1D(c(U,V){A.m.3X(V)})}N.3D.9V(c(){8(!N.57){8(6.4E){b U=6.4E.41(/m-u-(1Z|22|29|27|n|e|s|w)/i)}M.2p=N.2p=U&&U[1]?U[1]:"1Z"}});8(N.78){N.3D.1a();A(M.o).1y("m-u-5B").9U(c(){A(6).2a("m-u-5B");N.3D.13()},c(){8(!N.57){A(6).1y("m-u-5B");N.3D.1a()}})}6.5C()},3u:{},m:c(){h{5t:6.5t,o:6.o,t:6.t,p:6.p,11:6.11,f:6.f,2x:6.2x,1N:6.1N}},2f:c(C,B){A.m.1B.1F(6,C,[B,6.m()]);8(C!="1t"){6.o.2R(["1t",C].4N(""),[B,6.m()],6.f[C])}},4g:c(){b D=6.o,C=D.a0(".m-u").2B(0);6.6p();b B=c(E){A(E).2a("m-u m-u-28").4c("u").3A(".u").4U(".m-u-1T").1I()};B(D);8(D.3l(".m-6u")&&C){D.1i().6O(A(C).j({p:D.j("p"),k:D.1Y(),l:D.1U(),g:D.j("g"),d:D.j("d")})).3Q().1I();B(C)}},3E:c(K){8(6.f.28){h 14}b J=14;21(b H 4W 6.f.1X){8(A(6.f.1X[H])[0]==K.3B){J=18}}8(!J){h 14}b C=6.f,B=6.o.p(),D=6.o,I=c(O){h Z(O,10)||0},G=A.2b.3a&&A.2b.65<7;C.57=18;C.6c={g:A(12).1S(),d:A(12).1P()};8(D.3l(".m-1r")||(/1u/).1f(D.j("p"))){b M=A.2b.3a&&!C.1j&&(/1u/).1f(D.j("p"))&&!(/1h/).1f(D.1i().j("p"));b L=M?C.6c.g:0,F=M?C.6c.d:0;D.j({p:"1u",g:(B.g+L),d:(B.d+F)})}8(A.2b.76&&/1h/.1f(D.j("p"))){D.j({p:"1h",g:"2v",d:"2v"})}6.6I();b N=I(6.t.j("d")),E=I(6.t.j("g"));8(C.1j){N+=A(C.1j).1P()||0;E+=A(C.1j).1S()||0}6.r=6.t.r();6.p={d:N,g:E};6.11=C.t||G?{k:D.1Y(),l:D.1U()}:{k:D.k(),l:D.l()};6.2x=C.t||G?{k:D.1Y(),l:D.1U()}:{k:D.k(),l:D.l()};6.1N={d:N,g:E};6.3e={k:D.1Y()-D.k(),l:D.1U()-D.l()};6.6C={d:K.2O,g:K.2Q};C.2F=(2m C.2F=="6V")?C.2F:((6.2x.l/6.2x.k)||1);8(C.6h){A("1L").j("1x",6.2p+"-1t")}6.2f("1G",K);h 18},3s:c(I){b D=6.t,C=6.f,J={},M=6,F=6.6C,K=6.2p;b N=(I.2O-F.d)||0,L=(I.2Q-F.g)||0;b E=6.2N[K];8(!E){h 14}b H=E.1e(6,[I,N,L]),G=A.2b.3a&&A.2b.65<7,B=6.3e;8(C.4n||I.59){H=6.6A(H,I)}H=6.6M(H,I);6.2f("1t",I);D.j({g:6.p.g+"2k",d:6.p.d+"2k",k:6.11.k+"2k",l:6.11.l+"2k"});8(!C.t&&C.33){6.4f()}6.5G(H);6.o.2R("1t",[I,6.m()],6.f.1t);h 14},43:c(I){6.f.57=14;b E=6.f,H=c(M){h Z(M,10)||0},K=6;8(E.t){b D=E.33,B=D&&(/58/i).1f(D.2B(0).4L),C=B&&A.m.4b(D.2B(0),"d")?0:K.3e.l,G=B?0:K.3e.k;b L={k:(K.11.k-G),l:(K.11.l-C)},F=(Z(K.o.j("d"),10)+(K.p.d-K.1N.d))||1H,J=(Z(K.o.j("g"),10)+(K.p.g-K.1N.g))||1H;8(!E.1g){6.o.j(A.1w(L,{g:J,d:F}))}8(E.t&&!E.1g){6.4f()}}8(E.6h){A("1L").j("1x","2v")}6.2f("2o",I);8(E.t){6.t.1I()}h 14},5G:c(B){b C=6.f;6.r=6.t.r();8(B.d){6.p.d=B.d}8(B.g){6.p.g=B.g}8(B.l){6.11.l=B.l}8(B.k){6.11.k=B.k}},6A:c(D,E){b F=6.f,G=6.p,C=6.11,B=6.2p;8(D.l){D.k=(C.l/F.2F)}1q{8(D.k){D.l=(C.k*F.2F)}}8(B=="22"){D.d=G.d+(C.k-D.k);D.g=1H}8(B=="27"){D.g=G.g+(C.l-D.l);D.d=G.d+(C.k-D.k)}h D},6M:c(H,I){b F=6.t,E=6.f,N=E.4n||I.59,M=6.2p,P=H.k&&E.4H&&E.4H<H.k,J=H.l&&E.4Q&&E.4Q<H.l,D=H.k&&E.4i&&E.4i>H.k,O=H.l&&E.4l&&E.4l>H.l;8(D){H.k=E.4i}8(O){H.l=E.4l}8(P){H.k=E.4H}8(J){H.l=E.4Q}b C=6.1N.d+6.2x.k,L=6.p.g+6.11.l;b G=/22|27|w/.1f(M),B=/27|29|n/.1f(M);8(D&&G){H.d=C-E.4i}8(P&&G){H.d=C-E.4H}8(O&&B){H.g=L-E.4l}8(J&&B){H.g=L-E.4Q}b K=!H.k&&!H.l;8(K&&!H.d&&H.g){H.g=1H}1q{8(K&&!H.g&&H.d){H.d=1H}}h H},4f:c(){b F=6.f;8(!F.33){h}b D=F.33,C=6.t||6.o;8(!F.3Z){b B=[D.j("3w"),D.j("53"),D.j("4Z"),D.j("3n")],E=[D.j("7z"),D.j("7s"),D.j("7y"),D.j("7t")];F.3Z=A.ap(B,c(G,I){b H=Z(G,10)||0,J=Z(E[I],10)||0;h H+J})}D.j({l:(C.l()-F.3Z[0]-F.3Z[2])+"2k",k:(C.k()-F.3Z[1]-F.3Z[3])+"2k"})},6I:c(){b C=6.o,F=6.f;6.6i=C.r();8(F.t){6.t=6.t||A(\'<24 1V="23:2s;"></24>\');b B=A.2b.3a&&A.2b.65<7,D=(B?1:0),E=(B?2:-1);6.t.1y(F.t).j({k:C.1Y()+E,l:C.1U()+E,p:"1u",d:6.6i.d-D+"2k",g:6.6i.g-D+"2k",1R:++F.1R});6.t.2H("1L");8(F.3X){A.m.3X(6.t.2B(0))}}1q{6.t=C}},2N:{e:c(D,C,B){h{k:6.2x.k+C}},w:c(F,C,B){b G=6.f,D=6.2x,E=6.1N;h{d:E.d+C,k:D.k-C}},n:c(F,C,B){b G=6.f,D=6.2x,E=6.1N;h{g:E.g+B,l:D.l-B}},s:c(D,C,B){h{l:6.2x.l+B}},1Z:c(D,C,B){h A.1w(6.2N.s.1e(6,17),6.2N.e.1e(6,[D,C,B]))},22:c(D,C,B){h A.1w(6.2N.s.1e(6,17),6.2N.w.1e(6,[D,C,B]))},29:c(D,C,B){h A.1w(6.2N.n.1e(6,17),6.2N.e.1e(6,[D,C,B]))},27:c(D,C,B){h A.1w(6.2N.n.1e(6,17),6.2N.w.1e(6,[D,C,B]))}}}));A.1w(A.m.u,{3z:{4j:":4O",36:1,4h:0,6f:18,3f:14,4i:10,4l:10,2F:14,3X:18,6h:18,78:14,30:14}});A.m.1B.1v("u","1j",{1G:c(I,K){b E=K.f,M=A(6).1p("u"),G=M.o;b C=E.1j,F=(C 9S A)?C.2B(0):(/1i/.1f(C))?G.1i().2B(0):C;8(!F){h}M.6w=A(F);8(/12/.1f(C)||C==12){M.4k={d:0,g:0};M.4J={d:0,g:0};M.3L={o:A(12),d:0,g:0,k:A(12).k(),l:A(12).l()||12.1L.3m.5g}}1q{M.4k=A(F).r();M.4J=A(F).p();M.4T={l:A(F).77(),k:A(F).6U()};b J=M.4k,B=M.4T.l,H=M.4T.k,D=(A.m.4b(F,"d")?F.6R:H),L=(A.m.4b(F)?F.5g:B);M.3L={o:F,d:J.d,g:J.g,k:D,l:L}}},1t:c(H,K){b E=K.f,N=A(6).1p("u"),C=N.4T,J=N.4k,G=N.11,I=N.p,L=E.4n||H.59,B={g:0,d:0},D=N.6w;8(D[0]!=12&&/3r/.1f(D.j("p"))){B=N.4J}8(I.d<(E.t?J.d:B.d)){N.11.k=N.11.k+(E.t?(N.p.d-J.d):(N.p.d-B.d));8(L){N.11.l=N.11.k*E.2F}N.p.d=E.t?J.d:B.d}8(I.g<(E.t?J.g:0)){N.11.l=N.11.l+(E.t?(N.p.g-J.g):N.p.g);8(L){N.11.k=N.11.l/E.2F}N.p.g=E.t?J.g:0}b F=(E.t?N.r.d-J.d:(N.p.d-B.d))+N.3e.k,M=(E.t?N.r.g-J.g:N.p.g)+N.3e.l;8(F+N.11.k>=N.3L.k){N.11.k=N.3L.k-F;8(L){N.11.l=N.11.k*E.2F}}8(M+N.11.l>=N.3L.l){N.11.l=N.3L.l-M;8(L){N.11.k=N.11.l/E.2F}}},2o:c(G,J){b C=J.f,L=A(6).1p("u"),H=L.p,I=L.4k,B=L.4J,D=L.6w;b E=A(L.t),M=E.r(),K=E.6U(),F=E.77();8(C.t&&!C.1g&&/1h/.1f(D.j("p"))){A(6).j({d:(M.d-I.d),g:(M.g-I.g),k:K,l:F})}8(C.t&&!C.1g&&/3r/.1f(D.j("p"))){A(6).j({d:B.d+(M.d-I.d),g:B.g+(M.g-I.g),k:K,l:F})}}});A.m.1B.1v("u","1O",{1t:c(H,J){b D=J.f,L=A(6).1p("u"),G=L.11,E=L.2x,F=L.1N,K=L.2p,I=D.4n||H.59;D.1O=2m D.1O=="6V"?[D.1O,D.1O]:D.1O;b C=v.4a((G.k-E.k)/(D.1O[0]||1))*(D.1O[0]||1),B=v.4a((G.l-E.l)/(D.1O[1]||1))*(D.1O[1]||1);8(/^(1Z|s|e)$/.1f(K)){L.11.k=E.k+C;L.11.l=E.l+B}1q{8(/^(29)$/.1f(K)){L.11.k=E.k+C;L.11.l=E.l+B;L.p.g=F.g-B}1q{8(/^(22)$/.1f(K)){L.11.k=E.k+C;L.11.l=E.l+B;L.p.d=F.d-C}1q{L.11.k=E.k+C;L.11.l=E.l+B;L.p.g=F.g-B;L.p.d=F.d-C}}}}});A.m.1B.1v("u","1g",{2o:c(I,K){b F=K.f,L=A(6).1p("u");b E=F.33,B=E&&(/58/i).1f(E.2B(0).4L),C=B&&A.m.4b(E.2B(0),"d")?0:L.3e.l,H=B?0:L.3e.k;b D={k:(L.11.k-H),l:(L.11.l-C)},G=(Z(L.o.j("d"),10)+(L.p.d-L.1N.d))||1H,J=(Z(L.o.j("g"),10)+(L.p.g-L.1N.g))||1H;L.o.1g(A.1w(D,J&&G?{g:J,d:G}:{}),{1n:F.b1||"5e",1c:F.ax||"5L",7G:c(){b M={k:Z(L.o.j("k"),10),l:Z(L.o.j("l"),10),g:Z(L.o.j("g"),10),d:Z(L.o.j("d"),10)};8(E){E.j({k:M.k,l:M.l})}L.5G(M);L.2f("1g",I)}})}});A.m.1B.1v("u","2n",{1G:c(E,D){b F=D.f,B=A(6).1p("u"),G=F.33,C=B.11;8(!G){B.2n=B.o.46()}1q{B.2n=G.46()}B.2n.j({1m:0.25,3W:"5d",p:"1h",l:C.l,k:C.k,2z:0,d:0,g:0}).1y("m-u-2n").1y(2m F.2n=="5c"?F.2n:"");B.2n.2H(B.t)},1t:c(D,C){b E=C.f,B=A(6).1p("u"),F=E.33;8(B.2n){B.2n.j({p:"1h",l:B.11.l,k:B.11.k})}},2o:c(D,C){b E=C.f,B=A(6).1p("u"),F=E.33;8(B.2n&&B.t){B.t.2B(0).5U(B.2n.2B(0))}}});A.m.1B.1v("u","2I",{1G:c(E,C){b F=C.f,B=A(6).1p("u"),D=c(G){A(G).1D(c(){A(6).1p("u-5Q",{k:Z(A(6).k(),10),l:Z(A(6).l(),10),d:Z(A(6).j("d"),10),g:Z(A(6).j("g"),10)})})};8(2m(F.2I)=="4m"){8(F.2I.1Q){F.2I=F.2I[0];D(F.2I)}1q{A.1D(F.2I,c(G,H){D(G)})}}1q{D(F.2I)}},1t:c(F,E){b G=E.f,C=A(6).1p("u"),D=C.2x,I=C.1N;b H={l:(C.11.l-D.l)||0,k:(C.11.k-D.k)||0,g:(C.p.g-I.g)||0,d:(C.p.d-I.d)||0},B=c(J,K){A(J).1D(c(){b N=A(6).1p("u-5Q"),M={},L=K&&K.1Q?K:["k","l","g","d"];A.1D(L||["k","l","g","d"],c(O,Q){b P=(N[Q]||0)+(H[Q]||0);8(P&&P>=0){M[Q]=P||1H}});A(6).j(M)})};8(2m(G.2I)=="4m"){A.1D(G.2I,c(J,K){B(J,K)})}1q{B(G.2I)}},2o:c(C,B){A(6).4c("u-5Q-1G")}})})(1o);(c(C){C.q=C.q||{};C.1w(C.q,{2J:c(F,G){21(b E=0;E<G.1Q;E++){8(G[E]!==1H){C.1p(F[0],"7e.7R."+G[E],F[0].1V[G[E]])}}},2e:c(F,G){21(b E=0;E<G.1Q;E++){8(G[E]!==1H){F.j(G[E],C.1p(F[0],"7e.7R."+G[E]))}}},2d:c(E,F){8(F=="2U"){F=E.3l(":2s")?"13":"1a"}h F},7u:c(F,G){b H,E;5R(F[0]){2Y"g":H=0;2u;2Y"7C":H=0.5;2u;2Y"2w":H=1;2u;51:H=F[0]/G.l}5R(F[1]){2Y"d":E=0;2u;2Y"7D":E=0.5;2u;2Y"2r":E=1;2u;51:E=F[1]/G.k}h{x:E,y:H}},35:c(F){8(F.1i().2t("5N")=="5T"){h F}b E={k:F.1Y({2z:18}),l:F.1U({2z:18}),"7Q":F.j("7Q")};F.6e(\'<24 5N="5T" 1V="8Y-11:2q%;52:3f;7S:3v;2z:0;7T:0"></24>\');b I=F.1i();8(F.j("p")=="3r"){I.j({p:"1h"});F.j({p:"1h"})}1q{b H=F.j("g");8(60(Z(H))){H="2v"}b G=F.j("d");8(60(Z(G))){G="2v"}I.j({p:F.j("p"),g:H,d:G,1R:F.j("z-9v")}).13();F.j({p:"1h",g:0,d:0})}I.j(E);h I},2L:c(E){8(E.1i().2t("5N")=="5T"){h E.1i().9u(E)}h E},2G:c(F,G,E,H){H=H||{};C.1D(G,c(J,I){4Y=F.7V(I);8(4Y[0]>0){H[I]=4Y[0]*E+4Y[1]}});h H},4d:c(G,H,J,I){b E=(2m J=="c"?J:(I?I:1H));b F=(2m J=="4m"?J:1H);h 6.1D(c(){b O={};b M=C(6);b N=M.2t("1V")||"";8(2m N=="4m"){N=N.5Z}8(G.2U){M.9s(G.2U)?G.1I=G.2U:G.1v=G.2U}b K=C.1w({},(12.4V?12.4V.7U(6,1H):6.7P));8(G.1v){M.1y(G.1v)}8(G.1I){M.2a(G.1I)}b L=C.1w({},(12.4V?12.4V.7U(6,1H):6.7P));8(G.1v){M.2a(G.1v)}8(G.1I){M.1y(G.1I)}21(b P 4W L){8(2m L[P]!="c"&&L[P]&&P.5H("9z")==-1&&P.5H("1Q")==-1&&L[P]!=K[P]&&(P.41(/4I/i)||(!P.41(/4I/i)&&!60(Z(L[P],10))))&&(K.p!="3r"||(K.p=="3r"&&!P.41(/d|g|2w|2r/)))){O[P]=L[P]}}M.1g(O,H,F,c(){8(2m C(6).2t("1V")=="4m"){C(6).2t("1V")["5Z"]="";C(6).2t("1V")["5Z"]=N}1q{C(6).2t("1V",N)}8(G.1v){C(6).1y(G.1v)}8(G.1I){C(6).2a(G.1I)}8(E){E.1e(6,17)}})})}});C.2X.1w({7O:C.2X.13,7J:C.2X.1a,7W:C.2X.2U,7K:C.2X.1y,7a:C.2X.2a,7N:C.2X.7L,2y:c(E,G,F,H){h C.q[E]?C.q[E].1F(6,{9j:E,f:G||{},1n:F,1k:H}):1H},13:c(){8(!17[0]||(17[0].3j==63||/(5e|5y|5w)/.1f(17[0]))){h 6.7O.1e(6,17)}1q{b E=17[1]||{};E.1s="13";h 6.2y.1e(6,[17[0],E,17[2]||E.1n,17[3]||E.1k])}},1a:c(){8(!17[0]||(17[0].3j==63||/(5e|5y|5w)/.1f(17[0]))){h 6.7J.1e(6,17)}1q{b E=17[1]||{};E.1s="1a";h 6.2y.1e(6,[17[0],E,17[2]||E.1n,17[3]||E.1k])}},2U:c(){8(!17[0]||(17[0].3j==63||/(5e|5y|5w)/.1f(17[0]))||(17[0].3j==7I)){h 6.7W.1e(6,17)}1q{b E=17[1]||{};E.1s="2U";h 6.2y.1e(6,[17[0],E,17[2]||E.1n,17[3]||E.1k])}},1y:c(F,E,H,G){h E?C.q.4d.1e(6,[{1v:F},E,H,G]):6.7K(F)},2a:c(F,E,H,G){h E?C.q.4d.1e(6,[{1I:F},E,H,G]):6.7a(F)},7L:c(F,E,H,G){h E?C.q.4d.1e(6,[{2U:F},E,H,G]):6.7N(F)},7M:c(E,G,F,I,H){h C.q.4d.1e(6,[{1v:G,1I:E},F,I,H])},a2:c(){h 6.7M.1e(6,17)},7V:c(E){b F=6.j(E),G=[];C.1D(["ae","2k","%","aV"],c(H,I){8(F.5H(I)>0){G=[4F(F),I]}});h G}});1o.1D(["3t","9t","9d","8T","8t","4I","9a"],c(F,E){1o.56.7G[E]=c(G){8(G.8W==0){G.1G=D(G.7l,E);G.3Q=B(G.3Q)}G.7l.1V[E]="6v("+[v.3R(v.3x(Z((G.1A*(G.3Q[0]-G.1G[0]))+G.1G[0]),1l),0),v.3R(v.3x(Z((G.1A*(G.3Q[1]-G.1G[1]))+G.1G[1]),1l),0),v.3R(v.3x(Z((G.1A*(G.3Q[2]-G.1G[2]))+G.1G[2]),1l),0)].4N(",")+")"}});c B(F){b E;8(F&&F.3j==7k&&F.1Q==3){h F}8(E=/6v\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.3Y(F)){h[Z(E[1]),Z(E[2]),Z(E[3])]}8(E=/6v\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.3Y(F)){h[4F(E[1])*2.55,4F(E[2])*2.55,4F(E[3])*2.55]}8(E=/#([a-3N-3P-9]{2})([a-3N-3P-9]{2})([a-3N-3P-9]{2})/.3Y(F)){h[Z(E[1],16),Z(E[2],16),Z(E[3],16)]}8(E=/#([a-3N-3P-9])([a-3N-3P-9])([a-3N-3P-9])/.3Y(F)){h[Z(E[1]+E[1],16),Z(E[2]+E[2],16),Z(E[3]+E[3],16)]}8(E=/7m\\(0, 0, 0, 0\\)/.3Y(F)){h A.3f}h A[1o.7n(F).at()]}c D(G,E){b F;66{F=1o.am(G,E);8(F!=""&&F!="3f"||1o.4L(G,"1L")){2u}E="3t"}6j(G=G.3m);h B(F)}b A={8I:[0,1l,1l],ac:[7j,1l,1l],ad:[7p,7p,af],ab:[0,0,0],aa:[0,0,1l],a6:[7b,42,42],a5:[0,1l,1l],a7:[0,0,44],a8:[0,44,44],a9:[6k,6k,6k],ag:[0,2q,0],ah:[ao,aq,7o],ar:[44,0,44],an:[85,7o,47],ai:[1l,5A,0],aj:[ak,50,al],a4:[44,0,0],a3:[9M,7A,9N],9O:[9P,0,5j],9L:[1l,0,1l],9K:[1l,9G,0],9F:[0,37,0],9H:[75,0,9I],9J:[7j,7i,5A],9R:[9Z,a1,7i],9Y:[7c,1l,1l],9X:[7d,9T,7d],9W:[5j,5j,5j],as:[1l,aR,aZ],b2:[1l,1l,7c],aP:[0,1l,0],aA:[1l,0,1l],aO:[37,0,0],aC:[0,0,37],az:[37,37,0],ay:[1l,7b,0],aG:[1l,5s,aF],aI:[37,0,37],aJ:[37,0,37],aD:[1l,0,0],aw:[5s,5s,5s],au:[1l,1l,1l],aB:[1l,1l,0],3f:[1l,1l,1l]};1o.1c.aN=1o.1c.5L;1o.1w(1o.1c,{7H:"7f",5L:c(F,G,E,I,H){h 1o.1c[1o.1c.7H](F,G,E,I,H)},aU:c(F,G,E,I,H){h I*(G/=H)*G+E},7f:c(F,G,E,I,H){h-I*(G/=H)*(G-2)+E},aY:c(F,G,E,I,H){8((G/=H/2)<1){h I/2*G*G+E}h-I/2*((--G)*(G-2)-1)+E},b0:c(F,G,E,I,H){h I*(G/=H)*G*G+E},9Q:c(F,G,E,I,H){h I*((G=G/H-1)*G*G+1)+E},9D:c(F,G,E,I,H){8((G/=H/2)<1){h I/2*G*G*G+E}h I/2*((G-=2)*G*G+2)+E},8w:c(F,G,E,I,H){h I*(G/=H)*G*G*G+E},8x:c(F,G,E,I,H){h-I*((G=G/H-1)*G*G*G-1)+E},8y:c(F,G,E,I,H){8((G/=H/2)<1){h I/2*G*G*G*G+E}h-I/2*((G-=2)*G*G*G-2)+E},8z:c(F,G,E,I,H){h I*(G/=H)*G*G*G*G+E},8v:c(F,G,E,I,H){h I*((G=G/H-1)*G*G*G*G+1)+E},8u:c(F,G,E,I,H){8((G/=H/2)<1){h I/2*G*G*G*G*G+E}h I/2*((G-=2)*G*G*G*G+2)+E},8p:c(F,G,E,I,H){h-I*v.7h(G/H*(v.2P/2))+I+E},8r:c(F,G,E,I,H){h I*v.4t(G/H*(v.2P/2))+E},8s:c(F,G,E,I,H){h-I/2*(v.7h(v.2P*G/H)-1)+E},8A:c(F,G,E,I,H){h(G==0)?E:I*v.3d(2,10*(G/H-1))+E},8B:c(F,G,E,I,H){h(G==H)?E+I:I*(-v.3d(2,-10*G/H)+1)+E},8J:c(F,G,E,I,H){8(G==0){h E}8(G==H){h E+I}8((G/=H/2)<1){h I/2*v.3d(2,10*(G-1))+E}h I/2*(-v.3d(2,-10*--G)+2)+E},8L:c(F,G,E,I,H){h-I*(v.3K(1-(G/=H)*G)-1)+E},8M:c(F,G,E,I,H){h I*v.3K(1-(G=G/H-1)*G)+E},9E:c(F,G,E,I,H){8((G/=H/2)<1){h-I/2*(v.3K(1-G*G)-1)+E}h I/2*(v.3K(1-(G-=2)*G)+1)+E},8C:c(F,H,E,L,K){b I=1.48;b J=0;b G=L;8(H==0){h E}8((H/=K)==1){h E+L}8(!J){J=K*0.3}8(G<v.2j(L)){G=L;b I=J/4}1q{b I=J/(2*v.2P)*v.6m(L/G)}h-(G*v.3d(2,10*(H-=1))*v.4t((H*K-I)*(2*v.2P)/J))+E},8E:c(F,H,E,L,K){b I=1.48;b J=0;b G=L;8(H==0){h E}8((H/=K)==1){h E+L}8(!J){J=K*0.3}8(G<v.2j(L)){G=L;b I=J/4}1q{b I=J/(2*v.2P)*v.6m(L/G)}h G*v.3d(2,-10*H)*v.4t((H*K-I)*(2*v.2P)/J)+L+E},8F:c(F,H,E,L,K){b I=1.48;b J=0;b G=L;8(H==0){h E}8((H/=K/2)==2){h E+L}8(!J){J=K*(0.3*1.5)}8(G<v.2j(L)){G=L;b I=J/4}1q{b I=J/(2*v.2P)*v.6m(L/G)}8(H<1){h-0.5*(G*v.3d(2,10*(H-=1))*v.4t((H*K-I)*(2*v.2P)/J))+E}h G*v.3d(2,-10*(H-=1))*v.4t((H*K-I)*(2*v.2P)/J)*0.5+L+E},8n:c(F,G,E,J,I,H){8(H==3b){H=1.48}h J*(G/=I)*G*((H+1)*G-H)+E},86:c(F,G,E,J,I,H){8(H==3b){H=1.48}h J*((G=G/I-1)*G*((H+1)*G+H)+1)+E},87:c(F,G,E,J,I,H){8(H==3b){H=1.48}8((G/=I/2)<1){h J/2*(G*G*(((H*=(1.7g))+1)*G-H))+E}h J/2*((G-=2)*G*(((H*=(1.7g))+1)*G+H)+2)+E},7q:c(F,G,E,I,H){h I-1o.1c.6o(F,H-G,0,I,H)+E},6o:c(F,G,E,I,H){8((G/=H)<(1/2.75)){h I*(7.5p*G*G)+E}1q{8(G<(2/2.75)){h I*(7.5p*(G-=(1.5/2.75))*G+0.75)+E}1q{8(G<(2.5/2.75)){h I*(7.5p*(G-=(2.25/2.75))*G+0.80)+E}1q{h I*(7.5p*(G-=(2.8k/2.75))*G+0.8l)+E}}}},8m:c(F,G,E,I,H){8(G<H/2){h 1o.1c.7q(F,G*2,0,I,H)*0.5+E}h 1o.1c.6o(F,G*2-H,0,I,H)*0.5+I*0.5+E}})})(1o);(c(A){A.q.8h=c(B){h 6.1E(c(){b D=A(6),C=["p","g","d"];b H=A.q.2d(D,B.f.1s||"1a");b G=B.f.3y||"3g";A.q.2J(D,C);D.13();b J=A.q.35(D).j({23:"2s"});b E=(G=="3g")?"l":"k";b I=(G=="3g")?J.l():J.k();8(H=="13"){J.j(E,0)}b F={};F[E]=H=="13"?I:0;J.1g(F,B.1n,B.f.1c,c(){8(H=="1a"){D.1a()}A.q.2e(D,C);A.q.2L(D);8(B.1k){B.1k.1e(D[0],17)}D.1W()})})}})(1o);(c(A){A.q.8d=c(B){h 6.1E(c(){b E=A(6),K=["p","g","d"];b J=A.q.2d(E,B.f.1s||"2y");b M=B.f.3y||"32";b C=B.f.36||20;b D=B.f.5v||5;b G=B.1n||8c;8(/13|1a/.1f(J)){K.4C("1m")}A.q.2J(E,K);E.13();A.q.35(E);b F=(M=="32"||M=="54")?"g":"d";b O=(M=="32"||M=="d")?"1A":"4X";b C=B.f.36||(F=="g"?E.1U({2z:18})/3:E.1Y({2z:18})/3);8(J=="13"){E.j("1m",0).j(F,O=="1A"?-C:C)}8(J=="1a"){C=C/(D*2)}8(J!="1a"){D--}8(J=="13"){b H={1m:1};H[F]=(O=="1A"?"+=":"-=")+C;E.1g(H,G/2,B.f.1c);C=C/2;D--}21(b I=0;I<D;I++){b N={},L={};N[F]=(O=="1A"?"-=":"+=")+C;L[F]=(O=="1A"?"+=":"-=")+C;E.1g(N,G/2,B.f.1c).1g(L,G/2,B.f.1c);C=(J=="1a")?C*2:C/2}8(J=="1a"){b H={1m:0};H[F]=(O=="1A"?"-=":"+=")+C;E.1g(H,G/2,B.f.1c,c(){E.1a();A.q.2e(E,K);A.q.2L(E);8(B.1k){B.1k.1e(6,17)}})}1q{b N={},L={};N[F]=(O=="1A"?"-=":"+=")+C;L[F]=(O=="1A"?"+=":"-=")+C;E.1g(N,G/2,B.f.1c).1g(L,G/2,B.f.1c,c(){A.q.2e(E,K);A.q.2L(E);8(B.1k){B.1k.1e(6,17)}})}E.1E("56",c(){E.1W()});E.1W()})}})(1o);(c(A){A.q.8f=c(B){h 6.1E(c(){b F=A(6),J=["p","g","d","l","k"];b I=A.q.2d(F,B.f.1s||"1a");b K=B.f.3y||"3g";A.q.2J(F,J);F.13();b C=A.q.35(F).j({23:"2s"});b E=F[0].4r=="9m"?C:F;b G={11:(K=="3g")?"l":"k",p:(K=="3g")?"g":"d"};b D=(K=="3g")?E.l():E.k();8(I=="13"){E.j(G.11,0);E.j(G.p,D/2)}b H={};H[G.11]=I=="13"?D:0;H[G.p]=I=="13"?0:D/2;E.1g(H,{1E:14,1n:B.1n,1c:B.f.1c,4y:c(){8(I=="1a"){F.1a()}A.q.2e(F,J);A.q.2L(F);8(B.1k){B.1k.1e(F[0],17)}F.1W()}})})}})(1o);(c(A){A.q.2T=c(B){h 6.1E(c(){b E=A(6),D=["p","g","d","1m"];b I=A.q.2d(E,B.f.1s||"1a");b H=B.f.3y||"d";A.q.2J(E,D);E.13();A.q.35(E);b F=(H=="32"||H=="54")?"g":"d";b C=(H=="32"||H=="d")?"1A":"4X";b J=B.f.36||(F=="g"?E.1U({2z:18})/2:E.1Y({2z:18})/2);8(I=="13"){E.j("1m",0).j(F,C=="1A"?-J:J)}b G={1m:I=="13"?1:0};G[F]=(I=="13"?(C=="1A"?"+=":"-="):(C=="1A"?"-=":"+="))+J;E.1g(G,{1E:14,1n:B.1n,1c:B.f.1c,4y:c(){8(I=="1a"){E.1a()}A.q.2e(E,D);A.q.2L(E);8(B.1k){B.1k.1e(6,17)}E.1W()}})})}})(1o);(c(A){A.q.6d=c(B){h 6.1E(c(){b I=B.f.4M?v.4a(v.3K(B.f.4M)):3;b E=B.f.4M?v.4a(v.3K(B.f.4M)):3;B.f.1s=B.f.1s=="2U"?(A(6).3l(":2Z")?"1a":"13"):B.f.1s;b H=A(6).13().j("4S","2s");b J=H.r();J.g-=Z(H.j("3V"))||0;J.d-=Z(H.j("3S"))||0;b G=H.1Y(18);b C=H.1U(18);21(b F=0;F<I;F++){21(b D=0;D<E;D++){H.46().2H("1L").6e("<24></24>").j({p:"1u",4S:"2Z",d:-D*(G/E),g:-F*(C/I)}).1i().1y("q-6d").j({p:"1u",23:"2s",k:G/E,l:C/I,d:J.d+D*(G/E)+(B.f.1s=="13"?(D-v.4P(E/2))*(G/E):0),g:J.g+F*(C/I)+(B.f.1s=="13"?(F-v.4P(I/2))*(C/I):0),1m:B.f.1s=="13"?0:1}).1g({d:J.d+D*(G/E)+(B.f.1s=="13"?0:(D-v.4P(E/2))*(G/E)),g:J.g+F*(C/I)+(B.f.1s=="13"?0:(F-v.4P(I/2))*(C/I)),1m:B.f.1s=="13"?1:0},B.1n||67)}}7r(c(){B.f.1s=="13"?H.j({4S:"2Z"}):H.j({4S:"2Z"}).1a();8(B.1k){B.1k.1e(H[0])}H.1W();A(".q-6d").1I()},B.1n||67)})}})(1o);(c(A){A.q.9o=c(B){h 6.1E(c(){b E=A(6),J=["p","g","d"];b G=A.q.2d(E,B.f.1s||"1a");b N=B.f.11||15;b M=!(!B.f.9k);A.q.2J(E,J);E.13();b D=A.q.35(E).j({23:"2s"});b H=((G=="13")!=M);b F=H?["k","l"]:["l","k"];b C=H?[D.k(),D.l()]:[D.l(),D.k()];b I=/([0-9]+)%/.3Y(N);8(I){N=Z(I[1])/2q*C[G=="1a"?0:1]}8(G=="13"){D.j(M?{l:0,k:N}:{l:N,k:0})}b L={},K={};L[F[0]]=G=="13"?C[0]:N;K[F[1]]=G=="13"?C[1]:0;D.1g(L,B.1n/2,B.f.1c).1g(K,B.1n/2,B.f.1c,c(){8(G=="1a"){E.1a()}A.q.2e(E,J);A.q.2L(E);8(B.1k){B.1k.1e(E[0],17)}E.1W()})})}})(1o);(c(A){A.q.9f=c(B){h 6.1E(c(){b E=A(6),D=["6a","3t","1m"];b H=A.q.2d(E,B.f.1s||"13");b C=B.f.4I||"#9h";b G=E.j("3t");A.q.2J(E,D);E.13();E.j({6a:"3v",3t:C});b F={3t:G};8(H=="1a"){F.1m=0}E.1g(F,{1E:14,1n:B.1n,1c:B.f.1c,4y:c(){8(H=="1a"){E.1a()}A.q.2e(E,D);8(H=="13"&&1o.2b.3a){6.1V.9i("7B")}8(B.1k){B.1k.1e(6,17)}E.1W()}})})}})(1o);(c(A){A.q.9q=c(B){h 6.1E(c(){b D=A(6);b F=A.q.2d(D,B.f.1s||"13");b E=B.f.5v||5;8(F=="1a"){E--}8(D.3l(":2s")){D.j("1m",0);D.13();D.1g({1m:1},B.1n/2,B.f.1c);E=E-2}21(b C=0;C<E;C++){D.1g({1m:0},B.1n/2,B.f.1c).1g({1m:1},B.1n/2,B.f.1c)}8(F=="1a"){D.1g({1m:0},B.1n/2,B.f.1c,c(){D.1a();8(B.1k){B.1k.1e(6,17)}})}1q{D.1g({1m:0},B.1n/2,B.f.1c).1g({1m:1},B.1n/2,B.f.1c,c(){8(B.1k){B.1k.1e(6,17)}})}D.1E("56",c(){D.1W()});D.1W()})}})(1o);(c(A){A.q.9r=c(B){h 6.1E(c(){b F=A(6);b C=A.1w(18,{},B.f);b H=A.q.2d(F,B.f.1s||"1a");b G=Z(B.f.4G)||7A;C.7F=18;b E={l:F.l(),k:F.k()};b D=G/2q;F.19=(H=="1a")?E:{l:E.l*D,k:E.k*D};C.19=F.19;C.4G=(H=="1a")?G:2q;C.1s=H;F.2y("5E",C,B.1n,B.1k);F.1W()})};A.q.5E=c(B){h 6.1E(c(){b G=A(6);b D=A.1w(18,{},B.f);b J=A.q.2d(G,B.f.1s||"2y");b H=Z(B.f.4G)||(Z(B.f.4G)==0?0:(J=="1a"?0:2q));b I=B.f.3y||"4v";b C=B.f.5D;8(J!="2y"){D.5D=C||["7C","7D"];D.2e=18}b F={l:G.l(),k:G.k()};G.19=B.f.19||(J=="13"?{l:0,k:0}:F);b E={y:I!="9x"?(H/2q):1,x:I!="3g"?(H/2q):1};G.1d={l:F.l*E.y,k:F.k*E.x};8(B.f.7F){8(J=="13"){G.19.1m=0;G.1d.1m=1}8(J=="1a"){G.19.1m=1;G.1d.1m=0}}D.19=G.19;D.1d=G.1d;D.1s=J;G.2y("11",D,B.1n,B.1k);G.1W()})};A.q.11=c(B){h 6.1E(c(){b C=A(6),N=["p","g","d","k","l","23","1m"];b M=["p","g","d","23","1m"];b J=["k","l","23"];b P=["7E"];b K=["3w","4Z","7z","7y"];b F=["3n","53","7t","7s"];b G=A.q.2d(C,B.f.1s||"2y");b I=B.f.2e||14;b E=B.f.5E||"4v";b O=B.f.5D;b D={l:C.l(),k:C.k()};C.19=B.f.19||D;C.1d=B.f.1d||D;8(O){b H=A.q.7u(O,D);C.19.g=(D.l-C.19.l)*H.y;C.19.d=(D.k-C.19.k)*H.x;C.1d.g=(D.l-C.1d.l)*H.y;C.1d.d=(D.k-C.1d.k)*H.x}b L={19:{y:C.19.l/D.l,x:C.19.k/D.k},1d:{y:C.1d.l/D.l,x:C.1d.k/D.k}};8(E=="8X"||E=="4v"){8(L.19.y!=L.1d.y){N=N.3i(K);C.19=A.q.2G(C,K,L.19.y,C.19);C.1d=A.q.2G(C,K,L.1d.y,C.1d)}8(L.19.x!=L.1d.x){N=N.3i(F);C.19=A.q.2G(C,F,L.19.x,C.19);C.1d=A.q.2G(C,F,L.1d.x,C.1d)}}8(E=="7v"||E=="4v"){8(L.19.y!=L.1d.y){N=N.3i(P);C.19=A.q.2G(C,P,L.19.y,C.19);C.1d=A.q.2G(C,P,L.1d.y,C.1d)}}A.q.2J(C,I?N:M);C.13();A.q.35(C);C.j("23","2s").j(C.19);8(E=="7v"||E=="4v"){K=K.3i(["3V","3U"]).3i(P);F=F.3i(["3S","3T"]);J=N.3i(K).3i(F);C.4U("*[k]").1D(c(){1C=A(6);8(I){A.q.2J(1C,J)}b Q={l:1C.l(),k:1C.k()};1C.19={l:Q.l*L.19.y,k:Q.k*L.19.x};1C.1d={l:Q.l*L.1d.y,k:Q.k*L.1d.x};8(L.19.y!=L.1d.y){1C.19=A.q.2G(1C,K,L.19.y,1C.19);1C.1d=A.q.2G(1C,K,L.1d.y,1C.1d)}8(L.19.x!=L.1d.x){1C.19=A.q.2G(1C,F,L.19.x,1C.19);1C.1d=A.q.2G(1C,F,L.1d.x,1C.1d)}1C.j(1C.19);1C.1g(1C.1d,B.1n,B.f.1c,c(){8(I){A.q.2e(1C,J)}})})}C.1g(C.1d,{1E:14,1n:B.1n,1c:B.f.1c,4y:c(){8(G=="1a"){C.1a()}A.q.2e(C,I?N:M);A.q.2L(C);8(B.1k){B.1k.1e(6,17)}C.1W()}})})}})(1o);(c(A){A.q.8U=c(B){h 6.1E(c(){b E=A(6),K=["p","g","d"];b J=A.q.2d(E,B.f.1s||"2y");b M=B.f.3y||"d";b C=B.f.36||20;b D=B.f.5v||3;b G=B.1n||B.f.1n||5A;A.q.2J(E,K);E.13();A.q.35(E);b F=(M=="32"||M=="54")?"g":"d";b O=(M=="32"||M=="d")?"1A":"4X";b H={},N={},L={};H[F]=(O=="1A"?"-=":"+=")+C;N[F]=(O=="1A"?"+=":"-=")+C*2;L[F]=(O=="1A"?"-=":"+=")+C*2;E.1g(H,G,B.f.1c);21(b I=1;I<D;I++){E.1g(N,G,B.f.1c).1g(L,G,B.f.1c)}E.1g(N,G,B.f.1c).1g(H,G/2,B.f.1c,c(){A.q.2e(E,K);A.q.2L(E);8(B.1k){B.1k.1e(6,17)}});E.1E("56",c(){E.1W()});E.1W()})}})(1o);(c(A){A.q.8Q=c(B){h 6.1E(c(){b E=A(6),D=["p","g","d"];b I=A.q.2d(E,B.f.1s||"13");b H=B.f.3y||"d";A.q.2J(E,D);E.13();A.q.35(E).j({23:"2s"});b F=(H=="32"||H=="54")?"g":"d";b C=(H=="32"||H=="d")?"1A":"4X";b J=B.f.36||(F=="g"?E.1U({2z:18}):E.1Y({2z:18}));8(I=="13"){E.j(F,C=="1A"?-J:J)}b G={};G[F]=(I=="13"?(C=="1A"?"+=":"-="):(C=="1A"?"-=":"+="))+J;E.1g(G,{1E:14,1n:B.1n,1c:B.f.1c,4y:c(){8(I=="1a"){E.1a()}A.q.2e(E,D);A.q.2L(E);8(B.1k){B.1k.1e(6,17)}E.1W()}})})}})(1o);(c(A){A.q.7x=c(B){h 6.1E(c(){b E=A(6);b G=A.q.2d(E,B.f.1s||"2y");b F=A(B.f.1d);b C=E.r();b D=A(\'<24 4x="m-q-7x"></24>\').2H(12.1L);8(B.f.4E){D.1y(B.f.4E)}D.1y(B.f.4E);D.j({g:C.g,d:C.d,l:E.1U()-Z(D.j("3w"))-Z(D.j("4Z")),k:E.1Y()-Z(D.j("3n"))-Z(D.j("53")),p:"1u"});C=F.r();7w={g:C.g,d:C.d,l:F.1U()-Z(D.j("3w"))-Z(D.j("4Z")),k:F.1Y()-Z(D.j("3n"))-Z(D.j("53"))};D.1g(7w,B.1n,B.f.1c,c(){D.1I();8(B.1k){B.1k.1e(E[0],17)}E.1W()})})}})(1o);',62,686,'||||||this||if|||var|function|left||options|top|return||css|width|height|ui||element|position|effects|offset||helper|resizable|Math||||||||||||||||||||||||||||||parseInt||size|document|show|false|||arguments|true|from|hide|instance|easing|to|apply|test|animate|relative|parent|containment|callback|255|opacity|duration|jQuery|data|else|draggable|mode|resize|absolute|add|extend|cursor|addClass|0px|pos|plugin|child|each|queue|call|start|null|remove|helperProportions|ddmanager|body|click|originalPosition|grid|scrollLeft|length|zIndex|scrollTop|handle|outerHeight|style|dequeue|handles|outerWidth|se||for|sw|overflow|div||offsetParent|nw|disabled|ne|removeClass|browser|cssPosition|setMode|restore|propagate|positionAbs|currentItem|droppable|abs|px|margins|typeof|ghost|stop|axis|100|right|hidden|attr|break|auto|bottom|originalSize|effect|margin|4px|get|overflowX|convertPositionTo|overflowY|aspectRatio|setTransition|appendTo|alsoResize|save|isover|removeWrapper|scrollSensitivity|_change|pageX|PI|pageY|triggerHandler|accept|drop|toggle|scrollSpeed|fixed|fn|case|visible|knobHandles|_mouseStarted|up|proportionallyResize|drag|createWrapper|distance|128|cursorAt|widgetName|msie|undefined|0pt|pow|sizeDiff|transparent|vertical|widget|concat|constructor|isout|is|parentNode|borderLeftWidth|current|revert|snapElements|static|mouseDrag|backgroundColor|plugins|none|borderTopWidth|min|direction|defaults|unbind|target|deactivate|_handles|mouseStart|droppables|over|out|activate|intersect|sqrt|parentData|window|fA|bind|F0|end|max|marginLeft|marginRight|marginBottom|marginTop|display|disableSelection|exec|borderDif|isOver|match||mouseStop|139||clone||70158|stack|round|hasScroll|removeData|animateClass|knob|_proportionallyResize|destroy|delay|minWidth|cancel|containerOffset|minHeight|object|_aspectRatio|offsetHeight|unselectable|init|tagName|mouseUp|sin|scroll|both|offsetWidth|class|complete|prototype|cancelHelperRemoval|cssCache|push|setData|className|parseFloat|percent|maxWidth|color|containerPosition|HTML|nodeName|pieces|join|input|floor|maxHeight|sortables|visibility|containerSize|find|defaultView|in|neg|unit|borderBottomWidth||default|background|borderRightWidth|down||fx|resizing|textarea|shiftKey|_mouseDelayMet|_mouseDownEvent|string|block|slow|iframeFix|scrollHeight|absolutePosition|mouse|211|activeClass|clickOffset|continue|proportions|hoverClass|5625|split|tolerance|192|originalElement|mouseDelayMet|times|fast|original|normal|uiHash|140|autohide|mouseInit|origin|scale|mouseCapture|_updateCache|indexOf|generatePosition|_mouseUpDelegate|getData|swing|1px|id|borderTop|borderLeft|alsoresize|switch|borderBottom|fxWrapper|removeChild|_cursor|mouseDistanceMet|button|_mouseMoveDelegate|cssText|isNaN|knobTheme|_nodeName|Number|clear|version|do|500|borderRight|sortable|backgroundImage|snap|documentScroll|explode|wrap|preventDefault|dragging|preserveCursor|elementOffset|while|169|overflowXOffset|asin|_zIndex|easeOutBounce|mouseDestroy|prepareOffsets|_opacity|parents|_helper|wrapper|rgb|containerElement|overflowYOffset|on|placeholder|_updateRatio|1000|originalMousePosition|8px|widgetBaseClass|shouldRevert|MozUserSelect|item|_renderProxy|5000px|solid|F2F2F2|_respectSize|mousemove|append|isFunction|_renderAxis|scrollWidth|greedyChild|greedy|innerWidth|number|dropBehaviour|snapMode|mouseup|mouseMove|connectToSortable|mouseDown|defaultTheme|String|select||opera|innerHeight|autoHide|_mouseUnselectable|_removeClass|165|224|144|ec|easeOutQuad|525|cos|230|240|Array|elem|rgba|trim|107|245|easeInBounce|setTimeout|paddingRight|paddingLeft|getBaseline|content|animation|transfer|paddingBottom|paddingTop|150|filter|middle|center|fontSize|fade|step|def|Function|_hide|_addClass|toggleClass|morph|_toggleClass|_show|currentStyle|float|storage|border|padding|getComputedStyle|cssUnit|__toggle|dropover|dropout|splice|9375|sort|not|dropactivate|pointer||easeOutBack|easeInOutBack|fit|dropdeactivate|group|makeArray|250|bounce|containerCache|clip|receive|blind|toSortable|fromSortable|625|984375|easeInOutBounce|easeInBack|touch|easeInSine|eq|easeOutSine|easeInOutSine|borderTopColor|easeInOutQuint|easeOutQuint|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeInExpo|easeOutExpo|easeInElastic|dragstart|easeOutElastic|easeInOutElastic|type|sortactivate|aqua|easeInOutExpo|refreshPositions|easeInCirc|easeOutCirc|sender|sortreceive|_mouseDelayTimer|slide|which|started|borderRightColor|shake|andSelf|state|box|font|mozilla|mousedown|disable|enableSelection|off|catch|try|gen|getter|inArray|enable|outlineColor|new|slice|borderLeftColor|invalid|highlight|snapTolerance|ffff99|removeAttribute|method|horizFirst|inner|IMG|refreshItems|fold|outer|pulsate|puff|hasClass|borderBottomColor|replaceWith|index|valid|horizontal|iframe|Moz|DragDropIframeFix|001|fff|easeInOutCubic|easeInOutCirc|green|215|indigo|130|khaki|gold|fuchsia|233|122|darkviolet|148|easeOutCubic|lightblue|instanceof|238|hover|mouseover|lightgrey|lightgreen|lightcyan|173|children|216|switchClass|darksalmon|darkred|cyan|brown|darkblue|darkcyan|darkgrey|blue|black|azure|beige|em|220|darkgreen|darkkhaki|darkorange|darkorchid|153|204|curCSS|darkolivegreen|189|map|183|darkmagenta|lightpink|toLowerCase|white|all|silver|animateEasing|orange|olive|magenta|yellow|navy|red|zoom|203|pink|808080|purple|violet|safari|img|canvas|jswing|maroon|lime|Top|182|proxy|Bottom|easeInQuad|pt|Left|Right|easeInOutQuad|193|easeInCubic|animateDuration|lightyellow|DEDEDE'.split('|'),0,{}))