/******************************************************************************\
 * Copyright (C) Xoopit Inc.
 * All rights reserved.
 *
 * http://www.xoopit.com
 *
 * The program contains proprietary information of Xoopit Inc.,
 * and is licensed subject to restrictions on use and distribution.
 \*****************************************************************************/
/*
 * 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)}})})();(function(C){C.ui={plugin:{add:function(E,F,H){var G=C.ui[E].prototype;for(var D in H){G.plugins[D]=G.plugins[D]||[];G.plugins[D].push([F,H[D]])}},call:function(D,F,E){var H=D.plugins[F];if(!H){return }for(var G=0;G<H.length;G++){if(D.options[H[G][0]]){H[G][1].apply(D.element,E)}}}},cssCache:{},css:function(D){if(C.ui.cssCache[D]){return C.ui.cssCache[D]}var E=C('<div class="ui-gen">').addClass(D).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[D]=!!((!(/auto|default/).test(E.css("cursor"))||(/^[1-9]/).test(E.css("height"))||(/^[1-9]/).test(E.css("width"))||!(/none/).test(E.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(E.css("backgroundColor"))));try{C("body").get(0).removeChild(E.get(0))}catch(F){}return C.ui.cssCache[D]},disableSelection:function(D){D.unselectable="on";D.onselectstart=function(){return false};if(D.style){D.style.MozUserSelect="none"}},enableSelection:function(D){D.unselectable="off";D.onselectstart=function(){return true};if(D.style){D.style.MozUserSelect=""}},hasScroll:function(G,E){var D=/top/.test(E||"top")?"scrollTop":"scrollLeft",F=false;if(G[D]>0){return true}G[D]=1;F=G[D]>0?true:false;G[D]=0;return F}};var B=C.fn.remove;C.fn.remove=function(){C("*",this).add(this).trigger("remove");return B.apply(this,arguments)};function A(E,F,G){var D=C[E][F].getter||[];D=(typeof D=="string"?D.split(/,?\s+/):D);return(C.inArray(G,D)!=-1)}C.widget=function(E,D){var F=E.split(".")[0];E=E.split(".")[1];C.fn[E]=function(J){var H=(typeof J=="string"),I=Array.prototype.slice.call(arguments,1);if(H&&A(F,E,J)){var G=C.data(this[0],E);return(G?G[J].apply(G,I):undefined)}return this.each(function(){var K=C.data(this,E);if(H&&K&&C.isFunction(K[J])){K[J].apply(K,I)}else{if(!H){C.data(this,E,new C[F][E](this,J))}}})};C[F][E]=function(I,H){var G=this;this.widgetName=E;this.widgetBaseClass=F+"-"+E;this.options=C.extend({},C.widget.defaults,C[F][E].defaults,H);this.element=C(I).bind("setData."+E,function(L,J,K){return G.setData(J,K)}).bind("getData."+E,function(K,J){return G.getData(J)}).bind("remove",function(){return G.destroy()});this.init()};C[F][E].prototype=C.extend({},C.widget.prototype,D)};C.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(D){return this.options[D]},setData:function(D,E){this.options[D]=E;if(D=="disabled"){this.element[E?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};C.widget.defaults={disabled:false};C.ui.mouse={mouseInit:function(){var D=this;this.element.bind("mousedown."+this.widgetName,function(E){return D.mouseDown(E)});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(F){(this._mouseStarted&&this.mouseUp(F));this._mouseDownEvent=F;var E=this,G=(F.which==1),D=(typeof this.options.cancel=="string"?C(F.target).is(this.options.cancel):false);if(!G||D||!this.mouseCapture(F)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(F)&&this.mouseDelayMet(F)){this._mouseStarted=(this.mouseStart(F)!==false);if(!this._mouseStarted){F.preventDefault();return true}}this._mouseMoveDelegate=function(H){return E.mouseMove(H)};this._mouseUpDelegate=function(H){return E.mouseUp(H)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(D){if(C.browser.msie&&!D.button){return this.mouseUp(D)}if(this._mouseStarted){this.mouseDrag(D);return false}if(this.mouseDistanceMet(D)&&this.mouseDelayMet(D)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,D)!==false);(this._mouseStarted?this.mouseDrag(D):this.mouseUp(D))}return !this._mouseStarted},mouseUp:function(D){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(D)}return false},mouseDistanceMet:function(D){return(Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance)},mouseDelayMet:function(D){return this._mouseDelayMet},mouseStart:function(D){},mouseDrag:function(D){},mouseStop:function(D){},mouseCapture:function(D){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(A){A.widget("ui.draggable",A.extend(A.ui.mouse,{init:function(){var B=this.options;if(B.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.element.addClass("ui-draggable");(B.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(F){var H=this.options;if(this.helper||H.disabled||A(F.target).is(".ui-resizable-handle")){return false}var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==F.target){C=true}});if(!C){return false}if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.helper=A.isFunction(H.helper)?A(H.helper.apply(this.element[0],[F])):(H.helper=="clone"?this.element.clone():this.element);if(!this.helper.parents("body").length){this.helper.appendTo((H.appendTo=="parent"?this.element[0].parentNode:H.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:F.pageX-this.offset.left,top:F.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0}}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var E=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:E.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:E.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(H.cursorAt){if(H.cursorAt.left!=undefined){this.offset.click.left=H.cursorAt.left+this.margins.left}if(H.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-H.cursorAt.right+this.margins.left}if(H.cursorAt.top!=undefined){this.offset.click.top=H.cursorAt.top+this.margins.top}if(H.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-H.cursorAt.bottom+this.margins.top}}if(H.containment){if(H.containment=="parent"){H.containment=this.helper[0].parentNode}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(H.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(H.containment)){var D=A(H.containment)[0];var G=A(H.containment).offset();this.containment=[G.left+(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,G.top+(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,G.left+Math.max(D.scrollWidth,D.offsetWidth)-(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),G.top+Math.max(D.scrollHeight,D.offsetHeight)-(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!H.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F)}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(F);return true},convertPositionTo:function(C,D){if(!D){D=this.position}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)}},generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C}return B},mouseDrag:function(B){this.position=this.generatePosition(B);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},mouseStop:function(C){if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){B.propagate("stop",C);B.clear()})}else{this.propagate("stop",C);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C])},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity")}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(C,B){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset()}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset()}},drag:function(D,C){var E=C.options;var B=A(this).data("draggable");if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if((B.overflowYOffset.top+B.overflowY[0].offsetHeight)-D.pageY<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed}if(D.pageY-B.overflowYOffset.top<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if((B.overflowXOffset.left+B.overflowX[0].offsetWidth)-D.pageX<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed}if(D.pageX-B.overflowXOffset.left<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap===true?".ui-draggable":C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(J,N){var I=A(this).data("draggable");var L=N.options.snapTolerance||20;var D=N.absolutePosition.left,C=D+I.helperProportions.width,P=N.absolutePosition.top,O=P+I.helperProportions.height;for(var H=I.snapElements.length-1;H>=0;H--){var E=I.snapElements[H].left,B=E+I.snapElements[H].width,R=I.snapElements[H].top,M=R+I.snapElements[H].height;if(!((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))){continue}if(N.options.snapMode!="inner"){var K=Math.abs(R-O)<=20;var Q=Math.abs(M-P)<=20;var G=Math.abs(E-C)<=20;var F=Math.abs(B-D)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R-I.helperProportions.height,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E-I.helperProportions.width}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B}).left}}if(N.options.snapMode!="outer"){var K=Math.abs(R-P)<=20;var Q=Math.abs(M-O)<=20;var G=Math.abs(E-D)<=20;var F=Math.abs(B-C)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M-I.helperProportions.height,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B-I.helperProportions.width}).left}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E.refreshItems();E.propagate("activate",D,B)}})},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",D,B)}})},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G)};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0]};F.target=this.instance.currentItem[0];this.instance.mouseCapture(F,true);this.instance.mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D.propagate("toSortable",F)}if(this.instance.currentItem){this.instance.mouseDrag(F)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}D.propagate("fromSortable",F)}}})}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min)});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E});this[0].style.zIndex=B.options.stack.min+C.length}})})(jQuery);(function(A){A.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var C=this.options,B=C.accept;C=A.extend(C,{accept:C.accept&&C.accept.constructor==Function?C.accept:function(D){return A(D).is(B)}});this.proportions={width:this.element.outerWidth(),height:this.element.outerHeight()};A.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(B){return{draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}},destroy:function(){var B=A.ui.ddmanager.droppables;for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},over:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},out:function(C){var B=A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},drop:function(D,C){var B=C||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[D,this.ui(B)]);this.element.triggerHandler("drop",[D,this.ui(B)],this.options.drop);return true}return false},activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}}});A.extend(A.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});A.ui.intersect=function(L,F,J){if(!F.offset){return false}var D=(L.positionAbs||L.position.absolute).left,C=D+L.helperProportions.width,I=(L.positionAbs||L.position.absolute).top,H=I+L.helperProportions.height;var E=F.offset.left,B=E+F.proportions.width,K=F.offset.top,G=K+F.proportions.height;switch(J){case"fit":return(E<D&&C<B&&K<I&&H<G);break;case"intersect":return(E<D+(L.helperProportions.width/2)&&C-(L.helperProportions.width/2)<B&&K<I+(L.helperProportions.height/2)&&H-(L.helperProportions.height/2)<G);break;case"pointer":return(E<((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)&&((L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left)<B&&K<((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)&&((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top)<G);break;case"touch":return((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(D,F){var B=A.ui.ddmanager.droppables;var E=F?F.type:null;for(var C=0;C<B.length;C++){if(B[C].options.disabled||(D&&!B[C].options.accept.call(B[C].element,(D.currentItem||D.element)))){continue}B[C].visible=B[C].element.is(":visible");if(!B[C].visible){continue}B[C].offset=B[C].element.offset();B[C].proportions={width:B[C].element.outerWidth(),height:B[C].element.outerHeight()};if(E=="dragstart"||E=="sortactivate"){B[C].activate.call(B[C],F)}}},drop:function(B,C){var D=false;A.each(A.ui.ddmanager.droppables,function(){if(!this.options){return }if(!this.options.disabled&&this.visible&&A.ui.intersect(B,this,this.options.tolerance)){D=this.drop.call(this,C)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(B.currentItem||B.element))){this.isout=1;this.isover=0;this.deactivate.call(this,C)}});return D},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables,function(){if(this.options.disabled||this.greedyChild||!this.visible){return }var E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(".ui-droppable:eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F.isover=0;F.isout=1;F.out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"over":"out"].call(this,C);if(F&&G=="isout"){F.isout=0;F.isover=1;F.over.call(F,C)}})}};A.ui.plugin.add("droppable","activeClass",{activate:function(C,B){A(this).addClass(B.options.activeClass)},deactivate:function(C,B){A(this).removeClass(B.options.activeClass)},drop:function(C,B){A(this).removeClass(B.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(C,B){A(this).addClass(B.options.hoverClass)},out:function(C,B){A(this).removeClass(B.options.hoverClass)},drop:function(C,B){A(this).removeClass(B.options.hoverClass)}})})(jQuery);(function(A){A.widget("ui.resizable",A.extend(A.ui.mouse,{init:function(){var M=this,N=this.options;var Q=this.element.css("position");this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(Q)?"relative":Q});A.extend(N,{_aspectRatio:!!(N.aspectRatio),helper:N.helper||N.ghost||N.animate?N.helper||"proxy":null,knobHandles:N.knobHandles===true?"ui-resizable-knob-handle":N.knobHandles});var H="1px solid #DEDEDE";N.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:H},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:H},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:H},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:H},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:H,borderBottom:H},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:H,borderLeft:H},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:H,borderTop:H},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:H,borderTop:H}};N.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"0px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"0px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"0px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"0px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"0px",bottom:"0px"},"ui-resizable-sw":{cursor:"sw-resize",left:"0px",bottom:"0px"},"ui-resizable-nw":{cursor:"nw-resize",left:"0px",top:"0px"},"ui-resizable-ne":{cursor:"ne-resize",right:"0px",top:"0px"}};N._nodeName=this.element[0].nodeName;if(N._nodeName.match(/canvas|textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"})}B.wrap(A('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var J=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginLeft:J.css("marginLeft"),marginTop:J.css("marginTop"),marginRight:J.css("marginRight"),marginBottom:J.css("marginBottom")});J.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&N.preventDefault){J.css("resize","none")}N.proportionallyResize=J.css({position:"static",zoom:1,display:"block"});this.element.css({margin:J.css("margin")});this._proportionallyResize()}if(!N.handles){N.handles=!A(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(N.handles.constructor==String){N.zIndex=N.zIndex||1000;if(N.handles=="all"){N.handles="n,e,s,w,se,sw,ne,nw"}var O=N.handles.split(",");N.handles={};var G={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var R=0;R<O.length;R++){var S=A.trim(O[R]),L=N.defaultTheme,F="ui-resizable-"+S,C=!A.ui.css(F)&&!N.knobHandles,P=A.ui.css("ui-resizable-knob-handle"),T=A.extend(L[F],L["ui-resizable-handle"]),D=A.extend(N.knobTheme[F],!P?N.knobTheme["ui-resizable-handle"]:{});var K=/sw|se|ne|nw/.test(S)?{zIndex:++N.zIndex}:{};var I=(C?G[S]:""),E=A(['<div class="ui-resizable-handle ',F,'" style="',I,G.handle,'"></div>'].join("")).css(K);N.handles[S]=".ui-resizable-"+S;this.element.append(E.css(C?T:{}).css(N.knobHandles?D:{}).addClass(N.knobHandles?"ui-resizable-knob-handle":"").addClass(N.knobHandles))}if(N.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(Y){Y=Y||this.element;for(var V in N.handles){if(N.handles[V].constructor==String){N.handles[V]=A(N.handles[V],this.element).show()}if(N.transparent){N.handles[V].css({opacity:0})}if(this.element.is(".ui-wrapper")&&N._nodeName.match(/textarea|input|select|button/i)){var W=A(N.handles[V],this.element),X=0;X=/sw|ne|nw|se|n|s/.test(V)?W.outerHeight():W.outerWidth();var U=["padding",/ne|nw|n/.test(V)?"Top":/se|sw|s/.test(V)?"Bottom":/^e$/.test(V)?"Right":"Left"].join("");if(!N.transparent){Y.css(U,X)}this._proportionallyResize()}if(!A(N.handles[V]).length){continue}}};this._renderAxis(this.element);N._handles=A(".ui-resizable-handle",M.element);if(N.disableSelection){N._handles.each(function(U,V){A.ui.disableSelection(V)})}N._handles.mouseover(function(){if(!N.resizing){if(this.className){var U=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}M.axis=N.axis=U&&U[1]?U[1]:"se"}});if(N.autoHide){N._handles.hide();A(M.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");N._handles.show()},function(){if(!N.resizing){A(this).addClass("ui-resizable-autohide");N._handles.hide()}})}this.mouseInit()},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);if(C!="resize"){this.element.triggerHandler(["resize",C].join(""),[B,this.ui()],this.options[C])}},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0);this.mouseDestroy();var B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C)}},mouseStart:function(K){if(this.options.disabled){return false}var J=false;for(var H in this.options.handles){if(A(this.options.handles[H])[0]==K.target){J=true}}if(!J){return false}var C=this.options,B=this.element.position(),D=this.element,I=function(O){return parseInt(O,10)||0},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var M=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var L=M?C.documentScroll.top:0,F=M?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+L),left:(B.left+F)})}if(A.browser.opera&&/relative/.test(D.css("position"))){D.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var N=I(this.helper.css("left")),E=I(this.helper.css("top"));this.offset=this.helper.offset();this.position={left:N,top:E};this.size=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.helper||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:N,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:K.pageX,top:K.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize")}this.propagate("start",K);return true},mouseDrag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this._change[K];if(!E){return false}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I)}H=this._respectSize(H,I);this.propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.helper&&C.proportionallyResize){this._proportionallyResize()}this._updateCache(H);this.element.triggerHandler("resize",[I,this.ui()],this.options.resize);return false},mouseStop:function(I){this.options.resizing=false;var E=this.options,H=function(M){return parseInt(M,10)||0},K=this;if(E.helper){var D=E.proportionallyResize,B=D&&(/textarea/i).test(D.get(0).nodeName),C=B&&A.ui.hasScroll(D.get(0),"left")?0:K.sizeDiff.height,G=B?0:K.sizeDiff.width;var L={width:(K.size.width-G),height:(K.size.height-C)},F=(parseInt(K.element.css("left"),10)+(K.position.left-K.originalPosition.left))||null,J=(parseInt(K.element.css("top"),10)+(K.position.top-K.originalPosition.top))||null;if(!E.animate){this.element.css(A.extend(L,{top:J,left:F}))}if(E.helper&&!E.animate){this._proportionallyResize()}}if(E.preserveCursor){A("body").css("cursor","auto")}this.propagate("stop",I);if(E.helper){this.helper.remove()}return false},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left}if(B.top){this.position.top=B.top}if(B.height){this.size.height=B.height}if(B.width){this.size.width=B.width}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=(C.height/F.aspectRatio)}else{if(D.width){D.height=(C.width*F.aspectRatio)}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width)}return D},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth}if(O){H.height=E.minHeight}if(P){H.width=E.maxWidth}if(J){H.height=E.maxHeight}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth}if(P&&G){H.left=C-E.maxWidth}if(O&&B){H.top=L-E.minHeight}if(J&&B){H.top=L-E.maxHeight}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null}else{if(K&&!H.top&&H.left){H.left=null}}return H},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return }var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J})}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"})},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.helper){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.helper).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0))}}else{this.helper=C}},_change:{e:function(D,C,B){return{width:this.originalSize.width+C}},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C}},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B}},s:function(D,C,B){return{height:this.originalSize.height+B}},se:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},sw:function(D,C,B){return A.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,C,B]))},ne:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,C,B]))},nw:function(D,C,B){return A.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,C,B]))}}}));A.extend(A.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=A(this).data("resizable"),G=M.element;var C=E.containment,F=(C instanceof A)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return }M.containerElement=A(F);if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.containerPosition={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight}}else{M.containerOffset=A(F).offset();M.containerPosition=A(F).position();M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L}}},resize:function(H,K){var E=K.options,N=A(this).data("resizable"),C=N.containerSize,J=N.containerOffset,G=N.size,I=N.position,L=E._aspectRatio||H.shiftKey,B={top:0,left:0},D=N.containerElement;if(D[0]!=document&&/static/.test(D.css("position"))){B=N.containerPosition}if(I.left<(E.helper?J.left:B.left)){N.size.width=N.size.width+(E.helper?(N.position.left-J.left):(N.position.left-B.left));if(L){N.size.height=N.size.width*E.aspectRatio}N.position.left=E.helper?J.left:B.left}if(I.top<(E.helper?J.top:0)){N.size.height=N.size.height+(E.helper?(N.position.top-J.top):N.position.top);if(L){N.size.width=N.size.height/E.aspectRatio}N.position.top=E.helper?J.top:0}var F=(E.helper?N.offset.left-J.left:(N.position.left-B.left))+N.sizeDiff.width,M=(E.helper?N.offset.top-J.top:N.position.top)+N.sizeDiff.height;if(F+N.size.width>=N.parentData.width){N.size.width=N.parentData.width-F;if(L){N.size.height=N.size.width*E.aspectRatio}}if(M+N.size.height>=N.parentData.height){N.size.height=N.parentData.height-M;if(L){N.size.width=N.size.height/E.aspectRatio}}},stop:function(G,J){var C=J.options,L=A(this).data("resizable"),H=L.position,I=L.containerOffset,B=L.containerPosition,D=L.containerElement;var E=A(L.helper),M=E.offset(),K=E.innerWidth(),F=E.innerHeight();if(C.helper&&!C.animate&&/relative/.test(D.css("position"))){A(this).css({left:(M.left-I.left),top:(M.top-I.top),width:K,height:F})}if(C.helper&&!C.animate&&/static/.test(D.css("position"))){A(this).css({left:B.left+(M.left-I.left),top:B.top+(M.top-I.top),width:K,height:F})}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=A(this).data("resizable"),G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/(D.grid[0]||1))*(D.grid[0]||1),B=Math.round((G.height-E.height)/(D.grid[1]||1))*(D.grid[1]||1);if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=A(this).data("resizable");var E=F.proportionallyResize,B=E&&(/textarea/i).test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,J=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;L.element.animate(A.extend(D,J&&G?{top:J,left:G}:{}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){var M={width:parseInt(L.element.css("width"),10),height:parseInt(L.element.css("height"),10),top:parseInt(L.element.css("top"),10),left:parseInt(L.element.css("left"),10)};if(E){E.css({width:M.width,height:M.height})}L._updateCache(M);L.propagate("animate",I)}})}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=A(this).data("resizable"),G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone()}else{B.ghost=G.clone()}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper)},resize:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width})}},stop:function(D,C){var E=C.options,B=A(this).data("resizable"),F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0))}}});A.ui.plugin.add("resizable","alsoResize",{start:function(E,C){var F=C.options,B=A(this).data("resizable"),D=function(G){A(G).each(function(){A(this).data("resizable-alsoresize",{width:parseInt(A(this).width(),10),height:parseInt(A(this).height(),10),left:parseInt(A(this).css("left"),10),top:parseInt(A(this).css("top"),10)})})};if(typeof (F.alsoResize)=="object"){if(F.alsoResize.length){F.alsoResize=F.alsoResize[0];D(F.alsoResize)}else{A.each(F.alsoResize,function(G,H){D(G)})}}else{D(F.alsoResize)}},resize:function(F,E){var G=E.options,C=A(this).data("resizable"),D=C.originalSize,I=C.originalPosition;var H={height:(C.size.height-D.height)||0,width:(C.size.width-D.width)||0,top:(C.position.top-I.top)||0,left:(C.position.left-I.left)||0},B=function(J,K){A(J).each(function(){var N=A(this).data("resizable-alsoresize"),M={},L=K&&K.length?K:["width","height","top","left"];A.each(L||["width","height","top","left"],function(O,Q){var P=(N[Q]||0)+(H[Q]||0);if(P&&P>=0){M[Q]=P||null}});A(this).css(M)})};if(typeof (G.alsoResize)=="object"){A.each(G.alsoResize,function(J,K){B(J,K)})}else{B(G.alsoResize)}},stop:function(C,B){A(this).removeData("resizable-alsoresize-start")}})})(jQuery);(function(A){A.widget("ui.selectable",A.extend(A.ui.mouse,{init:function(){var B=this;this.element.addClass("ui-selectable");this.dragged=false;var C;this.refresh=function(){C=A(B.options.filter,B.element[0]);C.each(function(){var D=A(this);var E=D.offset();A.data(this,"selectable-item",{element:this,$element:D,left:E.left,top:E.top,right:E.left+D.width(),bottom:E.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=C.addClass("ui-selectee");this.mouseInit();this.helper=A(document.createElement("div")).css({border:"1px dotted black"})},toggle:function(){if(this.options.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy()},mouseStart:function(E){var C=this;this.opos=[E.pageX,E.pageY];if(this.options.disabled){return }var D=this.options;this.selectees=A(D.filter,this.element[0]);this.element.triggerHandler("selectablestart",[E,{selectable:this.element[0],options:D}],D.start);A("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:E.clientX,top:E.clientY,width:0,height:0});if(D.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var F=A.data(this,"selectable-item");F.startselected=true;if(!E.ctrlKey){F.$element.removeClass("ui-selected");F.selected=false;F.$element.addClass("ui-unselecting");F.unselecting=true;C.element.triggerHandler("selectableunselecting",[E,{selectable:C.element[0],unselecting:F.element,options:D}],D.unselecting)}});var B=false;A(E.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){B=true}});return this.options.keyboard?!B:true},mouseDrag:function(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C.element.triggerHandler("selectableselecting",[I,{selectable:C.element[0],selecting:J.element,options:E}],E.selecting)}}else{if(J.selecting){if(I.ctrlKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}if(J.selected){if(!I.ctrlKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C.element.triggerHandler("selectableunselecting",[I,{selectable:C.element[0],unselecting:J.element,options:E}],E.unselecting)}}}});return false},mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B.element.triggerHandler("selectableunselected",[D,{selectable:B.element[0],unselected:E.element,options:C}],C.unselected)});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=true;E.startselected=true;B.element.triggerHandler("selectableselected",[D,{selectable:B.element[0],selected:E.element,options:C}],C.selected)});this.element.triggerHandler("selectablestop",[D,{selectable:B.element[0],options:this.options}],this.options.stop);this.helper.remove();return false}}));A.extend(A.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"}})})(jQuery);(function(B){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};B.widget("ui.dialog",{init:function(){var J=this,K=this.options,D=typeof K.resizable=="string"?K.resizable:"n,e,s,w,se,sw,ne,nw",E=this.element.addClass("ui-dialog-content").wrap("<div/>").wrap("<div/>"),G=(this.uiDialogContainer=E.parent().addClass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"})),H=K.title||E.attr("title")||"",C=(this.uiDialogTitlebar=B('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+H+"</span>").append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(G),I=(this.uiDialog=G.parent()).appendTo(document.body).hide().addClass("ui-dialog").addClass(K.dialogClass).addClass(E.attr("className")).removeClass("ui-dialog-content").css({position:"absolute",width:K.width,height:K.height,overflow:"hidden",zIndex:K.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(L){if(K.closeOnEscape){var M=27;(L.keyCode&&L.keyCode==M&&J.close())}}).mousedown(function(){J.moveToTop()}),F=(this.uiDialogButtonPane=B("<div/>")).addClass("ui-dialog-buttonpane").appendTo(I);this.uiDialogTitlebarClose=B(".ui-dialog-titlebar-close",C).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(L){L.stopPropagation()}).click(function(){J.close();return false});if(B.fn.draggable){I.draggable({helper:K.dragHelper,handle:".ui-dialog-titlebar",start:function(M,L){J.moveToTop();(K.dragStart&&K.dragStart.apply(J.element[0],arguments))},drag:function(M,L){(K.drag&&K.drag.apply(J.element[0],arguments))},stop:function(M,L){(K.dragStop&&K.dragStop.apply(J.element[0],arguments));B.ui.dialog.overlay.resize()}});(K.draggable||I.draggable("disable"))}if(B.fn.resizable){I.resizable({proxy:K.resizeHelper,maxWidth:K.maxWidth,maxHeight:K.maxHeight,minWidth:K.minWidth,minHeight:K.minHeight,start:function(){(K.resizeStart&&K.resizeStart.apply(J.element[0],arguments))},resize:function(M,L){(K.autoResize&&J.size.apply(J));(K.resize&&K.resize.apply(J.element[0],arguments))},handles:D,stop:function(M,L){(K.autoResize&&J.size.apply(J));(K.resizeStop&&K.resizeStop.apply(J.element[0],arguments));B.ui.dialog.overlay.resize()}});(K.resizable||I.resizable("disable"))}this.createButtons(K.buttons);this.isOpen=false;(K.bgiframe&&B.fn.bgiframe&&I.bgiframe());(K.autoOpen&&this.open())},setData:function(C,D){(A[C]&&this.uiDialog.data(A[C],D));switch(C){case"buttons":this.createButtons(D);break;case"draggable":this.uiDialog.draggable(D?"enable":"disable");break;case"height":this.uiDialog.height(D);break;case"position":this.position(D);break;case"resizable":(typeof D=="string"&&this.uiDialog.data("handles.resizable",D));this.uiDialog.resizable(D?"enable":"disable");break;case"title":B(".ui-dialog-title",this.uiDialogTitlebar).text(D);break;case"width":this.uiDialog.width(D);break}B.widget.prototype.setData.apply(this,arguments)},position:function(H){var D=B(window),E=B(document),F=E.scrollTop(),C=E.scrollLeft(),G=F;if(B.inArray(H,["center","top","right","bottom","left"])>=0){H=[H=="right"||H=="left"?H:"center",H=="top"||H=="bottom"?H:"middle"]}if(H.constructor!=Array){H=["center","middle"]}if(H[0].constructor==Number){C+=H[0]}else{switch(H[0]){case"left":C+=0;break;case"right":C+=D.width()-this.uiDialog.width();break;default:case"center":C+=(D.width()-this.uiDialog.width())/2}}if(H[1].constructor==Number){F+=H[1]}else{switch(H[1]){case"top":F+=0;break;case"bottom":F+=D.height()-this.uiDialog.height();break;default:case"middle":F+=(D.height()-this.uiDialog.height())/2}}F=Math.max(F,G);this.uiDialog.css({top:F,left:C})},size:function(){var D=this.uiDialogContainer,G=this.uiDialogTitlebar,E=this.element,F=parseInt(E.css("margin-top"))+parseInt(E.css("margin-bottom")),C=parseInt(E.css("margin-left"))+parseInt(E.css("margin-right"));E.height(D.height()-G.outerHeight()-F);E.width(D.width()-C)},open:function(){if(this.isOpen){return }this.overlay=this.options.modal?new B.ui.dialog.overlay(this):null;this.uiDialog.appendTo("body");this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var C=null;var D={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[C,D],this.options.open);this.isOpen=true},moveToTop:function(E){if((this.options.modal&&!E)||(!this.options.stack&&!this.options.modal)){return }var D=this.options.zIndex,C=this.options;B(".ui-dialog:visible").each(function(){D=Math.max(D,parseInt(B(this).css("z-index"),10)||C.zIndex)});(this.overlay&&this.overlay.$el.css("z-index",++D));this.uiDialog.css("z-index",++D)},close:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide);var D=null;var C={options:this.options};this.element.triggerHandler("dialogclose",[D,C],this.options.close);B.ui.dialog.overlay.resize();this.isOpen=false},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content").hide().appendTo("body");this.uiDialog.remove()},createButtons:function(F){var E=this,C=false,D=this.uiDialogButtonPane;D.empty().hide();B.each(F,function(){return !(C=true)});if(C){D.show();B.each(F,function(G,H){B("<button/>").text(G).click(function(){H.apply(E.element[0],arguments)}).appendTo(D)})}}});B.extend(B.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zIndex:1000},overlay:function(C){this.$el=B.ui.dialog.overlay.create(C)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(C){return C+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){B("a, :input").bind(B.ui.dialog.overlay.events,function(){var F=false;var H=B(this).parents(".ui-dialog");if(H.length){var E=B(".ui-dialog-overlay");if(E.length){var G=parseInt(E.css("z-index"),10);E.each(function(){G=Math.max(G,parseInt(B(this).css("z-index"),10))});F=parseInt(H.css("z-index"),10)>G}else{F=true}}return F})},1);B(document).bind("keydown.dialog-overlay",function(E){var F=27;(E.keyCode&&E.keyCode==F&&D.close())});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var C=B("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(B.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},D.options.overlay));(D.options.bgiframe&&B.fn.bgiframe&&C.bgiframe());this.instances.push(C);return C},destroy:function(C){this.instances.splice(B.inArray(this.instances,C),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}C.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var C=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<C){return B(window).height()+"px"}else{return D+"px"}}else{return B(document).height()+"px"}},width:function(){if(B.browser.msie&&B.browser.version<7){var C=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(C<D){return B(window).width()+"px"}else{return C+"px"}}else{return B(document).width()+"px"}},resize:function(){var C=B([]);B.each(B.ui.dialog.overlay.instances,function(){C=C.add(this)});C.css({width:0,height:0}).css({width:B.ui.dialog.overlay.width(),height:B.ui.dialog.overlay.height()})}});B.extend(B.ui.dialog.overlay.prototype,{destroy:function(){B.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(A){A.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},ui:function(C,B){return{options:this.options,tab:C,panel:B}},tabify:function(O){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var P=this,D=this.options;this.$tabs.each(function(R,Q){if(Q.hash&&Q.hash.replace("#","")){P.$panels=P.$panels.add(Q.hash)}else{if(A(Q).attr("href")!="#"){A.data(Q,"href.tabs",Q.href);A.data(Q,"load.tabs",Q.href);var T=P.tabId(Q);Q.href="#"+T;var S=A("#"+T);if(!S.length){S=A(D.panelTemplate).attr("id",T).addClass(D.panelClass).insertAfter(P.$panels[R-1]||P.element);S.data("destroy.tabs",true)}P.$panels=P.$panels.add(S)}else{D.disabled.push(R+1)}}});if(O){this.element.addClass(D.navClass);this.$panels.each(function(){var Q=A(this);Q.addClass(D.panelClass)});if(D.selected===undefined){if(location.hash){this.$tabs.each(function(S,Q){if(Q.hash==location.hash){D.selected=S;if(A.browser.msie||A.browser.opera){var R=A(location.hash),T=R.attr("id");R.attr("id","");setTimeout(function(){R.attr("id",T)},500)}scrollTo(0,0);return false}})}else{if(D.cookie){var J=parseInt(A.cookie("ui-tabs"+A.data(P.element)),10);if(J&&P.$tabs[J]){D.selected=J}}else{if(P.$lis.filter("."+D.selectedClass).length){D.selected=P.$lis.index(P.$lis.filter("."+D.selectedClass)[0])}}}}D.selected=D.selected===null||D.selected!==undefined?D.selected:0;D.disabled=A.unique(D.disabled.concat(A.map(this.$lis.filter("."+D.disabledClass),function(R,Q){return P.$lis.index(R)}))).sort();if(A.inArray(D.selected,D.disabled)!=-1){D.disabled.splice(A.inArray(D.selected,D.disabled),1)}this.$panels.addClass(D.hideClass);this.$lis.removeClass(D.selectedClass);if(D.selected!==null){this.$panels.eq(D.selected).show().removeClass(D.hideClass);this.$lis.eq(D.selected).addClass(D.selectedClass);var K=function(){A(P.element).triggerHandler("tabsshow",[null,P.ui(P.$tabs[D.selected],P.$panels[D.selected])],D.show)};if(A.data(this.$tabs[D.selected],"load.tabs")){this.load(D.selected,K)}else{K()}}A(window).bind("unload",function(){P.$tabs.unbind(".tabs");P.$lis=P.$tabs=P.$panels=null})}for(var G=0,N;N=this.$lis[G];G++){A(N)[A.inArray(G,D.disabled)!=-1&&!A(N).hasClass(D.selectedClass)?"addClass":"removeClass"](D.disabledClass)}if(D.cache===false){this.$tabs.removeData("cache.tabs")}var C,I,B={"min-width":0,duration:1},E="normal";if(D.fx&&D.fx.constructor==Array){C=D.fx[0]||B,I=D.fx[1]||B}else{C=I=D.fx||B}var H={display:"",overflow:"",height:""};if(!A.browser.msie){H.opacity=""}function M(R,Q,S){Q.animate(C,C.duration||E,function(){Q.addClass(D.hideClass).css(H);if(A.browser.msie&&C.opacity){Q[0].style.filter=""}if(S){L(R,S,Q)}})}function L(R,S,Q){if(I===B){S.css("display","block")}S.animate(I,I.duration||E,function(){S.removeClass(D.hideClass).css(H);if(A.browser.msie&&I.opacity){S[0].style.filter=""}A(P.element).triggerHandler("tabsshow",[null,P.ui(R,S[0])],D.show)})}function F(R,T,Q,S){T.addClass(D.selectedClass).siblings().removeClass(D.selectedClass);M(R,Q,S)}this.$tabs.unbind(".tabs").bind(D.event,function(){var T=A(this).parents("li:eq(0)"),Q=P.$panels.filter(":visible"),S=A(this.hash);if((T.hasClass(D.selectedClass)&&!D.unselect)||T.hasClass(D.disabledClass)||A(this).hasClass(D.loadingClass)||A(P.element).triggerHandler("tabsselect",[null,P.ui(this,S[0])],D.select)===false){this.blur();return false}P.options.selected=P.$tabs.index(this);if(D.unselect){if(T.hasClass(D.selectedClass)){P.options.selected=null;T.removeClass(D.selectedClass);P.$panels.stop();M(this,Q);this.blur();return false}else{if(!Q.length){P.$panels.stop();var R=this;P.load(P.$tabs.index(this),function(){T.addClass(D.selectedClass).addClass(D.unselectClass);L(R,S)});this.blur();return false}}}if(D.cookie){A.cookie("ui-tabs"+A.data(P.element),P.options.selected,D.cookie)}P.$panels.stop();if(S.length){var R=this;P.load(P.$tabs.index(this),Q.length?function(){F(R,T,Q,S)}:function(){T.addClass(D.selectedClass);L(R,S)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(!(/^click/).test(D.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this.tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this.tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this.element.triggerHandler("tabsadd",[null,this.ui(this.$tabs[C],this.$panels[C])],G.add)},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this.tabify();this.element.triggerHandler("tabsremove",[null,this.ui(E.find("a")[0],C[0])],D.remove)},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this.element.triggerHandler("tabsenable",[null,this.ui(this.$tabs[B],this.$panels[B])],C.enable)},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this.element.triggerHandler("tabsdisable",[null,this.ui(this.$tabs[C],this.$panels[C])],D.disable)}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event)},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(O,N){A(J.hash).html(O);C();if(D.cache){A.data(J,"cache.tabs",true)}A(L.element).triggerHandler("tabsload",[null,L.ui(L.$tabs[G],L.$panels[G])],D.load);D.ajaxOptions.success&&D.ajaxOptions.success(O,N);K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);setTimeout(function(){L.xhr=A.ajax(F)},0)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.unselectClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}})}});A.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};A.ui.tabs.getter="length";A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event,D)}else{this.$tabs.bind(this.options.event,function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event,D)}}})})(jQuery);(function(C){C.effects=C.effects||{};C.extend(C.effects,{save:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){C.data(F[0],"ec.storage."+G[E],F[0].style[G[E]])}}},restore:function(F,G){for(var E=0;E<G.length;E++){if(G[E]!==null){F.css(G[E],C.data(F[0],"ec.storage."+G[E]))}}},setMode:function(E,F){if(F=="toggle"){F=E.is(":hidden")?"show":"hide"}return F},getBaseline:function(F,G){var H,E;switch(F[0]){case"top":H=0;break;case"middle":H=0.5;break;case"bottom":H=1;break;default:H=F[0]/G.height}switch(F[1]){case"left":E=0;break;case"center":E=0.5;break;case"right":E=1;break;default:E=F[1]/G.width}return{x:E,y:H}},createWrapper:function(F){if(F.parent().attr("id")=="fxWrapper"){return F}var E={width:F.outerWidth({margin:true}),height:F.outerHeight({margin:true}),"float":F.css("float")};F.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var I=F.parent();if(F.css("position")=="static"){I.css({position:"relative"});F.css({position:"relative"})}else{var H=parseInt(F.css("top"),10);if(isNaN(H)){H="auto"}var G=parseInt(F.css("left"),10);if(isNaN(G)){G="auto"}I.css({position:F.css("position"),top:H,left:G,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0})}I.css(E);return I},removeWrapper:function(E){if(E.parent().attr("id")=="fxWrapper"){return E.parent().replaceWith(E)}return E},setTransition:function(F,G,E,H){H=H||{};C.each(G,function(J,I){unit=F.cssUnit(I);if(unit[0]>0){H[I]=unit[0]*E+unit[1]}});return H},animateClass:function(G,H,J,I){var E=(typeof J=="function"?J:(I?I:null));var F=(typeof J=="object"?J:null);return this.each(function(){var O={};var M=C(this);var N=M.attr("style")||"";if(typeof N=="object"){N=N.cssText}if(G.toggle){M.hasClass(G.toggle)?G.remove=G.toggle:G.add=G.toggle}var K=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.addClass(G.add)}if(G.remove){M.removeClass(G.remove)}var L=C.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(G.add){M.removeClass(G.add)}if(G.remove){M.addClass(G.remove)}for(var P in L){if(typeof L[P]!="function"&&L[P]&&P.indexOf("Moz")==-1&&P.indexOf("length")==-1&&L[P]!=K[P]&&(P.match(/color/i)||(!P.match(/color/i)&&!isNaN(parseInt(L[P],10))))&&(K.position!="static"||(K.position=="static"&&!P.match(/left|top|bottom|right/)))){O[P]=L[P]}}M.animate(O,H,F,function(){if(typeof C(this).attr("style")=="object"){C(this).attr("style")["cssText"]="";C(this).attr("style")["cssText"]=N}else{C(this).attr("style",N)}if(G.add){C(this).addClass(G.add)}if(G.remove){C(this).removeClass(G.remove)}if(E){E.apply(this,arguments)}})})}});C.fn.extend({_show:C.fn.show,_hide:C.fn.hide,__toggle:C.fn.toggle,_addClass:C.fn.addClass,_removeClass:C.fn.removeClass,_toggleClass:C.fn.toggleClass,effect:function(E,G,F,H){return C.effects[E]?C.effects[E].call(this,{method:E,options:G||{},duration:F,callback:H}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._show.apply(this,arguments)}else{var E=arguments[1]||{};E.mode="show";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))){return this._hide.apply(this,arguments)}else{var E=arguments[1]||{};E.mode="hide";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{var E=arguments[1]||{};E.mode="toggle";return this.effect.apply(this,[arguments[0],E,arguments[2]||E.duration,arguments[3]||E.callback])}},addClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{add:F},E,H,G]):this._addClass(F)},removeClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{remove:F},E,H,G]):this._removeClass(F)},toggleClass:function(F,E,H,G){return E?C.effects.animateClass.apply(this,[{toggle:F},E,H,G]):this._toggleClass(F)},morph:function(E,G,F,I,H){return C.effects.animateClass.apply(this,[{add:G,remove:E},F,I,H])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(E){var F=this.css(E),G=[];C.each(["em","px","%","pt"],function(H,I){if(F.indexOf(I)>0){G=[parseFloat(F),I]}});return G}});jQuery.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(F,E){jQuery.fx.step[E]=function(G){if(G.state==0){G.start=D(G.elem,E);G.end=B(G.end)}G.elem.style[E]="rgb("+[Math.max(Math.min(parseInt((G.pos*(G.end[0]-G.start[0]))+G.start[0]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[1]-G.start[1]))+G.start[1]),255),0),Math.max(Math.min(parseInt((G.pos*(G.end[2]-G.start[2]))+G.start[2]),255),0)].join(",")+")"}});function B(F){var E;if(F&&F.constructor==Array&&F.length==3){return F}if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return[parseInt(E[1]),parseInt(E[2]),parseInt(E[3])]}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return[parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55]}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return[parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16)]}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return[parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16)]}if(E=/rgba\(0, 0, 0, 0\)/.exec(F)){return A.transparent}return A[jQuery.trim(F).toLowerCase()]}function D(G,E){var F;do{F=jQuery.curCSS(G,E);if(F!=""&&F!="transparent"||jQuery.nodeName(G,"body")){break}E="backgroundColor"}while(G=G.parentNode);return B(F)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(F,G,E,I,H){return jQuery.easing[jQuery.easing.def](F,G,E,I,H)},easeInQuad:function(F,G,E,I,H){return I*(G/=H)*G+E},easeOutQuad:function(F,G,E,I,H){return -I*(G/=H)*(G-2)+E},easeInOutQuad:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G+E}return -I/2*((--G)*(G-2)-1)+E},easeInCubic:function(F,G,E,I,H){return I*(G/=H)*G*G+E},easeOutCubic:function(F,G,E,I,H){return I*((G=G/H-1)*G*G+1)+E},easeInOutCubic:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G+E}return I/2*((G-=2)*G*G+2)+E},easeInQuart:function(F,G,E,I,H){return I*(G/=H)*G*G*G+E},easeOutQuart:function(F,G,E,I,H){return -I*((G=G/H-1)*G*G*G-1)+E},easeInOutQuart:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G+E}return -I/2*((G-=2)*G*G*G-2)+E},easeInQuint:function(F,G,E,I,H){return I*(G/=H)*G*G*G*G+E},easeOutQuint:function(F,G,E,I,H){return I*((G=G/H-1)*G*G*G*G+1)+E},easeInOutQuint:function(F,G,E,I,H){if((G/=H/2)<1){return I/2*G*G*G*G*G+E}return I/2*((G-=2)*G*G*G*G+2)+E},easeInSine:function(F,G,E,I,H){return -I*Math.cos(G/H*(Math.PI/2))+I+E},easeOutSine:function(F,G,E,I,H){return I*Math.sin(G/H*(Math.PI/2))+E},easeInOutSine:function(F,G,E,I,H){return -I/2*(Math.cos(Math.PI*G/H)-1)+E},easeInExpo:function(F,G,E,I,H){return(G==0)?E:I*Math.pow(2,10*(G/H-1))+E},easeOutExpo:function(F,G,E,I,H){return(G==H)?E+I:I*(-Math.pow(2,-10*G/H)+1)+E},easeInOutExpo:function(F,G,E,I,H){if(G==0){return E}if(G==H){return E+I}if((G/=H/2)<1){return I/2*Math.pow(2,10*(G-1))+E}return I/2*(-Math.pow(2,-10*--G)+2)+E},easeInCirc:function(F,G,E,I,H){return -I*(Math.sqrt(1-(G/=H)*G)-1)+E},easeOutCirc:function(F,G,E,I,H){return I*Math.sqrt(1-(G=G/H-1)*G)+E},easeInOutCirc:function(F,G,E,I,H){if((G/=H/2)<1){return -I/2*(Math.sqrt(1-G*G)-1)+E}return I/2*(Math.sqrt(1-(G-=2)*G)+1)+E},easeInElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K)==1){return E+L}if(!J){J=K*0.3}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}return -(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E},easeOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K)==1){return E+L}if(!J){J=K*0.3}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}return G*Math.pow(2,-10*H)*Math.sin((H*K-I)*(2*Math.PI)/J)+L+E},easeInOutElastic:function(F,H,E,L,K){var I=1.70158;var J=0;var G=L;if(H==0){return E}if((H/=K/2)==2){return E+L}if(!J){J=K*(0.3*1.5)}if(G<Math.abs(L)){G=L;var I=J/4}else{var I=J/(2*Math.PI)*Math.asin(L/G)}if(H<1){return -0.5*(G*Math.pow(2,10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J))+E}return G*Math.pow(2,-10*(H-=1))*Math.sin((H*K-I)*(2*Math.PI)/J)*0.5+L+E},easeInBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}return J*(G/=I)*G*((H+1)*G-H)+E},easeOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}return J*((G=G/I-1)*G*((H+1)*G+H)+1)+E},easeInOutBack:function(F,G,E,J,I,H){if(H==undefined){H=1.70158}if((G/=I/2)<1){return J/2*(G*G*(((H*=(1.525))+1)*G-H))+E}return J/2*((G-=2)*G*(((H*=(1.525))+1)*G+H)+2)+E},easeInBounce:function(F,G,E,I,H){return I-jQuery.easing.easeOutBounce(F,H-G,0,I,H)+E},easeOutBounce:function(F,G,E,I,H){if((G/=H)<(1/2.75)){return I*(7.5625*G*G)+E}else{if(G<(2/2.75)){return I*(7.5625*(G-=(1.5/2.75))*G+0.75)+E}else{if(G<(2.5/2.75)){return I*(7.5625*(G-=(2.25/2.75))*G+0.9375)+E}else{return I*(7.5625*(G-=(2.625/2.75))*G+0.984375)+E}}}},easeInOutBounce:function(F,G,E,I,H){if(G<H/2){return jQuery.easing.easeInBounce(F,G*2,0,I,H)*0.5+E}return jQuery.easing.easeOutBounce(F,G*2-H,0,I,H)*0.5+I*0.5+E}})})(jQuery);(function(A){A.effects.bounce=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"up";var C=B.options.distance||20;var D=B.options.times||5;var G=B.duration||250;if(/show|hide/.test(J)){K.push("opacity")}A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var C=B.options.distance||(F=="top"?E.outerHeight({margin:true})/3:E.outerWidth({margin:true})/3);if(J=="show"){E.css("opacity",0).css(F,O=="pos"?-C:C)}if(J=="hide"){C=C/(D*2)}if(J!="hide"){D--}if(J=="show"){var H={opacity:1};H[F]=(O=="pos"?"+=":"-=")+C;E.animate(H,G/2,B.options.easing);C=C/2;D--}for(var I=0;I<D;I++){var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing);C=(J=="hide")?C*2:C/2}if(J=="hide"){var H={opacity:0};H[F]=(O=="pos"?"-=":"+=")+C;E.animate(H,G/2,B.options.easing,function(){E.hide();A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}else{var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);(function(A){A.effects.clip=function(B){return this.queue(function(){var F=A(this),J=["position","top","left","height","width"];var I=A.effects.setMode(F,B.options.mode||"hide");var K=B.options.direction||"vertical";A.effects.save(F,J);F.show();var C=A.effects.createWrapper(F).css({overflow:"hidden"});var E=F[0].tagName=="IMG"?C:F;var G={size:(K=="vertical")?"height":"width",position:(K=="vertical")?"top":"left"};var D=(K=="vertical")?E.height():E.width();if(I=="show"){E.css(G.size,0);E.css(G.position,D/2)}var H={};H[G.size]=I=="show"?D:0;H[G.position]=I=="show"?0:D/2;E.animate(H,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){F.hide()}A.effects.restore(F,J);A.effects.removeWrapper(F);if(B.callback){B.callback.apply(F[0],arguments)}F.dequeue()}})})}})(jQuery);(function(A){A.effects.drop=function(B){return this.queue(function(){var E=A(this),D=["position","top","left","opacity"];var I=A.effects.setMode(E,B.options.mode||"hide");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E);var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true})/2:E.outerWidth({margin:true})/2);if(I=="show"){E.css("opacity",0).css(F,C=="pos"?-J:J)}var G={opacity:I=="show"?1:0};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F.opacity=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&jQuery.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var F=A.effects.setMode(D,B.options.mode||"show");var E=B.options.times||5;if(F=="hide"){E--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},B.duration/2,B.options.easing);E=E-2}for(var C=0;C<E;C++){D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing)}if(F=="hide"){D.animate({opacity:0},B.duration/2,B.options.easing,function(){D.hide();if(B.callback){B.callback.apply(this,arguments)}})}else{D.animate({opacity:0},B.duration/2,B.options.easing).animate({opacity:1},B.duration/2,B.options.easing,function(){if(B.callback){B.callback.apply(this,arguments)}})}D.queue("fx",function(){D.dequeue()});D.dequeue()})}})(jQuery);(function(A){A.effects.puff=function(B){return this.queue(function(){var F=A(this);var C=A.extend(true,{},B.options);var H=A.effects.setMode(F,B.options.mode||"hide");var G=parseInt(B.options.percent)||150;C.fade=true;var E={height:F.height(),width:F.width()};var D=G/100;F.from=(H=="hide")?E:{height:E.height*D,width:E.width*D};C.from=F.from;C.percent=(H=="hide")?G:100;C.mode=H;F.effect("scale",C,B.duration,B.callback);F.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var G=A(this);var D=A.extend(true,{},B.options);var J=A.effects.setMode(G,B.options.mode||"effect");var H=parseInt(B.options.percent)||(parseInt(B.options.percent)==0?0:(J=="hide"?0:100));var I=B.options.direction||"both";var C=B.options.origin;if(J!="effect"){D.origin=C||["middle","center"];D.restore=true}var F={height:G.height(),width:G.width()};G.from=B.options.from||(J=="show"?{height:0,width:0}:F);var E={y:I!="horizontal"?(H/100):1,x:I!="vertical"?(H/100):1};G.to={height:F.height*E.y,width:F.width*E.x};if(B.options.fade){if(J=="show"){G.from.opacity=0;G.to.opacity=1}if(J=="hide"){G.from.opacity=1;G.to.opacity=0}}D.from=G.from;D.to=G.to;D.mode=J;G.effect("size",D,B.duration,B.callback);G.dequeue()})};A.effects.size=function(B){return this.queue(function(){var C=A(this),N=["position","top","left","width","height","overflow","opacity"];var M=["position","top","left","overflow","opacity"];var J=["width","height","overflow"];var P=["fontSize"];var K=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var F=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var G=A.effects.setMode(C,B.options.mode||"effect");var I=B.options.restore||false;var E=B.options.scale||"both";var O=B.options.origin;var D={height:C.height(),width:C.width()};C.from=B.options.from||D;C.to=B.options.to||D;if(O){var H=A.effects.getBaseline(O,D);C.from.top=(D.height-C.from.height)*H.y;C.from.left=(D.width-C.from.width)*H.x;C.to.top=(D.height-C.to.height)*H.y;C.to.left=(D.width-C.to.width)*H.x}var L={from:{y:C.from.height/D.height,x:C.from.width/D.width},to:{y:C.to.height/D.height,x:C.to.width/D.width}};if(E=="box"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(K);C.from=A.effects.setTransition(C,K,L.from.y,C.from);C.to=A.effects.setTransition(C,K,L.to.y,C.to)}if(L.from.x!=L.to.x){N=N.concat(F);C.from=A.effects.setTransition(C,F,L.from.x,C.from);C.to=A.effects.setTransition(C,F,L.to.x,C.to)}}if(E=="content"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(P);C.from=A.effects.setTransition(C,P,L.from.y,C.from);C.to=A.effects.setTransition(C,P,L.to.y,C.to)}}A.effects.save(C,I?N:M);C.show();A.effects.createWrapper(C);C.css("overflow","hidden").css(C.from);if(E=="content"||E=="both"){K=K.concat(["marginTop","marginBottom"]).concat(P);F=F.concat(["marginLeft","marginRight"]);J=N.concat(K).concat(F);C.find("*[width]").each(function(){child=A(this);if(I){A.effects.save(child,J)}var Q={height:child.height(),width:child.width()};child.from={height:Q.height*L.from.y,width:Q.width*L.from.x};child.to={height:Q.height*L.to.y,width:Q.width*L.to.x};if(L.from.y!=L.to.y){child.from=A.effects.setTransition(child,K,L.from.y,child.from);child.to=A.effects.setTransition(child,K,L.to.y,child.to)}if(L.from.x!=L.to.x){child.from=A.effects.setTransition(child,F,L.from.x,child.from);child.to=A.effects.setTransition(child,F,L.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){if(I){A.effects.restore(child,J)}})})}C.animate(C.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(G=="hide"){C.hide()}A.effects.restore(C,I?N:M);A.effects.removeWrapper(C);if(B.callback){B.callback.apply(this,arguments)}C.dequeue()}})})}})(jQuery);(function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J)}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(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 5747 2008-06-25 18:30:55Z joern.zaefferer $
 *
 */
