/* mootools.js */

var MooTools={version:'1.12'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}}
if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';}
if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}}
return type;};function $merge(){var mix={};for(var i=0;i<arguments.length;i++){for(var property in arguments[i]){var ap=arguments[i][property];var mp=mix[property];if(mp&&$type(ap)=='object'&&$type(mp)=='object')mix[property]=$merge(mp,ap);else mix[property]=ap;}}
return mix;};var $extend=function(){var args=arguments;if(!args[1])args=[this,args[0]];for(var property in args[1])args[0][property]=args[1][property];return args[0];};var $native=function(){for(var i=0,l=arguments.length;i<l;i++){arguments[i].extend=function(props){for(var prop in props){if(!this.prototype[prop])this.prototype[prop]=props[prop];if(!this[prop])this[prop]=$native.generic(prop);}};}};$native.generic=function(prop){return function(bind){return this.prototype[prop].apply(bind,Array.prototype.slice.call(arguments,1));};};$native(Function,Array,String,Number);function $chk(obj){return!!(obj||obj===0);};function $pick(obj,picked){return $defined(obj)?obj:picked;};function $random(min,max){return Math.floor(Math.random()*(max-min+1)+min);};function $time(){return new Date().getTime();};function $clear(timer){clearTimeout(timer);clearInterval(timer);return null;};var Abstract=function(obj){obj=obj||{};obj.extend=$extend;return obj;};var Window=new Abstract(window);var Document=new Abstract(document);document.head=document.getElementsByTagName('head')[0];window.xpath=!!(document.evaluate);if(window.ActiveXObject)window.ie=window[window.XMLHttpRequest?'ie7':'ie6']=true;else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=window[window.xpath?'webkit420':'webkit419']=true;else if(document.getBoxObjectFor!=null||window.mozInnerScreenX!=null)window.gecko=true;window.khtml=window.webkit;Object.extend=$extend;if(typeof HTMLElement=='undefined'){var HTMLElement=function(){};if(window.webkit)document.createElement("iframe");HTMLElement.prototype=(window.webkit)?window["[[DOMElement.prototype]]"]:{};}
HTMLElement.prototype.htmlElement=function(){};if(window.ie6)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){};var Class=function(properties){var klass=function(){return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=='function')?this.initialize.apply(this,arguments):this;};$extend(klass,this);klass.prototype=properties;klass.constructor=Class;return klass;};Class.empty=function(){};Class.prototype={extend:function(properties){var proto=new this(null);for(var property in properties){var pp=proto[property];proto[property]=Class.Merge(pp,properties[property]);}
return new Class(proto);},implement:function(){for(var i=0,l=arguments.length;i<l;i++)$extend(this.prototype,arguments[i]);}};Class.Merge=function(previous,current){if(previous&&previous!=current){var type=$type(current);if(type!=$type(previous))return current;switch(type){case'function':var merged=function(){this.parent=arguments.callee.parent;return current.apply(this,arguments);};merged.parent=previous;return merged;case'object':return $merge(previous,current);}}
return current;};var Chain=new Class({chain:function(fn){this.chains=this.chains||[];this.chains.push(fn);return this;},callChain:function(){if(this.chains&&this.chains.length)this.chains.shift().delay(10,this);},clearChain:function(){this.chains=[];}});var Events=new Class({addEvent:function(type,fn){if(fn!=Class.empty){this.$events=this.$events||{};this.$events[type]=this.$events[type]||[];this.$events[type].include(fn);}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},removeEvent:function(type,fn){if(this.$events&&this.$events[type])this.$events[type].remove(fn);return this;}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var option in this.options){if($type(this.options[option]=='function')&&(/^on[A-Z]/).test(option))this.addEvent(option,this.options[option]);}}
return this;}});Array.extend({forEach:function(fn,bind){for(var i=0,j=this.length;i<j;i++)fn.call(bind,this[i],i,this);},filter:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},map:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++)results[i]=fn.call(bind,this[i],i,this);return results;},every:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(!fn.call(bind,this[i],i,this))return false;}
return true;},some:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))return true;}
return false;},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},copy:function(start,length){start=start||0;if(start<0)start=this.length+start;length=length||(this.length-start);var newArray=[];for(var i=0;i<length;i++)newArray[i]=this[start++];return newArray;},remove:function(item){var i=0;var len=this.length;while(i<len){if(this[i]===item){this.splice(i,1);len--;}else{i++;}}
return this;},contains:function(item,from){return this.indexOf(item,from)!=-1;},associate:function(keys){var obj={},length=Math.min(this.length,keys.length);for(var i=0;i<length;i++)obj[keys[i]]=this[i];return obj;},extend:function(array){for(var i=0,j=array.length;i<j;i++)this.push(array[i]);return this;},merge:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},include:function(item){if(!this.contains(item))this.push(item);return this;},getRandom:function(){return this[$random(0,this.length-1)]||null;},getLast:function(){return this[this.length-1]||null;}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;function $A(array){return Array.copy(array);};function $each(iterable,fn,bind){if(iterable&&typeof iterable.length=='number'&&$type(iterable)!='object'){Array.forEach(iterable,fn,bind);}else{for(var name in iterable)fn.call(bind||iterable,iterable[name],name);}};Array.prototype.test=Array.prototype.contains;String.extend({test:function(regex,params){return(($type(regex)=='string')?new RegExp(regex,params):regex).test(this);},toInt:function(){return parseInt(this,10);},toFloat:function(){return parseFloat(this);},camelCase:function(){return this.replace(/-\D/g,function(match){return match.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(match){return(match.charAt(0)+'-'+match.charAt(1).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(match){return match.toUpperCase();});},trim:function(){return this.replace(/^\s+|\s+$/g,'');},clean:function(){return this.replace(/\s{2,}/g,' ').trim();},rgbToHex:function(array){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHex(array):false;},hexToRgb:function(array){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(hex)?hex.slice(1).hexToRgb(array):false;},contains:function(string,s){return(s)?(s+this+s).indexOf(s+string+s)>-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));}
return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);}
else args=options.arguments||arguments;var returns=function(){return fn.apply($pick(options.bind,fn),args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i<this;i++)fn(i);}});var Element=new Class({initialize:function(el,props){if($type(el)=='string'){if(window.ie&&props&&(props.name||props.type)){var name=(props.name)?' name="'+props.name+'"':'';var type=(props.type)?' type="'+props.type+'"':'';delete props.name;delete props.type;el='<'+el+name+type+'>';}
el=document.createElement(el);}
el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;}
if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsBySelector=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i<j;i++){var selector=arguments[i];switch($type(selector)){case'element':elements.push(selector);case'boolean':break;case false:break;case'string':selector=document.getElementsBySelector(selector,true);default:elements.extend(selector);}}
return $$.unique(elements);};$$.unique=function(array){var elements=[];for(var i=0,l=array.length;i<l;i++){if(array[i].$included)continue;var element=$(array[i]);if(element&&!element.$included){element.$included=true;elements.push(element);}}
for(var n=0,d=elements.length;n<d;n++)elements[n].$included=null;return new Elements(elements);};Elements.Multi=function(property){return function(){var args=arguments;var items=[];var elements=true;for(var i=0,j=this.length,returns;i<j;i++){returns=this[i][property].apply(this[i],args);if($type(returns)!='element')elements=false;items.push(returns);};return(elements)?$$.unique(items):items;};};Element.extend=function(properties){for(var property in properties){HTMLElement.prototype[property]=properties[property];Element.prototype[property]=properties[property];Element[property]=$native.generic(property);var elementsProperty=(Array.prototype[property])?property+'Elements':property;Elements.prototype[elementsProperty]=Elements.Multi(property);}};Element.extend({set:function(props){for(var prop in props){var val=props[prop];switch(prop){case'styles':this.setStyles(val);break;case'events':if(this.addEvents)this.addEvents(val);break;case'properties':this.setProperties(val);break;default:this.setProperty(prop,val);}}
return this;},inject:function(el,where){el=$(el);switch(where){case'before':el.parentNode.insertBefore(this,el);break;case'after':var next=el.getNext();if(!next)el.parentNode.appendChild(this);else el.parentNode.insertBefore(this,next);break;case'top':var first=el.firstChild;if(first){el.insertBefore(this,first);break;}
default:el.appendChild(this);}
return this;},injectBefore:function(el){return this.inject(el,'before');},injectAfter:function(el){return this.inject(el,'after');},injectInside:function(el){return this.inject(el,'bottom');},injectTop:function(el){return this.inject(el,'top');},adopt:function(){var elements=[];$each(arguments,function(argument){elements=elements.concat(argument);});$$(elements).inject(this);return this;},remove:function(){return this.parentNode.removeChild(this);},clone:function(contents){var el=$(this.cloneNode(contents!==false));if(!el.$events)return el;el.$events={};for(var type in this.$events)el.$events[type]={'keys':$A(this.$events[type].keys),'values':$A(this.$events[type].values)};return el.removeEvents();},replaceWith:function(el){el=$(el);this.parentNode.replaceChild(el,this);return el;},appendText:function(text){this.appendChild(document.createTextNode(text));return this;},hasClass:function(className){return this.className.contains(className,' ');},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className).clean();return this;},removeClass:function(className){this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1').clean();return this;},toggleClass:function(className){return this.hasClass(className)?this.removeClass(className):this.addClass(className);},setStyle:function(property,value){switch(property){case'opacity':return this.setOpacity(parseFloat(value));case'float':property=(window.ie)?'styleFloat':'cssFloat';}
property=property.camelCase();switch($type(value)){case'number':if(!['zIndex','zoom'].contains(property))value+='px';break;case'array':value='rgb('+value.join(',')+')';}
this.style[property]=value;return this;},setStyles:function(source){switch($type(source)){case'object':Element.setMany(this,'setStyle',source);break;case'string':this.style.cssText=source;}
return this;},setOpacity:function(opacity){if(opacity==0){if(this.style.visibility!="hidden")this.style.visibility="hidden";}else{if(this.style.visibility!="visible")this.style.visibility="visible";}
if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;if(window.ie)this.style.filter=(opacity==1)?'':"alpha(opacity="+opacity*100+")";this.style.opacity=this.$tmp.opacity=opacity;return this;},getStyle:function(property){property=property.camelCase();var result=this.style[property];if(!$chk(result)){if(property=='opacity')return this.$tmp.opacity;result=[];for(var style in Element.Styles){if(property==style){Element.Styles[style].each(function(s){var style=this.getStyle(s);result.push(parseInt(style)?style:'0px');},this);if(property=='border'){var every=result.every(function(bit){return(bit==result[0]);});return(every)?result[0]:false;}
return result.join(' ');}}
if(property.contains('border')){if(Element.Styles.border.contains(property)){return['Width','Style','Color'].map(function(p){return this.getStyle(property+p);},this).join(' ');}else if(Element.borderShort.contains(property)){return['Top','Right','Bottom','Left'].map(function(p){return this.getStyle('border'+p+property.replace('border',''));},this).join(' ');}}
if(document.defaultView)result=document.defaultView.getComputedStyle(this,null).getPropertyValue(property.hyphenate());else if(this.currentStyle)result=this.currentStyle[property];}
if(window.ie)result=Element.fixStyle(property,result,this);if(result&&property.test(/color/i)&&result.contains('rgb')){return result.split('rgb').splice(1,4).map(function(color){return color.rgbToHex();}).join(' ');}
return result;},getStyles:function(){return Element.getMany(this,'getStyle',arguments);},walk:function(brother,start){brother+='Sibling';var el=(start)?this[start]:this[brother];while(el&&$type(el)!='element')el=el[brother];return $(el);},getPrevious:function(){return this.walk('previous');},getNext:function(){return this.walk('next');},getFirst:function(){return this.walk('next','firstChild');},getLast:function(){return this.walk('previous','lastChild');},getParent:function(){return $(this.parentNode);},getChildren:function(){return $$(this.childNodes);},hasChild:function(el){return!!$A(this.getElementsByTagName('*')).contains(el);},getProperty:function(property){var index=Element.Properties[property];if(index)return this[index];var flag=Element.PropertiesIFlag[property]||0;if(!window.ie||flag)return this.getAttribute(property,flag);var node=this.attributes[property];return(node)?node.nodeValue:null;},removeProperty:function(property){var index=Element.Properties[property];if(index)this[index]='';else this.removeAttribute(property);return this;},getProperties:function(){return Element.getMany(this,'getProperty',arguments);},setProperty:function(property,value){var index=Element.Properties[property];if(index)this[index]=value;else this.setAttribute(property,value);return this;},setProperties:function(source){return Element.setMany(this,'setProperty',source);},setHTML:function(){this.innerHTML=$A(arguments).join('');return this;},setText:function(text){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')this.styleSheet.cssText=text;else if(tag=='script')this.setProperty('text',text);return this;}else{this.removeChild(this.firstChild);return this.appendText(text);}}
this[$defined(this.innerText)?'innerText':'textContent']=text;return this;},getText:function(){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')return this.styleSheet.cssText;else if(tag=='script')return this.getProperty('text');}else{return this.innerHTML;}}
return($pick(this.innerText,this.textContent));},getTag:function(){return this.tagName.toLowerCase();},empty:function(){Garbage.trash(this.getElementsByTagName('*'));return this.setHTML('');}});Element.fixStyle=function(property,result,element){if($chk(parseInt(result)))return result;if(['height','width'].contains(property)){var values=(property=='width')?['left','right']:['top','bottom'];var size=0;values.each(function(value){size+=element.getStyle('border-'+value+'-width').toInt()+element.getStyle('padding-'+value).toInt();});return element['offset'+property.capitalize()]-size+'px';}else if(property.test(/border(.+)Width|margin|padding/)){return'0px';}
return result;};Element.Styles={'border':[],'padding':[],'margin':[]};['Top','Right','Bottom','Left'].each(function(direction){for(var style in Element.Styles)Element.Styles[style].push(style+direction);});Element.borderShort=['borderWidth','borderStyle','borderColor'];Element.getMany=function(el,method,keys){var result={};$each(keys,function(key){result[key]=el[method](key);});return result;};Element.setMany=function(el,method,pairs){for(var key in pairs)el[method](key,pairs[key]);return el;};Element.Properties=new Abstract({'class':'className','for':'htmlFor','colspan':'colSpan','rowspan':'rowSpan','accesskey':'accessKey','tabindex':'tabIndex','maxlength':'maxLength','readonly':'readOnly','frameborder':'frameBorder','value':'value','disabled':'disabled','checked':'checked','multiple':'multiple','selected':'selected'});Element.PropertiesIFlag={'href':2,'src':2};Element.Methods={Listeners:{addListener:function(type,fn){if(this.addEventListener)this.addEventListener(type,fn,false);else this.attachEvent('on'+type,fn);return this;},removeListener:function(type,fn){if(this.removeEventListener)this.removeEventListener(type,fn,false);else this.detachEvent('on'+type,fn);return this;}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(el){if(!el.$tmp){Garbage.elements.push(el);el.$tmp={'opacity':1};}
return el;},trash:function(elements){for(var i=0,j=elements.length,el;i<j;i++){if(!(el=elements[i])||!el.$tmp)continue;if(el.$events)el.fireEvent('trash').removeEvents();for(var p in el.$tmp)el.$tmp[p]=null;for(var d in Element.prototype)el[d]=null;Garbage.elements[Garbage.elements.indexOf(el)]=null;el.htmlElement=el.$tmp=el=null;}
Garbage.elements.remove(null);},empty:function(){Garbage.collect(window);Garbage.collect(document);Garbage.trash(Garbage.elements);}};window.addListener('beforeunload',function(){window.addListener('unload',Garbage.empty);if(window.ie)window.addListener('unload',CollectGarbage);});var Event=new Class({initialize:function(event){if(event&&event.$extended)return event;this.$extended=true;event=event||window.event;this.event=event;this.type=event.type;this.target=event.target||event.srcElement;if(this.target.nodeType==3)this.target=this.target.parentNode;this.shift=event.shiftKey;this.control=event.ctrlKey;this.alt=event.altKey;this.meta=event.metaKey;if(['DOMMouseScroll','mousewheel'].contains(this.type)){this.wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;}else if(this.type.contains('key')){this.code=event.which||event.keyCode;for(var name in Event.keys){if(Event.keys[name]==this.code){this.key=name;break;}}
if(this.type=='keydown'){var fKey=this.code-111;if(fKey>0&&fKey<13)this.key='f'+fKey;}
this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;}
this.fixRelatedTarget();}
return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;}
if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;}
return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');}
return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&&param[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}}
items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<j;i++)elements.push(xpath.snapshotItem(i));return(nocash)?elements:new Elements(elements.map($));}},'normal':{getParam:function(items,context,param,i){if(i==0){if(param[2]){var el=context.getElementById(param[2]);if(!el||((param[1]!='*')&&(Element.getTag(el)!=param[1])))return false;items=[el];}else{items=$A(context.getElementsByTagName(param[1]));}}else{items=$$.shared.getElementsByTagName(items,param[1]);if(param[2])items=Elements.filterById(items,param[2],true);}
if(param[3])items=Elements.filterByClass(items,param[3],true);if(param[4])items=Elements.filterByAttribute(items,param[4],param[5],param[6],true);return items;},getItems:function(items,context,nocash){return(nocash)?items:$$.unique(items);}},resolver:function(prefix){return(prefix=='xhtml')?'http://www.w3.org/1999/xhtml':false;},getElementsByTagName:function(context,tagName){var found=[];for(var i=0,j=context.length;i<j;i++)found.extend(context[i].getElementsByTagName(tagName));return found;}};$$.shared.method=(window.xpath)?'xpath':'normal';Element.Methods.Dom={getElements:function(selector,nocash){var items=[];selector=selector.trim().split(' ');for(var i=0,j=selector.length;i<j;i++){var sel=selector[i];var param=sel.match($$.shared.regexp);if(!param)break;param[1]=param[1]||'*';var temp=$$.shared[$$.shared.method].getParam(items,this,param,i);if(!temp)break;items=temp;}
return $$.shared[$$.shared.method].getItems(items,this,nocash);},getElement:function(selector){return $(this.getElements(selector,true)[0]||false);},getElementsBySelector:function(selector,nocash){var elements=[];selector=selector.split(',');for(var i=0,j=selector.length;i<j;i++)elements=elements.concat(this.getElements(selector[i],true));return(nocash)?elements:$$.unique(elements);}};Element.extend({getElementById:function(id){var el=document.getElementById(id);if(!el)return false;for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){if(!parent)return false;}
return el;},getElementsByClassName:function(className){return this.getElements('.'+className);}});document.extend(Element.Methods.Dom);Element.extend(Element.Methods.Dom);Element.extend({getValue:function(){switch(this.getTag()){case'select':var values=[];$each(this.options,function(option){if(option.selected)values.push($pick(option.value,option.text));});return(this.multiple)?values:values[0];case'input':if(!(this.checked&&['checkbox','radio'].contains(this.type))&&!['hidden','text','password'].contains(this.type))break;case'textarea':return this.value;}
return false;},getFormElements:function(){return $$(this.getElementsByTagName('input'),this.getElementsByTagName('select'),this.getElementsByTagName('textarea'));},toQueryString:function(){var queryString=[];this.getFormElements().each(function(el){var name=el.name;var value=el.getValue();if(value===false||!name||el.disabled)return;var qs=function(val){queryString.push(name+'='+encodeURIComponent(val));};if($type(value)=='array')value.each(qs);else qs(value);});return queryString.join('&');}});Element.extend({scrollTo:function(x,y){this.scrollLeft=x;this.scrollTop=y;},getSize:function(){return{'scroll':{'x':this.scrollLeft,'y':this.scrollTop},'size':{'x':this.offsetWidth,'y':this.offsetHeight},'scrollSize':{'x':this.scrollWidth,'y':this.scrollHeight}};},getPosition:function(overflown){overflown=overflown||[];var el=this,left=0,top=0;do{left+=el.offsetLeft||0;top+=el.offsetTop||0;el=el.offsetParent;}while(el);overflown.each(function(element){left-=element.scrollLeft||0;top-=element.scrollTop||0;});return{'x':left,'y':top};},getTop:function(overflown){return this.getPosition(overflown).y;},getLeft:function(overflown){return this.getPosition(overflown).x;},getCoordinates:function(overflown){var position=this.getPosition(overflown);var obj={'width':this.offsetWidth,'height':this.offsetHeight,'left':position.x,'top':position.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;}});Element.Events.domready={add:function(fn){if(window.loaded){fn.call(this);return;}
var domReady=function(){if(window.loaded)return;window.loaded=true;window.timer=$clear(window.timer);this.fireEvent('domready');}.bind(this);if(document.readyState&&window.webkit){window.timer=function(){if(['loaded','complete'].contains(document.readyState))domReady();}.periodical(50);}else if(document.readyState&&window.ie){if(!$('ie_ready')){var src=(window.location.protocol=='https:')?'://0':'javascript:void(0)';document.write('<script id="ie_ready" defer src="'+src+'"><\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time<this.time+this.options.duration){this.delta=this.options.transition((time-this.time)/this.options.duration);this.setNow();this.increase();}else{this.stop(true);this.set(this.to);this.fireEvent('onComplete',this.element,10);this.callChain();}},set:function(to){this.now=to;this.increase();return this;},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(from,to){return(to-from)*this.delta+from;},start:function(from,to){if(!this.options.wait)this.stop();else if(this.timer)return this;this.from=from;this.to=to;this.change=this.to-this.from;this.time=$time();this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);this.fireEvent('onStart',this.element);return this;},stop:function(end){if(!this.timer)return this;this.timer=$clear(this.timer);if(!end)this.fireEvent('onCancel',this.element);return this;},custom:function(from,to){return this.start(from,to);},clearTimer:function(end){return this.stop(end);}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(property,to){if(property.test(/color/i))return this.Color;var type=$type(to);if((type=='array')||(type=='string'&&to.contains(' ')))return this.Multi;return this.Single;},parse:function(el,property,fromTo){if(!fromTo.push)fromTo=[fromTo];var from=fromTo[0],to=fromTo[1];if(!$chk(to)){to=from;from=el.getStyle(property);}
var css=this.select(property,to);return{'from':css.parse(from),'to':css.parse(to),'css':css};}};Fx.CSS.Single={parse:function(value){return parseFloat(value);},getNow:function(from,to,fx){return fx.compute(from,to);},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=Math.round(value);return value+unit;}};Fx.CSS.Multi={parse:function(value){return value.push?value:value.split(' ').map(function(v){return parseFloat(v);});},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=fx.compute(from[i],to[i]);return now;},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=value.map(Math.round);return value.join(unit+' ')+unit;}};Fx.CSS.Color={parse:function(value){return value.push?value:value.hexToRgb(true);},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=Math.round(fx.compute(from[i],to[i]));return now;},getValue:function(value){return'rgb('+value.join(',')+')';}};Fx.Style=Fx.Base.extend({initialize:function(el,property,options){this.element=$(el);this.property=property;this.parent(options);},hide:function(){return this.set(0);},setNow:function(){this.now=this.css.getNow(this.from,this.to,this);},set:function(to){this.css=Fx.CSS.select(this.property,to);return this.parent(this.css.parse(to));},start:function(from,to){if(this.timer&&this.options.wait)return this;var parsed=Fx.CSS.parse(this.element,this.property,[from,to]);this.css=parsed.css;return this.parent(parsed.from,parsed.to);},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property));}});Element.extend({effect:function(property,options){return new Fx.Style(this,property,options);}});Fx.Styles=Fx.Base.extend({initialize:function(el,options){this.element=$(el);this.parent(options);},setNow:function(){for(var p in this.from)this.now[p]=this.css[p].getNow(this.from[p],this.to[p],this);},set:function(to){var parsed={};this.css={};for(var p in to){this.css[p]=Fx.CSS.select(p,to[p]);parsed[p]=this.css[p].parse(to[p]);}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var p in obj){var parsed=Fx.CSS.parse(this.element,p,obj[p]);from[p]=parsed.from;to[p]=parsed.to;this.css[p]=parsed.css;}
return this.parent(from,to);},increase:function(){for(var p in this.now)this.element.setStyle(p,this.css[p].getValue(this.now[p],this.options.unit,p));}});Element.extend({effects:function(options){return new Fx.Styles(this,options);}});Fx.Elements=Fx.Base.extend({initialize:function(elements,options){this.elements=$$(elements);this.parent(options);},setNow:function(){for(var i in this.from){var iFrom=this.from[i],iTo=this.to[i],iCss=this.css[i],iNow=this.now[i]={};for(var p in iFrom)iNow[p]=iCss[p].getNow(iFrom[p],iTo[p],this);}},set:function(to){var parsed={};this.css={};for(var i in to){var iTo=to[i],iCss=this.css[i]={},iParsed=parsed[i]={};for(var p in iTo){iCss[p]=Fx.CSS.select(p,iTo[p]);iParsed[p]=iCss[p].parse(iTo[p]);}}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={},iCss=this.css[i]={};for(var p in iProps){var parsed=Fx.CSS.parse(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;iCss[p]=parsed.css;}}
return this.parent(from,to);},increase:function(){for(var i in this.now){var iNow=this.now[i],iCss=this.css[i];for(var p in iNow)this.elements[i].setStyle(p,iCss[p].getValue(iNow[p],this.options.unit,p));}}});Fx.Scroll=Fx.Base.extend({options:{overflown:[],offset:{'x':0,'y':0},wheelStops:true},initialize:function(element,options){this.now=[];this.element=$(element);this.bound={'stop':this.stop.bind(this,false)};this.parent(options);if(this.options.wheelStops){this.addEvent('onStart',function(){document.addEvent('mousewheel',this.bound.stop);}.bind(this));this.addEvent('onComplete',function(){document.removeEvent('mousewheel',this.bound.stop);}.bind(this));}},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},scrollTo:function(x,y){if(this.timer&&this.options.wait)return this;var el=this.element.getSize();var values={'x':x,'y':y};for(var z in el.size){var max=el.scrollSize[z]-el.size[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=el.scroll[z];values[z]+=this.options.offset[z];}
return this.start([el.scroll.x,el.scroll.y],[values.x,values.y]);},toTop:function(){return this.scrollTo(false,0);},toBottom:function(){return this.scrollTo(false,'full');},toLeft:function(){return this.scrollTo(0,false);},toRight:function(){return this.scrollTo('full',false);},toElement:function(el){var parent=this.element.getPosition(this.options.overflown);var target=$(el).getPosition(this.options.overflown);return this.scrollTo(target.x-parent.x,target.y-parent.y);},increase:function(){this.element.scrollTo(this.now[0],this.now[1]);}});Fx.Slide=Fx.Base.extend({options:{mode:'vertical'},initialize:function(el,options){this.element=$(el);this.wrapper=new Element('div',{'styles':$extend(this.element.getStyles('margin'),{'overflow':'hidden'})}).injectAfter(this.element).adopt(this.element);this.element.setStyle('margin',0);this.setOptions(options);this.now=[];this.parent(this.options);this.open=true;this.addEvent('onComplete',function(){this.open=(this.now[0]===0);});if(window.webkit419)this.addEvent('onComplete',function(){if(this.open)this.element.remove().inject(this.wrapper);});},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight;},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth;},slideIn:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[0,this.offset]);},slideOut:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[-this.offset,0]);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){if(this.wrapper.offsetHeight==0||this.wrapper.offsetWidth==0)return this.slideIn(mode);return this.slideOut(mode);},increase:function(){this.element.setStyle(this.margin,this.now[0]+this.options.unit);this.wrapper.setStyle(this.layout,this.now[1]+this.options.unit);}});Fx.Transition=function(transition,params){params=params||[];if($type(params)!='array')params=[params];return $extend(transition,{easeIn:function(pos){return transition(pos,params);},easeOut:function(pos){return 1-transition(1-pos,params);},easeInOut:function(pos){return(pos<=0.5)?transition(2*pos,params)/2:(2-transition(2*(1-pos),params))/2;}});};Fx.Transitions=new Abstract({linear:function(p){return p;}});Fx.Transitions.extend=function(transitions){for(var transition in transitions){Fx.Transitions[transition]=new Fx.Transition(transitions[transition]);Fx.Transitions.compat(transition);}};Fx.Transitions.compat=function(transition){['In','Out','InOut'].each(function(easeType){Fx.Transitions[transition.toLowerCase()+easeType]=Fx.Transitions[transition]['ease'+easeType];});};Fx.Transitions.extend({Pow:function(p,x){return Math.pow(p,x[0]||6);},Expo:function(p){return Math.pow(2,8*(p-1));},Circ:function(p){return 1-Math.sin(Math.acos(p));},Sine:function(p){return 1-Math.sin((1-p)*Math.PI/2);},Back:function(p,x){x=x[0]||1.618;return Math.pow(p,2)*((x+1)*p-x);},Bounce:function(p){var value;for(var a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}}
if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);}
event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0];this.out=true;}}
if(this.options.grid[z])this.value.now[z]-=(this.value.now[z]%this.options.grid[z]);this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);}
this.fireEvent('onDrag',this.element);event.stop();},stop:function(){document.removeListener('mousemove',this.bound.check);document.removeListener('mousemove',this.bound.drag);document.removeListener('mouseup',this.bound.stop);this.fireEvent('onComplete',this.element);}});Drag.Base.implement(new Events,new Options);Element.extend({makeResizable:function(options){return new Drag.Base(this,$merge({modifiers:{x:'width',y:'height'}},options));}});Drag.Move=Drag.Base.extend({options:{droppables:[],container:false,overflown:[]},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);this.position={'element':this.element.getStyle('position'),'container':false};if(this.container)this.position.container=this.container.getStyle('position');if(!['relative','absolute','fixed'].contains(this.position.element))this.position.element='absolute';var top=this.element.getStyle('top').toInt();var left=this.element.getStyle('left').toInt();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){top=$chk(top)?top:this.element.getTop(this.options.overflown);left=$chk(left)?left:this.element.getLeft(this.options.overflown);}else{top=$chk(top)?top:0;left=$chk(left)?left:0;}
this.element.setStyles({'top':top,'left':left,'position':this.position.element});this.parent(this.element);},start:function(event){this.overed=null;if(this.container){var cont=this.container.getCoordinates();var el=this.element.getCoordinates();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){this.options.limit={'x':[cont.left,cont.right-el.width],'y':[cont.top,cont.bottom-el.height]};}else{this.options.limit={'y':[0,cont.height-el.height],'x':[0,cont.width-el.width]};}}
this.parent(event);},drag:function(event){this.parent(event);var overed=this.out?false:this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=overed){if(this.overed)this.overed.fireEvent('leave',[this.element,this]);this.overed=overed?overed.fireEvent('over',[this.element,this]):null;}
return this;},checkAgainst:function(el){el=el.getCoordinates(this.options.overflown);var now=this.mouse.now;return(now.x>el.left&&now.x<el.right&&now.y<el.bottom&&now.y>el.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);}
if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;}
this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');$extend(this.headers,this.options.headers);for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send($pick(data,null));return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';}
this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);}
if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');}
if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&');};Element.extend({send:function(options){return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(key,value,options){options=$merge(this.options,options);value=encodeURIComponent(value);if(options.domain)value+='; domain='+options.domain;if(options.path)value+='; path='+options.path;if(options.duration){var date=new Date();date.setTime(date.getTime()+options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();}
if(options.secure)value+='; secure';document.cookie=key+'='+value;return $extend(options,{'key':key,'value':value});},get:function(key){var value=document.cookie.match('(?:^|;)\\s*'+key.escapeRegExp()+'=([^;]*)');return value?decodeURIComponent(value[1]):false;},remove:function(cookie,options){if($type(cookie)=='object')this.set(cookie.key,'',$merge(cookie,{duration:-1}));else this.set(cookie,'',$merge(options,{duration:-1}));}});var Json={toString:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';case'array':return'['+obj.map(Json.toString).join(',')+']';case'object':var string=[];for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));return'{'+string.join(',')+'}';case'number':if(isFinite(obj))break;case false:return'null';}
return String(obj);},evaluate:function(str,secure){return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');}};Json.Remote=XHR.extend({initialize:function(url,options){this.url=url;this.addEvent('onSuccess',this.onComplete);this.parent(options);this.setHeader('X-Request','JSON');},send:function(obj){return this.parent(this.url,'json='+Json.toString(obj));},onComplete:function(){this.fireEvent('onComplete',[Json.evaluate(this.response.text,this.options.secure)]);}});var Asset=new Abstract({javascript:function(source,properties){properties=$merge({'onload':Class.empty},properties);var script=new Element('script',{'src':source}).addEvents({'load':properties.onload,'readystatechange':function(){if(this.readyState=='complete')this.fireEvent('load');}});delete properties.onload;return script.setProperties(properties).inject(document.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':Class.empty,'onabort':Class.empty,'onerror':Class.empty},properties);var image=new Image();image.src=source;var element=new Element('img',{'src':source});['load','abort','error'].each(function(type){var event=properties['on'+type];delete properties['on'+type];element.addEvent(type,function(){this.removeEvent(type,arguments.callee);event.call(this);});});if(image.width&&image.height)element.fireEvent('load',element,1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:Class.empty,onProgress:Class.empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter);counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Hash=new Class({length:0,initialize:function(object){this.obj=object||{};this.setLength();},get:function(key){return(this.hasKey(key))?this.obj[key]:null;},hasKey:function(key){return(key in this.obj);},set:function(key,value){if(!this.hasKey(key))this.length++;this.obj[key]=value;return this;},setLength:function(){this.length=0;for(var p in this.obj)this.length++;return this;},remove:function(key){if(this.hasKey(key)){delete this.obj[key];this.length--;}
return this;},each:function(fn,bind){$each(this.obj,fn,bind);},extend:function(obj){$extend(this.obj,obj);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength();},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var keys=[];for(var property in this.obj)keys.push(property);return keys;},values:function(){var values=[];for(var property in this.obj)values.push(this.obj[property]);return values;}});function $H(obj){return new Hash(obj);};Hash.Cookie=Hash.extend({initialize:function(name,options){this.name=name;this.options=$extend({'autoSave':true},options||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;}
var str=Json.toString(this.obj);if(str.length>4096)return false;Cookie.set(this.name,str,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength();}});Hash.Cookie.Methods={};['extend','set','merge','empty','remove'].each(function(method){Hash.Cookie.Methods[method]=function(){Hash.prototype[method].apply(this,arguments);if(this.options.autoSave)this.save();return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(color,type){type=type||(color.push?'rgb':'hex');var rgb,hsb;switch(type){case'rgb':rgb=color;hsb=rgb.rgbToHsb();break;case'hsb':rgb=color.hsbToRgb();hsb=color;break;default:rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();}
rgb.hsb=hsb;rgb.hex=rgb.rgbToHex();return $extend(rgb,Color.prototype);},mix:function(){var colors=$A(arguments);var alpha=($type(colors[colors.length-1])=='number')?colors.pop():50;var rgb=this.copy();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};Array.extend({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;}
return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}}
return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.mousemover=([window,document].contains(element))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener('mousemove',this.coord);},stop:function(){this.mousemover.removeListener('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.element==window)?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var el=this.element.getSize();var pos=this.element.getPosition();var change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&el.scroll[z]!=0)
change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(el.size[z]+pos[z])&&el.scroll[z]+el.size[z]!=el.scrollSize[z])
change[z]=(this.page[z]-el.size[z]+this.options.area-pos[z])*this.options.velocity;}
if(change.y||change.x)this.fireEvent('onChange',[el.scroll.x+change.x,el.scroll.y+change.y]);}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(pos){this.knob.setStyle(this.p,pos);},mode:'horizontal',steps:100,offset:0},initialize:function(el,knob,options){this.element=$(el);this.knob=$(knob);this.setOptions(options);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bindWithEvent(this));var mod,offset;switch(this.options.mode){case'horizontal':this.z='x';this.p='left';mod={'x':'left','y':false};offset='offsetWidth';break;case'vertical':this.z='y';this.p='top';mod={'x':false,'y':'top'};offset='offsetHeight';}
this.max=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.half=this.knob[offset]/2;this.getPos=this.element['get'+this.p.capitalize()].bind(this.element);this.knob.setStyle('position','relative').setStyle(this.p,-this.options.offset);var lim={};lim[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:lim,modifiers:mod,snap:0,onStart:function(){this.draggedKnob();}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize)this.options.initialize.call(this);},set:function(step){this.step=step.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent('onTick',this.toPosition(this.step));return this;},clickedElement:function(event){var position=event.page[this.z]-this.getPos()-this.half;position=position.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(position);this.checkStep();this.end();this.fireEvent('onTick',position);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('onChange',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('onComplete',this.step+'');}},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps);},toPosition:function(step){return this.max*step/this.options.steps;}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(options){this.parent(window,options);this.links=(this.options.links)?$$(this.options.links):$$(document.links);var location=window.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!window.webkit419)this.addEvent('onComplete',function(){window.location.hash=this.anchor;});},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(element,ghost){ghost.setStyle('opacity',0.7);element.setStyle('opacity',0.7);},onDragComplete:function(element,ghost){element.setStyle('opacity',1);ghost.remove();this.trash.remove();}},initialize:function(list,options){this.setOptions(options);this.list=$(list);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={'start':[],'moveGhost':this.moveGhost.bindWithEvent(this)};for(var i=0,l=this.handles.length;i<l;i++){this.bound.start[i]=this.start.bindWithEvent(this,this.elements[i]);}
this.attach();if(this.options.initialize)this.options.initialize.call(this);this.bound.move=this.move.bindWithEvent(this);this.bound.end=this.end.bind(this);},attach:function(){this.handles.each(function(handle,i){handle.addEvent('mousedown',this.bound.start[i]);},this);},detach:function(){this.handles.each(function(handle,i){handle.removeEvent('mousedown',this.bound.start[i]);},this);},start:function(event,el){this.active=el;this.coordinates=this.list.getCoordinates();if(this.options.ghost){var position=el.getPosition();this.offset=event.page.y-position.y;this.trash=new Element('div').inject(document.body);this.ghost=el.clone().inject(this.trash).setStyles({'position':'absolute','left':position.x,'top':event.page.y-this.offset});document.addListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragStart',[el,this.ghost]);}
document.addListener('mousemove',this.bound.move);document.addListener('mouseup',this.bound.end);this.fireEvent('onStart',el);event.stop();},moveGhost:function(event){var value=event.page.y-this.offset;value=value.limit(this.coordinates.top,this.coordinates.bottom-this.ghost.offsetHeight);this.ghost.setStyle('top',value);event.stop();},move:function(event){var now=event.page.y;this.previous=this.previous||now;var up=((this.previous-now)>0);var prev=this.active.getPrevious();var next=this.active.getNext();if(prev&&up&&now<prev.getCoordinates().bottom)this.active.injectBefore(prev);if(next&&!up&&now>next.getCoordinates().top)this.active.injectAfter(next);this.previous=now;},serialize:function(converter){return this.list.getChildren().map(converter||function(el){return this.elements.indexOf(el);},this);},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);}
this.fireEvent('onComplete',this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},maxTitleChars:30,showDelay:100,hideDelay:100,className:'tool',offsets:{'x':16,'y':16},fixed:false},initialize:function(elements,options){this.setOptions(options);this.toolTip=new Element('div',{'class':this.options.className+'-tip','styles':{'position':'absolute','top':'0','left':'0','visibility':'hidden'}}).inject(document.body);this.wrapper=new Element('div').inject(this.toolTip);$$(elements).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this);},build:function(el){el.$tmp.myTitle=(el.href&&el.getTag()=='a')?el.href.replace('http://',''):(el.rel||false);if(el.title){var dual=el.title.split('::');if(dual.length>1){el.$tmp.myTitle=dual[0].trim();el.$tmp.myText=dual[1].trim();}else{el.$tmp.myText=el.title;}
el.removeAttribute('title');}else{el.$tmp.myText=false;}
if(el.$tmp.myTitle&&el.$tmp.myTitle.length>this.options.maxTitleChars)el.$tmp.myTitle=el.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"&hellip;";el.addEvent('mouseenter',function(event){this.start(el);if(!this.options.fixed)this.locate(event);else this.position(el);}.bind(this));if(!this.options.fixed)el.addEvent('mousemove',this.locate.bindWithEvent(this));var end=this.end.bind(this);el.addEvent('mouseleave',end);el.addEvent('trash',end);},start:function(el){this.wrapper.empty();if(el.$tmp.myTitle){this.title=new Element('span').inject(new Element('div',{'class':this.options.className+'-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);}
if(el.$tmp.myText){this.text=new Element('span').inject(new Element('div',{'class':this.options.className+'-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);}
$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},position:function(element){var pos=element.getPosition();this.toolTip.setStyles({'left':pos.x+this.options.offsets.x,'top':pos.y+this.options.offsets.y});},locate:function(event){var win={'x':window.getWidth(),'y':window.getHeight()};var scroll={'x':window.getScrollLeft(),'y':window.getScrollTop()};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var prop={'x':'left','y':'top'};for(var z in prop){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>win[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.toolTip.setStyle(prop[z],pos);};},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent('onShow',[this.toolTip]);},hide:function(){this.fireEvent('onHide',[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var options,togglers,elements,container;$each(arguments,function(argument,i){switch($type(argument)){case'object':options=argument;break;case'element':container=$(argument);break;default:var temp=$$(argument);if(!togglers)togglers=temp;else elements=temp;}});this.togglers=togglers||[];this.elements=elements||[];this.container=$(container);this.setOptions(options);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('onActive',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);this.parent(this.elements);if($chk(this.options.display))this.display(this.options.display);},addSection:function(toggler,element,pos){toggler=$(toggler);element=$(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;this.togglers.include(toggler);this.elements.include(element);if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.injectBefore(this.togglers[pos]);element.injectAfter(toggler);}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
var idx=this.togglers.indexOf(toggler);toggler.addEvent('click',this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},display:function(index){index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'onBackground':'onActive',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);},showThisHideOpen:function(index){return this.display(index);}});Fx.Accordion=Accordion;

/* core.js */

function switchFontSize(ckname,val){var bd=document.getElementsByTagName('body');if(!bd||!bd.length)return;bd=bd[0];var oldclass='fs'+CurrentFontSize;switch(val){case'inc':if(CurrentFontSize+1<7){CurrentFontSize++;}
break;case'dec':if(CurrentFontSize-1>0){CurrentFontSize--;}
break;case'reset':default:CurrentFontSize=DefaultFontSize;}
var newclass='fs'+CurrentFontSize;bd.className=bd.className.replace(new RegExp('fs.?','g'),'');bd.className=trim(bd.className);bd.className+=(bd.className?' ':'')+newclass;createCookie(ckname,CurrentFontSize,365);}
function switchTool(ckname,val){createCookie(ckname,val,365);window.location.reload();}
function cpanel_reset(){var matches=document.cookie.match('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)','g');if(!matches)return;for(i=0;i<matches.length;i++){var ck=matches[i].match('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)');if(ck){createCookie(tmpl_name+'_'+ck[1],'',-1);}}
if(window.location.href.indexOf('?')>-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();}
function cpanel_apply(){var elems=document.getElementById('ooopa-cpanel-main').getElementsByTagName('*');var usersetting={};for(i=0;i<elems.length;i++){var el=elems[i];if(el.name&&(match=el.name.match(/^user_(.*)$/))){var name=match[1];var value='';if(el.tagName.toLowerCase()=='input'&&(el.type.toLowerCase()=='radio'||el.type.toLowerCase()=='checkbox')){if(el.checked)value=el.value;}else{value=el.value;}
if(usersetting[name]){if(value)usersetting[name]=value+','+usersetting[name];}else{usersetting[name]=value;}}}
for(var k in usersetting){name=tmpl_name+'_'+k;value=usersetting[k];createCookie(name,value,365);}
if(window.location.href.indexOf('?')>-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else expires="";document.cookie=name+"="+value+expires+"; path=/";}
function trim(str,chars){return ltrim(rtrim(str,chars),chars);}
function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");}
function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}
function getScreenWidth(){var x=0;if(self.innerHeight){x=self.innerWidth;}else if(document.documentElement&&document.documentElement.clientHeight){x=document.documentElement.clientWidth;}else if(document.body){x=document.body.clientWidth;}
return x;}
function equalHeight(els){els=$$_(els);if(!els||els.length<2)return;var maxh=0;var els_=[];els.each(function(el,i){if(!el)return;els_[i]=el;var ch=els_[i].getCoordinates().height;maxh=(maxh<ch)?ch:maxh;},this);els_.each(function(el,i){if(!el)return;if(maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt()>0)el.setStyle('min-height',maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());},this);}
function getDeepestWrapper(el){while(el.getChildren().length==1)
{el=el.getChildren()[0];}
return el;}
function fixHeight(els,group1,group2){els=$$_(els);group1=$$_(group1);group2=$$_(group2);if(!els||!group1)return;var height=0;group1.each(function(el){if(!el)return;height+=el.getCoordinates().height;});if(group2){group2.each(function(el){if(!el)return;height-=el.getCoordinates().height;});}
els.each(function(el,i){if(!el)return;if(height-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt()>0)el.setStyle('min-height',height-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());});}
function addFirstLastItem(el){el=$(el);if(!el||!el.getChildren()||!el.getChildren().length)return;el.getChildren()[0].addClass('first-item');el.getChildren()[el.getChildren().length-1].addClass('last-item');}
function $$_(els){if($type(els)=='string')return $$(els);var els_=[];els.each(function(el){el=$(el);if(el)els_.push(el);});return els_;}

/* mega.js */

var ooopaMegaMenuMoo=new Class({initialize:function(menu,options){this.options=$extend({slide:true,duration:300,fading:false,bgopacity:0.9,delayHide:500,direction:'down',action:'mouseenter',hidestyle:'normal'},options||{});if(!this.options.slide&&!this.options.fading)this.options.delayHide=10;this.menu=menu;this.childopen=new Array();this.imageloaded=false;this.loaded=false;this.start();},start:function(){if(this.loaded)return;this.menu=$(this.menu);var images=this.menu.getElements('img');if(images&&images.length&&!this.imageloaded){var imgs=[];images.each(function(image){imgs.push(image.src)});if(imgs.length){new Asset.images(imgs,{onComplete:function(){this.start();}.bind(this)});this.imageloaded=true;this.start.delay(3000,this);return;}}
this.loaded=true;p=this.menu;while(p=p.getParent()){if(p.hasClass('main')||p.hasClass('wrap')){this.wrapper=p;break;}}
this.items=this.menu.getElements('li.mega');this.items.each(function(li){if((a=li.getElement('a.mega'))&&this.isChild(a,li))li.a=a;else li.a=null;li._parent=this.getParent(li);if((childcontent=li.getElement('.childcontent'))&&this.isChild(childcontent,li)){li.childcontent=childcontent;li.childcontent_inner=li.childcontent.getElement('.childcontent-inner-wrap');var coor=li.childcontent_inner.getCoordinates();li._w=li.getElement('.childcontent-inner').offsetWidth;li._h=li.getElement('.childcontent-inner').offsetHeight;li.level0=li.getParent().hasClass('level0');li.childcontent.setStyles({'width':li._w+10,'height':li._h});li.childcontent_inner.setStyles({'width':li._w});li.childcontent_inner1=li.childcontent.getElement('.childcontent-inner');li.childcontent_inner1.ol=false;if(li.childcontent_inner1.getStyle('overflow')=='auto'||li.childcontent_inner1.getStyle('overflow')=='scroll'){li.childcontent_inner1.ol=true;if(window.ie6||window.ie7){li.childcontent_inner1.setStyle('position','relative');}
if(window.ie6){li.childcontent_inner1.setStyle('height',li.childcontent_inner1.getStyle('max-height')||400);}}
if(this.options.direction=='up'){if(li.level0){li.childcontent.setStyle('top',-li.childcontent.offsetHeight);}else{li.childcontent.setStyle('bottom',0);}}}
else li.childcontent=null;if(li.childcontent&&this.options.bgopacity){var bg=new Element('div',{'class':'childcontent-bg'});bg.injectTop(li.childcontent_inner);bg.setStyles({'width':'100%','height':li._h,'opacity':this.options.bgopacity,'position':'absolute','top':0,'left':0,'z-index':1});if(li.childcontent.getStyle('background'))bg.setStyle('background',li.childcontent.getStyle('background'));if(li.childcontent.getStyle('background-image'))bg.setStyle('background-image',li.childcontent.getStyle('background-image'));if(li.childcontent.getStyle('background-repeat'))bg.setStyle('background-repeat',li.childcontent.getStyle('background-repeat'));if(li.childcontent.getStyle('background-color'))bg.setStyle('background-color',li.childcontent.getStyle('background-color'));li.childcontent.setStyle('background','none');li.childcontent_inner.setStyles({'position':'relative','z-index':2});}
if(li.childcontent&&(this.options.slide||this.options.fading)){li.childcontent.setStyles({'left':'auto'});if(li.childcontent.hasClass('right'))li.childcontent.setStyle('right',0);if(this.options.slide){li.childcontent.setStyles({'left':'auto','overflow':'hidden'});if(li.level0){if(this.options.direction=='up'){li.childcontent_inner.setStyle('bottom',-li._h-20);}else{li.childcontent_inner.setStyle('margin-top',-li._h-20);}}else{li.childcontent_inner.setStyle('margin-left',-li._w-20);}}
if(this.options.fading){li.childcontent_inner.setStyle('opacity',0);}
li.fx=new Fx.Styles(li.childcontent_inner,{duration:this.options.duration,transition:Fx.Transitions.linear,onComplete:this.itemAnimDone.bind(this,li)});li.eff_on={};li.eff_off={};if(this.options.slide){if(li.level0){if(this.options.direction=='up'){li.eff_on['bottom']=0;li.eff_off['bottom']=-li._h;}else{li.eff_on['margin-top']=0;li.eff_off['margin-top']=-li._h;}}else{li.eff_on['margin-left']=0;li.eff_off['margin-left']=-li._w;}}
if(this.options.fading){li.eff_on['opacity']=1;li.eff_off['opacity']=0;}}
if(this.options.action=='click'&&li.childcontent){li.addEvent('click',function(e){var event=new Event(e);if(li.hasClass('group'))return;if(li.childcontent){if(li.status=='open'){if(this.cursorIn(li,event)){this.itemHide(li);}else{this.itemHideOthers(li);}}else{this.itemShow(li);}}else{if(li.a)location.href=li.a.href;}
event.stop();}.bind(this));this.windowClickFn=function(e){this.itemHideOthers(null);}.bind(this);}
if(this.options.action=='mouseover'||this.options.action=='mouseenter'){li.addEvent('mouseenter',function(e){if(li.hasClass('group'))return;$clear(li.timer);this.itemShow(li);e.stop();}.bind(this));li.addEvent('mouseleave',function(e){if(li.hasClass('group'))return;$clear(li.timer);if(li.childcontent)li.timer=this.itemHide.delay(this.options.delayHide,this,[li,e]);else this.itemHide(li,e);if(!e.stopped){e.stop();e.stopped=true;}}.bind(this));if(li.a&&li.childcontent){li.clickable=false;li.a.addEvent('click',function(e){if(!li.clickable){new Event(e).stop();}}.bind(this));}}
if(li.a&&!li.childcontent){li.a.addEvent('click',function(e){this.itemHideOthers(null);this.menu.getElements('.active').removeClass('active');var p=li;while(p){p.addClass('active');p.a.addClass('active');p=p._parent;}}.bind(this));}
if(li.childcontent)this.positionSubmenu(li);},this);if(this.options.slide||this.options.fading){this.menu.getElements('.childcontent').setStyle('display','none');}},getParent:function(li){var p=li;while((p=p.getParent())){if(this.items.contains(p)&&!p.hasClass('group'))return p;if(!p||p==this.menu)return null;}},cursorIn:function(el,event){if(!el||!event)return false;var pos=$merge(el.getPosition(),{'w':el.offsetWidth,'h':el.offsetHeight});;var cursor={'x':event.page.x,'y':event.page.y};if(cursor.x>pos.x&&cursor.x<pos.x+el.offsetWidth&&cursor.y>pos.y&&cursor.y<pos.y+el.offsetHeight)return true;return false;},isChild:function(child,parent){return!!parent.getChildren().contains(child);},itemOver:function(li){if(li.hasClass('haschild'))
li.removeClass('haschild').addClass('haschild-over');li.addClass('over');if(li.a){li.a.addClass('over');}},itemOut:function(li){if(li.hasClass('haschild-over'))
li.removeClass('haschild-over').addClass('haschild');li.removeClass('over');if(li.a){li.a.removeClass('over');}},itemShow:function(li){clearTimeout(li.timer);if(li.status=='open')return;this.itemOver(li);li.status='open';this.enableclick.delay(100,this,li);this.childopen.push(li);this.itemHideOthers(li);if(li.childcontent){if(this.options.action=='click'&&this.childopen.length&&!this.windowClickEventAdded){$(document.body).addEvent('click',this.windowClickFn);this.windowClickEventAdded=true;}
this.positionSubmenu(li);}
if(!$defined(li.fx)||!$defined(li.childcontent))return;li.childcontent.setStyle('display','block');li.childcontent.setStyles({'overflow':'hidden'});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow':'hidden'});li.fx.stop();li.fx.start(li.eff_on);},itemHide:function(li,e){if(e&&e.page){if(this.cursorIn(li,e)||this.cursorIn(li.childcontent,e)){return;}
var p=li._parent;if(p&&!this.cursorIn(p,e)&&!this.cursorIn(p.childcontent,e)){p.fireEvent('mouseleave',e);}}
clearTimeout(li.timer);this.itemOut(li);li.status='close';this.childopen.remove(li);if(li.childcontent){if(this.options.action=='click'&&!this.childopen.length&&this.windowClickEventAdded){$(document.body).removeEvent('click',this.windowClickFn);this.windowClickEventAdded=false;}}
if(!$defined(li.fx)||!$defined(li.childcontent))return;if(li.childcontent.getStyle('opacity')==0)return;li.childcontent.setStyles({'overflow':'hidden'});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow':'hidden'});li.fx.stop();switch(this.options.hidestyle){case'fast':li.fx.options.duration=100;li.fx.start($merge(li.eff_off,{'opacity':0}));break;case'fastwhenshow':if(!e){li.fx.start($merge(li.eff_off,{'opacity':0}));}else{li.fx.start(li.eff_off);}
break;case'normal':default:li.fx.start(li.eff_off);break;}},itemAnimDone:function(li){if(li.status=='close'){if(this.options.hidestyle.test(/fast/)){li.fx.options.duration=this.options.duration;if(!this.options.fading)li.childcontent_inner.setStyle('opacity',1);}
li.childcontent.setStyles({'display':'none'});this.disableclick.delay(100,this,li);}
if(li.status=='open'){li.childcontent.setStyles({'overflow':''});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow-y':'auto'});li.childcontent_inner.setStyle('opacity',1);li.childcontent.setStyles({'display':'block'});}},itemHideOthers:function(el){var fakeevent=null
if(el&&!el.childcontent)fakeevent={};var curopen=this.childopen.copy();curopen.each(function(li){if(li&&typeof(li.status)!='undefined'&&(!el||(li!=el&&!li.hasChild(el)))){this.itemHide(li,fakeevent);}},this);},enableclick:function(li){if(li.a&&li.childcontent)li.clickable=true;},disableclick:function(li){if(li.a&&li.childcontent)li.clickable=false;},positionSubmenu:function(li){if(li.level0){if(!window.isRTL){var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var ml=0;var l=lcor.left;var r=l+ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(l<0||l+r<0){ml=-l;}else if(r<0){ml=r;}
if(ml!=0)li.childcontent.setStyle('margin-left',ml);}else{var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var mr=0;var r=lcor.right;var l=r-ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(r<0||l+r<0){mr=-r;}else if(l<0){mr=l;}
if(mr!=0)li.childcontent.setStyle('margin-right',mr);}}else{var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var ml=0;var l=ccor.left;var r=l+ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(r<0){li.childcontent.setStyle('margin-left',-ccor.width+20);li.eff_on['margin-left']=0;li.eff_off['margin-left']=li._w+20;li.childcontent_inner.setStyle('margin-left',li.eff_off['margin-left']);}}}});

/* joms.jquery.js */

(function(window,undefined){var document=window.document;var jomsQuery=(function(){var jomsQuery=function(selector,context){return new jomsQuery.fn.init(selector,context);},_$=window.$,rootjomsQuery,joms=window.joms={extend:function(obj){this.jQuery.extend(this,obj);}},quickExpr=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,isSimple=/^.[^:#\[\.,]*$/,rnotwhite=/\S/,rwhite=/\s/,trimLeft=/^\s+/,trimRight=/\s+$/,rnonword=/\W/,rdigit=/\d/,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,rvalidchars=/^[\],:{}\s]*$/,rvalidescape=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rvalidtokens=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rvalidbraces=/(?:^|:|,)(?:\s*\[)+/g,rwebkit=/(webkit)[ \/]([\w.]+)/,ropera=/(opera)(?:.*version)?[ \/]([\w.]+)/,rmsie=/(msie) ([\w.]+)/,rmozilla=/(mozilla)(?:.*? rv:([\w.]+))?/,userAgent=navigator.userAgent,browserMatch,readyBound=false,readyList=[],DOMContentLoaded,toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,trim=String.prototype.trim,indexOf=Array.prototype.indexOf,class2type={};jomsQuery.fn=jomsQuery.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;}
if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}
if(selector==="body"&&!context&&document.body){this.context=document;this[0]=document.body;this.selector="body";this.length=1;return this;}
if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jomsQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jomsQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=jomsQuery.buildFragment([match[1]],[doc]);selector=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes;}
return jomsQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){if(elem.id!==match[2]){return rootjomsQuery.find(selector);}
this.length=1;this[0]=elem;}
this.context=document;this.selector=selector;return this;}}else if(!context&&!rnonword.test(selector)){this.selector=selector;this.context=document;selector=document.getElementsByTagName(selector);return jomsQuery.merge(this,selector);}else if(!context||context.jomsQuery){return(context||rootjomsQuery).find(selector);}else{return jomsQuery(context).find(selector);}}else if(jomsQuery.isFunction(selector)){return rootjomsQuery.ready(selector);}
if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}
return jomsQuery.makeArray(selector,this);},selector:"",jquery:"1.4.3",jomsquery:"1.2.0",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this.slice(num)[0]:this[num]);},pushStack:function(elems,name,selector){var ret=jomsQuery();if(jomsQuery.isArray(elems)){push.apply(ret,elems);}else{jomsQuery.merge(ret,elems);}
ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";}
return ret;},each:function(callback,args){return jomsQuery.each(this,callback,args);},ready:function(fn){jomsQuery.bindReady();if(jomsQuery.isReady){fn.call(document,jomsQuery);}else if(readyList){readyList.push(fn);}
return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jomsQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||jomsQuery(null);},push:push,sort:[].sort,splice:[].splice};jomsQuery.fn.init.prototype=jomsQuery.fn;jomsQuery.extend=jomsQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy,copyIsArray;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jomsQuery.isFunction(target)){target={};}
if(length===i){target=this;--i;}
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
if(deep&&copy&&(jomsQuery.isPlainObject(copy)||(copyIsArray=jomsQuery.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&jomsQuery.isArray(src)?src:[];}else{clone=src&&jomsQuery.isPlainObject(src)?src:{};}
target[name]=jomsQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
return target;};jomsQuery.extend({noConflict:function(){if(typeof(_$)!='undefined')
{window.$=_$;}
return jomsQuery;},restorejQuery:function(){window.jQuery=_jQuery;return jomsQuery.noConflict();},replacejQuery:function(){if(window.jQuery!=undefined)
{jomsQuery.readyList.concat(window.jQuery.readyList);window.jQuery.readyList=null;}
window.jQuery=jomsQuery;jomsQuery(document).ready(function()
{if(jQuery.fn.jomsquery==undefined)
{if(!jQuery.isReady||jQuery.readyList!=null)
jQuery.ready();_jQuery=jQuery;window.jQuery=jomsQuery;}});},includejQuery:function(){if(window.jQuery==undefined)
{window.jQuery=jomsQuery;}
jomsQuery(document).ready(function()
{if(jQuery.fn.jomsquery==undefined)
{if(!jomsQuery.isReady||jomsQuery.readyList!=null)
jomsQuery.ready();}});},isReady:false,readyWait:1,ready:function(wait){if(wait===true){jomsQuery.readyWait--;}
if(!jomsQuery.readyWait||(wait!==true&&!jomsQuery.isReady)){if(!document.body){return setTimeout(jomsQuery.ready,1);}
jomsQuery.isReady=true;if(wait!==true&&--jomsQuery.readyWait>0){return;}
if(readyList){var fn,i=0;while((fn=readyList[i++])){fn.call(document,jomsQuery);}
readyList=null;}
if(jomsQuery.fn.triggerHandler){jomsQuery(document).triggerHandler("ready");}}},bindReady:function(){if(readyBound){return;}
readyBound=true;if(document.readyState==="complete"){return setTimeout(jomsQuery.ready,1);}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",jomsQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jomsQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}
if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return jomsQuery.type(obj)==="function";},isArray:Array.isArray||function(obj){return jomsQuery.type(obj)==="array";},isWindow:function(obj){return obj&&typeof obj==="object"&&"setInterval"in obj;},isNaN:function(obj){return obj==null||!rdigit.test(obj)||isNaN(obj);},type:function(obj){return obj==null?String(obj):class2type[toString.call(obj)]||"object";},isPlainObject:function(obj){if(!obj||jomsQuery.type(obj)!=="object"||obj.nodeType||jomsQuery.isWindow(obj)){return false;}
if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false;}
var key;for(key in obj){}
return key===undefined||hasOwn.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;}
return true;},error:function(msg){throw msg;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}
data=jomsQuery.trim(data);if(rvalidchars.test(data.replace(rvalidescape,"@").replace(rvalidtokens,"]").replace(rvalidbraces,""))){return window.JSON&&window.JSON.parse?window.JSON.parse(data):(new Function("return "+data))();}else{jomsQuery.error("Invalid JSON: "+data);}},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jomsQuery.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;}
head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jomsQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}
return object;},trim:trim?function(text){return text==null?"":trim.call(text);}:function(text){return text==null?"":text.toString().replace(trimLeft,"").replace(trimRight,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){var type=jomsQuery.type(array);if(array.length==null||type==="string"||type==="function"||type==="regexp"||jomsQuery.isWindow(array)){push.call(ret,array);}else{jomsQuery.merge(ret,array);}}
return ret;},inArray:function(elem,array){if(array.indexOf){return array.indexOf(elem);}
for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}
return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}}
first.length=i;return first;},grep:function(elems,callback,inv){var ret=[],retVal;inv=!!inv;for(var i=0,length=elems.length;i<length;i++){retVal=!!callback(elems[i],i);if(inv!==retVal){ret.push(elems[i]);}}
return ret;},map:function(elems,callback,arg){var ret=[],value;for(var i=0,length=elems.length;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}
return ret.concat.apply([],ret);},guid:1,proxy:function(fn,proxy,thisObject){if(arguments.length===2){if(typeof proxy==="string"){thisObject=fn;fn=thisObject[proxy];proxy=undefined;}else if(proxy&&!jomsQuery.isFunction(proxy)){thisObject=proxy;proxy=undefined;}}
if(!proxy&&fn){proxy=function(){return fn.apply(thisObject||this,arguments);};}
if(fn){proxy.guid=fn.guid=fn.guid||proxy.guid||jomsQuery.guid++;}
return proxy;},access:function(elems,key,value,exec,fn,pass){var length=elems.length;if(typeof key==="object"){for(var k in key){jomsQuery.access(elems,k,key[k],exec,fn,value);}
return elems;}
if(value!==undefined){exec=!pass&&exec&&jomsQuery.isFunction(value);for(var i=0;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);}
return elems;}
return length?fn(elems[0],key):undefined;},now:function(){return(new Date()).getTime();},uaMatch:function(ua){ua=ua.toLowerCase();var match=rwebkit.exec(ua)||ropera.exec(ua)||rmsie.exec(ua)||ua.indexOf("compatible")<0&&rmozilla.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},browser:{}});jomsQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase();});browserMatch=jomsQuery.uaMatch(userAgent);if(browserMatch.browser){jomsQuery.browser[browserMatch.browser]=true;jomsQuery.browser.version=browserMatch.version;}
if(jomsQuery.browser.webkit){jomsQuery.browser.safari=true;}
if(indexOf){jomsQuery.inArray=function(elem,array){return indexOf.call(array,elem);};}
if(!rwhite.test("\xA0")){trimLeft=/^[\s\xA0]+/;trimRight=/[\s\xA0]+$/;}
rootjomsQuery=jomsQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);jomsQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);jomsQuery.ready();}};}
function doScrollCheck(){if(jomsQuery.isReady){return;}
try{document.documentElement.doScroll("left");}catch(e){setTimeout(doScrollCheck,1);return;}
jomsQuery.ready();}
return(window.jomsQuery=window.joms.jQuery=jomsQuery);})();(function(){jomsQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+jomsQuery.now();div.style.display="none";div.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0],select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));if(!all||!all.length||!a){return;}
jomsQuery.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:opt.selected,optDisabled:false,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};select.disabled=true;jomsQuery.support.optDisabled=!opt.disabled;script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jomsQuery.support.scriptEval=true;delete window[id];}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function click(){jomsQuery.support.noCloneEvent=false;div.detachEvent("onclick",click);});div.cloneNode(true).fireEvent("onclick");}
div=document.createElement("div");div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var fragment=document.createDocumentFragment();fragment.appendChild(div.firstChild);jomsQuery.support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;jomsQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jomsQuery.boxModel=jomsQuery.support.boxModel=div.offsetWidth===2;if("zoom"in div.style){div.style.display="inline";div.style.zoom=1;jomsQuery.support.inlineBlockNeedsLayout=div.offsetWidth===2;div.style.display="";div.innerHTML="<div style='width:4px;'></div>";jomsQuery.support.shrinkWrapBlocks=div.offsetWidth!==2;}
div.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var tds=div.getElementsByTagName("td");jomsQuery.support.reliableHiddenOffsets=tds[0].offsetHeight===0;tds[0].style.display="";tds[1].style.display="none";jomsQuery.support.reliableHiddenOffsets=jomsQuery.support.reliableHiddenOffsets&&tds[0].offsetHeight===0;div.innerHTML="";document.body.removeChild(div).style.display="none";div=tds=null;});var eventSupported=function(eventName){var el=document.createElement("div");eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]==="function";}
el=null;return isSupported;};jomsQuery.support.submitBubbles=eventSupported("submit");jomsQuery.support.changeBubbles=eventSupported("change");root=script=div=all=a=null;})();jomsQuery.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var windowData={},rbrace=/^(?:\{.*\}|\[.*\])$/;jomsQuery.extend({cache:{},uuid:0,expando:"jomsQuery"+jomsQuery.now(),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},data:function(elem,name,data){if(!jomsQuery.acceptData(elem)){return;}
elem=elem==window?windowData:elem;var isNode=elem.nodeType,id=isNode?elem[jomsQuery.expando]:null,cache=jomsQuery.cache,thisCache;if(isNode&&!id&&typeof name==="string"&&data===undefined){return;}
if(!isNode){cache=elem;}else if(!id){elem[jomsQuery.expando]=id=++jomsQuery.uuid;}
if(typeof name==="object"){if(isNode){cache[id]=jomsQuery.extend(cache[id],name);}else{jomsQuery.extend(cache,name);}}else if(isNode&&!cache[id]){cache[id]={};}
thisCache=isNode?cache[id]:cache;if(data!==undefined){thisCache[name]=data;}
return typeof name==="string"?thisCache[name]:thisCache;},removeData:function(elem,name){if(!jomsQuery.acceptData(elem)){return;}
elem=elem==window?windowData:elem;var isNode=elem.nodeType,id=isNode?elem[jomsQuery.expando]:elem,cache=jomsQuery.cache,thisCache=isNode?cache[id]:id;if(name){if(thisCache){delete thisCache[name];if(isNode&&jomsQuery.isEmptyObject(thisCache)){jomsQuery.removeData(elem);}}}else{if(isNode&&jomsQuery.support.deleteExpando){delete elem[jomsQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jomsQuery.expando);}else if(isNode){delete cache[id];}else{for(var n in elem){delete elem[n];}}}},acceptData:function(elem){if(elem.nodeName){var match=jomsQuery.noData[elem.nodeName.toLowerCase()];if(match){return!(match===true||elem.getAttribute("classid")!==match);}}
return true;}});jomsQuery.fn.extend({data:function(key,value){if(typeof key==="undefined"){return this.length?jomsQuery.data(this[0]):null;}else if(typeof key==="object"){return this.each(function(){jomsQuery.data(this,key);});}
var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jomsQuery.data(this[0],key);if(data===undefined&&this[0].nodeType===1){data=this[0].getAttribute("data-"+key);if(typeof data==="string"){try{data=data==="true"?true:data==="false"?false:data==="null"?null:!jomsQuery.isNaN(data)?parseFloat(data):rbrace.test(data)?jomsQuery.parseJSON(data):data;}catch(e){}}else{data=undefined;}}}
return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.each(function(){var $this=jomsQuery(this),args=[parts[0],value];$this.triggerHandler("setData"+parts[1]+"!",args);jomsQuery.data(this,key,value);$this.triggerHandler("changeData"+parts[1]+"!",args);});}},removeData:function(key){return this.each(function(){jomsQuery.removeData(this,key);});}});jomsQuery.extend({queue:function(elem,type,data){if(!elem){return;}
type=(type||"fx")+"queue";var q=jomsQuery.data(elem,type);if(!data){return q||[];}
if(!q||jomsQuery.isArray(data)){q=jomsQuery.data(elem,type,jomsQuery.makeArray(data));}else{q.push(data);}
return q;},dequeue:function(elem,type){type=type||"fx";var queue=jomsQuery.queue(elem,type),fn=queue.shift();if(fn==="inprogress"){fn=queue.shift();}
if(fn){if(type==="fx"){queue.unshift("inprogress");}
fn.call(elem,function(){jomsQuery.dequeue(elem,type);});}}});jomsQuery.fn.extend({queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined){return jomsQuery.queue(this[0],type);}
return this.each(function(i){var queue=jomsQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){jomsQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jomsQuery.dequeue(this,type);});},delay:function(time,type){time=jomsQuery.fx?jomsQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(){var elem=this;setTimeout(function(){jomsQuery.dequeue(elem,type);},time);});},clearQueue:function(type){return this.queue(type||"fx",[]);}});var rclass=/[\n\t]/g,rspaces=/\s+/,rreturn=/\r/g,rspecialurl=/^(?:href|src|style)$/,rtype=/^(?:button|input)$/i,rfocusable=/^(?:button|input|object|select|textarea)$/i,rclickable=/^a(?:rea)?$/i,rradiocheck=/^(?:radio|checkbox)$/i;jomsQuery.fn.extend({attr:function(name,value){return jomsQuery.access(this,name,value,true,jomsQuery.attr);},removeAttr:function(name,fn){return this.each(function(){jomsQuery.attr(this,name,"");if(this.nodeType===1){this.removeAttribute(name);}});},addClass:function(value){if(jomsQuery.isFunction(value)){return this.each(function(i){var self=jomsQuery(this);self.addClass(value.call(this,i,self.attr("class")));});}
if(value&&typeof value==="string"){var classNames=(value||"").split(rspaces);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1){if(!elem.className){elem.className=value;}else{var className=" "+elem.className+" ",setClass=elem.className;for(var c=0,cl=classNames.length;c<cl;c++){if(className.indexOf(" "+classNames[c]+" ")<0){setClass+=" "+classNames[c];}}
elem.className=jomsQuery.trim(setClass);}}}}
return this;},removeClass:function(value){if(jomsQuery.isFunction(value)){return this.each(function(i){var self=jomsQuery(this);self.removeClass(value.call(this,i,self.attr("class")));});}
if((value&&typeof value==="string")||value===undefined){var classNames=(value||"").split(rspaces);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1&&elem.className){if(value){var className=(" "+elem.className+" ").replace(rclass," ");for(var c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");}
elem.className=jomsQuery.trim(className);}else{elem.className="";}}}}
return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(jomsQuery.isFunction(value)){return this.each(function(i){var self=jomsQuery(this);self.toggleClass(value.call(this,i,self.attr("class"),stateVal),stateVal);});}
return this.each(function(){if(type==="string"){var className,i=0,self=jomsQuery(this),state=stateVal,classNames=value.split(rspaces);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){jomsQuery.data(this,"__className__",this.className);}
this.className=this.className||value===false?"":jomsQuery.data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ";for(var i=0,l=this.length;i<l;i++){if((" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}}
return false;},val:function(value){if(!arguments.length){var elem=this[0];if(elem){if(jomsQuery.nodeName(elem,"option")){var val=elem.attributes.value;return!val||val.specified?elem.value:elem.text;}
if(jomsQuery.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&&(jomsQuery.support.optDisabled?!option.disabled:option.getAttribute("disabled")===null)&&(!option.parentNode.disabled||!jomsQuery.nodeName(option.parentNode,"optgroup"))){value=jomsQuery(option).val();if(one){return value;}
values.push(value);}}
return values;}
if(rradiocheck.test(elem.type)&&!jomsQuery.support.checkOn){return elem.getAttribute("value")===null?"on":elem.value;}
return(elem.value||"").replace(rreturn,"");}
return undefined;}
var isFunction=jomsQuery.isFunction(value);return this.each(function(i){var self=jomsQuery(this),val=value;if(this.nodeType!==1){return;}
if(isFunction){val=value.call(this,i,self.val());}
if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(jomsQuery.isArray(val)){val=jomsQuery.map(val,function(value){return value==null?"":value+"";});}
if(jomsQuery.isArray(val)&&rradiocheck.test(this.type)){this.checked=jomsQuery.inArray(self.val(),val)>=0;}else if(jomsQuery.nodeName(this,"select")){var values=jomsQuery.makeArray(val);jomsQuery("option",this).each(function(){this.selected=jomsQuery.inArray(jomsQuery(this).val(),values)>=0;});if(!values.length){this.selectedIndex=-1;}}else{this.value=val;}});}});jomsQuery.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
if(pass&&name in jomsQuery.attrFn){return jomsQuery(elem)[name](value);}
var notxml=elem.nodeType!==1||!jomsQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jomsQuery.props[name]||name;if(elem.nodeType===1){var special=rspecialurl.test(name);if(name==="selected"&&!jomsQuery.support.optSelected){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}
if((name in elem||elem[name]!==undefined)&&notxml&&!special){if(set){if(name==="type"&&rtype.test(elem.nodeName)&&elem.parentNode){jomsQuery.error("type property can't be changed");}
if(value===null){if(elem.nodeType===1){elem.removeAttribute(name);}}else{elem[name]=value;}}
if(jomsQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}
if(name==="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}
return elem[name];}
if(!jomsQuery.support.style&&notxml&&name==="style"){if(set){elem.style.cssText=""+value;}
return elem.style.cssText;}
if(set){elem.setAttribute(name,""+value);}
if(!elem.attributes[name]&&(elem.hasAttribute&&!elem.hasAttribute(name))){return undefined;}
var attr=!jomsQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}}});var rnamespaces=/\.(.*)$/,rformElems=/^(?:textarea|input|select)$/i,rperiod=/\./g,rspace=/ /g,rescape=/[^\w\s.|`]/g,fcleanup=function(nm){return nm.replace(rescape,"\\$&");},focusCounts={focusin:0,focusout:0};jomsQuery.event={add:function(elem,types,handler,data){if(elem.nodeType===3||elem.nodeType===8){return;}
if(jomsQuery.isWindow(elem)&&(elem!==window&&!elem.frameElement)){elem=window;}
if(handler===false){handler=returnFalse;}
var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;}
if(!handler.guid){handler.guid=jomsQuery.guid++;}
var elemData=jomsQuery.data(elem);if(!elemData){return;}
var eventKey=elem.nodeType?"events":"__events__",events=elemData[eventKey],eventHandle=elemData.handle;if(typeof events==="function"){eventHandle=events.handle;events=events.events;}else if(!events){if(!elem.nodeType){elemData[eventKey]=elemData=function(){};}
elemData.events=events={};}
if(!eventHandle){elemData.handle=eventHandle=function(){return typeof jomsQuery!=="undefined"&&!jomsQuery.event.triggered?jomsQuery.event.handle.apply(eventHandle.elem,arguments):undefined;};}
eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?jomsQuery.extend({},handleObjIn):{handler:handler,data:data};if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[];handleObj.namespace="";}
handleObj.type=type;if(!handleObj.guid){handleObj.guid=handler.guid;}
var handlers=events[type],special=jomsQuery.event.special[type]||{};if(!handlers){handlers=events[type]=[];if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
handlers.push(handleObj);jomsQuery.event.global[type]=true;}
elem=null;},global:{},remove:function(elem,types,handler,pos){if(elem.nodeType===3||elem.nodeType===8){return;}
if(handler===false){handler=returnFalse;}
var ret,type,fn,j,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,eventKey=elem.nodeType?"events":"__events__",elemData=jomsQuery.data(elem),events=elemData&&elemData[eventKey];if(!elemData||!events){return;}
if(typeof events==="function"){elemData=events;events=events.events;}
if(types&&types.type){handler=types.handler;types=types.type;}
if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){jomsQuery.event.remove(elem,type+types);}
return;}
types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split(".");type=namespaces.shift();namespace=new RegExp("(^|\\.)"+
jomsQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)");}
eventType=events[type];if(!eventType){continue;}
if(!handler){for(j=0;j<eventType.length;j++){handleObj=eventType[j];if(all||namespace.test(handleObj.namespace)){jomsQuery.event.remove(elem,origType,handleObj.handler,j);eventType.splice(j--,1);}}
continue;}
special=jomsQuery.event.special[type]||{};for(j=pos||0;j<eventType.length;j++){handleObj=eventType[j];if(handler.guid===handleObj.guid){if(all||namespace.test(handleObj.namespace)){if(pos==null){eventType.splice(j--,1);}
if(special.remove){special.remove.call(elem,handleObj);}}
if(pos!=null){break;}}}
if(eventType.length===0||pos!=null&&eventType.length===1){if(!special.teardown||special.teardown.call(elem,namespaces)===false){jomsQuery.removeEvent(elem,type,elemData.handle);}
ret=null;delete events[type];}}
if(jomsQuery.isEmptyObject(events)){var handle=elemData.handle;if(handle){handle.elem=null;}
delete elemData.events;delete elemData.handle;if(typeof elemData==="function"){jomsQuery.removeData(elem,eventKey);}else if(jomsQuery.isEmptyObject(elemData)){jomsQuery.removeData(elem);}}},trigger:function(event,data,elem){var type=event.type||event,bubbling=arguments[3];if(!bubbling){event=typeof event==="object"?event[jomsQuery.expando]?event:jomsQuery.extend(jomsQuery.Event(type),event):jomsQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(jomsQuery.event.global[type]){jomsQuery.each(jomsQuery.cache,function(){if(this.events&&this.events[type]){jomsQuery.event.trigger(event,data,this.handle.elem);}});}}
if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
event.result=undefined;event.target=elem;data=jomsQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=elem.nodeType?jomsQuery.data(elem,"handle"):(jomsQuery.data(elem,"__events__")||{}).handle;if(handle){handle.apply(elem,data);}
var parent=elem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName&&jomsQuery.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;event.preventDefault();}}}catch(inlineError){}
if(!event.isPropagationStopped()&&parent){jomsQuery.event.trigger(event,data,parent,true);}else if(!event.isDefaultPrevented()){var target=event.target,old,targetType=type.replace(rnamespaces,""),isClick=jomsQuery.nodeName(target,"a")&&targetType==="click",special=jomsQuery.event.special[targetType]||{};if((!special._default||special._default.call(elem,event)===false)&&!isClick&&!(target&&target.nodeName&&jomsQuery.noData[target.nodeName.toLowerCase()])){try{if(target[targetType]){old=target["on"+targetType];if(old){target["on"+targetType]=null;}
jomsQuery.event.triggered=true;target[targetType]();}}catch(triggerError){}
if(old){target["on"+targetType]=old;}
jomsQuery.event.triggered=false;}}},handle:function(event){var all,handlers,namespaces,namespace_sort=[],namespace_re,events,args=jomsQuery.makeArray(arguments);event=args[0]=jomsQuery.event.fix(event||window.event);event.currentTarget=this;all=event.type.indexOf(".")<0&&!event.exclusive;if(!all){namespaces=event.type.split(".");event.type=namespaces.shift();namespace_sort=namespaces.slice(0).sort();namespace_re=new RegExp("(^|\\.)"+namespace_sort.join("\\.(?:.*\\.)?")+"(\\.|$)");}
event.namespace=event.namespace||namespace_sort.join(".");events=jomsQuery.data(this,this.nodeType?"events":"__events__");if(typeof events==="function"){events=events.events;}
handlers=(events||{})[event.type];if(events&&handlers){handlers=handlers.slice(0);for(var j=0,l=handlers.length;j<l;j++){var handleObj=handlers[j];if(all||namespace_re.test(handleObj.namespace)){event.handler=handleObj.handler;event.data=handleObj.data;event.handleObj=handleObj;var ret=handleObj.handler.apply(this,args);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.isImmediatePropagationStopped()){break;}}}}
return event.result;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[jomsQuery.expando]){return event;}
var originalEvent=event;event=jomsQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
if(!event.target){event.target=event.srcElement||document;}
if(event.target.nodeType===3){event.target=event.target.parentNode;}
if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;}
if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}
if(event.which==null&&(event.charCode!=null||event.keyCode!=null)){event.which=event.charCode!=null?event.charCode:event.keyCode;}
if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}
if(!event.which&&event.button!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}
return event;},guid:1E8,proxy:jomsQuery.proxy,special:{ready:{setup:jomsQuery.bindReady,teardown:jomsQuery.noop},live:{add:function(handleObj){jomsQuery.event.add(this,liveConvert(handleObj.origType,handleObj.selector),jomsQuery.extend({},handleObj,{handler:liveHandler,guid:handleObj.handler.guid}));},remove:function(handleObj){jomsQuery.event.remove(this,liveConvert(handleObj.origType,handleObj.selector),handleObj);}},beforeunload:{setup:function(data,namespaces,eventHandle){if(jomsQuery.isWindow(this)){this.onbeforeunload=eventHandle;}},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}}};jomsQuery.removeEvent=document.removeEventListener?function(elem,type,handle){if(elem.removeEventListener){elem.removeEventListener(type,handle,false);}}:function(elem,type,handle){if(elem.detachEvent){elem.detachEvent("on"+type,handle);}};jomsQuery.Event=function(src){if(!this.preventDefault){return new jomsQuery.Event(src);}
if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}
this.timeStamp=jomsQuery.now();this[jomsQuery.expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jomsQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.stopPropagation){e.stopPropagation();}
e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;try{while(parent&&parent!==this){parent=parent.parentNode;}
if(parent!==this){event.type=event.data;jomsQuery.event.handle.apply(this,arguments);}}catch(e){}},delegate=function(event){event.type=event.data;jomsQuery.event.handle.apply(this,arguments);};jomsQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jomsQuery.event.special[orig]={setup:function(data){jomsQuery.event.add(this,fix,data&&data.selector?delegate:withinElement,orig);},teardown:function(data){jomsQuery.event.remove(this,fix,data&&data.selector?delegate:withinElement);}};});if(!jomsQuery.support.submitBubbles){jomsQuery.event.special.submit={setup:function(data,namespaces){if(this.nodeName.toLowerCase()!=="form"){jomsQuery.event.add(this,"click.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="submit"||type==="image")&&jomsQuery(elem).closest("form").length){e.liveFired=undefined;return trigger("submit",this,arguments);}});jomsQuery.event.add(this,"keypress.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="text"||type==="password")&&jomsQuery(elem).closest("form").length&&e.keyCode===13){e.liveFired=undefined;return trigger("submit",this,arguments);}});}else{return false;}},teardown:function(namespaces){jomsQuery.event.remove(this,".specialSubmit");}};}
if(!jomsQuery.support.changeBubbles){var changeFilters,getVal=function(elem){var type=elem.type,val=elem.value;if(type==="radio"||type==="checkbox"){val=elem.checked;}else if(type==="select-multiple"){val=elem.selectedIndex>-1?jomsQuery.map(elem.options,function(elem){return elem.selected;}).join("-"):"";}else if(elem.nodeName.toLowerCase()==="select"){val=elem.selectedIndex;}
return val;},testChange=function testChange(e){var elem=e.target,data,val;if(!rformElems.test(elem.nodeName)||elem.readOnly){return;}
data=jomsQuery.data(elem,"_change_data");val=getVal(elem);if(e.type!=="focusout"||elem.type!=="radio"){jomsQuery.data(elem,"_change_data",val);}
if(data===undefined||val===data){return;}
if(data!=null||val){e.type="change";e.liveFired=undefined;return jomsQuery.event.trigger(e,arguments[1],elem);}};jomsQuery.event.special.change={filters:{focusout:testChange,beforedeactivate:testChange,click:function(e){var elem=e.target,type=elem.type;if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){return testChange.call(this,e);}},keydown:function(e){var elem=e.target,type=elem.type;if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){return testChange.call(this,e);}},beforeactivate:function(e){var elem=e.target;jomsQuery.data(elem,"_change_data",getVal(elem));}},setup:function(data,namespaces){if(this.type==="file"){return false;}
for(var type in changeFilters){jomsQuery.event.add(this,type+".specialChange",changeFilters[type]);}
return rformElems.test(this.nodeName);},teardown:function(namespaces){jomsQuery.event.remove(this,".specialChange");return rformElems.test(this.nodeName);}};changeFilters=jomsQuery.event.special.change.filters;changeFilters.focus=changeFilters.beforeactivate;}
function trigger(type,elem,args){args[0].type=type;return jomsQuery.event.handle.apply(elem,args);}
if(document.addEventListener){jomsQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){jomsQuery.event.special[fix]={setup:function(){if(focusCounts[fix]++===0){document.addEventListener(orig,handler,true);}},teardown:function(){if(--focusCounts[fix]===0){document.removeEventListener(orig,handler,true);}}};function handler(e){e=jomsQuery.event.fix(e);e.type=fix;return jomsQuery.event.trigger(e,null,e.target);}});}
jomsQuery.each(["bind","one"],function(i,name){jomsQuery.fn[name]=function(type,data,fn){if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn);}
return this;}
if(jomsQuery.isFunction(data)||data===false){fn=data;data=undefined;}
var handler=name==="one"?jomsQuery.proxy(fn,function(event){jomsQuery(this).unbind(event,handler);return fn.apply(this,arguments);}):fn;if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length;i<l;i++){jomsQuery.event.add(this[i],type,handler,data);}}
return this;};});jomsQuery.fn.extend({unbind:function(type,fn){if(typeof type==="object"&&!type.preventDefault){for(var key in type){this.unbind(key,type[key]);}}else{for(var i=0,l=this.length;i<l;i++){jomsQuery.event.remove(this[i],type,fn);}}
return this;},delegate:function(selector,types,data,fn){return this.live(types,data,fn,selector);},undelegate:function(selector,types,fn){if(arguments.length===0){return this.unbind("live");}else{return this.die(types,null,fn,selector);}},trigger:function(type,data){return this.each(function(){jomsQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jomsQuery.Event(type);event.preventDefault();event.stopPropagation();jomsQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jomsQuery.proxy(fn,args[i++]);}
return this.click(jomsQuery.proxy(fn,function(event){var lastToggle=(jomsQuery.data(this,"lastToggle"+fn.guid)||0)%i;jomsQuery.data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});var liveMap={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};jomsQuery.each(["live","die"],function(i,name){jomsQuery.fn[name]=function(types,data,fn,origSelector){var type,i=0,match,namespaces,preType,selector=origSelector||this.selector,context=origSelector?this:jomsQuery(this.context);if(typeof types==="object"&&!types.preventDefault){for(var key in types){context[name](key,data,types[key],selector);}
return this;}
if(jomsQuery.isFunction(data)){fn=data;data=undefined;}
types=(types||"").split(" ");while((type=types[i++])!=null){match=rnamespaces.exec(type);namespaces="";if(match){namespaces=match[0];type=type.replace(rnamespaces,"");}
if(type==="hover"){types.push("mouseenter"+namespaces,"mouseleave"+namespaces);continue;}
preType=type;if(type==="focus"||type==="blur"){types.push(liveMap[type]+namespaces);type=type+namespaces;}else{type=(liveMap[type]||type)+namespaces;}
if(name==="live"){for(var j=0,l=context.length;j<l;j++){jomsQuery.event.add(context[j],"live."+liveConvert(type,selector),{data:data,selector:selector,handler:fn,origType:type,origHandler:fn,preType:preType});}}else{context.unbind("live."+liveConvert(type,selector),fn);}}
return this;};});function liveHandler(event){var stop,maxLevel,elems=[],selectors=[],related,match,handleObj,elem,j,i,l,data,close,namespace,ret,events=jomsQuery.data(this,this.nodeType?"events":"__events__");if(typeof events==="function"){events=events.events;}
if(event.liveFired===this||!events||!events.live||event.button&&event.type==="click"){return;}
if(event.namespace){namespace=new RegExp("(^|\\.)"+event.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");}
event.liveFired=this;var live=events.live.slice(0);for(j=0;j<live.length;j++){handleObj=live[j];if(handleObj.origType.replace(rnamespaces,"")===event.type){selectors.push(handleObj.selector);}else{live.splice(j--,1);}}
match=jomsQuery(event.target).closest(selectors,event.currentTarget);for(i=0,l=match.length;i<l;i++){close=match[i];for(j=0;j<live.length;j++){handleObj=live[j];if(close.selector===handleObj.selector&&(!namespace||namespace.test(handleObj.namespace))){elem=close.elem;related=null;if(handleObj.preType==="mouseenter"||handleObj.preType==="mouseleave"){event.type=handleObj.preType;related=jomsQuery(event.relatedTarget).closest(handleObj.selector)[0];}
if(!related||related!==elem){elems.push({elem:elem,handleObj:handleObj,level:close.level});}}}}
for(i=0,l=elems.length;i<l;i++){match=elems[i];if(maxLevel&&match.level>maxLevel){break;}
event.currentTarget=match.elem;event.data=match.handleObj.data;event.handleObj=match.handleObj;ret=match.handleObj.origHandler.apply(match.elem,arguments);if(ret===false||event.isPropagationStopped()){maxLevel=match.level;if(ret===false){stop=false;}}}
return stop;}
function liveConvert(type,selector){return(type&&type!=="*"?type+".":"")+selector.replace(rperiod,"`").replace(rspace,"&");}
jomsQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){jomsQuery.fn[name]=function(data,fn){if(fn==null){fn=data;data=null;}
return arguments.length>0?this.bind(name,data,fn):this.trigger(name);};if(jomsQuery.attrFn){jomsQuery.attrFn[name]=true;}});if(window.attachEvent&&!window.addEventListener){jomsQuery(window).bind("unload",function(){for(var id in jomsQuery.cache){if(jomsQuery.cache[id].handle){try{jomsQuery.event.remove(jomsQuery.cache[id].handle.elem);}catch(e){}}}});}
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;var origContext=context;if(context.nodeType!==1&&context.nodeType!==9){return[];}
if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,extra,prune=true,contextXML=Sizzle.isXML(context),soFar=selector,ret,cur,pop,i;do{chunker.exec("");m=chunker.exec(soFar);if(m){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}}while(m);if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}
set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
if(context){ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){cur=parts.pop();pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
if(!checkSet){checkSet=set;}
if(!checkSet){Sizzle.error(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&Sizzle.contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.matchesSelector=function(node,expr){return Sizzle(expr,null,null,[node]).length>0;};Sizzle.find=function(expr,context,isXML){var set;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&Sizzle.isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.leftMatch[type].exec(expr))!=null&&match[2]){var filter=Expr.filter[type],found,item,left=match[1];anyFound=false;match.splice(1,1);if(left.substr(left.length-1)==="\\"){continue;}
if(curLoop===result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr===old){if(anyFound==null){Sizzle.error(expr);}else{break;}}
old=expr;}
return curLoop;};Sizzle.error=function(msg){throw"Syntax error, unrecognized expression: "+msg;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part){var isPartStr=typeof part==="string",elem,i=0,l=checkSet.length;if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(;i<l;i++){elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false;}}}else{for(;i<l;i++){elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck,nodeCheck;if(typeof part==="string"&&!/\W/.test(part)){part=part.toLowerCase();nodeCheck=part;checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck,nodeCheck;if(typeof part==="string"&&!/\W/.test(part)){part=part.toLowerCase();nodeCheck=part;checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m&&m.parentNode?[m]:[];}},NAME:function(match,context){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){return match[1].toLowerCase();},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return(/h\d/i).test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button";},input:function(elem){return(/input|select|textarea|button/i).test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0===i;},eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||Sizzle.getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var j=0,l=not.length;j<l;j++){if(not[j]===elem){return false;}}
return true;}else{Sizzle.error("Syntax error, unrecognized expression: "+name);}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1){return false;}}
if(type==="first"){return true;}
node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1){return false;}}
return true;case'nth':var first=match[2],last=match[3];if(first===1&&last===0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first===0){return diff===0;}else{return(diff%first===0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS,fescape=function(all,num){return"\\"+(num-0+1);};for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,fescape));}
var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var ret=results||[],i=0;if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var l=array.length;i<l;i++){ret.push(array[i]);}}else{for(;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder,siblingCheck;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(a===b){hasDuplicate=true;return 0;}
if(!a.compareDocumentPosition||!b.compareDocumentPosition){return a.compareDocumentPosition?-1:1;}
return a.compareDocumentPosition(b)&4?-1:1;};}else{sortOrder=function(a,b){var ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup,al,bl;if(a===b){hasDuplicate=true;return 0;}else if(aup===bup){return siblingCheck(a,b);}else if(!aup){return-1;}else if(!bup){return 1;}
while(cur){ap.unshift(cur);cur=cur.parentNode;}
cur=bup;while(cur){bp.unshift(cur);cur=cur.parentNode;}
al=ap.length;bl=bp.length;for(var i=0;i<al&&i<bl;i++){if(ap[i]!==bp[i]){return siblingCheck(ap[i],bp[i]);}}
return i===al?siblingCheck(a,bp[i],-1):siblingCheck(ap[i],b,1);};siblingCheck=function(a,b,ret){if(a===b){return ret;}
var cur=a.nextSibling;while(cur){if(cur===b){return-1;}
cur=cur.nextSibling;}
return 1;};}
Sizzle.getText=function(elems){var ret="",elem;for(var i=0;elems[i];i++){elem=elems[i];if(elem.nodeType===3||elem.nodeType===4){ret+=elem.nodeValue;}else if(elem.nodeType!==8){ret+=Sizzle.getText(elem.childNodes);}}
return ret;};(function(){var form=document.createElement("div"),id="script"+(new Date()).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&!Sizzle.isXML(context)){if(context.nodeType===9){try{return makeArray(context.querySelectorAll(query),extra);}catch(qsaError){}}else if(context.nodeType===1&&context.nodeName.toLowerCase()!=="object"){var old=context.id,id=context.id="__sizzle__";try{return makeArray(context.querySelectorAll("#"+id+" "+query),extra);}catch(pseudoError){}finally{if(old){context.id=old;}else{context.removeAttribute("id");}}}}
return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
div=null;})();}
(function(){var html=document.documentElement,matches=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector,pseudoWorks=false;try{matches.call(document.documentElement,":sizzle");}catch(pseudoError){pseudoWorks=true;}
if(matches){Sizzle.matchesSelector=function(node,expr){try{if(pseudoWorks||!Expr.match.PSEUDO.test(expr)){return matches.call(node,expr);}}catch(e){}
return Sizzle(expr,null,null,[node]).length>0;};}})();(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;}
div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;}
Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName.toLowerCase()===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
Sizzle.contains=document.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):true);}:function(a,b){return!!(a.compareDocumentPosition(b)&16);};Sizzle.isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jomsQuery.find=Sizzle;jomsQuery.expr=Sizzle.selectors;jomsQuery.expr[":"]=jomsQuery.expr.filters;jomsQuery.unique=Sizzle.uniqueSort;jomsQuery.text=Sizzle.getText;jomsQuery.isXMLDoc=Sizzle.isXML;jomsQuery.contains=Sizzle.contains;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,isSimple=/^.[^:#\[\.,]*$/,slice=Array.prototype.slice,POS=jomsQuery.expr.match.POS;jomsQuery.fn.extend({find:function(selector){var ret=this.pushStack("","find",selector),length=0;for(var i=0,l=this.length;i<l;i++){length=ret.length;jomsQuery.find(selector,this[i],ret);if(i>0){for(var n=length;n<ret.length;n++){for(var r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}}
return ret;},has:function(target){var targets=jomsQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(jomsQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&jomsQuery.filter(selector,this).length>0;},closest:function(selectors,context){var ret=[],i,l,cur=this[0];if(jomsQuery.isArray(selectors)){var match,matches={},selector,level=1;if(cur&&selectors.length){for(i=0,l=selectors.length;i<l;i++){selector=selectors[i];if(!matches[selector]){matches[selector]=jomsQuery.expr.match.POS.test(selector)?jomsQuery(selector,context||this.context):selector;}}
while(cur&&cur.ownerDocument&&cur!==context){for(selector in matches){match=matches[selector];if(match.jomsQuery?match.index(cur)>-1:jomsQuery(cur).is(match)){ret.push({selector:selector,elem:cur,level:level});}}
cur=cur.parentNode;level++;}}
return ret;}
var pos=POS.test(selectors)?jomsQuery(selectors,context||this.context):null;for(i=0,l=this.length;i<l;i++){cur=this[i];while(cur){if(pos?pos.index(cur)>-1:jomsQuery.find.matchesSelector(cur,selectors)){ret.push(cur);break;}else{cur=cur.parentNode;if(!cur||!cur.ownerDocument||cur===context){break;}}}}
ret=ret.length>1?jomsQuery.unique(ret):ret;return this.pushStack(ret,"closest",selectors);},index:function(elem){if(!elem||typeof elem==="string"){return jomsQuery.inArray(this[0],elem?jomsQuery(elem):this.parent().children());}
return jomsQuery.inArray(elem.jomsQuery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jomsQuery(selector,context||this.context):jomsQuery.makeArray(selector),all=jomsQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jomsQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;}
jomsQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jomsQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jomsQuery.dir(elem,"parentNode",until);},next:function(elem){return jomsQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jomsQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jomsQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jomsQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jomsQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jomsQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jomsQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jomsQuery.sibling(elem.firstChild);},contents:function(elem){return jomsQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jomsQuery.makeArray(elem.childNodes);}},function(name,fn){jomsQuery.fn[name]=function(until,selector){var ret=jomsQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;}
if(selector&&typeof selector==="string"){ret=jomsQuery.filter(selector,ret);}
ret=this.length>1?jomsQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}
return this.pushStack(ret,name,slice.call(arguments).join(","));};});jomsQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";}
return elems.length===1?jomsQuery.find.matchesSelector(elems[0],expr)?[elems[0]]:[]:jomsQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jomsQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}
cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}
return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}
return r;}});function winnow(elements,qualifier,keep){if(jomsQuery.isFunction(qualifier)){return jomsQuery.grep(elements,function(elem,i){var retVal=!!qualifier.call(elem,i,elem);return retVal===keep;});}else if(qualifier.nodeType){return jomsQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=jomsQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jomsQuery.filter(qualifier,filtered,!keep);}else{qualifier=jomsQuery.filter(qualifier,filtered);}}
return jomsQuery.grep(elements,function(elem,i){return(jomsQuery.inArray(elem,qualifier)>=0)===keep;});}
var rinlinejomsQuery=/ jomsQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnocache=/<(?:script|object|embed|option|style)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,raction=/\=([^="'>\s]+\/)>/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jomsQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];}
jomsQuery.fn.extend({text:function(text){if(jomsQuery.isFunction(text)){return this.each(function(i){var self=jomsQuery(this);self.text(text.call(this,i,self.text()));});}
if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}
return jomsQuery.text(this);},wrapAll:function(html){if(jomsQuery.isFunction(html)){return this.each(function(i){jomsQuery(this).wrapAll(html.call(this,i));});}
if(this[0]){var wrap=jomsQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}
return elem;}).append(this);}
return this;},wrapInner:function(html){if(jomsQuery.isFunction(html)){return this.each(function(i){jomsQuery(this).wrapInner(html.call(this,i));});}
return this.each(function(){var self=jomsQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){jomsQuery(this).wrapAll(html);});},unwrap:function(){return this.parent().each(function(){if(!jomsQuery.nodeName(this,"body")){jomsQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jomsQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jomsQuery(arguments[0]).toArray());return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jomsQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jomsQuery.cleanData(elem.getElementsByTagName("*"));jomsQuery.cleanData([elem]);}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}}
return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jomsQuery.cleanData(elem.getElementsByTagName("*"));}
while(elem.firstChild){elem.removeChild(elem.firstChild);}}
return this;},clone:function(events){var ret=this.map(function(){if(!jomsQuery.support.noCloneEvent&&!jomsQuery.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument;if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jomsQuery.clean([html.replace(rinlinejomsQuery,"").replace(raction,'="$1">').replace(rleadingWhitespace,"")],ownerDocument)[0];}else{return this.cloneNode(true);}});if(events===true){cloneCopyEvent(this,ret);cloneCopyEvent(this.find("*"),ret.find("*"));}
return ret;},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlinejomsQuery,""):null;}else if(typeof value==="string"&&!rnocache.test(value)&&(jomsQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(var i=0,l=this.length;i<l;i++){if(this[i].nodeType===1){jomsQuery.cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML=value;}}}catch(e){this.empty().append(value);}}else if(jomsQuery.isFunction(value)){this.each(function(i){var self=jomsQuery(this);self.html(value.call(this,i,self.html()));});}else{this.empty().append(value);}
return this;},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(jomsQuery.isFunction(value)){return this.each(function(i){var self=jomsQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});}
if(typeof value!=="string"){value=jomsQuery(value).detach();}
return this.each(function(){var next=this.nextSibling,parent=this.parentNode;jomsQuery(this).remove();if(next){jomsQuery(next).before(value);}else{jomsQuery(parent).append(value);}});}else{return this.pushStack(jomsQuery(jomsQuery.isFunction(value)?value():value),"replaceWith",value);}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,value=args[0],scripts=[],fragment,parent;if(!jomsQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){jomsQuery(this).domManip(args,table,callback,true);});}
if(jomsQuery.isFunction(value)){return this.each(function(i){var self=jomsQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});}
if(this[0]){parent=value&&value.parentNode;if(jomsQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=jomsQuery.buildFragment(args,this,scripts);}
fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;}
if(first){table=table&&jomsQuery.nodeName(first,"tr");for(var i=0,l=this.length;i<l;i++){callback.call(table?root(this[i],first):this[i],i>0||results.cacheable||this.length>1?fragment.cloneNode(true):fragment);}}
if(scripts.length){jomsQuery.each(scripts,evalScript);}}
return this;}});function root(elem,cur){return jomsQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}
function cloneCopyEvent(orig,ret){var i=0;ret.each(function(){if(this.nodeName!==(orig[i]&&orig[i].nodeName)){return;}
var oldData=jomsQuery.data(orig[i++]),curData=jomsQuery.data(this,oldData),events=oldData&&oldData.events;if(events){delete curData.handle;curData.events={};for(var type in events){for(var handler in events[type]){jomsQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}}});}
jomsQuery.buildFragment=function(args,nodes,scripts){var fragment,cacheable,cacheresults,doc=(nodes&&nodes[0]?nodes[0].ownerDocument||nodes[0]:document);if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===document&&!rnocache.test(args[0])&&(jomsQuery.support.checkClone||!rchecked.test(args[0]))){cacheable=true;cacheresults=jomsQuery.fragments[args[0]];if(cacheresults){if(cacheresults!==1){fragment=cacheresults;}}}
if(!fragment){fragment=doc.createDocumentFragment();jomsQuery.clean(args,doc,fragment,scripts);}
if(cacheable){jomsQuery.fragments[args[0]]=cacheresults?fragment:1;}
return{fragment:fragment,cacheable:cacheable};};jomsQuery.fragments={};jomsQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jomsQuery.fn[name]=function(selector){var ret=[],insert=jomsQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jomsQuery(insert[i])[original](elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,insert.selector);}};});jomsQuery.extend({clean:function(elems,context,fragment,scripts){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}
var ret=[];for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";}
if(!elem){continue;}
if(typeof elem==="string"&&!rhtml.test(elem)){elem=context.createTextNode(elem);}else if(typeof elem==="string"){elem=elem.replace(rxhtmlTag,"<$1></$2>");var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div");div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}
if(!jomsQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jomsQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}
if(!jomsQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);}
elem=div.childNodes;}
if(elem.nodeType){ret.push(elem);}else{ret=jomsQuery.merge(ret,elem);}}
if(fragment){for(i=0;ret[i];i++){if(scripts&&jomsQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jomsQuery.makeArray(ret[i].getElementsByTagName("script"))));}
fragment.appendChild(ret[i]);}}}
return ret;},cleanData:function(elems){var data,id,cache=jomsQuery.cache,special=jomsQuery.event.special,deleteExpando=jomsQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){if(elem.nodeName&&jomsQuery.noData[elem.nodeName.toLowerCase()]){continue;}
id=elem[jomsQuery.expando];if(id){data=cache[id];if(data&&data.events){for(var type in data.events){if(special[type]){jomsQuery.event.remove(elem,type);}else{jomsQuery.removeEvent(elem,type,data.handle);}}}
if(deleteExpando){delete elem[jomsQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jomsQuery.expando);}
delete cache[id];}}}});function evalScript(i,elem){if(elem.src){jomsQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jomsQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}
var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity=([^)]*)/,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],curCSS,getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle,fcamelCase=function(all,letter){return letter.toUpperCase();};jomsQuery.fn.css=function(name,value){if(arguments.length===2&&value===undefined){return this;}
return jomsQuery.access(this,name,value,true,function(elem,name,value){return value!==undefined?jomsQuery.style(elem,name,value):jomsQuery.css(elem,name);});};jomsQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity","opacity");return ret===""?"1":ret;}else{return elem.style.opacity;}}}},cssNumber:{"zIndex":true,"fontWeight":true,"opacity":true,"zoom":true,"lineHeight":true},cssProps:{"float":jomsQuery.support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}
var ret,origName=jomsQuery.camelCase(name),style=elem.style,hooks=jomsQuery.cssHooks[origName];name=jomsQuery.cssProps[origName]||origName;if(value!==undefined){if(typeof value==="number"&&isNaN(value)||value==null){return;}
if(typeof value==="number"&&!jomsQuery.cssNumber[origName]){value+="px";}
if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value))!==undefined){try{style[name]=value;}catch(e){}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}
return style[name];}},css:function(elem,name,extra){var ret,origName=jomsQuery.camelCase(name),hooks=jomsQuery.cssHooks[origName];name=jomsQuery.cssProps[origName]||origName;if(hooks&&"get"in hooks&&(ret=hooks.get(elem,true,extra))!==undefined){return ret;}else if(curCSS){return curCSS(elem,name,origName);}},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(name in options){elem.style[name]=old[name];}},camelCase:function(string){return string.replace(rdashAlpha,fcamelCase);}});jomsQuery.curCSS=jomsQuery.css;jomsQuery.each(["height","width"],function(i,name){jomsQuery.cssHooks[name]={get:function(elem,computed,extra){var val;if(computed){if(elem.offsetWidth!==0){val=getWH(elem,name,extra);}else{jomsQuery.swap(elem,cssShow,function(){val=getWH(elem,name,extra);});}
return val+"px";}},set:function(elem,value){if(rnumpx.test(value)){value=parseFloat(value);if(value>=0){return value+"px";}}else{return value;}}};});if(!jomsQuery.support.opacity){jomsQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":computed?"1":"";},set:function(elem,value){var style=elem.style;style.zoom=1;var opacity=jomsQuery.isNaN(value)?"":"alpha(opacity="+value*100+")",filter=style.filter||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):style.filter+' '+opacity;}};}
if(getComputedStyle){curCSS=function(elem,newName,name){var ret,defaultView,computedStyle;name=name.replace(rupper,"-$1").toLowerCase();if(!(defaultView=elem.ownerDocument.defaultView)){return undefined;}
if((computedStyle=defaultView.getComputedStyle(elem,null))){ret=computedStyle.getPropertyValue(name);if(ret===""&&!jomsQuery.contains(elem.ownerDocument.documentElement,elem)){ret=jomsQuery.style(elem,name);}}
return ret;};}else if(document.documentElement.currentStyle){curCSS=function(elem,name){var left,rsLeft,ret=elem.currentStyle&&elem.currentStyle[name],style=elem.style;if(!rnumpx.test(ret)&&rnum.test(ret)){left=style.left;rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=name==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}
return ret;};}
function getWH(elem,name,extra){var which=name==="width"?cssWidth:cssHeight,val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return val;}
jomsQuery.each(which,function(){if(!extra){val-=parseFloat(jomsQuery.css(elem,"padding"+this))||0;}
if(extra==="margin"){val+=parseFloat(jomsQuery.css(elem,"margin"+this))||0;}else{val-=parseFloat(jomsQuery.css(elem,"border"+this+"Width"))||0;}});return val;}
if(jomsQuery.expr&&jomsQuery.expr.filters){jomsQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight;return(width===0&&height===0)||(!jomsQuery.support.reliableHiddenOffsets&&(elem.style.display||jomsQuery.css(elem,"display"))==="none");};jomsQuery.expr.filters.visible=function(elem){return!jomsQuery.expr.filters.hidden(elem);};}
var jsc=jomsQuery.now(),rscript=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,rselectTextarea=/^(?:select|textarea)/i,rinput=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,rnoContent=/^(?:GET|HEAD|DELETE)$/,rbracket=/\[\]$/,jsre=/\=\?(&|$)/,rquery=/\?/,rts=/([?&])_=[^&]*/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g,rhash=/#.*$/,_load=jomsQuery.fn.load;jomsQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"&&_load){return _load.apply(this,arguments);}else if(!this.length){return this;}
var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
var type="GET";if(params){if(jomsQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jomsQuery.param(params,jomsQuery.ajaxSettings.traditional);type="POST";}}
var self=this;jomsQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status==="success"||status==="notmodified"){self.html(selector?jomsQuery("<div>").append(res.responseText.replace(rscript,"")).find(selector):res.responseText);}
if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jomsQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jomsQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=jomsQuery(this).val();return val==null?null:jomsQuery.isArray(val)?jomsQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jomsQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jomsQuery.fn[o]=function(f){return this.bind(o,f);};});jomsQuery.extend({get:function(url,data,callback,type){if(jomsQuery.isFunction(data)){type=type||callback;callback=data;data=null;}
return jomsQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jomsQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jomsQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jomsQuery.isFunction(data)){type=type||callback;callback=data;data={};}
return jomsQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jomsQuery.extend(jomsQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new window.XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(origSettings){var s=jomsQuery.extend(true,{},jomsQuery.ajaxSettings,origSettings),jsonp,status,data,type=s.type.toUpperCase(),noContent=rnoContent.test(type);s.url=s.url.replace(rhash,"");s.context=origSettings&&origSettings.context!=null?origSettings.context:s;if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jomsQuery.param(s.data,s.traditional);}
if(s.dataType==="jsonp"){if(type==="GET"){if(!jsre.test(s.url)){s.url+=(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";}}else if(!s.data||!jsre.test(s.data)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}
s.dataType="json";}
if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){jsonp=s.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}
s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";var customJsonp=window[jsonp];window[jsonp]=function(tmp){data=tmp;jomsQuery.handleSuccess(s,xhr,status,data);jomsQuery.handleComplete(s,xhr,status,data);if(jomsQuery.isFunction(customJsonp)){customJsonp(tmp);}else{window[jsonp]=undefined;try{delete window[jsonp];}catch(jsonpError){}}
if(head){head.removeChild(script);}};}
if(s.dataType==="script"&&s.cache===null){s.cache=false;}
if(s.cache===false&&type==="GET"){var ts=jomsQuery.now();var ret=s.url.replace(rts,"$1_="+ts);s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}
if(s.data&&type==="GET"){s.url+=(rquery.test(s.url)?"&":"?")+s.data;}
if(s.global&&jomsQuery.active++===0){jomsQuery.event.trigger("ajaxStart");}
var parts=rurl.exec(s.url),remote=parts&&(parts[1]&&parts[1]!==location.protocol||parts[2]!==location.host);if(s.dataType==="script"&&type==="GET"&&remote){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");if(s.scriptCharset){script.charset=s.scriptCharset;}
script.src=s.url;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){done=true;jomsQuery.handleSuccess(s,xhr,status,data);jomsQuery.handleComplete(s,xhr,status,data);script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}}};}
head.insertBefore(script,head.firstChild);return undefined;}
var requestDone=false;var xhr=s.xhr();if(!xhr){return;}
if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}
try{if((s.data!=null&&!noContent)||(origSettings&&origSettings.contentType)){xhr.setRequestHeader("Content-Type",s.contentType);}
if(s.ifModified){if(jomsQuery.lastModified[s.url]){xhr.setRequestHeader("If-Modified-Since",jomsQuery.lastModified[s.url]);}
if(jomsQuery.etag[s.url]){xhr.setRequestHeader("If-None-Match",jomsQuery.etag[s.url]);}}
if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}
xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*; q=0.01":s.accepts._default);}catch(headerError){}
if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global&&jomsQuery.active--===1){jomsQuery.event.trigger("ajaxStop");}
xhr.abort();return false;}
if(s.global){jomsQuery.triggerGlobal(s,"ajaxSend",[xhr,s]);}
var onreadystatechange=xhr.onreadystatechange=function(isTimeout){if(!xhr||xhr.readyState===0||isTimeout==="abort"){if(!requestDone){jomsQuery.handleComplete(s,xhr,status,data);}
requestDone=true;if(xhr){xhr.onreadystatechange=jomsQuery.noop;}}else if(!requestDone&&xhr&&(xhr.readyState===4||isTimeout==="timeout")){requestDone=true;xhr.onreadystatechange=jomsQuery.noop;status=isTimeout==="timeout"?"timeout":!jomsQuery.httpSuccess(xhr)?"error":s.ifModified&&jomsQuery.httpNotModified(xhr,s.url)?"notmodified":"success";var errMsg;if(status==="success"){try{data=jomsQuery.httpData(xhr,s.dataType,s);}catch(parserError){status="parsererror";errMsg=parserError;}}
if(status==="success"||status==="notmodified"){if(!jsonp){jomsQuery.handleSuccess(s,xhr,status,data);}}else{jomsQuery.handleError(s,xhr,status,errMsg);}
if(!jsonp){jomsQuery.handleComplete(s,xhr,status,data);}
if(isTimeout==="timeout"){xhr.abort();}
if(s.async){xhr=null;}}};try{var oldAbort=xhr.abort;xhr.abort=function(){if(xhr&&oldAbort.call){oldAbort.call(xhr);}
onreadystatechange("abort");};}catch(abortError){}
if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(noContent||s.data==null?null:s.data);}catch(sendError){jomsQuery.handleError(s,xhr,null,sendError);jomsQuery.handleComplete(s,xhr,status,data);}
if(!s.async){onreadystatechange();}
return xhr;},param:function(a,traditional){var s=[],add=function(key,value){value=jomsQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);};if(traditional===undefined){traditional=jomsQuery.ajaxSettings.traditional;}
if(jomsQuery.isArray(a)||a.jomsQuery){jomsQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix],traditional,add);}}
return s.join("&").replace(r20,"+");}});function buildParams(prefix,obj,traditional,add){if(jomsQuery.isArray(obj)&&obj.length){jomsQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"||jomsQuery.isArray(v)?i:"")+"]",v,traditional,add);}});}else if(!traditional&&obj!=null&&typeof obj==="object"){if(jomsQuery.isEmptyObject(obj)){add(prefix,"");}else{jomsQuery.each(obj,function(k,v){buildParams(prefix+"["+k+"]",v,traditional,add);});}}else{add(prefix,obj);}}
jomsQuery.extend({active:0,lastModified:{},etag:{},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.context,xhr,status,e);}
if(s.global){jomsQuery.triggerGlobal(s,"ajaxError",[xhr,s,e]);}},handleSuccess:function(s,xhr,status,data){if(s.success){s.success.call(s.context,data,status,xhr);}
if(s.global){jomsQuery.triggerGlobal(s,"ajaxSuccess",[xhr,s]);}},handleComplete:function(s,xhr,status){if(s.complete){s.complete.call(s.context,xhr,status);}
if(s.global){jomsQuery.triggerGlobal(s,"ajaxComplete",[xhr,s]);}
if(s.global&&jomsQuery.active--===1){jomsQuery.event.trigger("ajaxStop");}},triggerGlobal:function(s,type,args){(s.context&&s.context.url==null?jomsQuery(s.context):jomsQuery.event).trigger(type,args);},httpSuccess:function(xhr){try{return!xhr.status&&location.protocol==="file:"||xhr.status>=200&&xhr.status<300||xhr.status===304||xhr.status===1223;}catch(e){}
return false;},httpNotModified:function(xhr,url){var lastModified=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag");if(lastModified){jomsQuery.lastModified[url]=lastModified;}
if(etag){jomsQuery.etag[url]=etag;}
return xhr.status===304;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){jomsQuery.error("parsererror");}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=jomsQuery.parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){jomsQuery.globalEval(data);}}
return data;}});if(window.ActiveXObject){jomsQuery.ajaxSettings.xhr=function(){if(window.location.protocol!=="file:"){try{return new window.XMLHttpRequest();}catch(xhrError){}}
try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(activeError){}};}
jomsQuery.support.ajax=!!jomsQuery.ajaxSettings.xhr();var elemdisplay={},rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=/^([+\-]=)?([\d+.\-]+)(.*)$/,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];jomsQuery.fn.extend({show:function(speed,easing,callback){if(speed||speed===0){return this.animate(genFx("show",3),speed,easing,callback);}else{for(var i=0,j=this.length;i<j;i++){if(!jomsQuery.data(this[i],"olddisplay")&&this[i].style.display==="none"){this[i].style.display="";}
if(this[i].style.display===""&&jomsQuery.css(this[i],"display")==="none"){jomsQuery.data(this[i],"olddisplay",defaultDisplay(this[i].nodeName));}}
for(i=0;i<j;i++){this[i].style.display=jomsQuery.data(this[i],"olddisplay")||"";}
return this;}},hide:function(speed,easing,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,easing,callback);}else{for(var i=0,j=this.length;i<j;i++){var display=jomsQuery.css(this[i],"display");if(display!=="none"){jomsQuery.data(this[i],"olddisplay",display);}}
for(i=0;i<j;i++){this[i].style.display="none";}
return this;}},_toggle:jomsQuery.fn.toggle,toggle:function(fn,fn2,callback){var bool=typeof fn==="boolean";if(jomsQuery.isFunction(fn)&&jomsQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:jomsQuery(this).is(":hidden");jomsQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2,callback);}
return this;},fadeTo:function(speed,to,easing,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,easing,callback);},animate:function(prop,speed,easing,callback){var optall=jomsQuery.speed(speed,easing,callback);if(jomsQuery.isEmptyObject(prop)){return this.each(optall.complete);}
return this[optall.queue===false?"each":"queue"](function(){var opt=jomsQuery.extend({},optall),p,isElement=this.nodeType===1,hidden=isElement&&jomsQuery(this).is(":hidden"),self=this;for(p in prop){var name=jomsQuery.camelCase(p);if(p!==name){prop[name]=prop[p];delete prop[p];p=name;}
if(prop[p]==="hide"&&hidden||prop[p]==="show"&&!hidden){return opt.complete.call(this);}
if(isElement&&(p==="height"||p==="width")){opt.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(jomsQuery.css(this,"display")==="inline"&&jomsQuery.css(this,"float")==="none"){if(!jomsQuery.support.inlineBlockNeedsLayout){this.style.display="inline-block";}else{var display=defaultDisplay(this.nodeName);if(display==="inline"){this.style.display="inline-block";}else{this.style.display="inline";this.style.zoom=1;}}}}
if(jomsQuery.isArray(prop[p])){(opt.specialEasing=opt.specialEasing||{})[p]=prop[p][1];prop[p]=prop[p][0];}}
if(opt.overflow!=null){this.style.overflow="hidden";}
opt.curAnim=jomsQuery.extend({},prop);jomsQuery.each(prop,function(name,val){var e=new jomsQuery.fx(self,opt,name);if(rfxtypes.test(val)){e[val==="toggle"?hidden?"show":"hide":val](prop);}else{var parts=rfxnum.exec(val),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!=="px"){jomsQuery.style(self,name,(end||1)+unit);start=((end||1)/e.cur(true))*start;jomsQuery.style(self,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;});},stop:function(clearQueue,gotoEnd){var timers=jomsQuery.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;}});function genFx(type,num){var obj={};jomsQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
jomsQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jomsQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jomsQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?jomsQuery.extend({},speed):{complete:fn||!fn&&easing||jomsQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jomsQuery.isFunction(easing)&&easing};opt.duration=jomsQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:opt.duration in jomsQuery.fx.speeds?jomsQuery.fx.speeds[opt.duration]:jomsQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jomsQuery(this).dequeue();}
if(jomsQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jomsQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}
(jomsQuery.fx.step[this.prop]||jomsQuery.fx.step._default)(this);},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}
var r=parseFloat(jomsQuery.css(this.elem,this.prop));return r&&r>-10000?r:0;},custom:function(from,to,unit){this.startTime=jomsQuery.now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this,fx=jomsQuery.fx;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jomsQuery.timers.push(t)&&!timerId){timerId=setInterval(fx.tick,fx.interval);}},show:function(){this.options.orig[this.prop]=jomsQuery.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());jomsQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jomsQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=jomsQuery.now(),done=true;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;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}
if(done){if(this.options.overflow!=null&&!jomsQuery.support.shrinkWrapBlocks){var elem=this.elem,options=this.options;jomsQuery.each(["","X","Y"],function(index,value){elem.style["overflow"+value]=options.overflow[index];});}
if(this.options.hide){jomsQuery(this.elem).hide();}
if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jomsQuery.style(this.elem,p,this.options.orig[p]);}}
this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;var specialEasing=this.options.specialEasing&&this.options.specialEasing[this.prop];var defaultEasing=this.options.easing||(jomsQuery.easing.swing?"swing":"linear");this.pos=jomsQuery.easing[specialEasing||defaultEasing](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jomsQuery.extend(jomsQuery.fx,{tick:function(){var timers=jomsQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}
if(!timers.length){jomsQuery.fx.stop();}},interval:13,stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jomsQuery.style(fx.elem,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=(fx.prop==="width"||fx.prop==="height"?Math.max(0,fx.now):fx.now)+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(jomsQuery.expr&&jomsQuery.expr.filters){jomsQuery.expr.filters.animated=function(elem){return jomsQuery.grep(jomsQuery.timers,function(fn){return elem===fn.elem;}).length;};}
function defaultDisplay(nodeName){if(!elemdisplay[nodeName]){var elem=jomsQuery("<"+nodeName+">").appendTo("body"),display=elem.css("display");elem.remove();if(display==="none"||display===""){display="block";}
elemdisplay[nodeName]=display;}
return elemdisplay[nodeName];}
var rtable=/^t(?:able|d|h)$/i,rroot=/^(?:body|html)$/i;if("getBoundingClientRect"in document.documentElement){jomsQuery.fn.offset=function(options){var elem=this[0],box;if(options){return this.each(function(i){jomsQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jomsQuery.offset.bodyOffset(elem);}
try{box=elem.getBoundingClientRect();}catch(e){}
var doc=elem.ownerDocument,docElem=doc.documentElement;if(!box||!jomsQuery.contains(docElem,elem)){return box||{top:0,left:0};}
var body=doc.body,win=getWindow(doc),clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,scrollTop=(win.pageYOffset||jomsQuery.support.boxModel&&docElem.scrollTop||body.scrollTop),scrollLeft=(win.pageXOffset||jomsQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft),top=box.top+scrollTop-clientTop,left=box.left+scrollLeft-clientLeft;return{top:top,left:left};};}else{jomsQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jomsQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jomsQuery.offset.bodyOffset(elem);}
jomsQuery.offset.initialize();var offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jomsQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;}
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jomsQuery.offset.doesNotAddBorder&&!(jomsQuery.offset.doesAddBorderForTableAndCells&&rtable.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevOffsetParent=offsetParent;offsetParent=elem.offsetParent;}
if(jomsQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;}
if(jomsQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);}
return{top:top,left:left};};}
jomsQuery.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jomsQuery.css(body,"marginTop"))||0,html="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";jomsQuery.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position="fixed";checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden";innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);body=container=innerDiv=checkDiv=table=td=null;jomsQuery.offset.initialize=jomsQuery.noop;},bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;jomsQuery.offset.initialize();if(jomsQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jomsQuery.css(body,"marginTop"))||0;left+=parseFloat(jomsQuery.css(body,"marginLeft"))||0;}
return{top:top,left:left};},setOffset:function(elem,options,i){var position=jomsQuery.css(elem,"position");if(position==="static"){elem.style.position="relative";}
var curElem=jomsQuery(elem),curOffset=curElem.offset(),curCSSTop=jomsQuery.css(elem,"top"),curCSSLeft=jomsQuery.css(elem,"left"),calculatePosition=(position==="absolute"&&jomsQuery.inArray('auto',[curCSSTop,curCSSLeft])>-1),props={},curPosition={},curTop,curLeft;if(calculatePosition){curPosition=curElem.position();}
curTop=calculatePosition?curPosition.top:parseInt(curCSSTop,10)||0;curLeft=calculatePosition?curPosition.left:parseInt(curCSSLeft,10)||0;if(jomsQuery.isFunction(options)){options=options.call(elem,i,curOffset);}
if(options.top!=null){props.top=(options.top-curOffset.top)+curTop;}
if(options.left!=null){props.left=(options.left-curOffset.left)+curLeft;}
if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jomsQuery.fn.extend({position:function(){if(!this[0]){return null;}
var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=rroot.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jomsQuery.css(elem,"marginTop"))||0;offset.left-=parseFloat(jomsQuery.css(elem,"marginLeft"))||0;parentOffset.top+=parseFloat(jomsQuery.css(offsetParent[0],"borderTopWidth"))||0;parentOffset.left+=parseFloat(jomsQuery.css(offsetParent[0],"borderLeftWidth"))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!rroot.test(offsetParent.nodeName)&&jomsQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}
return offsetParent;});}});jomsQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jomsQuery.fn[method]=function(val){var elem=this[0],win;if(!elem){return null;}
if(val!==undefined){return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:jomsQuery(win).scrollLeft(),i?val:jomsQuery(win).scrollTop());}else{this[method]=val;}});}else{win=getWindow(elem);return win?("pageXOffset"in win)?win[i?"pageYOffset":"pageXOffset"]:jomsQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];}};});function getWindow(elem){return jomsQuery.isWindow(elem)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}
jomsQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jomsQuery.fn["inner"+name]=function(){return this[0]?parseFloat(jomsQuery.css(this[0],type,"padding")):null;};jomsQuery.fn["outer"+name]=function(margin){return this[0]?parseFloat(jomsQuery.css(this[0],type,margin?"margin":"border")):null;};jomsQuery.fn[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;}
if(jomsQuery.isFunction(size)){return this.each(function(i){var self=jomsQuery(this);self[type](size.call(this,i,self[type]()));});}
return jomsQuery.isWindow(elem)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?parseFloat(jomsQuery.css(elem,type)):this.css(type,typeof size==="string"?size:size+"px");};});})(window);var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());jomsQuery.includejQuery();

