(function(){if(window.jQuery){var _jQuery=window.jQuery}var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context)};if(window.$){var _$=window.$}window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}else{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)}else{this[0]=elem;this.length=1;return this}}else{selector=[]}}}else{return new jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}}return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector])},jquery:"1.2.4a",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;this.each(function(i){if(this==elem){ret=i}});return ret},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value==undefined){return this.length&&jQuery[type||"attr"](this[0],name)||undefined}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 !selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]))},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false},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}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=value.constructor==Array?value:[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.length?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==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length){data=jQuery.data(this[0],key)}return data==null&&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.prototype.init.prototype=jQuery.prototype;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)}}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==1){target=this;i=0}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){if(target===options[name]){continue}if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType){target[name]=jQuery.extend(deep,target[name],options[name])}else{if(options[name]!=undefined){target[name]=options[name]}}}}}return target};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;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&&/function/i.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.appendChild(script);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){if(args){if(object.length==undefined){for(var name in object){if(callback.apply(object[name],args)===false){break}}}else{for(var i=0,length=object.length;i<length;i++){if(callback.apply(object[i],args)===false){break}}}}else{if(object.length==undefined){for(var name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var i=0,length=object.length,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;function color(elem){if(!jQuery.browser.safari){return false}var ret=document.defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save}if(name.match(/float/i)){name=styleFloat}if(!force&&elem.style&&elem.style[name]){ret=elem.style[name]}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i)){name="float"}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem)){ret=getComputedStyle.getPropertyValue(name)}else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode){stack.unshift(a)}for(var i=0;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":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var 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 style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle}}}}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=elem.toString()}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 fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(fix[name]){if(value!=undefined){elem[fix[name]]=value}return elem[fix[name]]}else{if(jQuery.browser.msie&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}else{if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method")){return elem.getAttributeNode(name).nodeValue}else{if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem.setAttribute(name,""+value)}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem)){return elem.getAttribute(name,2)}return elem.getAttribute(name)}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()});if(value!=undefined){elem[name]=value}return elem[name]}}}}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array.constructor!=Array){for(var i=0,length=array.length;i<length;i++){ret.push(array[i])}}else{ret=array.slice(0)}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){if(jQuery.browser.msie){for(var i=0;second[i];i++){if(second[i].nodeType!=8){first.push(second[i])}}}else{for(var i=0;second[i];i++){first.push(second[i])}}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)||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&&value!=undefined){if(value.constructor!=Array){value=[value]}ret=ret.concat(value)}}return 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,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});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")}});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;var re=quickChild;var 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=[];var 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&&(!elem||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!=undefined){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments)};handler.data=data;handler.guid=fn.guid}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered){return val}val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val});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(this.fix({type:type,target:elem}))}data[0].type=type;if(exclusive){data[0].exclusive=true}if(jQuery.isFunction(jQuery.data(elem,"handle"))){val=jQuery.data(elem,"handle").apply(elem,data)}if(!fn&&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;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}if(jQuery.browser.msie){event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null}return val},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};if(!event.target){event.target=event.srcElement||document}if(event.target.nodeType==3){event.target=originalEvent.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},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}arguments[0].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}arguments[0].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){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments)},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){if(this[0]){return jQuery.event.trigger(type,data,this[0],false,fn)}return undefined},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;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.apply(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:function(url,params,callback){if(jQuery.isFunction(url)){return this.bind("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=(new Date).getTime();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:{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){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="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&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){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 xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data){xml.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend){s.beforeSend(xml)}if(s.global){jQuery.event.trigger("ajaxSend",[xml,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xml,status)}complete();if(s.async){xml=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xml){xml.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xml.send(s.data)}catch(e){jQuery.handleError(s,xml,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xml,s])}}function complete(){if(s.complete){s.complete(xml,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xml,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xml},handleError:function(s,xml,status,e){if(s.error){s.error(xml,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xml,s,e])}},active:0,httpSuccess:function(r){try{return !r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined}catch(e){}return false},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined}catch(e){}return false},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}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(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(fn,fn2):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);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return jQuery.isFunction(opt.complete)&&opt.complete.apply(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.apply(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){return undefined}type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",array?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].apply(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:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.apply(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.apply(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=(new Date()).getTime();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=(new Date()).getTime();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&&jQuery.isFunction(this.options.complete)){this.options.complete.apply(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.fx.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),fixed=jQuery.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&&jQuery.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(jQuery.css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&jQuery.css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.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)||0;top+=parseInt(t)||0}return results};jQuery.each(["Height","Width"],function(i,name){var tl=name=="Height"?"Top":"Left",br=name=="Height"?"Bottom":"Right";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 num(elem,prop){elem=elem.jquery?elem[0]:elem;return elem&&parseInt(jQuery.curCSS(elem,prop,true))||0}})();var Blog={};Blog.DATE_DB="yyyy-M-dd hh:mm";Blog.DATE_HUMAN="dddd, MMMM d, yyyy hh:mm";Blog.SITE_PATH="/";Blog.get=function(A){return document.getElementById(A)};Blog.tabs={tabEvent:function(C,B,A){B=B?B:"mouseover";$(C).tabs({event:B,fxShow:{height:"show",opacity:"show"},remote:true}).find("a").click(A?A:function(){return false})},tab:function(B,A){$(B).tabs({fxShow:{height:"show",opacity:"show"},remote:true}).find("a").click(A?A:function(){return false})}};Blog.string={humanizeId:function(A){if(A&&typeof A==="string"){return Blog.string.removeAcents(A).replace(/[^\w0-9\-]/g,"-")}},removeAcents:function(B){var A=B.toLowerCase();re=/ /g;A=A.replace(re," ");re=/[Ã Ã¡Ã¢Ã£Ã¤]/g;A=A.replace(re,"a");re=/[Ã¨Ã©ÃªÃ«]/g;A=A.replace(re,"e");re=/[Ã¬Ã­Ã®Ã¯]/g;A=A.replace(re,"i");re=/[Ã²Ã³Ã´ÃµÃ¶]/g;A=A.replace(re,"o");re=/[Ã¹ÃºÃ»Ã¼]/g;A=A.replace(re,"u");re=/Ã§/g;A=A.replace(re,"c");re=/&/g;A=A.replace(re,"e");re=/_+/g;A=A.replace(re,"_");re=/_$/g;A=A.replace(re,"");re=/^_/g;A=A.replace(re,"");return A}};Blog.util={renderCommentForm:function(D,C,B){var A="__comment"+D;Blog.msg.loadingGif(A," ");$.get("action/main/comments/render-form/?id="+D,C,B||function(E){$(Blog.get(A)).html(E)})},renderPost:function(D,A,C,B){A=A||"#__post"+D;Blog.msg.loadingGif(A," ");$.get("action/main/posts/render/?id="+D,C,B||function(E){$(A).html(E)})},renderComments:function(D,A,C,B){A=A||"#__comments"+D;Blog.msg.loadingGif(A," ");$.get("action/main/comments/render/?id="+D,C,B||function(E){$(A).html(E)})},renderSearch:function(D,A,C,B){A=A||"#__search";Blog.msg.loadingGif(A,"Searching...");$.get("action/main/search/render/?q="+D,C,B||function(E){$(A).html(E)})},defaultValue:function(B,A){$(B).focus(function(){if(this.value==A){this.value=""}}).blur(function(){if(!this.value){this.value=A}})},inputBgImg:function(B,A){$(B).css({background:"url("+A+") no-repeat 2px 2px",padding:"2px 2px 2px 20px",border:"1px #7F9DB9 solid"})},editor:function(A){A=$.extend({mode:"exact",elements:"elm1",theme:"advanced",plugins:"safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",width:"650",height:"600",valid_elements:"*[*]",invalid_elements:"script,object,applet,iframe",remove_linebreaks:false,apply_source_formatting:false,remove_trailing_nbsp:true,convert_newlines_to_brs:false,theme_advanced_buttons1:"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",theme_advanced_buttons2:"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",theme_advanced_buttons3:"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",theme_advanced_buttons4:"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_resizing:true,content_css:Blog.SITE_PATH+"css/build/eduardolundgren.min.css"},A||{});tinyMCE.init(A)},populateSelect:function(D,B,E){E=E||{};var A=E.value||"id";var C=E.text||"name";$(D).get(0).length=0;$(B).each(function(F,G){$(D).append(["<option value='",G[A],"'>",G[C],"</option>"].join(""))})},redirect:function(A){window.location.href=A}};Blog.ajax={req:function(E,B,D,C,A){$.getJSON(["action/",E,"/",B,"/",D,"/"].join(""),C,function(F){if(A){A.apply(A,[F])}})},save:function(D,B,C,A){Blog.ajax.req(D,B,"save",C,A)},del:function(D,B,C,A){Blog.ajax.req(D,B,"delete",C,A)}};Blog.msg={timer:0,show:function(B,C){$("#label-messages").css({display:"block"}).removeClass().addClass(B).html(C).click(function(){$(this).hide("slow")});var A=arguments[2]!==undefined?arguments[2]:true;if(A){Blog.msg.hideDelay()}},success:function(){Blog.msg.show("success","Your request processed successfully.")},error:function(){Blog.msg.show("error","An unexpected system error occurred.")},alert:function(A){Blog.msg.show("alert",A,arguments[1])},hide:function(){$("#label-messages").hide("slow")},hideDelay:function(A){clearInterval(Blog.msg.timer);Blog.msg.timer=setInterval(function(){clearInterval(Blog.msg.timer);$("#label-messages").hide("slow")},A?A:5000)},loading:function(){Blog.msg.alert("Loading...",arguments[0])},loadingGif:function(D,C,A){var B=$("<div>").css({"padding-top":"6px","height":"32px","display":"block"}).html(C||" Loading...");var E=$("<div>").css({display:"block"}).addClass(A||"loading-label").append(B);$(D).empty().append(E)}};Blog.redirect=function(A){location.href=A};Blog.keys={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,DEL:46,ESC:27,SHIFT:16};Blog.cache={};Blog.cache.json={};Blog.ext={};Blog.ext.combo={};(function(E){E.ui=E.ui||{};E.extend(E.ui,{plugin:{add:function(I,C,A){var B=E.ui[I].prototype;for(var J in A){B.plugins[J]=B.plugins[J]||[];B.plugins[J].push([C,A[J]])}},call:function(J,I,B){var A=J.plugins[I];if(!A){return }for(var C=0;C<A.length;C++){if(J.options[A[C][0]]){A[C][1].apply(J.element,B)}}}},cssCache:{},css:function(C){if(E.ui.cssCache[C]){return E.ui.cssCache[C]}var B=E('<div class="ui-resizable-gen">').addClass(C).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");E.ui.cssCache[C]=!!((!/auto|default/.test(B.css("cursor"))||(/^[1-9]/).test(B.css("height"))||(/^[1-9]/).test(B.css("width"))||!(/none/).test(B.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(B.css("backgroundColor"))));try{E("body").get(0).removeChild(B.get(0))}catch(A){}return E.ui.cssCache[C]},disableSelection:function(A){A.unselectable="on";A.onselectstart=function(){return false};if(A.style){A.style.MozUserSelect="none"}},enableSelection:function(A){A.unselectable="off";A.onselectstart=function(){return true};if(A.style){A.style.MozUserSelect=""}},hasScroll:function(A,C){var H=/top/.test(C||"top")?"scrollTop":"scrollLeft",B=false;if(A[H]>0){return true}A[H]=1;B=A[H]>0?true:false;A[H]=0;return B}});E.each(["Left","Top"],function(A,B){if(!E.fn["scroll"+B]){E.fn["scroll"+B]=function(C){return C!=undefined?this.each(function(){this==window||this==document?window.scrollTo(B=="Left"?C:E(window)["scrollLeft"](),B=="Top"?C:E(window)["scrollTop"]()):this["scroll"+B]=C}):this[0]==window||this[0]==document?self[(B=="Left"?"pageXOffset":"pageYOffset")]||E.boxModel&&document.documentElement["scroll"+B]||document.body["scroll"+B]:this[0]["scroll"+B]}}});var F=E.fn.remove;E.fn.extend({position:function(){var A=this.offset();var B=this.offsetParent();var C=B.offset();return{top:A.top-D(this[0],"marginTop")-C.top-D(B,"borderTopWidth"),left:A.left-D(this[0],"marginLeft")-C.left-D(B,"borderLeftWidth")}},offsetParent:function(){var A=this[0].offsetParent;while(A&&(!/^body|html$/i.test(A.tagName)&&E.css(A,"position")=="static")){A=A.offsetParent}return E(A)},mouseInteraction:function(A){return this.each(function(){new E.ui.mouseInteraction(this,A)})},removeMouseInteraction:function(A){return this.each(function(){if(E.data(this,"ui-mouse")){E.data(this,"ui-mouse").destroy()}})},remove:function(){jQuery("*",this).add(this).trigger("remove");return F.apply(this,arguments)}});function D(B,A){return parseInt(E.curCSS(B.jquery?B[0]:B,A,true))||0}E.ui.mouseInteraction=function(A,B){var C=this;this.element=A;E.data(this.element,"ui-mouse",this);this.options=E.extend({},B);E(A).bind("mousedown.draggable",function(){return C.click.apply(C,arguments)});if(E.browser.msie){E(A).attr("unselectable","on")}E(A).mouseup(function(){if(C.timer){clearInterval(C.timer)}})};E.extend(E.ui.mouseInteraction.prototype,{destroy:function(){E(this.element).unbind("mousedown.draggable")},trigger:function(){return this.click.apply(this,arguments)},click:function(A){if(A.which!=1||E.inArray(A.target.nodeName.toLowerCase(),this.options.dragPrevention||[])!=-1||(this.options.condition&&!this.options.condition.apply(this.options.executor||this,[A,this.element]))){return true}var B=this;var C=function(){B._MP={left:A.pageX,top:A.pageY};E(document).bind("mouseup.draggable",function(){return B.stop.apply(B,arguments)});E(document).bind("mousemove.draggable",function(){return B.drag.apply(B,arguments)});if(!B.initalized&&Math.abs(B._MP.left-A.pageX)>=B.options.distance||Math.abs(B._MP.top-A.pageY)>=B.options.distance){if(B.options.start){B.options.start.call(B.options.executor||B,A,B.element)}if(B.options.drag){B.options.drag.call(B.options.executor||B,A,this.element)}B.initialized=true}};if(this.options.delay){if(this.timer){clearInterval(this.timer)}this.timer=setTimeout(C,this.options.delay)}else{C()}return false},stop:function(B){var A=this.options;if(!this.initialized){return E(document).unbind("mouseup.draggable").unbind("mousemove.draggable")}if(this.options.stop){this.options.stop.call(this.options.executor||this,B,this.element)}E(document).unbind("mouseup.draggable").unbind("mousemove.draggable");this.initialized=false;return false},drag:function(B){var A=this.options;if(E.browser.msie&&!B.button){return this.stop.apply(this,[B])}if(!this.initialized&&(Math.abs(this._MP.left-B.pageX)>=A.distance||Math.abs(this._MP.top-B.pageY)>=A.distance)){if(this.options.start){this.options.start.call(this.options.executor||this,B,this.element)}this.initialized=true}else{if(!this.initialized){return false}}if(A.drag){A.drag.call(this.options.executor||this,B,this.element)}return false}})})(jQuery);(function(B){B.fn.extend({draggable:function(A){var D=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof A=="string"){var C=B.data(this,"draggable");if(C){C[A].apply(C,D)}}else{if(!B.data(this,"draggable")){new B.ui.draggable(this,A)}}})}});B.ui.draggable=function(F,G){var H=this;this.element=B(F);B.data(F,"draggable",this);this.element.addClass("ui-draggable");this.options=B.extend({},G);var A=this.options;B.extend(A,{helper:A.ghosting==true?"clone":(A.helper||"original"),handle:A.handle?(B(A.handle,F)[0]?B(A.handle,F):this.element):this.element,appendTo:A.appendTo||"parent"});B(F).bind("setData.draggable",function(D,E,C){H.options[E]=C}).bind("getData.draggable",function(C,D){return H.options[D]});B(A.handle).mouseInteraction({executor:this,delay:A.delay,distance:A.distance||1,dragPrevention:A.cancel||A.cancel===""?A.cancel.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(C){return !(C.target.className.indexOf("ui-resizable-handle")!=-1||this.options.disabled)}});if(A.helper=="original"&&(this.element.css("position")=="static"||this.element.css("position")=="")){this.element.css("position","relative")}if(A.cursorAt&&A.cursorAt.constructor==Array){A.cursorAt={left:A.cursorAt[0],top:A.cursorAt[1]}}};B.extend(B.ui.draggable.prototype,{plugins:{},ui:function(A){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,instance:this,options:this.options,element:this.element}},propagate:function(A,D){B.ui.plugin.call(this,A,[D,this.ui()]);return this.element.triggerHandler(A=="drag"?A:"drag"+A,[D,this.ui()],this.options[A])},destroy:function(){if(!B.data(this.element[0],"draggable")){return }this.options.handle.removeMouseInteraction();this.element.removeClass("ui-draggable ui-draggable-disabled").removeData("draggable").unbind(".draggable")},enable:function(){this.element.removeClass("ui-draggable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-draggable-disabled");this.options.disabled=true},setContrains:function(H,G,A,F){this.minLeft=H;this.maxLeft=G;this.minTop=A;this.maxTop=F;this.constrainsSet=true},checkConstrains:function(){if(!this.constrainsSet){return }if(this.position.left<this.minLeft){this.position.left=this.minLeft}if(this.position.left>this.maxLeft-this.helperProportions.width){this.position.left=this.maxLeft-this.helperProportions.width}if(this.position.top<this.minTop){this.position.top=this.minTop}if(this.position.top>this.maxTop-this.helperProportions.height){this.position.top=this.maxTop-this.helperProportions.height}},recallOffset:function(A){var E={left:this.elementOffset.left-this.offsetParentOffset.left,top:this.elementOffset.top-this.offsetParentOffset.top};var F=this.helper.css("position")=="relative";this.originalPosition={left:(F?parseInt(this.helper.css("left"),10)||0:E.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)),top:(F?parseInt(this.helper.css("top"),10)||0:E.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop))};this.offset={left:this._pageX-this.originalPosition.left,top:this._pageY-this.originalPosition.top}},start:function(F){var A=this.options;if(B.ui.ddmanager){B.ui.ddmanager.current=this}this.helper=typeof A.helper=="function"?B(A.helper.apply(this.element[0],[F])):(A.helper=="clone"?this.element.clone().appendTo((A.appendTo=="parent"?this.element[0].parentNode:A.appendTo)):this.element);if(this.helper[0]!=this.element[0]){this.helper.css("position","absolute")}if(!this.helper.parents("body").length){this.helper.appendTo((A.appendTo=="parent"?this.element[0].parentNode:A.appendTo))}this.offsetParent=(function(C){while(C){if(C.style&&(/(absolute|relative|fixed)/).test(B.css(C,"position"))){return B(C)}C=C.parentNode?C.parentNode:null}return B("body")})(this.helper[0].parentNode);this.elementOffset=this.element.offset();this.offsetParentOffset=this.offsetParent.offset();var G={left:this.elementOffset.left-this.offsetParentOffset.left,top:this.elementOffset.top-this.offsetParentOffset.top};this._pageX=F.pageX;this._pageY=F.pageY;this.clickOffset={left:F.pageX-this.elementOffset.left,top:F.pageY-this.elementOffset.top};var H=this.helper.css("position")=="relative";this.originalPosition={left:(H?parseInt(this.helper.css("left"),10)||0:G.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)),top:(H?parseInt(this.helper.css("top"),10)||0:G.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop))};if(this.element.css("position")=="fixed"){this.originalPosition.top-=this.offsetParent[0]==document.body?B(document).scrollTop():this.offsetParent[0].scrollTop;this.originalPosition.left-=this.offsetParent[0]==document.body?B(document).scrollLeft():this.offsetParent[0].scrollLeft}this.offset={left:F.pageX-this.originalPosition.left,top:F.pageY-this.originalPosition.top};if(this.element[0]!=this.helper[0]){this.offset.left+=parseInt(this.element.css("marginLeft"),10)||0;this.offset.top+=parseInt(this.element.css("marginTop"),10)||0}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(B.ui.ddmanager&&!A.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,F)}if(A.cursorAt){if(A.cursorAt.top!=undefined||A.cursorAt.bottom!=undefined){this.offset.top-=this.clickOffset.top-(A.cursorAt.top!=undefined?A.cursorAt.top:(this.helperProportions.height-A.cursorAt.bottom));this.clickOffset.top=(A.cursorAt.top!=undefined?A.cursorAt.top:(this.helperProportions.height-A.cursorAt.bottom))}if(A.cursorAt.left!=undefined||A.cursorAt.right!=undefined){this.offset.left-=this.clickOffset.left-(A.cursorAt.left!=undefined?A.cursorAt.left:(this.helperProportions.width-A.cursorAt.right));this.clickOffset.left=(A.cursorAt.left!=undefined?A.cursorAt.left:(this.helperProportions.width-A.cursorAt.right))}}return false},clear:function(){if(B.ui.ddmanager){B.ui.ddmanager.current=null}this.helper=null},stop:function(A){if(B.ui.ddmanager&&!this.options.dropBehaviour){B.ui.ddmanager.drop(this,A)}this.propagate("stop",A);if(this.cancelHelperRemoval){return false}if(this.options.helper!="original"){this.helper.remove()}this.clear();return false},drag:function(A){this.position={top:A.pageY-this.offset.top,left:A.pageX-this.offset.left};this.positionAbs={left:A.pageX-this.clickOffset.left,top:A.pageY-this.clickOffset.top};this.checkConstrains();this.position=this.propagate("drag",A)||this.position;this.checkConstrains();B(this.helper).css({left:this.position.left+"px",top:this.position.top+"px"});if(B.ui.ddmanager){B.ui.ddmanager.drag(this,A)}return false}});B.ui.plugin.add("draggable","cursor",{start:function(A,E){var F=B("body");if(F.css("cursor")){E.options._cursor=F.css("cursor")}F.css("cursor",E.options.cursor)},stop:function(A,D){if(D.options._cursor){B("body").css("cursor",D.options._cursor)}}});B.ui.plugin.add("draggable","zIndex",{start:function(A,E){var F=B(E.helper);if(F.css("zIndex")){E.options._zIndex=F.css("zIndex")}F.css("zIndex",E.options.zIndex)},stop:function(A,D){if(D.options._zIndex){B(D.helper).css("zIndex",D.options._zIndex)}}});B.ui.plugin.add("draggable","opacity",{start:function(A,E){var F=B(E.helper);if(F.css("opacity")){E.options._opacity=F.css("opacity")}F.css("opacity",E.options.opacity)},stop:function(A,D){if(D.options._opacity){B(D.helper).css("opacity",D.options._opacity)}}});B.ui.plugin.add("draggable","revert",{stop:function(A,F){var H=F.instance,G=B(H.helper);H.cancelHelperRemoval=true;B(F.helper).animate({left:H.originalPosition.left,top:H.originalPosition.top},parseInt(F.options.revert,10)||500,function(){if(F.options.helper!="original"){G.remove()}if(!G){H.clear()}})}});B.ui.plugin.add("draggable","iframeFix",{start:function(H,I){var A=I.options;if(I.instance.slowMode){return }if(A.iframeFix.constructor==Array){for(var J=0;J<A.iframeFix.length;J++){var G=B(A.iframeFix[J]).offset({border:false});B('<div class="DragDropIframeFix"" style="background: #fff;"></div>').css("width",B(A.iframeFix[J])[0].offsetWidth+"px").css("height",B(A.iframeFix[J])[0].offsetHeight+"px").css("position","absolute").css("opacity","0.001").css("z-index","1000").css("top",G.top+"px").css("left",G.left+"px").appendTo("body")}}else{B("iframe").each(function(){var C=B(this).offset({border:false});B('<div class="DragDropIframeFix" style="background: #fff;"></div>').css("width",this.offsetWidth+"px").css("height",this.offsetHeight+"px").css("position","absolute").css("opacity","0.001").css("z-index","1000").css("top",C.top+"px").css("left",C.left+"px").appendTo("body")})}},stop:function(A,D){if(D.options.iframeFix){B("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}}});B.ui.plugin.add("draggable","containment",{start:function(K,M){var I=M.options;var N=M.instance;if((I.containment.left!=undefined||I.containment.constructor==Array)&&!I._containment){return }if(!I._containment){I._containment=I.containment}if(I._containment=="parent"){I._containment=this[0].parentNode}if(I._containment=="document"){I.containment=[0,0,B(document).width(),(B(document).height()||document.body.parentNode.scrollHeight)]}else{var L=B(I._containment)[0];var J=B(I._containment).offset();I.containment=[J.left,J.top,J.left+(L.offsetWidth||L.scrollWidth),J.top+(L.offsetHeight||L.scrollHeight)]}var A=I.containment;M.instance.setContrains(A[0]-(N.offset.left-N.clickOffset.left),A[2]-(N.offset.left-N.clickOffset.left),A[1]-(N.offset.top-N.clickOffset.top),A[3]-(N.offset.top-N.clickOffset.top))}});B.ui.plugin.add("draggable","grid",{drag:function(G,H){var A=H.options;var I=H.instance.originalPosition.left+Math.round((G.pageX-H.instance._pageX)/A.grid[0])*A.grid[0];var J=H.instance.originalPosition.top+Math.round((G.pageY-H.instance._pageY)/A.grid[1])*A.grid[1];H.instance.position.left=I;H.instance.position.top=J}});B.ui.plugin.add("draggable","axis",{drag:function(E,F){var A=F.options;if(A.constraint){A.axis=A.constraint}switch(A.axis){case"x":F.instance.position.top=F.instance.originalPosition.top;break;case"y":F.instance.position.left=F.instance.originalPosition.left;break}}});B.ui.plugin.add("draggable","scroll",{start:function(E,F){var A=F.options;A.scrollSensitivity=A.scrollSensitivity||20;A.scrollSpeed=A.scrollSpeed||20;F.instance.overflowY=function(C){do{if(/auto|scroll/.test(C.css("overflow"))||(/auto|scroll/).test(C.css("overflow-y"))){return C}C=C.parent()}while(C[0].parentNode);return B(document)}(this);F.instance.overflowX=function(C){do{if(/auto|scroll/.test(C.css("overflow"))||(/auto|scroll/).test(C.css("overflow-x"))){return C}C=C.parent()}while(C[0].parentNode);return B(document)}(this)},drag:function(F,G){var A=G.options;var H=G.instance;if(H.overflowY[0]!=document&&H.overflowY[0].tagName!="HTML"){if(H.overflowY[0].offsetHeight-(G.position.top-H.overflowY[0].scrollTop+H.clickOffset.top)<A.scrollSensitivity){H.overflowY[0].scrollTop=H.overflowY[0].scrollTop+A.scrollSpeed}if((G.position.top-H.overflowY[0].scrollTop+H.clickOffset.top)<A.scrollSensitivity){H.overflowY[0].scrollTop=H.overflowY[0].scrollTop-A.scrollSpeed}}else{if(F.pageY-B(document).scrollTop()<A.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()-A.scrollSpeed)}if(B(window).height()-(F.pageY-B(document).scrollTop())<A.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()+A.scrollSpeed)}}if(H.overflowX[0]!=document&&H.overflowX[0].tagName!="HTML"){if(H.overflowX[0].offsetWidth-(G.position.left-H.overflowX[0].scrollLeft+H.clickOffset.left)<A.scrollSensitivity){H.overflowX[0].scrollLeft=H.overflowX[0].scrollLeft+A.scrollSpeed}if((G.position.top-H.overflowX[0].scrollLeft+H.clickOffset.left)<A.scrollSensitivity){H.overflowX[0].scrollLeft=H.overflowX[0].scrollLeft-A.scrollSpeed}}else{if(F.pageX-B(document).scrollLeft()<A.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()-A.scrollSpeed)}if(B(window).width()-(F.pageX-B(document).scrollLeft())<A.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()+A.scrollSpeed)}}G.instance.recallOffset(F)}});B.ui.plugin.add("draggable","snap",{start:function(A,D){D.instance.snapElements=[];B(D.options.snap===true?".ui-draggable":D.options.snap).each(function(){var C=B(this);var F=C.offset();if(this!=D.instance.element[0]){D.instance.snapElements.push({item:this,width:C.outerWidth(),height:C.outerHeight(),top:F.top,left:F.left})}})},drag:function(b,X){var Z=X.options.snapTolerance||20;var A=X.absolutePosition.left,R=A+X.instance.helperProportions.width,V=X.absolutePosition.top,W=V+X.instance.helperProportions.height;for(var c=X.instance.snapElements.length-1;c>=0;c--){var f=X.instance.snapElements[c].left,S=f+X.instance.snapElements[c].width,T=X.instance.snapElements[c].top,Y=T+X.instance.snapElements[c].height;if(!((f-Z<A&&A<S+Z&&T-Z<V&&V<Y+Z)||(f-Z<A&&A<S+Z&&T-Z<W&&W<Y+Z)||(f-Z<R&&R<S+Z&&T-Z<V&&V<Y+Z)||(f-Z<R&&R<S+Z&&T-Z<W&&W<Y+Z))){continue}if(X.options.snapMode!="inner"){var a=Math.abs(T-W)<=20;var U=Math.abs(Y-V)<=20;var d=Math.abs(f-R)<=20;var e=Math.abs(S-A)<=20;if(a){X.position.top=T-X.instance.offset.top+X.instance.clickOffset.top-X.instance.helperProportions.height}if(U){X.position.top=Y-X.instance.offset.top+X.instance.clickOffset.top}if(d){X.position.left=f-X.instance.offset.left+X.instance.clickOffset.left-X.instance.helperProportions.width}if(e){X.position.left=S-X.instance.offset.left+X.instance.clickOffset.left}}if(X.options.snapMode!="outer"){var a=Math.abs(T-V)<=20;var U=Math.abs(Y-W)<=20;var d=Math.abs(f-A)<=20;var e=Math.abs(S-R)<=20;if(a){X.position.top=T-X.instance.offset.top+X.instance.clickOffset.top}if(U){X.position.top=Y-X.instance.offset.top+X.instance.clickOffset.top-X.instance.helperProportions.height}if(d){X.position.left=f-X.instance.offset.left+X.instance.clickOffset.left}if(e){X.position.left=S-X.instance.offset.left+X.instance.clickOffset.left-X.instance.helperProportions.width}}}}});B.ui.plugin.add("draggable","connectToSortable",{start:function(A,D){D.instance.sortable=B.data(B(D.options.connectToSortable)[0],"sortable");D.instance.sortableOffset=D.instance.sortable.element.offset();D.instance.sortableOuterWidth=D.instance.sortable.element.outerWidth();D.instance.sortableOuterHeight=D.instance.sortable.element.outerHeight();if(D.instance.sortable.options.revert){D.instance.sortable.shouldRevert=true}},stop:function(A,E){var F=E.instance.sortable;if(F.isOver){F.isOver=0;E.instance.cancelHelperRemoval=true;F.cancelHelperRemoval=false;if(F.shouldRevert){F.options.revert=true}F.stop(A);F.options.helper="original"}},drag:function(A,G){var H=G.instance.sortable;G.instance.position.absolute=G.absolutePosition;if(H.intersectsWith.call(G.instance,{left:G.instance.sortableOffset.left,top:G.instance.sortableOffset.top,width:G.instance.sortableOuterWidth,height:G.instance.sortableOuterHeight})){if(!H.isOver){H.isOver=1;var J=H.options.placeholderElement?B(H.options.placeholderElement,B(H.options.items,H.element)).innerHeight():B(H.options.items,H.element).innerHeight();var I=H.options.placeholderElement?B(H.options.placeholderElement,B(H.options.items,H.element)).innerWidth():B(H.options.items,H.element).innerWidth();H.currentItem=B(this).clone().appendTo(H.element);H.options.helper=function(){return G.helper[0]};H.start(A);H.clickOffset.top=G.instance.clickOffset.top;H.clickOffset.left=G.instance.clickOffset.left;H.offset.left-=G.absolutePosition.left-H.position.absolute.left;H.offset.top-=G.absolutePosition.top-H.position.absolute.top;H.helperProportions={width:I,height:J};G.helper.animate({height:J,width:I},500);G.instance.propagate("toSortable",A)}if(H.currentItem){H.drag(A)}}else{if(H.isOver){H.isOver=0;H.cancelHelperRemoval=true;H.options.revert=false;H.stop(A);H.options.helper="original";H.currentItem.remove();H.placeholder.remove();G.helper.animate({height:this.innerHeight(),width:this.innerWidth()},500);G.instance.propagate("fromSortable",A)}}}})})(jQuery);(function(B){B.fn.extend({droppable:function(A){var D=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof A=="string"){var C=B.data(this,"droppable");if(C){C[A].apply(C,D)}}else{if(!B.data(this,"droppable")){new B.ui.droppable(this,A)}}})}});B.ui.droppable=function(G,I){var J=this;this.element=B(G);B.data(G,"droppable",this);this.element.addClass("ui-droppable");var A=this.options=I=B.extend({},B.ui.droppable.defaults,I);var H=A.accept;A=B.extend(A,{accept:A.accept&&A.accept.constructor==Function?A.accept:function(C){return B(C).is(H)}});B(G).bind("setData.droppable",function(D,E,C){A[E]=C}).bind("getData.droppable",function(C,D){return A[D]}).bind("remove",function(){J.destroy()});this.proportions={width:this.element.outerWidth(),height:this.element.outerHeight()};B.ui.ddmanager.droppables.push({item:this,over:0,out:1})};B.extend(B.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});B.extend(B.ui.droppable.prototype,{plugins:{},ui:function(A){return{instance:this,draggable:(A.currentItem||A.element),helper:A.helper,position:A.position,absolutePosition:A.positionAbs,options:this.options,element:this.element}},destroy:function(){var D=B.ui.ddmanager.droppables;for(var A=0;A<D.length;A++){if(D[A].item==this){D.splice(A,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},enable:function(){this.element.removeClass("ui-droppable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-droppable-disabled");this.options.disabled=true},over:function(A){var D=B.ui.ddmanager.current;if(!D||(D.currentItem||D.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(D.currentItem||D.element))){B.ui.plugin.call(this,"over",[A,this.ui(D)]);this.element.triggerHandler("dropover",[A,this.ui(D)],this.options.over)}},out:function(A){var D=B.ui.ddmanager.current;if(!D||(D.currentItem||D.element)[0]==this.element[0]){return }if(this.options.accept.call(this.element,(D.currentItem||D.element))){B.ui.plugin.call(this,"out",[A,this.ui(D)]);this.element.triggerHandler("dropout",[A,this.ui(D)],this.options.out)}},drop:function(F,G){var H=G||B.ui.ddmanager.current;if(!H||(H.currentItem||H.element)[0]==this.element[0]){return }var A=false;this.element.find(".ui-droppable").each(function(){var C=B.data(this,"droppable");if(C.options.greedy&&B.ui.intersect(H,{item:C,offset:C.element.offset()},C.options.tolerance)){A=true;return false}});if(A){return }if(this.options.accept.call(this.element,(H.currentItem||H.element))){B.ui.plugin.call(this,"drop",[F,this.ui(H)]);this.element.triggerHandler("drop",[F,this.ui(H)],this.options.drop)}},activate:function(A){var D=B.ui.ddmanager.current;B.ui.plugin.call(this,"activate",[A,this.ui(D)]);if(D){this.element.triggerHandler("dropactivate",[A,this.ui(D)],this.options.activate)}},deactivate:function(A){var D=B.ui.ddmanager.current;B.ui.plugin.call(this,"deactivate",[A,this.ui(D)]);if(D){this.element.triggerHandler("dropdeactivate",[A,this.ui(D)],this.options.deactivate)}}});B.ui.intersect=function(O,U,Q){if(!U.offset){return false}var A=(O.positionAbs||O.position.absolute).left,M=A+O.helperProportions.width,R=(O.positionAbs||O.position.absolute).top,S=R+O.helperProportions.height;var V=U.offset.left,N=V+U.item.proportions.width,P=U.offset.top,T=P+U.item.proportions.height;switch(Q){case"fit":if(!((S-(O.helperProportions.height/2)>P&&R<P)||(R<T&&S>T)||(M>V&&A<V)||(A<N&&M>N))){return false}if(S-(O.helperProportions.height/2)>P&&R<P){return 1}if(R<T&&S>T){return 2}if(M>V&&A<V){return 1}if(A<N&&M>N){return 2}break;case"intersect":return(V<A+(O.helperProportions.width/2)&&M-(O.helperProportions.width/2)<N&&P<R+(O.helperProportions.height/2)&&S-(O.helperProportions.height/2)<T);break;case"pointer":return(V<((O.positionAbs||O.position.absolute).left+O.clickOffset.left)&&((O.positionAbs||O.position.absolute).left+O.clickOffset.left)<N&&P<((O.positionAbs||O.position.absolute).top+O.clickOffset.top)&&((O.positionAbs||O.position.absolute).top+O.clickOffset.top)<T);break;case"touch":return((R>=P&&R<=T)||(S>=P&&S<=T)||(R<P&&S>T))&&((A>=V&&A<=N)||(M>=V&&M<=N)||(A<V&&M>N));break;default:return false;break}};B.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(H,A){var J=B.ui.ddmanager.droppables;var G=A?A.type:null;for(var I=0;I<J.length;I++){if(J[I].item.options.disabled||(H&&!J[I].item.options.accept.call(J[I].item.element,(H.currentItem||H.element)))){continue}J[I].offset=B(J[I].item.element).offset();J[I].item.proportions={width:J[I].item.element.outerWidth(),height:J[I].item.element.outerHeight()};if(G=="dragstart"){J[I].item.activate.call(J[I].item,A)}}},drop:function(D,A){B.each(B.ui.ddmanager.droppables,function(){if(!this.item.options.disabled&&B.ui.intersect(D,this,this.item.options.tolerance)){this.item.drop.call(this.item,A)}if(!this.item.options.disabled&&this.item.options.accept.call(this.item.element,(D.currentItem||D.element))){this.out=1;this.over=0;this.item.deactivate.call(this.item,A)}})},drag:function(D,A){if(D.options.refreshPositions){B.ui.ddmanager.prepareOffsets(D,A)}B.each(B.ui.ddmanager.droppables,function(){if(this.item.disabled||this.greedyChild){return }var G=B.ui.intersect(D,this,this.item.options.tolerance);var C=!G&&this.over==1?"out":(G&&this.over==0?"over":null);if(!C){return }var H=B.data(this.item.element[0],"droppable");if(H.options.greedy){this.item.element.parents(".ui-droppable:eq(0)").each(function(){var E=this;B.each(B.ui.ddmanager.droppables,function(){if(this.item.element[0]!=E){return }this[C]=0;this[C=="out"?"over":"out"]=1;this.greedyChild=(C=="over"?1:0);this.item[C=="out"?"over":"out"].call(this.item,A);return false})})}this[C]=1;this[C=="out"?"over":"out"]=0;this.item[C].call(this.item,A)})}};B.ui.plugin.add("droppable","activeClass",{activate:function(A,D){B(this).addClass(D.options.activeClass)},deactivate:function(A,D){B(this).removeClass(D.options.activeClass)},drop:function(A,D){B(this).removeClass(D.options.activeClass)}});B.ui.plugin.add("droppable","hoverClass",{over:function(A,D){B(this).addClass(D.options.hoverClass)},out:function(A,D){B(this).removeClass(D.options.hoverClass)},drop:function(A,D){B(this).removeClass(D.options.hoverClass)}})})(jQuery);(function(B){B.fn.extend({resizable:function(E,A){var F=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof E=="string"){var C=B.data(this,"resizable");if(C){C[E].apply(C,F)}}else{if(!B(this).is(".ui-resizable")){new B.ui.resizable(this,E)}}})}});B.ui.resizable=function(o,k){var c=this;this.element=B(o);B.data(o,"resizable",this);var Y=this.element.css("position");this.element.addClass("ui-resizable").css({position:/static/.test(Y)?"relative":Y});this.options=B.extend({preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autohide:false,knobHandles:false},k);this.options._aspectRatio=!!(this.options.aspectRatio);this.options.proxy=this.options.proxy||this.options.ghost?"proxy":null;this.options.proxy=this.options.proxy||this.options.animate?"proxy":null;this.options.knobHandles=this.options.knobHandles===true?"ui-resizable-knob-handle":this.options.knobHandles;B(o).bind("setData.resizable",function(E,C,D){c.options[C]=D}).bind("getData.resizable",function(D,C){return c.options[C]});var b=this.options;var h="1px solid #DEDEDE";b.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}};b.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"-4px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"-4px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"-4px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"-4px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"-4px",bottom:"-4px"},"ui-resizable-sw":{cursor:"sw-resize",left:"-4px",bottom:"-4px"},"ui-resizable-nw":{cursor:"nw-resize",left:"-4px",top:"-4px"},"ui-resizable-ne":{cursor:"ne-resize",right:"-4px",top:"-4px"}};if(!b.proxy&&(this.element.css("position")=="static"||this.element.css("position")==="")){this.element.css("position","relative")}b._nodeName=o.nodeName;if(b._nodeName.match(/textarea|input|select|button|img/i)){var s=this.element;if(/relative/.test(s.css("position"))&&B.browser.opera){s.css({position:"relative",top:"auto",left:"auto"})}s.wrap(B('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:s.css("position"),width:s.outerWidth(),height:s.outerHeight(),top:s.css("top"),left:s.css("left")}));var f=this.element;o=o.parentNode;this.element=B(o);this.element.css({marginLeft:f.css("marginLeft"),marginTop:f.css("marginTop"),marginRight:f.css("marginRight"),marginBottom:f.css("marginBottom")});f.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(B.browser.safari&&b.preventDefault){f.css("resize","none")}b.proportionallyResize=f.css({position:"static",zoom:1,display:"block"});this.element.css({margin:f.css("margin")});this._proportionallyResize()}if(!b.handles){b.handles=!B(".ui-resizable-handle",o).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(b.handles.constructor==String){if(b.handles=="all"){b.handles="n,e,s,w,se,sw,ne,nw"}var a=b.handles.split(",");b.handles={};b.zIndex=b.zIndex||1000;var j={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 X=0;X<a.length;X++){var W=jQuery.trim(a[X]),d=b.defaultTheme,l="ui-resizable-"+W,p=!B.ui.css(l)&&!b.knobHandles,Z=B.ui.css("ui-resizable-knob-handle"),A=B.extend(d[l],d["ui-resizable-handle"]),q=B.extend(b.knobTheme[l],!Z?b.knobTheme["ui-resizable-handle"]:{});var e=/sw|se|ne|nw/.test(W)?{zIndex:++b.zIndex}:{};var g=(p?j[W]:""),m=B(['<div class="ui-resizable-handle ',l,'" style="',g,j.handle,'"></div>'].join("")).css(e);b.handles[W]=".ui-resizable-"+W;this.element.append(m.css(p?A:{}).css(b.knobHandles?q:{}).addClass(b.knobHandles?"ui-resizable-knob-handle":"").addClass(b.knobHandles))}if(b.knobHandles){this.element.addClass("ui-resizable-knob").css(!B.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(D){D=D||this.element;for(var G in b.handles){if(b.handles[G].constructor==String){b.handles[G]=B(b.handles[G],o).show()}if(b.transparent){b.handles[G].css({opacity:0})}if(this.element.is(".ui-wrapper")&&b._nodeName.match(/textarea|input|select|button/i)){var F=B(b.handles[G],o),E=0;E=/sw|ne|nw|se|n|s/.test(G)?F.outerHeight():F.outerWidth();var C=["padding",/ne|nw|n/.test(G)?"Top":/se|sw|s/.test(G)?"Bottom":/^e$/.test(G)?"Right":"Left"].join("");if(!b.transparent){D.css(C,E)}this._proportionallyResize()}if(!B(b.handles[G]).length){continue}}};this._renderAxis(this.element);b._handles=B(".ui-resizable-handle",c.element);if(b.disableSelection){b._handles.each(function(C,D){B.ui.disableSelection(D)})}b._handles.mouseover(function(){if(!b.resizing){if(this.className){var C=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}c.axis=b.axis=C&&C[1]?C[1]:"se"}});if(b.autohide){b._handles.hide();B(c.element).addClass("ui-resizable-autohide").hover(function(){B(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){B(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this.element.mouseInteraction({executor:this,delay:0,distance:0,dragPrevention:["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(D){if(this.disabled){return false}for(var C in this.options.handles){if(B(this.options.handles[C])[0]==D.target){return true}}return false}})};B.extend(B.ui.resizable.prototype,{plugins:{},ui:function(){return{instance:this,axis:this.options.axis,options:this.options}},_renderProxy:function(){var I=this.element,A=this.options;this.elementOffset=I.offset();if(A.proxy){this.helper=this.helper||B('<div style="overflow:hidden;"></div>');var J=B.browser.msie&&B.browser.version<7,H=(J?1:0),G=(J?2:-1);this.helper.addClass(A.proxy).css({width:I.outerWidth()+G,height:I.outerHeight()+G,position:"absolute",left:this.elementOffset.left-H+"px",top:this.elementOffset.top-H+"px",zIndex:++A.zIndex});this.helper.appendTo("body");if(A.disableSelection){B.ui.disableSelection(this.helper.get(0))}}else{this.helper=I}},propagate:function(A,D){B.ui.plugin.call(this,A,[D,this.ui()]);this.element.triggerHandler(A=="resize"?A:["resize",A].join(""),[D,this.ui()],this.options[A])},destroy:function(){var A=this.element,E=A.children(".ui-resizable").get(0),F=function(C){B(C).removeClass("ui-resizable ui-resizable-disabled").removeMouseInteraction().removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};F(A);if(A.is(".ui-wrapper")&&E){A.parent().append(B(E).css({position:A.css("position"),width:A.outerWidth(),height:A.outerHeight(),top:A.css("top"),left:A.css("left")})).end().remove();F(E)}},enable:function(){this.element.removeClass("ui-resizable-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-resizable-disabled");this.disabled=true},start:function(R){var M=this.options,N=this.element.position(),A=this.element,S=function(C){return parseInt(C,10)||0},T=B.browser.msie&&B.browser.version<7;M.resizing=true;M.documentScroll={top:B(document).scrollTop(),left:B(document).scrollLeft()};if(A.is(".ui-draggable")||(/absolute/).test(A.css("position"))){var Q=B.browser.msie&&!M.containment&&(/absolute/).test(A.css("position"))&&!(/relative/).test(A.parent().css("position"));var P=Q?M.documentScroll.top:0,U=Q?M.documentScroll.left:0;A.css({position:"absolute",top:(N.top+P),left:(N.left+U)})}if(/relative/.test(A.css("position"))&&B.browser.opera){A.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var O=S(this.helper.css("left")),V=S(this.helper.css("top"));this.offset=this.helper.offset();this.position={left:O,top:V};this.size=M.proxy||T?{width:A.outerWidth(),height:A.outerHeight()}:{width:A.width(),height:A.height()};this.originalSize=M.proxy||T?{width:A.outerWidth(),height:A.outerHeight()}:{width:A.width(),height:A.height()};this.originalPosition={left:O,top:V};this.sizeDiff={width:A.outerWidth()-A.width(),height:A.outerHeight()-A.height()};this.originalMousePosition={left:R.pageX,top:R.pageY};M.aspectRatio=(typeof M.aspectRatio=="number")?M.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(M.preserveCursor){B("body").css("cursor",this.axis+"-resize")}this.propagate("start",R);return false},stop:function(Q){this.options.resizing=false;var U=this.options,R=function(C){return parseInt(C,10)||0},O=this;if(U.proxy){var V=U.proportionallyResize,N=V&&/textarea/i.test(V.get(0).nodeName),M=N&&B.ui.hasScroll(V.get(0),"left")?0:O.sizeDiff.height,S=N?0:O.sizeDiff.width;var A={width:(O.size.width-S),height:(O.size.height-M)},T=parseInt(O.element.css("left"),10)+(O.position.left-O.originalPosition.left),P=parseInt(O.element.css("top"),10)+(O.position.top-O.originalPosition.top);if(!U.animate){this.element.css(B.extend(A,{top:P,left:T}))}if(U.proxy&&!U.animate){this._proportionallyResize()}this.helper.remove()}if(U.preserveCursor){B("body").css("cursor","auto")}this.propagate("stop",Q);return false},drag:function(V){var A=this.helper,O=this.options,U={},R=this,Y=this.originalMousePosition,T=this.axis;var Q=(V.pageX-Y.left)||0,S=(V.pageY-Y.top)||0;var Z=this.change[T];if(!Z){return false}var W=Z.apply(this,[V,Q,S]),X=B.browser.msie&&B.browser.version<7,P=this.sizeDiff;if(O._aspectRatio||V.shiftKey){W=this._updateRatio(W,V)}W=this._respectSize(W,V);this.propagate("resize",V);A.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!O.proxy&&O.proportionallyResize){this._proportionallyResize()}this._updateCache(W);return false},_updateCache:function(D){var A=this.options;this.offset=this.helper.offset();if(D.left){this.position.left=D.left}if(D.top){this.position.top=D.top}if(D.height){this.size.height=D.height}if(D.width){this.size.width=D.width}},_updateRatio:function(J,I){var H=this.options,A=this.position,K=this.size,L=this.axis;if(J.height){J.width=Math.round(K.height/H.aspectRatio)}else{if(J.width){J.height=Math.round(K.width*H.aspectRatio)}}if(L=="sw"){J.left=A.left+(K.width-J.width);J.top=null}if(L=="nw"){J.top=A.top+(K.height-J.height);J.left=A.left+(K.width-J.width)}return J},_respectSize:function(a,Z){var c=this.helper,d=this.options,U=d._aspectRatio||Z.shiftKey,V=this.axis,S=a.width&&d.maxWidth&&d.maxWidth<a.width,Y=a.height&&d.maxHeight&&d.maxHeight<a.height,A=a.width&&d.minWidth&&d.minWidth>a.width,T=a.height&&d.minHeight&&d.minHeight>a.height;if(A){a.width=d.minWidth}if(T){a.height=d.minHeight}if(S){a.width=d.maxWidth}if(Y){a.height=d.maxHeight}var Q=this.originalPosition.left+this.originalSize.width,W=this.position.top+this.size.height;var b=/sw|nw|w/.test(V),R=/nw|ne|n/.test(V);if(A&&b){a.left=Q-d.minWidth}if(S&&b){a.left=Q-d.maxWidth}if(T&&R){a.top=W-d.minHeight}if(Y&&R){a.top=W-d.maxHeight}var X=!a.width&&!a.height;if(X&&!a.left&&a.top){a.top=null}else{if(X&&!a.top&&a.left){a.left=null}}return a},_proportionallyResize:function(){var A=this.options;if(!A.proportionallyResize){return }var H=A.proportionallyResize,I=this.helper||this.element;if(!A.borderDif){var J=[H.css("borderTopWidth"),H.css("borderRightWidth"),H.css("borderBottomWidth"),H.css("borderLeftWidth")],G=[H.css("paddingTop"),H.css("paddingRight"),H.css("paddingBottom"),H.css("paddingLeft")];A.borderDif=B.map(J,function(F,D){var E=parseInt(F,10)||0,C=parseInt(G[D],10)||0;return E+C})}H.css({height:(I.height()-A.borderDif[0]-A.borderDif[2])+"px",width:(I.width()-A.borderDif[1]-A.borderDif[3])+"px"})},change:{e:function(A,E,F){return{width:this.originalSize.width+E}},w:function(H,K,L){var A=this.options,J=this.originalSize,I=this.originalPosition;return{left:I.left+K,width:J.width-K}},n:function(H,K,L){var A=this.options,J=this.originalSize,I=this.originalPosition;return{top:I.top+L,height:J.height-L}},s:function(A,E,F){return{height:this.originalSize.height+F}},se:function(A,E,F){return B.extend(this.change.s.apply(this,arguments),this.change.e.apply(this,[A,E,F]))},sw:function(A,E,F){return B.extend(this.change.s.apply(this,arguments),this.change.w.apply(this,[A,E,F]))},ne:function(A,E,F){return B.extend(this.change.n.apply(this,arguments),this.change.e.apply(this,[A,E,F]))},nw:function(A,E,F){return B.extend(this.change.n.apply(this,arguments),this.change.w.apply(this,[A,E,F]))}}});B.ui.plugin.add("resizable","containment",{start:function(T,R){var X=R.options,P=R.instance,V=P.element;var N=X.containment,W=(N instanceof jQuery)?N.get(0):(/parent/.test(N))?V.parent().get(0):N;if(!W){return }if(/document/.test(N)||N==document){P.containerOffset={left:0,top:0};P.parentData={element:B(document),left:0,top:0,width:B(document).width(),height:B(document).height()||document.body.parentNode.scrollHeight}}else{P.containerOffset=B(W).offset(),P.containerSize={height:B(W).innerHeight(),width:B(W).innerWidth()};var S=P.containerOffset,O=P.containerSize.height,U=P.containerSize.width,A=(B.ui.hasScroll(W,"left")?W.scrollWidth:U),Q=(B.ui.hasScroll(W)?W.scrollHeight:O);P.parentData={element:W,left:S.left,top:S.top,width:A,height:Q}}},resize:function(U,R){var M=R.options,O=R.instance,N=O.containerSize,S=O.containerOffset,V=O.size,T=O.position,Q=M._aspectRatio||U.shiftKey;if(T.left<(M.proxy?S.left:0)){O.size.width=O.size.width+(M.proxy?(O.position.left-S.left):O.position.left);if(Q){O.size.height=O.size.width*M.aspectRatio}O.position.left=M.proxy?S.left:0}if(T.top<(M.proxy?S.top:0)){O.size.height=O.size.height+(M.proxy?(O.position.top-S.top):O.position.top);if(Q){O.size.width=O.size.height/M.aspectRatio}O.position.top=M.proxy?S.top:0}var A=(M.proxy?O.offset.left-S.left:O.position.left)+O.sizeDiff.width,P=(M.proxy?O.offset.top-S.top:O.position.top)+O.sizeDiff.height;if(A+O.size.width>=O.parentData.width){O.size.width=O.parentData.width-A;if(Q){O.size.height=O.size.width*M.aspectRatio}}if(P+O.size.height>=O.parentData.height){O.size.height=O.parentData.height-P;if(Q){O.size.width=O.size.height/M.aspectRatio}}}});B.ui.plugin.add("resizable","grid",{resize:function(S,Q){var A=Q.options,O=Q.instance,T=O.size,V=O.originalSize,U=O.originalPosition,P=O.axis,R=A._aspectRatio||S.shiftKey;A.grid=typeof A.grid=="number"?[A.grid,A.grid]:A.grid;var M=Math.round((T.width-V.width)/A.grid[0])*A.grid[0],N=Math.round((T.height-V.height)/A.grid[1])*A.grid[1];if(/^(se|s|e)$/.test(P)){O.size.width=V.width+M;O.size.height=V.height+N}else{if(/^(ne)$/.test(P)){O.size.width=V.width+M;O.size.height=V.height+N;O.position.top=U.top-N}else{if(/^(sw)$/.test(P)){O.size.width=V.width+M;O.size.height=V.height+N;O.position.left=U.left-M}else{O.size.width=V.width+M;O.size.height=V.height+N;O.position.top=U.top-N;O.position.left=U.left-M}}}}});B.ui.plugin.add("resizable","animate",{stop:function(R,P){var U=P.options,O=P.instance;var V=U.proportionallyResize,N=V&&/textarea/i.test(V.get(0).nodeName),M=N&&B.ui.hasScroll(V.get(0),"left")?0:O.sizeDiff.height,S=N?0:O.sizeDiff.width;var A={width:(O.size.width-S),height:(O.size.height-M)},T=parseInt(O.element.css("left"),10)+(O.position.left-O.originalPosition.left),Q=parseInt(O.element.css("top"),10)+(O.position.top-O.originalPosition.top);O.element.animate(B.extend(A,{top:Q,left:T}),{duration:U.animateDuration||"slow",easing:U.animateEasing||"swing",step:function(){if(V){V.css({width:O.element.css("width"),height:O.element.css("height")})}}})}});B.ui.plugin.add("resizable","ghost",{start:function(I,J){var H=J.options,L=J.instance,A=H.proportionallyResize,K=L.size;if(!A){L.ghost=L.element.clone()}else{L.ghost=A.clone()}L.ghost.css({opacity:0.25,display:"block",position:"relative",height:K.height,width:K.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof H.ghost=="string"?H.ghost:"");L.ghost.appendTo(L.helper)},resize:function(H,I){var G=I.options,J=I.instance,A=G.proportionallyResize;if(J.ghost){J.ghost.css({position:"relative",height:J.size.height,width:J.size.width})}},stop:function(H,I){var G=I.options,J=I.instance,A=G.proportionallyResize;if(J.ghost&&J.helper){J.helper.get(0).removeChild(J.ghost.get(0))}}})})(jQuery);(function(B){B.fn.extend({selectable:function(A){var D=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof A=="string"){var C=B.data(this,"selectable");if(C){C[A].apply(C,D)}}else{if(!B.data(this,"selectable")){new B.ui.selectable(this,A)}}})}});B.ui.selectable=function(F,G){var H=this;this.element=B(F);B.data(F,"selectable",this);this.element.addClass("ui-selectable");this.options=B.extend({appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"},G);B(F).bind("setData.selectable",function(D,E,C){H.options[E]=C}).bind("getData.selectable",function(C,D){return H.options[D]});this.dragged=false;var A;this.refresh=function(){A=B(H.options.filter,H.element[0]);A.each(function(){var D=B(this);var C=D.offset();B.data(this,"selectable-item",{element:this,$element:D,left:C.left,top:C.top,right:C.left+D.width(),bottom:C.top+D.height(),startselected:false,selected:D.hasClass("ui-selected"),selecting:D.hasClass("ui-selecting"),unselecting:D.hasClass("ui-unselecting")})})};this.refresh();this.selectees=A.addClass("ui-selectee");this.element.mouseInteraction({executor:this,appendTo:"body",delay:0,distance:0,dragPrevention:["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(C){var D=false;B(C.target).parents().andSelf().each(function(){if(B.data(this,"selectable-item")){D=true}});return this.options.keyboard?!D:true}});this.helper=B(document.createElement("div")).css({border:"1px dotted black"})};B.extend(B.ui.selectable.prototype,{toggle:function(){if(this.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable").removeMouseInteraction()},enable:function(){this.element.removeClass("ui-selectable-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-selectable-disabled");this.disabled=true},start:function(A,E){this.opos=[A.pageX,A.pageY];if(this.disabled){return }var F=this.options;this.selectees=B(F.filter,E);this.element.triggerHandler("selectablestart",[A,{selectable:E,options:F}],F.start);B("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:A.clientX,top:A.clientY,width:0,height:0});if(F.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var C=B.data(this,"selectable-item");C.startselected=true;if(!A.ctrlKey){C.$element.removeClass("ui-selected");C.selected=false;C.$element.addClass("ui-unselecting");C.unselecting=true;B(this.element).triggerHandler("selectableunselecting",[A,{selectable:E,unselecting:C.element,options:F}],F.unselecting)}})},drag:function(A,K){this.dragged=true;if(this.disabled){return }var N=this.options;var O=this.opos[0],J=this.opos[1],P=A.pageX,L=A.pageY;if(O>P){var M=P;P=O;O=M}if(J>L){var M=L;L=J;J=M}this.helper.css({left:O,top:J,width:P-O,height:L-J});this.selectees.each(function(){var D=B.data(this,"selectable-item");if(!D||D.element==K){return }var C=false;if(N.tolerance=="touch"){C=(!(D.left>P||D.right<O||D.top>L||D.bottom<J))}else{if(N.tolerance=="fit"){C=(D.left>O&&D.right<P&&D.top>J&&D.bottom<L)}}if(C){if(D.selected){D.$element.removeClass("ui-selected");D.selected=false}if(D.unselecting){D.$element.removeClass("ui-unselecting");D.unselecting=false}if(!D.selecting){D.$element.addClass("ui-selecting");D.selecting=true;B(this.element).triggerHandler("selectableselecting",[A,{selectable:K,selecting:D.element,options:N}],N.selecting)}}else{if(D.selecting){if(A.ctrlKey&&D.startselected){D.$element.removeClass("ui-selecting");D.selecting=false;D.$element.addClass("ui-selected");D.selected=true}else{D.$element.removeClass("ui-selecting");D.selecting=false;if(D.startselected){D.$element.addClass("ui-unselecting");D.unselecting=true}B(this.element).triggerHandler("selectableunselecting",[A,{selectable:K,unselecting:D.element,options:N}],N.unselecting)}}if(D.selected){if(!A.ctrlKey&&!D.startselected){D.$element.removeClass("ui-selected");D.selected=false;D.$element.addClass("ui-unselecting");D.unselecting=true;B(this.element).triggerHandler("selectableunselecting",[A,{selectable:K,unselecting:D.element,options:N}],N.unselecting)}}}})},stop:function(A,E){this.dragged=false;var F=this.options;B(".ui-unselecting",this.element).each(function(){var C=B.data(this,"selectable-item");C.$element.removeClass("ui-unselecting");C.unselecting=false;C.startselected=false;B(this.element).triggerHandler("selectableunselected",[A,{selectable:E,unselected:C.element,options:F}],F.unselected)});B(".ui-selecting",this.element).each(function(){var C=B.data(this,"selectable-item");C.$element.removeClass("ui-selecting").addClass("ui-selected");C.selecting=false;C.selected=true;C.startselected=true;B(this.element).triggerHandler("selectableselected",[A,{selectable:E,selected:C.element,options:F}],F.selected)});B(this.element).triggerHandler("selectablestop",[A,{selectable:E,options:this.options}],this.options.stop);this.helper.remove()}})})(jQuery);(function(B){if(window.Node&&Node.prototype&&!Node.prototype.contains){Node.prototype.contains=function(A){return !!(this.compareDocumentPosition(A)&16)}}B.fn.extend({sortable:function(A){var D=Array.prototype.slice.call(arguments,1);if(A=="serialize"||A=="toArray"){return B.data(this[0],"sortable")[A](arguments[1])}return this.each(function(){if(typeof A=="string"){var C=B.data(this,"sortable");if(C){C[A].apply(C,D)}}else{if(!B.data(this,"sortable")){new B.ui.sortable(this,A)}}})}});B.ui.sortable=function(F,G){var H=this;this.element=B(F);this.containerCache={};B.data(F,"sortable",this);this.element.addClass("ui-sortable");this.options=B.extend({},G);var A=this.options;B.extend(A,{items:this.options.items||"> *",zIndex:this.options.zIndex||1000,startCondition:function(){return !H.options.disabled}});B(F).bind("setData.sortable",function(D,E,C){H.options[E]=C}).bind("getData.sortable",function(C,D){return H.options[D]});this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;if(!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.offset=this.element.offset();this.element.mouseInteraction({executor:this,delay:A.delay,distance:A.distance||0,dragPrevention:A.prevention?A.prevention.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(D){if(this.options.disabled||this.options.type=="static"){return false}var E=null,J=B(D.target).parents().each(function(){if(B.data(this,"sortable-item")){E=B(this);return false}});if(B.data(D.target,"sortable-item")){E=B(D.target)}if(!E){return false}if(this.options.handle){var C=false;B(this.options.handle,E).each(function(){if(this==D.target){C=true}});if(!C){return false}}this.currentItem=E;return true}});if(A.cursorAt&&A.cursorAt.constructor==Array){A.cursorAt={left:A.cursorAt[0],top:A.cursorAt[1]}}};B.extend(B.ui.sortable.prototype,{plugins:{},ui:function(A){return{helper:(A||this)["helper"],placeholder:(A||this)["placeholder"]||B([]),position:(A||this)["position"].current,absolutePosition:(A||this)["position"].absolute,instance:this,options:this.options,element:this.element,item:(A||this)["currentItem"],sender:A?A.element:null}},propagate:function(A,E,F){B.ui.plugin.call(this,A,[E,this.ui(F)]);this.element.triggerHandler(A=="sort"?A:"sort"+A,[E,this.ui(F)],this.options[A])},serialize:function(A){var F=B(this.options.items,this.element).not(".ui-sortable-helper");var E=[];A=A||{};F.each(function(){var C=(B(this).attr(A.attribute||"id")||"").match(A.expression||(/(.+)[-=_](.+)/));if(C){E.push((A.key||C[1])+"[]="+(A.key?C[1]:C[2]))}});return E.join("&")},toArray:function(F){var E=B(this.options.items,this.element).not(".ui-sortable-helper");var A=[];E.each(function(){A.push(B(this).attr(F||"id"))});return A},enable:function(){this.element.removeClass("ui-sortable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-sortable-disabled");this.options.disabled=true},intersectsWith:function(N){var A=this.position.absolute.left,K=A+this.helperProportions.width,O=this.position.absolute.top,P=O+this.helperProportions.height;var R=N.left,L=R+N.width,M=N.top,Q=M+N.height;return(R<A+(this.helperProportions.width/2)&&K-(this.helperProportions.width/2)<L&&M<O+(this.helperProportions.height/2)&&P-(this.helperProportions.height/2)<Q)},intersectsWithEdge:function(N){var A=this.position.absolute.left,K=A+this.helperProportions.width,O=this.position.absolute.top,P=O+this.helperProportions.height;var R=N.left,L=R+N.width,M=N.top,Q=M+N.height;if(!(R<A+(this.helperProportions.width/2)&&K-(this.helperProportions.width/2)<L&&M<O+(this.helperProportions.height/2)&&P-(this.helperProportions.height/2)<Q)){return false}if(this.floating){if(K>R&&A<R){return 2}if(A<L&&K>L){return 1}}else{if(P>M&&O<M){return 1}if(O<Q&&P>Q){return 2}}return false},inEmptyZone:function(F){if(!B(F.options.items,F.element).length){return F.options.dropOnEmpty?true:false}var E=B(F.options.items,F.element).not(".ui-sortable-helper");E=B(E[E.length-1]);var A=E.offset()[this.floating?"left":"top"]+E[0][this.floating?"offsetWidth":"offsetHeight"];return(this.position.absolute[this.floating?"left":"top"]>A)},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var L=this.items;var J=[B(this.options.items,this.element)];if(this.options.connectWith){for(var I=this.options.connectWith.length-1;I>=0;I--){var A=B(this.options.connectWith[I]);for(var K=A.length-1;K>=0;K--){var H=B.data(A[K],"sortable");if(H&&!H.options.disabled){J.push(B(H.options.items,H.element));this.containers.push(H)}}}}for(var I=J.length-1;I>=0;I--){J[I].each(function(){B.data(this,"sortable-item",true);L.push({item:B(this),width:0,height:0,left:0,top:0})})}},refreshPositions:function(F){for(var E=this.items.length-1;E>=0;E--){if(!F){this.items[E].width=this.items[E].item.outerWidth()}if(!F){this.items[E].height=this.items[E].item.outerHeight()}var A=this.items[E].item.offset();this.items[E].left=A.left;this.items[E].top=A.top}for(var E=this.containers.length-1;E>=0;E--){var A=this.containers[E].element.offset();this.containers[E].containerCache.left=A.left;this.containers[E].containerCache.top=A.top;this.containers[E].containerCache.width=this.containers[E].element.outerWidth();this.containers[E].containerCache.height=this.containers[E].element.outerHeight()}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable").removeMouseInteraction();for(var A=this.items.length-1;A>=0;A--){this.items[A].item.removeData("sortable-item")}},createPlaceholder:function(A){(A||this).placeholderElement=this.options.placeholderElement?B(this.options.placeholderElement,(A||this).currentItem):(A||this).currentItem;(A||this).placeholder=B("<div></div>").addClass(this.options.placeholder).appendTo("body").css({position:"absolute"}).css((A||this).placeholderElement.offset()).css({width:(A||this).placeholderElement.outerWidth(),height:(A||this).placeholderElement.outerHeight()})},contactContainers:function(K){for(var M=this.containers.length-1;M>=0;M--){if(this.intersectsWith(this.containers[M].containerCache)){if(!this.containers[M].containerCache.over){if(this.currentContainer!=this.containers[M]){var A=10000;var I=null;var L=this.position.absolute[this.containers[M].floating?"left":"top"];for(var N=this.items.length-1;N>=0;N--){if(!this.containers[M].element[0].contains(this.items[N].item[0])){continue}var J=this.items[N][this.containers[M].floating?"left":"top"];if(Math.abs(J-L)<A){A=Math.abs(J-L);I=this.items[N]}}if(this.placeholder){this.placeholder.remove()}if(this.containers[M].options.placeholder){this.containers[M].createPlaceholder(this)}else{this.placeholder=null;this.placeholderElement=null}I?this.rearrange(K,I):this.rearrange(K,null,this.containers[M].element);this.propagate("change",K);this.containers[M].propagate("change",K,this);this.currentContainer=this.containers[M]}this.containers[M].propagate("over",K,this);this.containers[M].containerCache.over=1}}else{if(this.containers[M].containerCache.over){this.containers[M].propagate("out",K,this);this.containers[M].containerCache.over=0}}}},start:function(F,G){var A=this.options;this.refresh();this.helper=typeof A.helper=="function"?B(A.helper.apply(this.element[0],[F,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length){this.helper.appendTo(A.appendTo||this.currentItem[0].parentNode)}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");B.extend(this,{offsetParent:this.helper.offsetParent(),offsets:{absolute:this.currentItem.offset()},mouse:{start:{top:F.pageY,left:F.pageX}},margins:{top:parseInt(this.currentItem.css("marginTop"))||0,left:parseInt(this.currentItem.css("marginLeft"))||0}});this.offsets.parent=this.offsetParent.offset();this.clickOffset={left:F.pageX-this.offsets.absolute.left,top:F.pageY-this.offsets.absolute.top};this.originalPosition={left:this.offsets.absolute.left-this.offsets.parent.left-this.margins.left,top:this.offsets.absolute.top-this.offsets.parent.top-this.margins.top};this.offset={left:F.pageX-this.originalPosition.left,top:F.pageY-this.originalPosition.top};B.extend(this,{position:{current:{top:F.pageY-this.offset.top,left:F.pageX-this.offset.left},absolute:{left:F.pageX-this.clickOffset.left,top:F.pageY-this.clickOffset.top},dom:this.currentItem.prev()[0]}});if(A.placeholder){this.createPlaceholder()}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.cursorAt){if(A.cursorAt.top!=undefined||A.cursorAt.bottom!=undefined){this.offset.top-=this.clickOffset.top-(A.cursorAt.top!=undefined?A.cursorAt.top:(this.helperProportions.height-A.cursorAt.bottom));this.clickOffset.top=(A.cursorAt.top!=undefined?A.cursorAt.top:(this.helperProportions.height-A.cursorAt.bottom))}if(A.cursorAt.left!=undefined||A.cursorAt.right!=undefined){this.offset.left-=this.clickOffset.left-(A.cursorAt.left!=undefined?A.cursorAt.left:(this.helperProportions.width-A.cursorAt.right));this.clickOffset.left=(A.cursorAt.left!=undefined?A.cursorAt.left:(this.helperProportions.width-A.cursorAt.right))}}if(this.options.placeholder!="clone"){B(this.currentItem).css("visibility","hidden")}for(var H=this.containers.length-1;H>=0;H--){this.containers[H].propagate("activate",F,this)}if(B.ui.ddmanager){B.ui.ddmanager.current=this}if(B.ui.ddmanager&&!A.dropBehaviour){B.ui.ddmanager.prepareOffsets(this,F)}this.dragging=true;return false},stop:function(A){this.propagate("stop",A);if(this.position.dom!=this.currentItem.prev()[0]){this.propagate("update",A)}if(!this.element[0].contains(this.currentItem[0])){this.propagate("remove",A);for(var D=this.containers.length-1;D>=0;D--){if(this.containers[D].element[0].contains(this.currentItem[0])){this.containers[D].propagate("update",A,this);this.containers[D].propagate("receive",A,this)}}}for(var D=this.containers.length-1;D>=0;D--){this.containers[D].propagate("deactivate",A,this);if(this.containers[D].containerCache.over){this.containers[D].propagate("out",A,this);this.containers[D].containerCache.over=0}}if(B.ui.ddmanager&&!this.options.dropBehaviour){B.ui.ddmanager.drop(this,A)}this.dragging=false;if(this.cancelHelperRemoval){return false}B(this.currentItem).css("visibility","");if(this.placeholder){this.placeholder.remove()}this.helper.remove();return false},drag:function(E){this.position.current={top:E.pageY-this.offset.top,left:E.pageX-this.offset.left};this.position.absolute={left:E.pageX-this.clickOffset.left,top:E.pageY-this.clickOffset.top};for(var F=this.items.length-1;F>=0;F--){var A=this.intersectsWithEdge(this.items[F]);if(!A){continue}if(this.items[F].item[0]!=this.currentItem[0]&&this.currentItem[A==1?"next":"prev"]()[0]!=this.items[F].item[0]&&!this.currentItem[0].contains(this.items[F].item[0])&&(this.options.type=="semi-dynamic"?!this.element[0].contains(this.items[F].item[0]):true)){this.direction=A==1?"down":"up";this.rearrange(E,this.items[F]);this.propagate("change",E);break}}this.contactContainers(E);if(B.ui.ddmanager){B.ui.ddmanager.drag(this,E)}this.propagate("sort",E);this.helper.css({left:this.position.current.left+"px",top:this.position.current.top+"px"});return false},rearrange:function(A,E,F){F?F.append(this.currentItem):E.item[this.direction=="down"?"before":"after"](this.currentItem);this.refreshPositions(true);if(this.placeholderElement){this.placeholder.css(this.placeholderElement.offset())}}});B.ui.plugin.add("sortable","cursor",{start:function(A,E){var F=B("body");if(F.css("cursor")){E.options._cursor=F.css("cursor")}F.css("cursor",E.options.cursor)},stop:function(A,D){if(D.options._cursor){B("body").css("cursor",D.options._cursor)}}});B.ui.plugin.add("sortable","zIndex",{start:function(A,E){var F=E.helper;if(F.css("zIndex")){E.options._zIndex=F.css("zIndex")}F.css("zIndex",E.options.zIndex)},stop:function(A,D){if(D.options._zIndex){B(D.helper).css("zIndex",D.options._zIndex)}}});B.ui.plugin.add("sortable","opacity",{start:function(A,E){var F=E.helper;if(F.css("opacity")){E.options._opacity=F.css("opacity")}F.css("opacity",E.options.opacity)},stop:function(A,D){if(D.options._opacity){B(D.helper).css("opacity",D.options._opacity)}}});B.ui.plugin.add("sortable","revert",{stop:function(H,I){var J=I.instance;J.cancelHelperRemoval=true;var G=J.currentItem.offset();var A=J.helper.offsetParent().offset();if(I.instance.options.zIndex){I.helper.css("zIndex",I.instance.options.zIndex)}if(I.instance.placeholder){I.instance.placeholder.animate({opacity:"hide"},parseInt(I.options.revert,10)||500)}I.helper.animate({left:G.left-A.left-J.margins.left,top:G.top-A.top-J.margins.top},parseInt(I.options.revert,10)||500,function(){J.currentItem.css("visibility","visible");window.setTimeout(function(){if(J.placeholder){J.placeholder.remove()}J.helper.remove();if(I.options._zIndex){I.helper.css("zIndex",I.options._zIndex)}},50)})}});B.ui.plugin.add("sortable","containment",{start:function(H,J){var A=J.options;if((A.containment.left!=undefined||A.containment.constructor==Array)&&!A._containment){return }if(!A._containment){A._containment=A.containment}if(A._containment=="parent"){A._containment=this[0].parentNode}if(A._containment=="sortable"){A._containment=this[0]}if(A._containment=="document"){A.containment=[0,0,B(document).width(),(B(document).height()||document.body.parentNode.scrollHeight)]}else{var I=B(A._containment);var G=I.offset();A.containment=[G.left,G.top,G.left+(I.outerWidth()||I[0].scrollWidth),G.top+(I.outerHeight()||I[0].scrollHeight)]}},sort:function(T,P){var M=P.options;var A=P.helper;var Q=M.containment;var N=P.instance;var S=(parseInt(N.offsetParent.css("borderLeftWidth"),10)||0);var O=(parseInt(N.offsetParent.css("borderRightWidth"),10)||0);var L=(parseInt(N.offsetParent.css("borderTopWidth"),10)||0);var R=(parseInt(N.offsetParent.css("borderBottomWidth"),10)||0);if(Q.constructor==Array){if((N.position.absolute.left<Q[0])){N.position.current.left=Q[0]-N.offsets.parent.left-N.margins.left}if((N.position.absolute.top<Q[1])){N.position.current.top=Q[1]-N.offsets.parent.top-N.margins.top}if(N.position.absolute.left-Q[2]+N.helperProportions.width>=0){N.position.current.left=Q[2]-N.offsets.parent.left-N.helperProportions.width-N.margins.left-S-O}if(N.position.absolute.top-Q[3]+N.helperProportions.height>=0){N.position.current.top=Q[3]-N.offsets.parent.top-N.helperProportions.height-N.margins.top-L-R}}else{if((P.position.left<Q.left)){N.position.current.left=Q.left}if((P.position.top<Q.top)){N.position.current.top=Q.top}if(P.position.left-N.offsetParent.innerWidth()+N.helperProportions.width+Q.right+S+O>=0){N.position.current.left=N.offsetParent.innerWidth()-N.helperProportions.width-Q.right-S-O}if(P.position.top-N.offsetParent.innerHeight()+N.helperProportions.height+Q.bottom+L+R>=0){N.position.current.top=N.offsetParent.innerHeight()-N.helperProportions.height-Q.bottom-L-R}}}});B.ui.plugin.add("sortable","axis",{sort:function(E,F){var A=F.options;if(A.constraint){A.axis=A.constraint}A.axis=="x"?F.instance.position.top=F.instance.originalPosition.top:F.instance.position.left=F.instance.originalPosition.left}});B.ui.plugin.add("sortable","scroll",{start:function(E,F){var A=F.options;A.scrollSensitivity=A.scrollSensitivity||20;A.scrollSpeed=A.scrollSpeed||20;F.instance.overflowY=function(C){do{if((/auto|scroll/).test(C.css("overflow"))||(/auto|scroll/).test(C.css("overflow-y"))){return C}C=C.parent()}while(C[0].parentNode);return B(document)}(this);F.instance.overflowX=function(C){do{if((/auto|scroll/).test(C.css("overflow"))||(/auto|scroll/).test(C.css("overflow-x"))){return C}C=C.parent()}while(C[0].parentNode);return B(document)}(this);if(F.instance.overflowY[0]!=document&&F.instance.overflowY[0].tagName!="HTML"){F.instance.overflowYstart=F.instance.overflowY[0].scrollTop}if(F.instance.overflowX[0]!=document&&F.instance.overflowX[0].tagName!="HTML"){F.instance.overflowXstart=F.instance.overflowX[0].scrollLeft}},sort:function(F,G){var A=G.options;var H=G.instance;if(H.overflowY[0]!=document&&H.overflowY[0].tagName!="HTML"){if(H.overflowY[0].offsetHeight-(G.position.top-H.overflowY[0].scrollTop+H.clickOffset.top)<A.scrollSensitivity){H.overflowY[0].scrollTop=H.overflowY[0].scrollTop+A.scrollSpeed}if((G.position.top-H.overflowY[0].scrollTop+H.clickOffset.top)<A.scrollSensitivity){H.overflowY[0].scrollTop=H.overflowY[0].scrollTop-A.scrollSpeed}}else{if(F.pageY-B(document).scrollTop()<A.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()-A.scrollSpeed)}if(B(window).height()-(F.pageY-B(document).scrollTop())<A.scrollSensitivity){B(document).scrollTop(B(document).scrollTop()+A.scrollSpeed)}}if(H.overflowX[0]!=document&&H.overflowX[0].tagName!="HTML"){if(H.overflowX[0].offsetWidth-(G.position.left-H.overflowX[0].scrollLeft+H.clickOffset.left)<A.scrollSensitivity){H.overflowX[0].scrollLeft=H.overflowX[0].scrollLeft+A.scrollSpeed}if((G.position.top-H.overflowX[0].scrollLeft+H.clickOffset.left)<A.scrollSensitivity){H.overflowX[0].scrollLeft=H.overflowX[0].scrollLeft-A.scrollSpeed}}else{if(F.pageX-B(document).scrollLeft()<A.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()-A.scrollSpeed)}if(B(window).width()-(F.pageX-B(document).scrollLeft())<A.scrollSensitivity){B(document).scrollLeft(B(document).scrollLeft()+A.scrollSpeed)}}H.offset={left:H.mouse.start.left-H.originalPosition.left+(H.overflowXstart!==undefined?H.overflowXstart-H.overflowX[0].scrollLeft:0),top:H.mouse.start.top-H.originalPosition.top+(H.overflowYstart!==undefined?H.overflowYstart-H.overflowX[0].scrollTop:0)}}})})(jQuery);(function(I){I.fn.extend({accordion:function(B,A){return this.each(function(){var C=I.data(this,"accordion");if(!C){I.data(this,"accordion",new I.ui.accordion(this,B))}else{if(typeof B=="string"){C[B](A)}}})}});I.ui.accordion=function(E,D){this.options=D=I.extend({},I.ui.accordion.defaults,D);this.element=I(E);if(D.navigation){var A=this.element.find("a").filter(D.navigationFilter);if(A.length){if(A.filter(D.header).length){D.active=A}else{D.active=A.parent().parent().prev();A.addClass("current")}}}D.headers=this.element.find(D.header);D.active=K(D.headers,D.active);if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");I("<span class='ui-accordion-left'/>").insertBefore(D.headers);I("<span class='ui-accordion-right'/>").appendTo(D.headers);D.headers.addClass("ui-accordion-header").attr("tabindex","0")}if(D.fillSpace){var B=this.element.parent().height();D.headers.each(function(){B-=I(this).outerHeight()});var C=0;D.headers.next().each(function(){C=Math.max(C,I(this).innerHeight()-I(this).height())}).height(B-C)}else{if(D.autoHeight){var B=0;D.headers.next().each(function(){B=Math.max(B,I(this).outerHeight())}).height(B)}}D.headers.not(D.active||"").next().hide();D.active.parent().andSelf().addClass(D.selectedClass);if(D.event){this.element.bind((D.event)+".accordion",H)}};I.ui.accordion.prototype={activate:function(A){H.call(this.element[0],{target:K(this.options.headers,A)[0]})},enable:function(){this.options.disabled=false},disable:function(){this.options.disabled=true},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}I.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}};function L(A,B){return function(){return A.apply(B,arguments)}}function J(A){if(!I.data(this,"accordion")){return }var C=I.data(this,"accordion");var B=C.options;B.running=A?0:--B.running;if(B.running){return }if(B.clearStyle){B.toShow.add(B.toHide).css({height:"",overflow:""})}I(this).triggerHandler("accordionchange",[B.data],B.change)}function G(F,B,A,C,N){var D=I.data(this,"accordion").options;D.toShow=F;D.toHide=B;D.data=A;var E=L(J,this);D.running=B.size()==0?F.size():B.size();if(D.animated){if(!D.alwaysOpen&&C){I.ui.accordion.animations[D.animated]({toShow:jQuery([]),toHide:B,complete:E,down:N,autoHeight:D.autoHeight})}else{I.ui.accordion.animations[D.animated]({toShow:F,toHide:B,complete:E,down:N,autoHeight:D.autoHeight})}}else{if(!D.alwaysOpen&&C){F.toggle()}else{B.hide();F.show()}E(true)}}function H(A){var C=I.data(this,"accordion").options;if(C.disabled){return false}if(!A.target&&!C.alwaysOpen){C.active.parent().andSelf().toggleClass(C.selectedClass);var D=C.active.next(),P={instance:this,options:C,newHeader:jQuery([]),oldHeader:C.active,newContent:jQuery([]),oldContent:D},F=C.active=I([]);G.call(this,F,D,P);return false}var B=I(A.target);if(B.parents(C.header).length){while(!B.is(C.header)){B=B.parent()}}var E=B[0]==C.active[0];if(C.running||(C.alwaysOpen&&E)){return false}if(!B.is(C.header)){return }C.active.parent().andSelf().toggleClass(C.selectedClass);if(!E){B.parent().andSelf().addClass(C.selectedClass)}var F=B.next(),D=C.active.next(),P={instance:this,options:C,newHeader:B,oldHeader:C.active,newContent:F,oldContent:D},O=C.headers.index(C.active[0])>C.headers.index(B[0]);C.active=E?I([]):B;G.call(this,F,D,P,E,O);return false}function K(A,B){return B!=undefined?typeof B=="number"?A.filter(":eq("+B+")"):A.not(A.not(B)):B===false?I([]):A.filter(":eq(0)")}I.extend(I.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(E,C){E=I.extend({easing:"swing",duration:300},E,C);if(!E.toHide.size()){E.toShow.animate({height:"show"},E);return }var D=E.toHide.height(),B=E.toShow.height(),A=B/D;E.toShow.css({height:0,overflow:"hidden"}).show();E.toHide.filter(":hidden").each(E.complete).end().filter(":visible").animate({height:"hide"},{step:function(F){var N=(D-F)*A;if(I.browser.msie||I.browser.opera){N=Math.ceil(N)}E.toShow.height(N)},duration:E.duration,easing:E.easing,complete:function(){if(!E.autoHeight){E.toShow.css("height","auto")}E.complete()}})},bounceslide:function(A){this.slide(A,{easing:A.down?"bounceout":"swing",duration:A.down?1000:200})},easeslide:function(A){this.slide(A,{easing:"easeinout",duration:700})}}});I.fn.activate=function(A){return this.accordion("activate",A)}})(jQuery);(function(B){B.fn.extend({dialog:function(A){var D=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof A=="string"){var C=B(this).is(".ui-dialog")?this:B(this).parents(".ui-dialog:first").find(".ui-dialog-content")[0];var F=C?B.data(C,"dialog"):{};if(F[A]){F[A].apply(F,D)}}else{if(!B(this).is(".ui-dialog-content")){new B.ui.dialog(this,A)}}})}});B.ui.dialog=function(A,O){this.options=O=B.extend({},B.ui.dialog.defaults,O);this.element=A;var P=this;B.data(this.element,"dialog",this);B(A).bind("remove",function(){P.destroy()});B(A).bind("setData.dialog",function(D,E,C){switch(E){case"draggable":Q.draggable(C?"enable":"disable");break;case"dragStart":Q.data("start.draggable",C);break;case"drag":Q.data("drag.draggable",C);break;case"dragStop":Q.data("stop.draggable",C);break;case"height":Q.height(C);break;case"maxHeight":case"minHeight":case"maxWidth":case"minWidth":Q.data(E+".resizable",C);break;case"position":P.position(C);break;case"resizable":Q.resizable(C?"enable":"disable");break;case"resizeStart":Q.data("start.resizable",C);break;case"resize":Q.data("resize.resizable",C);break;case"resizeStop":Q.data("stop.resizable",C);break;case"title":B(".ui-dialog-title",M).text(C);break;case"width":break}O[E]=C}).bind("getData.dialog",function(C,D){return O[D]});var V=B(A).addClass("ui-dialog-content");if(!V.parent().length){V.appendTo("body")}V.wrap(document.createElement("div")).wrap(document.createElement("div"));var S=V.parent().addClass("ui-dialog-container").css({position:"relative"});var Q=this.uiDialog=S.parent().hide().addClass("ui-dialog").css({position:"absolute",width:O.width,height:O.height,overflow:"hidden"});var N=V.attr("className").split(" ");B.each(N,function(D,C){if(C!="ui-dialog-content"){Q.addClass(C)}});if(B.fn.resizable){Q.append('<div class="ui-resizable-n ui-resizable-handle"></div>').append('<div class="ui-resizable-s ui-resizable-handle"></div>').append('<div class="ui-resizable-e ui-resizable-handle"></div>').append('<div class="ui-resizable-w ui-resizable-handle"></div>').append('<div class="ui-resizable-ne ui-resizable-handle"></div>').append('<div class="ui-resizable-se ui-resizable-handle"></div>').append('<div class="ui-resizable-sw ui-resizable-handle"></div>').append('<div class="ui-resizable-nw ui-resizable-handle"></div>');Q.resizable({maxWidth:O.maxWidth,maxHeight:O.maxHeight,minWidth:O.minWidth,minHeight:O.minHeight,start:O.resizeStart,resize:O.resize,stop:function(C,D){O.resizeStop&&O.resizeStop.apply(this,arguments);B.ui.dialog.overlay.resize()}});if(!O.resizable){Q.resizable("disable")}}S.prepend('<div class="ui-dialog-titlebar"></div>');var M=B(".ui-dialog-titlebar",S);var R=(O.title)?O.title:(V.attr("title"))?V.attr("title"):"";M.append('<span class="ui-dialog-title">'+R+"</span>");M.append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>');this.uiDialogTitlebarClose=B(".ui-dialog-titlebar-close",M).hover(function(){B(this).addClass("ui-dialog-titlebar-close-hover")},function(){B(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(C){C.stopPropagation()}).click(function(){P.close();return false}).keydown(function(D){var C=27;D.keyCode&&D.keyCode==C&&P.close()});var U=0;B.each(O.buttons,function(){U=1;return false});if(U==1){Q.append('<div class="ui-dialog-buttonpane"></div>');var T=B(".ui-dialog-buttonpane",Q);B.each(O.buttons,function(E,C){var D=B(document.createElement("button")).text(E).click(C);T.append(D)})}if(B.fn.draggable){Q.draggable({handle:".ui-dialog-titlebar",start:function(C,D){P.activate();O.dragStart&&O.dragStart.apply(this,arguments)},drag:O.drag,stop:function(C,D){O.dragStop&&O.dragStop.apply(this,arguments);B.ui.dialog.overlay.resize()}});if(!O.draggable){Q.draggable("disable")}}Q.mousedown(function(){P.activate()});M.click(function(){P.activate()});O.bgiframe&&B.fn.bgiframe&&Q.bgiframe();this.position=function(C){var G=B(window),D=B(document),E=D.scrollTop(),F=D.scrollLeft();if(C.constructor==Array){E+=C[1];F+=C[0]}else{switch(C){case"center":E+=(G.height()/2)-(Q.height()/2);F+=(G.width()/2)-(Q.width()/2);break;case"top":E+=0;F+=(G.width()/2)-(Q.width()/2);break;case"right":E+=(G.height()/2)-(Q.height()/2);F+=(G.width())-(Q.width());break;case"bottom":E+=(G.height())-(Q.height());F+=(G.width()/2)-(Q.width()/2);break;case"left":E+=(G.height()/2)-(Q.height()/2);F+=0;break;default:E+=(G.height()/2)-(Q.height()/2);F+=(G.width()/2)-(Q.width()/2)}}E=E<D.scrollTop()?D.scrollTop():E;Q.css({top:E,left:F})};this.open=function(){this.overlay=O.modal?new B.ui.dialog.overlay(P):null;Q.appendTo("body");this.position(O.position);Q.show();P.moveToTop();P.activate();var D=null;var C={options:O};this.uiDialogTitlebarClose.focus();B(this.element).triggerHandler("dialogopen",[D,C],O.open)};this.activate=function(){!O.modal&&this.moveToTop()};this.moveToTop=function(){var C=O.zIndex;B(".ui-dialog:visible").each(function(){C=Math.max(C,parseInt(B(this).css("z-index"),10)||O.zIndex)});this.overlay&&this.overlay.$el.css("z-index",++C);Q.css("z-index",++C)};this.close=function(){this.overlay&&this.overlay.destroy();Q.hide();var C=null;var D={options:O};B(this.element).triggerHandler("dialogclose",[C,D],O.close);B.ui.dialog.overlay.resize()};this.destroy=function(){this.overlay&&this.overlay.destroy();Q.hide();B(A).unbind(".dialog").removeClass("ui-dialog-content").hide().appendTo("body");Q.remove();B.removeData(this.element,"dialog")};if(O.autoOpen){this.open()}};B.extend(B.ui.dialog,{defaults:{autoOpen:true,bgiframe:false,buttons:[],draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,width:300,zIndex:1000},overlay:function(A){this.$el=B.ui.dialog.overlay.create(A)}});B.extend(B.ui.dialog.overlay,{instances:[],events:B.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(A){return A+".dialog-overlay"}).join(" "),create:function(A){if(this.instances.length===0){B("a, :input").bind(this.events,function(){var I=false;var C=B(this).parents(".ui-dialog");if(C.length){var J=B(".ui-dialog-overlay");if(J.length){var H=parseInt(J.css("z-index"),10);J.each(function(){H=Math.max(H,parseInt(B(this).css("z-index"),10))});I=parseInt(C.css("z-index"),10)>H}else{I=true}}return I});B(document).bind("keydown.dialog-overlay",function(F){var C=27;F.keyCode&&F.keyCode==C&&A.close()});B(window).bind("resize.dialog-overlay",B.ui.dialog.overlay.resize)}var D=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()},A.options.overlay));A.options.bgiframe&&B.fn.bgiframe&&D.bgiframe();this.instances.push(D);return D},destroy:function(A){this.instances.splice(B.inArray(this.instances,A),1);if(this.instances.length===0){B("a, :input").add([document,window]).unbind(".dialog-overlay")}A.remove()},height:function(){if(B.browser.msie&&B.browser.version<7){var A=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var D=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(A<D){return B(window).height()+"px"}else{return A+"px"}}else{return B(document).height()+"px"}},width:function(){if(B.browser.msie&&B.browser.version<7){var D=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var A=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(D<A){return B(window).width()+"px"}else{return D+"px"}}else{return B(document).width()+"px"}},resize:function(){var A=B([]);B.each(B.ui.dialog.overlay.instances,function(){A=A.add(this)});A.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(B){B.fn.extend({slider:function(A){var D=Array.prototype.slice.call(arguments,1);if(A=="value"){return B.data(this[0],"slider").value(arguments[1])}return this.each(function(){if(typeof A=="string"){var C=B.data(this,"slider");if(C){C[A].apply(C,D)}}else{if(!B.data(this,"slider")){new B.ui.slider(this,A)}}})}});B.ui.slider=function(F,G){var H=this;this.element=B(F);B.data(F,"slider",this);this.element.addClass("ui-slider");this.options=B.extend({},B.ui.slider.defaults,G);var A=this.options;B.extend(A,{axis:A.axis||(F.offsetWidth<F.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(A.max,10))?{x:parseInt(A.max,10),y:parseInt(A.max,10)}:({x:A.max&&A.max.x||100,y:A.max&&A.max.y||100}),min:!isNaN(parseInt(A.min,10))?{x:parseInt(A.min,10),y:parseInt(A.min,10)}:({x:A.min&&A.min.x||0,y:A.min&&A.min.y||0})});A.realMax={x:A.max.x-A.min.x,y:A.max.y-A.min.y};A.stepping={x:A.stepping&&A.stepping.x||parseInt(A.stepping,10)||(A.steps&&A.steps.x?A.realMax.x/A.steps.x:0),y:A.stepping&&A.stepping.y||parseInt(A.stepping,10)||(A.steps&&A.steps.y?A.realMax.y/A.steps.y:0)};B(F).bind("setData.slider",function(D,E,C){H.options[E]=C}).bind("getData.slider",function(C,D){return H.options[D]});this.handle=B(A.handle,F);if(!this.handle.length){H.handle=H.generated=B(A.handles||[0]).map(function(){var C=B("<div/>").addClass("ui-slider-handle").appendTo(F);if(this.id){C.attr("id",this.id)}return C[0]})}B(this.handle).mouseInteraction({executor:this,delay:A.delay,distance:A.distance!=undefined?A.distance:1,dragPrevention:A.prevention?A.prevention.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(C,D){if(!this.disabled){if(this.currentHandle){this.blur(this.currentHandle)}this.focus(D,1);return !this.disabled}}}).wrap('<a href="javascript:void(0)" style="cursor:default;"></a>').parent().bind("focus",function(C){H.focus(this.firstChild)}).bind("blur",function(C){H.blur(this.firstChild)}).bind("keydown",function(C){if(/(37|38|39|40)/.test(C.keyCode)){H.moveTo({x:/(37|39)/.test(C.keyCode)?(C.keyCode==37?"-":"+")+"="+H.oneStep(1):null,y:/(38|40)/.test(C.keyCode)?(C.keyCode==38?"-":"+")+"="+H.oneStep(2):null},this.firstChild)}});this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.element.bind("mousedown.slider",function(C){H.click.apply(H,[C]);H.currentHandle.data("ui-mouse").trigger(C);H.firstValue=H.firstValue+1});B.each(A.handles||[],function(D,C){H.moveTo(C.start,D,true)});if(!isNaN(A.startValue)){this.moveTo(A.startValue,0,true)}if(this.handle.length==1){this.previousHandle=this.handle}if(this.handle.length==2&&A.range){this.createRange()}};B.extend(B.ui.slider.prototype,{plugins:{},createRange:function(){this.rangeElement=B("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},updateRange:function(){var A=this.options.axis=="vertical"?"top":"left";var D=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(A,parseInt(B(this.handle[0]).css(A),10)+this.handleSize(0,this.options.axis=="vertical"?2:1)/2);this.rangeElement.css(D,parseInt(B(this.handle[1]).css(A),10)-parseInt(B(this.handle[0]).css(A),10))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10)):null},ui:function(A){return{instance:this,options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?2:1)):{x:Math.round(this.value(null,1)),y:Math.round(this.value(null,2))},range:this.getRange()}},propagate:function(A,D){B.ui.plugin.call(this,A,[D,this.ui()]);this.element.triggerHandler(A=="slide"?A:"slide"+A,[D,this.ui()],this.options[A])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");this.handle.removeMouseInteraction();this.generated&&this.generated.remove()},enable:function(){this.element.removeClass("ui-slider-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-slider-disabled");this.disabled=true},focus:function(D,A){this.currentHandle=B(D).addClass("ui-slider-handle-active");if(A){this.currentHandle.parent()[0].focus()}},blur:function(A){B(A).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==A){this.previousHandle=this.currentHandle;this.currentHandle=null}},value:function(F,H){if(this.handle.length==1){this.currentHandle=this.handle}if(!H){H=this.options.axis=="vertical"?2:1}var G=((parseInt(B(F!=undefined&&F!==null?this.handle[F]||F:this.currentHandle).css(H==1?"left":"top"),10)/(this.actualSize[H==1?"width":"height"]-this.handleSize(null,H)))*this.options.realMax[H==1?"x":"y"])+this.options.min[H==1?"x":"y"];var A=this.options;if(A.stepping[H==1?"x":"y"]){G=Math.round(G/A.stepping[H==1?"x":"y"])*A.stepping[H==1?"x":"y"]}return G},convertValue:function(A,D){if(!D){D=this.options.axis=="vertical"?2:1}return this.options.min[D==1?"x":"y"]+(A/(this.actualSize[D==1?"width":"height"]-this.handleSize(null,D)))*this.options.realMax[D==1?"x":"y"]},translateValue:function(A,D){if(!D){D=this.options.axis=="vertical"?2:1}return((A-this.options.min[D==1?"x":"y"])/this.options.realMax[D==1?"x":"y"])*(this.actualSize[D==1?"width":"height"]-this.handleSize(null,D))},handleSize:function(A,D){if(!D){D=this.options.axis=="vertical"?2:1}return B(A!=undefined&&A!==null?this.handle[A]:this.currentHandle)[D==1?"outerWidth":"outerHeight"]()},click:function(E){var A=[E.pageX,E.pageY];var F=false;this.handle.each(function(){if(this==E.target){F=true}});if(F||this.disabled||!(this.currentHandle||this.previousHandle)){return }if(this.previousHandle){this.focus(this.previousHandle,1)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(E.pageY-this.offset.top-this.currentHandle.outerHeight()/2),x:this.convertValue(E.pageX-this.offset.left-this.currentHandle.outerWidth()/2)},null,true)},start:function(E,F){var A=this.options;if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:E.pageY-this.handleOffset.top,left:E.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",E);return false},stop:function(A){this.propagate("stop",A);if(this.firstValue!=this.value()){this.propagate("change",A)}this.focus(this.currentHandle,true);return false},oneStep:function(A){if(!A){A=this.options.axis=="vertical"?2:1}return this.options.stepping[A==1?"x":"y"]?this.options.stepping[A==1?"x":"y"]:(this.options.realMax[A==1?"x":"y"]/this.actualSize[A==1?"width":"height"])*5},translateRange:function(A,F){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&A>=this.translateValue(this.value(1),F)){A=this.translateValue(this.value(1,F)-this.oneStep(F),F)}if(this.currentHandle[0]==this.handle[1]&&A<=this.translateValue(this.value(0),F)){A=this.translateValue(this.value(0,F)+this.oneStep(F))}}if(this.options.handles){var E=this.options.handles[this.handleIndex()];if(A<this.translateValue(E.min,F)){A=this.translateValue(E.min,F)}else{if(A>this.translateValue(E.max,F)){A=this.translateValue(E.max,F)}}}return A},handleIndex:function(){return this.handle.index(this.currentHandle[0])},translateLimits:function(A,D){if(!D){D=this.options.axis=="vertical"?2:1}if(A>=this.actualSize[D==1?"width":"height"]-this.handleSize(null,D)){A=this.actualSize[D==1?"width":"height"]-this.handleSize(null,D)}if(A<=0){A=0}return A},drag:function(G,H){var A=this.options;var J={top:G.pageY-this.offset.top-this.clickOffset.top,left:G.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}J.left=this.translateLimits(J.left,1);J.top=this.translateLimits(J.top,2);if(A.stepping.x){var I=this.convertValue(J.left,1);I=Math.round(I/A.stepping.x)*A.stepping.x;J.left=this.translateValue(I,1)}if(A.stepping.y){var I=this.convertValue(J.top,2);I=Math.round(I/A.stepping.y)*A.stepping.y;J.top=this.translateValue(I,2)}J.left=this.translateRange(J.left,1);J.top=this.translateRange(J.top,2);if(A.axis!="vertical"){this.currentHandle.css({left:J.left})}if(A.axis!="horizontal"){this.currentHandle.css({top:J.top})}if(this.rangeElement){this.updateRange()}this.propagate("slide",G);return false},moveTo:function(L,M,K){var J=this.options;if(M==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(M==undefined&&!this.currentHandle){M=0}if(M!=undefined){this.currentHandle=this.previousHandle=B(this.handle[M]||M)}if(L.x!==undefined&&L.y!==undefined){var P=L.x;var A=L.y}else{var P=L,A=L}if(P&&P.constructor!=Number){var N=/^\-\=/.test(P),O=/^\+\=/.test(P);if(N){P=this.value(null,1)-parseInt(P.replace("-=",""),10)}else{if(O){P=this.value(null,1)+parseInt(P.replace("+=",""),10)}}}if(A&&A.constructor!=Number){var N=/^\-\=/.test(A),O=/^\+\=/.test(A);if(N){A=this.value(null,2)-parseInt(A.replace("-=",""),10)}else{if(O){A=this.value(null,2)+parseInt(A.replace("+=",""),10)}}}if(J.axis!="vertical"&&P){if(J.stepping.x){P=Math.round(P/J.stepping.x)*J.stepping.x}P=this.translateValue(P,1);P=this.translateLimits(P,1);P=this.translateRange(P,1);this.currentHandle.css({left:P})}if(J.axis!="horizontal"&&A){if(J.stepping.y){A=Math.round(A/J.stepping.y)*J.stepping.y}A=this.translateValue(A,2);A=this.translateLimits(A,2);A=this.translateRange(A,2);this.currentHandle.css({top:A})}if(this.rangeElement){this.updateRange()}if(!K){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});B.ui.slider.defaults={handle:".ui-slider-handle"}})(jQuery);(function(B){B.fn.tabs=function(){var A=typeof arguments[0]=="string"&&arguments[0];var D=A&&Array.prototype.slice.call(arguments,1)||arguments;return A=="length"?B.data(this[0],"tabs").$tabs.length:this.each(function(){if(A){var C=B.data(this,"tabs");if(C){C[A].apply(C,D)}}else{new B.ui.tabs(this,D[0]||{})}})};B.ui.tabs=function(A,E){var F=this;this.options=B.extend({},B.ui.tabs.defaults,E);this.element=A;if(E.selected===null){this.options.selected=null}this.options.event+=".tabs";B(A).bind("setData.tabs",function(D,H,C){if((/^selected/).test(H)){F.select(C)}else{F.options[H]=C;F.tabify()}}).bind("getData.tabs",function(C,D){return F.options[D]});B.data(A,"tabs",this);this.tabify(true)};B.ui.tabs.defaults={selected:0,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"};B.extend(B.ui.tabs.prototype,{tabId:function(A){return A.title&&A.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+B.data(A)},ui:function(A,D){return{instance:this,options:this.options,tab:A,panel:D}},tabify:function(S){this.$lis=B("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return B("a",this)[0]});this.$panels=B([]);var R=this,b=this.options;this.$tabs.each(function(E,F){if(F.hash&&F.hash.replace("#","")){R.$panels=R.$panels.add(F.hash)}else{if(B(F).attr("href")!="#"){B.data(F,"href.tabs",F.href);B.data(F,"load.tabs",F.href);var C=R.tabId(F);F.href="#"+C;var D=B("#"+C);if(!D.length){D=B(b.panelTemplate).attr("id",C).addClass(b.panelClass).insertAfter(R.$panels[E-1]||R.element);D.data("destroy.tabs",true)}R.$panels=R.$panels.add(D)}else{b.disabled.push(E+1)}}});if(S){B(this.element).hasClass(b.navClass)||B(this.element).addClass(b.navClass);this.$panels.each(function(){var C=B(this);C.hasClass(b.panelClass)||C.addClass(b.panelClass)});this.$tabs.each(function(D,G){if(location.hash){if(G.hash==location.hash){b.selected=D;if(B.browser.msie||B.browser.opera){var E=B(location.hash),C=E.attr("id");E.attr("id","");setTimeout(function(){E.attr("id",C)},500)}scrollTo(0,0);return false}}else{if(b.cookie){var F=parseInt(B.cookie("ui-tabs"+B.data(R.element)),10);if(F&&R.$tabs[F]){b.selected=F;return false}}else{if(R.$lis.eq(D).hasClass(b.selectedClass)){b.selected=D;return false}}}});this.$panels.addClass(b.hideClass);this.$lis.removeClass(b.selectedClass);if(b.selected!==null){this.$panels.eq(b.selected).show().removeClass(b.hideClass);this.$lis.eq(b.selected).addClass(b.selectedClass)}var A=b.selected!==null&&B.data(this.$tabs[b.selected],"load.tabs");if(A){this.load(b.selected)}b.disabled=B.unique(b.disabled.concat(B.map(this.$lis.filter("."+b.disabledClass),function(C,D){return R.$lis.index(C)}))).sort();B(window).bind("unload",function(){R.$tabs.unbind(".tabs");R.$lis=R.$tabs=R.$panels=null})}for(var Y=0,T;T=this.$lis[Y];Y++){B(T)[B.inArray(Y,b.disabled)!=-1&&!B(T).hasClass(b.selectedClass)?"addClass":"removeClass"](b.disabledClass)}if(b.cache===false){this.$tabs.removeData("cache.tabs")}var P,W,Q={"min-width":0,duration:1},a="normal";if(b.fx&&b.fx.constructor==Array){P=b.fx[0]||Q,W=b.fx[1]||Q}else{P=W=b.fx||Q}var X={display:"",overflow:"",height:""};if(!B.browser.msie){X.opacity=""}function U(D,E,C){E.animate(P,P.duration||a,function(){E.addClass(b.hideClass).css(X);if(B.browser.msie&&P.opacity){E[0].style.filter=""}if(C){V(D,C,E)}})}function V(D,C,E){if(W===Q){C.css("display","block")}C.animate(W,W.duration||a,function(){C.removeClass(b.hideClass).css(X);if(B.browser.msie&&W.opacity){C[0].style.filter=""}B(R.element).triggerHandler("tabsshow",[R.ui(D,C[0])],b.show)})}function Z(E,C,F,D){C.addClass(b.selectedClass).siblings().removeClass(b.selectedClass);U(E,F,D)}this.$tabs.unbind(".tabs").bind(b.event,function(){var C=B(this).parents("li:eq(0)"),F=R.$panels.filter(":visible"),D=B(this.hash);if((C.hasClass(b.selectedClass)&&!b.unselect)||C.hasClass(b.disabledClass)||B(this).hasClass(b.loadingClass)||B(R.element).triggerHandler("tabsselect",[R.ui(this,D[0])],b.select)===false){this.blur();return false}R.options.selected=R.$tabs.index(this);if(b.unselect){if(C.hasClass(b.selectedClass)){R.options.selected=null;C.removeClass(b.selectedClass);R.$panels.stop();U(this,F);this.blur();return false}else{if(!F.length){R.$panels.stop();var E=this;R.load(R.$tabs.index(this),function(){C.addClass(b.selectedClass).addClass(b.unselectClass);V(E,D)});this.blur();return false}}}if(b.cookie){B.cookie("ui-tabs"+B.data(R.element),R.options.selected,b.cookie)}R.$panels.stop();if(D.length){var E=this;R.load(R.$tabs.index(this),F.length?function(){Z(E,C,F,D)}:function(){C.addClass(b.selectedClass);V(E,D)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(B.browser.msie){this.blur()}return false});if(!(/^click/).test(b.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(M,N,O){if(O==undefined){O=this.$tabs.length}var K=this.options;var A=B(K.tabTemplate.replace(/#\{href\}/,M).replace(/#\{label\}/,N));A.data("destroy.tabs",true);var J=M.indexOf("#")==0?M.replace("#",""):this.tabId(B("a:first-child",A)[0]);var L=B("#"+J);if(!L.length){L=B(K.panelTemplate).attr("id",J).addClass(K.panelClass).addClass(K.hideClass);L.data("destroy.tabs",true)}if(O>=this.$lis.length){A.appendTo(this.element);L.appendTo(this.element.parentNode)}else{A.insertBefore(this.$lis[O]);L.insertBefore(this.$panels[O])}K.disabled=B.map(K.disabled,function(C,D){return C>=O?++C:C});this.tabify();if(this.$tabs.length==1){A.addClass(K.selectedClass);L.removeClass(K.hideClass);var P=B.data(this.$tabs[0],"load.tabs");if(P){this.load(O,P)}}B(this.element).triggerHandler("tabsadd",[this.ui(this.$tabs[O],this.$panels[O])],K.add)},remove:function(H){var F=this.options,A=this.$lis.eq(H).remove(),G=this.$panels.eq(H).remove();if(A.hasClass(F.selectedClass)&&this.$tabs.length>1){this.select(H+(H+1<this.$tabs.length?1:-1))}F.disabled=B.map(B.grep(F.disabled,function(C,D){return C!=H}),function(C,D){return C>=H?--C:C});this.tabify();B(this.element).triggerHandler("tabsremove",[this.ui(A.find("a")[0],G[0])],F.remove)},enable:function(F){var E=this.options;if(B.inArray(F,E.disabled)==-1){return }var A=this.$lis.eq(F).removeClass(E.disabledClass);if(B.browser.safari){A.css("display","inline-block");setTimeout(function(){A.css("display","block")},0)}E.disabled=B.grep(E.disabled,function(C,D){return C!=F});B(this.element).triggerHandler("tabsenable",[this.ui(this.$tabs[F],this.$panels[F])],E.enable)},disable:function(E){var F=this,A=this.options;if(E!=A.selected){this.$lis.eq(E).addClass(A.disabledClass);A.disabled.push(E);A.disabled.sort();B(this.element).triggerHandler("tabsdisable",[this.ui(this.$tabs[E],this.$panels[E])],A.disable)}},select:function(A){if(typeof A=="string"){A=this.$tabs.index(this.$tabs.filter("[href$="+A+"]")[0])}this.$tabs.eq(A).trigger(this.options.event)},load:function(U,P){var O=this,M=this.options,A=this.$tabs.eq(U),Q=A[0],T=P==undefined||P===false,N=A.data("load.tabs");P=P||function(){};if(!N||(B.data(Q,"cache.tabs")&&!T)){P();return }if(M.spinner){var S=B("span",Q);S.data("label.tabs",S.html()).html("<em>"+M.spinner+"</em>")}var R=function(){O.$tabs.filter("."+M.loadingClass).each(function(){B(this).removeClass(M.loadingClass);if(M.spinner){var C=B("span",this);C.html(C.data("label.tabs")).removeData("label.tabs")}});O.xhr=null};var V=B.extend({},M.ajaxOptions,{url:N,success:function(C,D){B(Q.hash).html(C);R();P();if(M.cache){B.data(Q,"cache.tabs",true)}B(O.element).triggerHandler("tabsload",[O.ui(O.$tabs[U],O.$panels[U])],M.load);M.ajaxOptions.success&&M.ajaxOptions.success(C,D)}});if(this.xhr){this.xhr.abort();R()}A.addClass(M.loadingClass);setTimeout(function(){O.xhr=B.ajax(V)},0)},url:function(A,D){this.$tabs.eq(A).removeData("cache.tabs").data("load.tabs",D)},destroy:function(){var A=this.options;B(this.element).unbind(".tabs").removeClass(A.navClass).removeData("tabs");this.$tabs.each(function(){var F=B.data(this,"href.tabs");if(F){this.href=F}var E=B(this).unbind(".tabs");B.each(["href","load","cache"],function(D,C){E.removeData(C+".tabs")})});this.$lis.add(this.$panels).each(function(){if(B.data(this,"destroy.tabs")){B(this).remove()}else{B(this).removeClass([A.selectedClass,A.unselectClass,A.disabledClass,A.panelClass,A.hideClass].join(" "))}})}});B.extend(B.ui.tabs.prototype,{rotation:null,rotate:function(K,H){H=H||false;var L=this,I=this.options.selected;function A(){L.rotation=setInterval(function(){I=++I<L.$tabs.length?I:0;L.select(I)},K)}function J(C){if(!C||C.clientX){clearInterval(L.rotation)}}if(K){A();if(!H){this.$tabs.bind(this.options.event,J)}else{this.$tabs.bind(this.options.event,function(){J();I=L.options.selected;A()})}}else{J();this.$tabs.unbind(this.options.event,J)}}})})(jQuery);(function($){function Datepicker(){this.debug=false;this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,speed:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - "};$.extend(this._defaults,this.regional[""]);this._datepickerDiv=$('<div id="datepicker_div">')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id},_getInst:function(id){return this._inst[id]||id},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var instSettings=(inlineSettings?$.extend(settings||{},inlineSettings||{}):settings);if(nodeName=="input"){var inst=(inst&&!inlineSettings?inst:new DatepickerInstance(instSettings,false));this._connectDatepicker(target,inst)}else{if(nodeName=="div"||nodeName=="span"){var inst=new DatepickerInstance(instSettings,true);this._inlineDatepicker(target,inst)}}},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var calId=target._calId;target._calId=null;var $target=$(target);if(nodeName=="input"){$target.siblings(".datepicker_append").replaceWith("").end().siblings(".datepicker_trigger").replaceWith("").end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);var wrapper=$target.parents(".datepicker_wrap");if(wrapper){wrapper.replaceWith(wrapper.html())}}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}if($("input[_calId="+calId+"]").length==0){this._inst[calId]=null}},_enableDatepicker:function(target){target.disabled=false;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=false}).end().siblings("img.datepicker_trigger").css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=true}).end().siblings("img.datepicker_trigger").css({opacity:"0.5",cursor:"default"});this._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[$.datepicker._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=this._getInst(target._calId)){extendRemove(inst._settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){if(inst=this._getInst(target._calId)){inst._setDate(date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target._calId);return(inst?inst._getDate():null)},_doKeyDown:function(e){var inst=$.datepicker._getInst(this._calId);if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(inst,inst._selectedMonth,inst._selectedYear,$("td.datepicker_daysCellOver",inst._datepickerDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,inst._get("speed"));break;case 33:$.datepicker._adjustDate(inst,(e.ctrlKey?-1:-inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(inst,(e.ctrlKey?+1:+inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(inst)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(inst)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(inst,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(inst,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(inst,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(inst,+7,"D")}break}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}}},_doKeyPress:function(e){var inst=$.datepicker._getInst(this._calId);var chars=$.datepicker._possibleChars(inst._get("dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)},_connectDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }var appendText=inst._get("appendText");var isRTL=inst._get("isRTL");if(appendText){if(isRTL){input.before('<span class="datepicker_append">'+appendText)}else{input.after('<span class="datepicker_append">'+appendText)}}var showOn=inst._get("showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){input.wrap('<span class="datepicker_wrap">');var buttonText=inst._get("buttonText");var buttonImage=inst._get("buttonImage");var trigger=$(inst._get("buttonImageOnly")?$("<img>").addClass("datepicker_trigger").attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button>").addClass("datepicker_trigger").attr({type:"button"}).html(buttonImage!=""?$("<img>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText));if(isRTL){input.before(trigger)}else{input.after(trigger)}trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value}).bind("getData.datepicker",function(event,key){return inst._get(key)});input[0]._calId=inst._id},_inlineDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }input.addClass(this.markerClassName).append(inst._datepickerDiv).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value}).bind("getData.datepicker",function(event,key){return inst._get(key)});input[0]._calId=inst._id;this._updateDatepicker(inst)},_inlineShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0]).width())},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new DatepickerInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);this._dialogInput[0]._calId=inst._id}extendRemove(inst._settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst._settings.onSelect=onSelect;this._inDialog=true;this._datepickerDiv.addClass("datepicker_dialog");this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this._datepickerDiv)}return this},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input._calId);var beforeShow=inst._get("beforeShow");extendRemove(inst._settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;inst._setDateFromField(input);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed"});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}inst._datepickerDiv.css("position",($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute"))).css({left:$.datepicker._pos[0]+"px",top:$.datepicker._pos[1]+"px"});$.datepicker._pos=null;inst._rangeStart=null;$.datepicker._updateDatepicker(inst);if(!inst._inline){var speed=inst._get("speed");var postProcess=function(){$.datepicker._datepickerShowing=true;$.datepicker._afterShow(inst)};var showAnim=inst._get("showAnim")||"show";inst._datepickerDiv[showAnim](speed,postProcess);if(speed==""){postProcess()}if(inst._input[0].type!="hidden"){inst._input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){inst._datepickerDiv.empty().append(inst._generateDatepicker());var numMonths=inst._getNumberOfMonths();if(numMonths[0]!=1||numMonths[1]!=1){inst._datepickerDiv.addClass("datepicker_multi")}else{inst._datepickerDiv.removeClass("datepicker_multi")}if(inst._get("isRTL")){inst._datepickerDiv.addClass("datepicker_rtl")}else{inst._datepickerDiv.removeClass("datepicker_rtl")}if(inst._input&&inst._input[0].type!="hidden"){inst._input[0].focus()}},_afterShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0])[0].offsetWidth);if($.browser.msie&&parseInt($.browser.version)<7){$("#datepicker_cover").css({width:inst._datepickerDiv.width()+4,height:inst._datepickerDiv.height()+4})}var isFixed=inst._datepickerDiv.css("position")=="fixed";var pos=inst._input?$.datepicker._findPos(inst._input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=(isFixed?0:document.documentElement.scrollLeft||document.body.scrollLeft);var scrollY=(isFixed?0:document.documentElement.scrollTop||document.body.scrollTop);if((inst._datepickerDiv.offset().left+inst._datepickerDiv.width()-(isFixed&&$.browser.msie?document.documentElement.scrollLeft:0))>(browserWidth+scrollX)){inst._datepickerDiv.css("left",Math.max(scrollX,pos[0]+(inst._input?$(inst._input[0]).width():null)-inst._datepickerDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+"px")}if((inst._datepickerDiv.offset().top+inst._datepickerDiv.height()-(isFixed&&$.browser.msie?document.documentElement.scrollTop:0))>(browserHeight+scrollY)){inst._datepickerDiv.css("top",Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+"px")}},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,speed){var inst=this._curInst;if(!inst){return }var rangeSelect=inst._get("rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate(inst,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear))}this._stayOpen=false;if(this._datepickerShowing){speed=(speed!=null?speed:inst._get("speed"));var showAnim=inst._get("showAnim");inst._datepickerDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))](speed,function(){$.datepicker._tidyDialog(inst)});if(speed==""){this._tidyDialog(inst)}var onClose=inst._get("onClose");if(onClose){onClose.apply((inst._input?inst._input[0]:null),[inst._getDate(),inst])}this._datepickerShowing=false;this._lastInput=null;inst._settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this._datepickerDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst._datepickerDiv.removeClass("datepicker_dialog").unbind(".datepicker");$(".datepicker_prompt",inst._datepickerDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#datepicker_div").length==0)&&($target.attr("class")!="datepicker_trigger")&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._drawMonth=inst._selectedMonth=date.getMonth();inst._drawYear=inst._selectedYear=date.getFullYear();this._adjustDate(inst)},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=="M"?"_drawMonth":"_drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(inst)},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var inst=this._getInst(id);inst._settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).is(".datepicker_unselectable")){return }var inst=this._getInst(id);var rangeSelect=inst._get("rangeSelect");if(rangeSelect){if(!this._stayOpen){$(".datepicker td").removeClass("datepicker_currentDay");$(td).addClass("datepicker_currentDay")}this._stayOpen=!this._stayOpen}inst._selectedDay=inst._currentDay=$("a",td).html();inst._selectedMonth=inst._currentMonth=month;inst._selectedYear=inst._currentYear=year;this._selectDate(id,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));if(this._stayOpen){inst._endDay=inst._endMonth=inst._endYear=null;inst._rangeStart=new Date(inst._currentYear,inst._currentMonth,inst._currentDay);this._updateDatepicker(inst)}else{if(rangeSelect){inst._endDay=inst._currentDay;inst._endMonth=inst._currentMonth;inst._endYear=inst._currentYear;inst._selectedDay=inst._currentDay=inst._rangeStart.getDate();inst._selectedMonth=inst._currentMonth=inst._rangeStart.getMonth();inst._selectedYear=inst._currentYear=inst._rangeStart.getFullYear();inst._rangeStart=null;if(inst._inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var inst=this._getInst(id);if(inst._get("mandatory")){return }this._stayOpen=false;inst._endDay=inst._endMonth=inst._endYear=inst._rangeStart=null;this._selectDate(inst,"")},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._rangeStart){dateStr=inst._formatDate(inst._rangeStart)+inst._get("rangeSeparator")+dateStr}if(inst._input){inst._input.val(dateStr)}var onSelect=inst._get("onSelect");if(onSelect){onSelect.apply((inst._input?inst._input[0]:null),[dateStr,inst])}else{if(inst._input){inst._input.trigger("change")}}if(inst._inline){this._updateDatepicker(inst)}else{if(!this._stayOpen){this._hideDatepicker(null,inst._get("speed"));this._lastInput=inst._input[0];if(typeof (inst._input[0])!="object"){inst._input[0].focus()}this._lastInput=null}}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate(),(date.getTimezoneOffset()/-60));var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate(inst._get("dateStatus"),date,inst._getFormatConfig())},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var size=(match=="y"?4:2);var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);size--}if(size==(match=="y"?4:2)){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value){return(lookAhead(match)&&value<10?"0":"")+value};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d"||"m"||"y":chars+="0123456789";break;case"D"||"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars}});function DatepickerInstance(settings,inline){this._id=$.datepicker._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._drawMonth=0;this._drawYear=0;this._input=null;this._inline=inline;this._datepickerDiv=(!inline?$.datepicker._datepickerDiv:$('<div id="datepicker_div_'+this._id+'" class="datepicker_inline">'));this._settings=extendRemove(settings||{});if(inline){this._setDate(this._getDefaultDate())}}$.extend(DatepickerInstance.prototype,{_get:function(name){return this._settings[name]||$.datepicker._defaults[name]},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get("dateFormat");var dates=this._input?this._input.val().split(this._get("rangeSeparator")):null;this._endDay=this._endMonth=this._endYear=null;var date=defaultDate=this._getDefaultDate();if(dates.length>0){var settings=this._getFormatConfig();if(dates.length>1){date=$.datepicker.parseDate(dateFormat,dates[1],settings)||defaultDate;this._endDay=date.getDate();this._endMonth=date.getMonth();this._endYear=date.getFullYear()}try{date=$.datepicker.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){$.datepicker.log(e);date=defaultDate}}this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear();this._currentDay=(dates[0]?date.getDate():0);this._currentMonth=(dates[0]?date.getMonth():0);this._currentYear=(dates[0]?date.getFullYear():0);this._adjustDate()},_getDefaultDate:function(){var date=this._determineDate("defaultDate",new Date());var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(name,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var matches=/^([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?$/.exec(offset);if(matches){var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();switch(matches[2]||"d"){case"d":case"D":day+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break}date=new Date(year,month,day)}return date};var date=this._get(name);return(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?offsetNumeric(date):date)))},_setDate:function(date,endDate){this._selectedDay=this._currentDay=date.getDate();this._drawMonth=this._selectedMonth=this._currentMonth=date.getMonth();this._drawYear=this._selectedYear=this._currentYear=date.getFullYear();if(this._get("rangeSelect")){if(endDate){this._endDay=endDate.getDate();this._endMonth=endDate.getMonth();this._endYear=endDate.getFullYear()}else{this._endDay=this._currentDay;this._endMonth=this._currentMonth;this._endYear=this._currentYear}}this._adjustDate()},_getDate:function(){var startDate=(!this._currentYear||(this._input&&this._input.val()=="")?null:new Date(this._currentYear,this._currentMonth,this._currentDay));if(this._get("rangeSelect")){return[startDate,(!this._endYear?null:new Date(this._endYear,this._endMonth,this._endDay))]}else{return startDate}},_generateDatepicker:function(){var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get("showStatus");var isRTL=this._get("isRTL");var clear=(this._get("mandatory")?"":'<div class="datepicker_clear"><a onclick="jQuery.datepicker._clearDate('+this._id+');"'+(showStatus?this._addStatus(this._get("clearStatus")||"&#xa0;"):"")+">"+this._get("clearText")+"</a></div>");var controls='<div class="datepicker_control">'+(isRTL?"":clear)+'<div class="datepicker_close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(this._get("closeStatus")||"&#xa0;"):"")+">"+this._get("closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get("prompt");var closeAtTop=this._get("closeAtTop");var hideIfNoPrevNext=this._get("hideIfNoPrevNext");var numMonths=this._getNumberOfMonths();var stepMonths=this._get("stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");var drawMonth=this._drawMonth;var drawYear=this._drawYear;if(maxDate){var maxDraw=new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate());maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(new Date(drawYear,drawMonth,1)>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prev='<div class="datepicker_prev">'+(this._canAdjustMonth(-1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("prevStatus")||"&#xa0;"):"")+">"+this._get("prevText")+"</a>":(hideIfNoPrevNext?"":"<label>"+this._get("prevText")+"</label>"))+"</div>";var next='<div class="datepicker_next">'+(this._canAdjustMonth(+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("nextStatus")||"&#xa0;"):"")+">"+this._get("nextText")+"</a>":(hideIfNoPrevNext?">":"<label>"+this._get("nextText")+"</label>"))+"</div>";var html=(prompt?'<div class="datepicker_prompt">'+prompt+"</div>":"")+(closeAtTop&&!this._inline?controls:"")+'<div class="datepicker_links">'+(isRTL?next:prev)+(this._isInRange(today)?'<div class="datepicker_current"><a onclick="jQuery.datepicker._gotoToday('+this._id+');"'+(showStatus?this._addStatus(this._get("currentStatus")||"&#xa0;"):"")+">"+this._get("currentText")+"</a></div>":"")+(isRTL?prev:next)+"</div>";var showWeeks=this._get("showWeeks");for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,this._selectedDay);html+='<div class="datepicker_oneMonth'+(col==0?" datepicker_newRow":"")+'">'+this._generateMonthYearHeader(drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0)+'<table class="datepicker" cellpadding="0" cellspacing="0"><thead><tr class="datepicker_titleRow">'+(showWeeks?"<td>"+this._get("weekHeader")+"</td>":"");var firstDay=this._get("firstDay");var changeFirstDay=this._get("changeFirstDay");var dayNames=this._get("dayNames");var dayNamesShort=this._get("dayNamesShort");var dayNamesMin=this._get("dayNamesMin");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var status=this._get("dayStatus")||"&#xa0;";status=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="datepicker_weekEndCell"':"")+">"+(!changeFirstDay?"<span":'<a onclick="jQuery.datepicker._changeFirstDay('+this._id+", "+day+');"')+(showStatus?this._addStatus(status):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==this._selectedYear&&drawMonth==this._selectedMonth){this._selectedDay=Math.min(this._selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var currentDate=(!this._currentDay?new Date(9999,9,9):new Date(this._currentYear,this._currentMonth,this._currentDay));var endDate=this._endDay?new Date(this._endYear,this._endMonth,this._endDay):currentDate;var printDate=new Date(drawYear,drawMonth,1-leadDays);var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var beforeShowDay=this._get("beforeShowDay");var showOtherMonths=this._get("showOtherMonths");var calculateWeek=this._get("calculateWeek")||$.datepicker.iso8601Week;var dateStatus=this._get("statusForDate")||$.datepicker.dateStatus;for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="datepicker_daysRow">'+(showWeeks?'<td class="datepicker_weekCol">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((this._input?this._input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="datepicker_daysCell'+((dow+firstDay+6)%7>=5?" datepicker_weekEndCell":"")+(otherMonth?" datepicker_otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==this._selectedMonth?" datepicker_daysCellOver":"")+(unselectable?" datepicker_unselectable":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" datepicker_currentDay":"")+(printDate.getTime()==today.getTime()?" datepicker_today":""))+'"'+(unselectable?"":" onmouseover=\"jQuery(this).addClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('"+(dateStatus.apply((this._input?this._input[0]:null),[printDate,this])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay('+this._id+","+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div id="datepicker_status_'+this._id+'" class="datepicker_status">'+(this._get("initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!this._inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!this._inline?'<iframe src="javascript:false;" class="datepicker_cover"></iframe>':"");return html},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showStatus=this._get("showStatus");var html='<div class="datepicker_header">';var monthNames=this._get("monthNames");if(secondary||!this._get("changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="datepicker_newMonth" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get("changeYear")){html+=drawYear}else{var years=this._get("yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="datepicker_newYear" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(text){return" onmouseover=\"jQuery('#datepicker_status_"+this._id+"').html('"+text+"');\" onmouseout=\"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');\""},_adjustDate:function(offset,period){var year=this._drawYear+(period=="Y"?offset:0);var month=this._drawMonth+(period=="M"?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear()},_getNumberOfMonths:function(){var numMonths=this._get("numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(minMax,checkRange){var date=this._determineDate(minMax+"Date",null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return date||(checkRange?this._rangeStart:null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(offset,curYear,curMonth){var numMonths=this._getNumberOfMonths();var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(date)},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart<newMinDate?this._rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate("min");var maxDate=this._getMinMaxDate("max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(){var shortYearCutoff=this._get("shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get("dayNamesShort"),dayNames:this._get("dayNames"),monthNamesShort:this._get("monthNamesShort"),monthNames:this._get("monthNames")}},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear}var date=(day?(typeof day=="object"?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get("dateFormat"),date,this._getFormatConfig())}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null}}return target}$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$(document).ready(function(){$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick)});$.datepicker=new Datepicker()})(jQuery);(function($){ChiliBook={version:"1.9",automatic:true,automaticSelector:"code",codeLanguage:function(a){var b=$(a).attr("class");return b?b:""},metadataSelector:"object.chili",recipeLoading:true,recipeFolder:"",stylesheetLoading:true,stylesheetFolder:"",defaultReplacement:'<span class="$0">$$</span>',replaceSpace:"&#160;",replaceTab:"&#160;&#160;&#160;&#160;",replaceNewLine:"&#160;<br/>",recipes:{},queue:{},preFixCopy:document.selection&&document.selection.createRange,preContent:"",preElement:null};$.metaobjects=function(c){c=$.extend({context:document,clean:true,selector:"object.metaobject"},c);function jsValue(a){eval("value = "+a+";");return a}return $(c.selector,c.context).each(function(){var b={target:this.parentNode};$("> param[@name=metaparam]",this).each(function(){$.extend(b,jsValue(this.value))});$("> param",this).not("[@name=metaparam]").each(function(){var a=this.name,value=jsValue(this.value);$(b.target).each(function(){this[a]=value})});if(c.clean){$(this).remove()}})};$.fn.chili=function(r){var s=$.extend({},ChiliBook,r||{});function cook(k,l){function prepareStep(a,b){var c=(typeof b.exp=="string")?b.exp:b.exp.source;o.push({stepName:a,exp:"("+c+")",length:1+(c.replace(/\\./g,"%").replace(/\[.*?\]/g,"%").match(/\((?!\?)/g)||[]).length,replacement:(b.replacement)?b.replacement:s.defaultReplacement})}function knowHow(){var b=1;var c=[];for(var i=0;i<o.length;i++){var d=o[i].exp;d=d.replace(/\\\\|\\(\d+)/g,function(m,a){return !a?m:"\\"+(b+1+parseInt(a,10))});c.push(d);b+=o[i].length}var e="((?:\\s|\\S)*?)";var f="((?:\\s|\\S)+)";var g="(?:"+c.join("|")+")";g=e+g+"|"+f;return new RegExp(g,(l.ignoreCase)?"gi":"g")}function escapeHTML(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;")}function replaceSpaces(b){return b.replace(/ +/g,function(a){return a.replace(/ /g,n)})}function filter(a){a=escapeHTML(a);if(n){a=replaceSpaces(a)}return a}function chef(){var i=0;var j=2;var c=arguments[1];var d=arguments[arguments.length-3];if(!d){var e;while(e=o[i++]){var f=arguments;if(f[j]){var g=/(\\\$)|(?:\$\$)|(?:\$(\d+))/g;var h=e.replacement.replace(g,function(m,a,K){var b="";if(a){return"$"}else{if(!K){return filter(f[j])}else{if(K=="0"){return e.stepName}else{return filter(f[j+parseInt(K,10)])}}}});return filter(c)+h}else{j+=e.length}}}else{return filter(d)}}var n=s.replaceSpace;var o=[];for(var p in l.steps){prepareStep(p,l.steps[p])}var q=k.replace(knowHow(),chef);return q}function checkCSS(a){if(!s.queue[a]){var e=document.createElement("link");e.rel="stylesheet";e.type="text/css";e.href=a;document.getElementsByTagName("head")[0].appendChild(e);s.queue[a]=true}}function makeDish(a,b){var c=s.recipes[b];if(!c){return }$el=$(a);var d=$el.text();if(!d){return }d=d.replace(/\r\n?/g,"\n");var e=cook(d,c);if(s.replaceTab){e=e.replace(/\t/g,s.replaceTab)}if(s.replaceNewLine){e=e.replace(/\n/g,s.replaceNewLine)}a.innerHTML=e;if(ChiliBook.preFixCopy){$el.parents().filter("pre").bind("mousedown",function(){ChiliBook.preElement=this}).bind("mouseup",function(){if(ChiliBook.preElement==this){ChiliBook.preContent=document.selection.createRange().htmlText}})}}function getPath(a,b){var c={recipeFolder:s.recipeFolder,recipeFile:a+".js",stylesheetFolder:s.stylesheetFolder,stylesheetFile:a+".css"};var d;if(b&&typeof b=="object"){d=$.extend(c,b)}else{d=c}return{recipe:d.recipeFolder+d.recipeFile,stylesheet:d.stylesheetFolder+d.stylesheetFile}}if(s.metadataSelector){$.metaobjects({context:this,selector:s.metadataSelector})}this.each(function(){var b=this;var c=s.codeLanguage(b);if(""!=c){var d=getPath(c,b.chili);if(s.recipeLoading||b.chili){if(!s.queue[d.recipe]){try{s.queue[d.recipe]=[b];$.getJSON(d.recipe,function(a){a.path=d.recipe;s.recipes[d.recipe]=a;if(s.stylesheetLoading){checkCSS(d.stylesheet)}var q=s.queue[d.recipe];for(var i=0,iTop=q.length;i<iTop;i++){makeDish(q[i],d.recipe)}})}catch(recipeNotAvailable){alert("the recipe for '"+c+"' was not found in '"+d.recipe+"'")}}else{s.queue[d.recipe].push(b)}makeDish(b,d.recipe)}else{makeDish(b,d.recipe)}}});return this};$(function(){if(ChiliBook.automatic){if(ChiliBook.elementPath){ChiliBook.automaticSelector=ChiliBook.elementPath;if(ChiliBook.elementClass){ChiliBook.codeLanguage=function(a){var b=new RegExp("\\b"+ChiliBook.elementClass+"\\b","gi");var c=$(a).attr("class");if(!c){return""}var d=$.trim(c.replace(b,""));return d}}}$(ChiliBook.automaticSelector).chili()}if(ChiliBook.preFixCopy){function preformatted(a){if(""==a){return""}do{var b=(new Date()).valueOf()}while(a.indexOf(b)>-1);a=a.replace(/\<br[^>]*?\>/ig,b);var c=document.createElement("<pre>");c.innerHTML=a;a=c.innerText.replace(new RegExp(b,"g"),"\r\n");return a}$("body").bind("copy",function(){if(""!=ChiliBook.preContent){window.clipboardData.setData("Text",preformatted(ChiliBook.preContent));event.returnValue=false}}).bind("mousedown",function(){ChiliBook.preContent=""}).bind("mouseup",function(){ChiliBook.preElement=null})}})})(jQuery);ChiliBook.recipeLoading=false;ChiliBook.recipes["html.js"]={steps:{mlcom:{exp:/\<!--(?:\w|\W)*?--\>/},tag:{exp:/(?:\<\!?[\w:]+)|(?:\>)|(?:\<\/[\w:]+\>)|(?:\/\>)/},php:{exp:/(?:\<\?php\s)|(?:\<\?)|(?:\?\>)/},aname:{exp:/\s+?[\w-]+:?\w+(?=\s*=)/},avalue:{exp:/(=\s*)(([\"\'])(?:(?:[^\3\\]*?(?:\3\3|\\.))*?[^\3\\]*?)\3)/,replacement:'$1<span class="$0">$2</span>'},entity:{exp:/&[\w#]+?;/}}};ChiliBook.recipes["javascript.js"]={steps:{mlcom:{exp:/\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//},com:{exp:/\/\/.*/},regexp:{exp:/\/[^\/\\\n]*(?:\\.[^\/\\\n]*)*\/[gim]*/},string:{exp:/(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/},numbers:{exp:/\b[+-]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][+-]?\d+)?\b/},keywords:{exp:/\b(arguments|break|case|catch|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|try|typeof|var|void|while|with)\b/},global:{exp:/\b(toString|valueOf|window|self|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/}}};ChiliBook.recipes["mysql.js"]={ignoreCase:true,steps:{mlcom:{exp:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//},com:{exp:/(?:--\s+.*)|(?:[^\\]\#.*)/},string:{exp:/([\"\'])(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/},quid:{exp:/(`)(?:(?:[^\1\\\r\n]*?(?:\1\1|\\.))*[^\1\\\r\n]*?)\1/},value:{exp:/\b(?:NULL|TRUE|FALSE)\b/},number:{exp:/\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/},hexnum:{exp:/\b0[xX][\dA-Fa-f]+\b|\b[xX]([\'\"])[\dA-Fa-f]+\1/},op:{exp:/!=|&&|<|<<|<=|<=>|<>|=|>|>=|>>|\|\|/},variable:{exp:/@([$.\w]+|([`\"\'])(?:(?:[^\2\\\r\n]*?(?:\2\2|\\.))*[^\2\\\r\n]*?)\2)/,replacement:'<span class="keyword">@</span><span class="variable">$1</span>'},keyword:{exp:/\b(?:A(?:CTION|DD|FTER|G(?:AINST|GREGATE)|L(?:GORITHM|L|TER)|N(?:ALYZE|D|Y)|S(?:C(?:II|)|ENSITIVE|)|UTO_INCREMENT|VG(?:_ROW_LENGTH|))|B(?:ACKUP|DB|E(?:FORE|GIN|RKELEYDB|TWEEN)|I(?:GINT|N(?:ARY|LOG)|T)|LOB|O(?:OL(?:EAN|)|TH)|TREE|Y(?:TE|))|C(?:A(?:CHE|LL|S(?:CADE(?:D|)|E))|H(?:A(?:IN|NGE(?:D|)|R(?:ACTER|SET|))|ECK(?:SUM|))|IPHER|L(?:IENT|OSE)|O(?:DE|L(?:LAT(?:E|ION)|UMN(?:S|))|M(?:M(?:ENT|IT(?:TED|))|P(?:ACT|RESSED))|N(?:CURRENT|DITION|NECTION|S(?:ISTENT|TRAINT)|T(?:AINS|INUE)|VERT))|R(?:EATE|OSS)|U(?:BE|R(?:RENT_(?:DATE|TIME(?:STAMP|)|USER)|SOR)))|D(?:A(?:T(?:A(?:BASE(?:S|)|)|E(?:TIME|))|Y(?:_(?:HOUR|MI(?:CROSECOND|NUTE)|SECOND)|))|E(?:ALLOCATE|C(?:IMAL|LARE|)|F(?:AULT|INER)|L(?:AY(?:ED|_KEY_WRITE)|ETE)|S(?:C(?:RIBE|)|_KEY_FILE)|TERMINISTIC)|I(?:RECTORY|S(?:ABLE|CARD|TINCT(?:ROW|))|V)|O(?:UBLE|)|ROP|U(?:AL|MPFILE|PLICATE)|YNAMIC)|E(?:ACH|LSE(?:IF|)|N(?:ABLE|CLOSED|D|GINE(?:S|)|UM)|RRORS|SCAPE(?:D|)|VENTS|X(?:ECUTE|I(?:STS|T)|P(?:ANSION|LAIN)|TENDED))|F(?:A(?:LSE|ST)|ETCH|I(?:ELDS|LE|RST|XED)|L(?:OAT(?:4|8|)|USH)|O(?:R(?:CE|EIGN|)|UND)|R(?:AC_SECOND|OM)|U(?:LL(?:TEXT|)|NCTION))|G(?:E(?:OMETRY(?:COLLECTION|)|T_FORMAT)|LOBAL|R(?:ANT(?:S|)|OUP))|H(?:A(?:NDLER|SH|VING)|ELP|IGH_PRIORITY|O(?:STS|UR(?:_(?:MI(?:CROSECOND|NUTE)|SECOND)|)))|I(?:DENTIFIED|F|GNORE|MPORT|N(?:DEX(?:ES|)|FILE|N(?:ER|O(?:BASE|DB))|OUT|SE(?:NSITIVE|RT(?:_METHOD|))|T(?:1|2|3|4|8|E(?:GER|RVAL)|O|)|VOKER|)|O_THREAD|S(?:OLATION|SUER|)|TERATE)|JOIN|K(?:EY(?:S|)|ILL)|L(?:A(?:NGUAGE|ST)|E(?:A(?:DING|VE(?:S|))|FT|VEL)|I(?:KE|MIT|NES(?:TRING|))|O(?:AD|C(?:AL(?:TIME(?:STAMP|)|)|K(?:S|))|GS|NG(?:BLOB|TEXT|)|OP|W_PRIORITY))|M(?:A(?:STER(?:_(?:CONNECT_RETRY|HOST|LOG_(?:FILE|POS)|P(?:ASSWORD|ORT)|S(?:ERVER_ID|SL(?:_(?:C(?:A(?:PATH|)|ERT|IPHER)|KEY)|))|USER)|)|TCH|X_(?:CONNECTIONS_PER_HOUR|QUERIES_PER_HOUR|ROWS|U(?:PDATES_PER_HOUR|SER_CONNECTIONS)))|E(?:DIUM(?:BLOB|INT|TEXT|)|RGE)|I(?:CROSECOND|DDLEINT|GRATE|N(?:UTE(?:_(?:MICROSECOND|SECOND)|)|_ROWS))|O(?:D(?:E|IF(?:IES|Y)|)|NTH)|U(?:LTI(?:LINESTRING|PO(?:INT|LYGON))|TEX))|N(?:A(?:ME(?:S|)|T(?:IONAL|URAL))|CHAR|DB(?:CLUSTER|)|E(?:W|XT)|O(?:NE|T|_WRITE_TO_BINLOG|)|U(?:LL|MERIC)|VARCHAR)|O(?:FFSET|LD_PASSWORD|N(?:E(?:_SHOT|)|)|P(?:EN|TI(?:MIZE|ON(?:ALLY|)))|R(?:DER|)|UT(?:ER|FILE|))|P(?:A(?:CK_KEYS|RTIAL|SSWORD)|HASE|O(?:INT|LYGON)|R(?:E(?:CISION|PARE|V)|I(?:MARY|VILEGES)|OCE(?:DURE|SS(?:LIST|)))|URGE)|QU(?:ARTER|ERY|ICK)|R(?:AID(?:0|_(?:CHUNKS(?:IZE|)|TYPE))|E(?:A(?:D(?:S|)|L)|COVER|DUNDANT|FERENCES|GEXP|L(?:AY_(?:LOG_(?:FILE|POS)|THREAD)|EASE|OAD)|NAME|P(?:AIR|EAT(?:ABLE|)|L(?:ACE|ICATION))|QUIRE|S(?:ET|T(?:ORE|RICT)|UME)|TURN(?:S|)|VOKE)|IGHT|LIKE|O(?:LL(?:BACK|UP)|UTINE|W(?:S|_FORMAT|))|TREE)|S(?:AVEPOINT|CHEMA(?:S|)|E(?:C(?:OND(?:_MICROSECOND|)|URITY)|LECT|NSITIVE|PARATOR|RIAL(?:IZABLE|)|SSION|T)|H(?:ARE|OW|UTDOWN)|I(?:GNED|MPLE)|LAVE|MALLINT|NAPSHOT|O(?:ME|NAME|UNDS)|P(?:ATIAL|ECIFIC)|QL(?:EXCEPTION|STATE|WARNING|_(?:B(?:IG_RESULT|UFFER_RESULT)|CA(?:CHE|LC_FOUND_ROWS)|NO_CACHE|SMALL_RESULT|T(?:HREAD|SI_(?:DAY|FRAC_SECOND|HOUR|M(?:INUTE|ONTH)|QUARTER|SECOND|WEEK|YEAR)))|)|SL|T(?:A(?:RT(?:ING|)|TUS)|O(?:P|RAGE)|R(?:AIGHT_JOIN|I(?:NG|PED)))|U(?:BJECT|PER|SPEND))|T(?:ABLE(?:S(?:PACE|)|)|E(?:MP(?:ORARY|TABLE)|RMINATED|XT)|HEN|I(?:ME(?:STAMP(?:ADD|DIFF|)|)|NY(?:BLOB|INT|TEXT))|O|R(?:A(?:ILING|NSACTION)|IGGER(?:S|)|U(?:E|NCATE))|YPE(?:S|))|U(?:N(?:COMMITTED|D(?:EFINED|O)|I(?:CODE|ON|QUE)|KNOWN|LOCK|SIGNED|TIL)|P(?:DATE|GRADE)|S(?:AGE|E(?:R(?:_RESOURCES|)|_FRM|)|ING)|TC_(?:DATE|TIME(?:STAMP|)))|V(?:A(?:LUE(?:S|)|R(?:BINARY|CHAR(?:ACTER|)|IABLES|YING))|IEW)|W(?:ARNINGS|EEK|H(?:E(?:N|RE)|ILE)|ITH|ORK|RITE)|X(?:509|A|OR)|YEAR(?:_MONTH|)|ZEROFILL)\b/},func:{exp:/\b(?:A(?:BS|COS|DD(?:DATE|TIME)|ES_(?:DECRYPT|ENCRYPT)|REA|S(?:BINARY|IN|TEXT|WK(?:B|T))|TAN(?:2|))|B(?:ENCHMARK|I(?:N|T_(?:AND|COUNT|LENGTH|OR|XOR)))|C(?:AST|E(?:IL(?:ING|)|NTROID)|HAR(?:ACTER_LENGTH|_LENGTH)|O(?:ALESCE|ERCIBILITY|MPRESS|N(?:CAT(?:_WS|)|NECTION_ID|V(?:ERT_TZ|))|S|T|UNT)|R(?:C32|OSSES)|UR(?:DATE|TIME))|D(?:A(?:TE(?:DIFF|_(?:ADD|FORMAT|SUB))|Y(?:NAME|OF(?:MONTH|WEEK|YEAR)))|E(?:CODE|GREES|S_(?:DECRYPT|ENCRYPT))|I(?:MENSION|SJOINT))|E(?:LT|N(?:C(?:ODE|RYPT)|DPOINT|VELOPE)|QUALS|X(?:P(?:ORT_SET|)|T(?:ERIORRING|RACT)))|F(?:I(?:ELD|ND_IN_SET)|LOOR|O(?:RMAT|UND_ROWS)|ROM_(?:DAYS|UNIXTIME))|G(?:E(?:OM(?:COLLFROM(?:TEXT|WKB)|ETRY(?:COLLECTIONFROM(?:TEXT|WKB)|FROM(?:TEXT|WKB)|N|TYPE)|FROM(?:TEXT|WKB))|T_LOCK)|LENGTH|R(?:EATEST|OUP_(?:CONCAT|UNIQUE_USERS)))|HEX|I(?:FNULL|N(?:ET_(?:ATON|NTOA)|STR|TER(?:IORRINGN|SECTS))|S(?:CLOSED|EMPTY|NULL|SIMPLE|_(?:FREE_LOCK|USED_LOCK)))|L(?:AST_(?:DAY|INSERT_ID)|CASE|E(?:AST|NGTH)|INE(?:FROM(?:TEXT|WKB)|STRINGFROM(?:TEXT|WKB))|N|O(?:AD_FILE|CATE|G(?:10|2|)|WER)|PAD|TRIM)|M(?:A(?:KE(?:DATE|TIME|_SET)|STER_POS_WAIT|X)|BR(?:CONTAINS|DISJOINT|EQUAL|INTERSECTS|OVERLAPS|TOUCHES|WITHIN)|D5|I(?:D|N)|LINEFROM(?:TEXT|WKB)|ONTHNAME|PO(?:INTFROM(?:TEXT|WKB)|LYFROM(?:TEXT|WKB))|ULTI(?:LINESTRINGFROM(?:TEXT|WKB)|PO(?:INTFROM(?:TEXT|WKB)|LYGONFROM(?:TEXT|WKB))))|N(?:AME_CONST|OW|U(?:LLIF|M(?:GEOMETRIES|INTERIORRINGS|POINTS)))|O(?:CT(?:ET_LENGTH|)|RD|VERLAPS)|P(?:ERIOD_(?:ADD|DIFF)|I|O(?:INT(?:FROM(?:TEXT|WKB)|N)|LY(?:FROM(?:TEXT|WKB)|GONFROM(?:TEXT|WKB))|SITION|W(?:ER|)))|QUOTE|R(?:A(?:DIANS|ND)|E(?:LEASE_LOCK|VERSE)|O(?:UND|W_COUNT)|PAD|TRIM)|S(?:E(?:C_TO_TIME|SSION_USER)|HA(?:1|)|I(?:GN|N)|LEEP|OUNDEX|PACE|QRT|RID|T(?:ARTPOINT|D(?:DEV(?:_(?:POP|SAMP)|)|)|R(?:CMP|_TO_DATE))|U(?:B(?:DATE|STR(?:ING(?:_INDEX|)|)|TIME)|M)|YS(?:DATE|TEM_USER))|T(?:AN|IME(?:DIFF|_(?:FORMAT|TO_SEC))|O(?:UCHES|_DAYS)|RIM)|U(?:CASE|N(?:COMPRESS(?:ED_LENGTH|)|HEX|I(?:QUE_USERS|X_TIMESTAMP))|PPER|UID)|V(?:AR(?:IANCE|_(?:POP|SAMP))|ERSION)|W(?:EEK(?:DAY|OFYEAR)|ITHIN)|X|Y(?:EARWEEK|))(?=\()/},id:{exp:/[$\w]+/}}};ChiliBook.recipes["php.js"]={steps:{mlcom:{exp:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//},com:{exp:/(?:\/\/.*)|(?:[^\\]\#.*)/},string1:{exp:/\'[^\'\\]*(?:\\.[^\'\\]*)*\'/},string2:{exp:/\"[^\"\\]*(?:\\.[^\"\\]*)*\"/},value:{exp:/\b(?:[Nn][Uu][Ll][Ll]|[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])\b/},number:{exp:/\b[+-]?(\d*\.?\d+|\d+\.?\d*)([eE][+-]?\d+)?\b/},const1:{exp:/\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\b/},const2:{exp:/\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR))\b/},global:{exp:/(?:\$GLOBALS|\$_COOKIE|\$_ENV|\$_FILES|\$_GET|\$_POST|\$_REQUEST|\$_SERVER|\$_SESSION|\$php_errormsg)\b/},keyword:{exp:/\b(?:__CLASS__|__FILE__|__FUNCTION__|__LINE__|__METHOD__|abstract|and|array|as|break|case|catch|cfunction|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exception|exit|extends|extends|final|for|foreach|function|global|if|implements|include|include_once|interface|isset|list|new|old_function|or|php_user_filter|print|private|protected|public|require|require_once|return|static|switch|this|throw|try|unset|use|var|while|xor)\b/},variable:{exp:/\$(\w+)/,replacement:'<span class="keyword">$</span><span class="variable">$1</span>'},heredoc:{exp:/(\<\<\<\s*)(\w+)((?:(?!\2).*\n)+)(\2)\b/,replacement:'<span class="keyword">$1</span><span class="string1">$2</span><span class="string2">$3</span><span class="string1">$4</span>'}}};ChiliBook.recipes["css.js"]={steps:{mlcom:{exp:/\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\//},string:{exp:/(?:\'[^\'\\\n]*(?:\\.[^\'\\\n]*)*\')|(?:\"[^\"\\\n]*(?:\\.[^\"\\\n]*)*\")/},number:{exp:/(?:\b[+-]?(?:\d*\.?\d+|\d+\.?\d*))(?:%|(?:(?:px|pt|em|)\b))/},attrib:{exp:/\b(?:z-index|x-height|word-spacing|widths|width|widows|white-space|volume|voice-family|visibility|vertical-align|units-per-em|unicode-range|unicode-bidi|text-transform|text-shadow|text-indent|text-decoration|text-align|table-layout|stress|stemv|stemh|src|speech-rate|speak-punctuation|speak-numeral|speak-header|speak|slope|size|right|richness|quotes|position|play-during|pitch-range|pitch|pause-before|pause-after|pause|page-break-inside|page-break-before|page-break-after|page|padding-top|padding-right|padding-left|padding-bottom|padding|overflow|outline-width|outline-style|outline-color|outline|orphans|min-width|min-height|max-width|max-height|mathline|marks|marker-offset|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|height|font-weight|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-family|font|float|empty-cells|elevation|display|direction|descent|definition-src|cursor|cue-before|cue-after|cue|counter-reset|counter-increment|content|color|clip|clear|centerline|caption-side|cap-height|bottom|border-width|border-top-width|border-top-style|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-left-width|border-left-style|border-left-color|border-left|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-color|border-bottom|border|bbox|baseline|background-repeat|background-position|background-image|background-color|background-attachment|background|azimuth|ascent)\b/},value:{exp:/\b(?:xx-small|xx-large|x-soft|x-small|x-slow|x-low|x-loud|x-large|x-high|x-fast|wider|wait|w-resize|visible|url|uppercase|upper-roman|upper-latin|upper-alpha|underline|ultra-expanded|ultra-condensed|tv|tty|transparent|top|thin|thick|text-top|text-bottom|table-row-group|table-row|table-header-group|table-footer-group|table-column-group|table-column|table-cell|table-caption|sw-resize|super|sub|status-bar|static|square|spell-out|speech|solid|soft|smaller|small-caption|small-caps|small|slower|slow|silent|show|separate|semi-expanded|semi-condensed|se-resize|scroll|screen|s-resize|run-in|rtl|rightwards|right-side|right|ridge|rgb|repeat-y|repeat-x|repeat|relative|projection|print|pre|portrait|pointer|overline|outside|outset|open-quote|once|oblique|nw-resize|nowrap|normal|none|no-repeat|no-open-quote|no-close-quote|ne-resize|narrower|n-resize|move|mix|middle|message-box|medium|marker|ltr|lowercase|lower-roman|lower-latin|lower-greek|lower-alpha|lower|low|loud|local|list-item|line-through|lighter|level|leftwards|left-side|left|larger|large|landscape|justify|italic|invert|inside|inset|inline-table|inline|icon|higher|high|hide|hidden|help|hebrew|handheld|groove|format|fixed|faster|fast|far-right|far-left|fantasy|extra-expanded|extra-condensed|expanded|embossed|embed|e-resize|double|dotted|disc|digits|default|decimal-leading-zero|decimal|dashed|cursive|crosshair|cross|crop|counters|counter|continuous|condensed|compact|collapse|code|close-quote|circle|center-right|center-left|center|caption|capitalize|braille|bottom|both|bolder|bold|block|blink|bidi-override|below|behind|baseline|avoid|auto|aural|attr|armenian|always|all|absolute|above)\b/},color:{exp:/(?:\#[a-zA-Z0-9]{3,6})|(?:yellow|white|teal|silver|red|purple|olive|navy|maroon|lime|green|gray|fuchsia|blue|black|aqua)/}}};ChiliBook.elementPath=".colored";ChiliBook.elementClass="colored";Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(B){var E=Date.CultureInfo.monthNames,A=Date.CultureInfo.abbreviatedMonthNames,D=B.toLowerCase();for(var C=0;C<E.length;C++){if(E[C].toLowerCase()==D||A[C].toLowerCase()==D){return C}}return -1};Date.getDayNumberFromName=function(B){var F=Date.CultureInfo.dayNames,A=Date.CultureInfo.abbreviatedDayNames,E=Date.CultureInfo.shortestDayNames,D=B.toLowerCase();for(var C=0;C<F.length;C++){if(F[C].toLowerCase()==D||A[C].toLowerCase()==D){return C}}return -1};Date.isLeapYear=function(A){return(((A%4===0)&&(A%100!==0))||(A%400===0))};Date.getDaysInMonth=function(A,B){return[31,(Date.isLeapYear(A)?29:28),31,30,31,30,31,31,30,31,30,31][B]};Date.getTimezoneOffset=function(A,B){return(B||false)?Date.CultureInfo.abbreviatedTimeZoneDST[A.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[A.toUpperCase()]};Date.getTimezoneAbbreviation=function(B,D){var C=(D||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,A;for(A in C){if(C[A]===B){return A}}return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(A){if(isNaN(this)){throw new Error(this)}if(A instanceof Date&&!isNaN(A)){return(this>A)?1:(this<A)?-1:0}else{throw new TypeError(A)}};Date.prototype.equals=function(A){return(this.compareTo(A)===0)};Date.prototype.between=function(C,A){var B=this.getTime();return B>=C.getTime()&&B<=A.getTime()};Date.prototype.addMilliseconds=function(A){this.setMilliseconds(this.getMilliseconds()+A);return this};Date.prototype.addSeconds=function(A){return this.addMilliseconds(A*1000)};Date.prototype.addMinutes=function(A){return this.addMilliseconds(A*60000)};Date.prototype.addHours=function(A){return this.addMilliseconds(A*3600000)};Date.prototype.addDays=function(A){return this.addMilliseconds(A*86400000)};Date.prototype.addWeeks=function(A){return this.addMilliseconds(A*604800000)};Date.prototype.addMonths=function(A){var B=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+A);this.setDate(Math.min(B,this.getDaysInMonth()));return this};Date.prototype.addYears=function(A){return this.addMonths(A*12)};Date.prototype.add=function(B){if(typeof B=="number"){this._orient=B;return this}var A=B;if(A.millisecond||A.milliseconds){this.addMilliseconds(A.millisecond||A.milliseconds)}if(A.second||A.seconds){this.addSeconds(A.second||A.seconds)}if(A.minute||A.minutes){this.addMinutes(A.minute||A.minutes)}if(A.hour||A.hours){this.addHours(A.hour||A.hours)}if(A.month||A.months){this.addMonths(A.month||A.months)}if(A.year||A.years){this.addYears(A.year||A.years)}if(A.day||A.days){this.addDays(A.day||A.days)}return this};Date._validate=function(D,C,A,B){if(typeof D!="number"){throw new TypeError(D+" is not a Number.")}else{if(D<C||D>A){throw new RangeError(D+" is not a valid value for "+B+".")}}return true};Date.validateMillisecond=function(A){return Date._validate(A,0,999,"milliseconds")};Date.validateSecond=function(A){return Date._validate(A,0,59,"seconds")};Date.validateMinute=function(A){return Date._validate(A,0,59,"minutes")};Date.validateHour=function(A){return Date._validate(A,0,23,"hours")};Date.validateDay=function(C,A,B){return Date._validate(C,1,Date.getDaysInMonth(A,B),"days")};Date.validateMonth=function(A){return Date._validate(A,0,11,"months")};Date.validateYear=function(A){return Date._validate(A,1,9999,"seconds")};Date.prototype.set=function(B){var A=B;if(!A.millisecond&&A.millisecond!==0){A.millisecond=-1}if(!A.second&&A.second!==0){A.second=-1}if(!A.minute&&A.minute!==0){A.minute=-1}if(!A.hour&&A.hour!==0){A.hour=-1}if(!A.day&&A.day!==0){A.day=-1}if(!A.month&&A.month!==0){A.month=-1}if(!A.year&&A.year!==0){A.year=-1}if(A.millisecond!=-1&&Date.validateMillisecond(A.millisecond)){this.addMilliseconds(A.millisecond-this.getMilliseconds())}if(A.second!=-1&&Date.validateSecond(A.second)){this.addSeconds(A.second-this.getSeconds())}if(A.minute!=-1&&Date.validateMinute(A.minute)){this.addMinutes(A.minute-this.getMinutes())}if(A.hour!=-1&&Date.validateHour(A.hour)){this.addHours(A.hour-this.getHours())}if(A.month!==-1&&Date.validateMonth(A.month)){this.addMonths(A.month-this.getMonth())}if(A.year!=-1&&Date.validateYear(A.year)){this.addYears(A.year-this.getFullYear())}if(A.day!=-1&&Date.validateDay(A.day,this.getFullYear(),this.getMonth())){this.addDays(A.day-this.getDate())}if(A.timezone){this.setTimezone(A.timezone)}if(A.timezoneOffset){this.setTimezoneOffset(A.timezoneOffset)}return this};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype.isLeapYear=function(){var A=this.getFullYear();return(((A%4===0)&&(A%100!==0))||(A%400===0))};Date.prototype.isWeekday=function(){return !(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(A,B){var C=(A-this.getDay()+7*(B||+1))%7;return this.addDays((C===0)?C+=7*(B||+1):C)};Date.prototype.moveToMonth=function(C,A){var B=(C-this.getMonth()+12*(A||+1))%12;return this.addMonths((B===0)?B+=12*(A||+1):B)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000)};Date.prototype.getWeekOfYear=function(A){var G=this.getFullYear(),C=this.getMonth(),E=this.getDate();var I=A||Date.CultureInfo.firstDayOfWeek;var D=7+1-new Date(G,0,1).getDay();if(D==8){D=1}var B=((Date.UTC(G,C,E,0,0,0)-Date.UTC(G,0,1,0,0,0))/86400000)+1;var H=Math.floor((B-D+7)/7);if(H===I){G--;var F=7+1-new Date(G,0,1).getDay();if(F==2||F==8){H=53}else{H=52}}return H};Date.prototype.isDST=function(){console.log("isDST");return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(B){var A=this.getTimezoneOffset(),C=Number(B)*-6/10;this.addMinutes(C-A);return this};Date.prototype.setTimezone=function(A){return this.setTimezoneOffset(Date.getTimezoneOffset(A))};Date.prototype.getUTCOffset=function(){var B=this.getTimezoneOffset()*-10/6,A;if(B<0){A=(B-10000).toString();return A[0]+A.substr(2)}else{A=(B+10000).toString();return"+"+A.substr(1)}};Date.prototype.getDayName=function(A){return A?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(A){return A?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(C){var A=this;var B=function B(D){return(D.toString().length==1)?"0"+D:D};return C?C.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(D){switch(D){case"hh":return B(A.getHours()<13?A.getHours():(A.getHours()-12));case"h":return A.getHours()<13?A.getHours():(A.getHours()-12);case"HH":return B(A.getHours());case"H":return A.getHours();case"mm":return B(A.getMinutes());case"m":return A.getMinutes();case"ss":return B(A.getSeconds());case"s":return A.getSeconds();case"yyyy":return A.getFullYear();case"yy":return A.getFullYear().toString().substring(2,4);case"dddd":return A.getDayName();case"ddd":return A.getDayName(true);case"dd":return B(A.getDate());case"d":return A.getDate().toString();case"MMMM":return A.getMonthName();case"MMM":return A.getMonthName(true);case"MM":return B((A.getMonth()+1));case"M":return A.getMonth()+1;case"t":return A.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return A.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()};Date.now=function(){return new Date()};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var A={};A[this._dateElement]=this;return Date.now().add(A)};Number.prototype.ago=function(){var A={};A[this._dateElement]=this*-1;return Date.now().add(A)};(function(){var G=Date.prototype,A=Number.prototype;var M=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),L=("january february march april may june july august september october november december").split(/\s/),K=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),J;var I=function(N){return function(){if(this._is){this._is=false;return this.getDay()==N}return this.moveToDayOfWeek(N,this._orient)}};for(var F=0;F<M.length;F++){G[M[F]]=G[M[F].substring(0,3)]=I(F)}var H=function(N){return function(){if(this._is){this._is=false;return this.getMonth()===N}return this.moveToMonth(N,this._orient)}};for(var D=0;D<L.length;D++){G[L[D]]=G[L[D].substring(0,3)]=H(D)}var E=function(N){return function(){if(N.substring(N.length-1)!="s"){N+="s"}return this["add"+N](this._orient)}};var B=function(N){return function(){this._dateElement=N;return this}};for(var C=0;C<K.length;C++){J=K[C].toLowerCase();G[J]=G[J+"s"]=E(K[C]);A[J]=A[J+"s"]=B(J)}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};(function(){Date.Parsing={Exception:function(I){this.message="Parse error at '"+I.substring(0,10)+" ...'"}};var A=Date.Parsing;var C=A.Operators={rtoken:function(I){return function(J){var K=J.match(I);if(K){return([K[0],J.substring(K[0].length)])}else{throw new A.Exception(J)}}},token:function(I){return function(J){return C.rtoken(new RegExp("^s*"+J+"s*"))(J)}},stoken:function(I){return C.rtoken(new RegExp("^"+I))},until:function(I){return function(J){var K=[],M=null;while(J.length){try{M=I.call(this,J)}catch(L){K.push(M[0]);J=M[1];continue}break}return[K,J]}},many:function(I){return function(J){var M=[],K=null;while(J.length){try{K=I.call(this,J)}catch(L){return[M,J]}M.push(K[0]);J=K[1]}return[M,J]}},optional:function(I){return function(J){var K=null;try{K=I.call(this,J)}catch(L){return[null,J]}return[K[0],K[1]]}},not:function(I){return function(J){try{I.call(this,J)}catch(K){return[null,J]}throw new A.Exception(J)}},ignore:function(I){return I?function(J){var K=null;K=I.call(this,J);return[null,K[1]]}:null},product:function(){var J=arguments[0],K=Array.prototype.slice.call(arguments,1),L=[];for(var I=0;I<J.length;I++){L.push(C.each(J[I],K))}return L},cache:function(K){var I={},J=null;return function(L){try{J=I[L]=(I[L]||K.call(this,L))}catch(M){J=I[L]=M}if(J instanceof A.Exception){throw J}else{return J}}},any:function(){var I=arguments;return function(K){var L=null;for(var J=0;J<I.length;J++){if(I[J]==null){continue}try{L=(I[J].call(this,K))}catch(M){L=null}if(L){return L}}throw new A.Exception(K)}},each:function(){var I=arguments;return function(K){var N=[],L=null;for(var J=0;J<I.length;J++){if(I[J]==null){continue}try{L=(I[J].call(this,K))}catch(M){throw new A.Exception(K)}N.push(L[0]);K=L[1]}return[N,K]}},all:function(){var J=arguments,I=I;return I.each(I.optional(J))},sequence:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;if(I.length==1){return I[0]}return function(O){var P=null,Q=null;var S=[];for(var N=0;N<I.length;N++){try{P=I[N].call(this,O)}catch(R){break}S.push(P[0]);try{Q=J.call(this,P[1])}catch(M){Q=null;break}O=Q[1]}if(!P){throw new A.Exception(O)}if(Q){throw new A.Exception(Q[1])}if(K){try{P=K.call(this,P[1])}catch(L){throw new A.Exception(P[1])}}return[S,(P?P[1]:O)]}},between:function(J,K,I){I=I||J;var L=C.each(C.ignore(J),K,C.ignore(I));return function(M){var N=L.call(this,M);return[[N[0][0],r[0][2]],N[1]]}},list:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;return(I instanceof Array?C.each(C.product(I.slice(0,-1),C.ignore(J)),I.slice(-1),C.ignore(K)):C.each(C.many(C.each(I,C.ignore(J))),px,C.ignore(K)))},set:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;return function(X){var L=null,N=null,M=null,O=null,P=[[],X],W=false;for(var R=0;R<I.length;R++){M=null;N=null;L=null;W=(I.length==1);try{L=I[R].call(this,X)}catch(U){continue}O=[[L[0]],L[1]];if(L[1].length>0&&!W){try{M=J.call(this,L[1])}catch(V){W=true}}else{W=true}if(!W&&M[1].length===0){W=true}if(!W){var S=[];for(var Q=0;Q<I.length;Q++){if(R!=Q){S.push(I[Q])}}N=C.set(S,J).call(this,M[1]);if(N[0].length>0){O[0]=O[0].concat(N[0]);O[1]=N[1]}}if(O[1].length<P[1].length){P=O}if(P[1].length===0){break}}if(P[0].length===0){return P}if(K){try{M=K.call(this,P[1])}catch(T){throw new A.Exception(P[1])}P[1]=M[1]}return P}},forward:function(I,J){return function(K){return I[J].call(this,K)}},replace:function(J,I){return function(K){var L=J.call(this,K);return[I,L[1]]}},process:function(J,I){return function(K){var L=J.call(this,K);return[I.call(this,L[0]),L[1]]}},min:function(I,J){return function(K){var L=J.call(this,K);if(L[0].length<I){throw new A.Exception(K)}return L}}};var H=function(I){return function(){var J=null,M=[];if(arguments.length>1){J=Array.prototype.slice.call(arguments)}else{if(arguments[0] instanceof Array){J=arguments[0]}}if(J){for(var L=0,K=J.shift();L<K.length;L++){J.unshift(K[L]);M.push(I.apply(null,J));J.shift();return M}}else{return I.apply(null,arguments)}}};var G="optional not ignore cache".split(/\s/);for(var D=0;D<G.length;D++){C[G[D]]=H(C[G[D]])}var F=function(I){return function(){if(arguments[0] instanceof Array){return I.apply(null,arguments[0])}else{return I.apply(null,arguments)}}};var E="each any all".split(/\s/);for(var B=0;B<E.length;B++){C[E[B]]=F(C[E[B]])}}());(function(){var F=function(J){var K=[];for(var I=0;I<J.length;I++){if(J[I] instanceof Array){K=K.concat(F(J[I]))}else{if(J[I]){K.push(J[I])}}}return K};Date.Grammar={};Date.Translator={hour:function(I){return function(){this.hour=Number(I)}},minute:function(I){return function(){this.minute=Number(I)}},second:function(I){return function(){this.second=Number(I)}},meridian:function(I){return function(){this.meridian=I.slice(0,1).toLowerCase()}},timezone:function(I){return function(){var J=I.replace(/[^\d\+\-]/g,"");if(J.length){this.timezoneOffset=Number(J)}else{this.timezone=I.toLowerCase()}}},day:function(I){var J=I[0];return function(){this.day=Number(J.match(/\d+/)[0])}},month:function(I){return function(){this.month=((I.length==3)?Date.getMonthNumberFromName(I):(Number(I)-1))}},year:function(I){return function(){var J=Number(I);this.year=((I.length>2)?J:(J+(((J+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)))}},rday:function(I){return function(){switch(I){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break}}},finishExact:function(I){I=(I instanceof Array)?I:[I];var J=new Date();this.year=J.getFullYear();this.month=J.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var K=0;K<I.length;K++){if(I[K]){I[K].call(this)}}this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.")}var L=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){L.set({timezone:this.timezone})}else{if(this.timezoneOffset){L.set({timezoneOffset:this.timezoneOffset})}}return L},finish:function(I){I=(I instanceof Array)?F(I):[I];if(I.length===0){return null}for(var M=0;M<I.length;M++){if(typeof I[M]=="function"){I[M].call(this)}}if(this.now){return new Date()}var J=Date.today();var P=null;var N=!!(this.days!=null||this.orient||this.operator);if(N){var O,L,K;K=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";O=(Date.getDayNumberFromName(this.weekday)-J.getDay());L=7;this.days=O?((O+(K*L))%L):(K*L)}if(this.month){this.unit="month";O=(this.month-J.getMonth());L=12;this.months=O?((O+(K*L))%L):(K*L);this.month=null}if(!this.unit){this.unit="day"}if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1}if(this.unit=="week"){this.unit="day";this.value=this.value*7}this[this.unit+"s"]=this.value*K}return J.add(this)}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour}if(this.weekday&&!this.day){this.day=(J.addDays((Date.getDayNumberFromName(this.weekday)-J.getDay()))).getDate()}if(this.month&&!this.day){this.day=1}return J.set(this)}}};var B=Date.Parsing.Operators,E=Date.Grammar,D=Date.Translator,H;E.datePartDelimiter=B.rtoken(/^([\s\-\.\,\/\x27]+)/);E.timePartDelimiter=B.stoken(":");E.whiteSpace=B.rtoken(/^\s*/);E.generalDelimiter=B.rtoken(/^(([\s\,]|at|on)+)/);var A={};E.ctoken=function(M){var L=A[M];if(!L){var N=Date.CultureInfo.regexPatterns;var K=M.split(/\s+/),J=[];for(var I=0;I<K.length;I++){J.push(B.replace(B.rtoken(N[K[I]]),K[I]))}L=A[M]=B.any.apply(null,J)}return L};E.ctoken2=function(I){return B.rtoken(Date.CultureInfo.regexPatterns[I])};E.h=B.cache(B.process(B.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),D.hour));E.hh=B.cache(B.process(B.rtoken(/^(0[0-9]|1[0-2])/),D.hour));E.H=B.cache(B.process(B.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),D.hour));E.HH=B.cache(B.process(B.rtoken(/^([0-1][0-9]|2[0-3])/),D.hour));E.m=B.cache(B.process(B.rtoken(/^([0-5][0-9]|[0-9])/),D.minute));E.mm=B.cache(B.process(B.rtoken(/^[0-5][0-9]/),D.minute));E.s=B.cache(B.process(B.rtoken(/^([0-5][0-9]|[0-9])/),D.second));E.ss=B.cache(B.process(B.rtoken(/^[0-5][0-9]/),D.second));E.hms=B.cache(B.sequence([E.H,E.mm,E.ss],E.timePartDelimiter));E.t=B.cache(B.process(E.ctoken2("shortMeridian"),D.meridian));E.tt=B.cache(B.process(E.ctoken2("longMeridian"),D.meridian));E.z=B.cache(B.process(B.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),D.timezone));E.zz=B.cache(B.process(B.rtoken(/^(\+|\-)\s*\d\d\d\d/),D.timezone));E.zzz=B.cache(B.process(E.ctoken2("timezone"),D.timezone));E.timeSuffix=B.each(B.ignore(E.whiteSpace),B.set([E.tt,E.zzz]));E.time=B.each(B.optional(B.ignore(B.stoken("T"))),E.hms,E.timeSuffix);E.d=B.cache(B.process(B.each(B.rtoken(/^([0-2]\d|3[0-1]|\d)/),B.optional(E.ctoken2("ordinalSuffix"))),D.day));E.dd=B.cache(B.process(B.each(B.rtoken(/^([0-2]\d|3[0-1])/),B.optional(E.ctoken2("ordinalSuffix"))),D.day));E.ddd=E.dddd=B.cache(B.process(E.ctoken("sun mon tue wed thu fri sat"),function(I){return function(){this.weekday=I}}));E.M=B.cache(B.process(B.rtoken(/^(1[0-2]|0\d|\d)/),D.month));E.MM=B.cache(B.process(B.rtoken(/^(1[0-2]|0\d)/),D.month));E.MMM=E.MMMM=B.cache(B.process(E.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),D.month));E.y=B.cache(B.process(B.rtoken(/^(\d\d?)/),D.year));E.yy=B.cache(B.process(B.rtoken(/^(\d\d)/),D.year));E.yyy=B.cache(B.process(B.rtoken(/^(\d\d?\d?\d?)/),D.year));E.yyyy=B.cache(B.process(B.rtoken(/^(\d\d\d\d)/),D.year));H=function(){return B.each(B.any.apply(null,arguments),B.not(E.ctoken2("timeContext")))};E.day=H(E.d,E.dd);E.month=H(E.M,E.MMM);E.year=H(E.yyyy,E.yy);E.orientation=B.process(E.ctoken("past future"),function(I){return function(){this.orient=I}});E.operator=B.process(E.ctoken("add subtract"),function(I){return function(){this.operator=I}});E.rday=B.process(E.ctoken("yesterday tomorrow today now"),D.rday);E.unit=B.process(E.ctoken("minute hour day week month year"),function(I){return function(){this.unit=I}});E.value=B.process(B.rtoken(/^\d\d?(st|nd|rd|th)?/),function(I){return function(){this.value=I.replace(/\D/g,"")}});E.expression=B.set([E.rday,E.operator,E.value,E.unit,E.orientation,E.ddd,E.MMM]);H=function(){return B.set(arguments,E.datePartDelimiter)};E.mdy=H(E.ddd,E.month,E.day,E.year);E.ymd=H(E.ddd,E.year,E.month,E.day);E.dmy=H(E.ddd,E.day,E.month,E.year);E.date=function(I){return((E[Date.CultureInfo.dateElementOrder]||E.mdy).call(this,I))};E.format=B.process(B.many(B.any(B.process(B.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(I){if(E[I]){return E[I]}else{throw Date.Parsing.Exception(I)}}),B.process(B.rtoken(/^[^dMyhHmstz]+/),function(I){return B.ignore(B.stoken(I))}))),function(I){return B.process(B.each.apply(null,I),D.finishExact)});var G={};var C=function(I){return G[I]=(G[I]||E.format(I)[0])};E.formats=function(J){if(J instanceof Array){var K=[];for(var I=0;I<J.length;I++){K.push(C(J[I]))}return B.any.apply(null,K)}else{return C(J)}};E._formats=E.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);E._start=B.process(B.set([E.date,E.time,E.expression],E.generalDelimiter,E.whiteSpace),D.finish);E.start=function(I){try{var J=E._formats.call({},I);if(J[1].length===0){return J}}catch(K){}return E._start.call({},I)}}());Date._parse=Date.parse;Date.parse=function(A){var B=null;if(!A){return null}try{B=Date.Grammar.start.call({},A)}catch(C){return null}return((B[1].length===0)?B[0]:null)};Date.getParseFunction=function(B){var A=Date.Grammar.formats(B);return function(C){var D=null;try{D=A.call({},C)}catch(E){return null}return((D[1].length===0)?D[0]:null)}};Date.parseExact=function(A,B){return Date.getParseFunction(B)(A)};(function(D){var C=D.ajax;var A={};var E=[];var B=[];D.ajax=function(H){H=jQuery.extend(H,jQuery.extend({},jQuery.ajaxSettings,H));var G=H.port;switch(H.mode){case"abort":if(A[G]){A[G].abort()}return A[G]=C.apply(this,arguments);case"queue":var F=H.complete;H.complete=function(){if(F){F.apply(this,arguments)}jQuery([C]).dequeue("ajax"+G)};jQuery([C]).queue("ajax"+G,function(){C(H)});return ;case"sync":var I=E.length;E[I]={error:H.error,success:H.success,complete:H.complete,done:false};B[I]={error:[],success:[],complete:[]};H.error=function(){B[I].error=arguments};H.success=function(){B[I].success=arguments};H.complete=function(){B[I].complete=arguments;E[I].done=true;if(I==0||!E[I-1]){for(var J=I;J<E.length&&E[J].done;J++){if(E[J].error){E[J].error.apply(jQuery,B[J].error)}if(E[J].success){E[J].success.apply(jQuery,B[J].success)}if(E[J].complete){E[J].complete.apply(jQuery,B[J].complete)}E[J]=null;B[J]=null}}}}return C.apply(this,arguments)}})(jQuery);jQuery.fn.extend({autocomplete:function(A,B){var C=typeof A=="string";B=jQuery.extend({},jQuery.Autocompleter.defaults,{url:C?A:null,data:C?null:A,delay:C?jQuery.Autocompleter.defaults.delay:10},B);B.highlight=B.highlight||function(D){return D};B.moreItems=B.moreItems||"";return this.each(function(){new jQuery.Autocompleter(this,B)})},result:function(A){return this.bind("result",A)},search:function(A){return this.trigger("search",[A])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(A){return this.trigger("setOptions",[A])}});jQuery.Autocompleter=function(K,F){var B={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188};var A=jQuery(K).attr("autocomplete","off").addClass(F.inputClass);var I;var O="";var L=jQuery.Autocompleter.Cache(F);var D=0;var T;var V={mouseDownOnSelect:false};var Q=jQuery.Autocompleter.Select(F,K,C,V);A.keydown(function(W){T=W.keyCode;switch(W.keyCode){case B.UP:W.preventDefault();if(Q.visible()){Q.prev()}else{S(0,true)}break;case B.DOWN:W.preventDefault();if(Q.visible()){Q.next()}else{S(0,true)}break;case F.multiple&&jQuery.trim(F.multipleSeparator)==","&&B.COMMA:case B.TAB:case B.RETURN:if(C()){if(!F.multiple){A.blur()}W.preventDefault()}break;case B.ESC:Q.hide();break;default:clearTimeout(I);I=setTimeout(S,F.delay);break}}).keypress(function(){}).focus(function(){D++}).blur(function(){D=0;if(!V.mouseDownOnSelect){R()}}).click(function(){if(D++>1&&!Q.visible()){S(0,true)}}).bind("search",function(){var W=(arguments.length>1)?arguments[1]:null;function X(b,a){var Y;if(a&&a.length){for(var Z=0;Z<a.length;Z++){if(a[Z].result.toLowerCase()==b.toLowerCase()){Y=a[Z];break}}}if(typeof W=="function"){W(Y)}else{A.trigger("result",Y&&[Y.data,Y.value])}}jQuery.each(G(A.val()),function(Y,Z){E(Z,X,X)})}).bind("flushCache",function(){L.flush()}).bind("setOptions",function(){jQuery.extend(F,arguments[1]);if("data" in arguments[1]){L.populate()}});U();function C(){var X=Q.selected();if(!X){return false}var W=X.result;O=W;if(F.multiple){var Y=G(A.val());if(Y.length>1){W=Y.slice(0,Y.length-1).join(F.multipleSeparator)+F.multipleSeparator+W}W+=F.multipleSeparator}A.val(W);U();A.trigger("result",[X.data,X.value]);return true}function S(Y,X){if(T==B.DEL){Q.hide();return }var W=A.val();if(!X&&W==O){return }O=W;W=H(W);if(W.length>=F.minChars){A.addClass(F.loadingClass);if(!F.matchCase){W=W.toLowerCase()}E(W,J,U)}else{M();Q.hide()}}function G(X){if(!X){return[""]}var Y=X.split(jQuery.trim(F.multipleSeparator));var W=[];jQuery.each(Y,function(Z,a){if(jQuery.trim(a)){W[Z]=jQuery.trim(a)}});return W}function H(W){if(!F.multiple){return W}var X=G(W);return X[X.length-1]}function P(W,X){if(F.autoFill&&(H(A.val()).toLowerCase()==W.toLowerCase())&&T!=8){A.val(A.val()+X.substring(H(O).length));jQuery.Autocompleter.Selection(K,O.length,O.length+X.length)}}function R(){clearTimeout(I);I=setTimeout(U,200)}function U(){Q.hide();clearTimeout(I);M();if(F.mustMatch){A.search(function(W){if(!W){A.val("")}})}}function J(X,W){if(W&&W.length&&D){M();Q.display(W,X);P(X,W[0].value);Q.show()}else{U()}}function E(X,Z,W){if(!F.matchCase){X=X.toLowerCase()}var Y=L.load(X);if(Y&&Y.length){Z(X,Y)}else{if((typeof F.url=="string")&&(F.url.length>0)){var a={};jQuery.each(F.extraParams,function(b,c){a[b]=typeof c=="function"?c():c});jQuery.ajax({mode:"abort",port:"autocomplete"+K.name,url:F.url,data:jQuery.extend({q:H(X),limit:F.max},a),success:function(c){var b=F.parse&&F.parse(c)||N(c);L.add(X,b);Z(X,b)}})}else{W(X)}}}function N(Z){var W=[];var Y=Z.split("\n");for(var X=0;X<Y.length;X++){var a=jQuery.trim(Y[X]);if(a){a=a.split("|");W[W.length]={data:a,value:a[0],result:F.formatResult&&F.formatResult(a,a[0])||a[0]}}}return W}function M(){A.removeClass(F.loadingClass)}};jQuery.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,mustMatch:false,extraParams:{},selectFirst:true,max:10,moreItems:"&#x25be;&#x25be;&#x25be; more &#x25be;&#x25be;&#x25be;",autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(B,A){return B.replace(new RegExp("(?!<[^<>]*)("+A+")(?![^<>]*>)","gi"),"<strong>$1</strong>")}};jQuery.Autocompleter.Cache=function(B){var E={};var C=0;function G(J,I){if(!B.matchCase){J=J.toLowerCase()}var H=J.indexOf(I);if(H==-1){return false}return H==0||B.matchContains}function F(I,H){if(C>B.cacheLength){A()}if(!E[I]){C++}E[I]=H}function D(){if(!B.data){return false}var I={},H=0;if(!B.url){B.cacheLength=1}I[""]=[];jQuery.each(B.data,function(J,M){var L=B.formatItem?B.formatItem(M,J+1,B.data.length):M;if(L===false){return }var K=L.charAt(0).toLowerCase();if(!I[K]){I[K]=[]}var N={value:L,data:M,result:B.formatResult&&B.formatResult(M)||L};I[K].push(N);if(H++<B.max){I[""].push(N)}});jQuery.each(I,function(J,K){B.cacheLength++;F(J,K)})}D();function A(){E={};C=0}return{flush:A,add:F,populate:D,load:function(K){if(!B.cacheLength||!C){return null}if(!B.url&&B.matchContains){var J=[];for(var H in E){if(H.length>0){var L=E[H];jQuery.each(L,function(N,M){if(G(M.value,K)){J.push(M)}})}}return J}else{if(E[K]){return E[K]}else{if(B.matchSubset){for(var I=K.length-1;I>=B.minChars;I--){var L=E[K.substr(0,I)];if(L){var J=[];jQuery.each(L,function(N,M){if(G(M.value,K)){J[J.length]=M}});return J}}}}}return null}}};jQuery.Autocompleter.Select=function(Q,N,O,B){var M={ACTIVE:"ac_over"};var J=jQuery("<div>").hide().addClass(Q.resultsClass).css("position","absolute").appendTo("body");var L=jQuery("<ul>").appendTo(J).mouseover(function(R){E=jQuery("li",L).removeClass().index(K(R));jQuery(K(R)).addClass(M.ACTIVE)}).mouseout(function(R){jQuery(K(R)).removeClass()}).click(function(R){jQuery(K(R)).addClass(M.ACTIVE);O();N.focus();return false}).mousedown(function(){B.mouseDownOnSelect=true}).mouseup(function(){B.mouseDownOnSelect=false});var F,E=-1,I,D="";if(Q.moreItems.length>0){var G=jQuery("<div>").addClass("ac_moreItems").css("display","none").html(Q.moreItems).appendTo(J)}if(Q.width>0){J.css("width",Q.width)}function K(S){var R=S.target;while(R&&R.tagName!="LI"){R=R.parentNode}if(!R){return[]}return R}function H(R){E+=R;A();F.removeClass().slice(E,E+1).addClass(M.ACTIVE)}function A(){if(E<0){E=F.size()-1}else{if(E>=F.size()){E=0}}}function P(R){return(Q.max>0)&&(Q.max<R)?Q.max:R}function C(){L.empty();var R=P(I.length);for(var S=0;S<R;S++){if(!I[S]){continue}var T=Q.formatItem?Q.formatItem(I[S].data,S+1,R,I[S].value):I[S].value;if(T===false){continue}jQuery("<li>").html(Q.highlight(T,D)).appendTo(L)[0].index=S}F=L.find("li");if(Q.selectFirst){F.slice(0,1).addClass(M.ACTIVE);E=0}if(Q.moreItems.length>0){G.css("display",(I.length>R)?"block":"none")}L.bgiframe()}return{display:function(S,R){I=S;D=R;C()},next:function(){H(1)},prev:function(){H(-1)},hide:function(){J.hide();E=-1},visible:function(){return J.is(":visible")},current:function(){return this.visible()&&(F.filter("."+M.ACTIVE)[0]||Q.selectFirst&&F[0])},show:function(){var R=jQuery(N).offset();J.css({width:typeof Q.width=="string"||Q.width>0?Q.width:jQuery(N).width(),top:R.top+N.offsetHeight,left:R.left}).show()},selected:function(){if(F){var R=F.filter("."+M.ACTIVE)[0]}return I&&R&&I[R.index]}}};jQuery.Autocompleter.Selection=function(C,D,B){if(C.createTextRange){var A=C.createTextRange();A.collapse(true);A.moveStart("character",D);A.moveEnd("character",B);A.select()}else{if(C.setSelectionRange){C.setSelectionRange(D,B)}else{if(C.selectionStart){C.selectionStart=D;C.selectionEnd=B}}}C.focus()};(function(A){A.fn.bgIframe=jQuery.fn.bgiframe=function(C){if(!(A.browser.msie&&typeof XMLHttpRequest=="function")){return this}C=A.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},C||{});var D=function(E){return E&&E.constructor==Number?E+"px":E},B='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+C.src+'"style="display:block;position:absolute;z-index:-1;'+(C.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(C.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":D(C.top))+";left:"+(C.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":D(C.left))+";width:"+(C.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":D(C.width))+";height:"+(C.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":D(C.height))+';"/>';return this.each(function(){if(!A("iframe.bgiframe",this)[0]){this.insertBefore(document.createElement(B),this.firstChild)}})}})(jQuery);(function($){$.fn.ajaxSubmit=function(options){if(typeof options=="function"){options={success:options}}options=$.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},options||{});var veto={};$.event.trigger("form.pre.serialize",[this,options,veto]);if(veto.veto){return this}var a=this.formToArray(options.semantic);if(options.data){for(var n in options.data){a.push({name:n,value:options.data[n]})}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){return this}$.event.trigger("form.submit.validate",[a,this,options,veto]);if(veto.veto){return this}var q=$.param(a);if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null}else{options.data=q}var $form=this,callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm()})}if(options.clearForm){callbacks.push(function(){$form.clearForm()})}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){if(this.evalScripts){$(options.target).attr("innerHTML",data).evalScripts().each(oldSuccess,arguments)}else{$(options.target).html(data).each(oldSuccess,arguments)}})}else{if(options.success){callbacks.push(options.success)}}options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i](data,status,$form)}};var files=$("input:file",this).fieldValue();var found=false;for(var j=0;j<files.length;j++){if(files[j]){found=true}}if(options.iframe||found){if($.browser.safari&&options.closeKeepAlive){$.get(options.closeKeepAlive,fileUpload)}else{fileUpload()}}else{$.ajax(options)}$.event.trigger("form.submit.notify",[this,options]);return this;function fileUpload(){var form=$form[0];var opts=$.extend({},$.ajaxSettings,options);var id="jqFormIO"+$.fn.ajaxSubmit.counter++;var $io=$('<iframe id="'+id+'" name="'+id+'" />');var io=$io[0];var op8=$.browser.opera&&window.opera.version()<9;if($.browser.msie||op8){io.src='javascript:false;document.write("");'}$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=opts.global;if(g&&!$.active++){$.event.trigger("ajaxStart")}if(g){$.event.trigger("ajaxSend",[xhr,opts])}var cbInvoked=0;var timedOut=0;setTimeout(function(){$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);var encAttr=form.encoding?"encoding":"enctype";var t=$form.attr("target");$form.attr({target:id,method:"POST",action:opts.url});form[encAttr]="multipart/form-data";if(opts.timeout){setTimeout(function(){timedOut=true;cb()},opts.timeout)}form.submit();$form.attr("target",t)},10);function cb(){if(cbInvoked++){return }io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var ok=true;try{if(timedOut){throw"timeout"}var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(opts.dataType=="json"||opts.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];data=ta?ta.value:xhr.responseText;if(opts.dataType=="json"){eval("data = "+data)}else{$.globalEval(data)}}else{if(opts.dataType=="xml"){data=xhr.responseXML;if(!data&&xhr.responseText!=null){data=toXml(xhr.responseText)}}else{data=xhr.responseText}}}catch(e){ok=false;$.handleError(opts,xhr,"error",e)}if(ok){opts.success(data,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,opts])}}if(g){$.event.trigger("ajaxComplete",[xhr,opts])}if(g&&!--$.active){$.event.trigger("ajaxStop")}if(opts.complete){opts.complete(xhr,ok?"success":"error")}setTimeout(function(){$io.remove();xhr.responseXML=null},100)}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s)}else{doc=(new DOMParser()).parseFromString(s,"text/xml")}return(doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null}}};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=options;$(":submit,input:image",this).click(clickHandler)})};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var $form=this.form;$form.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){$form.clk_x=e.offsetX;$form.clk_y=e.offsetY}else{if(typeof $.fn.offset=="function"){var offset=$(this).offset();$form.clk_x=e.pageX-offset.left;$form.clk_y=e.pageY-offset.top}else{$form.clk_x=e.pageX-this.offsetLeft;$form.clk_y=e.pageY-this.offsetTop}}}setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null},10)}function submitHandler(){var id=this.formPluginId;var options=$.fn.ajaxForm.optionHash[id];$(this).ajaxSubmit(options);return false}$.fn.ajaxFormUnbind=function(){this.unbind("submit",submitHandler);return this.each(function(){$(":submit,input:image",this).unbind("click",clickHandler)})};$.fn.formToArray=function(semantic){var a=[];if(this.length==0){return a}var form=this[0];var els=semantic?form.getElementsByTagName("*"):form.elements;if(!els){return a}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue}if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}continue}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]})}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v})}}}if(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input){a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y})}}}return a};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return }var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]})}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v})}}});return $.param(a)};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue}v.constructor==Array?$.merge(val,v):val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=="undefined"){successful=true}if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null}if(tag=="select"){var index=el.selectedIndex;if(index<0){return null}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes["value"].specified)?op.text:op.value;if(one){return v}a.push(v)}}return a}return el.value};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value=""}else{if(t=="checkbox"||t=="radio"){this.checked=false}else{if(tag=="select"){this.selectedIndex=-1}}}})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};$.fn.enable=function(b){if(b==undefined){b=true}return this.each(function(){this.disabled=!b})};$.fn.select=function(select){if(select==undefined){select=true}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=select}else{if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one"){$sel.find("option").select(false)}this.selected=select}}})}})(jQuery);(function(B){B.ifixpng=function(C){B.ifixpng.pixel=C};B.ifixpng.getPixel=function(){return B.ifixpng.pixel||"images/pixel.gif"};var A={ltie7:B.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),filter:function(C){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+C+"')"}};B.fn.ifixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var E=B("base").attr("href");if(C.is("img")||C.is("input")){if(C.attr("src").match(/.*\.png([?].*)?$/i)){var D=(E&&C.attr("src").substring(0,1)!="/")?E+C.attr("src"):C.attr("src");C.css({filter:A.filter(D),width:C.width(),height:C.height()}).attr({src:B.ifixpng.getPixel()}).positionFix()}}else{var F=C.css("backgroundImage");if(F.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){F=RegExp.$1;C.css({backgroundImage:"none",filter:A.filter(F)}).positionFix()}}})}:function(){return this};B.fn.iunfixpng=A.ltie7?function(){return this.each(function(){var C=B(this);var D=C.css("filter");if(D.match(/src=["']?(.*\.png([?].*)?)["']?/i)){D=RegExp.$1;if(C.is("img")||C.is("input")){C.attr({src:D}).css({filter:""})}else{C.css({filter:"",background:"url("+D+")"})}}})}:function(){return this};B.fn.positionFix=function(){return this.each(function(){var D=B(this);var C=D.css("position");if(C!="absolute"&&C!="relative"){D.css({position:"relative"})}})}})(jQuery);(function(A){jQuery.extend(jQuery.fn,{selection:function(C){var E=new jQuery.selection(C);var D=E.settings,F=this;var B=function(I){try{E.updateSelection(I.target)}catch(G){}var J=E.text,K=E.htmlText,H=D.data=="html"?K:J;if(H&&D.onSelect){D.onSelect.apply(F,[H?H:"",I])}};if(!D.disable){this.mouseup(function(H){var G=setInterval(function(){clearInterval(G);B.apply(F,[H])},0)})}this.each(function(G,H){if(D.disable){E.disableSelection(H)}else{E.enableSelection(H)}});return this},disableSelection:function(){var B=new jQuery.selection({disable:true});this.each(function(C,D){B.disableSelection(D)})},enableSelection:function(){var B=new jQuery.selection({disable:false});this.each(function(C,D){B.enableSelection(D)})}});jQuery.selection=function(B){this.settings=jQuery.extend({},jQuery.selection.defaults,B);this.text="";this.htmlText="";this.range=null};jQuery.extend(jQuery.selection,{defaults:{disable:false,data:"text",onSelectStart:null,onSelectEnd:null,replace:null},prototype:{disableSelection:function(B){if(!B){return }B.unselectable="on";B.onselectstart=function(){return false};if(B.style){B.style.MozUserSelect="none"}},enableSelection:function(B){if(!B){return }B.unselectable="off";B.onselectstart=function(){return true};if(B.style){B.style.MozUserSelect=""}},getRangeObj:function(C){if(C.getRangeAt){return C.getRangeAt(0)}else{var B=document.createRange();B.setStart(C.anchorNode,C.anchorOffset);B.setEnd(C.focusNode,C.focusOffset);return B}},updateSelection:function(D){if(!jQuery.browser.msie&&/\d+/.test(D.selectionStart)){var E=D.selectionStart,B=D.selectionEnd;this.text=this.htmlText=D.value.substring(E,B)}else{if(window.getSelection){var C=function(F){var G=document.createElement("div");G.appendChild(F.cloneContents());return G.innerHTML};this.range=this.getRangeObj(window.getSelection());this.text=this.range.toString();this.htmlText=C(this.range)}else{if(document.selection){this.range=document.selection.createRange();this.text=this.range.text;this.htmlText=this.range.htmlText}}}}}})})(jQuery);jQuery.extend(jQuery.fn,{validate:function(A){var B=new jQuery.validator(A,this[0]);if(B.settings.onsubmit){this.find("input.cancel:submit").click(function(){B.cancelSubmit=true});this.submit(function(C){if(B.settings.debug){C.preventDefault()}function D(){if(B.settings.submitHandler){B.settings.submitHandler.call(B,B.currentForm);return false}return true}if(B.cancelSubmit){B.cancelSubmit=false;return D()}if(B.form()){return D()}else{B.focusInvalid();return false}})}return B},push:function(A){return this.setArray(jQuery.merge(this.get(),A))}});jQuery.extend(jQuery.expr[":"],{blank:"!jQuery.trim(a.value)",filled:"!!jQuery.trim(a.value)",unchecked:"!a.checked"});String.format=function(A,B){if(arguments.length==1){return function(){var C=jQuery.makeArray(arguments);C.unshift(A);return String.format.apply(this,C)}}if(arguments.length>2&&B.constructor!=Array){B=jQuery.makeArray(arguments).slice(1)}if(B.constructor!=Array){B=[B]}jQuery.each(B,function(C,D){A=A.replace(new RegExp("\\{"+C+"\\}","g"),D)});return A};jQuery.validator=function(A,B){this.settings=jQuery.extend({},jQuery.validator.defaults,A);this.currentForm=B;this.labelContainer=this.settings.errorLabelContainer;this.errorContext=this.labelContainer.length&&this.labelContainer||jQuery(B);this.containers=this.settings.errorContainer.add(this.settings.errorLabelContainer);this.submitted={};this.invalid={};this.reset();this.refresh()};jQuery.extend(jQuery.validator,{defaults:{messages:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:jQuery([]),errorLabelContainer:jQuery([]),onsubmit:true,ignore:[],onblur:function(A){if(!this.checkable(A)&&(A.name in this.submitted||!this.required(A))){this.element(A)}},onkeyup:function(A){if(A.name in this.submitted||A==this.lastElement){this.element(A)}},onclick:function(A){if(A.name in this.submitted){this.element(A)}}},setDefaults:function(A){jQuery.extend(jQuery.validator.defaults,A)},messages:{required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxLength:String.format("Please enter a value no longer than {0} characters."),minLength:String.format("Please enter a value of at least {0} characters."),rangeLength:String.format("Please enter a value between {0} and {1} characters long."),rangeValue:String.format("Please enter a value between {0} and {1}."),maxValue:String.format("Please enter a value less than or equal to {0}."),minValue:String.format("Please enter a value greater than or equal to {0}.")},prototype:{form:function(){this.prepareForm();for(var A=0;this.elements[A];A++){this.check(this.elements[A])}jQuery.extend(this.submitted,this.errorMap);this.invalid=jQuery.extend({},this.errorMap);this.settings.invalidHandler&&this.settings.invalidHandler.call(this);this.showErrors();return this.valid()},element:function(B){B=this.clean(B);this.lastElement=B;this.prepareElement(B);var A=this.check(B);if(A){delete this.invalid[B.name]}else{this.invalid[B.name]=true}this.showErrors();return A},showErrors:function(A){if(A){jQuery.extend(this.errorMap,A);for(name in A){this.errorList.push({message:A[name],element:jQuery("[@name='"+name+"']:first",this.currentForm)[0]})}this.successList=jQuery.grep(this.successList,function(B){return !(B.name in A)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(jQuery.fn.resetForm){jQuery(this.currentForm).resetForm()}this.prepareForm();this.hideErrors();this.elements.removeClass(this.settings.errorClass)},numberOfInvalids:function(){var A=0;for(i in this.invalid){A++}return A},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{jQuery(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(A){}}},findLastActive:function(){var A=this.lastActive;return A&&jQuery.grep(this.errorList,function(B){return B.element.name==A.name}).length==1&&A},refresh:function(){var B=this;B.rulesCache={};function C(){B.lastActive=this;if(B.settings.focusCleanup&&!B.blockFocusCleanup){jQuery(this).removeClass(B.settings.errorClass);B.errorsFor(this).hide()}}this.elements=jQuery(this.currentForm).find("input, select, textarea").not(":submit, :reset").not("[@disabled]").not(this.settings.ignore).filter(function(){!this.name&&B.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in B.rulesCache||!B.rules(this).length){return false}B.rulesCache[this.name]=B.rules(this);return true});this.elements.focus(C);B.settings.onblur&&B.elements.blur(function(){B.settings.onblur.call(B,this)});B.settings.onkeyup&&B.elements.keyup(function(){B.settings.onkeyup.call(B,this)});if(B.settings.onclick){var A=jQuery([]);B.elements.each(function(){if(B.checkable(this)){A.push(B.checkableGroup(this))}});A.click(function(){B.settings.onclick.call(B,this)})}},clean:function(A){return jQuery(A)[0]},errors:function(){return jQuery(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(A){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=jQuery([]);this.toHide=jQuery([])},prepareForm:function(){this.reset();this.toHide=this.errors().push(this.containers)},prepareElement:function(A){this.reset();this.toHide=this.errorsFor(this.clean(A))},check:function(C){C=this.clean(C);jQuery(C).removeClass(this.settings.errorClass);var F=this.rulesCache[C.name];for(var B=0;F[B];B++){var E=F[B];try{var A=jQuery.validator.methods[E.method].call(this,jQuery.trim(C.value),C,E.parameters);if(A===-1){break}if(!A){jQuery(C).addClass(this.settings.errorClass);this.formatAndAdd(E,C);return false}}catch(D){this.settings.debug&&window.console&&console.error("exception occured when checking element "+C.id+", check the '"+E.method+"' method");throw D}}if(F.length&&this.settings.success){this.successList.push(C)}return true},configuredMessage:function(C,B){var A=this.settings.messages[C];return A&&(A.constructor==String?A:A[B])},defaultMessage:function(A,B){return this.configuredMessage(A.name,B)||A.title||jQuery.validator.messages[B]||"<strong>Warning: No message defined for "+A.name+"</strong>"},formatAndAdd:function(C,A){var B=this.defaultMessage(A,C.method);if(typeof B=="function"){B=B.call(this,C.parameters,A)}this.errorList.push({message:B,element:A});this.errorMap[A.name]=B;this.submitted[A.name]=B},addWrapper:function(A){if(this.settings.wrapper){A.push(A.parents(this.settings.wrapper))}return A},defaultShowErrors:function(){for(var B=0;this.errorList[B];B++){var A=this.errorList[B];this.showLabel(A.element,A.message)}if(this.errorList.length){this.toShow.push(this.containers)}for(var B=0;this.successList[B];B++){this.showLabel(this.successList[B])}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},showLabel:function(B,C){var A=this.errorsFor(B);if(A.length){A.removeClass().addClass(this.settings.errorClass);if(this.settings.overrideErrors||A.attr("generated")){A.html(C)}}else{A=jQuery("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(B),generated:true}).addClass(this.settings.errorClass).html(C||"");if(this.settings.wrapper){A=A.hide().show().wrap("<"+this.settings.wrapper+">").parent()}if(!this.labelContainer.append(A).length){this.settings.errorPlacement?this.settings.errorPlacement(A,jQuery(B)):A.insertAfter(B)}}if(!C&&this.settings.success){A.text("");typeof this.settings.success=="string"?A.addClass(this.settings.success):this.settings.success(A)}this.toShow.push(A)},errorsFor:function(A){return this.errors().filter("[@for='"+this.idOrName(A)+"']")},idOrName:function(A){return this.checkable(A)?A.name:A.id||A.name},rules:function(B){var C=this.data(B);if(!C){return[]}var D=[];if(typeof C=="string"){var A={};A[C]=true;C=A}jQuery.each(C,function(E,F){D[D.length]={method:E,parameters:F}});return D},data:function(A){return this.settings.rules?this.settings.rules[A.name]:this.settings.meta?jQuery(A).data()[this.settings.meta]:jQuery(A).data()},checkable:function(A){return/radio|checkbox/i.test(A.type)},checkableGroup:function(A){return jQuery(A.form||document).find('[@name="'+A.name+'"]')},getLength:function(B,A){switch(A.nodeName.toLowerCase()){case"select":return jQuery("option:selected",A).length;case"input":if(this.checkable(A)){return this.checkableGroup(A).filter(":checked").length}}return B.length},depend:function(B,A){return this.dependTypes[typeof B]?this.dependTypes[typeof B](B,A):true},dependTypes:{"boolean":function(B,A){return B},"string":function(B,A){return !!jQuery(B,A.form).length},"function":function(B,A){return B(A)}},required:function(A){return !jQuery.validator.methods.required.call(this,jQuery.trim(A.value),A)}},methods:{required:function(C,B,D){if(!this.depend(D,B)){return -1}switch(B.nodeName.toLowerCase()){case"select":var A=jQuery("option:selected",B);return A.length>0&&(B.type=="select-multiple"||(jQuery.browser.msie&&!(A[0].attributes["value"].specified)?A[0].text:A[0].value).length>0);case"input":if(this.checkable(B)){return this.getLength(C,B)>0}default:return C.length>0}},minLength:function(B,A,C){return this.required(A)||this.getLength(B,A)>=C},maxLength:function(B,A,C){return this.required(A)||this.getLength(B,A)<=C},rangeLength:function(C,A,D){var B=this.getLength(C,A);return this.required(A)||(B>=D[0]&&B<=D[1])},minValue:function(B,A,C){return this.required(A)||B>=C},maxValue:function(B,A,C){return this.required(A)||B<=C},rangeValue:function(B,A,C){return this.required(A)||(B>=C[0]&&B<=C[1])},email:function(B,A){return this.required(A)||/^[\w-+\.]+@([\w-]+\.)+[\w-]{2,}$/i.test(B)},url:function(B,A){return this.required(A)||/^(https?|ftp):\/\/[A-Z0-9](\.?[A-Z0-9][A-Z0-9_\-]*)*(\/([A-Z0-9][A-Z0-9_\-\.]*)?)*(\?([A-Z0-9][A-Z0-9_\-\.%\+=&]*)?)?$/i.test(B)},date:function(B,A){return this.required(A)||!/Invalid|NaN/.test(new Date(B))},dateISO:function(B,A){return this.required(A)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(B)},dateDE:function(B,A){return this.required(A)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(B)},number:function(B,A){return this.required(A)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(B)},numberDE:function(B,A){return this.required(A)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(B)},digits:function(B,A){return this.required(A)||/^\d+$/.test(B)},creditcard:function(E,B){if(this.required(B)){return true}var F=0,D=0,A=false;E=E.replace(/\D/g,"");for(n=E.length-1;n>=0;n--){var C=E.charAt(n);var D=parseInt(C,10);if(A){if((D*=2)>9){D-=9}}F+=D;A=!A}return(F%10)==0},accept:function(B,A,C){C=typeof C=="string"?C:"png|jpe?g|gif";return this.required(A)||B.match(new RegExp(".("+C+")$"))},equalTo:function(B,A,C){return B==jQuery(C).val()}},addMethod:function(A,C,B){jQuery.validator.methods[A]=C;jQuery.validator.messages[A]=B}});jQuery(function(){$.ifixpng("img/pixel.gif");$("img[@src$=.png]").ifixpng();$("div#item-container").find("a:not([@class^=social-bookmark])").filter("a[@target='_blank']").css({"background":"url(img/external.png) center right no-repeat","padding-right":"10px","margin-right":"5px"});$("#loading").ajaxStart(function(){$(this).show()});$("#loading").ajaxStop(function(){$(this).hide()});$("span[@id$=-ev]").disableSelection();var C=$("#search-field"),D=$("#__search"),A=$("#search-fm"),B=$("#search-btn");A.submit(function(){return !!(jQuery("#search-field").val())});C.focus()});$(window).load(function(){$("div.sidenav").disableSelection()})