(function(A){A.fn.extend({autocomplete:function(B,C){var D=typeof B=="string";C=A.extend({},A.Autocompleter.defaults,{url:D?B:null,data:D?null:B,delay:D?A.Autocompleter.defaults.delay:10,max:C&&!C.scroll?100:150},C);C.highlight=C.highlight||function(E){return E};C.formatMatch=C.formatMatch||C.formatItem;return this.each(function(){new A.Autocompleter(this,C)})},result:function(B){return this.bind("result",B)},search:function(B){return this.trigger("search",[B])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(B){return this.trigger("setOptions",[B])},unautocomplete:function(){return this.trigger("unautocomplete")}});A.Autocompleter=function(L,G){var C={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var B=A(L).attr("autocomplete","off").addClass(G.inputClass);var J;var P="";var M=A.Autocompleter.Cache(G);var E=0;var U;var X={mouseDownOnSelect:false};var R=A.Autocompleter.Select(G,L,D,X);var W;A.browser.opera&&A(L.form).bind("submit.autocomplete",function(){if(W){W=false;return false}});B.bind((A.browser.opera?"keypress":"keydown")+".autocomplete",function(Y){U=Y.keyCode;switch(Y.keyCode){case C.UP:Y.preventDefault();if(R.visible()){R.prev()}else{T(0,true)}break;case C.DOWN:Y.preventDefault();if(R.visible()){R.next()}else{T(0,true)}break;case C.PAGEUP:Y.preventDefault();if(R.visible()){R.pageUp()}else{T(0,true)}break;case C.PAGEDOWN:Y.preventDefault();if(R.visible()){R.pageDown()}else{T(0,true)}break;case G.multiple&&A.trim(G.multipleSeparator)==","&&C.COMMA:case C.TAB:case C.RETURN:if(D()){Y.preventDefault();W=true;return false}break;case C.ESC:R.hide();break;default:clearTimeout(J);J=setTimeout(T,G.delay);break}}).focus(function(){E++}).blur(function(){E=0;if(!X.mouseDownOnSelect){S()}}).click(function(){if(E++>1&&!R.visible()){T(0,true)}}).bind("search",function(){var Y=(arguments.length>1)?arguments[1]:null;function Z(e,d){var a;var c=new RegExp(e.toLowerCase());if(d&&d.length){for(var b=0;b<d.length;b++){if(c.test(d[b].result.toLowerCase())){a=d[b];break}}}if(typeof Y=="function"){Y(a)}else{B.trigger("result",a&&[a.data,a.value])}}A.each(H(B.val()),function(a,b){F(b,Z,Z)})}).bind("flushCache",function(){M.flush()}).bind("setOptions",function(){A.extend(G,arguments[1]);if("data" in arguments[1]){M.populate()}}).bind("unautocomplete",function(){R.unbind();B.unbind();A(L.form).unbind(".autocomplete")});function D(){var Z=R.selected();if(!Z){return false}var Y=Z.result;P=Y;if(G.multiple){var a=H(B.val());if(a.length>1){Y=a.slice(0,a.length-1).join(G.multipleSeparator)+G.multipleSeparator+Y}Y+=G.multipleSeparator}B.val(Y);V();B.trigger("result",[Z.data,Z.value]);return true}function T(a,Z){if(U==C.DEL){R.hide();return }var Y=B.val();if(!Z&&Y==P){return }P=Y;Y=I(Y);if(Y.length>=G.minChars){B.addClass(G.loadingClass);if(!G.matchCase){Y=Y.toLowerCase()}F(Y,K,V)}else{N();R.hide()}}function H(Z){if(!Z){return[""]}var a=Z.split(G.multipleSeparator);var Y=[];A.each(a,function(b,c){if(A.trim(c)){Y[b]=A.trim(c)}});return Y}function I(Y){if(!G.multiple){return Y}var Z=H(Y);return Z[Z.length-1]}function Q(Y,Z){if(G.autoFill&&(I(B.val()).toLowerCase()==Y.toLowerCase())&&U!=C.BACKSPACE){B.val(B.val()+Z.substring(I(P).length));A.Autocompleter.Selection(L,P.length,P.length+Z.length)}}function S(){clearTimeout(J);J=setTimeout(V,200)}function V(){var Y=R.visible();R.hide();clearTimeout(J);N();if(G.mustMatch){B.search(function(Z){if(!Z){if(G.multiple){var a=H(B.val()).slice(0,-1);B.val(a.join(G.multipleSeparator)+(a.length?G.multipleSeparator:""))}else{B.val("")}}})}if(Y){A.Autocompleter.Selection(L,L.value.length,L.value.length)}}function K(Z,Y){if(Y&&Y.length&&E){N();R.display(Y,Z);Q(Z,Y[0].value);R.show()}else{V()}}function F(Z,b,Y){if(!G.matchCase){Z=Z.toLowerCase()}var a=M.load(Z);if(a&&a.length){b(Z,a)}else{if((typeof G.url=="string")&&(G.url.length>0)){var c={timestamp:+new Date()};A.each(G.extraParams,function(d,e){c[d]=typeof e=="function"?e():e});if("CRUMB" in xoopit){c[xoopit.CRUMB]=""}A.ajax({mode:"abort",port:"autocomplete"+L.name,dataType:G.dataType,url:G.url,data:A.extend({q:I(Z),limit:G.max},c),success:function(e){var d=G.parse&&G.parse(e)||O(e);M.add(Z,d);b(Z,d)}})}else{R.emptyList();Y(Z)}}}function O(b){var Y=[];var a=b.split("\n");for(var Z=0;Z<a.length;Z++){var c=A.trim(a[Z]);if(c){c=c.split("|");Y[Y.length]={data:c,value:c[0],result:G.formatResult&&G.formatResult(c,c[0])||c[0]}}}return Y}function N(){B.removeClass(G.loadingClass)}};A.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:200,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10000,max:1000,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(B){return B[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(C,B){return C.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+B.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};A.Autocompleter.Cache=function(C){var F=xoopit.accache={};var D=0;function H(K,J){if(!C.matchCase){K=K.toLowerCase()}var I=K.indexOf(J);if(I===-1){return false}return(C.matchContains)||(I===0)}function G(J,I){if(D>C.cacheLength){B()}if(!F[J]){D++}F[J]=I}function E(){if(!C.data){return false}var M={},J=0;if(!C.url){C.cacheLength=1}M[""]=[];for(var K=0,L=C.data.length;K<L;K++){var I=C.data[K];I=(typeof I=="string")?[I]:I;var Q=C.formatMatch(I,K+1,C.data.length);if(!Q){continue}if(typeof Q=="string"){Q=[Q]}for(var R=0,O=Q.length;R<O;R++){var N=Q[R];var P=N.charAt(0).toLowerCase();if(!M[P]){M[P]=[]}var S={value:N,data:I,result:C.formatResult&&C.formatResult(I)||N,dataIndex:K};M[P].push(S);if(J++<C.max){M[""].push(S)}}}A.each(M,function(T,U){C.cacheLength++;G(T,U)})}setTimeout(E,25);function B(){F={};D=0}return{flush:B,add:G,populate:E,load:function(L){if(!C.cacheLength||!D){return null}L=xoopit.Intl.accentFold(L);if(!C.url&&C.matchContains){var K=[];for(var I in F){if(I.length>0){var M=F[I];A.each(M,function(O,N){if(H(N.value,L)){K.push(N)}})}}return K}else{if(F[L]){return F[L]}else{if(C.matchSubset){for(var J=L.length-1;J>=C.minChars;J--){var M=F[L.substr(0,J)];if(M){var K=[];A.each(M,function(O,N){if(H(N.value,L)){K.push(N)}});xoopit.aclist=[L,K];return K}}}}}return null}}};A.Autocompleter.Select=function(E,J,L,P){var I={ACTIVE:"ac_over"};var K,F=-1,R,M="",S=true,C,O;function N(){if(!S){return }C=A("<div/>").hide().addClass(E.resultsClass).css("position","absolute").appendTo(document.body);O=A("<ul/>").appendTo(C).mouseover(function(T){if(Q(T).nodeName&&Q(T).nodeName.toUpperCase()=="LI"){F=A("li",O).removeClass(I.ACTIVE).index(Q(T));A(Q(T)).addClass(I.ACTIVE)}}).click(function(T){A(Q(T)).addClass(I.ACTIVE);L();try{J.focus()}catch(U){}return false}).mousedown(function(){P.mouseDownOnSelect=true}).mouseup(function(){P.mouseDownOnSelect=false});if(E.width>0){C.css("width",E.width)}S=false}function Q(U){var T=U.target;while(T&&T.tagName!="LI"){T=T.parentNode}if(!T){return[]}return T}function H(T){K.slice(F,F+1).removeClass(I.ACTIVE);G(T);var V=K.slice(F,F+1).addClass(I.ACTIVE);if(E.scroll){var U=0;K.slice(0,F).each(function(){U+=this.offsetHeight});if((U+V[0].offsetHeight-O.scrollTop())>O[0].clientHeight){O.scrollTop(U+V[0].offsetHeight-O.innerHeight())}else{if(U<O.scrollTop()){O.scrollTop(U)}}}}function G(T){F+=T;if(F<0){F=K.size()-1}else{if(F>=K.size()){F=0}}}function B(T){return E.max&&E.max<T?E.max:T}function D(){O.empty();var V=B(R.length);var U={};for(var W=0;W<V;W++){if(!R[W]){continue}if(R[W].dataIndex!=undefined){if(U[R[W].dataIndex]!=undefined){continue}else{U[R[W].dataIndex]=true}}var X=E.formatItem(R[W].data,W+1,V,R[W].value,M);if(X===false){continue}var T=A("<li/>").html(E.highlight(X,M)).addClass(W%2==0?"ac_even":"ac_odd").appendTo(O)[0];A.data(T,"ac_data",R[W])}K=O.find("li");if(E.selectFirst){K.slice(0,1).addClass(I.ACTIVE);F=0}if(A.fn.bgiframe){O.bgiframe()}}return{display:function(U,T){N();R=U;M=T;D()},next:function(){H(1)},prev:function(){H(-1)},pageUp:function(){if(F!=0&&F-8<0){H(-F)}else{H(-8)}},pageDown:function(){if(F!=K.size()-1&&F+8>K.size()){H(K.size()-1-F)}else{H(8)}},hide:function(){C&&C.hide();K&&K.removeClass(I.ACTIVE);F=-1},visible:function(){return C&&C.is(":visible")},current:function(){return this.visible()&&(K.filter("."+I.ACTIVE)[0]||E.selectFirst&&K[0])},show:function(){var W=A(J).offset();var U=W.top+J.offsetHeight;var T=Math.min(E.scrollHeight,C.height());if(U+T>A(window).height()){U=W.top-T}C.css({width:typeof E.width=="string"||E.width>0?E.width:A(J).width(),top:U,left:W.left}).show();if(E.scroll){O.scrollTop(0);O.css({maxHeight:E.scrollHeight,overflow:"auto"});if(A.browser.msie&&typeof document.body.style.maxHeight==="undefined"){T=0;K.each(function(){T+=this.offsetHeight});var V=T>E.scrollHeight;O.css("height",V?E.scrollHeight:T);if(!V){K.width(O.width()-parseInt(K.css("padding-left"))-parseInt(K.css("padding-right")))}}}},selected:function(){var T=K&&K.filter("."+I.ACTIVE).removeClass(I.ACTIVE);return T&&T.length&&A.data(T[0],"ac_data")},emptyList:function(){O&&O.empty()},unbind:function(){C&&C.remove()}}};A.Autocompleter.Selection=function(E,F,C){if(E.createTextRange){var B=E.createTextRange();B.collapse(true);B.moveStart("character",F);B.moveEnd("character",C);B.select()}else{if(E.setSelectionRange){try{E.setSelectionRange(F,C)}catch(D){}}else{if(E.selectionStart){E.selectionStart=F;E.selectionEnd=C}}}try{E.focus()}catch(D){}}})(jQuery);var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var A;var B;var C;try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");A=B.GetVariable("$version")}catch(C){}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");A="WIN 6,0,21,0";B.AllowScriptAccess="always";A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A=B.GetVariable("$version")}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");A="WIN 3,0,18,0"}catch(C){}}if(!A){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");A="WIN 2,0,0,11"}catch(C){A=-1}}return A}function GetSwfVer(){var G=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var F=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var A=navigator.plugins["Shockwave Flash"+F].description;var E=A.split(" ");var C=E[2].split(".");var H=C[0];var B=C[1];var D=E[3];if(D==""){D=E[4]}if(D[0]=="d"){D=D.substring(1)}else{if(D[0]=="r"){D=D.substring(1);if(D.indexOf("d")>0){D=D.substring(0,D.indexOf("d"))}}}var G=H+"."+B+"."+D}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){G=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){G=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){G=2}else{if(isIE&&isWin&&!isOpera){G=ControlVersion()}}}}}return G}function DetectFlashVer(F,D,C){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var E=versionArray[0];var A=versionArray[1];var B=versionArray[2];if(E>parseFloat(F)){return true}else{if(E==parseFloat(F)){if(A>parseFloat(D)){return true}else{if(A==parseFloat(D)){if(B>=parseFloat(C)){return true}}}}}return false}}}function AC_AddExtension(B,A){if(B.indexOf("?")!=-1){return B.replace(/\?/,A+"?")}else{return B+A}}function AC_Generateobj(E,D,A){var C="";if(isIE&&isWin&&!isOpera){C+="<object ";for(var B in E){C+=B+'="'+E[B]+'" '}C+=">";for(var B in D){C+='<param name="'+B+'" value="'+D[B]+'" /> '}C+="</object>"}else{C+="<embed ";for(var B in A){C+=B+'="'+A[B]+'" '}C+="> </embed>"}document.write(C)}function AC_FL_RunContent(){var A=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)}function AC_SW_RunContent(){var A=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(A.objAttrs,A.params,A.embedAttrs)}function AC_GetArgs(B,E,G,D,H){var A=new Object();A.embedAttrs=new Object();A.params=new Object();A.objAttrs=new Object();for(var C=0;C<B.length;C=C+2){var F=B[C].toLowerCase();switch(F){case"classid":break;case"pluginspage":A.embedAttrs[B[C]]=B[C+1];break;case"src":case"movie":B[C+1]=AC_AddExtension(B[C+1],E);A.embedAttrs.src=B[C+1];A.params[G]=B[C+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":A.objAttrs[B[C]]=B[C+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":A.embedAttrs[B[C]]=A.objAttrs[B[C]]=B[C+1];break;default:A.embedAttrs[B[C]]=A.params[B[C]]=B[C+1]}}A.objAttrs.classid=D;if(H){A.embedAttrs.type=H}return A}var xoopit=xoopit||{};xoopit.namespace=function(){var F=null;for(var D=0,B=arguments.length;D<B;D++){var E=arguments[D].split(".");F=xoopit;for(var C=(E[0]==="xoopit"?1:0),A=E.length;C<A;C++){F[E[C]]=F[E[C]]||{};F=F[E[C]]}}return F};xoopit.ui={version:"0.0.19647",resourceVersion:"-0.0.19647"};xoopit.inherit=function(B,H,E){var G=function(){};G.prototype=H.prototype;B.prototype=new G();B.prototype.constructor=B;B.superclass=H.prototype;if(H.prototype.constructor==Object.prototype.constructor){H.prototype.constructor=H}if(E){for(var C in E){if(E.hasOwnProperty(C)){B.prototype[C]=E[C]}}if(document.all){var A=["toString","valueOf"];var C=A.length;while(C--){var F=A[C],D=E[F];if(typeof D==="function"&&D!=Object.prototype[F]){B.prototype[F]=D}}}}};xoopit.copy=function(C,B){if(xoopit.isSet(B)){for(var A in B){C[A]=B[A]}}return C};_ACCOUNT_STATUS=null;_AJAX_ENABLE=true;_AJAX_LAST_TRANSACTION_ID=0;_AJAX_AUTOSUGGEST_URL="/ajax/autosuggest";_AJAX_PREFERENCES_URL="/ajax/prefs";_AJAX_SELECTION_URL="/ajax/select";_AJAX_SHARE="/ajax/xshare";_AJAX_SHARE_VIA_EMAIL_URL=_AJAX_SHARE+"?via=email";_AUTOSUGGEST_DELAY=180;_AUTOSUGGEST_DELIMITERS=[",",";"];_BLOCKING_PANEL_TRANSPARENCY=0.7;_BLOCKING_PANEL_SHOW_EFFECT="fadeIn";_DEBUG_MODE=1;_FADE_DELAY=500;_FADE_SPEED=300;_FADE_TO_DELETED=0.1;_FLASH_MESSAGE_DELAY=3000;_ITEM_DETAIL_POPUP_DELAY=500;_ITEM_DETAIL_POPUP_LEFT_OFFSET=-78;_ITEM_DETAIL_POPUP_LEFT_BOUNDARY=10;_ITEM_DETAIL_POPUP_RIGHT_BOUNDARY=10;_ITEM_DETAIL_POPUP_TOP_OFFSET=65;_ITEM_DETAIL_QUICKSHARE_LEFT_OFFSET=0;_ITEM_DETAIL_QUICKSHARE_TOP_OFFSET=100;_ITEM_DETAIL_DETAILS_LENGTH=24;_ITEM_DETAIL_TITLE_LENGTH=16;_ITEM_SELECTOR_CLICKER_OPACITY=0.01;_ITEM_SELECTOR_TOP_OFFSET=-3;_ITEM_SELECTOR_LEFT_OFFSET=-3;_ITEM_SELECTOR_LOCK=false;_KEY_ECHO_UNBOUND_KEYS=false;_KEYCODE_ARROW_LEFT=37;_KEYCODE_ARROW_UP=38;_KEYCODE_ARROW_RIGHT=39;_KEYCODE_ARROW_DOWN=40;_KEYCODE_ENTER=13;_KEYCODE_ESC=27;_KEYCODE_TAB=9;_MAIL_PREVIEW_LEFT_OFFSET=-405;_MAIL_PREVIEW_TOP_OFFSET=30;_SLIDE_SPEED=100;_THUMBNAIL_HEIGHT=101;_AJAX_SUCCESS=0;_AJAX_INVALID_ACTION=1;_AJAX_AUTH_REQUIRED=2;_AJAX_INVALID_PARAMETER=3;_AJAX_OPERATION_FAILED=4;_AJAX_CONFIRMATION_REQUIRED=5;_AJAX_SECURE_CONNECTION_REQUIRED=6;_AJAX_MISSING_PARAMETER=7;_AJAX_ACCOUNT_DISABLED=8;_AUTOSUGGEST_CONTENT_ID="xxx";_AUTOSUGGEST_FIELDS={};_AUTOSUGGEST_FRAME_ID="xxx";_AUTOSUGGEST_LAST_FIELD=null;_AUTOSUGGEST_LAST_QUERY={};_AUTOSUGGEST_LAST_RESULTS={};_AUTOSUGGEST_LAST_RESULTS_ORDER=[];_AUTOSUGGEST_LAST_RESULTS_SELECTED=null;_AUTOSUGGEST_KEY_TRAP=null;_AUTOSUGGEST_SHADOW_ID="xxx";_AUTOSUGGEST_TIMEOUT=null;_AUTOSUGGEST_VISIBLE=false;_DROPDOWN_MENUS={};_ITEM_DETAIL_ENABLE=true;_ITEM_DETAIL_KEYS={};_ITEM_DETAIL_POPUP_SHOW=0;_ITEM_DETAIL_TIMEOUT=null;_ITEM_DETAIL_TIMEIN=null;_ITEM_DETAIL_VARS={};_ITEM_SELECTOR_ENABLE=true;_ITEM_SELECTOR_TIMEOUT=null;_KEY_BINDINGS={};_KEY_BINDINGS_ENABLE=true;_MESSAGE_CATALOG={};_MESSAGE_PREVIEW_TOGGLE_STATE={};_MOUSE_POSITION={x:0,y:0};_STATUSLINE_DIV_ID="xxx";_STATUSLINE_FLASH_DIV_ID="xxx";_STATUSLINE_FLASH_MESSAGE_DIV_ID="xxx";_TAB_SETS=new Array();_VIEW_CURRENT_TYPE="xxx";_VIEW_ITEM_CLICK_HOOK=null;_VIEW_ITEM_SELECTIONS={};function addCatalogMessage(A,B){_MESSAGE_CATALOG[A]=B}function autosuggestAddHighlight(D,A){var C=" ";if(!D||!A){return D}var E=D.split(C);var F=false;for(var B=0;B<E.length;B++){if(E[B].toLowerCase().indexOf(A.toLowerCase())==0&&!F){E[B]="<em>"+E[B].substr(0,A.length)+"</em>"+E[B].substr(A.length);F=true}}return E.join(C)}function autosuggestAjaxCallback(J){if(J==null){alert("ERROR: There was a problem getting selection data back from the server.");return }if(!xoopit.isSuccess(J)){return }var C=J.result;var G=getElem(_AUTOSUGGEST_CONTENT_ID);if(!G){return }var D="";if(!C.results||C.results.length<1||!C.fieldId){G.innerHTML='<div class="noResults">'+_MESSAGE_CATALOG["autosuggest-no-results"]+"</div>";autosuggestHide();return }else{var B=C.query;D="<ul>";_AUTOSUGGEST_LAST_RESULTS={};_AUTOSUGGEST_LAST_RESULTS_ORDER=[];_AUTOSUGGEST_LAST_RESULTS_SELECTED=null;var H=_AUTOSUGGEST_FIELDS[C.fieldId];for(var A=0;A<C.results.length;A++){var L=C.results[A];var F;var E=xoopit.escHTML(L.emailAddress);if(xoopit.isBlank(L.displayName)){F=autosuggestAddHighlight(E,B)}else{var I=xoopit.escHTML(L.displayName);var K=autosuggestAddHighlight(I,B);if(K===I){F=autosuggestAddHighlight(E,B)}else{F=E}F='<div class="displayName">'+K+'</div> <div class="displayEmail">&lt;'+F+"&gt;</div>"}D+='<li id="'+xoopit.escHTML(C.fieldId)+"."+xoopit.escHTML(L.documentId)+'"><a href="javascript:'+H.onclickName+"({fieldId:'"+xoopit.escHTML(C.fieldId)+"',documentId:'"+xoopit.escHTML(L.documentId)+"'})\">"+F+" </a></li>";_AUTOSUGGEST_LAST_RESULTS[L.documentId]={documentId:L.documentId,displayName:L.displayName,emailAddress:L.emailAddress,fieldId:C.fieldId,sortableNameFNLN:L.sortableNameFNLN};_AUTOSUGGEST_LAST_RESULTS_ORDER.push(L.documentId)}D+="</ul>"}G.innerHTML=D;autosuggestShow({fieldId:C.fieldId})}function autosuggestHandleKeypress(B){if(!B||!B.target){return }B.stopPropagation();if(_AUTOSUGGEST_KEY_TRAP!=null){return }_AUTOSUGGEST_KEY_TRAP=setTimeout("autosuggestHandleKeypressTrap()",10);var C=keyboardGetKeyCode(B);if(_AUTOSUGGEST_TIMEOUT!=null){clearTimeout(_AUTOSUGGEST_TIMEOUT)}var A=B.target.id;_AUTOSUGGEST_TIMEOUT=setTimeout("autosuggestProcess({fieldId:'"+A+"'});",_AUTOSUGGEST_DELAY);autosuggestPerformKeyEvent({keyCode:C,fieldId:A})}function autosuggestHandleKeypressTrap(){_AUTOSUGGEST_KEY_TRAP=null}function autosuggestHide(){$("#"+_AUTOSUGGEST_FRAME_ID).fadeOut(_FADE_SPEED/2);_AUTOSUGGEST_VISIBLE=false;_AUTOSUGGEST_LAST_RESULTS_SELECTED=null}function autosuggestInit(A){_AUTOSUGGEST_CONTENT_ID=A.contentId;_AUTOSUGGEST_FRAME_ID=A.frameId;_AUTOSUGGEST_SHADOW_ID=A.shadowId}function autosuggestPerformKeyEvent(vars){if(!vars){return }var fieldId=vars.fieldId;var keyCode=vars.keyCode;var numResults=_AUTOSUGGEST_LAST_RESULTS_ORDER.length;if(numResults>0){var doMove=false;switch(keyCode){case _KEYCODE_ESC:autosuggestHide();break;case _KEYCODE_TAB:case _KEYCODE_ENTER:if(_AUTOSUGGEST_LAST_RESULTS_SELECTED!=null&&_AUTOSUGGEST_LAST_RESULTS_SELECTED<numResults&&_AUTOSUGGEST_LAST_RESULTS[_AUTOSUGGEST_LAST_RESULTS_ORDER[_AUTOSUGGEST_LAST_RESULTS_SELECTED]]){eval(_AUTOSUGGEST_FIELDS[fieldId].onclickName+'({fieldId: "'+escapeJS(fieldId)+'",documentId: "'+escapeJS(_AUTOSUGGEST_LAST_RESULTS_ORDER[_AUTOSUGGEST_LAST_RESULTS_SELECTED])+'"})')}break;case _KEYCODE_ARROW_DOWN:if(_AUTOSUGGEST_LAST_RESULTS_SELECTED==null){_AUTOSUGGEST_LAST_RESULTS_SELECTED=0}else{_AUTOSUGGEST_LAST_RESULTS_SELECTED++;if(_AUTOSUGGEST_LAST_RESULTS_SELECTED>=numResults){_AUTOSUGGEST_LAST_RESULTS_SELECTED=numResults-1}}doMove=true;break;case _KEYCODE_ARROW_UP:if(_AUTOSUGGEST_LAST_RESULTS_SELECTED!=null&&_AUTOSUGGEST_LAST_RESULTS_SELECTED>0){_AUTOSUGGEST_LAST_RESULTS_SELECTED--}doMove=true;break;case _KEYCODE_TAB:if(_AUTOSUGGEST_VISIBLE==true&&_AUTOSUGGEST_LAST_FIELD!=null){var e=getElem(_AUTOSUGGEST_LAST_FIELD);if(e){setTimeout('getElem("'+escapeJS(_AUTOSUGGEST_LAST_FIELD)+'").focus()',100)}autosuggestPerformKeyEvent({fieldId:_AUTOSUGGEST_LAST_FIELD,keyCode:_KEYCODE_ENTER})}break}if(doMove){for(var i=0;i<numResults;i++){var itemId=_AUTOSUGGEST_LAST_RESULTS_ORDER[i];var item=_AUTOSUGGEST_LAST_RESULTS[itemId];var liItemId=item.fieldId+"."+item.documentId;var liItem=getElem(liItemId);if(liItem){if(_AUTOSUGGEST_LAST_RESULTS_SELECTED!=null&&_AUTOSUGGEST_LAST_RESULTS_SELECTED==i){liItem.className="selected"}else{liItem.className=null}}}}}}function autosuggestProcess(D){_AUTOSUGGEST_TIMEOUT=null;if(!D){return }var A=D.fieldId;var C=getElem(A);if(!A||!C){return }var B=_AUTOSUGGEST_FIELDS[A];if(!B){return }var G=C.value;if(G){for(var F=0;F<_AUTOSUGGEST_DELIMITERS.length;F++){if(G.lastIndexOf(_AUTOSUGGEST_DELIMITERS[F])>=0){G=G.substring(G.lastIndexOf(_AUTOSUGGEST_DELIMITERS[F])+1)}}G=G.replace(/^\s+/,"").replace(/\s+$/,"")}else{G=""}if(G.length<B.minimumCharacters){autosuggestHide();return }if(_AUTOSUGGEST_LAST_QUERY[A]==G){return }_AUTOSUGGEST_LAST_QUERY[A]=G;var E={fieldId:A,query:G};if(!xoopit.isBlank(B.typeFilter)){E.typeFilter=B.typeFilter}if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_AUTOSUGGEST_URL,E,autosuggestAjaxCallback)}}function autosuggestRegisterField(C){if(!C){return }var A=C.fieldId;if(!A){return }var B=getElem(A);if(!B){return }var D={minimumCharacters:C.minimumCharacters,onclickName:C.onclickName,showLeftOffset:C.showLeftOffset,showTopOffset:C.showTopOffset,showRelativeTargetId:C.showRelativeTargetId};if(!xoopit.isBlank(C.typeFilter)){D.typeFilter=C.typeFilter}_AUTOSUGGEST_FIELDS[A]=D;$("#"+A).keydown(autosuggestHandleKeypress);$("#"+A).focus(autosuggestSetCurrentField)}function autosuggestSearchFormChoose(C){var A=getElem(C.fieldId);if(C.fieldId&&A&&_AUTOSUGGEST_LAST_RESULTS[C.documentId]){A.value=_AUTOSUGGEST_LAST_RESULTS[C.documentId].emailAddress;if(isValidEmailAddress(A.value)){var B="/person/"+A.value;if(_AUTOSUGGEST_FIELDS[C.fieldId]&&_AUTOSUGGEST_FIELDS[C.fieldId].typeFilter){B+="/"+_AUTOSUGGEST_FIELDS[C.fieldId].typeFilter}A.form.action=B;A.value=""}else{}A.form.submit()}}function autosuggestSetCurrentField(A){if(!A||!A.target){return }_AUTOSUGGEST_LAST_FIELD=A.target.id}function autosuggestShow(C){var B=xoopit.reqval(C,"fieldId");var I=xoopit.reqval(_AUTOSUGGEST_FIELDS,B);var A=xoopit.reqJElem(_AUTOSUGGEST_FRAME_ID);var G=xoopit.reqJElem(xoopit.constants.ui.elements.CANVAS_ROOT_ID);var D;if(I.showRelativeTargetId){D=xoopit.reqJElem(I.showRelativeTargetId)}else{D=xoopit.reqJElem(B)}var J=G.offset();var E=D.offset();var H=E.left-J.left;var F=E.top-J.top;if(I.showLeftOffset){H+=I.showLeftOffset}if(I.showTopOffset){F+=I.showTopOffset}A.css("left",H+"px").css("top",F+"px").show();_AUTOSUGGEST_VISIBLE=true}function autosuggestValueChoose(E){var D=getElem(E.fieldId);if(E.fieldId&&D&&_AUTOSUGGEST_LAST_RESULTS[E.documentId]){var H=D.value;if(!H){H=""}var C=-1;for(var G=0;G<_AUTOSUGGEST_DELIMITERS.length;G++){if(H.lastIndexOf(_AUTOSUGGEST_DELIMITERS[G])>=0){if(C<0){C=H.lastIndexOf(_AUTOSUGGEST_DELIMITERS[G])}else{if(H.lastIndexOf(_AUTOSUGGEST_DELIMITERS[G])>C){C=H.lastIndexOf(_AUTOSUGGEST_DELIMITERS[G])}}}}var F=_AUTOSUGGEST_LAST_RESULTS[E.documentId].emailAddress;var A="";if(E.style){var B=_AUTOSUGGEST_LAST_RESULTS[E.documentId].displayName;if(E.style=="full"){if(F!=B){if(B.indexOf(",")!=-1||B.indexOf(":")!=-1||B.indexOf(";")!=-1){F='"'+B+'" <'+F+">"}else{F=B+" <"+F+">"}}}else{if(E.style=="name"){if(!xoopit.isBlank(B)){F=B}}}}if(C>=0){H=H.substring(0,C+1)+" "+F}else{H=F}D.value=H;D.focus()}}function autosuggestValueChooseEmail(A){autosuggestValueChoose({fieldId:A.fieldId,documentId:A.documentId,style:"email"})}function debugAlert(A){if(_DEBUG_MODE==1){alert(A)}}function dropdownClearAnimationTimer(A){if(!A){return }_DROPDOWN_MENUS[A].isAnimating=null}function dropdownHide(A){if(!A){return }if(_DROPDOWN_MENUS[A]&&_DROPDOWN_MENUS[A].state!=0){dropdownShowToggle(A)}}function dropdownHideAll(){for(var A in _DROPDOWN_MENUS){dropdownHide(A)}}function dropdownRegister(B){if(!B){return }mItemMap=[];if(B.itemList&&B.itemList.length>0){for(var A=0;A<B.itemList.length;A++){mItemMap[B.itemList[A].id]=B.itemList[A]}}_DROPDOWN_MENUS[B.id]={state:0,imageArrowDown:B.imageArrowDown,imageArrowUp:B.imageArrowUp,isAnimating:null,itemList:B.itemList,itemMap:mItemMap,relativePosition:B.relativePosition};$("#"+B.id+"_shadow").fadeTo(1,0.3)}function dropdownSelectItem(A,C){if(!A||!C){return }var B=_DROPDOWN_MENUS[A].itemMap[C];if(!B){return }dropdownHide(A);$("#"+A+"_currentSelectLabel").html(B.label+" ");setTimeout(B.onclick,_FADE_SPEED)}function dropdownShowToggle(A){var H=18;var G=0;if(!A||!_DROPDOWN_MENUS[A]){return }if(_DROPDOWN_MENUS[A].isAnimating!=null){return }var B=A;_DROPDOWN_MENUS[A].isAnimating=setTimeout(function(){dropdownClearAnimationTimer(B)},xoopit.constants.animation.DROPDOWN_BLOCKING);var I="#"+A+"_dropdownItemList";if(_DROPDOWN_MENUS[A].state==0){_DROPDOWN_MENUS[A].state=1;$("#"+A+"_expandarrow").hide();$("#"+A+"_collapsearrow").show();var D=A;var F=A+"_dropdownItemList";var C=getElemAbsOffset(D);var J=getElemAbsOffset("content");var E=getElem(F);if(C&&J&&E){E.style.left=(C.left+G-J.left+_DROPDOWN_MENUS[A].relativePosition.left)+"px";E.style.top=(C.top+H-J.top+_DROPDOWN_MENUS[A].relativePosition.top)+"px"}$(I).fadeIn(_FADE_SPEED/2)}else{_DROPDOWN_MENUS[A].state=0;$("#"+A+"_expandarrow").show();$("#"+A+"_collapsearrow").hide();$(I).fadeOut(_FADE_SPEED)}}function escapeHTML(A){if(!A||A==""){return A}A=A.replace(/&/,"&amp;");A=A.replace(/</,"&lt;");A=A.replace(/>/,"&gt;");A=A.replace(/"/,"&quot;");return A}function escapeJS(A){if(!A||A==""){return A}A=A.replace(/\\/,"\\\\");A=A.replace(/"/,'\\"');A=A.replace(/'/,"\\'");A=A.replace(/\n/,"\\n");return A}function getElem(A){if(!A){return null}return document.getElementById(A)}function getElemAbsOffset(B){if(!B){return(null)}if((typeof B)=="string"){B=getElem(B)}var C={left:B.offsetLeft,top:B.offsetTop};var A=getElemAbsOffset(B.offsetParent);if(A!=null){C={left:C.left+A.left,top:C.top+A.top}}return C}function getElemTopParent(A){if(!A){return(null)}if((typeof A)=="string"){A=getElem(A)}if(A.offsetParent!=null){A=getElemTopParent(A.offsetParent)}return A}function getMousePosition(){return _MOUSE_POSITION}function getMouseXPosition(){return _MOUSE_POSITION.x}function getMouseYPosition(){return _MOUSE_POSITION.y}function goUrl(A){if(A){window.location.href=A}}function imageSwap(C,B){if(!C){debugAlert("imageSwap: Missing id.");return }if(!B){debugAlert("imageSwap: Missing srcUrl.");return }var A=getElem(C);if(!A){debugAlert("imageSwap: Can't find element: "+C);return }A.src=B}function initIFrameHeight(F){var D=getElem(F);if(D){var B=D.contentWindow;if(B){var E=B.document;if(E){var A=E.body;if(A){var C=A.scrollHeight;if(C){D.height=C+25}}}}}}function initPage(){$().mousemove(mouseUpdatePosition);$().mousedown(dropdownHideAll);$().mousedown(autosuggestHide);$().keydown(keyboardHandler);$("#header").mouseover(function(){keyboardBindEnable(false)});$("#header").mouseout(function(){keyboardBindEnable(true)});$("#"+_AUTOSUGGEST_SHADOW_ID).fadeTo(0,0.3);itemDetailHoverQuickShareAddHints();xoopit.showUserMessages()}function innerHeaderSearchBoxShow(C,D,B,A){if(C){$("#titleString").hide();$("#titleSearch").show();var F=$("#searchFormPeopleSearch");var E=F[0];if(E){if(xoopit.isBlank(E.value)||E.value===A||B===true){E.value=D}F.removeClass(xoopit.widgets.FieldHint.getHintClassname());setTimeout(function(){E.focus();E.select()},300)}}else{$("#titleSearch").hide();$("#titleString").show()}}function isValidEmailAddress(B){if(!B){false}var A=jQuery.trim(B);if(B.match(/^[A-Z0-9._%+-]+\@(([A-Z0-9.-]+)\.)+[A-Z]{2,4}$/i)||B.match(/^[^<>]+\s*<[A-Z0-9._%+-]+\@(([A-Z0-9.-]+)\.)+[A-Z]{2,4}>$/i)){return true}return false}function isValidEmailAddresses(E){if(!E){false}var B=E.split(",");var D=0;for(var C=0;C<B.length;C++){var A=jQuery.trim(B[C]);if(!isBlank(A)){if(isValidEmailAddress(A)){D++}else{return false}}}if(D<1){return false}return true}function isBlank(A){if(!A){return true}if(jQuery.trim(A)==""){return true}return false}function itemDetailBoxSetKey(A){if(!A||!(A.docId)){return }_ITEM_DETAIL_KEYS[A.docId]={date:A.date,deleteUrl:A.deleteUrl,details:A.details,detailsUrl:A.detailsUrl,detailViewUrl:A.detailViewUrl,downloadUrl:A.downloadUrl,mailFromEmail:A.mailFromEmail,mailFromName:A.mailFromName,replyUrl:A.replyUrl,sendItemUrl:A.sendItemUrl,shareItemUrl:A.shareItemUrl,source:A.source,title:A.title,titleUrl:A.titleUrl,type:A.type}}function itemDetailDelayPopup(A){if(_ITEM_SELECTOR_LOCK==true){return }if(!A.docId||!A.domId){return }if(_ITEM_DETAIL_TIMEIN!=null){clearTimeout(_ITEM_DETAIL_TIMEIN);_ITEM_DETAIL_TIMEIN=null}itemDetailSelectAction(A);if(_ITEM_DETAIL_POPUP_SHOW==1){itemDetailPopup(A)}else{_ITEM_DETAIL_TIMEIN=setTimeout(function(){itemDetailPopup(A)},_ITEM_DETAIL_POPUP_DELAY)}}function itemDetailHideSelector(A){if(A&&A.now){$("#thumbnailSelectorFrame").hide();_ITEM_SELECTOR_TIMEOUT=null;if(_ITEM_DETAIL_TIMEIN){clearTimeout(_ITEM_DETAIL_TIMEIN);_ITEM_DETAIL_TIMEIN=null}return }if(_ITEM_SELECTOR_TIMEOUT==null){_ITEM_SELECTOR_TIMEOUT=setTimeout("itemDetailHideSelector({now: true})",100)}itemDetailPopout()}function itemDetailPopout(A){if(A&&A.now){if(A.noFade){$("#itemDetailBox").hide()}else{$("#itemDetailBox").fadeOut(_FADE_SPEED)}$("#itemDetailHoverQuickSharePanel").hide();itemDetailHoverQuickSharePanelReset();_ITEM_DETAIL_TIMEOUT=null;_ITEM_DETAIL_POPUP_SHOW=0;return }if(_ITEM_DETAIL_TIMEOUT==null){_ITEM_DETAIL_TIMEOUT=setTimeout("itemDetailPopout({now: true})",_FADE_DELAY)}}function itemDetailPopup(H){var J;var C;var K;if(H.useCurrentSelectedItem!=undefined&&H.useCurrentSelectedItem==true){J=_ITEM_DETAIL_VARS.docId;C=_ITEM_DETAIL_VARS.domId;K=_ITEM_DETAIL_VARS.formName}else{J=H.docId;C=H.domId;K=H.formName}if(!J||!C){return }var R=_ITEM_DETAIL_KEYS[J].type;if(!(R=="image"||R=="video")){return }if(_ITEM_DETAIL_TIMEOUT!=null){clearTimeout(_ITEM_DETAIL_TIMEOUT);_ITEM_DETAIL_TIMEOUT=null}var E=getElem(J);if(!E){return }var Q=getElemAbsOffset(E);if(!Q){return }var I=getElem("itemDetailBox");if(!I){return }var N=_ITEM_DETAIL_KEYS[J];if(N){var G="---";var A="---";if(N.mailFromEmail){A=N.mailFromName;if(A.length>40){A=A.substring(0,40)}A='<a href="/person/'+N.mailFromEmail+'">'+xoopit.escHTML(A)+"</a>"}if(N.date){G=N.date}var M="";var L=true;if(N.type){switch(N.type){case"file":M=_MESSAGE_CATALOG["text-file"];break;case"image":M=_MESSAGE_CATALOG["text-photo"];break;case"video":M=_MESSAGE_CATALOG["text-video"];L=false;break}}$("#itemDetailSender").html(A);$("#itemDetailBoxDate").html(G);$("#itemDetailHoverQuickShareType").html(M);if(L){$("#itemDetailActionDownloadLink").show();$("#itemDetailActionDownload").attr({href:N.downloadUrl})}else{$("#itemDetailActionDownloadLink").hide()}$("#itemDetailActionDelete").attr({href:'javascript:viewItemAjaxDelete("'+N.id+'", "'+N.deleteUrl+'")'});$("#itemThumbnailSelectorDeleteUrl").attr({href:'javascript:viewItemAjaxDelete("'+N.id+'", "'+N.deleteUrl+'&tmb=selhov")'});var F=false;if(_VIEW_ITEM_SELECTIONS[K].selectedIdsMap[J]){F=true}_ITEM_DETAIL_VARS={docId:J,domId:C,formName:K,isSelected:F}}if(_ITEM_DETAIL_ENABLE){var P=(Q.left+_ITEM_DETAIL_POPUP_LEFT_OFFSET);var O=(Q.top+_ITEM_DETAIL_POPUP_TOP_OFFSET);if(P<_ITEM_DETAIL_POPUP_LEFT_BOUNDARY){P=_ITEM_DETAIL_POPUP_LEFT_BOUNDARY}setElemAbsPosition(I,P,O);$("#itemDetailBox").show();var D=$(getElemTopParent(I)).width();var B=$("#itemDetailBox").width();if((P+B)>(D-_ITEM_DETAIL_POPUP_RIGHT_BOUNDARY)){P=D-(_ITEM_DETAIL_POPUP_RIGHT_BOUNDARY+B);setElemAbsPosition(I,P,O)}}_ITEM_DETAIL_POPUP_SHOW=1}function itemDetailPopupDisable(){_ITEM_DETAIL_ENABLE=false}function itemDetailPopupEnable(){_ITEM_DETAIL_ENABLE=true}function itemSelectorEnable(A){_ITEM_SELECTOR_ENABLE=A}function itemDetailPopupAway(A){if(_ITEM_SELECTOR_LOCK==true){return }itemDetailHideSelector(A);itemDetailPopout(A)}function itemDetailPopupHover(){itemDetailSelectorStay()}function itemDetailHoverQuickShare(){if(!_ITEM_DETAIL_VARS.docId){alert("Sorry, I didn't get the item you wanted to share.");return }var A=$("#itemDetailHoverQuickShareEmail").val();if(!A||isBlank(A)){alert("Please enter an email address.  (Use commas between multiple addresses.)");return }if(!isValidEmailAddresses(A)){alert("Please enter a valid email address.");return }var B=$("#itemDetailHoverQuickShareNote").val();if(B=="Quick note"){note=null}$("#itemDetailHoverQuickShareEmail").attr("disabled",true);$("#itemDetailHoverQuickShareNote").attr("disabled",true);$("#itemDetailHoverQuickShareSubmit1").hide();$("#itemDetailHoverQuickShareSubmit2").fadeIn(_FADE_SPEED);if(_AJAX_ENABLE==true){startAjaxRequest(_AJAX_SHARE,{via:"email",items:_ITEM_DETAIL_VARS.docId,note:B,recipients:A},function(C){itemDetailHoverQuickShareCallback(C)})}}function itemDetailHoverQuickShareCallback(A){$("#itemDetailHoverQuickShareSubmit2").hide();if(!A||!xoopit.isSuccess(A)){$("#itemDetailHoverQuickShareSubmit1").show();$("#itemDetailHoverQuickShareSubmit4").fadeIn(_FADE_SPEED);return }$("#itemDetailHoverQuickShareSubmit3").fadeIn(_FADE_SPEED)}function itemDetailHoverQuickShareAddHints(){xoopit.itemDetailHoverQuickShareEmailHint=new xoopit.widgets.FieldHint({$field:$("#itemDetailHoverQuickShareEmail"),hintText:"Email address"});xoopit.itemDetailHoverQuickShareNoteHint=new xoopit.widgets.FieldHint({$field:$("#itemDetailHoverQuickShareNote"),hintText:"Quick note"});xoopit.widgets.Autosuggest.add({elem:$("#itemDetailHoverQuickShareEmail"),multiple:true})}function itemDetailHoverQuickSharePanelClose(){$("#itemDetailHoverQuickSharePanel").hide();itemDetailHoverQuickSharePanelReset();_ITEM_SELECTOR_LOCK=false}function itemDetailHoverQuickSharePanelToggle(){if(_ITEM_SELECTOR_LOCK==true){_ITEM_SELECTOR_LOCK=false;$("#itemDetailHoverQuickSharePanel").hide()}else{_ITEM_SELECTOR_LOCK=true;$("#itemDetailHoverQuickSharePanel").fadeIn(_FADE_SPEED)}}function itemDetailHoverQuickSharePanelReset(){if(xoopit.itemDetailHoverQuickShareEmailHint){xoopit.itemDetailHoverQuickShareEmailHint.reset()}if(xoopit.itemDetailHoverQuickShareNoteHint){xoopit.itemDetailHoverQuickShareNoteHint.reset()}$("#itemDetailHoverQuickShareSubmit1").show();$("#itemDetailHoverQuickShareSubmit2").hide();$("#itemDetailHoverQuickShareSubmit3").hide();$("#itemDetailHoverQuickShareSubmit4").hide();$("#itemDetailHoverQuickShareEmail").removeAttr("disabled");$("#itemDetailHoverQuickShareNote").removeAttr("disabled")}function itemDetailSelectAction(B){if(_ITEM_SELECTOR_LOCK==true){return }if(!B.docId||!B.domId){return }var A=false;if(_VIEW_ITEM_SELECTIONS[B.formName]&&_VIEW_ITEM_SELECTIONS[B.formName].selectedIdsMap[B.docId]){A=true}_ITEM_DETAIL_VARS={docId:B.docId,domId:B.domId,formName:B.formName,isSelected:A};itemDetailShowSelector({formName:B.formName})}function itemDetailSelectorStay(){if(_ITEM_SELECTOR_TIMEOUT!=null){clearTimeout(_ITEM_SELECTOR_TIMEOUT);_ITEM_SELECTOR_TIMEOUT=null}if(_ITEM_DETAIL_TIMEOUT!=null){clearTimeout(_ITEM_DETAIL_TIMEOUT);_ITEM_DETAIL_TIMEOUT=null}}function itemDetailShowSelector(G){if(_ITEM_SELECTOR_LOCK==true){return }if(!_ITEM_DETAIL_VARS||!_ITEM_DETAIL_VARS.docId){return }var C=_ITEM_DETAIL_VARS.docId;if(_ITEM_SELECTOR_TIMEOUT!=null){clearTimeout(_ITEM_SELECTOR_TIMEOUT);_ITEM_SELECTOR_TIMEOUT=null}itemDetailPopout({now:true});var H="thumbnailSelectorFrame";var B=getElem(H);if(!B){return }var F=getElem(_ITEM_DETAIL_VARS.docId);if(!F){return }var A=getElemAbsOffset(F);if(_ITEM_DETAIL_VARS.isSelected){$("#thumbnailSelectorFrame").addClass("thumbnailSelectorSelected")}else{$("#thumbnailSelectorFrame").removeClass("thumbnailSelectorSelected")}if(_ITEM_SELECTOR_ENABLE){setElemAbsPosition(B,A.left+_ITEM_SELECTOR_LEFT_OFFSET,A.top+_ITEM_SELECTOR_TOP_OFFSET);$("#"+H).show()}if(_ITEM_DETAIL_ENABLE==false){$("#thumbnailSelectorInfoButton").hide()}var E=_ITEM_DETAIL_KEYS[C];var D=getElem("itemThumbnailSelectorShareUrl");if(D&&E){D.href=E.sendItemUrl+"&tmb=selhov"}}function keyboardBindEnable(A){_KEY_BINDINGS_ENABLE=(A?true:false)}function keyboardBindKeycode(B,A){if(_KEY_BINDINGS[B]==null){_KEY_BINDINGS[B]=new Array()}_KEY_BINDINGS[B].push(A)}function keyboardGetKeyCode(A){var B=A.keyCode?A.keyCode:A.charCode;switch(B){case 63234:B=_KEYCODE_ARROW_LEFT;break;case 63232:B=_KEYCODE_ARROW_UP;break;case 63235:B=_KEYCODE_ARROW_RIGHT;break;case 63233:B=_KEYCODE_ARROW_DOWN;break}return B}function keyboardHandler(B){var C=keyboardGetKeyCode(B);if(_KEY_BINDINGS_ENABLE!=true){return }var D=_KEY_BINDINGS[C];if(D){if(D.length>0){for(var A=0;A<D.length;A++){D[A](B)}}}else{if(_KEY_ECHO_UNBOUND_KEYS==true){alert("Unbound key: "+C)}}}function mailPreviewClose(B){if(!B){return }var A=getElem(B);if(!A){return }$("#"+B).fadeOut(_FADE_SPEED)}function mailPreviewOpen(D){if(!D){return }var C=getElem(D);if(!C){return }var B=getElem("mailPreviewIcon");if(B){var A=getElemAbsOffset(B);setElemAbsPosition(C,A.left+_MAIL_PREVIEW_LEFT_OFFSET,A.top+_MAIL_PREVIEW_TOP_OFFSET)}$("#"+D).show()}function messagePreviewClose(A){if(!A){return }$("#"+A).hide(_FADE_SPEED)}function messagePreviewOpen(A){if(!A){return }$("#"+A).show(_FADE_SPEED/2)}function messagePreviewToggle(A){if(_MESSAGE_PREVIEW_TOGGLE_STATE[A]&&_MESSAGE_PREVIEW_TOGGLE_STATE[A]==true){messagePreviewClose(A);_MESSAGE_PREVIEW_TOGGLE_STATE[A]=false}else{messagePreviewOpen(A);_MESSAGE_PREVIEW_TOGGLE_STATE[A]=true}}function mouseUpdatePosition(A){_MOUSE_POSITION.x=A.pageX;_MOUSE_POSITION.y=A.pageY}function navigateIFrame(C,A){var B=document.getElementById(C);B.src=A}function retargetIFrameAnchors(H,G){var D=getElem(H);if(D){var B=D.contentWindow;if(B){var F=B.document;if(F){if(F.getElementsByTagName){var E=F.getElementsByTagName("a");if(E){for(var C=0;C<E.length;C++){var A=E[C];if(A){A.target=G}}}}}}}}function selectionStatuslineCloseFlashMessage(){$("#"+_STATUSLINE_FLASH_DIV_ID).hide();$("#"+_STATUSLINE_DIV_ID).show()}function selectionStatuslineSetFlashMessage(A){$("#"+_STATUSLINE_FLASH_MESSAGE_DIV_ID).html(A.message);$("#"+_STATUSLINE_DIV_ID).hide();$("#"+_STATUSLINE_FLASH_DIV_ID).show()}function setElemAbsPosition(C,D,B){if(!C){return }var A=getElemAbsOffset(C.parentNode);if(A){D-=A.left;B-=A.top}C.style.left=D+"px";C.style.top=B+"px"}function shareViaEmail(E,F,D,B){var A=getElem(F).value;var C=getElem(D).value;if(isBlank(A)||A=="To: type a name"){$("#viewItemDetailShareError").html("Invalid email address");$("#viewItemDetailShareError").show();return }if(C=="Quick note"){C=""}$("#viewItemDetailShareError").hide();if(_AJAX_ENABLE==true){$("#viewItemDetailShareSubmit").hide();$("#viewItemDetailShareSending").show();startAjaxRequest(_AJAX_SHARE_VIA_EMAIL_URL,{items:E,recipients:A,note:C},function(G){shareViaEmailAjaxCallback(G,F,D,B)})}}function shareViaEmailAjaxCallback(B,D,C,A){$("#viewItemDetailShareSending").hide();if(B==null){$("#viewItemDetailShareSubmit").show();$("#viewItemDetailShareError").html("Sorry, we couldn't share!");$("#viewItemDetailShareError").show();return }if(xoopit.isSuccess(B)){$("#viewItemDetailShareSuccess").fadeIn(_FADE_SPEED);setTimeout("$('#viewItemDetailShareSuccess').fadeOut("+_FADE_SPEED+",$('#viewItemDetailShareSubmit').show());",_FLASH_MESSAGE_DELAY);$("#viewItemDetailShareSuccessNext").fadeIn(_FADE_SPEED);getElem(D).value="";getElem(C).value=""}else{$("#viewItemDetailShareSubmit").show();$("#viewItemDetailShareError").html("Invalid email address");$("#viewItemDetailShareError").show()}}function startAjaxRequest(B,D,F,C){_AJAX_LAST_TRANSACTION_ID++;var E=_AJAX_LAST_TRANSACTION_ID;D.__txnId=E+"";var A=F;if(C){A=function(G){F(G,C)}}xoopit.postJSON(B,D,A)}function statuslineInit(A){_STATUSLINE_DIV_ID=A.statuslineId;_STATUSLINE_FLASH_DIV_ID=A.statusflashlineId;_STATUSLINE_FLASH_MESSAGE_DIV_ID=A.statusflashlineMsgId}function strTrunc(B,A){if(!B||!A){return(B)}if(B.length>A){return(B.substring(0,A)+"...")}else{return(B)}}function tabSetAdd(A){_TAB_SETS[A.tabSetId]=A.tabs}function tabSetTabSelect(tabSetId,tabId){if(!tabSetId){debugAlert("ERROR: tabSetTabSelect(): Can't select tab set: "+tabSetId);return }if(!_TAB_SETS[tabSetId]){debugAlert("ERROR: tabSetTabSelect(): Tab set not registered: "+tabSetId);return }var action=null;for(var i=0;i<_TAB_SETS[tabSetId].length;i++){var tab=_TAB_SETS[tabSetId][i];var elem=$("#"+tab.tabId);if(elem){elem.removeClass("tabOff");elem.removeClass("tabOn");if(tab.tabId==tabId){elem.addClass("tabOn")}else{elem.addClass("tabOff")}}if(tab.tabId==tabId){if(!isBlank(tab.url)){goUrl(tab.url)}action=tab.onClick}}if(action!=null&&action!=""){eval(action)}}xoopit.showUserMessages=function(){$(".userMessageItem","#userMessageList").each(function(A,B){var D=$(this);var C=D.attr("data-id");if(!xoopit.isBlank(C)){if(!xoopit.getCookie(C)){D.css("display","block");(function(F,G){var E=$(".xoopit-closer",F).click(function(){F.fadeOut();xoopit.addCookie({name:G,value:"hide"})})})(D,C)}}})};function viewItemAjaxDelete(D,C){if(!C){return }if(confirm("Do you really want to delete this item?")==true){var A=$('tr[data-id="'+D+'"]');var B=$("a",$('div[class="titleFrame"] div[class="tdTruncated"]',A));B.html(B.html()+' <span class="ghosted">- Deleting ...</span>');xoopit.getJSON(C,{},viewItemAjaxDeleteCallback)}}function viewItemAjaxDeleteCallback(C){if(!C||!xoopit.isSuccess(C)){alert("ERROR: There was an error deleting this item.");return }var A=C.result;if(A.idsDeleted&&A.idsDeleted.length>0){for(var B=0;B<A.idsDeleted.length;B++){var D=A.idsDeleted[B];$("#"+D).fadeOut(_FADE_SPEED);$("#"+D+"_thumbnail").fadeOut(_FADE_SPEED);$('tr[data-id="'+D+'"]').fadeOut(_FADE_SPEED)}}}function viewItemAjaxDownloadAll(B,C){if(!B){return }if(_VIEW_ITEM_SELECTIONS[B].numSelectedIds==1){document.location.href="/dl/"+_VIEW_ITEM_SELECTIONS[B].selectedIds[0]+"?viewType=view"}else{var A="/ajax/zip?formName="+B+"&force="+C+"&id=ALL";if(_AJAX_ENABLE==true){xoopit.getJSON(A,{},viewItemAjaxDownloadAllCallback)}}}function viewItemAjaxDownloadAllCallback(B){if(B==null){alert("ERROR: There was a problem getting selection data back from the server.");return }if(!xoopit.isSuccess(B)){if(B.result.message){alert("ERROR: "+B.result.message)}else{alert("ERROR: There was an error while downloading the selected items.")}return }var A=B.result;if(B.status==_AJAX_CONFIRMATION_REQUIRED){if(confirm(A.confirmMessage)){viewItemAjaxDownloadAll(A.formName,true)}return }if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_SELECTION_URL+"/list",{formName:A.formName},viewItemSelectUpdateCallback)}viewItemSelectUpdateCallback(B);if(A.zipFilename!=null){document.location.href="/dl?tmpFN="+A.zipFilename}}function viewItemClick(A){if(xoopit.isFunction(_VIEW_ITEM_CLICK_HOOK)){if(_VIEW_ITEM_CLICK_HOOK(_ITEM_DETAIL_VARS.docId)){return }}if(_ITEM_DETAIL_VARS.docId){var B=_ITEM_DETAIL_KEYS[_ITEM_DETAIL_VARS.docId];if(B&&B.detailViewUrl&&window.top&&window.top.location){if(A==true){window.top.location.href=B.detailViewUrl}else{window.location.href=B.detailViewUrl}$("#thumbnailSelectorClick").fadeTo(1,0.5,function(){$("#thumbnailSelectorClick").fadeTo(_FADE_SPEED,_ITEM_SELECTOR_CLICKER_OPACITY)});xoopit.cursorSetStyle("wait")}}}function setViewItemClickHook(A){_VIEW_ITEM_CLICK_HOOK=A}function viewItemDetailSelect(D){if(!D||!D.docId||!D.domId||!D.formName){return }var C="add";var B=1;if(D.doSelect==true){$("#"+D.docId+"_select").hide();$("#"+D.docId+"_deselect").show();$("#"+D.docId+"_viewItemFrame").addClass("mailViewItemFrameSelected")}else{C="remove";B=-1;$("#"+D.docId+"_deselect").hide();$("#"+D.docId+"_select").show();$("#"+D.docId+"_viewItemFrame").removeClass("mailViewItemFrameSelected")}var A=D.formName;_VIEW_ITEM_SELECTIONS[A].numberSelections+=B;viewItemSelectUpdateMessages(A);if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_SELECTION_URL+"/"+C,{formName:A,id:D.docId},viewItemSelectUpdateCallback)}}function viewItemDeselectAll(A){if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_SELECTION_URL+"/clear",{formName:A},viewItemSelectUpdateCallback)}}function viewItemRowSelect(E){if(!E||!E.docId||!E.domId||!E.formName){return }var A=getElem(E.domId);if(!A){return }var D="add";var C=1;if(A.checked){}else{D="remove";C=-1}var B=E.formName;_VIEW_ITEM_SELECTIONS[B].numberSelections+=C;viewItemSelectUpdateMessages(B);if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_SELECTION_URL+"/"+D,{formName:B,id:E.docId},viewItemSelectUpdateCallback)}}function viewItemSelect(){if(!_ITEM_DETAIL_VARS||!_ITEM_DETAIL_VARS.docId){return }var B;var C="add";if(_ITEM_DETAIL_VARS.isSelected){B=-1;C="remove";_ITEM_DETAIL_VARS.isSelected=false}else{B=1;C="add";_ITEM_DETAIL_VARS.isSelected=true}var A=_ITEM_DETAIL_VARS.formName;_VIEW_ITEM_SELECTIONS[A].numberSelections+=B;viewItemSelectUpdateMessages(A);if(_AJAX_ENABLE==true){xoopit.getJSON(_AJAX_SELECTION_URL+"/"+C,{formName:A,id:_ITEM_DETAIL_VARS.docId},viewItemSelectUpdateCallback)}}function viewItemSelectAllSet(A,C){if(!A){return }if(!_VIEW_ITEM_SELECTIONS[A].pageIds||_VIEW_ITEM_SELECTIONS[A].pageIds.length<0){return }if(_AJAX_ENABLE==true){var B="add";if(C==false){B="remove"}xoopit.getJSON(_AJAX_SELECTION_URL+"/"+B,{formName:A,id:_VIEW_ITEM_SELECTIONS[A].pageIds},viewItemSelectUpdateCallback)}}function viewItemSelectAll(A){viewItemSelectAllSet(A,true)}function viewItemSelectInit(A){if(!A){return }_VIEW_ITEM_SELECTIONS[A.formName]={messageElement:A.messageElement,messages:A.messages,numSelectedIds:A.numSelectedIds,pageIds:A.pageIds,selectedIds:A.selectedIds,viewStyle:A.viewStyle};viewItemSelectUpdateSelectMap(A.formName);viewItemSelectUpdateMessages(A.formName)}function viewItemSelectNone(A){viewItemSelectAllSet(A,false)}function viewItemSelectUpdateCallback(B){var D="";if(B==null){alert("ERROR: There was a problem getting selection data back from the server.");return }if(!xoopit.isSuccess(B)){alert("ERROR: There was an error saving your selection choice.");return }var A=B.result;if(!A.formName||A.formName==""){alert("ERROR: No form name was given.");return }if(A.selectedIds==null){_VIEW_ITEM_SELECTIONS[A.formName].numSelectedIds=0}else{_VIEW_ITEM_SELECTIONS[A.formName].numSelectedIds=A.selectedIds.length}_VIEW_ITEM_SELECTIONS[A.formName].selectedIds=A.selectedIds;viewItemSelectUpdateSelectMap(A.formName);viewItemSelectUpdateMessages(A.formName);viewItemSelectUpdatePageElements(A.formName);if((_VIEW_ITEM_SELECTIONS[A.formName].viewStyle=="thumbnails"||_VIEW_ITEM_SELECTIONS[A.formName].viewStyle=="feed")&&A.inputIds&&A.inputIds.length==1){var C=A.inputIds[0];itemDetailShowSelector({formName:A.formName})}}function viewItemSelectUpdatePageElements(C){if(!C||!_VIEW_ITEM_SELECTIONS[C]||!_VIEW_ITEM_SELECTIONS[C].selectedIdsMap||!_VIEW_ITEM_SELECTIONS[C].pageIds){return }for(var B=0;B<_VIEW_ITEM_SELECTIONS[C].pageIds.length;B++){var A=_VIEW_ITEM_SELECTIONS[C].pageIds[B];var E=A;var D=getElem(E+"_selector");if(_VIEW_ITEM_SELECTIONS[C].selectedIdsMap[A]){$("#"+E).addClass("thumbnailFrameSelected");$("#"+E).addClass("viewItemTableRowSelected");if(D){D.checked=true}}else{$("#"+E).removeClass("thumbnailFrameSelected");$("#"+E).removeClass("viewItemTableRowSelected");if(D){D.checked=false}}}}function viewItemSelectUpdateSelectMap(C){if(!C||!_VIEW_ITEM_SELECTIONS[C]){return }var A=new Array();if(_VIEW_ITEM_SELECTIONS[C].selectedIds&&_VIEW_ITEM_SELECTIONS[C].selectedIds.length>0){for(var B=0;B<_VIEW_ITEM_SELECTIONS[C].selectedIds.length;B++){A[_VIEW_ITEM_SELECTIONS[C].selectedIds[B]]=1}}_VIEW_ITEM_SELECTIONS[C].selectedIdsMap=A}function viewItemSelectUpdateMessages(B){var E=_VIEW_ITEM_SELECTIONS[B].numSelectedIds;var D="";if(E<1){D=_VIEW_ITEM_SELECTIONS[B].messages["no-selections"]}else{if(E==1){D=_VIEW_ITEM_SELECTIONS[B].messages["1-selection-suffix"]}else{D=_VIEW_ITEM_SELECTIONS[B].messages["many-selections-suffix"]}}D=D.replace("[NUM]",E);D=D.replace("[TYPE]",_VIEW_CURRENT_TYPE);var A=_VIEW_ITEM_SELECTIONS[B].messageElement;var C=$("#"+A);if(C){C.html(D)}else{alert("Could not find "+A)}}function viewItemSetCurrentType(A){_VIEW_CURRENT_TYPE=A}xoopit.addCookie=function(B){var A=B.name+"="+encodeURIComponent(xoopit.optval(B.value,""));var D=(B.path!==undefined)?B.path:"/";if(xoopit.isSet(D)&&D.length>0){A+=";path="+D}D=(B.domain!==undefined)?B.domain:".xoopit.com";if(xoopit.isSet(D)&&D.length>0){A+=";domain="+D}if(xoopit.isSet(B.maxAge)){A+=";max-age="+B.maxAge}if(xoopit.isSet(B.expires)||xoopit.isSet(B.days)){var C=B.expires;if(xoopit.isNotSet(C)){var C=new Date();C.setTime(C.getTime()+(B.days*24*60*60*1000))}A+=";expires="+C.toGMTString()}if(B.secure===true){A+=";secure"}document.cookie=A;return A};xoopit.getCookie=function(D){var F=D+"=";var B=document.cookie;var E=0;var A=0;while(A<B.length){A=B.indexOf(";",E);if(A<0){A=B.length}if(A>0){while(E<A&&B.charAt(E)==" "){E++}var C=E+F.length;if(A>=C&&B.charAt(C-1)=="="){if(B.substring(E,C)==F){return decodeURIComponent(B.substring(C,A))}}}E=A+1}return null};xoopit.removeCookie=function(A,C,B){xoopit.addCookie({name:A,value:"",path:C,domain:B,days:-1,maxAge:0})};xoopit.getParameter=function(E){var C=window.location.search.substring(1);var D=C.split("&");for(var B=0;B<D.length;B++){var F=D[B].indexOf("=");if(F>0){var A=D[B].substring(0,F);if(A==E){return D[B].substring(F+1)}}}return null};xoopit.getParameters=function(){var C={};var D=window.location.search.substring(1);var F=D.split("&");for(var B=0;B<F.length;B++){var G=F[B].indexOf("=");if(G>0){var A=F[B].substring(0,G);var E=F[B].substring(G+1);C[A]=E}}return C};xoopit.isSuccess=function(A){if(A.status==_AJAX_SUCCESS){return true}return false};xoopit.reqval=function(B,A){if(B==null){throw"Missing object."}if(B[A]==undefined||B[A]==null){throw'Missing parameter "'+A+'".'}return B[A]};xoopit.optval=function(B,A){return(B===undefined||B===null)?(xoopit.isFunction(A)?A():A):B};xoopit.reqJElem=function(B){if(!B){throw"Missing domId."}var A=$("#"+B);if(A==null||A.length<1){throw'Required DOM element "'+B+'" does not exist.'}return A};xoopit.isSet=function(A){return(A!==undefined&&A!==null&&A!=="")};xoopit.isNotSet=function(A){return(A===undefined||A===null||A==="")};xoopit.isFunction=function(A){return((typeof A)=="function")};xoopit.isString=function(A){return((typeof A)=="string")};xoopit.isNumber=function(A){return((typeof A)=="number")};xoopit.isObject=function(A){return((typeof A)=="object")||xoopit.isFunction(A)};xoopit.isEmailAddress=function(B){if(!B){false}var A=jQuery.trim(B);if(B.match(/^[A-Z0-9._%+-]+\@[A-Z0-9.-]+\.[A-Z]{2,4}$/i)||B.match(/^[^<>]+\s*<[A-Z0-9._%+-]+\@[A-Z0-9.-]+\.[A-Z]{2,4}>$/i)){return true}return false};xoopit.isEmailAddresses=function(B){if(!B){false}var C=jQuery.trim(B).split(/[,;]/);for(var A=0;A<C.length;A++){var D=jQuery.trim(C[A]);if(D.length>0&&xoopit.isEmailAddress(D)==false){return false}}return true};xoopit.startsWith=function(B,A){if((typeof B)=="string"&&B.substring(0,A.length)==A){return true}return false};xoopit.endsWith=function(C,B){var D=C.length;var A=B.length;if((typeof C)=="string"&&D>=A&&C.substring(D-A)==B){return true}return false};xoopit.hasToSource=xoopit.isFunction(Object.prototype.toSource);xoopit.asString=function(B){if(B===null){return"null"}else{if(B===undefined){return"undefined"}else{if(xoopit.hasToSource===true){return B.toSource()}else{if(xoopit.isString(B)){return'"'+B+'"'}else{if(xoopit.isFunction(B)||xoopit.isObject(B)){var C="";for(var A in B){if(B.hasOwnProperty(A)){if(C.length>0){C+=","}C+=(xoopit.asString(A)+":"+xoopit.asString(B[A]))}}return"({"+C+"})"}else{return B.toString()}}}}}};if(!this.JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();xoopit.parseJson=JSON.parse;xoopit.toJson=JSON.stringify;jQuery.fn.tooltip=function(E,B){var C=$(this);var D=C.attr("title");C.removeAttr("title");function G(H){if(!B){var J=H.pageX;var I=H.pageY+20;$("div.tooltip").css({top:I,left:J})}else{if(xoopit.isFunction(B)){B($("div.tooltip"),H)}else{var J=H.pageX+B.x;var I=H.pageY+B.y;$("div.tooltip").css({top:I,left:J})}}}function F(J){$("div.tooltip").remove();var H="";if(!E){H=D}else{if(xoopit.isFunction(E)){H=E(J)}else{H=E}}var I=$('<div class="tooltip">'+H+"</div>").appendTo("body").css({margin:"0pt",color:"#333333",padding:"3px",background:"#EEFFDD none repeat scroll 0%",border:"1px solid #CCCCCC",padding:"3px",position:"absolute","font-family":"Arial,Helvetica,sans-serif","font-size":"62.5%","z-index":"20"});G(J)}function A(){$("div.tooltip").remove()}return C.hover(F,A).mousemove(G)};jQuery.fn.manageInputFields=function(B){var C=this;function A(G,E,D,F){if(E==null){E=$(G)}if(F!=null){E.addClass("invalid_field");if(D){D.addClass("invalid_field")}G.invalidFieldText=G.value=F}else{E.removeClass("invalid_field");if(D){D.removeClass("invalid_field")}}}$("input",this).each(function(){var D=this.id;var L=this.type;var Q=true;var N=true;var G=null;var H=null;var K="don't forget me!";var J="say what?";if(L!="password"&&L!="text"){return }if(B){N=B.required;Q=B.inject;G=B.text;K=xoopit.optval(B.missingText,K);J=xoopit.optval(B.invalidText,J);var O=B[L];if(O){if(xoopit.isString(O)){G=O}else{if(xoopit.isObject(O)){G=xoopit.optval(O.text,G);N=xoopit.optval(O.required,N);Q=xoopit.optval(O.inject,Q);H=xoopit.optval(O.validate,H);K=xoopit.optval(O.missingText,K);J=xoopit.optval(O.invalidText,J)}}}var P=B[D];if(P){if(xoopit.isString(P)){G=P}else{if(xoopit.isObject(P)){G=xoopit.optval(P.text,G);N=xoopit.optval(P.required,N);Q=xoopit.optval(P.inject,Q);H=xoopit.optval(P.validate,H);K=xoopit.optval(P.missingText,K);J=xoopit.optval(P.invalidText,J)}}}}this.inject=Q;this.required=N;var F=null;var M=null;if(Q==false){M=$("label[for="+D+"]",C)}if(N||H){F=$(this);F.focus(function(){if(F.hasClass("invalid_field")){this.value="";A(this,F,M,null)}}).blur(function(){var R=null;if(N&&(this.value==""||this.value==this.placeholderText||this.value==this.invalidFieldText)){R=K}else{if(H==null||H==undefined){}else{if(xoopit.isFunction(H)){var R=H(this.value)}else{if(H.test&&H.test(this.value)==false){R=J}}}}if(R!=null&&L=="password"){R=""}A(this,F,M,R)})}if(Q==false){return }M=$("label[for="+D+"]",C);var E=(G?G:M.text());if(L=="password"){M.remove()}else{if(L=="text"){M.remove();this.placeholderText=E;var I=xoopit.optval(this.value,"");if(I==""){this.value=E}if(F==null){F=$(this)}F.addClass("placeholder").focus(function(){var R=this.placeholderText;if(this.value==R){$(this).removeClass("placeholder").val("")}}).blur(function(){if(this.value==""){var R=this.placeholderText;$(this).addClass("placeholder").val(R)}})}}});$("form",this).submit(function(E){var D=true;$("input",C).each(function(){var F=this.placeholderText;if(this.value==F){this.value=""}F=this.invalidFieldText;if(this.value==F){this.value=""}var G=$(this);if(G.hasClass("invalid_field")||(this.required&&this.value=="")){D=false}});E.target.valid=D;return D})};xoopit.api=function(){};xoopit.api.StatusCodes={SUCCESS:0,INVALID_ACTION:1,AUTH_REQUIRED:2,INVALID_PARAMETER:3,OPERATION_FAILED:4,CONFIRMATION_REQUIRED:5,SECURE_CONNECTION_REQUIRED:6,MISSING_PARAMETER:7,ACCOUNT_DISABLED:8};xoopit.api.isSuccess=function(A){if(A.status==xoopit.api.StatusCodes.SUCCESS){return true}return false};xoopit.api.isAuthRequired=function(A){if(A.status==xoopit.api.StatusCodes.AUTH_REQUIRED){return true}return false};xoopit.namespace("api.user");xoopit.api.user.getStatusPoller=function(A,B){if(xoopit.isNotSet(xoopit.api.user.statusPoller)){xoopit.api.user.statusPoller=new xoopit.api.user.StatusPoller({interval:A,newUserInterval:B,newUserCookie:"www.myphotos.yahoo.com_XN",cookieName:"www.myphotos.yahoo.com_XS"})}return xoopit.api.user.statusPoller};xoopit.api.user.StatusPoller=function(A){var B=this;this._intervalId=null;this._interval=null;this._unauthenticatedCallbacks={};this._allUpdateCallbacks={};this._changeCallbacks={};this._isNewUser=null;this.counts={};this.status={};A=xoopit.optval(A,{});this.apiUrl=xoopit.optval(A.apiUrl,"/ajax/api/user/status");this.account=A.account;this.interval=A.interval||900000;this.cookieName=A.cookieName;this.timestamps={image:0,video:0,file:0};this.newUserCookie=A.newUserCookie;this.newUserInterval=A.newUserInterval||60000;this.noAuthInterval=xoopit.optval(A.noAuthInterval,300000);if(xoopit.isSet(this.cookieName)&&xoopit.isNotSet(A.timestamps)){this.loadTimestamps()}else{if(xoopit.isSet(A.timestamps)){this.timestamps=A.timestamps}}};xoopit.api.user.StatusPoller.prototype.loadTimestamps=function(){if(xoopit.isSet(this.cookieName)){var D=xoopit.getCookie(this.cookieName);if(xoopit.isSet(D)){try{var B=D.split(",");if((B.length%2)==0){for(var A=0;A<B.length;A+=2){this.timestamps[B[A]]=B[A+1]}}}catch(C){xoopit.log.warn(C)}delete this.timestamps.games}}return this};xoopit.api.user.StatusPoller.prototype.saveTimestamps=function(){if(xoopit.isSet(this.cookieName)){var B="";for(var A in this.timestamps){if(this.timestamps.hasOwnProperty(A)){if(B.length>0){B+=","}B+=A+","+this.timestamps[A]}}xoopit.addCookie({name:this.cookieName,value:B,days:100})}return this};xoopit.api.user.StatusPoller.prototype.setInterval=function(B,A){if(A!==true){this.interval=B}if(this._interval!==B&&this.isActive()){this.stop();this.start(true,B)}return this};xoopit.api.user.StatusPoller.prototype.isActive=function(){return(this._intervalId!=null)};xoopit.api.user.StatusPoller.prototype.isNewUser=function(){if(xoopit.isSet(this._isNewUser)){return this._isNewUser}else{if(xoopit.isNotSet(this.newUserCookie)){return null}else{this._isNewUser=(xoopit.getCookie(this.newUserCookie)!=null);return this._isNewUser}}};xoopit.api.user.StatusPoller.prototype.start=function(C,A){C=xoopit.optval(C,false);if(xoopit.isNotSet(A)){A=this.isNewUser()?this.newUserInterval:this.interval}if(this._intervalId==null&&A!==this._interval){this._interval=A;if(C==false){this.requestStatus()}var B=this;this._intervalId=window.setInterval(function(){B.requestStatus()},this._interval)}return this};xoopit.api.user.StatusPoller.prototype.stop=function(){if(this._intervalId!=null){window.clearInterval(this._intervalId);this._intervalId=null;this._interval=null}return this};xoopit.api.user.StatusPoller.prototype.addUpdateCallback=function(B,A){if(A){this._changeCallbacks[B]=B}else{this._allUpdateCallbacks[B]=B}return this};xoopit.api.user.StatusPoller.prototype.removeUpdateCallback=function(B,A){if(A){this._changeCallbacks[B]=undefined}else{this._allUpdateCallbacks[B]=undefined}return this};xoopit.api.user.StatusPoller.prototype.addUnauthenticatedCallback=function(A){this._unauthenticatedCallbacks[A]=A;return this};xoopit.api.user.StatusPoller.prototype.removeUnauthenticatedCallback=function(A){this._unauthenticatedCallbacks[A]=undefined;return this};xoopit.api.user.StatusPoller.prototype.requestStatus=function(B){var E=xoopit.user;if(E&&!E.isAuthenticated()){return }B=xoopit.isSet(B,{});var A=xoopit.optval(B.apiUrl,this.apiUrl);var D=xoopit.optval(B.account,this.account);if(xoopit.isSet(B.parameters)){xoopit.copy(this.timestamps,B.parameters)}if(xoopit.isSet(D)){A+="/"+D}var C=this;xoopit.getJSON(A,this.timestamps,function(F){C.statusCallback(F)},function(F){C.statusError(F)},Math.min(60000,Math.max(this.interval-10000,10000)));return this};xoopit.api.user.StatusPoller.prototype.setTimestamps=function(A){xoopit.copy(this.timestamps,A);this.saveTimestamps();return this};xoopit.api.user.StatusPoller.prototype.ensureCounts=function(B){for(var A=0;A<B.length;A++){if(xoopit.isNotSet(this.timestamps[B[A]])){this.timestamps[B[A]]=0}}return this};xoopit.api.user.StatusPoller.prototype.resetTimestamps=function(A){this.timestamps=xoopit.optval(A,this.timestamps);this.saveTimestamps();return this};xoopit.api.user.StatusPoller.prototype.statusCallback=function(C){if(xoopit.api.isSuccess(C)==false){if(xoopit.api.isAuthRequired(C)){for(var B in this._unauthenticatedCallbacks){this._unauthenticatedCallbacks[B]()}}xoopit.log.debug("status request failed: "+xoopit.asString(C));this.setInterval(this.noAuthInterval,true);return }if(xoopit.isNotSet(C.result)){xoopit.log.warn("status response not set: "+xoopit.asString(C));return }var H=false;var A=this.status;var E=this.counts;this.status=C.result.status;this.counts=C.result.counts;if(this.status.state.user==="new"){this._isNewUser=true}else{this._isNewUser=false}if(xoopit.isSet(A)){for(var G in this.status){if(typeof this.status[G]==="number"&&A[G]!==this.status[G]){H=true}}for(var G in this.counts){if(typeof this.counts[G]==="number"&&E[G]!=this.counts[G]){H=true}}}for(var B in this._allUpdateCallbacks){this._allUpdateCallbacks[B](this.status,this.counts,H)}if(H){for(var B in this._changeCallbacks){this._changeCallbacks[B](this.status,this.counts,H)}}var D=this.isNewUser();var F=this._interval;if(D!=null){F=(D===true)?this.newUserInterval:this.interval}this.setInterval(F,true)};xoopit.api.user.StatusPoller.prototype.statusError=function(A){xoopit.log.warn("status request error: "+A)};xoopit.api.user.searchPeople=function(A,B){xoopit.getJSON("/ajax/api/user/people",{search:A},function(C){if(xoopit.isSuccess(C)){B(C.result)}else{xoopit.log.warn("People search results failed, status "+C.status);B([])}},function(C){xoopit.log.warn("Error in getting people search results: "+C);B([])},10000)};xoopit.api.user.uploadFile=function(uploadForm,callback){uploadForm[xoopit.CRUMB].value=xoopit.CRUMB;var form=$(uploadForm);var iframeId=form.attr("id")+"_uploadframe";var targetiframe=$("iframe#"+iframeId);if(targetiframe.length==0){targetiframe=$('<iframe id="'+iframeId+'" name="'+iframeId+'" style="display: none;"></iframe>');targetiframe.appendTo("body")}if(xoopit.isSet(callback)){targetiframe.one("load",function(){var frameElt=targetiframe[0];var innerDoc=null;if(frameElt.contentDocument){innerDoc=frameElt.contentDocument}else{if(frameElt.contentWindow){innerDoc=frameElt.contentWindow.document}}var responseObj={status:_AJAX_OPERATION_FAILED};if(innerDoc){var resultText=$("body",innerDoc).text();try{responseObj=eval("("+resultText+")")}catch(e){xoopit.log.warn("Failed to parse upload response: "+resultText)}}else{xoopit.log.error("Failed to find upload response.")}callback(responseObj)})}form.attr({action:"/ajax/upload",method:"post",encoding:"multipart/form-data",enctype:"multipart/form-data",target:iframeId})};xoopit.api.user.setProfilePhoto=function(A,C){A=A||{};var B={};if(A.fileId!==undefined){B={photoId:A.fileId,x:A.x,y:A.y,w:A.w,h:A.h}}xoopit.postJSON("/profile/user/image",B,function(D){C(xoopit.isSuccess(D))},function(D){C(false)},10000)};xoopit.api.user.ignoreUserEmailAddress=function(A,B){xoopit.postJSON("/ajax/ignore",{emailAddress:A},function(C){if(B){B(xoopit.isSuccess(C))}},function(C){if(B){B(false)}},10000)};xoopit.abtest={};(function(){function B(){var A=[];var C={};return{getValueForBucket:function(D){var E=A[D];if(E===undefined){E=A[D]=Math.floor(Math.random()*D)}return E},registerTest:function(E,F){var D=this.getValueForBucket(F.length);C[E]={vals:F.length,option:F[D]}},getValueForTest:function(D){return C[D].option},getTests:function(){return C},getTestsAsFlatHash:function(){var E={};for(var D in C){E["AB_"+D]=C[D].option+"%"+C[D].vals}return E}}}xoopit.abtest=B()})();$(document).ready(function(){try{var D=$("#lhs_random_stuff_anchor");if(D.length>0){var C=function(G){xoopit.Grid.apply(this,arguments)};xoopit.inherit(C,xoopit.Grid);C.prototype.getWidth=C.prototype.getHeight=function(){return 100};C.prototype.insertSelf=function(){if(xoopit.isSet(this.anchor)){if(xoopit.isString(this.anchor)){this.anchor=$(this.anchor)}this.anchor.empty().prepend(this.div)}return this};C.prototype.onGridClick=function(G,K,J,H){var I=this.fetcher.getByIndex(this.position+J);if(xoopit.isSet(I)){if(I.type=="image"){goUrl("/photos/view/"+I.id)}else{if(I.type=="video"){goUrl("/videos/view/"+I.id)}}}};var E=new xoopit.Fetcher({type:"random_item"});E.setRandom(true);var A=new C({id:"lhs_random_stuff_grid",fetcher:E,anchor:D,cellSize:100,pages:10,clipMode:0,size:1});var B=false;$("#lhs_random_stuff_button").click(function(){if(B==false){B=true;A.show()}else{A.next()}return false})}}catch(F){xoopit.log.warn("problem with lhs random grid: "+F)}$(".thumbnailOverlay a").click(function(){var G=$(this);G.parent().fadeTo(1,0.7,(function(H){H.fadeOut(250)})(G))})});(function(A,B){A.namespace("Intl");A.Intl.resources={};A.Intl.locale="en-US";A.Intl.getResources=function(){return A.Intl.resources};A.Intl.setResources=function(D,C){if(!!C){B.extend(A.Intl.resources,D)}else{A.Intl.resources=B.extend({},D,A.Intl.resources)}};A.Intl.getLocale=function(){return A.Intl.locale};A.Intl.setLocale=function(C){A.Intl.locale=C}})(xoopit,jQuery);var xoopit=xoopit||function(){};xoopit.betanotify={SUCCESS_DIV:"emailNotifySuccess",MESSAGE_ERROR_FORMATTING:"Please enter a valid email address.",MESSAGE_ERROR:"Invalid email address."};xoopit.betanotify.sendEmail=function(A,B){A.attr("disabled",true);B.attr("disabled",true);var C=A.val();if(xoopit.isBlank(C)){return }if(!(C.match("[^@]+[@][^@]+[.][^@]+"))){alert(xoopit.betanotify.MESSAGE_ERROR_FORMATTING);A.attr("disabled",false).focus();B.attr("disabled",false);return }if(xoopit.constants.io.AJAX_ENABLE==true){xoopit.getJSON("/ajax-secure/mailcap",{e:C},xoopit.betanotify.sendEmailCallback)}if(xoopit.isSet(googleTracker)){googleTracker._trackPageview("/inviteRequest")}};xoopit.betanotify.sendEmailCallback=function(A){if(!A||A.status!=0){var B=-1;if(A){B=A.status}xoopit.el(xoopit.betanotify.EMAIL_ADDRESS_FIELD).disabled=false;xoopit.el(xoopit.betanotify.SUBMIT_BUTTON).disabled=false;alert(xoopit.betanotify.MESSAGE_ERROR+"\n\n("+B+")");return }$("#"+xoopit.betanotify.SUCCESS_DIV).fadeIn(xoopit.constants.animation.FADE_SPEED)};xoopit.isSet=function(A){return(A!==undefined&&A!==null&&A!=="")};xoopit.isNotSet=function(A){return(A===undefined||A===null||A==="")};xoopit.login={FIELD_REAL_EMAIL_ADDRESS:"emailAddress",FIELD_REAL_EMAIL_PASSWORD:"emailPassword"};xoopit.login.doSubmit=function(C,B,F){var G=document.forms[C];if(G){var E=G.elements[B].value;if(xoopit.isSet(E)&&E.indexOf("@")==-1){E+="@gmail.com";G.elements[B].value=E}var A=G.action;if(A!==null&&A!==undefined){A=A.toLowerCase()}if(A.indexOf("https:")!=0){xoopit.log.error("login attempted on non-explicitly secure url: "+A);return false}var D=G.method;if(D!==null&&D!==undefined){D=D.toLowerCase()}if(D!="post"){xoopit.log.error("login attempted using method other than post: "+D);return false}G.elements[xoopit.login.FIELD_REAL_EMAIL_ADDRESS].value=E;G.elements[xoopit.login.FIELD_REAL_EMAIL_PASSWORD].value=G.elements[F].value;return true}else{return false}};xoopit.login.fieldStyleFix=function(A){if(!A){return }if(xoopit.isBlank(A.value)){$(A).removeClass("edited");A.value=""}else{$(A).addClass("edited");A.value=jQuery.trim(A.value)}};xoopit.login.fieldFocus=function(A){if(!A){return }$(A).addClass("edited");A.select()};xoopit.login.revealOptionsPanel=function(){$("#loginBoxOptions").show()};xoopit.signup={};xoopit.signup.doSubmit=function(){var D=document.forms.form_newuser;var A=document.forms.real_form_newuser;var B=D.elements.emailAddress.value;if(B.indexOf("@")==-1){B+="@gmail.com"}A.elements.emailAddress.value=B;A.elements.emailPassword.value=D.elements.emailPassword.value;var C=$(".xoopit-signup-form .xoopit-error");if(!D.elements.confirm.checked){C.html("You must accept the Terms of Use to sign up.").fadeIn(xoopit.constants.animation.FADE_SPEED);return }C.hide();$("#signupSpinner").fadeIn(xoopit.constants.animation.FADE_SPEED);xoopit.utils.trackAnalyticsAction("xoopit","xoopit","signup","signup_submit");A.submit()};xoopit.signup.openTermsWindow=function(){var A=window.open("/terms?dm=window&wm=y","termsWindow","width=550,height=400,resize=1,scrollbars=1,resizable=1");A.focus()};xoopit.installPluginCancel=function(){xoopit._HAS_CLICKED_INSTALL=false;$("#firefoxPluginInstallHelp").slideUp(600);$("#firefoxPluginInstallBlockingPane").fadeOut(500)};xoopit.installPluginWithSlidedown=function(A){if(!xoopit._HAS_CLICKED_INSTALL){$("#firefoxPluginInstallBlockingPane").css("width",$(window).width()).css("height",$(window).height()).css("opacity",0).css("display","block");$("#firefoxPluginInstallHelp").slideDown(400);$("#firefoxPluginInstallBlockingPane").fadeTo(800,0.8);setTimeout(function(){xoopit.goUrl(A)},1000);xoopit._HAS_CLICKED_INSTALL=true}else{xoopit.goUrl(A)}};$().ready(function(){var D=/msie|MSIE 6/.test(navigator.userAgent);if(D){$("input[data-ie6label]").each(function(E,F){F.value=$(this).attr("data-ie6label")})}$("#xoopit-amo-peek").click(function(){var G="https://addons.mozilla.org/en-US/firefox/addon/8257";var F={};var E=$(this).attr("data-v");if(!xoopit.isBlank(E)){F.v=E}xoopit.utils.trackAnalyticsAction("xoopit","xoopit","home","amo_banner",F);xoopit.goUrl(G)});var C=$("#loginEmailAddress");C.focus(function(E){xoopit.login.fieldFocus(E.target);xoopit.login.fieldStyleFix($("#loginEmailPassword").get(0));xoopit.login.revealOptionsPanel()}).blur(function(E){xoopit.login.fieldStyleFix(E.target);xoopit.login.fieldStyleFix($("#loginEmailPassword").get(0))}).change(function(E){xoopit.login.fieldStyleFix(E.target);xoopit.login.fieldStyleFix($("#loginEmailPassword").get(0))});var B=$("#loginEmailPassword");B.focus(function(E){xoopit.login.fieldFocus(E.target);xoopit.login.revealOptionsPanel()}).blur(function(E){xoopit.login.fieldStyleFix(E.target)}).change(function(E){xoopit.login.fieldStyleFix(E.target)});setTimeout(function(){xoopit.login.fieldStyleFix(xoopit.el("loginEmailAddress"));xoopit.login.fieldStyleFix(xoopit.el("loginEmailPassword"))},300);$("#firefoxPluginInstallBlockingPane").css("width",$(window).width()).css("height",$(window).height());$(".xoopit-landingPage .xoopit-gotoSignupButton").click(function(){xoopit.goUrl("/signup?bf=1")});var A=false;$(".xoopit-priv-sec .xoopit-collapsed").click(function(){if(A){A=false;$(".xoopit-priv-sec .xoopit-expanded").hide();$(".xoopit-priv-sec .xoopit-expanded-arrow").hide()}else{A=true;$(".xoopit-priv-sec .xoopit-expanded").fadeIn(xoopit.constants.animation.FADE_SPEED);$(".xoopit-priv-sec .xoopit-expanded-arrow").fadeIn(xoopit.constants.animation.FADE_SPEED);var E="xoopit";if(this.parentNode){var F=$(this.parentNode).attr("data-page");if(!xoopit.isBlank(F)){E=F}}xoopit.utils.trackAnalyticsAction("xoopit","xoopit",E,"why_password_click")}});$(".xoopit-priv-sec .xoopit-expanded a").click(function(){var E="xoopit";if(this.parentNode){var F=$(this.parentNode).attr("data-page");if(!xoopit.isBlank(F)){E=F}}xoopit.utils.trackAnalyticsAction("xoopit","xoopit",E,"learn_more_click")});$(".xoopit-form-newuser-submit").click(function(){xoopit.signup.doSubmit()});xoopit._IS_SIGNING_UP=false;$('.xoopit-landingPageSignup input[type="submit"]').click(function(){var I=$(".xoopit-landingPageSignup .xoopit-error");if(xoopit._IS_SIGNING_UP){return }I.css("display","none");var J=$(".xoopit-landingPageSignup .xoopit-email-field").val();var H=$(".xoopit-landingPageSignup .xoopit-password-field").val();var G=$(".xoopit-landingPageSignup .xoopit-checkbox-confirm");var E=(G.length==1)&&G[0].checked?true:false;if(xoopit.isBlank(J)){I.html("Please enter your Gmail address").fadeIn(300)}else{if(J.indexOf("@")<0){J=jQuery.trim(J)+"@gmail.com";$(".xoopit-landingPageSignup .xoopit-email-field").val(J)}if(!xoopit.email.validateAddress(J)){I.html("Please enter your full Gmail address").fadeIn(300)}else{if(xoopit.isBlank(H)){I.html("Please enter your Gmail password").fadeIn(300)}else{if(!E){I.html("You must accept the Terms &amp; Conditions to sign up").fadeIn(300)}else{var F=$("#real_form_newuser");$('input[name="emailAddress"]',F).val(J);$('input[name="emailPassword"]',F).val(H);if(jQuery.browser.mozilla){$('input[name="isMoz"]').val("true")}xoopit.utils.trackAnalyticsAction("xoopit","xoopit","home","signup_submit");xoopit._IS_SIGNING_UP=true;$(".xoopit-landingPageSignup .xoopit-signup-start").fadeIn(300);F.submit()}}}}})});var xoopit=xoopit||{};xoopit.constants=xoopit.constants||{ajax:{AUTOSUGGEST_DELAY:250,AUTOSUGGEST_URL:"/ajax/autosuggest",COMMENT_URL:"/ajax/comment",INVITES_URL:"/ajax/invite",RESULT_SUCCESS:0,RESULT_INVALID_ACTION:1,RESULT_AUTH_REQUIRED:2,RESULT_INVALID_PARAMETER:3,RESULT_OPERATION_FAILED:4,RESULT_CONFIRMATION_REQUIRED:5,RESULT_SECURE_CONNECTION_REQUIRED:6,RESULT_MISSING_PARAMETER:7,RESULT_ACCOUNT_DISABLED:8,RESULT_REAUTH_REQUIRED:9,RESULT_TOS_ACCEPT_REQUIRED:10,RESULT_ACCOUNT_MIGRATING:11,SHARE_BY_EMAIL_URL:"/ajax/xshare",TIMEOUT:300*1000},analytics:{gmail:{accountStr:"UA-1808294-5",domainStr:"mail.google.com"},xoopit:{accountStr:"UA-1808294-6",domainStr:".xoopit.com"}},animation:{DROPDOWN_BLOCKING:200,FADE_DELAY:500,FADE_SPEED:300,SLIDE_SPEED:400},datetime:{SHORT_MONTH_NAME:["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},detailView:{IMAGE_MAX_DISPLAY_HEIGHT:400},images:{BASE_URL_PREFIX:"/www/v1-0.0.19647/images",PRELOAD_CACHE_DIV:"xoopit_image_preload_cache"},io:{AJAX_ENABLE:true},keycodes:{ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,ENTER:13,ESC:27,TAB:9},ui:{elements:{CANVAS_ROOT_ID:"content"}},viewitemTypes:{typeToActionName:{album:"albums",file:"files",image:"photos",video:"videos"}}};(function(B,C){B.namespace("Intl");B.Intl.resources={};B.Intl.locale="en-US";B.Intl.getResources=function(){return B.Intl.resources};B.Intl.setResources=function(G,F){if(!!F){C.extend(B.Intl.resources,G)}else{B.Intl.resources=C.extend({},G,B.Intl.resources)}};B.Intl.getLocale=function(){return B.Intl.locale};B.Intl.setLocale=function(F){if(F){B.Intl.locale=F}};var D=function(G,F,H){if(typeof G!=="string"){throw new Error("_formatMessage: expected a string");return G}return G.replace(/{(\w+)(?:,(\w+))?}/g,function(J,I,L,M){var K=F[I]||"";if(L&&L.indexOf("date")===0&&K instanceof Date){K=K.toLocaleString()}else{if(L&&L.indexOf("number")===0&&typeof K==="number"){K=K.toLocaleString()}}return K})};B.Intl.formatMessage=function(F){return D(F,Array.prototype.splice.call(arguments,1,arguments.length),B.Intl.locale)};B.Intl.getMessage=function(F){try{if(arguments.length===1){return(B.Intl.resources[F]||F)}var G=Array.prototype.splice.call(arguments,1,arguments.length);return D((B.Intl.resources[F]||F),G,B.Intl.locale)}catch(H){B.log.warn([H,F,arguments]);return F}};B.Intl.getAssetPath=function(G,F){return G+B.Intl.locale.toLowerCase()+F};B.Intl.formatShortPrettyDate=function(F){return B.formatShortPrettyDate(F,null,B.Intl.locale)};B.Intl.formatPrettyDate=function(F){return B.formatPrettyDate(F,null,B.Intl.locale)};B.Intl.formatLongDate=function(F){return B.formatLongDate(F,null,B.Intl.locale)};var A={"ja-JP":true,"ko-KR":true,"vi-VN":true,"zh-Hant-HK":true,"zh-Hant-TW":true};B.Intl.formatFullName=function(F,G){if(B.Intl.locale in A){return(G?G:"")+((F&&G)?" ":"")+(F?F:"")}else{return(F?F:"")+((G&&F)?" ":"")+(G?G:"")}};B.Intl.pluralize=function(G,F,H,I){if(G===0){return B.Intl.getMessage((I||F),G)}else{if(G>1){return B.Intl.getMessage(F,G)}}return B.Intl.getMessage(H,G)};var E={"\u1e9a":"a","\u00c1":"a","\u00e1":"a","\u00c0":"a","\u00e0":"a","\u0102":"a","\u0103":"a","\u1eae":"a","\u1eaf":"a","\u1eb0":"a","\u1eb1":"a","\u1eb4":"a","\u1eb5":"a","\u1eb2":"a","\u1eb3":"a","\u00c2":"a","\u00e2":"a","\u1ea4":"a","\u1ea5":"a","\u1ea6":"a","\u1ea7":"a","\u1eaa":"a","\u1eab":"a","\u1ea8":"a","\u1ea9":"a","\u01cd":"a","\u01ce":"a","\u00c5":"a","\u00e5":"a","\u01fa":"a","\u01fb":"a","\u00c4":"a","\u00e4":"a","\u01de":"a","\u01df":"a","\u00c3":"a","\u00e3":"a","\u0226":"a","\u0227":"a","\u01e0":"a","\u01e1":"a","\u0104":"a","\u0105":"a","\u0100":"a","\u0101":"a","\u1ea2":"a","\u1ea3":"a","\u0200":"a","\u0201":"a","\u0202":"a","\u0203":"a","\u1ea0":"a","\u1ea1":"a","\u1eb6":"a","\u1eb7":"a","\u1eac":"a","\u1ead":"a","\u1e00":"a","\u1e01":"a","\u023a":"a","\u2c65":"a","\u01fc":"a","\u01fd":"a","\u01e2":"a","\u01e3":"a","\u1e02":"b","\u1e03":"b","\u1e04":"b","\u1e05":"b","\u1e06":"b","\u1e07":"b","\u0243":"b","\u0180":"b","\u1d6c":"b","\u0181":"b","\u0253":"b","\u0182":"b","\u0183":"b","\u0106":"c","\u0107":"c","\u0108":"c","\u0109":"c","\u010c":"c","\u010d":"c","\u010a":"c","\u010b":"c","\u00c7":"c","\u00e7":"c","\u1e08":"c","\u1e09":"c","\u023b":"c","\u023c":"c","\u0187":"c","\u0188":"c","\u0255":"c","\u010e":"d","\u010f":"d","\u1e0a":"d","\u1e0b":"d","\u1e10":"d","\u1e11":"d","\u1e0c":"d","\u1e0d":"d","\u1e12":"d","\u1e13":"d","\u1e0e":"d","\u1e0f":"d","\u0110":"d","\u0111":"d","\u1d6d":"d","\u0189":"d","\u0256":"d","\u018a":"d","\u0257":"d","\u018b":"d","\u018c":"d","\u0221":"d","\u00f0":"d","\u00c9":"e","\u018f":"e","\u018e":"e","\u01dd":"e","\u00e9":"e","\u00c8":"e","\u00e8":"e","\u0114":"e","\u0115":"e","\u00ca":"e","\u00ea":"e","\u1ebe":"e","\u1ebf":"e","\u1ec0":"e","\u1ec1":"e","\u1ec4":"e","\u1ec5":"e","\u1ec2":"e","\u1ec3":"e","\u011a":"e","\u011b":"e","\u00cb":"e","\u00eb":"e","\u1ebc":"e","\u1ebd":"e","\u0116":"e","\u0117":"e","\u0228":"e","\u0229":"e","\u1e1c":"e","\u1e1d":"e","\u0118":"e","\u0119":"e","\u0112":"e","\u0113":"e","\u1e16":"e","\u1e17":"e","\u1e14":"e","\u1e15":"e","\u1eba":"e","\u1ebb":"e","\u0204":"e","\u0205":"e","\u0206":"e","\u0207":"e","\u1eb8":"e","\u1eb9":"e","\u1ec6":"e","\u1ec7":"e","\u1e18":"e","\u1e19":"e","\u1e1a":"e","\u1e1b":"e","\u0246":"e","\u0247":"e","\u025a":"e","\u025d":"e","\u1e1e":"f","\u1e1f":"f","\u1d6e":"f","\u0191":"f","\u0192":"f","\u01f4":"g","\u01f5":"g","\u011e":"g","\u011f":"g","\u011c":"g","\u011d":"g","\u01e6":"g","\u01e7":"g","\u0120":"g","\u0121":"g","\u0122":"g","\u0123":"g","\u1e20":"g","\u1e21":"g","\u01e4":"g","\u01e5":"g","\u0193":"g","\u0260":"g","\u0124":"h","\u0125":"h","\u021e":"h","\u021f":"h","\u1e26":"h","\u1e27":"h","\u1e22":"h","\u1e23":"h","\u1e28":"h","\u1e29":"h","\u1e24":"h","\u1e25":"h","\u1e2a":"h","\u1e2b":"h","\u0048":"h","\u0331":"h","\u1e96":"h","\u0126":"h","\u0127":"h","\u2c67":"h","\u2c68":"h","\u00cd":"i","\u00ed":"i","\u00cc":"i","\u00ec":"i","\u012c":"i","\u012d":"i","\u00ce":"i","\u00ee":"i","\u01cf":"i","\u01d0":"i","\u00cf":"i","\u00ef":"i","\u1e2e":"i","\u1e2f":"i","\u0128":"i","\u0129":"i","\u0130":"i","\u0069":"i","\u012e":"i","\u012f":"i","\u012a":"i","\u012b":"i","\u1ec8":"i","\u1ec9":"i","\u0208":"i","\u0209":"i","\u020a":"i","\u020b":"i","\u1eca":"i","\u1ecb":"i","\u1e2c":"i","\u1e2d":"i","\u0049":"i","\u0131":"i","\u0197":"i","\u0268":"i","\u0134":"j","\u0135":"j","\u004a":"j","\u030c":"j","\u01f0":"j","\u0237":"j","\u0248":"j","\u0249":"j","\u029d":"j","\u025f":"j","\u0284":"j","\u1e30":"k","\u1e31":"k","\u01e8":"k","\u01e9":"k","\u0136":"k","\u0137":"k","\u1e32":"k","\u1e33":"k","\u1e34":"k","\u1e35":"k","\u0198":"k","\u0199":"k","\u2c69":"k","\u2c6a":"k","\u0139":"a","\u013a":"l","\u013d":"l","\u013e":"l","\u013b":"l","\u013c":"l","\u1e36":"l","\u1e37":"l","\u1e38":"l","\u1e39":"l","\u1e3c":"l","\u1e3d":"l","\u1e3a":"l","\u1e3b":"l","\u0141":"l","\u0142":"l","\u0323":"l","\u013f":"l","\u0140":"l","\u023d":"l","\u019a":"l","\u2c60":"l","\u2c61":"l","\u2c62":"l","\u026b":"l","\u026c":"l","\u026d":"l","\u0234":"l","\u1e3e":"m","\u1e3f":"m","\u1e40":"m","\u1e41":"m","\u1e42":"m","\u1e43":"m","\u0271":"m","\u0143":"n","\u0144":"n","\u01f8":"n","\u01f9":"n","\u0147":"n","\u0148":"n","\u00d1":"n","\u00f1":"n","\u1e44":"n","\u1e45":"n","\u0145":"n","\u0146":"n","\u1e46":"n","\u1e47":"n","\u1e4a":"n","\u1e4b":"n","\u1e48":"n","\u1e49":"n","\u019d":"n","\u0272":"n","\u0220":"n","\u019e":"n","\u0273":"n","\u0235":"n","\u004e":"n","\u0308":"t","\u006e":"n","\u00d3":"o","\u00f3":"o","\u00d2":"o","\u00f2":"o","\u014e":"o","\u014f":"o","\u00d4":"o","\u00f4":"o","\u1ed0":"o","\u1ed1":"o","\u1ed2":"o","\u1ed3":"o","\u1ed6":"o","\u1ed7":"o","\u1ed4":"o","\u1ed5":"o","\u01d1":"o","\u01d2":"o","\u00d6":"o","\u00f6":"o","\u022a":"o","\u022b":"o","\u0150":"o","\u0151":"o","\u00d5":"o","\u00f5":"o","\u1e4c":"o","\u1e4d":"o","\u1e4e":"o","\u1e4f":"o","\u022c":"o","\u022d":"o","\u022e":"o","\u022f":"o","\u0230":"o","\u0231":"o","\u00d8":"o","\u00f8":"o","\u01fe":"o","\u01ff":"o","\u01ea":"o","\u01eb":"o","\u01ec":"o","\u01ed":"o","\u014c":"o","\u014d":"o","\u1e52":"o","\u1e53":"o","\u1e50":"o","\u1e51":"o","\u1ece":"o","\u1ecf":"o","\u020c":"o","\u020d":"o","\u020e":"o","\u020f":"o","\u01a0":"o","\u01a1":"o","\u1eda":"o","\u1edb":"o","\u1edc":"o","\u1edd":"o","\u1ee0":"o","\u1ee1":"o","\u1ede":"o","\u1edf":"o","\u1ee2":"o","\u1ee3":"o","\u1ecc":"o","\u1ecd":"o","\u1ed8":"o","\u1ed9":"o","\u019f":"o","\u0275":"o","\u1e54":"p","\u1e55":"p","\u1e56":"p","\u1e57":"p","\u2c63":"p","\u01a4":"p","\u01a5":"p","\u0050":"p","\u0303":"p","\u0070":"p","\u02a0":"q","\u024a":"q","\u024b":"q","\u0154":"r","\u0155":"r","\u0158":"r","\u0159":"r","\u1e58":"r","\u1e59":"r","\u0156":"r","\u0157":"r","\u0210":"r","\u0211":"r","\u0212":"r","\u0213":"r","\u1e5a":"r","\u1e5b":"r","\u1e5c":"r","\u1e5d":"r","\u1e5e":"r","\u1e5f":"r","\u024c":"r","\u024d":"r","\u1d72":"r","\u027c":"r","\u2c64":"r","\u027d":"r","\u027e":"r","\u1d73":"r","\u00df":"s","\u015a":"s","\u015b":"s","\u1e64":"s","\u1e65":"s","\u015c":"s","\u015d":"s","\u0160":"s","\u0161":"s","\u1e66":"s","\u1e67":"s","\u1e60":"s","\u1e61":"s","\u1e9b":"s","\u015e":"s","\u015f":"s","\u1e62":"s","\u1e63":"s","\u1e68":"s","\u1e69":"s","\u0218":"s","\u0219":"s","\u0282":"s","\u0053":"s","\u0329":"s","\u0073":"s","\u00de":"t","\u00fe":"t","\u0164":"t","\u0165":"t","\u0054":"t","\u1e97":"t","\u1e6a":"t","\u1e6b":"t","\u0162":"t","\u0163":"t","\u1e6c":"t","\u1e6d":"t","\u021a":"t","\u021b":"t","\u1e70":"t","\u1e71":"t","\u1e6e":"t","\u1e6f":"t","\u0166":"t","\u0167":"t","\u023e":"t","\u2c66":"t","\u1d75":"t","\u01ab":"t","\u01ac":"t","\u01ad":"t","\u01ae":"t","\u0288":"t","\u0236":"t","\u00da":"u","\u00fa":"u","\u00d9":"u","\u00f9":"u","\u016c":"u","\u016d":"u","\u00db":"u","\u00fb":"u","\u01d3":"u","\u01d4":"u","\u016e":"u","\u016f":"u","\u00dc":"u","\u00fc":"u","\u01d7":"u","\u01d8":"u","\u01db":"u","\u01dc":"u","\u01d9":"u","\u01da":"u","\u01d5":"u","\u01d6":"u","\u0170":"u","\u0171":"u","\u0168":"u","\u0169":"u","\u1e78":"u","\u1e79":"u","\u0172":"u","\u0173":"u","\u016a":"u","\u016b":"u","\u1e7a":"u","\u1e7b":"u","\u1ee6":"u","\u1ee7":"u","\u0214":"u","\u0215":"u","\u0216":"u","\u0217":"u","\u01af":"u","\u01b0":"u","\u1ee8":"u","\u1ee9":"u","\u1eea":"u","\u1eeb":"u","\u1eee":"u","\u1eef":"u","\u1eec":"u","\u1eed":"u","\u1ef0":"u","\u1ef1":"u","\u1ee4":"u","\u1ee5":"u","\u1e72":"u","\u1e73":"u","\u1e76":"u","\u1e77":"u","\u1e74":"u","\u1e75":"u","\u0244":"u","\u0289":"u","\u1e7c":"v","\u1e7d":"v","\u1e7e":"v","\u1e7f":"v","\u01b2":"v","\u028b":"v","\u1e82":"w","\u1e83":"w","\u1e80":"w","\u1e81":"w","\u0174":"w","\u0175":"w","\u0057":"w","\u030a":"y","\u1e98":"w","\u1e84":"w","\u1e85":"w","\u1e86":"w","\u1e87":"w","\u1e88":"w","\u1e89":"w","\u1e8c":"x","\u1e8d":"x","\u1e8a":"x","\u1e8b":"x","\u00dd":"y","\u00fd":"y","\u1ef2":"y","\u1ef3":"y","\u0176":"y","\u0177":"y","\u0059":"y","\u1e99":"y","\u0178":"y","\u00ff":"y","\u1ef8":"y","\u1ef9":"y","\u1e8e":"y","\u1e8f":"y","\u0232":"y","\u0233":"y","\u1ef6":"y","\u1ef7":"y","\u1ef4":"y","\u1ef5":"y","\u028f":"y","\u024e":"y","\u024f":"y","\u01b3":"y","\u01b4":"y","\u0179":"z","\u017a":"z","\u1e90":"z","\u1e91":"z","\u017d":"z","\u017e":"z","\u017b":"z","\u017c":"z","\u1e92":"z","\u1e93":"z","\u1e94":"z","\u1e95":"z","\u01b5":"z","\u01b6":"z","\u0224":"z","\u0225":"z","\u0290":"z","\u0291":"z","\u2c6b":"z","\u2c6c":"z","\u01ee":"z","\u01ef":"z","\u01ba":"z","\uff12":"2","\uff16":"6","\uff22":"B","\uff26":"F","\uff2a":"J","\uff2e":"N","\uff32":"R","\uff36":"V","\uff3a":"Z","\uff42":"b","\uff46":"f","\uff4a":"j","\uff4e":"n","\uff52":"r","\uff56":"v","\uff5a":"z","\uff11":"1","\uff15":"5","\uff19":"9","\uff21":"A","\uff25":"E","\uff29":"I","\uff2d":"M","\uff31":"Q","\uff35":"U","\uff39":"Y","\uff41":"a","\uff45":"e","\uff49":"i","\uff4d":"m","\uff51":"q","\uff55":"u","\uff59":"y","\uff10":"0","\uff14":"4","\uff18":"8","\uff24":"D","\uff28":"H","\uff2c":"L","\uff30":"P","\uff34":"T","\uff38":"X","\uff44":"d","\uff48":"h","\uff4c":"l","\uff50":"p","\uff54":"t","\uff58":"x","\uff13":"3","\uff17":"7","\uff23":"C","\uff27":"G","\uff2b":"K","\uff2f":"O","\uff33":"S","\uff37":"W","\uff43":"c","\uff47":"g","\uff4b":"k","\uff4f":"o","\uff53":"s","\uff57":"w"};B.Intl.accentFold=function(H){if(!H){return""}var F="";for(var G=0;G<H.length;G++){F+=E[H.charAt(G)]||H.charAt(G)}return F}})(xoopit,jQuery);xoopit.namespace("ajax","widgets","utils");(function(B,C){var A=function(I,F,H,K,D,E,J){var G={type:I,dataType:F,url:H,data:K,success:D,error:E};if(J!=undefined&&J!=null){G.timeout=J}return G};B.getJSON=function(F,H,D,E,G){return C.ajax(A("GET","json",F,H,D,E,G))};B.postJSON=function(F,H,D,E,G){return C.ajax(A("POST","json",F,H,D,E,G))}})(xoopit,$);xoopit.serviceLog=function(D,B,A,F,E){if(!!F!=!!E){throw"xoopit.serviceLog: if you give a protocol, you gotta give a host."}var C="/ajax/";if(F&&E){C=F+"://"+E+C}C+=(A===true?"alog":"log");C+="/"+D;xoopit.getJSON(C,B)};(function(D,E){var B=[];var A=0;var C=0;D._iframeLoadedCallback=function(F){D.log.info("Iframe loaded: ",F);if(F&&F.fId&&F.fId in B){for(var G in B[F.fId]){B[F.fId][G](F)}}};D.registerIframeCallback=function(F,G){if(!F||!G||typeof G!=="function"){throw new Error("invalid args")}if(F instanceof E){F=F.get(0)}if(!F.fId){F.fId=++A}if(!G.fnId){G.fnId=++C}B[F.fId]=B[F.fId]||{};B[F.fId][G.fnId]=G};D.unregisterIframeCallback=function(F,G){if(!F){return }if(F instanceof E){F=F.get(0)}if(F.fId&&F.fId in B){if(G){if(G.fnId&&G.fnId in B[F.fId]){delete B[F.fId][G.fnId]}}else{delete B[F.fId]}}}})(xoopit,jQuery);xoopit.ajax.didSucceed=function(A){if(A.status==xoopit.constants.ajax.RESULT_SUCCESS){return true}else{return false}};xoopit.Countdown=function(A){if(!A){throw"Missing options."}this._start_seconds=xoopit.reqval(A,"startSeconds");this._on_change=A.onChange;this._on_end=A.onEnd;this._on_start=A.onStart;this.setCurrentSeconds(this._start_seconds);this._interval=null};xoopit.Countdown.prototype.endNow=function(){var A=this;if(this._interval!=null){window.clearInterval(this._interval);this._interval=null}if(this._on_end){this._on_end(A)}};xoopit.Countdown.prototype.getCurrentMinutesAsString=function(){return(xoopit.Time.getMinutesStringFromInt(this._current_seconds))};xoopit.Countdown.prototype.getCurrentMinutesSecondsString=function(){return xoopit.Time.getMinutesSecondsStringFromInt(this._current_seconds)};xoopit.Countdown.prototype.getCurrentSeconds=function(){return this._current_seconds};xoopit.Countdown.prototype.getCurrentSecondsAsString=function(){return(xoopit.Time.getSecondsStringFromInt(this._current_seconds))};xoopit.Countdown.prototype._interval_callback=function(){var A=this;if(this._current_seconds>0){this._current_seconds--}if(this._on_change!=null){this._on_change(A)}if(this._current_seconds<=0){this.endNow()}};xoopit.Countdown.prototype.pause=function(){if(this._interval!=null){window.clearInterval(this._interval);this._interval=null}};xoopit.Countdown.prototype.resume=function(){if(this._interval!=null){return }this._interval=window.setInterval(function(){t._interval_callback()},1000)};xoopit.Countdown.prototype.setCurrentSeconds=function(A){this._current_seconds=A;return A};xoopit.Countdown.prototype.start=function(){var A=this;if(this._interval!=null){return }this._interval=window.setInterval(function(){A._interval_callback()},1000);if(this._on_start!=null){this._on_start(A)}};xoopit.cursorSetStyle=function(A){if(!A){A="default"}document.body.style.cursor=A};xoopit.el=function(A){return xoopit.getElement(A)};xoopit.commify=function(A){return typeof A==="number"&&A>1000?new String(A).split("").reverse().join("").replace(/(\d{3})(?=\d)(?!\d*\.)/g,"$1,").split("").reverse().join(""):A||0};xoopit.email=xoopit.email||{};xoopit.email.countValidAddressCSV=function(F){var C=0;if(!F){return 0}var E=F.split(",");var D=E.length;for(var B=0;B<D;B++){var A=jQuery.trim(E[B]);if(A!==""){if(xoopit.email.validateAddress(A)){C++}else{return -1}}}return C};xoopit.email.validateAddress=function(A){if(!A){return false}A=jQuery.trim(A);return/[A-Z0-9\._%+\-]+\@[A-Z0-9\.\-]+/i.test(A)};xoopit.email.validateAddresses=function(F){if(!F){false}var C=(typeof F==="string")?F.split(/[,\s]+/):F;var B=C.length;var E=0;for(var D=0;D<B;D++){var A=jQuery.trim(C[D]);if(xoopit.isBlank(A)){continue}if(!xoopit.email.validateAddress(A)){return false}E++}if(E<1){return false}return true};xoopit.escHTML=function(A){if(xoopit.isBlank(A)){return A}A=A.replace(/&/g,"&amp;");A=A.replace(/</g,"&lt;");A=A.replace(/>/g,"&gt;");A=A.replace(/"/g,"&quot;");return A};xoopit.escJS=function(A){if(xoopit.isBlank(A)){return A}A=A.replace(/\\/g,"\\\\");A=A.replace(/"/g,'\\"');A=A.replace(/'/g,"\\'");A=A.replace(/\n/g,"\\n");return A};xoopit.escURL=function(A){if(xoopit.isBlank(A)){return A}return encodeURIComponent(A)};xoopit.formatObjectTree=function(D,C,B){if(C==undefined||C==null){C=""}var A="";for(k in D){if((typeof D[k])=="object"){A+=C+k+":\n";A+=xoopit.formatObjectTree(D[k],C+"  ")}else{A+=C+k+"="+D[k]+"\n"}}return A};(function(B,A){B.timeOffset=0;B.Intl.setResources({DATETIME_MONTH_JANUARY:"January",DATETIME_MONTH_JANUARY_ABBR:"Jan",DATETIME_MONTH_FEBRUARY:"February",DATETIME_MONTH_FEBRUARY_ABBR:"Feb",DATETIME_MONTH_MARCH:"March",DATETIME_MONTH_MARCH_ABBR:"Mar",DATETIME_MONTH_APRIL:"April",DATETIME_MONTH_APRIL_ABBR:"Apr",DATETIME_MONTH_MAY:"May",DATETIME_MONTH_MAY_ABBR:"May",DATETIME_MONTH_JUNE:"June",DATETIME_MONTH_JUNE_ABBR:"Jun",DATETIME_MONTH_JULY:"July",DATETIME_MONTH_JULY_ABBR:"Jul",DATETIME_MONTH_AUGUST:"August",DATETIME_MONTH_AUGUST_ABBR:"Aug",DATETIME_MONTH_SEPTEMBER:"September",DATETIME_MONTH_SEPTEMBER_ABBR:"Sept",DATETIME_MONTH_OCTOBER:"October",DATETIME_MONTH_OCTOBER_ABBR:"Oct",DATETIME_MONTH_NOVEMBER:"November",DATETIME_MONTH_NOVEMBER_ABBR:"Nov",DATETIME_MONTH_DECEMBER:"December",DATETIME_MONTH_DECEMBER_ABBR:"Dec",DATETIME_DAY_SUNDAY:"Sunday",DATETIME_DAY_SUNDAY_ABBR:"Sun",DATETIME_DAY_MONDAY:"Monday",DATETIME_DAY_MONDAY_ABBR:"Mon",DATETIME_DAY_TUESDAY:"Tuesday",DATETIME_DAY_TUESDAY_ABBR:"Tue",DATETIME_DAY_WEDNESDAY:"Wednesday",DATETIME_DAY_WEDNESDAY_ABBR:"Wed",DATETIME_DAY_THURSDAY:"Thursday",DATETIME_DAY_THURSDAY_ABBR:"Thur",DATETIME_DAY_FRIDAY:"Friday",DATETIME_DAY_FRIDAY_ABBR:"Fri",DATETIME_DAY_SATURDAY:"Saturday",DATETIME_DAY_SATURDAY_ABBR:"Sat",DATETIME_AM:"am",DATETIME_PM:"pm",DATETIME_FORMAT_SINCE_SECONDS:"a moment ago",DATETIME_FORMAT_SINCE_MINUTE:"about a minute ago",DATETIME_FORMAT_SINCE_MINUTES:"{0} minutes ago",DATETIME_FORMAT_SINCE_HOUR:"about an hour ago",DATETIME_FORMAT_SINCE_HOURS:"{0} hour ago",DATETIME_FORMAT_SINCE_DAY:"a day ago",DATETIME_FORMAT_SINCE_DAYS:"{0} days ago",DATETIME_FORMAT_SINCE_WEEK:"a week ago",DATETIME_FORMAT_SINCE_WEEKS:"{0} weeks ago",DATETIME_FORMAT_SINCE_MONTH:"a month ago",DATETIME_FORMAT_SINCE_MONTHS:"{0} months ago",DATETIME_FORMAT_SINCE_YEAR:"a year ago",DATETIME_FORMAT_SINCE_YEARS:"{0} years ago",DATETIME_FORMAT_SHORTSINCE_SECONDS:"{0}s ago",DATETIME_FORMAT_SHORTSINCE_MINUTES:"{0}m ago",DATETIME_FORMAT_SHORTSINCE_HOURS:"{0}h ago",DATETIME_FORMAT_SHORTSINCE_DAYS:"{0}d ago",DATETIME_FORMAT_SHORTSINCE_WEEK:"1 week ago",DATETIME_FORMAT_SHORTSINCE_WEEKS:"{0} weeks ago",DATETIME_FORMAT_SHORTSINCE_MONTH:"1 month ago",DATETIME_FORMAT_SHORTSINCE_MONTHS:"{0} months ago",DATETIME_FORMAT_SHORTSINCE_YEAR:"1 year ago",DATETIME_FORMAT_SHORTSINCE_YEARS:"{0} years ago",DATETIME_FORMAT_LONGDATE:"%F %j, %Y, %h:%i %A",DATETIME_FORMAT_PRETTYDATE_TODAY:"%g:%i %A",DATETIME_FORMAT_PRETTYDATE_YESTERDAY:"%g:%i %A yesterday",DATETIME_FORMAT_PRETTYDATE_THISWEEK:"%g:%i%a %l",DATETIME_FORMAT_PRETTYDATE_THISMONTH:"%g:%i %A %F %j",DATETIME_FORMAT_PRETTYDATE_THISYEAR:"%F %j",DATETIME_FORMAT_PRETTYDATE:"%F %j, %Y",DATETIME_FORMAT_SHORTPRETTYDATE_TODAY:"%g:%i%a",DATETIME_FORMAT_SHORTPRETTYDATE_YESTERDAY:"%g:%i%a yesterday",DATETIME_FORMAT_SHORTPRETTYDATE_THISWEEK:"%g:%i%a %D",DATETIME_FORMAT_SHORTPRETTYDATE_THISMONTH:"%g:%i%a %M %j",DATETIME_FORMAT_SHORTPRETTYDATE_THISYEAR:"%M %j",DATETIME_FORMAT_SHORTPRETTYDATE:"%M %j, %Y",DATETIME_FORMAT_PRETTYTIME:"%h:%i %A",DATETIME_FORMAT_PRETTYMILLIS_TODAY:"%h:%i %A",DATETIME_FORMAT_PRETTYMILLIS_THISYEAR:"%M %j",DATETIME_FORMAT_PRETTYMILLIS:"%M %j, %Y"});var C=B.formatDate=(function(){var G=function(L){return L<10?"0"+L:L};var K=["DATETIME_MONTH_JANUARY","DATETIME_MONTH_FEBRUARY","DATETIME_MONTH_MARCH","DATETIME_MONTH_APRIL","DATETIME_MONTH_MAY","DATETIME_MONTH_JUNE","DATETIME_MONTH_JULY","DATETIME_MONTH_AUGUST","DATETIME_MONTH_SEPTEMBER","DATETIME_MONTH_OCTOBER","DATETIME_MONTH_NOVEMBER","DATETIME_MONTH_DECEMBER"],J={},H={};var I=["DATETIME_DAY_SUNDAY","DATETIME_DAY_MONDAY","DATETIME_DAY_TUESDAY","DATETIME_DAY_WEDNESDAY","DATETIME_DAY_THURSDAY","DATETIME_DAY_FRIDAY","DATETIME_DAY_SATURDAY"],F={},D={};var E={a:function(L){return L.getHours()<12?A("DATETIME_AM")||"am":A("DATETIME_PM")||"pm"},A:function(L){return E.a(L).toUpperCase()},G:function(L){return L.getHours()},g:function(M){var L=E.G(M);return L===0?12:L>12?L-12:L},H:function(L){return G(E.G(L))},h:function(L){return G(E.g(L))},i:function(L){return G(L.getMinutes())},s:function(L){return G(L.getSeconds())},n:function(L){return L.getMonth()+1},m:function(L){return G(E.n(L))},F:function(M,N){var L=M.getMonth();return J[L]||(J[L]=A(K[L]))},M:function(M,N){var L=M.getMonth();return H[L]||(H[L]=A(K[L]+"_ABBR"))},l:function(M,N){var L=M.getDay();return F[L]||(F[L]=A(I[L]))},D:function(M,N){var L=M.getDay();return D[L]||(D[L]=A(I[L]+"_ABBR"))},j:function(L){return L.getDate()},d:function(L){return G(E.j(L))},S:function(L){var L=E.j(L);switch(L){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd"}return"th"},Y:function(L){return L.getFullYear()},y:function(L){return E.Y(L).substring(2)},sa:function(L,M){return parseInt((M.getTime()-L.getTime())/1000,10)},ma:function(L,M){return parseInt(E.sa(L,M)/60,10)},ha:function(L,M){return parseInt(E.ma(L,M)/60,10)},da:function(L,M){return parseInt(E.ha(L,M)/24,10)},wa:function(L,M){return parseInt(E.da(L,M)/7,10)},Ma:function(L,M){return parseInt(E.wa(L,M)/4.35,10)},ya:function(L,M){return parseInt(E.da(L,M)/365,10)}};return function(S,L,N){var R=S.match(/(%(?:{\w+}|\w+))/g);if(R){for(var Q=0,O=R.length;Q<O;Q++){var M=R[Q];var T=(M.match(/\w+/))[0];if(T in E){var P=S.indexOf(M);if(P>=0){S=S.substring(0,P)+E[T](L,N)+S.substring(P+M.length)}}}}return S}})();B.convertToDate=function(E){if(!E&&typeof E!=="number"){return new Date()}else{if(E.constructor===Date){return E}else{if(typeof E==="number"){if(E<(new Date()).getTime()/100){E=E*1000}return new Date(E)}else{if(typeof E==="string"){var D=new Date(E);if(!isNaN(D)){return D}}}}}return new Date()};B.getTimesince=function(E,D){E=B.convertToDate(E);D=B.convertToDate(D);var F=parseInt((D.getTime()-E.getTime())/1000);return C(F<60?A("DATETIME_FORMAT_SINCE_SECONDS"):F<120?A("DATETIME_FORMAT_SINCE_MINUTES"):F<3600?A("DATETIME_FORMAT_SINCE_MINUTES","%{ma}"):F<7200?A("DATETIME_FORMAT_SINCE_HOUR"):F<86400?A("DATETIME_FORMAT_SINCE_HOURS","%{ha}"):F<172800?A("DATETIME_FORMAT_SINCE_DAY"):F<604800?A("DATETIME_FORMAT_SINCE_DAYS","%{da}"):F<1209600?A("DATETIME_FORMAT_SINCE_WEEK"):F<5261760?A("DATETIME_FORMAT_SINCE_WEEKS","%{wa}"):F<10523520?A("DATETIME_FORMAT_SINCE_MONTH"):F<31536000?A("DATETIME_FORMAT_SINCE_MONTHS","%{Ma}"):F<63072000?A("DATETIME_FORMAT_SINCE_YEAR"):A("DATETIME_FORMAT_SINCE_YEARS","%{ya}"),E,D)};B.getShortTimesince=function(E,D){E=B.convertToDate(E);D=B.convertToDate(D);var F=parseInt((D.getTime()-E.getTime())/1000);return C(F<60?A("DATETIME_FORMAT_SHORTSINCE_SECONDS","%{sa}"):F<3600?A("DATETIME_FORMAT_SHORTSINCE_MINUTES","%{ma}"):F<86400?A("DATETIME_FORMAT_SHORTSINCE_HOURS","%{ha}"):F<604800?A("DATETIME_FORMAT_SHORTSINCE_DAYS","%{da}"):F<1209600?A("DATETIME_FORMAT_SHORTSINCE_WEEK"):F<5261760?A("DATETIME_FORMAT_SHORTSINCE_WEEKS","%{wa}"):F<10523520?A("DATETIME_FORMAT_SHORTSINCE_MONTH"):F<31536000?A("DATETIME_FORMAT_SHORTSINCE_MONTHS","%{Ma}"):F<63072000?A("DATETIME_FORMAT_SHORTSINCE_YEAR"):A("DATETIME_FORMAT_SHORTSINCE_YEARS","%{ya}"),E,D)};B.formatLongDate=function(D){return C(A("DATETIME_FORMAT_LONGDATE"),B.convertToDate(D),new Date())};B.formatPrettyDate=function(E,D){E=B.convertToDate(E);D=B.convertToDate(D);var G=parseInt((D.getTime()-E.getTime())/1000);if(G<604800){if(D.getFullYear()===E.getFullYear()&&D.getMonth()===E.getMonth()&&D.getDate()===E.getDate()){return C(A("DATETIME_FORMAT_PRETTYDATE_TODAY"),E,D)}else{var F=new Date(D-86400000);if(F.getFullYear()===E.getFullYear()&&F.getMonth()===E.getMonth()&&F.getDate()===E.getDate()){return C(A("DATETIME_FORMAT_PRETTYDATE_YESTERDAY"),E)}else{return C(A("DATETIME_FORMAT_PRETTYDATE_THISWEEK"),E,D)}}}else{if(D.getFullYear()===E.getFullYear()){if(D.getMonth()===E.getMonth()){return C(A("DATETIME_FORMAT_PRETTYDATE_THISMONTH"),E,D)}else{return C(A("DATETIME_FORMAT_PRETTYDATE_THISYEAR"),E,D)}}else{return C(A("DATETIME_FORMAT_PRETTYDATE"),E,D)}}};B.formatShortPrettyDate=function(E,D){E=B.convertToDate(E);D=B.convertToDate(D);var G=parseInt((D.getTime()-E.getTime())/1000);if(G<604800){if(D.getDate()===E.getDate()){return C(A("DATETIME_FORMAT_SHORTPRETTYDATE_TODAY"),E,D)}else{var F=new Date(D-86400000);if(F.getDate()===E.getDate()){return C(A("DATETIME_FORMAT_SHORTPRETTYDATE_YESTERDAY"),E)}else{return C(A("DATETIME_FORMAT_SHORTPRETTYDATE_THISWEEK"),E,D)}}}else{if(D.getFullYear()===E.getFullYear()){if(D.getMonth()===E.getMonth()){return C(A("DATETIME_FORMAT_SHORTPRETTYDATE_THISMONTH"),E,D)}else{return C(A("DATETIME_FORMAT_SHORTPRETTYDATE_THISYEAR"),E,D)}}else{return C(A("DATETIME_FORMAT_SHORTPRETTYDATE"),E,D)}}};B.formatPrettyTime=function(D,F){var E=new Date();E.setHour(D);E.setMinutes(F);return C(A("DATETIME_FORMAT_PRETTYTIME"),E,new Date())};B.prettyDateFromMillis=function(E,D){E=B.convertToDate(E);D=B.convertToDate(D);if(D.getFullYear()===E.getFullYear()){if(D.getMonth()===E.getMonth()&&D.getDate()===E.getDate()){return C(A("DATETIME_FORMAT_PRETTYMILLIS_TODAY"),E,D)}else{return C(A("DATETIME_FORMAT_PRETTYMILLIS_THISYEAR"),E,D)}}else{return C(A("DATETIME_FORMAT_PRETTYMILLIS"),E,D)}}})(xoopit,xoopit.Intl.getMessage);xoopit.getElement=function(A){if(!A){return null}return document.getElementById(A)};xoopit.getScaledXYDimensions=function(C,B){var A={x:C.x,y:C.y};if(A.x>B.x){A.y=Math.floor(A.y*B.x/A.x);A.x=B.x}if(A.y>B.y){A.x=Math.floor(A.x*B.y/A.y);A.y=B.y}return A};xoopit.goUrl=function(A){if(A){window.location.href=A}};xoopit.imagePreload=function(C,B){if(C==null||C==""){return }if(xoopit._image_preload_cache_list===undefined||xoopit.$_image_preload_cache===undefined){xoopit._image_preload_cache_list=new Array();xoopit._image_preload_cache_count=0;xoopit.$_image_preload_cache=$("#"+xoopit.constants.images.PRELOAD_CACHE_DIV);if(xoopit.$_image_preload_cache.length<1){xoopit.$_image_preload_cache=$('<div id="'+xoopit.constants.images.PRELOAD_CACHE_DIV+'" style="display:none;"></div>');$("#content").append(xoopit.$_image_preload_cache)}}if(xoopit._image_preload_cache_list[C]==undefined){xoopit._image_preload_cache_count++;xoopit._image_preload_cache_list[C]=xoopit._image_preload_cache_count;var D=$('<img src="'+C+'" class="xoop_preload_image" data-preload-image-seq="'+xoopit._image_preload_cache_count+'" />');xoopit.$_image_preload_cache.append(D)}if(B!=undefined){var A=new Image();A.onload=B;A.src=C}};xoopit.ImageViewItemPrecache=function(A){this._image_fetcher_func=xoopit.reqval(A,"imageFetcher");this._image_preload_amount=xoopit.reqval(A,"imagePreload");this._image_timeout_seconds=xoopit.optval(A.imageTimeout,15);this._initial_image_preload_amount=xoopit.reqval(A,"initialImages");this._initial_viewitems_preload_amount=xoopit.reqval(A,"initialViewItems");this._viewitem_preload_increment=xoopit.reqval(A,"viewItemInc");this._viewitem_preload_amount=xoopit.reqval(A,"viewItemPreload");if(this._image_preload_amount>this._initial_viewitems_preload_amount){this._initial_viewitems_preload_amount=this._image_preload_amount}if(this._initial_viewitems_preload_amount<1){throw ("viewItemPreload cannot be less than 1.")}if(this._image_preload_amount<0){throw ("imagePreload cannot be less than 0.")}this._viewitem_precache_callback=null;if(xoopit.isSet(A.initialCallback)){this._viewitem_precache_callback=A.initialCallback}this.reset()};xoopit.ImageViewItemPrecache.LOAD_STATUS={WAITING:0,LOADING:1,READY:10,ERROR_INVALID_IMAGE:20,ERROR_TIMEOUT:21};xoopit.ImageViewItemPrecache.RECORD_STATUS={WAITING:0,PRELOADING:1,DONE:2};xoopit.ImageViewItemPrecache.prototype.fetchMoreViewItems=function(A){if(this._is_fetching==true){throw"Cannot call fetchMoreViewItems(), fetching is already in progress."}this._viewitem_precache_callback=A;this._viewitem_cache_target_size+=this._viewitem_preload_increment;this.update()};xoopit.ImageViewItemPrecache.prototype.getAllRecordsForEmail=function(A){return this._viewitem_precache_by_email[A]};xoopit.ImageViewItemPrecache.prototype.getAtIndex=function(A,B){if(A>this._viewitem_cache_read_index){if(xoopit.optval(B,true)==true){this._viewitem_cache_read_index=A;this.update()}}return this._viewitem_precache[A]};xoopit.ImageViewItemPrecache.prototype.getCacheSize=function(){return this._viewitem_precache.length};xoopit.ImageViewItemPrecache.prototype.getCurrent=function(){return this._viewitem_precache[this._viewitem_cache_read_index]};xoopit.ImageViewItemPrecache.prototype.getCurrentReadIndex=function(){return this._viewitem_cache_read_index};xoopit.ImageViewItemPrecache.prototype.getEmailAddressCounts=function(){return this._viewitem_email_addresses};xoopit.ImageViewItemPrecache.prototype.getImageViewItemsPreloaded=function(){return this._viewitem_cache_image_target_index};xoopit.ImageViewItemPrecache.prototype.getNext=function(C){var A=xoopit.optval(C,true);var B=this.getCurrent();if(A==true){while(B!=null&&(B.hasErrors||B.hasTimeouts)){this._viewitem_cache_read_index++;this.update();B=this.getCurrent()}}this._viewitem_cache_read_index++;this.update();return B};xoopit.ImageViewItemPrecache.prototype.preloadImageAtIndex=function(B,C){if(B<0&&B>=this._viewitem_precache.length){throw"Index "+B+" is out of cache range."}var A=this._viewitem_precache[B];var D=A.imageViewItem;if(A.recordStatus==xoopit.ImageViewItemPrecache.RECORD_STATUS.DONE){if(xoopit.isSet(C)){C(A)}return }A.recordStatus=xoopit.ImageViewItemPrecache.RECORD_STATUS.PRELOADING;if(xoopit.isSet(D.detailUrl)){A.detailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING;(function(H,F,G,I,E){F._detail_url_timeout=window.setTimeout(function(){F.detailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.ERROR_TIMEOUT;F.hasErrors=true;F.hasTimeouts=true},I);xoopit.imagePreload(G.detailUrl,function(){window.clearTimeout(F._detail_url_timeout);if(F.detailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING){F.detailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.READY}if(!(F.thumbnailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING||F.thumbnailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING)){F.recordStatus=xoopit.ImageViewItemPrecache.RECORD_STATUS.DONE;if(xoopit.isSet(E)){E(F)}}})})(this,A,D,this._image_timeout_seconds*1000,C)}else{A.detailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.ERROR_INVALID_IMAGE}if(xoopit.isSet(D.thumbnailUrl)){A.thumbnailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING;(function(H,F,G,I,E){F._thumbnail_url_timeout=window.setTimeout(function(){F.thumbnailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.ERROR_TIMEOUT;F.hasErrors=true;F.hasTimeouts=true},I);xoopit.imagePreload(G.thumbnailUrl,function(){window.clearTimeout(F._thumbnail_url_timeout);if(F.thumbnailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING){F.thumbnailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.READY}if(!(F.detailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING||F.detailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING)){F.recordStatus=xoopit.ImageViewItemPrecache.RECORD_STATUS.DONE;if(xoopit.isSet(E)){E(F)}}})})(this,A,D,this._image_timeout_seconds*1000,C)}else{A.thumbnailStatus=xoopit.ImageViewItemPrecache.LOAD_STATUS.ERROR_INVALID_IMAGE}if(!(A.detailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING||A.detailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING)&&!(A.thumbnailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING||A.thumbnailStatus==xoopit.ImageViewItemPrecache.LOAD_STATUS.LOADING)){A.recordStatus=xoopit.ImageViewItemPrecache.RECORD_STATUS.DONE;if(xoopit.isSet(C)){C(A)}}};xoopit.ImageViewItemPrecache.prototype.preloadImages=function(){var A=this._viewitem_cache_read_index+this._image_preload_amount;if(A<this._initial_image_preload_amount){A=this._initial_image_preload_amount}if(A>this._viewitem_cache_image_target_index){this._viewitem_cache_image_target_index=A}if(this._viewitem_cache_image_target_index>=this._viewitem_precache.length){this._viewitem_cache_image_target_index=this._viewitem_precache.length-1}while(this._viewitem_cache_image_load_index<=this._viewitem_cache_image_target_index){this.preloadImageAtIndex(this._viewitem_cache_image_load_index);this._viewitem_cache_image_load_index++}};xoopit.ImageViewItemPrecache.prototype.reset=function(){this._is_fetching=false;this._viewitem_precache=[];this._viewitem_precache_by_email={};this._viewitem_email_addresses={};this._viewitem_cache_read_index=0;this._viewitem_cache_target_size=this._initial_viewitems_preload_amount;this._viewitem_cache_image_load_index=0;this._viewitem_cache_image_target_index=this._initial_image_preload_amount;this._image_fetch_call_count=0;this.update()};xoopit.ImageViewItemPrecache.prototype.update=function(){var A=this;this._is_fetching=true;var D=this._viewitem_cache_read_index+this._viewitem_preload_amount;if(D>this._viewitem_cache_target_size){this._viewitem_cache_target_size=D}var B=this._viewitem_cache_target_size-this._viewitem_precache.length;if(B>0){if(B<this._viewitem_preload_increment){B=this._viewitem_preload_increment}for(var C=0;C<B;C++){this._image_fetch_call_count++;this._image_fetcher_func(function(G){A._image_fetch_call_count--;if(G){var E={imageViewItem:G,index:A._viewitem_precache.length,detailStatus:xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING,hasErrors:false,hasTimeouts:false,recordStatus:xoopit.ImageViewItemPrecache.RECORD_STATUS.WAITING,thumbnailStatus:xoopit.ImageViewItemPrecache.LOAD_STATUS.WAITING};A._viewitem_precache.push(E);var F=G.mailFromAddress;if(xoopit.isSet(F)){if(A._viewitem_precache_by_email[F]==undefined){A._viewitem_precache_by_email[F]=new Array()}A._viewitem_precache_by_email[F].push(E);if(A._viewitem_email_addresses[F]==undefined){A._viewitem_email_addresses[F]=0}A._viewitem_email_addresses[F]++}}var H=A._viewitem_cache_target_size-A._viewitem_precache.length;if(H<1){A.preloadImages();A._is_fetching=false;if(xoopit.isSet(A._viewitem_precache_callback)){A._viewitem_precache_callback(A)}}})}}else{this._is_fetching=false;this.preloadImages()}};xoopit.isBlank=function(A){if(A==undefined||A==null){return true}if(jQuery.trim(""+A).length<1){return true}return false};xoopit.keyboard={};xoopit.keyboard.bindKeypress=function(B,A,C){if(xoopit.isNotSet(B)||B.length<1){throw"No jQuery element(s) selected."}if(xoopit.isNotSet(A)||xoopit.isNotSet(C)){throw"Missing keycode and/or func."}(function(D,E,F){D.keydown(function(H){var G=xoopit.keyboard.getKeyCode(H);if(G&&G==E){F(H)}})})(B,A,C)};xoopit.keyboard.getKeyCode=function(A){var B=A.keyCode?A.keyCode:A.charCode;switch(B){case 63234:B=xoopit.constants.keycodes.ARROW_LEFT;break;case 63232:B=xoopit.constants.keycodes.ARROW_UP;break;case 63235:B=xoopit.constants.keycodes.ARROW_RIGHT;break;case 63233:B=xoopit.constants.keycodes.ARROW_DOWN;break}return B};xoopit.makeImageTag=function(D){var C=xoopit.reqval(D,"image");var B=xoopit.reqval(D,"maxHeight");var H=xoopit.reqval(D,"maxWidth");var A;var E;if((C.width==0||C.height==0)&&xoopit.isSet(D.defaultDimensions)){A=D.defaultDimensions.w;E=D.defaultDimensions.h}else{A=C.width;E=C.height}var G=xoopit.getScaledXYDimensions({x:A,y:E},{x:H,y:B});var F='<img src="'+C.src+'" width="'+G.x+'" height="'+G.y+'" ';if(D.style!=undefined){F=+D.style+" "}F+="/>";return F};xoopit.numberToAZLetter=function(B){var A=Math.floor(xoopit.optval(B,0));if(A<1||A>26){return""}return String.fromCharCode(A+64)};xoopit.QuickShare=function(A){var B=this;B.addressFieldId=xoopit.reqval(A,"addressFieldId");B.addressNoteId=xoopit.reqval(A,"addressNoteId");B.defaultNoteValue=xoopit.optval(A.defaultNoteValue,"");B.errorDiv=xoopit.reqval(A,"errorDiv");B.sendingDiv=xoopit.reqval(A,"sendingDiv");B.sentDiv=xoopit.reqval(A,"sentDiv");B.submitButtonDiv=xoopit.reqval(A,"submitButtonDiv");B.submitButtonId=xoopit.reqval(A,"submitButtonId");B._addressFieldJObj=xoopit.reqJElem(B.addressFieldId);B._addressNoteJObj=xoopit.reqJElem(B.addressNoteId);B._errorDivJObj=xoopit.reqJElem(B.errorDiv);B._sendingDivJObj=xoopit.reqJElem(B.sendingDiv);B._sentDivJObj=xoopit.reqJElem(B.sentDiv);B._submitButtonDivJObj=xoopit.reqJElem(B.submitButtonDiv);B._submitButtonJObj=xoopit.reqJElem(B.submitButtonId);B._submitButtonJObj.click(function(C){B.submit()});this._docId=null};xoopit.QuickShare.prototype.errorCallback=function(B){var A=this;A._errorDivJObj.fadeIn(xoopit.constants.animation.FADE_SPEED);A._sendingDivJObj.hide();A._sentDivJObj.hide();A._submitButtonDivJObj.show()};xoopit.QuickShare.prototype.getDocId=function(){return(this._docId)};xoopit.QuickShare.prototype.setDocId=function(A){this._docId=A};xoopit.QuickShare.prototype.submitCallback=function(B){var A=this;A._errorDivJObj.hide();A._sendingDivJObj.hide();A._sentDivJObj.fadeIn(xoopit.constants.animation.FADE_SPEED);A._submitButtonDivJObj.show()};xoopit.QuickShare.prototype.submit=function(){var D=this;var C=D.getDocId();if(!C){alert("Sorry, it doesn't look like you selected something to share.");return }var A=D._addressFieldJObj[0].value;if(xoopit.isBlank(A)){alert("Please enter at least one valid email address.");return }if(!isValidEmailAddresses(A)){alert("Please enter valid email address(es).");return }var B=D._addressNoteJObj[0].value;if(xoopit.isBlank(B)||B==D.defaultNoteValue){B=""}D._errorDivJObj.hide();D._sendingDivJObj.fadeIn(xoopit.constants.animation.FADE_SPEED);D._sentDivJObj.hide();D._submitButtonDivJObj.hide();xoopit.postJSON(xoopit.constants.ajax.SHARE_BY_EMAIL_URL,{items:D.getDocId(),note:B,recipients:A,via:"email"},function(E){D.submitCallback(E)},function(E){D.errorCallback(E)},xoopit.constants.ajax.TIMEOUT)};xoopit.quickshareDocs=function(D){var F=D.docIdList instanceof Array?D.docIdList:[D.docIdList];if(!F){throw"Missing required option: docIdList"}var E=D.emailList instanceof Array?D.emailList:[D.emailList];if(!E){throw"Missing required option: emailList"}var C=null;if(D.errorCallback!=undefined){C=function(G){D.errorCallback(F,G)}}var A=null;if(D.successCallback!=undefined){A=function(G){D.successCallback(F,G)}}var B={items:F.join(";"),recipients:E.join(","),via:"email"};if(!xoopit.isBlank(D.note)){B.note=D.note}xoopit.postJSON(xoopit.constants.ajax.SHARE_BY_EMAIL_URL,B,A,C,xoopit.constants.ajax.TIMEOUT)};xoopit.setImageSrc=function(B,C){var A=xoopit.getElement(B);if(A){A.src=C}};xoopit.strTrunc=function(C,A,B){if(!C||A<1){return""}if(C.length>A){if(xoopit.optval(B,false)){return C.substring(0,A-3)+"..."}else{return C.substring(0,A)}}else{return C}};xoopit.Time=function(){};xoopit.Time.getMinutesStringFromInt=function(B){var C=B%60;var A=B-C;return""+A};xoopit.Time.getMinutesSecondsStringFromInt=function(A){return xoopit.Time.getMinutesStringFromInt(A)+":"+xoopit.Time.getSecondsStringFromInt(A)};xoopit.Time.getSecondsStringFromInt=function(A){var B=A%60;if(B>=10){return""+B}else{return"0"+B}};xoopit.urlSwapDocId=function(B,A){if(B==null){return null}return B.replace(/([a-fA-F0-9]+z){4}[a-fA-F0-9]+/,A)};xoopit.widgets.Autosuggest=function(){};xoopit.widgets.Autosuggest.add=function(B){if(!B){throw"Initialization error."}if(!B.elem||B.elem.length<1){return }var A=xoopit.contactList?xoopit.contactList:xoopit.constants.ajax.AUTOSUGGEST_URL;var C=function(G,F,I,D,H){if(!G){return null}var E;if(G.displayName){if(G.emailAddress){E='<span class="xoopit-name"><a title="'+xoopit.escHTML(G.emailAddress)+'">'+xoopit.escHTML(G.displayName)+'</a></span> <span class="xoopit-email">&lt;'+xoopit.escHTML(G.emailAddress)+"&gt;</span>"}else{E='<span class="xoopit-name">'+xoopit.escHTML(G.displayName)+" (no email)</span>"}}else{if(G.emailAddress){E='<span class="xoopit-name"><a title="'+xoopit.escHTML(G.emailAddress)+'">'+xoopit.escHTML(G.emailAddress)+"</a></span>"}else{E="---"}}return'<div class="xoopit-overflow">'+E+"</div>"};B.elem.autocomplete(A,{dataType:"json",delay:xoopit.constants.ajax.AUTOSUGGEST_DELAY,multiple:B.multiple||false,minChars:B.minChars,selectFirst:B.selectFirst,width:260,parse:function(H){if(!xoopit.ajax.didSucceed(H)||!H.result||!H.result.results){return[]}var I=H.result.results;var D=I.length;if(D<1){return[]}var G=[];for(var F=0;F<D;F++){var E={data:I[F],value:C(I[F],F+1,D,H.result.query),dataIndex:F,result:I[F].emailAddress||""};G.push(E)}return G},formatResult:B.formatResult||function(D){return D.emailAddress},formatItem:C,formatMatch:function(G,F,I){var D=[];if(G.displayName){var H=G.displayName.split(/\s+/);for(var E=0;E<H.length;E++){D.push(xoopit.Intl.accentFold(H[E]))}}if(G.emailAddress){D.push(G.emailAddress)}if(D.length<1){return null}else{return D}}});if(typeof B.onSelect==="function"){B.elem.bind("result",function(F,E,D){B.onSelect(E)})}return B.elem};xoopit.widgets.Autosuggest.onSelectGoPersonUrl=function(C,B){if(!C||!C.emailAddress){return }var D={email:C.emailAddress};if(B){D.typeFilter=B}var A=xoopit.utils.getPersonUrl(D);if(A){xoopit.goUrl(A)}};(function(){var A=function(B){var C=this;C._HINT_CLASS=B.hintClass||"hintText";C.$_field=B.$field;if(!C.$_field){throw new Error("Required arg: $field")}C._hintText=B.hintText;if(!C._hintText){throw new Error("Required arg: hintText")}C.$_field.blur(function(D){C.onBlur(D)});C.$_field.focus(function(D){C.onFocus(D)});C.onBlur(null)};xoopit.widgets.FieldHint=A;A.prototype.onBlur=function(C){var B=this;var D=jQuery.trim(B.$_field.val());if(xoopit.isBlank(D)||D==B._hintText){B.$_field.addClass(B._HINT_CLASS);setTimeout(function(){B.$_field.val(B._hintText)},0)}else{B.$_field.removeClass(B._HINT_CLASS)}};A.prototype.onFocus=function(B){this.$_field.removeClass(this._HINT_CLASS);var C=jQuery.trim(this.$_field.val());if(xoopit.isBlank(C)||C==this._hintText){this.$_field.val("")}else{}};A.prototype.reset=function(){this.$_field.val("");this.onBlur(null)}})();(function(B){var A=xoopit.utils;A.addGrowableTextarea=function(D){if(!D){throw"Missing options."}if(!D.target||!D.charWidth||!D.charHeight){return null}D.target.each(function(E,G){var H=B(this);var F={width:D.targetWidth,height:D.targetHeight};if(!F.width){F.width=H.width()}if(!F.height){F.height=H.height()}F.cols=F.width/D.charWidth;F.rows=F.height/D.charHeight;(function(I,N,P,J,O,M,L){var K=Math.floor(O-1);if(K<1){K=1}I.bind("keypress",function(){var U=I.val();var T=0;if(!U||U.length<1){T=1}else{var R=U.split(/\n/);var T=0;for(var Q=0;Q<R.length;Q++){T+=Math.floor(R[Q].length/J)+1}}if(T>K){K=T;var S=(K+1)*P;if(M&&M>0&&S>M){S=M}I.css("height",S).focus()}})})(H,D.charWidth,D.charHeight,F.cols,F.rows,D.targetMaxHeight)});return D.target};A.addHoverClass=function(E,D){E.bind("mouseenter",function(){B(this).addClass(D)}).bind("mouseleave",function(){B(this).removeClass(D)});return E};A.breakLongString=function(G,H,D){G=xoopit.optval(G,"");H=xoopit.optval(H,10);D=xoopit.optval(D,false);var E=[];while(G.length>H){var F=G.substring(0,H);if(D){F=xoopit.escHTML(F)}E.push(G.substring(0,H));G=G.substring(H)}if(G.length>0){if(D){G=xoopit.escHTML(G)}E.push(G)}if(E.length>0){return E.join("<wbr />")}return""};A.sendInvitations=function(D){var E={};E.recipients=(xoopit.reqval(D,"emailAddresses")).join(",");if(xoopit.isSet(D.note)&&!xoopit.isBlank(D.note)){E.note=D.note}if(!D.source){throw"sendInvitations needs source"}E.inviteSource=D.source;xoopit.getJSON(xoopit.constants.ajax.INVITES_URL,E,D.callback)};A.getPersonUrl=function(E){if(!E||!E.email){return null}if(!xoopit.email.validateAddress(E.email)){return null}var D="/person/"+E.email;if(E.typeFilter){D+="/"+E.typeFilter}return D};A.goWindowOpenerUrl=function(E,G){var D="status=1,toolbar=1,location=1,menubar=1,resizable=1,scrollbars=1,directories=1";if(!E||xoopit.isBlank(E)){return }if(window.opener){try{window.opener.location.href=E;window.opener.focus()}catch(F){if(G&&!G.closed){G.location.href=E}else{G=window.open(E,"xoopit",D)}G.focus()}}else{if(G&&!G.closed){G.location.href=E}else{G=window.open(E,"xoopit",D)}G.focus()}return G};A.trackAnalyticsAction=function(K,G,F,H,I){var E="/"+(G?G:"-")+"/"+(F?F:"-")+"/"+(H?H:"-");if(xoopit.isSet(I)){var J=[];for(k in I){J.push(k)}J.sort();var D=[];var M=[];for(var L=0;L<J.length;L++){D.push(xoopit.escURL(J[L])+"="+xoopit.escURL(I[J[L]]))}if(D.length>0){E+="?"+D.join("&")}}if(K&&K.length>0){A.trackAnalyticsUrl_GA(K,E)}A.trackAnalyticsUrl_Xoopit(E)};A.trackAnalyticsUrl_GA=function(G,D){if(!window._gat){xoopit.log.debug("trackAnalyticsUrl(): Cannot get _gat.");return }if(!A._ANALYTICS_TRACKERS){A._ANALYTICS_TRACKERS={}}var F=A._ANALYTICS_TRACKERS[G];if(!F){if(!xoopit.constants.analytics[G]||xoopit.isBlank(xoopit.constants.analytics[G].accountStr)){xoopit.log.debug("trackAnalyticsUrl(): No domain config.");return }var E=xoopit.constants.analytics[G];F=window._gat._getTracker(E.accountStr);if(!F){return }F._setDomainName(E.domainStr);A._ANALYTICS_TRACKERS[G]=F}F._trackPageview(D)};var C=[];A.trackAnalyticsUrl_Xoopit=function(D){C.push(D);if(C.length>=10){B.getJSON("/ajax/xa",{a:xoopit.toJson(C)});C=[]}if(C.length==1){setTimeout(function(){if(C.length>0){B.getJSON("/ajax/xa",{a:xoopit.toJson(C)});C=[]}},10000)}};A.ViewByQueryFactory={_VIEW_BY_MAP:{newest:{sort:"-rmm.base.sortableDate"},oldest:{sort:"+rmm.base.sortableDate"},email:{query:"xfs.document.schemas:rmm.attachment"},flickr:{query:"(rmm.image.remote_provider:Flickr OR rmm.album.remote_provider:Flickr)"},picasa:{query:"(rmm.image.remote_provider:Picasa OR rmm.album.remote_provider:Picasa)"},kodak:{query:"(rmm.image.remote_provider:Ofoto OR rmm.album.remote_provider:Ofoto)"},shutterfly:{query:"(rmm.image.remote_provider:Shutterfly OR rmm.album.remote_provider:Shutterfly)"}}};A.ViewByQueryFactory.getQuery=function(D){return xoopit.utils.ViewByQueryFactory._VIEW_BY_MAP[D]}})(jQuery);xoopit.utils.getThumbnailStyle=function(E,H,D){H=H||100;D=D||1;if(E.thumbnailWidth>E.thumbnailHeight){var C=H/D;var A=E.thumbnailHeight>C?C:E.thumbnailHeight;var G=Math.floor((H-A)/2);var F=Math.floor(((E.thumbnailWidth*A/E.thumbnailHeight)-H)/2)*-1;return"height:"+A+"px;top:"+G+"px;left:"+F+"px;"}else{var B=E.thumbnailWidth>H?H:E.thumbnailWidth;var G=Math.floor(((E.thumbnailHeight*B/E.thumbnailWidth)-(H*D))/2)*-1;var F=Math.floor((H-B)/2);return"width:"+B+"px;top:"+G+"px;left:"+F+"px;"}};xoopit.utils.downloadUrlWithIframe=function(A,C){C=C||"xoopit-dl-frame";var B=$("iframe#"+C);if(!B.length){B=$('<iframe id="'+C+'" style="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;visibility:hidden"/>').appendTo(document.body)}B.attr("src",A)};xoopit.utils.fallbackImage=function(A){if(A&&A.downloadUrl&&A.downloadUrl.indexOf("http")===0){return A.downloadUrl}if(A&&A.detailUrl&&A.detailUrl.indexOf("http")===0){return A.detailUrl}return xoopit.utils.makeAbsolute(A.thumbnailUrl)};xoopit.utils.makeAbsolute=function(A){return(A&&A.charAt(0)==="/")?window.location.protocol+"//y.myphotos.yahoo.com"+A:A};xoopit.utils.uniqid=function(A){A=A||"";return""+A+Math.floor(Math.random()*(2147483647)).toString(36)+Math.floor(Math.random()*(2147483647)).toString(36)};xoopit.utils.setFromTable=function(F,E){var B={};var C=[];for(var D=0;D<F.length;D++){if(F[D][E]){B[F[D][E]]=true}}for(var A in B){C.push(A)}return C};xoopit.canonicalizeTag=function(A){return(""+A||"").toLowerCase().replace(/^\s*|\s*$/g,"").replace(/\s+/g,"-")};xoopit.utils.isArray=function(A){return A&&typeof A==="object"&&typeof A.length==="number"&&!(A.propertyIsEnumerable("length"))};xoopit.listify=function(A){return(xoopit.utils.isArray(A)?A:[A])};xoopit.utils.subobject=function(B,A){return _f.reduce(A,{},function(C,D){C[D]=B[D];return C})};xoopit.utils.setsubobject=function(B,A){return xoopit.utils.subobject(B,_f.select(A,function(C){return C in B&&B[C]!==null}))};xoopit.utils.selectunsetkeys=function(A){return _f.select(_f.keys(A),function(B){return A[B]===undefined||A[B]===null})};xoopit.utils.clear=function(B,A){if(!A){A=_f.keys(B)}_f.each(A,function(C){delete B[C]});return B};xoopit.utils.clearunsetkeys=function(A){return xoopit.utils.clear(A,xoopit.utils.selectunsetkeys(A))};xoopit.utils.deepExtend=function(C,B){for(var A in B){if(!(A in C)||typeof (C[A])!=="object"||typeof (B[A])!=="object"){C[A]=B[A]}else{xoopit.utils.deepExtend(C[A],B[A])}}return C};xoopit.utils.extend=function(B,A){_f.each(A,function(C){B.push(C)});return B};xoopit.namespace("xoopit.utils.messages");xoopit.utils.messages={monthLong:{"en-US":["January","February","March","April","May","June","July","August","September","October","November","December"],"es-ES":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","setiembre","octubre","noviembre","diciembre"]},monthShort:{"en-US":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"es-ES":["ene","feb","mar","abr","may","jun","jul","ago","set","oct","nov","dic"]},dayLong:{"en-US":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"es-ES":["domingo","lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado"]},dayShort:{"en-US":["Sun","Mon","Tues","Wed","Thur","Fri","Sat"],"es-ES":["dom","lun","mar","mi\xE9","jue","vie","s\xE1b"]},viewitemTypes:{typeToNameSingular:{album:"album",file:"file",image:"photo",video:"video"},typeToNamePlural:{album:"albums",file:"files",image:"photos",video:"videos"}},weekdays:{"en-US":{thisWeek:"This week",today:"Today",yesterday:"Yesterday"},"es-ES":{thisWeek:"Esta semana",today:"Hoy",yesterday:"Ayer"}}};xoopit.utils.messages.monthMap={};(function(B){for(var A=0;A<B.length;A++){xoopit.utils.messages.monthMap[B[A]]=A}})(xoopit.utils.messages.monthLong["en-US"]);