/* script-1.2.js */

if(typeof(joms)=='undefined')
{joms={jQuery:window.jQuery,extend:function(obj){this.jQuery.extend(this,obj);}}}
joms.extend({plugins:{extend:function(obj){joms.jQuery.extend(joms.plugins,obj);},initialize:function()
{joms.jQuery.each(joms.plugins,function(index,value){try{value.initialize();}
catch(err)
{}});}},activities:{showMap:function(id,addr){if(joms.jQuery('#newsfeed-map-'+id+' img').length==0){var mapWidth=joms.jQuery('#newsfeed-map-'+id).parent().width();var mapHTML='<img src="http://maps.google.com/maps/api/staticmap?center='+addr+'&amp;zoom=14&amp;size='+mapWidth+'x150&amp;sensor=false&amp;markers=color:red|'+addr+'" />';mapHTML+='<img src="http://maps.google.com/maps/api/staticmap?center='+addr+'&amp;zoom=5&amp;size='+mapWidth+'x150&amp;sensor=false&amp;markers=color:red|'+addr+'" />';mapHTML+='<img src="http://maps.google.com/maps/api/staticmap?center='+addr+'&amp;zoom=2&amp;size='+mapWidth+'x150&amp;sensor=false&amp;markers=color:red|'+addr+'" />';joms.jQuery('#newsfeed-map-'+id+' .newsfeed-mapFade').append(mapHTML);}
joms.jQuery('#newsfeed-map-'+id).toggle();},getContent:function(activityId){jax.call('community','activities,ajaxGetContent',activityId);},setContent:function(activityId,content){joms.jQuery("#profile-newsfeed-item-content-"+activityId).html(content).removeClass("small profile-newsfeed-item-action").addClass("newsfeed-content-hidden").slideDown();},showVideo:function(activityId){joms.jQuery('#profile-newsfeed-item-content-'+activityId+' .video-object').slideDown();joms.jQuery('#profile-newsfeed-item-content-'+activityId+' .video-object embed').css('width',joms.jQuery('#profile-newsfeed-item-content-'+activityId).width());},selectCustom:function(type){if(type=='predefined')
{joms.jQuery('#custom-text').css('display','none');joms.jQuery('#custom-predefined').css('display','block');}
else
{joms.jQuery('#custom-text').css('display','block');joms.jQuery('#custom-predefined').css('display','none');}},addCustom:function(){if(jQuery('input[name=custom-message]:checked').val()=='predefined')
{var selected=joms.jQuery('#custom-predefined').val();var selectedText=joms.jQuery('#custom-predefined :selected').html();if(selected!='default')
{jax.call('community','activities,ajaxAddPredefined',selected,selectedText);}}
else
{customText=joms.jQuery.trim(joms.jQuery('#custom-text').val());if(customText.length!=0){jax.call('community','activities,ajaxAddPredefined','system.message',customText);}}},append:function(html){joms.jQuery('#activity-more,#activity-exclusions').remove();joms.jQuery('#activity-stream-container').append(html);joms.jQuery('body').focus();},initMap:function()
{if(joms.jQuery('.newsfeed-mapFade').length){joms.jQuery('.newsfeed-mapFade').live('mouseenter',function(e){joms.jQuery(this).find('img:eq(2)').fadeOut(300).data('hidden',1);});joms.jQuery('.newsfeed-mapFade').live('mouseleave',function(e){joms.jQuery(this).find('img:eq(2)').fadeIn(300).data('hidden',0);});joms.jQuery('.newsfeed-mapFade').mousemove(function(e){var offObj=joms.jQuery('.newsfeed-mapFade').offset();var x=offObj.left;var y=offObj.top;var ex=joms.jQuery('.newsfeed-mapFade').width()+x;var ey=joms.jQuery('.newsfeed-mapFade').height()+y;var mpX=x+((ex-x)/2);var mpY=y+((ey-y)/2);if(e.pageX<=(mpX+15)&&e.pageX>=(mpX-15)&&e.pageY<=(mpY+5)&&e.pageY>=(mpY-35))
{if(!joms.jQuery(this).find('img:eq(1)').data('hidden')){joms.jQuery(this).find('img:eq(1)').fadeOut(300).data('hidden',1);}}else{if(joms.jQuery(this).find('img:eq(1)').data('hidden')){joms.jQuery(this).find('img:eq(1)').fadeIn(300).data('hidden',0);}}});}},more:function(){var exclusions=joms.jQuery('#activity-exclusions').val();var categoryFilter='';if(joms.jQuery('.all-activity').hasClass('active-state')){categoryFilter='all';}else if(joms.jQuery('.me-and-friends-activity').hasClass('active-state')){categoryFilter='friends';}else if(joms.jQuery('.p-active-profile-activity').hasClass('active-state')){categoryFilter='self';}else if(joms.jQuery('.p-active-profile-and-friends-activity').hasClass('active-state')){categoryFilter='friends';}else{categoryFilter='self';}
joms.jQuery('#activity-more .more-activity-text').hide();joms.jQuery('#activity-more .loading').show().css('float','none').css('margin','5px 5px 0 180px');jax.call('community','activities,ajaxGetActivities',exclusions,joms.jQuery('#community-wrap #activity-type').val(),js_profileId,'',categoryFilter);},appendLatest:function(html,delay,text){joms.jQuery('ul.cFeed').prepend(html);var totalNewUpdate=joms.jQuery('.newly-added').length;if(totalNewUpdate>0){joms.jQuery('#activity-update-click').html(text);joms.jQuery('.joms-latest-activities-container').show();}
setTimeout("reloadActivities();",delay);},nextActivitiesCheck:function(delay){setTimeout("reloadActivities();",delay);},getLatestContent:function(latestId,isProfilePage){var exclusions=joms.jQuery('#activity-exclusions').val();var categoryFilter='';if(joms.jQuery('.all-activity').hasClass('active-state')){categoryFilter='all';}else if(joms.jQuery('.me-and-friends-activity').hasClass('active-state')){categoryFilter='friends';}else if(joms.jQuery('.p-active-profile-activity').hasClass('active-state')){categoryFilter='self';}else if(joms.jQuery('.p-active-profile-and-friends-activity').hasClass('active-state')){categoryFilter='friends';}else{categoryFilter='self';}
if(joms.jQuery('div#cWindow').hasClass('dialog')){joms.activities.nextActivitiesCheck(5000);}else if(latestId>0){jax.call('community','activities,ajaxGetActivities','',joms.jQuery('#community-wrap #activity-type').val(),js_profileId,latestId,isProfilePage,categoryFilter);}}},apps:{windowTitle:'',toggle:function(id){joms.jQuery(id).children('.app-box-actions').slideToggle('fast');joms.jQuery(id).children('.app-box-footer').slideToggle('fast');joms.jQuery(id).children('.app-box-content').slideToggle('fast',function(){joms.jQuery.cookie(id,joms.jQuery(this).css('display'));joms.jQuery(id).toggleClass('collapse',(joms.jQuery(this).css('display')=='none'));});},showAboutWindow:function(appName){var ajaxCall="jax.call('community', 'apps,ajaxShowAbout', '"+appName+"');";cWindowShow(ajaxCall,'',450,100);},showPrivacyWindow:function(appName){var ajaxCall="jax.call('community', 'apps,ajaxShowPrivacy', '"+appName+"');";cWindowShow(ajaxCall,'',450,100);},showSettingsWindow:function(id,appName){var ajaxCall="jax.call('community', 'apps,ajaxShowSettings', '"+id+"', '"+appName+"');";cWindowShow(ajaxCall,'',450,100);},savePrivacy:function(){var value=joms.jQuery('input[name=privacy]:checked').val();var appName=joms.jQuery('input[name=appname]').val();jax.call('community','apps,ajaxSavePrivacy',appName,value);},saveSettings:function(){jax.call('community','apps,ajaxSaveSettings',jax.getFormValues('appSetting'));},remove:function(appName){var ajaxCall="jax.call('community', 'apps,ajaxRemove', '"+appName+"');";cWindowShow(ajaxCall,this.windowTitle,450,100);},add:function(appName){jax.call('community','apps,ajaxAdd',appName);},initToggle:function(){joms.jQuery('.app-box').each(function(){var id='#'+joms.jQuery(this).attr('id');if(joms.jQuery.cookie(id)=='none')
{joms.jQuery(id).addClass('collapse');joms.jQuery(id).children('.app-box-actions').css('display','none');joms.jQuery(id).children('.app-box-footer').css('display','none');joms.jQuery(id).children('.app-box-content').css('display','none');}});}},bookmarks:{show:function(currentURI){var ajaxCall="jax.call('community', 'bookmarks,ajaxShowBookmarks','"+currentURI+"');";cWindowShow(ajaxCall,'',450,100);},email:function(currentURI){var formContent=jax.getFormValues('bookmarks-email');var content=formContent[1][1];var email=formContent[0][1];var ajaxCall="jax.call('community', 'bookmarks,ajaxEmailPage','"+currentURI+"','"+email+"',\""+content+"\");";cWindowShow(ajaxCall,'',450,100);}},report:{emptyMessage:'',checkReport:function(){if(joms.jQuery('#report-message').val()=='')
{joms.jQuery('#report-message-error').html(this.emptyMessage).css('color','red');return false;}
return true;},showWindow:function(reportFunc,arguments){var ajaxCall='jax.call("community" , "system,ajaxReport" , "'+reportFunc+'","'+location.href+'" ,'+arguments+');';cWindowShow(ajaxCall,'',450,100);},submit:function(reportFunc,pageLink,arguments){if(joms.report.checkReport())
{var formVars=jax.getFormValues('report-form');var ajaxcall='jax.call("community", "system,ajaxSendReport","'+reportFunc+'","'+location.href+'","'+formVars[1][1]+'" , '+arguments+')';cWindowShow(ajaxcall,'',450,100);}}},featured:{add:function(uniqueId,controller){var ajaxCall="jax.call('community', '"+controller+",ajaxAddFeatured', '"+uniqueId+"');";cWindowShow(ajaxCall,'',450,100);},remove:function(uniqueId,controller){var ajaxCall="jax.call('community','"+controller+",ajaxRemoveFeatured','"+uniqueId+"');";cWindowShow(ajaxCall,'',450,100);}},flash:{enabled:function(){try
{try
{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try
{axo.AllowScriptAccess='always';}
catch(e)
{return'6,0,0';}}
catch(e)
{}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}
catch(e)
{try
{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
{return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}
catch(e)
{}}
return false;}},invitation:{showForm:function(users,callback,cid,displayFriends,displayEmail){var ajaxCall='jax.call("community", "system,ajaxShowInvitationForm","'+users+'","'+callback+'","'+cid+'","'+displayFriends+'","'+displayEmail+'")';var height=520;height=displayFriends!="0"?height:height-108;height=displayEmail!="0"?height:height-108;cWindowShow(ajaxCall,'',550,height);},send:function(callback,cid){jax.call('community','system,ajaxSubmitInvitation',callback,cid,jax.getFormValues('community-invitation-form'));},selectMember:function(element){if(joms.jQuery(element+' input').is(':checked'))
{joms.jQuery(element).addClass('invitation-item-invited').children('.invitation-checkbox').show();}
else
{joms.jQuery(element).removeClass('invitation-item-invited');}},selectNone:function(listID){joms.jQuery(listID).find('li').each(function(){joms.jQuery(this).removeClass('invitation-item-invited');joms.jQuery(this).find('input').attr('checked',false);});},selectAll:function(listID){joms.invitation.selectNone(listID);joms.jQuery(listID).find('li').each(function(){joms.jQuery(this).find('input').click();joms.invitation.selectMember('#'+joms.jQuery(this).attr('id'));});}},album:{init:function(){joms.jQuery('.album').hover(function(){if(joms.jQuery(this).find('.album-actions a').length)joms.jQuery(this).find('.album-actions').fadeIn('fast');},function(){joms.jQuery(this).find('.album-actions').stop(true,true).hide();});joms.jQuery('.video-item').hover(function(){if(joms.jQuery(this).find('.album-actions a').length)joms.jQuery(this).find('.album-actions').fadeIn('fast');},function(){joms.jQuery(this).find('.album-actions').stop(true,true).hide();});joms.jQuery('.cFeaturedItem').hover(function(){if(joms.jQuery(this).find('.album-actions a').length)joms.jQuery(this).find('.album-actions').fadeIn('fast');},function(){joms.jQuery(this).find('.album-actions').stop(true,true).hide();});}},memberlist:{submit:function(){if(joms.jQuery('input#title').val()=='')
{joms.jQuery('#filter-title-error').show();return false;}
if(joms.jQuery('textarea#description').val()=='')
{joms.jQuery('#filter-description-error').show();return false;}
joms.jQuery('#jsform-memberlist-addlist').submit();},showSaveForm:function(keys,filterJson){var keys=keys.split(',');var values=Array();var avatarOnly=jQuery('#avatar:checked').val()!=1?0:1;for(var i=0;i<keys.length;i++)
{var tmpArray=new Array();var value='';var key=keys[i];if(filterJson['fieldType'+key]=='birthdate'&&filterJson['condition'+key]=='between')
{value=filterJson['value'+keys[i]]+','+filterJson['value'+keys[i]+'_2']}
else
{value=filterJson['value'+keys[i]];}
values[i]=new Array('field='+filterJson['field'+keys[i]],'condition='+filterJson['condition'+keys[i]],'fieldType='+filterJson['fieldType'+keys[i]],'value='+value);}
var valuesString='';for(var x=0;x<values.length;x++)
{valuesString+='"'+values[x]+'"';if((x+1)!=values.length)
valuesString+=',';}
var ajaxCall='jax.call("community", "memberlist,ajaxShowSaveForm","'+joms.jQuery("input[@name=operator]:checked").val()+'","'+avatarOnly+'",'+valuesString+');';cWindowShow(ajaxCall,'',470,300);}},notifications:{showWindow:function(){var ajaxCall='jax.call("community", "notification,ajaxGetNotification", "")';cWindowShow(ajaxCall,'',450,100);},updateNotifyCount:function(){var notifyCount=joms.jQuery('#toolbar-item-notify-count').text();if(joms.jQuery.trim(notifyCount)!=''&&notifyCount>0)
{notifyCount=notifyCount-1;joms.jQuery('#toolbar-item-notify-count').html(notifyCount);if(notifyCount==0)
{joms.jQuery('#toolbar-item-notify').hide();setTimeout('cWindowHide()',1000);}}}},filters:{bind:function(){var loading=this.loading;joms.jQuery(document).ready(function()
{joms.jQuery('.newest-member').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetNewestMember',frontpageUsers);}});joms.jQuery('.active-member').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActiveMember',frontpageUsers);}});joms.jQuery('.popular-member').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetPopularMember',frontpageUsers);}});joms.jQuery('.featured-member').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetFeaturedMember',frontpageUsers);}});joms.jQuery('.all-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));joms.ajax.call('frontpage,ajaxGetActivities',['all'],{success:function()
{joms.jQuery('#activity-type').val('all');}});}});joms.jQuery('.me-and-friends-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));joms.ajax.call('frontpage,ajaxGetActivities',['me-and-friends'],{success:function()
{joms.jQuery('#activity-type').val('me-and-friends');}});}});joms.jQuery('.active-profile-and-friends-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActivities','active-profile-and-friends',joms.user.getActive());}});joms.jQuery('.active-profile-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActivities','active-profile',joms.user.getActive());}});joms.jQuery('.p-active-profile-and-friends-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActivities','active-profile-and-friends',joms.user.getActive(),'profile');}});joms.jQuery('.p-active-profile-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActivities','active-profile',joms.user.getActive(),'profile');}});joms.jQuery('.newest-videos').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetNewestVideos',frontpageVideos);}});joms.jQuery('.popular-videos').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetPopularVideos',frontpageVideos);}});joms.jQuery('.featured-videos').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetFeaturedVideos',frontpageVideos);}});joms.jQuery('.popular-member').css('border-right','0').css('padding-right','0');joms.jQuery('.me-and-friends-activity').css('border-right','0').css('padding-right','0');joms.jQuery('.active-profile-activity').css('border-right','0').css('padding-right','0');});},loading:function(element){elParent=joms.jQuery('.'+element).parent().parent().attr('id');if(elParent===''){elParent=joms.jQuery('.'+element).parent().attr('id');}
joms.jQuery('#'+elParent+' .loading').show();joms.jQuery('#'+elParent+' a').removeClass('active-state');joms.jQuery('.'+element).addClass('active-state');},hideLoading:function(){joms.jQuery('.loading').hide();joms.jQuery('.jomTipsJax').addClass('jomTips');joms.tooltip.setup();}},groups:{invitation:{accept:function(groupId){jax.call('community','groups,ajaxAcceptInvitation',groupId)},reject:function(groupId){jax.call('community','groups,ajaxRejectInvitation',groupId);}},addInvite:function(element){var parentId=joms.jQuery('#'+element).parent().attr('id');if(parentId=="friends-list")
{joms.jQuery("#friends-invited").append(joms.jQuery('#'+element)).html();}
else
{joms.jQuery("#friends-list").append(joms.jQuery('#'+element)).html();}},removeTopic:function(title,groupid,topicid){var ajaxCall='jax.call("community","groups,ajaxShowRemoveDiscussion", "'+groupid+'","'+topicid+'");';cWindowShow(ajaxCall,title,450,100);},lockTopic:function(title,groupid,topicid){var ajaxCall='jax.call("community","groups,ajaxShowLockDiscussion", "'+groupid+'","'+topicid+'");';cWindowShow(ajaxCall,title,450,100);},editBulletin:function(){if(joms.jQuery('#bulletin-edit-data').css('display')=='none')
{joms.jQuery('#bulletin-edit-data').show();}
else
{joms.jQuery('#bulletin-edit-data').hide();}},removeBulletin:function(title,groupid,bulletinid){var ajaxCall='jax.call("community", "groups,ajaxShowRemoveBulletin", "'+groupid+'","'+bulletinid+'");';cWindowShow(ajaxCall,title,450,100);},unpublish:function(groupId){jax.call('community','groups,ajaxUnpublishGroup',groupId);},leave:function(groupid){var ajaxCall='jax.call("community", "groups,ajaxShowLeaveGroup", "'+groupid+'");';cWindowShow(ajaxCall,'',450,100);},joinWindow:function(groupid){var ajaxCall='jax.call("community", "groups,ajaxShowJoinGroup", "'+groupid+'", location.href );';cWindowShow(ajaxCall,'',450,100);},edit:function(){joms.jQuery('#community-group-info .cdata').each(function(){if(joms.jQuery(this).next().html()&&joms.jQuery(this).css('display')!='none')
joms.jQuery(this).css('display','none');else
joms.jQuery(this).css('display','block');});joms.jQuery('#community-group-info .cinput').each(function(){if(joms.jQuery(this).css('display')=='none')
joms.jQuery(this).css('display','block');else
joms.jQuery(this).css('display','none');});if(joms.jQuery('div#community-group-info-actions').css('display')!='none')
joms.jQuery('div#community-group-info-actions').css('display','none');else
joms.jQuery('div#community-group-info-actions').css('display','block');},save:function(groupid){var name=joms.jQuery('#community-group-name').val();var description=joms.jQuery('#community-group-description').val();var website=joms.jQuery('#community-group-website').val();var category=joms.jQuery('#community-group-category').val();var approvals=joms.jQuery("input[@name='group-approvals']:checked").val();jax.call('community','groups,ajaxSaveGroup',groupid,name,description,website,category,approvals);},update:function(groupName,groupDescription,groupWebsite,groupCategory){joms.jQuery('#community-group-data-name').html(groupName);joms.jQuery('#community-group-data-description').html(groupDescription);joms.jQuery('#community-group-data-website').html(groupWebsite);joms.jQuery('#community-group-data-category').html(groupCategory);this.edit();},deleteGroup:function(groupId){var ajaxCall="jax.call('community', 'groups,ajaxWarnGroupDeletion', '"+groupId+"');";cWindowShow(ajaxCall,'',450,100,'error');},toggleSearchSubmenu:function(e){joms.jQuery(e).next('ul').toggle().find('input[type=text]').focus();},confirmMemberRemoval:function(memberId,groupId){var ajaxCall=function()
{jax.call("community","groups,ajaxConfirmMemberRemoval",memberId,groupId);};cWindowShow(ajaxCall,'',450,80,'warning');},removeMember:function(memberId,groupId){var banMember=joms.jQuery('#cWindow input[name=block]').attr('checked');if(banMember)
{jax.call('community','groups,ajaxBanMember',memberId,groupId);}else{jax.call('community','groups,ajaxRemoveMember',memberId,groupId);}}},friends:{saveTag:function(){var formVars=jax.getFormValues('tagsForm');jax.call("community","friends,ajaxFriendTagSave",formVars);return false;},saveGroup:function(userid){if(document.getElementById('newtag').value==''){window.alert('TPL_DB_INVALIDTAG');}else{jax.call("community","friends,ajaxAddGroup",userid,joms.jQuery('#newtag').val());}},cancelRequest:function(friendsId){var ajaxCall='jax.call("community" , "friends,ajaxCancelRequest" , "'+friendsId+'");';cWindowShow(ajaxCall,'',450,100);},connect:function(friendid){var ajaxCall='jax.call("community", "friends,ajaxConnect", '+friendid+')';cWindowShow(ajaxCall,'',450,100);},addNow:function(){var formVars=jax.getFormValues('addfriend');jax.call("community","friends,ajaxSaveFriend",formVars);return false;},confirmFriendRemoval:function(friendId){var ajaxCall=function()
{jax.call("community","friends,ajaxConfirmFriendRemoval",friendId);};cWindowShow(ajaxCall,'',450,80,'warning');},remove:function(friendId){var blockFriend=joms.jQuery('#cWindow input[name=block]').attr('checked');var ajaxCall;if(blockFriend)
{ajaxCall=function()
{jax.call("community","friends,ajaxBlockFriend",friendId);};}else{ajaxCall=function()
{jax.call("community","friends,ajaxRemoveFriend",friendId);};}
cWindowShow(ajaxCall,'',450,80,'warning');}},messaging:{loadComposeWindow:function(userid){var ajaxCall='jax.call("community", "inbox,ajaxCompose", '+userid+')';cWindowShow(ajaxCall,'',450,100);},send:function(){var formVars=jax.getFormValues('writeMessageForm');jax.call("community","inbox,ajaxSend",formVars);return false;}},walls:{insertOrder:'prepend',add:function(uniqueId,addFunc){jax.loadingFunction=function()
{joms.jQuery('#wall-message,#wall-submit').attr('disabled',true);}
jax.doneLoadingFunction=function()
{joms.jQuery('#wall-message,#wall-submit').attr('disabled',false);};if(typeof getCacheId=='function')
{cache_id=getCacheId();}
else
{cache_id="";}
jax.call('community',addFunc,joms.jQuery('#wall-message').val(),uniqueId,cache_id);},insert:function(html){joms.jQuery('#wall-message').val('');if(joms.walls.insertOrder=='prepend'){joms.jQuery('#wallContent').prepend(html);}else{joms.jQuery('#wallContent .wallComments:last').after(html);}},remove:function(type,wallId,contentId){if(confirm('Are you sure you want to delete this wall?'))
{jax.call('community',type+',ajaxRemoveWall',wallId,contentId);joms.jQuery('#wall_'+wallId).fadeOut('normal',function(){joms.jQuery(this).remove()});}},update:function(id,message){cWindowHide();joms.jQuery('#wall_'+id).replaceWith(message);},save:function(id,editableFunc){jax.call('community','system,ajaxUpdateWall',id,joms.jQuery('#wall-edit-'+id).val(),editableFunc);},edit:function(id,permissionFunc){if(joms.jQuery('#wall-edit-'+id).val()!=null)
{joms.jQuery('#wall-message-'+id).show();joms.jQuery('#wall-edit-container-'+id).remove();}
else
{joms.jQuery('#wall-message-'+id).hide();joms.jQuery('#wall_'+id+' div.content').prepend('<span id="wall-edit-container-'+id+'"></span>').prepend('<div class="loading" style="display:block;float: left;"></div>');jax.call('community','system,ajaxEditWall',id,permissionFunc);joms.utils.textAreaWidth('#wall-edit-'+id);joms.utils.autogrow('#wall-edit-'+id);}},more:function(){var groupId=joms.jQuery('#wall-groupId').val();var discussionId=joms.jQuery('#wall-discussionId').val();var limitStart=joms.jQuery('#wall-limitStart').val();joms.jQuery('#wall-more .more-wall-text').hide();joms.jQuery('#wall-more .loading').show().css('float','none').css('margin','5px 5px 0 180px');jax.call('community','system,ajaxGetOlderWalls',groupId,discussionId,limitStart);},append:function(html){joms.jQuery('#wall-more,#wall-groupId,#wall-discussionId,#wall-limitStart').remove();joms.jQuery('#wall-containter').append(html);},prepend:function(html){joms.jQuery('#wall-more').remove();joms.jQuery('#wall-groupId').remove();joms.jQuery('#wall-discussionId').remove();joms.jQuery('#wall-limitStart').remove();joms.jQuery('#wall-containter').prepend(html);}},toolbar:{timeout:500,closetimer:0,ddmenuitem:0,open:function(id){if(joms.jQuery('#'+id).length>0){joms.toolbar.cancelclosetime();if(joms.toolbar.ddmenuitem)
{joms.toolbar.ddmenuitem.style.visibility='hidden';}
joms.toolbar.ddmenuitem=document.getElementById(id);joms.toolbar.ddmenuitem.style.visibility='visible';}},close:function(){if(joms.toolbar.ddmenuitem)
{joms.toolbar.ddmenuitem.style.visibility='hidden';}},closetime:function(){joms.toolbar.closetimer=window.setTimeout(joms.toolbar.close,joms.toolbar.timeout);},cancelclosetime:function(){if(joms.toolbar.closetimer)
{window.clearTimeout(joms.toolbar.closetimer);joms.toolbar.closetimer=null;}}},registrations:{showTermsWindow:function(){var ajaxCall='jax.call("community", "register,ajaxShowTnc", "")';cWindowShow(ajaxCall,this.windowTitle,600,350);},authenticate:function(){jax.call("community","register,ajaxGenerateAuthKey");},authenticateAssign:function(){jax.call("community","register,ajaxAssignAuthKey");},assignAuthKey:function(fname,lblname,authkey){eval("document.forms['"+fname+"'].elements['"+lblname+"'].value = '"+authkey+"';");},showWarning:function(message){cWindowShow('joms.jQuery(\'#cWindowContent\').html(\''+message+'\')','Notice',450,200,'warning');}},miniwall:{initialize:function(){joms.jQuery('.wall-coc-item').hover(function(){joms.jQuery(this).find('.wall-coc-remove-link').stop(true,true).fadeIn('fast');},function(){joms.jQuery(this).find('.wall-coc-remove-link').stop(true,true).fadeOut('fast');});},add:function(id){var cmt=joms.jQuery('#wall-cmt-'+id+' textarea').val();cmt=joms.jQuery.trim(cmt);if(cmt.length>0)
{joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-action.add').attr('disabled',true);joms.jQuery('#wall-cmt-'+id+' .wall-coc-errors').hide();jax.loadingFunction=function(){joms.jQuery('#wall-cmt-'+id+' textarea').attr('disabled',true);joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-actions').append('<em class="wall-cmt-loading">Posting...</em>');jax.loadingFunction=function(){}};jax.doneLoadingFunction=function(){joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-actions').find('em').remove();joms.jQuery('#wall-cmt-'+id+' textarea').attr('disabled',false).val('');joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-action.add').attr('disabled',false);cmtCountObj=joms.jQuery('#wall-cmt-'+id).parent().parent().find('.wall-cmt-count');curCmtCount=parseInt(cmtCountObj.html());cmtCountObj.parent().fadeOut('fast',function(){cmtCountObj.html(curCmtCount+1);cmtCountObj.parent().fadeIn('fast');});joms.miniwall.initialize();jax.doneLoadingFunction=function(){}};jax.call("community","system,ajaxStreamAddComment",id,cmt);}},insert:function(id,text){joms.jQuery('#wall-cmt-'+id+' .wallform').before(text);joms.jQuery('#wall-cmt-'+id+' .wallnone').removeClass('wallnone');joms.miniwall.cancel(id);joms.miniwall.initialize();},loadall:function(id,text){joms.jQuery('#wall-cmt-'+id+' .wall-coc-item').remove();joms.jQuery('#wall-cmt-'+id+' .wallmore').replaceWith(text);joms.miniwall.initialize();},cancel:function(id){joms.jQuery('#wall-cmt-'+id+' textarea').val('');joms.jQuery('#wall-cmt-'+id+' .wall-coc-errors').hide();joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-action.add').removeAttr('disabled');joms.jQuery('#wall-cmt-'+id+' form').hide();joms.jQuery('#wall-cmt-'+id+' .wallnone').css('display','none');if(joms.jQuery('#wall-cmt-'+id+' .wall-coc-item').length<=0)
{joms.jQuery('#wall-cmt-'+id+' .wallcmt').addClass('wallnone');}
else
{joms.jQuery('#wall-cmt-'+id+' .show-cmt').show();}},remove:function(id){var cmtCountObj=joms.jQuery('#wall-'+id).parent().parent().parent().find('.wall-cmt-count');jax.loadingFunction=function(){joms.jQuery('#wall-'+id).css({backgroundColor:'#ffdddd'}).find('.wall-coc-remove-link').show().html('<em class="wall-cmt-loading wall-cmt-loading-inline">Removing...</em>');jax.loadingFunction=function(){}};jax.doneLoadingFunction=function(){var curCmtCount=parseInt(cmtCountObj.html());if(curCmtCount>0){if(curCmtCount==1){joms.jQuery('#wall-'+id).parent().parent().find('.wallcmt:last').addClass('wallnone');}
cmtCountObj.parent().fadeOut('fast',function(){cmtCountObj.html(curCmtCount-1);cmtCountObj.parent().fadeIn('fast');});}
joms.jQuery('#wall-'+id).fadeOut('slow',function(){joms.jQuery(this).remove();}).find('.wall-coc-remove-link').hide();joms.miniwall.initialize();jax.doneLoadingFunction=function(){}};jax.call('community','system,ajaxStreamRemoveComment',id);},show:function(id){try{var w=joms.jQuery('#'+id+' form').parent().width();joms.jQuery('#wall-cmt-'+id+' .wall-coc-form-action.add').removeAttr('disabled');joms.jQuery('#wall-cmt-'+id+' form').width(w).show();joms.jQuery('#wall-cmt-'+id+' .show-cmt').hide();joms.jQuery('#wall-cmt-'+id+' .wallnone').removeClass('wallnone');joms.jQuery('#wall-cmt-'+id+' textarea:[name!="comment"]').remove();var textarea=joms.jQuery('#wall-cmt-'+id+' textarea');if(!textarea.data('autogrow'))
{joms.utils.textAreaWidth(textarea);joms.utils.autogrow(textarea);textarea.focus();textarea.blur(function(){if(joms.jQuery(this).val()=='')joms.miniwall.cancel(id);}).data('autogrow',true);}}catch(e){}}},comments:{add:function(id){var cmt=joms.jQuery('#'+id+' textarea').val();if(cmt!=''){joms.jQuery('#'+id+' .wall-coc-form-action.add').attr('disabled',true);if(typeof getCacheId=='function')
{cache_id=getCacheId();}
else
{cache_id="";}
jax.call("community","plugins,walls,ajaxAddComment",id,cmt,cache_id);}},insert:function(id,text){joms.jQuery('#'+id+' form').before(text);joms.comments.cancel(id);},remove:function(obj){var cmtDiv=joms.jQuery(obj).parents('.wallcmt');var index=joms.jQuery(cmtDiv).index();try{console.log(index);}catch(err){}
var parentId=joms.jQuery(obj).parents('.wallcmt').parent().attr('id');try{console.log(parentId);}catch(err){}
jax.call("community","plugins,walls,ajaxRemoveComment",parentId,index);},cancel:function(id){joms.jQuery('#'+id+' textarea').val('');joms.jQuery('#'+id+' form').hide();joms.jQuery('#'+id+' .show-cmt').show();joms.jQuery('#'+id+' .wall-coc-errors').hide();joms.jQuery('#'+id+' .wall-coc-form-action.add').removeAttr('disabled');},show:function(id){var w=joms.jQuery('#'+id+' form').parent().width();joms.jQuery('#'+id+' .wall-coc-form-action.add').removeAttr('disabled');joms.jQuery('#'+id+' form').width(w).show();joms.jQuery('#'+id+' .show-cmt').hide();var textarea=joms.jQuery('#'+id+' textarea');if(!textarea.data('autogrow')){joms.utils.textAreaWidth(textarea);joms.utils.autogrow(textarea);textarea.blur(function(){if(joms.jQuery(this).val()=='')joms.comments.cancel(id);}).data('autogrow',true);}}},utils:{textAreaWidth:function(target){with(joms.jQuery(target))
{css('width','100%');css('width',width()-parseInt(css('borderLeftWidth'))
-parseInt(css('borderRightWidth'))
-parseInt(css('padding-left'))
-parseInt(css('padding-right')));}},autogrow:function(id,options){if(options==undefined)
options={};options.maxHeight=options.maxHeight||300;joms.jQuery(id).autogrow(options);}},maps:{mapsObj:null,geocoder:null,initialize:function(target,address,title,info){if(typeof google.maps=='undefined')
{setTimeout('joms.maps.initialize(\''+target+'\', \''+address+'\')',1000);}
else
{joms.maps.geocoder=new google.maps.Geocoder();joms.maps.geocoder.geocode({'address':address},function(results,status){if(status==google.maps.GeocoderStatus.OK){if(joms.maps.mapsObj==null)
{joms.maps.mapsObj=new Array();}
var latlng=new google.maps.LatLng(-34.397,150.644);var mapOptions={zoom:14,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP}
var mapId=joms.maps.mapsObj.length;joms.maps.mapsObj[mapId]=new google.maps.Map(document.getElementById(target),mapOptions);joms.maps.mapsObj[mapId].setCenter(results[0].geometry.location);var marker=new google.maps.Marker({map:joms.maps.mapsObj[mapId],position:results[0].geometry.location,title:title});if(info.length>0){var infowindow=new google.maps.InfoWindow({content:info});google.maps.event.addListener(marker,'click',function(){var mapId=joms.jQuery('div#'+target).data('maps');infowindow.open(joms.maps.mapsObj[mapId],marker);});}
joms.jQuery('div#'+target).data('maps',mapId);}else{alert("Geocode was not successful for the following reason: "+status);}});}},addMarker:function(target,lat,lng,title,info){if(joms.maps.mapsObj==null)
{setTimeout('joms.maps.addMarker(\''+target+'\', '+lat+', '+lng+', \''+title+'\', \''+info+'\')',1000);}
else
{var mapId=joms.jQuery('div#'+target).data('maps');var myLatlng=new google.maps.LatLng(lat,lng);var marker=new google.maps.Marker({position:myLatlng,map:joms.maps.mapsObj[mapId],title:title});if(info.length>0){var infowindow=new google.maps.InfoWindow({content:info});google.maps.event.addListener(marker,'click',function(){var mapId=joms.jQuery('div#'+target).data('maps');infowindow.open(joms.maps.mapsObj[mapId],marker);});}}}},connect:{checkRealname:function(value){var tmpLoadingFunction=jax.loadingFunction;jax.loadingFunction=function(){};jax.doneLoadingFunction=function(){jax.loadingFunction=tmpLoadingFunction;};jax.call('community','connect,ajaxCheckName',value);},checkEmail:function(value){var tmpLoadingFunction=jax.loadingFunction;jax.loadingFunction=function(){};jax.doneLoadingFunction=function(){jax.loadingFunction=tmpLoadingFunction;};jax.call('community','connect,ajaxCheckEmail',value);},checkUsername:function(value){var tmpLoadingFunction=jax.loadingFunction;jax.loadingFunction=function(){};jax.doneLoadingFunction=function(){jax.loadingFunction=tmpLoadingFunction;};jax.call('community','connect,ajaxCheckUsername',value);},update:function(){var ajaxCall="jax.call('community', 'connect,ajaxUpdate' );";cWindowShow(ajaxCall,'',450,200);},updateEmail:function(){joms.jQuery('#facebook-email-update').submit();},importData:function(){var importStatus=joms.jQuery('#importstatus').is(':checked')?1:0;var importAvatar=joms.jQuery('#importavatar').is(':checked')?1:0;jax.call('community','connect,ajaxImportData',importStatus,importAvatar);},mergeNotice:function(){var ajaxCall="jax.call('community','connect,ajaxMergeNotice');";cWindowShow(ajaxCall,'',450,200);},merge:function(){var ajaxCall="jax.call('community','connect,ajaxMerge');";cWindowShow(ajaxCall,'',450,200);},validateUser:function(){var ajaxCall="jax.call('community','connect,ajaxValidateLogin','"+joms.jQuery('#existingusername').val()+"','"+joms.jQuery('#existingpassword').val()+"');";cWindowShow(ajaxCall,'',450,200);},newUser:function(){var ajaxCall="jax.call('community','connect,ajaxShowNewUserForm');";cWindowShow(ajaxCall,'',450,200);},existingUser:function(){var ajaxCall="jax.call('community','connect,ajaxShowExistingUserForm');";cWindowShow(ajaxCall,'',450,200);},selectType:function(){if(joms.jQuery('[name=membertype]:checked').val()=='1')
{joms.connect.newUser();}
else
{joms.connect.existingUser();}},validateNewAccount:function(){jax.call('community','connect,ajaxCheckEmail',joms.jQuery('#newemail').val());jax.call('community','connect,ajaxCheckUsername',joms.jQuery('#newusername').val());jax.call('community','connect,ajaxCheckName',joms.jQuery('#newname').val());var isValid=true;if(joms.jQuery('#newname').val()==""||joms.jQuery('#error-newname').css('display')!='none')
{isValid=false;}
if(joms.jQuery('#newusername').val()==""||joms.jQuery('#error-newusername').css('display')!='none')
{isValid=false;}
if(joms.jQuery('#newemail').val()==''||joms.jQuery('#error-newemail').css('display')!='none')
{isValid=false;}
if(isValid)
{var ajaxCall="jax.call('community', 'connect,ajaxCreateNewAccount' , '"+joms.jQuery('#newname').val()+"', '"+joms.jQuery('#newusername').val()+"','"+joms.jQuery('#newemail').val()+"');";cWindowShow(ajaxCall,'',450,200);}}},videos:{playProfileVideo:function(id,userid){jax.call('community','profile,ajaxPlayProfileVideo',id,userid);},linkConfirmProfileVideo:function(id){var ajaxCall="jax.call('community', 'profile,ajaxConfirmLinkProfileVideo', '"+id+"');";cWindowShow(ajaxCall,'',450,100);},linkProfileVideo:function(id){var ajaxCall="jax.call('community', 'profile,ajaxLinkProfileVideo', '"+id+"');";cWindowShow(ajaxCall,'',450,100);},removeConfirmProfileVideo:function(userid,videoid){var ajaxCall="jax.call('community', 'profile,ajaxRemoveConfirmLinkProfileVideo', '"+userid+"', '"+videoid+"');";cWindowShow(ajaxCall,'',450,100);},removeLinkProfileVideo:function(userid,videoid){var ajaxCall="jax.call('community', 'profile,ajaxRemoveLinkProfileVideo', '"+userid+"', '"+videoid+"');";cWindowShow(ajaxCall,'',450,100);},showEditWindow:function(id,redirectUrl){if(typeof redirectUrl=='undefined')
redirectUrl='';var ajaxCall="jax.call('community', 'videos,ajaxEditVideo', '"+id+"' , '"+redirectUrl+"');";cWindowShow(ajaxCall,'',450,400);},deleteVideo:function(videoId){var ajaxCall="jax.call('community' , 'videos,ajaxRemoveVideo', '"+videoId+"','myvideos');";cWindowShow(ajaxCall,'',450,150);},playerConf:{},addVideo:function(creatortype,groupid){if(typeof creatortype=="undefined"||creatortype=="")
{var creatortype="";var groupid="";}
var ajaxCall="jax.call('community', 'videos,ajaxAddVideo', '"+creatortype+"', '"+groupid+"');";cWindowShow(ajaxCall,'',450,100);},linkVideo:function(creatortype,groupid){var ajaxCall="jax.call('community', 'videos,ajaxLinkVideo', '"+creatortype+"', '"+groupid+"');";cWindowShow(ajaxCall,'',450,100);},uploadVideo:function(creatortype,groupid){var ajaxCall="jax.call('community', 'videos,ajaxUploadVideo', '"+creatortype+"', '"+groupid+"');";cWindowShow(ajaxCall,'',450,100);},submitLinkVideo:function(){var isValid=true;videoLinkUrl="#linkVideo input[name='videoLinkUrl']";if(joms.jQuery.trim(joms.jQuery(videoLinkUrl).val())=='')
{joms.jQuery(videoLinkUrl).addClass('invalid');isValid=false;}
else
{joms.jQuery(videoLinkUrl).removeClass('invalid');}
if(isValid)
{joms.jQuery('#cwin-wait').css("margin-left","20px");joms.jQuery('#cwin-wait').show();document.linkVideo.submit();}},submitUploadVideo:function(){var isValid=true;videoFile="#uploadVideo input[name='videoFile']";if(joms.jQuery.trim(joms.jQuery(videoFile).val())=='')
{joms.jQuery(videoFile).addClass('invalid');isValid=false;}
else
{joms.jQuery(videoFile).removeClass('invalid');}
videoTitle="#uploadVideo input[name='title']";if(joms.jQuery.trim(joms.jQuery(videoTitle).val())=='')
{joms.jQuery(videoTitle).addClass('invalid');isValid=false;}
else
{joms.jQuery(videoTitle).removeClass('invalid');}
if(isValid)
{joms.jQuery('#cwin-wait').css("margin-left","20px");joms.jQuery('#cwin-wait').show();document.uploadVideo.submit();}},fetchThumbnail:function(videoId){var ajaxCall="jax.call('community' , 'videos,ajaxFetchThumbnail', '"+videoId+"','myvideos');";cWindowShow(ajaxCall,'',450,150);},toggleSearchSubmenu:function(e){joms.jQuery(e).next('ul').toggle().find('input[type=text]').focus();}},users:{banUser:function(userId,isBlocked){var ajaxCall="jax.call('community', 'profile,ajaxBanUser', '"+userId+"' , '"+isBlocked+"');";cWindowShow(ajaxCall,'',450,100);},removePicture:function(userId){var ajaxCall="jax.call('community', 'profile,ajaxRemovePicture', '"+userId+"');";cWindowShow(ajaxCall,'',450,100);},updateURL:function(userId){var ajaxCall="jax.call('community', 'profile,ajaxUpdateURL', '"+userId+"');";cWindowShow(ajaxCall,'',450,100);},uploadNewPicture:function(userId){var ajaxCall="jax.call('community', 'profile,ajaxUploadNewPicture', '"+userId+"');";cWindowShow(ajaxCall,'',450,100);},blockUser:function(userId){var ajaxCall='jax.call("community", "profile,ajaxBlockUser", "'+userId+'");';cWindowShow(ajaxCall,'',450,100);},unBlockUser:function(userId,layout){layout=layout||null;var ajaxCall='jax.call("community", "profile,ajaxUnblockUser", "'+userId+'", "'+layout+'");';cWindowShow(ajaxCall,'',450,100);}},user:{getActive:function(){return js_profileId;}},events:{deleteEvent:function(eventId){var ajaxCall="jax.call('community', 'events,ajaxWarnEventDeletion', '"+eventId+"');";cWindowShow(ajaxCall,'',450,100,'warning');},join:function(eventId){var ajaxCall='jax.call("community", "events,ajaxRequestInvite", "'+eventId+'", location.href );';cWindowShow(ajaxCall,'',450,100);},leave:function(eventId){var ajaxCall='jax.call("community", "events,ajaxIgnoreEvent", "'+eventId+'");';cWindowShow(ajaxCall,'',450,100);},sendmail:function(eventId){var ajaxCall='jax.call("community", "events,ajaxSendEmail", "'+eventId+'");';cWindowShow(ajaxCall,'',450,300);},confirmBlockGuest:function(userId,eventId){var ajaxCall='jax.call("community", "events,ajaxConfirmBlockGuest", "'+userId+'", "'+eventId+'");';cWindowShow(ajaxCall,'',450,100);},blockGuest:function(userId,eventId){var ajaxCall='jax.call("community", "events,ajaxBlockGuest", "'+userId+'", "'+eventId+'");';cWindowShow(ajaxCall,'',450,100);},confirmUnblockGuest:function(userId,eventId){var ajaxCall='jax.call("community", "events,ajaxConfirmUnblockGuest", "'+userId+'", "'+eventId+'");';cWindowShow(ajaxCall,'',450,100);},unblockGuest:function(userId,eventId){var ajaxCall='jax.call("community", "events,ajaxUnblockGuest", "'+userId+'", "'+eventId+'");';cWindowShow(ajaxCall,'',450,100);},confirmRemoveGuest:function(userId,eventId){var ajaxCall='jax.call("community", "events,ajaxConfirmRemoveGuest", "'+userId+'", "'+eventId+'");';cWindowShow(ajaxCall,'',450,80,'warning');},removeGuest:function(userId,eventId)
{var blockGuest=joms.jQuery('#cWindow input[name=block]').attr('checked');var ajaxCall=''
if(blockGuest)
{ajaxCall='jax.call("community", "events,ajaxBlockGuest", "'+userId+'", "'+eventId+'");';}else{ajaxCall='jax.call("community", "events,ajaxRemoveGuest", "'+userId+'", "'+eventId+'");';}
cWindowShow(ajaxCall,'',450,100,'warning');},joinNow:function(eventId){jax.call("community","events,ajaxJoinInvitation",eventId);},rejectNow:function(eventId){jax.call('community','events,ajaxRejectInvitation',eventId);},toggleSearchSubmenu:function(e){joms.jQuery(e).next('ul').toggle().find('input[type=text]').focus();},displayNearbyEvents:function(location){joms.ajax.call('events,ajaxDisplayNearbyEvents',[location],{success:function(html)
{joms.jQuery('#community-event-nearby-listing').html(html);}});},switchImport:function(importType){if(importType=='file')
{joms.jQuery('#event-import-url').css('display','none');joms.jQuery('#event-import-file').css('display','block');joms.jQuery('#import-type').val('file');}
if(importType=='url')
{joms.jQuery('#event-import-file').css('display','none');joms.jQuery('#event-import-url').css('display','block');joms.jQuery('#import-type').val('url');}}},profile:{confirmRemoveAvatar:function(){var ajaxCall='jax.call("community", "profile,ajaxConfirmRemoveAvatar");';cWindowShow(ajaxCall,'',450,100);},setStatusLimit:function(textAreaElement){joms.jQuery(textAreaElement).keyup(function(){var max=parseInt(joms.jQuery(this).attr('maxlength'));if(joms.jQuery(this).val().length>max)
{joms.jQuery(this).val(joms.jQuery(this).val().substr(0,joms.jQuery(this).attr('maxlength')));}
joms.jQuery('#profile-status-notice span').html((max-joms.jQuery(this).val().length));});}},privacy:{init:function(){joms.jQuery('select.js_PrivacySelect').each(function(){var tmpHTML="";var currValue;joms.jQuery(this).find('option').each(function(){if(joms.jQuery(this).attr('selected')){currValue=joms.jQuery(this).val();}});tmpHTML+="<dl class='js_dropDownMaster'>\n";tmpHTML+="<dt name="+currValue+" class='js_dropDown js_dropSelect-"+currValue+"'><strong>"+joms.jQuery(this).find('option[selected="selected"]').text()+"</strong><span></span></dt>\n";tmpHTML+="<dd>\n<ul class='js_dropDownParent'>\n";joms.jQuery(this).find('option').each(function(){var currOptVal=joms.jQuery(this).val();if(currOptVal==currValue){tmpHTML+="<li class='js_dropDownCurrent'>";}else{tmpHTML+="<li>";}
tmpHTML+="<a href='javascript:void()' name='"+currOptVal+"' class='js_dropDownChild js_dropDown-"+currOptVal+"'>"+joms.jQuery(this).text()+"</a></li>\n";});tmpHTML+="</ul>\n</dd>\n</dl>";joms.jQuery(this).parent().prepend(tmpHTML);joms.jQuery(this).hide();});joms.jQuery('.js_dropDownChild').live('click',function(e){e.preventDefault();var selectedVal=joms.jQuery(this).attr('name');var selectedText="";joms.jQuery(this).closest('.js_PriContainer').find('option').each(function(){if(joms.jQuery(this).val()==selectedVal){joms.jQuery(this).attr('selected','selected');selectedText=joms.jQuery(this).text();}else{joms.jQuery(this).attr('selected',false);}});var dropDownObj=joms.jQuery(this).parent().parent().parent().parent().find('dt');var currShowVal=dropDownObj.attr('name');dropDownObj.removeClass('js_dropSelect-'+currShowVal).addClass('js_dropSelect-'+selectedVal).attr('name',selectedVal).html('<strong>'+selectedText+'</strong><span></span>');joms.privacy.closeAll();});joms.jQuery('.js_dropDownMaster dt').live('click',function(e){e.preventDefault();if(joms.jQuery(this).parent().data('state')){joms.privacy.closeAll();joms.jQuery('body').unbind('click');}else{joms.privacy.closeAll();joms.jQuery(this).parent().parent().addClass('js_PrivacyOpen');joms.jQuery(this).parent().data('state',1).addClass('js_Current').find('dd').show();joms.jQuery('body').bind('click',function(e){var tarObj=joms.jQuery(e.target);if(tarObj.parents('.js_PriContainer').length==0){joms.privacy.closeAll();}});}});},closeAll:function(){joms.jQuery('.js_PriContainer').removeClass('js_PrivacyOpen');joms.jQuery('.js_dropDownMaster').each(function(){joms.jQuery(this).data('state',0).removeClass('js_Current').find('dd').hide();});}},tooltip:{setup:function(){joms.jQuery('.qtip-active').hide();setTimeout('joms.jQuery(\'.qtip-active\').hide()',150);try{clearTimeout(joms.jQuery.fn.qtip.timers.show);}catch(e){}
joms.jQuery(".jomTips").each(function(){var tipStyle='tipNormal';var tipWidth=220;var tipPos={corner:{target:'topMiddle',tooltip:'bottomMiddle'}}
var tipShow=true;var tipHide={when:{event:'mouseout'},effect:{length:10}}
if(joms.jQuery(this).hasClass('tipRight'))
{tipStyle='tipRight';tipWidth=320;tipPos={corner:{target:'rightMiddle',tooltip:'leftMiddle'}}}
if(joms.jQuery(this).hasClass('tipWide'))
{tipWidth=420;}
if(joms.jQuery(this).hasClass('tipFullWidth'))
{tipWidth=joms.jQuery(this).innerWidth()-20;}
var title='';var content=joms.jQuery(this).attr('title');var contentArray=content.split('::');joms.jQuery(this).attr('title','');if(contentArray.length==2)
{content=contentArray[1];title={text:contentArray[0]};}else
title=title={text:''};;joms.jQuery(this).qtip({content:{text:content,title:title},style:{name:tipStyle,width:tipWidth},position:tipPos,hide:tipHide,show:{solo:true,effect:{length:50}}}).removeClass('jomTips');});return true;},setStyle:function(){joms.jQuery.fn.qtip.styles.tipNormal={width:320,border:{width:7,radius:5},tip:true,name:'dark'}
joms.jQuery.fn.qtip.styles.tipRight={tip:'leftMiddle',name:'tipNormal'}
return true;}},like:{extractData:function(id){id=id.split('-');var data=[];data['element']=id[1];data['itemid']=id[2];data['element']=data['element'].replace('_','.');return data;},like:function(e){var like=joms.jQuery(e).parents('.like-snippet');var data=this.extractData(like.attr('id'));joms.jQuery(e).attr('onclick','');joms.ajax.call('system,ajaxLike',[data['element'],data['itemid']],{success:function(html)
{like.replaceWith(html);}});},dislike:function(e){var like=joms.jQuery(e).parents('.like-snippet');var data=this.extractData(like.attr('id'));joms.jQuery(e).attr('onclick','');joms.ajax.call('system,ajaxDislike',[data['element'],data['itemid']],{success:function(html)
{like.replaceWith(html);}});},unlike:function(e){var like=joms.jQuery(e).parents('.like-snippet');var data=this.extractData(like.attr('id'));joms.jQuery(e).attr('onclick','');joms.ajax.call('system,ajaxUnlike',[data['element'],data['itemid']],{success:function(html)
{like.replaceWith(html);}});}},tag:{add:function(element,id){jax.call('community','system,ajaxAddTag',element,id,joms.jQuery('#tag-addbox').val());},pick:function(element,id,tag){jax.call('community','system,ajaxAddTag',element,id,tag);},remove:function(id){jax.call('community','system,ajaxRemoveTag',id);},moreHide:function(element,id){joms.jQuery('#tag-list li').each(function(i,l){if(i>8){joms.jQuery(l).hide();}});joms.jQuery('.more-tag-show').show();joms.jQuery('.more-tag-hide').hide();},moreShow:function(element,id){joms.jQuery('#tag-list li').each(function(i,l){if(i>8){joms.jQuery(l).show();}});joms.jQuery('.more-tag-show').hide();joms.jQuery('.more-tag-hide').show();},toggleMore:function(element,id){joms.jQuery('#tag-list li').each(function(i,l){if(i>8){joms.jQuery(l).toggle();}});},list:function(tag){var ajaxCall="jax.call('community', 'system,ajaxShowTagged', '"+tag+"');";cWindowShow(ajaxCall,'',450,100);},edit:function(element,cid){joms.tag.moreShow(element,cid);var tagClass=element+"-"+cid;joms.jQuery('#tag-editor.tag-editor-'+tagClass+',.tag-token a.tag-delete').show();},done:function(element,cid){joms.tag.moreHide(element,cid);var tagClass=element+"-"+cid;joms.jQuery('#tag-editor.tag-editor-'+tagClass+',.tag-token a.tag-delete').hide();}},geolocation:{showNearByEvents:function(location){joms.jQuery('#community-event-nearby-listing').show();joms.jQuery('#showNearByEventsLoading').show();if(typeof(location)=='undefined')
{if(navigator.geolocation)
{navigator.geolocation.getCurrentPosition(function(location)
{var lat=location.coords.latitude;var lng=location.coords.longitude;geocoder=new google.maps.Geocoder();var latlng=new google.maps.LatLng(lat,lng);geocoder.geocode({'latLng':latlng},function(results,status){if(status==google.maps.GeocoderStatus.OK){if(results[4]){location=results[4].formatted_address;joms.geolocation.setCookie('currentLocation',location);joms.events.displayNearbyEvents(location);}}else{alert("Geocoder failed due to: "+status);}});});}
else
{alert('Sorry, your browser does not support this feature.');joms.jQuery('#community-event-nearby-listing').hide();joms.jQuery('#showNearByEventsLoading').hide();}}
else
{joms.events.displayNearbyEvents(location);}},validateNearByEventsForm:function(){var location=joms.jQuery('#userInputLocation').val();if(location.length!=0)
{joms.geolocation.showNearByEvents(location);}},setCookie:function(c_name,value){var exdate=new Date();exdate.setTime(exdate.getTime()+(60*60*1000));document.cookie=c_name+"="+escape(value)+";expires="+exdate;},getCookie:function(c_name){if(document.cookie.length>0)
{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}}});joms.jQuery(document).click(function(){joms.toolbar.close();});function update_counter(selector,count){if(!count){count=0;}
var currnum=parseInt(jQuery(selector).html(),10);count=parseInt(count,10);if(currnum<=1){jQuery(selector).css('display','none');}else{jQuery(selector).html(currnum+count);}}
function get_cookies_array(){var cookies={};if(document.cookie&&document.cookie!='')
{var split=document.cookie.split(';');for(var i=0;i<split.length;i++)
{var name_value=split[i].split("=");name_value[0]=name_value[0].replace(/^ /,'');cookies[decodeURIComponent(name_value[0])]=decodeURIComponent(name_value[1]);}}
return cookies;}
joms.jQuery(document).ready(function(){joms.tooltip.setStyle();joms.tooltip.setup();joms.apps.initToggle();joms.plugins.initialize();if(joms.jQuery('.album-actions').length){joms.album.init();}
if(joms.jQuery('.wall-coc-item').length){joms.miniwall.initialize();}
joms.activities.initMap();});joms.jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=joms.jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};(function($){$.fn.autogrow=function(o){var o=o||{};this.filter('textarea').each(function(){var textarea=$(this);if(textarea.hasClass('shadow'))return;var shadow=textarea.data('shadow');var offset=textarea.outerHeight()-textarea.innerHeight();if(!shadow)
{shadow=textarea.clone().unbind().removeAttr('name').addClass('shadow').css({'position':'absolute','visibility':'hidden','height':0}).insertAfter(textarea);if(o.lineHeight==undefined)o.lineHeight=shadow.val(' ')[0].scrollHeight;textarea.data('shadow',shadow).bind('focus blur keyup keypress autogrow',autogrow);}
if(o.minHeight==undefined)o.minHeight=textarea.height();if(o.maxHeight==undefined)o.maxHeight=0;function autogrow()
{shadow.val(textarea.val());shadow[0].scrollHeight;var height=shadow[0].scrollHeight;if(height>o.maxHeight&&o.maxHeight>0)
{height=o.maxHeight;textarea.css('overflow','auto');}else{height=(height<o.minHeight)?o.minHeight:height;textarea.css('overflow','hidden');}
textarea.height(height);}
autogrow();});return this;}})(joms.jQuery);(function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(B=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!B){B={}}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content}}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title}}if(typeof B.position!=="object"){B.position={corner:B.position}}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner}}if(typeof B.show!=="object"){B.show={when:B.show}}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when}}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect}}if(typeof B.hide!=="object"){B.hide={when:B.hide}}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when}}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect}}if(typeof B.style!=="object"){B.style={name:B.style}}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B)}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy()}}else{if(u!==true){A=[f(this).qtip("api")]}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy()}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show()}else{if(w=="hide"){A[y].hide()}else{if(w=="focus"){A[y].focus()}else{if(w=="disable"){A[y].disable(true)}else{if(w=="enable"){A[y].disable(false)}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body)}if(v.position.target===false){v.position.target=f(this)}if(v.show.when.target===false){v.show.when.target=f(this)}if(v.hide.when.target===false){v.hide.when.target=f(this)}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(x)}else{f(this).data("qtip",{current:0,interfaces:[x]})}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event)})}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x)}}})};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(s.elements.tooltip.css("display")!=="none"){return s}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s}function w(){if(s.options.position.type!=="static"){s.focus()}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter")}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true)}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break}s.elements.tooltip.addClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(s.elements.tooltip.css("display")==="none"){return s}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s}function w(){s.onHide.call(s,y)}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C])}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C]}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C])}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C]}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C])}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}G.dimensions.width-=2;G.dimensions.height-=2}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position}else{G.position=s.options.position.target.offset()}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()}}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2)}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2)}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1}}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2)}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2)}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I}else{if(L.corner.search(/bottom/)!==-1){y.top+=I}}if(L.corner.search(/left/)!==-1){y.left-=I}else{if(L.corner.search(/right/)!==-1){y.left+=I}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel")}else{K=s.options.position.corner.tooltip}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return s},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth")}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"})}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max}if(w<s.options.style.width.min){w=s.options.style.width.min}}}}if(w%2!==0){w-=1}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2))})}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height)}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true))}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color)}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z}else{if(z===false){return}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"})}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show()}else{s.elements.content.html(A)}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B()}})})}else{B()}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}y=s.beforeContentLoad.call(s);if(y===false){return s}if(A=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B)}return s},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s}if(s.elements.button){s.elements.button=s.elements.button.clone(true)}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button)}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove()}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create")}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1)}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removeData("qtip")}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x}})}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y)}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}u[z]+="</div>"}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x)})}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4})}n.call(t,v)}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill()}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1}else{positionAdjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust})}else{t.elements.tip.css({bottom:positionAdjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust})}else{t.elements.tip.css({right:positionAdjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text)}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t)}})}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}clearTimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z)}})}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width}else{s.left=z.cache.mouse.x}y.x="Left"}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width}else{s.left=z.cache.mouse.x-A.dimensions.width}y.x="Right"}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height}else{s.top=z.cache.mouse.y}y.y="top"}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height}else{s.top=z.cache.mouse.y-A.dimensions.height}y.y="bottom"}}if(s.left<0){s.left=u.left;y.x=false}if(s.top<0){s.top=u.top;y.y=false}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x)}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y)}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s]}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s]}}}return v}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip}}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size}}if(typeof s.border!=="object"){s.border={width:s.border}}if(typeof s.width!=="object"){s.width={value:s.width}}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y}return s}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t])}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]))}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v]}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]}}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll")){u.updatePosition(t,true)}}},100)});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(joms.jQuery);(function($){$.fn.stretchToFit=function(windowResize){(function stretchToFit(target)
{target.css('width','100%');target.css('width',target.width()-parseInt(target.css('borderLeftWidth'))
-parseInt(target.css('borderRightWidth'))
-parseInt(target.css('padding-left'))
-parseInt(target.css('padding-right')));})(this);return this;};})(joms.jQuery);(function($){$.fn.defaultValue=function(defaultText,defaultClass){var target=this;function Focus()
{if(target.val()==defaultText)
{target.val('');}
target.removeClass(defaultClass);}
function Blur()
{var _defaultText=target.data('defaultText');var _defaultClass=target.data('defaultClass');var empty=target.val().length<1||target.val()==_defaultText||target.hasClass(_defaultClass);if(empty)target.val(defaultText);if(defaultClass!=_defaultClass)
target.removeClass('_defaultClass');target.toggleClass(defaultClass,empty);}
target.focus(Focus).blur(Blur);Blur();target.data('defaultText',defaultText);target.data('defaultClass',defaultClass);return target;}})(joms.jQuery);(function($){$.fn.serializeJSON=function(){var params={};$.each(this.serializeArray(),function()
{params[this.name]=this.value;})
return params;}})(joms.jQuery);

/* window-1.0.js */

function cWindowShow(windowCall,winTitle,contentWidth,contentHeight,winType)
{joms.jQuery('#cWindow').remove();var cWindow=joms.jQuery(decodeURIComponent('%3Cdiv%20id%3D%22cWindow%22%20class%3D%22dialog%22%3E%0A%09%3Cdiv%20id%3D%22cwin_tl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_tr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_ml%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cWindowContentOuter%22%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentTop%22%3E%0A%09%09%09%3Ca%20href%3D%22javascript%3Avoid(0)%3B%22%20onclick%3D%22cWindowHide()%3B%22%20id%3D%22cwin_close_btn%22%3EClose%3C%2Fa%3E%0A%09%09%09%3Cdiv%20id%3D%22cwin_logo%22%3E%3C%2Fdiv%3E%0A%09%09%09%3Cdiv%20class%3D%22clr%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%09%3Cdiv%20id%3D%22cWindowContentWrap%22%3E%0A%09%09%09%3Cdiv%20id%3D%22cWindowContent%22%3E%3C%2Fdiv%3E%0A%09%09%3C%2Fdiv%3E%0A%0A%09%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_mr%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%0A%09%3Cdiv%20id%3D%22cwin_bl%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_bm%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20id%3D%22cwin_br%22%3E%3C%2Fdiv%3E%0A%09%3Cdiv%20style%3D%22clear%3A%20both%3B%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E'));var cWindowSize={contentWrapHeight:function(){return+contentHeight},contentOuterWidth:function(){return+contentWidth},contentOuterHeight:function(){return+contentHeight+30},width:function(){return this.contentOuterWidth()+40},height:function(){return this.contentOuterHeight()+40},left:function(){return(joms.jQuery(window).width()-this.width())/2},top:function(){return joms.jQuery(document).scrollTop()+((joms.jQuery(window).height()-this.height())/2)},zIndex:function(){return cGetZIndexMax()+1}};cWindow.find('#cwin_logo').html(winTitle);cWindow.find('#cWindowContentWrap').css({'height':cWindowSize.contentWrapHeight()});cWindow.find('#cWindowContentOuter, #cwin_tm, #cwin_bm').css({'width':cWindowSize.contentOuterWidth()});cWindow.find('#cWindowContentOuter, #cwin_ml, #cwin_mr').css({'height':cWindowSize.contentOuterHeight()});cWindow.attr({'class':winType}).css({'width':cWindowSize.width(),'height':cWindowSize.height(),'top':cWindowSize.top(),'left':cWindowSize.left(),'zIndex':cWindowSize.zIndex()}).prependTo('body');jax.loadingFunction=function(){joms.jQuery('#cWindowContentWrap').addClass('loading').css('overflow','hidden');};jax.doneLoadingFunction=function(){joms.jQuery('#cWindowContentWrap').removeClass('loading').css('overflow','auto');};if(windowCall!=undefined&&typeof(windowCall)=="string")eval(windowCall);if(typeof(windowCall)=="function")windowCall();if(joms.jQuery.browser.msie&&joms.jQuery.browser.version.substr(0,1)<7&&typeof(jomsIE6)!="undefined"&&jomsIE6==true)
{joms.jQuery('#cwin_tm, #cwin_bm, #cwin_ml, #cwin_mr').each(function()
{joms.jQuery(this)[0].filters(0).sizingMethod="crop";})}
joms.jQuery('#community-wrap iframe').css('visibility','hidden');}
function cWindowHide()
{var cWindow=joms.jQuery('#cWindow');cWindow.find('#cWindowAction').add('<div>').animate({bottom:'-30px'},'fast',function()
{cWindow.fadeOut('fast',function()
{cWindow.remove();joms.jQuery('#community-wrap iframe').css('visibility','visible');});});}
function cWindowAddContent(html,actions){var actionBarHeight=(actions)?30:0;var oldh=joms.jQuery('#cWindowContentWrap').height();var oldt=joms.jQuery('#cWindow').position().top;var cWindow=joms.jQuery('#cWindow');var cWindowContent=cWindow.find('#cWindowContent').html(html);var h=cWindowContent.outerHeight();var maxH=joms.jQuery(window).height()*0.7;if(h>maxH)h=maxH;cWindow.find('#cWindowContentWrap').animate({'height':'+='+(h-oldh)+'px'});cWindow.find('#cWindowContentOuter, #cwin_ml, #cwin_mr').animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px'});cWindow.animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px','top':'-='+(h-oldh)/2+'px'},function(){if(actions)
{joms.jQuery('<div id="cWindowAction">').html(actions).css('bottom','-30px').appendTo('#cWindowContentOuter').animate({bottom:'0px'});}});}
function cWindowResize(h)
{var actions=joms.jQuery('#cWindowActions');var actionBarHeight=(actions.length>0)?30:0;var oldh=joms.jQuery('#cWindowContentWrap').height();var oldt=joms.jQuery('#cWindow').position().top;h=parseInt(h);var cWindow=joms.jQuery('#cWindow');cWindow.find('#cWindowContentWrap').animate({'height':'+='+(h-oldh)+'px'});cWindow.find('#cWindowContentOuter, #cwin_ml, #cwin_mr').animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px'});cWindow.animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px','top':'-='+(h-oldh)/2+'px'});}
function cWindowActions(action)
{var actions=joms.jQuery('#cWindowActions');var actionBarHeight=(actions)?30:0;joms.jQuery('#cWindowAction').remove();var oldh=joms.jQuery('#cWindowContentWrap').height();var oldt=joms.jQuery('#cWindow').position().top;var cWindow=joms.jQuery('#cWindow');var h=joms.jQuery('#cWindowContent').outerHeight();cWindow.find('#cWindowContentWrap').animate({'height':'+='+(h-oldh)+'px'});cWindow.find('#cWindowContentOuter, #cwin_ml, #cwin_mr').animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px'});cWindow.animate({'height':'+='+((h-oldh)+(actionBarHeight))+'px','top':'-='+(h-oldh)/2+'px'},function(){if(actions)
{joms.jQuery('<div id="cWindowAction">').html(action).css('bottom','-30px').appendTo('#cWindowContentOuter').animate({bottom:'0px'});}});jax.loadingFunction=function(){joms.jQuery('#cWindowAction').addClass('loading');joms.jQuery('#cWindowContent').find('input, textarea, button').attr('disabled',true);}
jax.doneLoadingFunction=function(){joms.jQuery('#cWindowAction').removeClass('loading');joms.jQuery('#cWindowContent').find('input, textarea, button').attr('disabled',false);};}
function cGetZIndexMax()
{var allElems=document.getElementsByTagName?document.getElementsByTagName("*"):document.all;var maxZIndex=0;for(var i=0;i<allElems.length;i++){var elem=allElems[i];var cStyle=null;if(elem.currentStyle){cStyle=elem.currentStyle;}
else if(document.defaultView&&document.defaultView.getComputedStyle){cStyle=document.defaultView.getComputedStyle(elem,"");}
var sNum;if(cStyle){sNum=Number(cStyle.zIndex);}else{sNum=Number(elem.style.zIndex);}
if(!isNaN(sNum)){maxZIndex=Math.max(maxZIndex,sNum);}}
return maxZIndex;}

/* joms.ajax.js */

joms.extend({ajax:{execute:function(o)
{var settings={};joms.jQuery.extend(settings,o);settings.error=function()
{if(o.fail)o.fail.apply(this,arguments);}
settings.dataFilter=function(jaxData,type)
{if(o.beforeDataFilter)o.beforeDataFilter(jaxData);jax.processResponse(jaxData);var jomsData={success:joms.ajax.extractJomsData(jaxData,'__callback'),error:joms.ajax.extractJomsData(jaxData,'__throwError')}
if(o.afterDataFilter)o.afterDataFilter(jomsData);return jomsData;}
settings.success=function(jomsData,status)
{if(jomsData.error.length>0&&o.error)
{joms.jQuery.each(jomsData.error,function(i,args)
{o.error.apply(this,args);});return;}
if(jomsData.success.length>0&&o.success)
{joms.jQuery.each(jomsData.success,function(i,args)
{o.success.apply(this,args);});}}
window.__callback=window.__throwError=function(){};joms.jQuery.ajax(settings);},call:function(sFunc,sArgs,o)
{var settings={url:jax_live_site,type:'POST',data:{option:'community',task:'azrul_ajax',no_html:1,func:sFunc},dataType:'text'};settings.data[jax_token_var]=1;joms.jQuery.extend(settings.data,this.buildSArgs(sArgs));if(typeof o=='function')
o={success:o};joms.jQuery.extend(settings,o);this.execute(settings);},buildSArgs:function(sArgs)
{var data={};joms.jQuery(sArgs).each(function(i,a)
{if(typeof a=='string')
a.replace(/"/g,'&quot;');if(!jax.isArray(a))
a=new Array('_d_',encodeURIComponent(a));data['arg'+i]=jax.stringify(a);})
return data;},extractJomsData:function(jaxData,handler)
{var jomsData=[];joms.jQuery.each(eval(jaxData),function()
{if(this[0]=='cs'&&this[1]==handler)
{jomsData.push(this.slice(3)[0]);}});return jomsData;}}});


