/* mega.more.js */

function mega_equal_cols(){}
function mega_fix_arrow_pos(){var ul=$E('#ja-megamenu .level0');if(!ul)return;var lis=ul.getChildren();if(!lis)return;lis.each(function(li){if(!li.hasClass('haschild'))return;var submenu=li.getElement('.childcontent');if(!submenu)return;var ml=submenu.getStyle('margin-left');if(ml)ml=ml.toInt();if(!ml)return;var childinner=submenu.getElement('.childcontent-inner');if(!childinner)return;var curpos=26;childinner.setStyle('background-position',(curpos-ml)+'px top');});}
window.addEvent('load',function(){mega_fix_arrow_pos.delay(10);});

/* 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(new RegExp('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)','g'));if(!matches)return;for(i=0;i<matches.length;i++){var ck=matches[i].match(new RegExp('(?:^|;)\\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('ja-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 jaMegaMenuMoo=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.stopPropagation();}.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.stopPropagation();}.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.stopPropagation();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));}
li.addEvent('click',function(e){new Event(e).stopPropagation()});}
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;}
new Event(e).stopPropagation();}.bind(this));}
if(li.childcontent)this.positionSubmenu(li);},this);var container=$('ja-wrapper');if(!container)container=document.body;container.addEvent('click',function(e){this.itemHideOthers(null);}.bind(this));this.menu.addEvent('click',function(e){new Event(e).stopPropagation()});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){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(!$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);if(li.eff_on)li.eff_on['margin-left']=0;if(li.eff_off){li.eff_off['margin-left']=li._w+20;li.childcontent_inner.setStyle('margin-left',li.eff_off['margin-left']);}}}}});

/* dropline.js */

var jasdl_delay=1000
var jasdl_current=null
var jasdl_recover=null
var jasdl_timeoutid=null
var jasdl_timetorecover=null
var jasdl_timeoutid2=0
function jasdl_initJAScriptDLMenu(){jasdl_current=jasdl_activemenu.length?jasdl_activemenu[0]:0;mainlis=document.getElementById("jasdl-mainnav").getElementsByTagName("li")
for(i=0;i<mainlis.length;++i){x=mainlis[i]
jasdl_menuindex=x.id.substr(13)
x._id=parseInt(jasdl_menuindex)
x.onmouseover=jasdl_mouseOver
x.onmouseout=jasdl_mouseOut
subx=document.getElementById("jasdl-subnav"+jasdl_menuindex)
if(subx)
{if(jasdl_activemenu[0]&&jasdl_menuindex==jasdl_activemenu[0]){subx.style.display="block";if(subx.className)subx.className+=" active";else subx.className="active";}else{subx.style.display="none"}
subx._id=jasdl_menuindex
subx.onmouseover=jasdl_mouseOver
subx.onmouseout=jasdl_mouseOut}
document.getElementById("jasdl-subnav").style.display="block";}
if(jasdl_activemenu[0])
{actitem=document.getElementById("jasdl-mainnav"+jasdl_activemenu[0].toString())
if(actitem)
{if(actitem.className)actitem.className+=" active";else actitem.className="active";}
jasdl_recover=jasdl_activemenu[0]}
if(jasdl_activemenu[1]){actitem=document.getElementById("jasdl-subnavitem"+jasdl_activemenu[1].toString())
if(actitem)
{if(actitem.className)actitem.className+=" active";else actitem.className="active";}}
var subnav=document.getElementById('jasdl-subnav');if(subnav){var sublis=subnav.getElementsByTagName("li");for(i=0;i<sublis.length;++i){objs=sublis[i];var child=objs.getElementsByTagName('ul');if(child&&child.length){$(objs).addClass('haschild');objs.onmouseover=function(){if(this.timer){clearTimeout(this.timer);this.timer=0;}
$(this).addClass('hover');}
objs.onmouseout=function(){this.timer=setTimeout(jasdl_sub_mouseOut.bind(this),100);}}}}}
function jasdl_sub_mouseOut(){$(this).removeClass('hover');}
function jasdl_mouseOver(){jasdl_hide()
jasdl_current=this._id
jasdl_show()
jasdl_clearTimeOut(jasdl_timeoutid)}
function jasdl_mouseOut(){if(this._id!=jasdl_current)return
jasdl_timeoutid=setTimeout('jasdl_restore()',jasdl_delay)}
function jasdl_restore(){jasdl_clearTimeOut(jasdl_timeoutid)
jasdl_hide()
if(jasdl_recover)
{jasdl_current=jasdl_recover
jasdl_show()}}
function jasdl_setHover(){if(jasdl_current==jasdl_recover)return
mainx=document.getElementById("jasdl-mainnav"+jasdl_current.toString())
if(mainx)
mainx.className+=' hover';}
function jasdl_clearHover(){if(jasdl_current==jasdl_recover)return
mainx=document.getElementById("jasdl-mainnav"+jasdl_current.toString())
if(mainx)
mainx.className=mainx.className.replace(/[ ]?hover/,'');}
function jasdl_hide(){subx=document.getElementById("jasdl-subnav"+jasdl_current.toString())
if(subx)
subx.style.display="none"
jasdl_clearHover()}
function jasdl_show(){subx=document.getElementById("jasdl-subnav"+jasdl_current.toString())
if(subx)
subx.style.display="block"
jasdl_setHover()}
function jasdl_clearTimeOut(timeoutid){clearTimeout(timeoutid)
timeoutid=0}
window.addEvent('load',jasdl_initJAScriptDLMenu);

/* modal.js */

var SqueezeBox={presets:{size:{x:600,y:450},sizeLoading:{x:200,y:150},marginInner:{x:20,y:20},marginImage:{x:150,y:200},handler:false,adopt:null,closeWithOverlay:true,zIndex:65555,overlayOpacity:0.7,classWindow:'',classOverlay:'',disableFx:false,onOpen:Class.empty,onClose:Class.empty,onUpdate:Class.empty,onResize:Class.empty,onMove:Class.empty,onShow:Class.empty,onHide:Class.empty,fxOverlayDuration:250,fxResizeDuration:750,fxContentDuration:250,ajaxOptions:{}},initialize:function(options){if(this.options)return this;this.presets=$merge(this.presets,options)
this.setOptions(this.presets);this.build();this.listeners={window:this.reposition.bind(this,[null]),close:this.close.bind(this),key:this.onkeypress.bind(this)};this.isOpen=this.isLoading=false;this.window.close=this.listeners.close;return this;},build:function(){this.overlay=new Element('div',{id:'sbox-overlay',styles:{display:'none',zIndex:this.options.zIndex}});this.content=new Element('div',{id:'sbox-content'});this.btnClose=new Element('a',{id:'sbox-btn-close',href:'#'});this.window=new Element('div',{id:'sbox-window',styles:{display:'none',zIndex:this.options.zIndex+2}}).adopt(this.btnClose,this.content);if(!window.ie6){this.overlay.setStyles({position:'fixed',top:0,left:0});this.window.setStyles({position:'fixed',top:'50%',left:'50%'});}else{this.overlay.style.setExpression('marginTop','document.documentElement.scrollTop + "px"');this.window.style.setExpression('marginTop','0 - parseInt(this.offsetHeight / 2) + document.documentElement.scrollTop + "px"');this.overlay.setStyles({position:'absolute',top:'0%',left:'0%'});this.window.setStyles({position:'absolute',top:'0%',left:'0%'});}
$(document.body).adopt(this.overlay,this.window);this.fx={overlay:this.overlay.effect('opacity',{duration:this.options.fxOverlayDuration,wait:false}).set(0),window:this.window.effects({duration:this.options.fxResizeDuration,wait:false}),content:this.content.effect('opacity',{duration:this.options.fxContentDuration,wait:false}).set(0)};},addClick:function(el){return el.addEvent('click',function(){if(this.fromElement(el))return false;}.bind(this));},fromElement:function(el,options){this.initialize();this.element=$(el);if(this.element&&this.element.rel)options=$merge(options||{},Json.evaluate(this.element.rel));this.setOptions(this.presets,options);this.assignOptions();this.url=(this.element?(this.options.url||this.element.href):el)||'';if(this.options.handler){var handler=this.options.handler;return this.setContent(handler,this.parsers[handler].call(this,true));}
var res=false;for(var key in this.parsers){if((res=this.parsers[key].call(this)))return this.setContent(key,res);}
return this;},assignOptions:function(){this.overlay.setProperty('class',this.options.classOverlay);this.window.setProperty('class',this.options.classWindow);},close:function(e){if(e)new Event(e).stop();if(!this.isOpen)return this;this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));this.window.setStyle('display','none');this.trashImage();this.toggleListeners();this.isOpen=null;this.fireEvent('onClose',[this.content]).removeEvents();this.options={};this.setOptions(this.presets).callChain();return this;},onError:function(){if(this.image)this.trashImage();this.setContent('Error during loading');},trashImage:function(){if(this.image)this.image=this.image.onload=this.image.onerror=this.image.onabort=null;},setContent:function(handler,content){this.content.setProperty('class','sbox-content-'+handler);this.applyTimer=this.applyContent.delay(this.fx.overlay.options.duration,this,[this.handlers[handler].call(this,content)]);if(this.overlay.opacity)return this;this.toggleOverlay(true);this.fx.overlay.start(this.options.overlayOpacity);this.reposition();return this;},applyContent:function(content,size){this.applyTimer=$clear(this.applyTimer);this.hideContent();if(!content)this.toggleLoading(true);else{if(this.isLoading)this.toggleLoading(false);this.fireEvent('onUpdate',[this.content],20);}
this.content.empty()[['string','array',false].contains($type(content))?'setHTML':'adopt'](content||'');this.callChain();if(!this.isOpen){this.toggleListeners(true);this.resize(size,true);this.isOpen=true;this.fireEvent('onOpen',[this.content]);}else this.resize(size);},resize:function(size,instantly){var sizes=window.getSize();this.size=$merge(this.isLoading?this.options.sizeLoading:this.options.size,size);var to={width:this.size.x,height:this.size.y,marginLeft:-this.size.x/2,marginTop:-this.size.y/2};$clear(this.showTimer||null);this.hideContent();if(!instantly)this.fx.window.start(to).chain(this.showContent.bind(this));else{this.window.setStyles(to).setStyle('display','');this.showTimer=this.showContent.delay(50,this);}
this.reposition(sizes);},toggleListeners:function(state){var task=state?'addEvent':'removeEvent';this.btnClose[task]('click',this.listeners.close);if(this.options.closeWithOverlay)this.overlay[task]('click',this.listeners.close);document[task]('keydown',this.listeners.key);window[task]('resize',this.listeners.window);window[task]('scroll',this.listeners.window);},toggleLoading:function(state){this.isLoading=state;this.window[state?'addClass':'removeClass']('sbox-loading');if(state)this.fireEvent('onLoading',[this.window]);},toggleOverlay:function(state){this.overlay.setStyle('display',state?'':'none');$(document.body)[state?'addClass':'removeClass']('body-overlayed');},showContent:function(){if(this.content.opacity)this.fireEvent('onShow',[this.window]);this.fx.content.start(1);},hideContent:function(){if(!this.content.opacity)this.fireEvent('onHide',[this.window]);this.fx.content.stop().set(0);},onkeypress:function(e){switch(e.key){case'esc':case'x':this.close();break;}},reposition:function(sizes){sizes=sizes||window.getSize();this.overlay.setStyles({width:sizes.size.x,height:sizes.size.y});this.fireEvent('onMove',[this.overlay,this.window,sizes]);},removeEvents:function(type){if(!this.$events)return this;if(!type)this.$events=null;else if(this.$events[type])this.$events[type]=null;return this;},parsers:{'image':function(preset){return(preset||this.url.test(/\.(jpg|jpeg|png|gif|bmp)$/i))?this.url:false;},'adopt':function(preset){if($(this.options.adopt))return $(this.options.adopt);if(preset||($(this.element)&&!this.element.parentNode))return $(this.element);var bits=this.url.match(/#([\w-]+)$/);return bits?$(bits[1]):false;},'url':function(preset){return(preset||(this.url&&!this.url.test(/^javascript:/i)))?this.url:false;},'iframe':function(preset){return(preset||this.url)?this.url:false;},'string':function(preset){return true;}},handlers:{'image':function(url){this.image=new Image();var events={loaded:function(){var win={x:window.getWidth()-this.options.marginImage.x,y:window.getHeight()-this.options.marginImage.y};var size={x:this.image.width,y:this.image.height};for(var i=0;i<2;i++)
if(size.x>win.x){size.y*=win.x/size.x;size.x=win.x;}else if(size.y>win.y){size.x*=win.y/size.y;size.y=win.y;}
size={x:parseInt(size.x),y:parseInt(size.y)};if(window.webkit419)this.image=new Element('img',{'src':this.image.src});else $(this.image);this.image.setProperties({'width':size.x,'height':size.y});this.applyContent(this.image,size);}.bind(this),failed:this.onError.bind(this)};(function(){this.src=url;}).delay(10,this.image);this.image.onload=events.loaded;this.image.onerror=this.image.onabort=events.failed;},'adopt':function(el){return el.clone();},'url':function(url){this.ajax=new Ajax(url,this.options.ajaxOptions);this.ajax.addEvent('onSuccess',function(resp){this.applyContent(resp);this.ajax=null;}.bind(this));this.ajax.addEvent('onFailure',this.onError.bind(this));this.ajax.request.delay(10,this.ajax);},'iframe':function(url){return new Element('iframe',{'src':url,'frameBorder':0,'width':this.options.size.x,'height':this.options.size.y});},'string':function(str){return str;}},extend:$extend};SqueezeBox.extend(SqueezeBox,Events.prototype);SqueezeBox.extend(SqueezeBox,Options.prototype);SqueezeBox.extend(SqueezeBox,Chain.prototype);

/* jquery-1.5.2.min.js */

(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bR(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bQ(a,b,c,e){if(d.isArray(b)&&b.length)d.each(b,function(b,f){c||bs.test(a)?e(a,f):bQ(a+"["+(typeof f==="object"||d.isArray(f)?b:"")+"]",f,c,e)});else if(c||b==null||typeof b!=="object")e(a,b);else if(d.isArray(b)||d.isEmptyObject(b))e(a,"");else for(var f in b)bQ(a+"["+f+"]",b[f],c,e)}function bP(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bJ,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bP(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bP(a,c,d,e,"*",g));return l}function bO(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bD),f=0,g=e.length,h,i,j;for(;f<g;f++)h=e[f],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bq(a,b,c){var e=b==="width"?bk:bl,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function bc(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bb(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function ba(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function _(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)d.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function $(a,b){return d.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Q(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return d.grep(a,function(a,d){return a===b===c});if(typeof b==="string"){var e=d.grep(a,function(a){return a.nodeType===1});if(L.test(b))return d.filter(b,e,!c);b=d.filter(b,e)}return d.grep(a,function(a,e){return d.inArray(a,b)>=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i<t.length;i++)g=t[i],g.origType.replace(r,"")===a.type?q.push(g.selector):t.splice(i--,1);f=d(a.target).closest(q,a.currentTarget);for(j=0,k=f.length;j<k;j++){m=f[j];for(i=0;i<t.length;i++){g=t[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,e=d(a.relatedTarget).closest(g.selector)[0];(!e||e!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){f=p[j];if(c&&f.level>c)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){e=i[c],f=a[c];if(i===f)continue;l&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,h=e&&d.isArray(e)?e:[]):h=e&&d.isPlainObject(e)?e:{},i[c]=d.extend(l,h,f)):f!==b&&(i[c]=f)}return i},d.extend({noConflict:function(b){a.$=f,b&&(a.jQuery=e);return d},isReady:!1,readyWait:1,ready:function(a){a===!0&&d.readyWait--;if(!d.readyWait||a!==!0&&!d.isReady){if(!c.body)return setTimeout(d.ready,1);d.isReady=!0;if(a!==!0&&--d.readyWait>0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g<h;)if(c.apply(a[g++],e)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(var j=a[0];g<h&&c.call(j,g,j)!==!1;j=a[++g]){}return a},trim:D?function(a){return a==null?"":D.call(a)}:function(a){return a==null?"":(a+"").replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var e=d.type(a);a.length==null||e==="string"||e==="function"||e==="regexp"||d.isWindow(a)?B.call(c,a):d.merge(c,a)}return c},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length==="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,b,c){var d=[],e;for(var f=0,g=a.length;f<g;f++)e=b(a[f],f,c),e!=null&&(d[d.length]=e);return d.concat.apply([],d)},guid:1,proxy:function(a,c,e){arguments.length===2&&(typeof c==="string"?(e=a,a=e[c],c=b):c&&!d.isFunction(c)&&(e=c,c=b)),!c&&a&&(c=function(){return a.apply(e||this,arguments)}),a&&(c.guid=a.guid=a.guid||c.guid||d.guid++);return c},access:function(a,c,e,f,g,h){var i=a.length;if(typeof c==="object"){for(var j in c)d.access(a,j,c[j],f,g,e);return a}if(e!==b){f=!h&&f&&d.isFunction(e);for(var k=0;k<i;k++)g(a[k],c,f?e.call(a[k],k,g(a[k],c)):e,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.subclass=this.subclass,a.fn.init=function b(b,c){c&&c instanceof d&&!(c instanceof a)&&(c=a(c));return d.fn.init.call(this,b,c,e)},a.fn.init.prototype=a.fn;var e=a(c);return a},browser:{}}),d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){F["[object "+b+"]"]=b.toLowerCase()}),w=d.uaMatch(v),w.browser&&(d.browser[w.browser]=!0,d.browser.version=w.version),d.browser.webkit&&(d.browser.safari=!0),E&&(d.inArray=function(a,b){return E.call(b,a)}),i.test(" ")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/),g=d(c),c.addEventListener?y=function(){c.removeEventListener("DOMContentLoaded",y,!1),d.ready()}:c.attachEvent&&(y=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",y),d.ready())});return d}(),e="then done fail isResolved isRejected promise".split(" "),f=[].slice;d.extend({_Deferred:function(){var a=[],b,c,e,f={done:function(){if(!e){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=d.type(i),j==="array"?f.done.apply(f,i):j==="function"&&a.push(i);k&&f.resolveWith(k[0],k[1])}return this},resolveWith:function(d,f){if(!e&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(d,f)}finally{b=[d,f],c=0}}return this},resolve:function(){f.resolveWith(this,arguments);return this},isResolved:function(){return c||b},cancel:function(){e=1,a=[];return this}};return f},Deferred:function(a){var b=d._Deferred(),c=d._Deferred(),f;d.extend(b,{then:function(a,c){b.done(a).fail(c);return this},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,promise:function(a){if(a==null){if(f)return f;f=a={}}var c=e.length;while(c--)a[e[c]]=b[e[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c<e;c++)b[c]&&d.isFunction(b[c].promise)?b[c].promise().then(i(c),h.reject):--g;g||h.resolveWith(h,b)}else h!==a&&h.resolveWith(h,e?[a]:[]);return h.promise()}}),function(){d.support={};var b=c.createElement("div");b.style.display="none",b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i<j;i++)g=f[i].name,g.indexOf("data-")===0&&(g=g.substr(5),h(this[0],g,e[g]))}}return e}if(typeof a==="object")return this.each(function(){d.data(this,a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(c===b){e=this.triggerHandler("getData"+k[1]+"!",[k[0]]),e===b&&this.length&&(e=d.data(this[0],a),e=h(this[0],a,e));return e===b&&k[1]?this.data(k[0]):e}return this.each(function(){var b=d(this),e=[k[0],c];b.triggerHandler("setData"+k[1]+"!",e),d.data(this,a,c),b.triggerHandler("changeData"+k[1]+"!",e)})},removeData:function(a){return this.each(function(){d.removeData(this,a)})}}),d.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var e=d._data(a,b);if(!c)return e||[];!e||d.isArray(c)?e=d._data(a,b,d.makeArray(c)):e.push(c);return e}},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.shift();e==="inprogress"&&(e=c.shift()),e&&(b==="fx"&&c.unshift("inprogress"),e.call(a,function(){d.dequeue(a,b)})),c.length||d.removeData(a,b+"queue",!0)}}),d.fn.extend({queue:function(a,c){typeof a!=="string"&&(c=a,a="fx");if(c===b)return d.queue(this[0],a);return this.each(function(b){var e=d.queue(this,a,c);a==="fx"&&e[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,b){a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){d.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var j=/[\n\t\r]/g,k=/\s+/,l=/\r/g,m=/^(?:href|src|style)$/,n=/^(?:button|input)$/i,o=/^(?:button|input|object|select|textarea)$/i,p=/^a(?:rea)?$/i,q=/^(?:radio|checkbox)$/i;d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},d.fn.extend({attr:function(a,b){return d.access(this,a,b,!0,d.attr)},removeAttr:function(a,b){return this.each(function(){d.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"){var b=(a||"").split(k);for(var c=0,e=this.length;c<e;c++){var f=this[c];if(f.nodeType===1)if(f.className){var g=" "+f.className+" ",h=f.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);f.className=d.trim(h)}else f.className=a}}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a==="string"||a===b){var c=(a||"").split(k);for(var e=0,f=this.length;e<f;e++){var g=this[e];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(j," ");for(var i=0,l=c.length;i<l;i++)h=h.replace(" "+c[i]+" "," ");g.className=d.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,e=typeof b==="boolean";if(d.isFunction(a))return this.each(function(c){var e=d(this);e.toggleClass(a.call(this,c,e.attr("class"),b),b)});return this.each(function(){if(c==="string"){var f,g=0,h=d(this),i=b,j=a.split(k);while(f=j[g++])i=e?i:!h.hasClass(f),h[i?"addClass":"removeClass"](f)}else if(c==="undefined"||c==="boolean")this.className&&d._data(this,"__className__",this.className),this.className=this.className||a===!1?"":d._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(j," ").indexOf(b)>-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j<k;j++){var m=h[j];if(m.selected&&(d.support.optDisabled?!m.disabled:m.getAttribute("disabled")===null)&&(!m.parentNode.disabled||!d.nodeName(m.parentNode,"optgroup"))){a=d(m).val();if(i)return a;g.push(a)}}if(i&&!g.length&&h.length)return d(h[f]).val();return g}if(q.test(c.type)&&!d.support.checkOn)return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(l,"")}return b}var n=d.isFunction(a);return this.each(function(b){var c=d(this),e=a;if(this.nodeType===1){n&&(e=a.call(this,b,c.val())),e==null?e="":typeof e==="number"?e+="":d.isArray(e)&&(e=d.map(e,function(a){return a==null?"":a+""}));if(d.isArray(e)&&q.test(this.type))this.checked=d.inArray(c.val(),e)>=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))d.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=d.event.special[h]||{};for(j=f||0;j<p.length;j++){q=p[j];if(e.guid===q.guid){if(l||n.test(q.namespace))f==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(f!=null)break}}if(p.length===0||f!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&d.removeEvent(a,h,s.handle),g=null,delete t[h]}if(d.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,d.isEmptyObject(s)&&d.removeData(a,b,!0)}}},trigger:function(a,c,e){var f=a.type||a,g=arguments[3];if(!g){a=typeof a==="object"?a[d.expando]?a:d.extend(d.Event(f),a):d.Event(f),f.indexOf("!")>=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l<m;l++){var n=f[l];if(e||h.test(n.namespace)){c.handler=n.handler,c.data=n.data,c.handleObj=n;var o=n.handler.apply(this,k);o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}}return c.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(a){if(a[d.expando])return a;var e=a;a=d.Event(e);for(var f=this.props.length,g;f;)g=this.props[--f],a[g]=e[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=c.documentElement,i=c.body;a.pageX=a.clientX+(h&&h.scrollLeft||i&&i.scrollLeft||0)-(h&&h.clientLeft||i&&i.clientLeft||0),a.pageY=a.clientY+(h&&h.scrollTop||i&&i.scrollTop||0)-(h&&h.clientTop||i&&i.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a){d.event.add(this,H(a.origType,a.selector),d.extend({},a,{handler:G,guid:a.handler.guid}))},remove:function(a){d.event.remove(this,H(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){d.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},d.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},d.Event=function(a){if(!this.preventDefault)return new d.Event(a);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?y:x):this.type=a,this.timeStamp=d.now(),this[d.expando]=!0},d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var a=this.originalEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=y;var a=this.originalEvent;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y,this.stopPropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var z=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,d.event.handle.apply(this,arguments))}catch(e){}},A=function(a){a.type=a.data,d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){d.event.special[a]={setup:function(c){d.event.add(this,b,c&&c.selector?A:z,a)},teardown:function(a){d.event.remove(this,b,a&&a.selector?A:z)}}}),d.support.submitBubbles||(d.event.special.submit={setup:function(a,b){if(this.nodeName&&this.nodeName.toLowerCase()!=="form")d.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&d(b).closest("form").length&&E("submit",this,arguments)}),d.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&d(b).closest("form").length&&a.keyCode===13&&E("submit",this,arguments)});else return!1},teardown:function(a){d.event.remove(this,".specialSubmit")}});if(!d.support.changeBubbles){var B,C=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i<j;i++)d.event.add(this[i],a,h,e);return this}}),d.fn.extend({unbind:function(a,b){if(typeof a!=="object"||a.preventDefault)for(var e=0,f=this.length;e<f;e++)d.event.remove(this[e],a,b);else for(var c in a)this.unbind(c,a[c]);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=d.Event(a);c.preventDefault(),c.stopPropagation(),d.event.trigger(c,b,this[0]);return c.result}},toggle:function(a){var b=arguments,c=1;while(c<b.length)d.proxy(a,b[c++]);return this.click(d.proxy(a,function(e){var f=(d._data(this,"lastToggle"+a.guid)||0)%c;d._data(this,"lastToggle"+a.guid,f+1),e.preventDefault();return b[f].apply(this,arguments)||!1}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var F={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};d.each(["live","die"],function(a,c){d.fn[c]=function(a,e,f,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:d(this.context);if(typeof a==="object"&&!a.preventDefault){for(var o in a)n[c](o,e,a[o],m);return this}d.isFunction(e)&&(f=e,e=b),a=(a||"").split(" ");while((h=a[i++])!=null){j=r.exec(h),k="",j&&(k=j[0],h=h.replace(r,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,h==="focus"||h==="blur"?(a.push(F[h]+k),h=h+k):h=(F[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)d.event.add(n[p],"live."+H(h,m),{data:e,selector:m,handler:f,origType:h,origHandler:f,preType:l});else n.unbind("live."+H(h,m),f)}return this}}),d.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(a,b){d.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!=="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!=="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(f){if(f===!0)continue}else g=o=!0}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b==="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1){}a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=u;typeof b==="string"&&!j.test(b)&&(b=b.toLowerCase(),d=b,g=t),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!=="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};d.find=k,d.expr=k.selectors,d.expr[":"]=d.expr.filters,d.unique=k.uniqueSort,d.text=k.getText,d.isXMLDoc=k.isXML,d.contains=k.contains}();var I=/Until$/,J=/^(?:parents|prevUntil|prevAll)/,K=/,/,L=/^.[^:#\[\.,]*$/,M=Array.prototype.slice,N=d.expr.match.POS,O={children:!0,contents:!0,next:!0,prev:!0};d.fn.extend({find:function(a){var b=this.pushStack("","find",a),c=0;for(var e=0,f=this.length;e<f;e++){c=b.length,d.find(a,this[e],b);if(e>0)for(var g=c;g<b.length;g++)for(var h=0;h<c;h++)if(b[h]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=d(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(d.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(Q(this,a,!1),"not",a)},filter:function(a){return this.pushStack(Q(this,a,!0),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e<f;e++)i=a[e],j[i]||(j[i]=d.expr.match.POS.test(i)?d(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e<f;e++){g=this[e];while(g){if(l?l.index(g)>-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/<tbody/i,W=/<|&#?\w+;/,X=/<(?:script|object|embed|option|style)/i,Y=/checked\s*(?:[^=]|=\s*.checked.)/i,Z={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,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div<div>","</div>"]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1></$2>");try{for(var c=0,e=this.length;c<e;c++)this[c].nodeType===1&&(d.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(f){this.empty().append(a)}}return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(d.isFunction(a))return this.each(function(b){var c=d(this),e=c.html();c.replaceWith(a.call(this,b,e))});typeof a!=="string"&&(a=d(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;d(this).remove(),b?d(b).before(a):d(c).append(a)})}return this.length?this.pushStack(d(d.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,e){var f,g,h,i,j=a[0],k=[];if(!d.support.checkClone&&arguments.length===3&&typeof j==="string"&&Y.test(j))return this.each(function(){d(this).domManip(a,c,e,!0)});if(d.isFunction(j))return this.each(function(f){var g=d(this);a[0]=j.call(this,f,c?g.html():b),g.domManip(a,c,e)});if(this[0]){i=j&&j.parentNode,d.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?f={fragment:i}:f=d.buildFragment(a,this,k),h=f.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&d.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)e.call(c?$(this[l],g):this[l],f.cacheable||m>1&&l<n?d.clone(h,!0,!0):h)}k.length&&d.each(k,bc)}return this}}),d.buildFragment=function(a,b,e){var f,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]==="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!X.test(a[0])&&(d.support.checkClone||!Y.test(a[0]))&&(g=!0,h=d.fragments[a[0]],h&&(h!==1&&(f=h))),f||(f=i.createDocumentFragment(),d.clean(a,i,f,e)),g&&(d.fragments[a[0]]=h?f:1);return{fragment:f,cacheable:g}},d.fragments={},d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(c){var e=[],f=d(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&f.length===1){f[b](this[0]);return this}for(var h=0,i=f.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1></$2>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]==="<table>"&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("<div>").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in{success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)e=this[g],f=e.style.display,!d._data(e,"olddisplay")&&f==="none"&&(f=e.style.display=""),f===""&&d.css(e,"display")==="none"&&d._data(e,"olddisplay",cf(e.nodeName));for(g=0;g<h;g++){e=this[g],f=e.style.display;if(f===""||f==="none")e.style.display=d._data(e,"olddisplay")||""}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ce("hide",3),a,b,c);for(var e=0,f=this.length;e<f;e++){var g=d.css(this[e],"display");g!=="none"&&!d._data(this[e],"olddisplay")&&d._data(this[e],"olddisplay",g)}for(e=0;e<f;e++)this[e].style.display="none";return this},_toggle:d.fn.toggle,toggle:function(a,b,c){var e=typeof a==="boolean";d.isFunction(a)&&d.isFunction(b)?this._toggle.apply(this,arguments):a==null||e?this.each(function(){var b=e?a:d(this).is(":hidden");d(this)[b?"show":"hide"]()}):this.animate(ce("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.speed(b,c,e);if(d.isEmptyObject(a))return this.each(f.complete);return this[f.queue===!1?"each":"queue"](function(){var b=d.extend({},f),c,e=this.nodeType===1,g=e&&d(this).is(":hidden"),h=this;for(c in a){var i=d.camelCase(c);c!==i&&(a[i]=a[c],delete a[c],c=i);if(a[c]==="hide"&&g||a[c]==="show"&&!g)return b.complete.call(this);if(e&&(c==="height"||c==="width")){b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(d.css(this,"display")==="inline"&&d.css(this,"float")==="none")if(d.support.inlineBlockNeedsLayout){var j=cf(this.nodeName);j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else this.style.display="inline-block"}d.isArray(a[c])&&((b.specialEasing=b.specialEasing||{})[c]=a[c][1],a[c]=a[c][0])}b.overflow!=null&&(this.style.overflow="hidden"),b.curAnim=d.extend({},a),d.each(a,function(c,e){var f=new d.fx(h,b,c);if(ca.test(e))f[e==="toggle"?g?"show":"hide":e](a);else{var i=cb.exec(e),j=f.cur();if(i){var k=parseFloat(i[2]),l=i[3]||(d.cssNumber[c]?"":"px");l!=="px"&&(d.style(h,c,(k||1)+l),j=(k||1)/f.cur()*j,d.style(h,c,j+l)),i[1]&&(k=(i[1]==="-="?-1:1)*k+j),f.custom(j,k,l)}else f.custom(j,e,"")}});return!0})},stop:function(a,b){var c=d.timers;a&&this.queue([]),this.each(function(){for(var a=c.length-1;a>=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.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 a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||d.fx.stop()},interval:13,stop:function(){clearInterval(cc),cc=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),d.expr&&d.expr.filters&&(d.expr.filters.animated=function(a){return d.grep(d.timers,function(b){return a===b.elem}).length});var cg=/^t(?:able|d|h)$/i,ch=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?d.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!c||!d.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=f.body,i=ci(f),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||d.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||d.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:d.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){d.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return d.offset.bodyOffset(b);d.offset.initialize();var c,e=b.offsetParent,f=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(d.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===e&&(l+=b.offsetTop,m+=b.offsetLeft,d.offset.doesNotAddBorder&&(!d.offset.doesAddBorderForTableAndCells||!cg.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),f=e,e=b.offsetParent),d.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;d.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},d.offset={initialize:function(){var a=c.body,b=c.createElement("div"),e,f,g,h,i=parseFloat(d.css(a,"marginTop"))||0,j="<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>";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window);

/* k2.js */

var $K2=jQuery.noConflict();$K2(document).ready(function(){$K2('#comment-form').submit(function(event){event.preventDefault();$K2('#formLog').empty().addClass('formLogLoading');$K2.ajax({url:$K2('#comment-form').attr('action'),type:'post',dataType:'json',data:$K2('#comment-form').serialize(),success:function(response){$K2('#formLog').removeClass('formLogLoading').html(response.message);if(typeof(Recaptcha)!="undefined"){Recaptcha.reload();}
if(response.refresh){window.location.reload();}}});});$K2('.commentRemoveLink').click(function(event){event.preventDefault();var element=$K2(this);$K2(element).parent().addClass('commentToolbarLoading');$K2.ajax({url:$K2(element).attr('href'),type:'post',data:$K2('#comment-form input:last').serialize(),success:function(response){$K2(element).parent().removeClass('commentToolbarLoading');if(response=='true'){$K2(element).parent().parent().remove();}}});});$K2('.commentApproveLink').click(function(event){event.preventDefault();var element=$K2(this);$K2(element).parent().addClass('commentToolbarLoading');$K2.ajax({url:$K2(element).attr('href'),type:'post',data:$K2('#comment-form input:last').serialize(),success:function(response){$K2(element).parent().removeClass('commentToolbarLoading');if(response=='true'){$K2(element).parent().parent().removeClass('unpublishedComment');}}});});$K2('#k2ReportCommentForm').submit(function(event){event.preventDefault();$K2('#formLog').empty().addClass('formLogLoading');$K2.ajax({url:$K2('#k2ReportCommentForm').attr('action'),type:'post',data:$K2('#k2ReportCommentForm').serialize(),success:function(response){$K2('#formLog').removeClass('formLogLoading').html(response);if(typeof(Recaptcha)!="undefined"){Recaptcha.reload();}}});});$K2('#fontDecrease').click(function(event){event.preventDefault();$K2('.itemFullText').removeClass('largerFontSize');$K2('.itemFullText').addClass('smallerFontSize');});$K2('#fontIncrease').click(function(event){event.preventDefault();$K2('.itemFullText').removeClass('smallerFontSize');$K2('.itemFullText').addClass('largerFontSize');});$K2('.k2Anchor').click(function(event){event.preventDefault();var target=this.hash;$K2('html, body').stop().animate({scrollTop:$K2(target).offset().top},500);});$K2('.itemRatingForm a').click(function(event){event.preventDefault();var itemID=$K2(this).attr('rel');var log=$K2('#itemRatingLog'+itemID).empty().addClass('formLogLoading');var rating=$K2(this).html();$K2.ajax({url:K2SitePath+"index.php?option=com_k2&view=item&task=vote&format=raw&user_rating="+rating+"&itemID="+itemID,type:'get',success:function(response){log.removeClass('formLogLoading');log.html(response);$K2.ajax({url:K2SitePath+"index.php?option=com_k2&view=item&task=getVotesPercentage&format=raw&itemID="+itemID,type:'get',success:function(percentage){$K2('#itemCurrentRating'+itemID).css('width',percentage+"%");setTimeout(function(){$K2.ajax({url:K2SitePath+"index.php?option=com_k2&view=item&task=getVotesNum&format=raw&itemID="+itemID,type:'get',success:function(response){log.html(response);}});},2000);}});}});});$K2('.classicPopup').click(function(event){event.preventDefault();if($K2(this).attr('rel')){var json=$K2(this).attr('rel');json=json.replace(/'/g,'"');var options=$K2.parseJSON(json);}else{var options={x:900,y:600};}
window.open($K2(this).attr('href'),'K2PopUpWindow','width='+options.x+',height='+options.y+',menubar=yes,resizable=yes');});$K2('div.k2LiveSearchBlock form input[name=searchword]').keyup(function(event){var parentElement=$K2(this).parent().parent();if($K2(this).val().length>3&&event.key!='enter'){$K2(this).addClass('k2SearchLoading');parentElement.find('.k2LiveSearchResults').css('display','none').empty();parentElement.find('input[name=t]').val($K2.now());parentElement.find('input[name=format]').val('raw');var url='index.php?option=com_k2&view=itemlist&task=search&'+parentElement.find('form').serialize();parentElement.find('input[name=format]').val('html');$K2.ajax({url:url,type:'get',success:function(response){parentElement.find('.k2LiveSearchResults').html(response);parentElement.find('input[name=searchword]').removeClass('k2SearchLoading');parentElement.find('.k2LiveSearchResults').css('display','block');}});}else{parentElement.find('.k2LiveSearchResults').css('display','none').empty();}});$K2('a.calendarNavLink').live('click',function(event){event.preventDefault();var parentElement=$K2(this).parent().parent().parent().parent();var url=$K2(this).attr('href');parentElement.empty().addClass('k2CalendarLoader');$K2.ajax({url:url,type:'post',success:function(response){parentElement.html(response);parentElement.removeClass('k2CalendarLoader');}});});$K2('.k2Scroller').css('width',($K2('.k2Scroller').find('.k2ScrollerElement:first').outerWidth(true))*$K2('.k2Scroller').children('.k2ScrollerElement').length);});$K2(window).load(function(){var blocks=$K2('.subCategory, .k2EqualHeights');var maxHeight=0;blocks.each(function(){maxHeight=Math.max(maxHeight,parseInt($K2(this).css('height')));});blocks.css('height',maxHeight);});

/* caption.js */

var JCaption=new Class({initialize:function(selector)
{this.selector=selector;var images=$$(selector);images.each(function(image){this.createCaption(image);},this);},createCaption:function(element)
{var caption=document.createTextNode(element.title);var container=document.createElement("div");var text=document.createElement("p");var width=element.getAttribute("width");var align=element.getAttribute("align");if(!width){width=element.width;}
if(!align)
align=element.getStyle("float");if(!align)
align=element.style.styleFloat;if(align==""){align="none";}
text.appendChild(caption);text.className=this.selector.replace('.','_');element.parentNode.insertBefore(container,element);container.appendChild(element);if(element.title!=""){container.appendChild(text);}
container.className=this.selector.replace('.','_');container.className=container.className+" "+align;container.setAttribute("style","float:"+align);container.style.width=width+"px";}});document.caption=null;window.addEvent('load',function(){var caption=new JCaption('img.caption')
document.caption=caption});

/* cloudzoom.js */

var jvZoom=new Class({options:{},initialize:function(options){this.setOptions(options);this.container=$$('.jv_zoom_container')[this.options.id];this.zoom1=$ES('a.jv_zoom',this.container)[0];this.effectType=this.zoom1.getProperty('rel').split(":")[1];if(this.effectType!='default'&&this.effectType!='tint'&&this.effectType!='inner')this.effectType='default';this.sImg=$ES('img',this.zoom1)[0];this.img2=new Image();this.img2.src=this.zoom1.getProperty("href");this.destU=0;this.destV=0;this.currV=0;this.currU=0;this.init2();},init2:function(){this.mouseTrap=new Element('div',{'styles':{'z-index':'999','position':'absolute','left':0,'top':0,'background-image':'url(\".\")','height':this.sImg.offsetHeight,'width':this.sImg.offsetWidth},'class':'mouseTrap'});this.mouseTrap.injectAfter(this.zoom1);this.mouseTrap.addEvent('mousemove',function(event){this.mx=event.pageX||event.clientX+document.documentElement.scrollLeft;this.my=event.pageY||event.clientY+document.documentElement.scrollTop;}.bind(this));this.mouseTrap.addEvent('mouseleave',function(event){$clear(this.controlTimer);if($ES('div.jv_zoom_big',this.container)[0])$ES('div.jv_zoom_big',this.container)[0].remove();if($ES('div.jv_zoom_lens',this.container)[0])$ES('div.jv_zoom_lens',this.container)[0].remove();if($ES('div.jv_zoom_tint',this.container)[0])$ES('div.jv_zoom_tint',this.container)[0].remove();}.bind(this));this.mouseTrap.addEvent('mouseenter',function(event){this.mx=event.client.x+document.documentElement.scrollLeft;this.my=event.client.y+document.documentElement.scrollTop;var xPos=10;var yPos=-4;var siw=this.sImg.offsetWidth;var sih=this.sImg.offsetHeight;var w=siw;var h=sih;if(this.options.zoom_width!="auto"){siw=this.options.zoom_width.toInt();}
if(this.options.zoom_height!="auto"){sih=this.options.zoom_height;}
xPos+=siw;if(this.effectType=="inner"){xPos=-4;yPost=-4;}
this.zoomDiv=new Element('div',{'styles':{'z-index':'99','position':'absolute','left':xPos,'top':yPos,'background-image':'url('+this.img2.src+')','height':sih,'width':siw},'class':'jv_zoom_big'});if(this.sImg.getProperty("title")!=""){var contentHTML='<div style="display:block;position:absolute;z-index:99;height:'+sih+'px;width:'+siw+'px;"><div class="jv_zoom_title">'+this.sImg.getProperty("title")+'</div></div>';this.zoomDiv.setHTML(contentHTML);$ES('.jv_zoom_title',this.zoomDiv)[0].setStyle('opacity',0.5);}else{this.zoomDiv.setHTML('<div style="display:block;position:absolute;z-index:99;height:'+sih+'px;width:'+siw+'px;"></div>');}
this.zoomDiv.injectAfter(this.mouseTrap);this.zoomDiv.setStyle('display','');this.cw=((this.sImg.offsetWidth/this.img2.width)*this.zoomDiv.offsetWidth).toInt();this.ch=((this.sImg.offsetHeight/this.img2.height)*this.zoomDiv.offsetHeight).toInt();this.lens=new Element('div',{'styles':{'display':'none','z-index':'98','position':'absolute','cursor':'move','height':this.ch,'width':this.cw},'class':'jv_zoom_lens'});this.lens.setHTML('<div style="display:block;width:'+this.cw+'px;height:'+this.ch+'px;">&nbsp;</div>');this.lens.injectAfter(this.sImg);this.lens.setStyle('display','');this.mouseTrap.setStyle('cursor','move');if(this.effectType=='tint'){this.lens.setStyle('background','url("'+this.sImg.getProperty('src')+'")');this.tint=new Element('div',{'styles':{'display':'none','position':'absolute','left':'0px','cursor':'move','top':'0px','width':this.sImg.offsetWidth,'height':this.sImg.offsetHeight,'background-color':'#ff0000'},'class':'jv_zoom_tint'});this.tint.injectAfter(this.lens);this.tint.setStyle('display','');this.tint.setStyle('opacity',0.5);}else{this.lens.setStyle('opacity',0.5);}
this.controlLoop();this.controlTimer=this.controlLoop.periodical(30,this);}.bind(this));},controlLoop:function(){if(this.lens){var x=(this.mx-this.sImg.getLeft()-(this.cw*0.5))>>0;var y=(this.my-this.sImg.getTop()-(this.ch*0.5))>>0;if(x<0){x=0;}
else if(x>(this.sImg.offsetWidth-this.cw)){x=(this.sImg.offsetWidth-this.cw);}
if(y<0){y=0;}
else if(y>(this.sImg.offsetHeight-this.ch)){y=(this.sImg.offsetHeight-this.ch);}
this.lens.setStyles({left:x,top:y});this.lens.setStyle('background-position',(-x)+'px '+(-y)+'px');this.destU=(((x)/this.sImg.offsetWidth)*this.img2.width)>>0;this.destV=(((y)/this.sImg.offsetHeight)*this.img2.height)>>0;this.currU+=(this.destU-this.currU)/3;this.currV+=(this.destV-this.currV)/3;this.zoomDiv.setStyle('background-position',(-(this.currU>>0)+'px ')+(-(this.currV>>0)+'px'));}}});jvZoom.implement(new Events);jvZoom.implement(new Options);

/* warning.js */

function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null;}
function iewarning(str){if(readCookie('iewarning_off')=='yes')return false;imgPath=str;var _body=document.getElementsByTagName('body')[0];var _d=document.createElement('div');var _l=document.createElement('div');var _h=document.createElement('h1');var _p1=document.createElement('p');var _p2=document.createElement('p');var _ul=document.createElement('ul');var _li1=document.createElement('li');var _li2=document.createElement('li');var _li3=document.createElement('li');var _li4=document.createElement('li');var _li5=document.createElement('li');var _ico1=document.createElement('div');var _ico2=document.createElement('div');var _ico3=document.createElement('div');var _ico4=document.createElement('div');var _ico5=document.createElement('div');var _lit1=document.createElement('div');var _lit2=document.createElement('div');var _lit3=document.createElement('div');var _lit4=document.createElement('div');var _lit5=document.createElement('div');var _cont=document.createElement('div');_body.appendChild(_l);_body.appendChild(_d);_d.appendChild(_h);_d.appendChild(_p1);_d.appendChild(_p2);_d.appendChild(_ul);_d.appendChild(_cont);_ul.appendChild(_li1);_ul.appendChild(_li2);_ul.appendChild(_li3);_ul.appendChild(_li4);_ul.appendChild(_li5);_li1.appendChild(_ico1);_li2.appendChild(_ico2);_li3.appendChild(_ico3);_li4.appendChild(_ico4);_li5.appendChild(_ico5);_li1.appendChild(_lit1);_li2.appendChild(_lit2);_li3.appendChild(_lit3);_li4.appendChild(_lit4);_li5.appendChild(_lit5);_d.setAttribute('id','_d');_l.setAttribute('id','_l');_h.setAttribute('id','_h');_p1.setAttribute('id','_p1');_p2.setAttribute('id','_p2');_ul.setAttribute('id','_ul');_cont.setAttribute('id','_cont');_li1.setAttribute('id','_li1');_li2.setAttribute('id','_li2');_li3.setAttribute('id','_li3');_li4.setAttribute('id','_li4');_li5.setAttribute('id','_li5');_ico1.setAttribute('id','_ico1');_ico2.setAttribute('id','_ico2');_ico3.setAttribute('id','_ico3');_ico4.setAttribute('id','_ico4');_ico5.setAttribute('id','_ico5');_lit1.setAttribute('id','_lit1');_lit2.setAttribute('id','_lit2');_lit3.setAttribute('id','_lit3');_lit4.setAttribute('id','_lit4');_lit5.setAttribute('id','_lit5');var _width=document.documentElement.clientWidth;var _height=document.documentElement.clientHeight;var _dl=document.getElementById('_l');_dl.style.width=_width+"px";_dl.style.height=_height+"px";_dl.style.position="absolute";_dl.style.top="0px";_dl.style.left="0px";_dl.style.filter="alpha(opacity=50)";_dl.style.background="#fff";var _dd=document.getElementById('_d');_ddw=650;_ddh=260;_dd.style.width=_ddw+"px";_dd.style.height=_ddh+"px";_dd.style.position="absolute";_dd.style.top=((_height-_ddh)/2)+"px";_dd.style.left=((_width-_ddw)/2)+"px";_dd.style.padding="20px";_dd.style.background="#fff";_dd.style.border="1px solid #ccc";_dd.style.fontFamily="'Lucida Grande','Lucida Sans Unicode',Arial,Verdana,sans-serif";_dd.style.listStyleType="none";_dd.style.color="#4F4F4F";_dd.style.fontSize="12px";_h.appendChild(document.createTextNode(msg1));var _hd=document.getElementById('_h');_hd.style.display="block";_hd.style.fontSize="1.3em";_hd.style.marginBottom="0.5em";_hd.style.color="#333";_hd.style.fontFamily="Helvetica,Arial,sans-serif";_hd.style.fontWeight="bold";_p1.appendChild(document.createTextNode(msg2));var _p1d=document.getElementById('_p1');_p1d.style.marginBottom="1em";_p2.appendChild(document.createTextNode(msg3));var _p2d=document.getElementById('_p2');_p2d.style.marginBottom="1em";var _uld=document.getElementById('_ul');_uld.style.listStyleImage="none";_uld.style.listStylePosition="outside";_uld.style.listStyleType="none";_uld.style.margin="0 px auto";_uld.style.padding="0px";_uld.style.paddingLeft="10px";var _li1d=document.getElementById('_li1');var _li2d=document.getElementById('_li2');var _li3d=document.getElementById('_li3');var _li4d=document.getElementById('_li4');var _li5d=document.getElementById('_li5');var _li1ds=_li1d.style;var _li2ds=_li2d.style;var _li3ds=_li3d.style;var _li4ds=_li4d.style;var _li5ds=_li5d.style;_li1ds.background=_li2ds.background=_li3ds.background=_li4ds.background=_li5ds.background="transparent url('"+imgPath+"background_browser.gif') no-repeat scroll left top";_li1ds.cursor=_li2ds.cursor=_li3ds.cursor=_li4ds.cursor=_li5ds.cursor="pointer";_li1d.onclick=function(){window.location=url1};_li2d.onclick=function(){window.location=url2};_li3d.onclick=function(){window.location=url3};_li4d.onclick=function(){window.location=url4};_li5d.onclick=function(){window.location=url5};_li1ds.styleFloat=_li2ds.styleFloat=_li3ds.styleFloat=_li4ds.styleFloat=_li5ds.styleFloat="left";_li1ds.width=_li2ds.width=_li3ds.width=_li4ds.width=_li5ds.width="120px";_li1ds.height=_li2ds.height=_li3ds.height=_li4ds.height=_li5ds.height="122px";_li1ds.margin=_li2ds.margin=_li3ds.margin=_li4ds.margin=_li5ds.margin="0 10px 10px 0";var _ico1d=document.getElementById('_ico1');var _ico2d=document.getElementById('_ico2');var _ico3d=document.getElementById('_ico3');var _ico4d=document.getElementById('_ico4');var _ico5d=document.getElementById('_ico5');var _ico1ds=_ico1d.style;var _ico2ds=_ico2d.style;var _ico3ds=_ico3d.style;var _ico4ds=_ico4d.style;var _ico5ds=_ico5d.style;_ico1ds.width=_ico2ds.width=_ico3ds.width=_ico4ds.width=_ico5ds.width="100px";_ico1ds.height=_ico2ds.height=_ico3ds.height=_ico4ds.height=_ico5ds.height="100px";_ico1ds.margin=_ico2ds.margin=_ico3ds.margin=_ico4ds.margin=_ico5ds.margin="1px auto";_ico1ds.background="transparent url('"+imgPath+"browser_ie.gif') no-repeat scroll left top";_ico2ds.background="transparent url('"+imgPath+"browser_firefox.gif') no-repeat scroll left top";_ico3ds.background="transparent url('"+imgPath+"browser_safari.gif') no-repeat scroll left top";_ico4ds.background="transparent url('"+imgPath+"browser_opera.gif') no-repeat scroll left top";_ico5ds.background="transparent url('"+imgPath+"browser_chrome.gif') no-repeat scroll left top";_lit1.appendChild(document.createTextNode(br1));_lit2.appendChild(document.createTextNode(br2));_lit3.appendChild(document.createTextNode(br3));_lit4.appendChild(document.createTextNode(br4));_lit5.appendChild(document.createTextNode(br5));var _lit1d=document.getElementById('_lit1');var _lit2d=document.getElementById('_lit2');var _lit3d=document.getElementById('_lit3');var _lit4d=document.getElementById('_lit4');var _lit5d=document.getElementById('_lit5');var _lit1ds=_lit1d.style;var _lit2ds=_lit2d.style;var _lit3ds=_lit3d.style;var _lit4ds=_lit4d.style;var _lit5ds=_lit5d.style;_lit1ds.color=_lit2ds.color=_lit3ds.color=_lit4ds.color=_lit5ds.color="#808080";_lit1ds.fontSize=_lit2ds.fontSize=_lit3ds.fontSize=_lit4ds.fontSize=_lit5ds.fontSize="0.8em";_lit1ds.height=_lit2ds.height=_lit3ds.height=_lit4ds.height=_lit5ds.height="18px";_lit1ds.lineHeight=_lit2ds.lineHeight=_lit3ds.lineHeight=_lit4ds.lineHeight=_lit5ds.lineHeight="17px";_lit1ds.margin=_lit2ds.margin=_lit3ds.margin=_lit4ds.margin=_lit5ds.margin="1px auto";_lit1ds.width=_lit2ds.width=_lit3ds.width=_lit4ds.width=_lit5ds.width="118px";_lit1ds.textAlign=_lit2ds.textAlign=_lit3ds.textAlign=_lit4ds.textAlign=_lit5ds.textAlign="center";if(allowcontinue){var _dcont=document.getElementById('_cont');_dcont.innerHTML='<center><form method="post"><input style="border: 1px solid #C7C7C7" type="submit" name="iewarning_off" value="'+allowmsg+'" /></form></center>';}};

/* 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);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:{getContent:function(activityId){jax.call('community','activities,ajaxGetContent',activityId);},setContent:function(activityId,content){joms.jQuery("#profile-newsfeed-item-content-"+activityId).html(content);joms.jQuery("#profile-newsfeed-item-content-"+activityId).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
{jax.call('community','activities,ajaxAddText',joms.jQuery('#custom-text').val());}},more:function(){var exclusions=joms.jQuery('#activity-exclusions').val();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);},append:function(html){joms.jQuery("#activity-stream-container div.joms-newsfeed-item:last").css('border-bottom','1px dotted #333');joms.jQuery('#activity-more').remove();joms.jQuery('#activity-exclusions').remove();joms.jQuery('#activity-stream-container').append(html);}},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');}}},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]=='date'&&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'));jax.call('community','frontpage,ajaxGetActivities','all');}});joms.jQuery('.me-and-friends-activity').bind('click',function(){if(!joms.jQuery(this).hasClass('active-state')){loading(joms.jQuery(this).attr('class'));jax.call('community','frontpage,ajaxGetActivities','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,'warning');},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').attr('disabled',true);joms.jQuery('#wall-submit').attr('disabled',true);}
jax.doneLoadingFunction=function()
{joms.jQuery('#wall-message').attr('disabled',false);joms.jQuery('#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').remove();joms.jQuery('#wall-groupId').remove();joms.jQuery('#wall-discussionId').remove();joms.jQuery('#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:{windowTitle:'',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');}},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(obj).parents('.wallcmt').parent().children().index(cmtDiv);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();},show:function(id){var w=joms.jQuery('#'+id+' form').parent().width();joms.jQuery('#'+id+' .wall-coc-form-action.add').attr('disabled',false);joms.jQuery('#'+id+' form').width(w).show();joms.jQuery('#'+id+' .show-cmt').hide();var textarea=joms.jQuery('#'+id+' textarea');joms.utils.textAreaWidth(textarea);joms.utils.autogrow(textarea);textarea.blur(function(){if(joms.jQuery(this).val()=='')joms.comments.cancel(id);});}},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));});}},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];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);}});},undislike: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,ajaxUndislike',[data['element'],data['itemid']],{success:function(html)
{like.replaceWith(html);}});}},geolocation:{showNearByEvents:function(currentLocation){joms.jQuery('#community-event-nearby-listing').show();joms.jQuery('#showNearByEventsLoading').show();if(!currentLocation)
{if(navigator.geolocation)
{navigator.geolocation.getCurrentPosition(function(location)
{var newLocation=location.address.city+", "+location.address.country;joms.geolocation.setCookie('currentLocation',newLocation);joms.events.displayNearbyEvents(newLocation);});}
else
{joms.jQuery('#community-event-nearby-listing').hide();joms.jQuery('#showNearByEventsLoading').hide();}}
else
{joms.geolocation.setCookie('currentLocation',currentLocation);joms.events.displayNearbyEvents(currentLocation);}},validateNearByEventsForm:function(){var input=joms.jQuery('#userInputLocation').val();if(input)
{joms.geolocation.showNearByEvents(input);}},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 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.jQuery
joms.tooltip.setStyle();joms.tooltip.setup();joms.apps.initToggle();joms.plugins.initialize();});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(jQuery){joms.jQuery.fn.autogrow=function(options){this.filter('textarea').each(function(){var textarea=joms.jQuery(this);textarea.css('overflow','hidden');options.minHeight=options.minHeight||textarea.height();options.maxHeight=options.maxHeight||0;textarea.siblings('.textarea-shadow').remove();var shadow=joms.jQuery('<div class="textarea-shadow">').css({'position':'absolute','visibility':'hidden','font-size':(textarea[0].currentStyle==undefined)?textarea.css('font-size'):textarea[0].currentStyle.fontSize,'font-family':textarea.css('font-family'),'line-height':textarea.css('line-height'),'width':textarea.width()}).insertBefore(textarea);var timer;var update=function(){var times=function(string,number){var _res='';for(var i=0;i<number;i++){_res=_res+string;}
return _res;};var val=textarea[0].value.replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/&/g,'&amp;').replace(/\njQuery/,'<br/>&nbsp;').replace(/\n/g,'<br/>').replace(/ {2,}/g,function(space){return times('&nbsp;',space.length-1)+' '});shadow.html(val);var newHeight=Math.max(shadow.height()+20,options.minHeight);if(newHeight<options.maxHeight||options.maxHeight==0)
{textarea.css({'height':newHeight,'overflow':'hidden'});}else{textarea.css('overflow','auto');}
clearTimeout(timer);}
var checkExpand=function(){timer=setTimeout(update,100);}
textarea.change(checkExpand).keydown(checkExpand).keyup(checkExpand);update.apply(this);});return this;}})(joms.jQuery);(function(jQuery)
{jQuery.fn.qtip=function(options,blanket)
{var i,id,interfaces,opts,obj,command,config,api;if(typeof options=='string')
{if(typeof joms.jQuery(this).data('qtip')!=='object')
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);if(options=='api')
return joms.jQuery(this).data('qtip').interfaces[jQuery(this).data('qtip').current];else if(options=='interfaces')
return joms.jQuery(this).data('qtip').interfaces;}
else
{if(!options)options={};if(typeof options.content!=='object'||(options.content.jquery&&options.content.length>0))options.content={text:options.content};if(typeof options.content.title!=='object')options.content.title={text:options.content.title};if(typeof options.position!=='object')options.position={corner:options.position};if(typeof options.position.corner!=='object')options.position.corner={target:options.position.corner,tooltip:options.position.corner};if(typeof options.show!=='object')options.show={when:options.show};if(typeof options.show.when!=='object')options.show.when={event:options.show.when};if(typeof options.show.effect!=='object')options.show.effect={type:options.show.effect};if(typeof options.hide!=='object')options.hide={when:options.hide};if(typeof options.hide.when!=='object')options.hide.when={event:options.hide.when};if(typeof options.hide.effect!=='object')options.hide.effect={type:options.hide.effect};if(typeof options.style!=='object')options.style={name:options.style};options.style=sanitizeStyle(options.style);opts=jQuery.extend(true,{},jQuery.fn.qtip.defaults,options);opts.style=buildStyle.call({options:opts},opts.style);opts.user=jQuery.extend(true,{},options);};return joms.jQuery(this).each(function()
{if(typeof options=='string')
{command=options.toLowerCase();interfaces=jQuery(this).qtip('interfaces');if(typeof interfaces=='object')
{if(blanket===true&&command=='destroy')
while(interfaces.length>0)interfaces[interfaces.length-1].destroy();else
{if(blanket!==true)interfaces=[jQuery(this).qtip('api')];for(i=0;i<interfaces.length;i++)
{if(command=='destroy')interfaces[i].destroy();else if(interfaces[i].status.rendered===true)
{if(command=='show')interfaces[i].show();else if(command=='hide')interfaces[i].hide();else if(command=='focus')interfaces[i].focus();else if(command=='disable')interfaces[i].disable(true);else if(command=='enable')interfaces[i].disable(false);};};};};}
else
{config=jQuery.extend(true,{},opts);config.hide.effect.length=opts.hide.effect.length;config.show.effect.length=opts.show.effect.length;if(config.position.container===false)config.position.container=jQuery(document.body);if(config.position.target===false)config.position.target=jQuery(this);if(config.show.when.target===false)config.show.when.target=jQuery(this);if(config.hide.when.target===false)config.hide.when.target=jQuery(this);id=jQuery.fn.qtip.interfaces.length;for(i=0;i<id;i++)
{if(typeof joms.jQuery.fn.qtip.interfaces[i]=='undefined'){id=i;break;};};obj=new qTip(jQuery(this),config,id);jQuery.fn.qtip.interfaces[id]=obj;if(jQuery(this).data('qtip')!==null&&typeof jQuery(this).data('qtip')=='object')
{if(typeof joms.jQuery(this).attr('qtip')==='undefined')
jQuery(this).data('qtip').current=jQuery(this).data('qtip').interfaces.length;jQuery(this).data('qtip').interfaces.push(obj);}
else joms.jQuery(this).data('qtip',{current:0,interfaces:[obj]});if(config.content.prerender===false&&config.show.when.event!==false&&config.show.ready!==true)
{config.show.when.target.bind(config.show.when.event+'.qtip-'+id+'-create',{qtip:id},function(event)
{api=jQuery.fn.qtip.interfaces[event.data.qtip];api.options.show.when.target.unbind(api.options.show.when.event+'.qtip-'+event.data.qtip+'-create');api.cache.mouse={x:event.pageX,y:event.pageY};construct.call(api);api.options.show.when.target.trigger(api.options.show.when.event);});}
else
{obj.cache.mouse={x:config.show.when.target.offset().left,y:config.show.when.target.offset().top};construct.call(obj);}};});};function qTip(target,options,id)
{var self=this;self.id=id;self.options=options;self.status={animated:false,rendered:false,disabled:false,focused:false};self.elements={target:target.addClass(self.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};self.cache={mouse:{},position:{},toggle:0};self.timers={};jQuery.extend(self,self.options.api,{show:function(event)
{var returned,solo;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'show');if(self.elements.tooltip.css('display')!=='none')return self;self.elements.tooltip.stop(true,false);returned=self.beforeShow.call(self,event);if(returned===false)return self;function afterShow()
{if(self.options.position.type!=='static')self.focus();self.onShow.call(self,event);if(jQuery.browser.msie)self.elements.tooltip.get(0).style.removeAttribute('filter');};self.cache.toggle=1;if(self.options.position.type!=='static')
self.updatePosition(event,(self.options.show.effect.length>0));if(typeof self.options.show.solo=='object')solo=jQuery(self.options.show.solo);else if(self.options.show.solo===true)solo=jQuery('div.qtip').not(self.elements.tooltip);if(solo)solo.each(function(){if(jQuery(this).qtip('api').status.rendered===true)jQuery(this).qtip('api').hide();});if(typeof self.options.show.effect.type=='function')
{self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);self.elements.tooltip.queue(function(){afterShow();jQuery(this).dequeue();});}
else
{switch(self.options.show.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);break;case'slide':self.elements.tooltip.slideDown(self.options.show.effect.length,function()
{afterShow();if(self.options.position.type!=='static')self.updatePosition(event,true);});break;case'grow':self.elements.tooltip.show(self.options.show.effect.length,afterShow);break;default:self.elements.tooltip.show(null,afterShow);break;};self.elements.tooltip.addClass(self.options.style.classes.active);};return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_SHOWN,'show');},hide:function(event)
{var returned;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'hide');else if(self.elements.tooltip.css('display')==='none')return self;clearTimeout(self.timers.show);self.elements.tooltip.stop(true,false);returned=self.beforeHide.call(self,event);if(returned===false)return self;function afterHide(){self.onHide.call(self,event);};self.cache.toggle=0;if(typeof self.options.hide.effect.type=='function')
{self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);self.elements.tooltip.queue(function(){afterHide();jQuery(this).dequeue();});}
else
{switch(self.options.hide.effect.type.toLowerCase())
{case'fade':self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);break;case'slide':self.elements.tooltip.slideUp(self.options.hide.effect.length,afterHide);break;case'grow':self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);break;default:self.elements.tooltip.hide(null,afterHide);break;};self.elements.tooltip.removeClass(self.options.style.classes.active);};return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_HIDDEN,'hide');},updatePosition:function(event,animate)
{var i,target,tooltip,coords,mapName,imagePos,newPosition,ieAdjust,ie6Adjust,borderAdjust,mouseAdjust,offset,curPosition,returned
if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updatePosition');else if(self.options.position.type=='static')
return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.CANNOT_POSITION_STATIC,'updatePosition');target={position:{left:0,top:0},dimensions:{height:0,width:0},corner:self.options.position.corner.target};tooltip={position:self.getPosition(),dimensions:self.getDimensions(),corner:self.options.position.corner.tooltip};if(self.options.position.target!=='mouse')
{if(self.options.position.target.get(0).nodeName.toLowerCase()=='area')
{coords=self.options.position.target.attr('coords').split(',');for(i=0;i<coords.length;i++)coords[i]=parseInt(coords[i]);mapName=self.options.position.target.parent('map').attr('name');imagePos=jQuery('img[usemap="#'+mapName+'"]:first').offset();target.position={left:Math.floor(imagePos.left+coords[0]),top:Math.floor(imagePos.top+coords[1])};switch(self.options.position.target.attr('shape').toLowerCase())
{case'rect':target.dimensions={width:Math.ceil(Math.abs(coords[2]-coords[0])),height:Math.ceil(Math.abs(coords[3]-coords[1]))};break;case'circle':target.dimensions={width:coords[2]+1,height:coords[2]+1};break;case'poly':target.dimensions={width:coords[0],height:coords[1]};for(i=0;i<coords.length;i++)
{if(i%2==0)
{if(coords[i]>target.dimensions.width)
target.dimensions.width=coords[i];if(coords[i]<coords[0])
target.position.left=Math.floor(imagePos.left+coords[i]);}
else
{if(coords[i]>target.dimensions.height)
target.dimensions.height=coords[i];if(coords[i]<coords[1])
target.position.top=Math.floor(imagePos.top+coords[i]);};};target.dimensions.width=target.dimensions.width-(target.position.left-imagePos.left);target.dimensions.height=target.dimensions.height-(target.position.top-imagePos.top);break;default:return joms.jQuery.fn.qtip.log.error.call(self,4,jQuery.fn.qtip.constants.INVALID_AREA_SHAPE,'updatePosition');break;};target.dimensions.width-=2;target.dimensions.height-=2;}
else if(self.options.position.target.add(document.body).length===1)
{target.position={left:jQuery(document).scrollLeft(),top:jQuery(document).scrollTop()};target.dimensions={height:jQuery(window).height(),width:jQuery(window).width()};}
else
{if(typeof self.options.position.target.attr('qtip')!=='undefined')
target.position=self.options.position.target.qtip('api').cache.position;else
target.position=self.options.position.target.offset();target.dimensions={height:self.options.position.target.outerHeight(),width:self.options.position.target.outerWidth()};};newPosition=jQuery.extend({},target.position);if(target.corner.search(/right/i)!==-1)
newPosition.left+=target.dimensions.width;if(target.corner.search(/bottom/i)!==-1)
newPosition.top+=target.dimensions.height;if(target.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left+=(target.dimensions.width/2);if(target.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top+=(target.dimensions.height/2);}
else
{target.position=newPosition={left:self.cache.mouse.x,top:self.cache.mouse.y};target.dimensions={height:1,width:1};};if(tooltip.corner.search(/right/i)!==-1)
newPosition.left-=tooltip.dimensions.width;if(tooltip.corner.search(/bottom/i)!==-1)
newPosition.top-=tooltip.dimensions.height;if(tooltip.corner.search(/((top|bottom)Middle)|center/)!==-1)
newPosition.left-=(tooltip.dimensions.width/2);if(tooltip.corner.search(/((left|right)Middle)|center/)!==-1)
newPosition.top-=(tooltip.dimensions.height/2);ieAdjust=(jQuery.browser.msie)?1:0;ie6Adjust=(jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))===6)?1:0;if(self.options.style.border.radius>0)
{if(tooltip.corner.search(/Left/)!==-1)
newPosition.left-=self.options.style.border.radius;else if(tooltip.corner.search(/Right/)!==-1)
newPosition.left+=self.options.style.border.radius;if(tooltip.corner.search(/Top/)!==-1)
newPosition.top-=self.options.style.border.radius;else if(tooltip.corner.search(/Bottom/)!==-1)
newPosition.top+=self.options.style.border.radius;};if(ieAdjust)
{if(tooltip.corner.search(/top/)!==-1)
newPosition.top-=ieAdjust
else if(tooltip.corner.search(/bottom/)!==-1)
newPosition.top+=ieAdjust
if(tooltip.corner.search(/left/)!==-1)
newPosition.left-=ieAdjust
else if(tooltip.corner.search(/right/)!==-1)
newPosition.left+=ieAdjust
if(tooltip.corner.search(/leftMiddle|rightMiddle/)!==-1)
newPosition.top-=1};if(self.options.position.adjust.screen===true)
newPosition=screenAdjust.call(self,newPosition,target,tooltip);if(self.options.position.target==='mouse'&&self.options.position.adjust.mouse===true)
{if(self.options.position.adjust.screen===true&&self.elements.tip)
mouseAdjust=self.elements.tip.attr('rel');else
mouseAdjust=self.options.position.corner.tooltip;newPosition.left+=(mouseAdjust.search(/right/i)!==-1)?-6:6;newPosition.top+=(mouseAdjust.search(/bottom/i)!==-1)?-6:6;}
if(!self.elements.bgiframe&&jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))==6)
{jQuery('select, object').each(function()
{offset=jQuery(this).offset();offset.bottom=offset.top+jQuery(this).height();offset.right=offset.left+jQuery(this).width();if(newPosition.top+tooltip.dimensions.height>=offset.top&&newPosition.left+tooltip.dimensions.width>=offset.left)
bgiframe.call(self);});};newPosition.left+=self.options.position.adjust.x;newPosition.top+=self.options.position.adjust.y;curPosition=self.getPosition();if(newPosition.left!=curPosition.left||newPosition.top!=curPosition.top)
{returned=self.beforePositionUpdate.call(self,event);if(returned===false)return self;self.cache.position=newPosition;if(animate===true)
{self.status.animated=true;self.elements.tooltip.animate(newPosition,200,'swing',function(){self.status.animated=false});}
else self.elements.tooltip.css(newPosition);self.onPositionUpdate.call(self,event);if(typeof event!=='undefined'&&event.type&&event.type!=='mousemove')
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_POSITION_UPDATED,'updatePosition');};return self;},updateWidth:function(newWidth)
{var hidden;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateWidth');else if(newWidth&&typeof newWidth!=='number')
return joms.jQuery.fn.qtip.log.error.call(self,2,'newWidth must be of type number','updateWidth');hidden=self.elements.contentWrapper.siblings().add(self.elements.tip).add(self.elements.button);if(!newWidth)
{if(typeof self.options.style.width.value=='number')
newWidth=self.options.style.width.value;else
{self.elements.tooltip.css({width:'auto'});hidden.hide();if(jQuery.browser.msie)
self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'normal'});newWidth=self.getDimensions().width+1;if(!self.options.style.width.value)
{if(newWidth>self.options.style.width.max)newWidth=self.options.style.width.max
if(newWidth<self.options.style.width.min)newWidth=self.options.style.width.min};};};if(newWidth%2!==0)newWidth-=1;self.elements.tooltip.width(newWidth);hidden.show();if(self.options.style.border.radius)
{self.elements.tooltip.find('.qtip-betweenCorners').each(function(i)
{jQuery(this).width(newWidth-(self.options.style.border.radius*2));})};if(jQuery.browser.msie)
{self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'1'});self.elements.wrapper.width(newWidth);if(self.elements.bgiframe)self.elements.bgiframe.width(newWidth).height(self.getDimensions.height);};return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_WIDTH_UPDATED,'updateWidth');},updateStyle:function(name)
{var tip,borders,context,corner,coordinates;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateStyle');else if(typeof name!=='string'||!jQuery.fn.qtip.styles[name])
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.STYLE_NOT_DEFINED,'updateStyle');self.options.style=buildStyle.call(self,jQuery.fn.qtip.styles[name],self.options.user.style);self.elements.content.css(jQueryStyle(self.options.style));if(self.options.content.title.text!==false)
self.elements.title.css(jQueryStyle(self.options.style.title,true));self.elements.contentWrapper.css({borderColor:self.options.style.border.color});if(self.options.style.tip.corner!==false)
{if(jQuery('<canvas>').get(0).getContext)
{tip=self.elements.tooltip.find('.qtip-tip canvas:first');context=tip.get(0).getContext('2d');context.clearRect(0,0,300,300);corner=tip.parent('div[rel]:first').attr('rel');coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);drawTip.call(self,tip,coordinates,self.options.style.tip.color||self.options.style.border.color);}
else if(jQuery.browser.msie)
{tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color);};};if(self.options.style.border.radius>0)
{self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color});if(jQuery('<canvas>').get(0).getContext)
{borders=calculateBorders(self.options.style.border.radius)
self.elements.tooltip.find('.qtip-wrapper canvas').each(function()
{context=jQuery(this).get(0).getContext('2d');context.clearRect(0,0,300,300);corner=jQuery(this).parent('div[rel]:first').attr('rel')
drawBorder.call(self,jQuery(this),borders[corner],self.options.style.border.radius,self.options.style.border.color);});}
else if(jQuery.browser.msie)
{self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function()
{jQuery(this).attr('fillcolor',self.options.style.border.color)});};};return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_STYLE_UPDATED,'updateStyle');},updateContent:function(content,reposition)
{var parsedContent,images,loadedImages;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateContent');else if(!content)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateContent');parsedContent=self.beforeContentUpdate.call(self,content);if(typeof parsedContent=='string')content=parsedContent;else if(parsedContent===false)return;if(jQuery.browser.msie)self.elements.contentWrapper.children().css({zoom:'normal'});if(content.jquery&&content.length>0)
content.clone(true).appendTo(self.elements.content).show();else self.elements.content.html(content);images=self.elements.content.find('img[complete=false]');if(images.length>0)
{loadedImages=0;images.each(function(i)
{jQuery('<img src="'+jQuery(this).attr('src')+'" />').load(function(){if(++loadedImages==images.length)afterLoad();});});}
else afterLoad();function afterLoad()
{self.updateWidth();if(reposition!==false)
{if(self.options.position.type!=='static')
self.updatePosition(self.elements.tooltip.is(':visible'),true);if(self.options.style.tip.corner!==false)
positionTip.call(self);};};self.onContentUpdate.call(self);return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_CONTENT_UPDATED,'loadContent');},loadContent:function(url,data,method)
{var returned;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'loadContent');returned=self.beforeContentLoad.call(self);if(returned===false)return self;if(method=='post')
jQuery.post(url,data,setupContent);else
jQuery.get(url,data,setupContent);function setupContent(content)
{self.onContentLoad.call(self);jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_CONTENT_LOADED,'loadContent');self.updateContent(content);};return self;},updateTitle:function(content)
{if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateTitle');else if(!content)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateTitle');returned=self.beforeTitleUpdate.call(self);if(returned===false)return self;if(self.elements.button)self.elements.button=self.elements.button.clone(true);self.elements.title.html(content)
if(self.elements.button)self.elements.title.prepend(self.elements.button);self.onTitleUpdate.call(self);return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_TITLE_UPDATED,'updateTitle');},focus:function(event)
{var curIndex,newIndex,elemIndex,returned;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'focus');else if(self.options.position.type=='static')
return joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.CANNOT_FOCUS_STATIC,'focus');curIndex=parseInt(self.elements.tooltip.css('z-index'));newIndex=2147483647+jQuery('div.qtip[qtip]').length-1;if(!self.status.focused&&curIndex!==newIndex)
{returned=self.beforeFocus.call(self,event);if(returned===false)return self;jQuery('div.qtip[qtip]').not(self.elements.tooltip).each(function()
{if(jQuery(this).qtip('api').status.rendered===true)
{elemIndex=parseInt(jQuery(this).css('z-index'));if(typeof elemIndex=='number'&&elemIndex>-1)
jQuery(this).css({zIndex:parseInt(jQuery(this).css('z-index'))-1});jQuery(this).qtip('api').status.focused=false;}})
self.elements.tooltip.css({zIndex:newIndex});self.status.focused=true;self.onFocus.call(self,event);jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_FOCUSED,'focus');};return self;},disable:function(state)
{if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'disable');if(state)
{if(!self.status.disabled)
{self.status.disabled=true;jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_DISABLED,'disable');}
else joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,'disable');}
else
{if(self.status.disabled)
{self.status.disabled=false;jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_ENABLED,'disable');}
else joms.jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,'disable');};return self;},destroy:function()
{var i,returned,interfaces;returned=self.beforeDestroy.call(self);if(returned===false)return self;if(self.status.rendered)
{self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);self.options.show.when.target.unbind('mouseout.qtip',self.hide);self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');self.elements.tooltip.unbind('mouseover.qtip',self.focus);self.elements.tooltip.remove();}
else self.options.show.when.target.unbind(self.options.show.when.event+'.qtip-create');if(typeof self.elements.target.data('qtip')=='object')
{interfaces=self.elements.target.data('qtip').interfaces;if(typeof interfaces=='object'&&interfaces.length>0)
{for(i=0;i<interfaces.length-1;i++)
if(interfaces[i].id==self.id)interfaces.splice(i,1)}}
delete joms.jQuery.fn.qtip.interfaces[self.id];if(typeof interfaces=='object'&&interfaces.length>0)
self.elements.target.data('qtip').current=interfaces.length-1;else
self.elements.target.removeData('qtip');self.onDestroy.call(self);jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_DESTROYED,'destroy');return self.elements.target},getPosition:function()
{var show,offset;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getPosition');show=(self.elements.tooltip.css('display')!=='none')?false:true;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();offset=self.elements.tooltip.offset();if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return offset;},getDimensions:function()
{var show,dimensions;if(!self.status.rendered)
return joms.jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getDimensions');show=(!self.elements.tooltip.is(':visible'))?true:false;if(show)self.elements.tooltip.css({visiblity:'hidden'}).show();dimensions={height:self.elements.tooltip.outerHeight(),width:self.elements.tooltip.outerWidth()};if(show)self.elements.tooltip.css({visiblity:'visible'}).hide();return dimensions;}});};function construct()
{var self,adjust,content,url,data,method,tempLength;self=this;self.beforeRender.call(self);self.status.rendered=true;self.elements.tooltip='<div qtip="'+self.id+'" '+'class="qtip '+(self.options.style.classes.tooltip||self.options.style)+'"'+'style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;'+'position:'+self.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 '+self.options.style.classes.content+'"></div>'+'</div></div></div>';self.elements.tooltip=jQuery(self.elements.tooltip);self.elements.tooltip.appendTo(self.options.position.container)
self.elements.tooltip.data('qtip',{current:0,interfaces:[self]});self.elements.wrapper=self.elements.tooltip.children('div:first');self.elements.contentWrapper=self.elements.wrapper.children('div:first').css({background:self.options.style.background});self.elements.content=self.elements.contentWrapper.children('div:first').css(jQueryStyle(self.options.style));if(jQuery.browser.msie)self.elements.wrapper.add(self.elements.content).css({zoom:1});if(self.options.hide.when.event=='unfocus')self.elements.tooltip.attr('unfocus',true);if(typeof self.options.style.width.value=='number')self.updateWidth();if(jQuery('<canvas>').get(0).getContext||jQuery.browser.msie)
{if(self.options.style.border.radius>0)
createBorder.call(self);else
self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});if(self.options.style.tip.corner!==false)
createTip.call(self);}
else
{self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});self.options.style.border.radius=0;self.options.style.tip.corner=false;jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,'render');};if((typeof self.options.content.text=='string'&&self.options.content.text.length>0)||(self.options.content.text.jquery&&self.options.content.text.length>0))
content=self.options.content.text;else if(typeof self.elements.target.attr('title')=='string'&&self.elements.target.attr('title').length>0)
{content=self.elements.target.attr('title').replace("\\n",'<br />');self.elements.target.attr('title','');}
else if(typeof self.elements.target.attr('alt')=='string'&&self.elements.target.attr('alt').length>0)
{content=self.elements.target.attr('alt').replace("\\n",'<br />');self.elements.target.attr('alt','');}
else
{content=' ';jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.NO_VALID_CONTENT,'render');};if(self.options.content.title.text!==false)createTitle.call(self);self.updateContent(content);assignEvents.call(self);if(self.options.show.ready===true)self.show();if(self.options.content.url!==false)
{url=self.options.content.url;data=self.options.content.data;method=self.options.content.method||'get';self.loadContent(url,data,method);};self.onRender.call(self);jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_RENDERED,'render');};function createBorder()
{var self,i,width,radius,color,coordinates,containers,size,betweenWidth,betweenCorners,borderTop,borderBottom,borderCoord,sideWidth,vertWidth;self=this;self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove();width=self.options.style.border.width;radius=self.options.style.border.radius;color=self.options.style.border.color||self.options.style.tip.color;coordinates=calculateBorders(radius);containers={};for(i in coordinates)
{containers[i]='<div rel="'+i+'" style="'+((i.search(/Left/)!==-1)?'left':'right')+':0; '+'position:absolute; height:'+radius+'px; width:'+radius+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(jQuery('<canvas>').get(0).getContext)
containers[i]+='<canvas height="'+radius+'" width="'+radius+'" style="vertical-align: top"></canvas>';else if(jQuery.browser.msie)
{size=radius*2+3;containers[i]+='<v:arc stroked="false" fillcolor="'+color+'" startangle="'+coordinates[i][0]+'" endangle="'+coordinates[i][1]+'" '+'style="width:'+size+'px; height:'+size+'px; margin-top:'+((i.search(/bottom/)!==-1)?-2:-1)+'px; '+'margin-left:'+((i.search(/Right/)!==-1)?coordinates[i][2]-3.5:-1)+'px; '+'vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';};containers[i]+='</div>';};betweenWidth=self.getDimensions().width-(Math.max(width,radius)*2);betweenCorners='<div class="qtip-betweenCorners" style="height:'+radius+'px; width:'+betweenWidth+'px; '+'overflow:hidden; background-color:'+color+'; line-height:0.1px; font-size:1px;">';borderTop='<div class="qtip-borderTop" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['topLeft']+containers['topRight']+betweenCorners;self.elements.wrapper.prepend(borderTop);borderBottom='<div class="qtip-borderBottom" dir="ltr" style="height:'+radius+'px; '+'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['bottomLeft']+containers['bottomRight']+betweenCorners;self.elements.wrapper.append(borderBottom);if(jQuery('<canvas>').get(0).getContext)
{self.elements.wrapper.find('canvas').each(function()
{borderCoord=coordinates[jQuery(this).parent('[rel]:first').attr('rel')];drawBorder.call(self,jQuery(this),borderCoord,radius,color);})}
else if(jQuery.browser.msie)self.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');sideWidth=Math.max(radius,(radius+(width-radius)))
vertWidth=Math.max(width-radius,0);self.elements.contentWrapper.css({border:'0px solid '+color,borderWidth:vertWidth+'px '+sideWidth+'px'})};function drawBorder(canvas,coordinates,radius,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);context.fill();};function createTip(corner)
{var self,color,coordinates,coordsize,path;self=this;if(self.elements.tip!==null)self.elements.tip.remove();color=self.options.style.tip.color||self.options.style.border.color;if(self.options.style.tip.corner===false)return;else if(!corner)corner=self.options.style.tip.corner;coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);self.elements.tip='<div class="'+self.options.style.classes.tip+'" dir="ltr" rel="'+corner+'" style="position:absolute; '+'height:'+self.options.style.tip.size.height+'px; width:'+self.options.style.tip.size.width+'px; '+'margin:0 auto; line-height:0.1px; font-size:1px;">';if(jQuery('<canvas>').get(0).getContext)
self.elements.tip+='<canvas height="'+self.options.style.tip.size.height+'" width="'+self.options.style.tip.size.width+'"></canvas>';else if(jQuery.browser.msie)
{coordsize=self.options.style.tip.size.width+','+self.options.style.tip.size.height;path='m'+coordinates[0][0]+','+coordinates[0][1];path+=' l'+coordinates[1][0]+','+coordinates[1][1];path+=' '+coordinates[2][0]+','+coordinates[2][1];path+=' xe';self.elements.tip+='<v:shape fillcolor="'+color+'" stroked="false" filled="true" path="'+path+'" coordsize="'+coordsize+'" '+'style="width:'+self.options.style.tip.size.width+'px; height:'+self.options.style.tip.size.height+'px; '+'line-height:0.1px; display:inline-block; behavior:url(#default#VML); '+'vertical-align:'+((corner.search(/top/)!==-1)?'bottom':'top')+'"></v:shape>';self.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';self.elements.contentWrapper.css('position','relative');};self.elements.tooltip.prepend(self.elements.tip+'</div>');self.elements.tip=self.elements.tooltip.find('.'+self.options.style.classes.tip).eq(0);if(jQuery('<canvas>').get(0).getContext)
drawTip.call(self,self.elements.tip.find('canvas:first'),coordinates,color);if(corner.search(/top/)!==-1&&jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))===6)
self.elements.tip.css({marginTop:-4});positionTip.call(self,corner);};function drawTip(canvas,coordinates,color)
{var context=canvas.get(0).getContext('2d');context.fillStyle=color;context.beginPath();context.moveTo(coordinates[0][0],coordinates[0][1]);context.lineTo(coordinates[1][0],coordinates[1][1]);context.lineTo(coordinates[2][0],coordinates[2][1]);context.fill();};function positionTip(corner)
{var self,ieAdjust,paddingCorner,paddingSize,newMargin;self=this;if(self.options.style.tip.corner===false||!self.elements.tip)return;if(!corner)corner=self.elements.tip.attr('rel');ieAdjust=positionAdjust=(jQuery.browser.msie)?1:0;self.elements.tip.css(corner.match(/left|right|top|bottom/)[0],0);if(corner.search(/top|bottom/)!==-1)
{if(jQuery.browser.msie)
{if(parseInt(jQuery.browser.version.charAt(0))===6)
positionAdjust=(corner.search(/top/)!==-1)?-3:1;else
positionAdjust=(corner.search(/top/)!==-1)?1:2;};if(corner.search(/Middle/)!==-1)
self.elements.tip.css({left:'50%',marginLeft:-(self.options.style.tip.size.width/2)});else if(corner.search(/Left/)!==-1)
self.elements.tip.css({left:self.options.style.border.radius-ieAdjust});else if(corner.search(/Right/)!==-1)
self.elements.tip.css({right:self.options.style.border.radius+ieAdjust});if(corner.search(/top/)!==-1)
self.elements.tip.css({top:-positionAdjust});else
self.elements.tip.css({bottom:positionAdjust});}
else if(corner.search(/left|right/)!==-1)
{if(jQuery.browser.msie)
positionAdjust=(parseInt(jQuery.browser.version.charAt(0))===6)?1:((corner.search(/left/)!==-1)?1:2);if(corner.search(/Middle/)!==-1)
self.elements.tip.css({top:'50%',marginTop:-(self.options.style.tip.size.height/2)});else if(corner.search(/Top/)!==-1)
self.elements.tip.css({top:self.options.style.border.radius-ieAdjust});else if(corner.search(/Bottom/)!==-1)
self.elements.tip.css({bottom:self.options.style.border.radius+ieAdjust});if(corner.search(/left/)!==-1)
self.elements.tip.css({left:-positionAdjust});else
self.elements.tip.css({right:positionAdjust});};paddingCorner='padding-'+corner.match(/left|right|top|bottom/)[0];paddingSize=self.options.style.tip.size[(paddingCorner.search(/left|right/)!==-1)?'width':'height'];self.elements.tooltip.css('padding',0);self.elements.tooltip.css(paddingCorner,paddingSize);if(jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))==6)
{newMargin=parseInt(self.elements.tip.css('margin-top'))||0;newMargin+=parseInt(self.elements.content.css('margin-top'))||0;self.elements.tip.css({marginTop:newMargin});};};function createTitle()
{var self=this;if(self.elements.title!==null)self.elements.title.remove();self.elements.title=jQuery('<div class="'+self.options.style.classes.title+'">').css(jQueryStyle(self.options.style.title,true)).css({zoom:(jQuery.browser.msie)?1:0}).prependTo(self.elements.contentWrapper);if(self.options.content.title.text)self.updateTitle.call(self,self.options.content.title.text);if(self.options.content.title.button!==false&&typeof self.options.content.title.button=='string')
{self.elements.button=jQuery('<a class="'+self.options.style.classes.button+'" style="float:right; position: relative"></a>').css(jQueryStyle(self.options.style.button,true)).html(self.options.content.title.button).prependTo(self.elements.title).click(function(event){if(!self.status.disabled)self.hide(event)});};};function assignEvents()
{var self,showTarget,hideTarget,inactiveEvents;self=this;showTarget=self.options.show.when.target;hideTarget=self.options.hide.when.target;if(self.options.hide.fixed)hideTarget=hideTarget.add(self.elements.tooltip);if(self.options.hide.when.event=='inactive')
{inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove','mouseout','mouseenter','mouseleave','mouseover'];function inactiveMethod(event)
{if(self.status.disabled===true)return;clearTimeout(self.timers.inactive);self.timers.inactive=setTimeout(function()
{jQuery(inactiveEvents).each(function()
{hideTarget.unbind(this+'.qtip-inactive');self.elements.content.unbind(this+'.qtip-inactive');});self.hide(event);},self.options.hide.delay);};}
else if(self.options.hide.fixed===true)
{self.elements.tooltip.bind('mouseover.qtip',function()
{if(self.status.disabled===true)return;clearTimeout(self.timers.hide);});};function showMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.when.event=='inactive')
{jQuery(inactiveEvents).each(function()
{hideTarget.bind(this+'.qtip-inactive',inactiveMethod);self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);});inactiveMethod();};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);};function hideMethod(event)
{if(self.status.disabled===true)return;if(self.options.hide.fixed===true&&self.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&jQuery(event.relatedTarget).parents('div.qtip[qtip]').length>0)
{event.stopPropagation();event.preventDefault();clearTimeout(self.timers.hide);return false;};clearTimeout(self.timers.show);clearTimeout(self.timers.hide);self.elements.tooltip.stop(true,true);self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);};if((self.options.show.when.target.add(self.options.hide.when.target).length===1&&self.options.show.when.event==self.options.hide.when.event&&self.options.hide.when.event!=='inactive')||self.options.hide.when.event=='unfocus')
{self.cache.toggle=0;showTarget.bind(self.options.show.when.event+'.qtip',function(event)
{if(self.cache.toggle==0)showMethod(event);else hideMethod(event);});}
else
{showTarget.bind(self.options.show.when.event+'.qtip',showMethod);if(self.options.hide.when.event!=='inactive')
hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);};if(self.options.position.type.search(/(fixed|absolute)/)!==-1)
self.elements.tooltip.bind('mouseover.qtip',self.focus);if(self.options.position.target==='mouse'&&self.options.position.type!=='static')
{showTarget.bind('mousemove.qtip',function(event)
{self.cache.mouse={x:event.pageX,y:event.pageY};if(self.status.disabled===false&&self.options.position.adjust.mouse===true&&self.options.position.type!=='static'&&self.elements.tooltip.css('display')!=='none')
self.updatePosition(event);});};};function screenAdjust(position,target,tooltip)
{var self,adjustedPosition,adjust,newCorner,overflow,corner;self=this;if(tooltip.corner=='center')return target.position
adjustedPosition=jQuery.extend({},position);newCorner={x:false,y:false};overflow={left:(adjustedPosition.left<jQuery.fn.qtip.cache.screen.scroll.left),right:(adjustedPosition.left+tooltip.dimensions.width+2>=jQuery.fn.qtip.cache.screen.width+jQuery.fn.qtip.cache.screen.scroll.left),top:(adjustedPosition.top<jQuery.fn.qtip.cache.screen.scroll.top),bottom:(adjustedPosition.top+tooltip.dimensions.height+2>=jQuery.fn.qtip.cache.screen.height+jQuery.fn.qtip.cache.screen.scroll.top)};adjust={left:(overflow.left&&(tooltip.corner.search(/right/i)!=-1||(tooltip.corner.search(/right/i)==-1&&!overflow.right))),right:(overflow.right&&(tooltip.corner.search(/left/i)!=-1||(tooltip.corner.search(/left/i)==-1&&!overflow.left))),top:(overflow.top&&tooltip.corner.search(/top/i)==-1),bottom:(overflow.bottom&&tooltip.corner.search(/bottom/i)==-1)};if(adjust.left)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left+target.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x
newCorner.x='Left';}
else if(adjust.right)
{if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left-tooltip.dimensions.width;else
adjustedPosition.left=self.cache.mouse.x-tooltip.dimensions.width;newCorner.x='Right';};if(adjust.top)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top+target.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y
newCorner.y='top';}
else if(adjust.bottom)
{if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top-tooltip.dimensions.height;else
adjustedPosition.top=self.cache.mouse.y-tooltip.dimensions.height;newCorner.y='bottom';};if(adjustedPosition.left<0)
{adjustedPosition.left=position.left;newCorner.x=false;};if(adjustedPosition.top<0)
{adjustedPosition.top=position.top;newCorner.y=false;};if(self.options.style.tip.corner!==false)
{adjustedPosition.corner=new String(tooltip.corner);if(newCorner.x!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/Left|Right|Middle/,newCorner.x);if(newCorner.y!==false)adjustedPosition.corner=adjustedPosition.corner.replace(/top|bottom/,newCorner.y);if(adjustedPosition.corner!==self.elements.tip.attr('rel'))
createTip.call(self,adjustedPosition.corner);};return adjustedPosition;};function jQueryStyle(style,sub)
{var styleObj,i;styleObj=jQuery.extend(true,{},style);for(i in styleObj)
{if(sub===true&&i.search(/(tip|classes)/i)!==-1)
delete styleObj[i];else if(!sub&&i.search(/(width|border|tip|title|classes|user)/i)!==-1)
delete styleObj[i];};return styleObj;};function sanitizeStyle(style)
{if(typeof style.tip!=='object')style.tip={corner:style.tip};if(typeof style.tip.size!=='object')style.tip.size={width:style.tip.size,height:style.tip.size};if(typeof style.border!=='object')style.border={width:style.border};if(typeof style.width!=='object')style.width={value:style.width};if(typeof style.width.max=='string')style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"jQuery1"));if(typeof style.width.min=='string')style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"jQuery1"));if(typeof style.tip.size.x=='number')
{style.tip.size.width=style.tip.size.x;delete style.tip.size.x;};if(typeof style.tip.size.y=='number')
{style.tip.size.height=style.tip.size.y;delete style.tip.size.y;};return style;};function buildStyle()
{var self,i,styleArray,styleExtend,finalStyle,ieAdjust;self=this;styleArray=[true,{}];for(i=0;i<arguments.length;i++)
styleArray.push(arguments[i]);styleExtend=[jQuery.extend.apply(jQuery,styleArray)];while(typeof styleExtend[0].name=='string')
{styleExtend.unshift(sanitizeStyle(jQuery.fn.qtip.styles[styleExtend[0].name]));};styleExtend.unshift(true,{classes:{tooltip:'qtip-'+(arguments[0].name||'defaults')}},jQuery.fn.qtip.styles.defaults);finalStyle=jQuery.extend.apply(jQuery,styleExtend);ieAdjust=(jQuery.browser.msie)?1:0;finalStyle.tip.size.width+=ieAdjust;finalStyle.tip.size.height+=ieAdjust;if(finalStyle.tip.size.width%2>0)finalStyle.tip.size.width+=1;if(finalStyle.tip.size.height%2>0)finalStyle.tip.size.height+=1;if(finalStyle.tip.corner===true)
finalStyle.tip.corner=(self.options.position.corner.tooltip==='center')?false:self.options.position.corner.tooltip;return finalStyle;};function calculateTip(corner,width,height)
{var tips={bottomRight:[[0,0],[width,height],[width,0]],bottomLeft:[[0,0],[width,0],[0,height]],topRight:[[0,height],[width,0],[width,height]],topLeft:[[0,0],[0,height],[width,height]],topMiddle:[[0,height],[width/2,0],[width,height]],bottomMiddle:[[0,0],[width,0],[width/2,height]],rightMiddle:[[0,0],[width,height/2],[0,height]],leftMiddle:[[width,0],[width,height],[0,height/2]]};tips.leftTop=tips.bottomRight;tips.rightTop=tips.bottomLeft;tips.leftBottom=tips.topRight;tips.rightBottom=tips.topLeft;return tips[corner];};function calculateBorders(radius)
{var borders;if(jQuery('<canvas>').get(0).getContext)
{borders={topLeft:[radius,radius],topRight:[0,radius],bottomLeft:[radius,0],bottomRight:[0,0]};}
else if(jQuery.browser.msie)
{borders={topLeft:[-90,90,0],topRight:[-90,90,-radius],bottomLeft:[90,270,0],bottomRight:[90,270,-radius]};};return borders;};function bgiframe()
{var self,html,dimensions;self=this;dimensions=self.getDimensions();html='<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:'+dimensions.height+'px; width:'+dimensions.width+'px" />';self.elements.bgiframe=self.elements.wrapper.prepend(html).children('.qtip-bgiframe:first');};jQuery(document).ready(function()
{jQuery.fn.qtip.cache={screen:{scroll:{left:jQuery(window).scrollLeft(),top:jQuery(window).scrollTop()},width:jQuery(window).width(),height:jQuery(window).height()}};var adjustTimer;jQuery(window).bind('resize scroll',function(event)
{clearTimeout(adjustTimer);adjustTimer=setTimeout(function()
{if(event.type==='scroll')
jQuery.fn.qtip.cache.screen.scroll={left:jQuery(window).scrollLeft(),top:jQuery(window).scrollTop()};else
{jQuery.fn.qtip.cache.screen.width=jQuery(window).width();jQuery.fn.qtip.cache.screen.height=jQuery(window).height();};for(i=0;i<jQuery.fn.qtip.interfaces.length;i++)
{var api=jQuery.fn.qtip.interfaces[i];if(api.status.rendered===true&&(api.options.position.type!=='static'||api.options.position.adjust.scroll&&event.type==='scroll'||api.options.position.adjust.resize&&event.type==='resize'))
{api.updatePosition(event,true);}};},100);})
jQuery(document).bind('mousedown.qtip',function(event)
{if(jQuery(event.target).parents('div.qtip').length===0)
{jQuery('.qtip[unfocus]').each(function()
{var api=jQuery(this).qtip("api");if(jQuery(this).is(':visible')&&!api.status.disabled&&jQuery(event.target).add(api.elements.target).length>1)
api.hide(event);})};})});jQuery.fn.qtip.interfaces=[]
jQuery.fn.qtip.log={error:function(){return this;}};jQuery.fn.qtip.constants={};jQuery.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,resize: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(){}}};jQuery.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);

/* window-1.0.js */

function cWindowDraw()
{joms.jQuery('#cWindow').remove();var html='';html+='<div id="cWindow">';html+=' <!-- top section -->';html+=' <div id="cwin_tl"></div>';html+=' <div id="cwin_tm"></div>';html+=' <div id="cwin_tr"></div>';html+=' <div style="clear: both;"></div>';html+=' <!-- middle section -->';html+=' <div id="cwin_ml"></div>';html+=' <div id="cWindowContentOuter">';html+='  <div id="cWindowContentTop">';html+='   <a href="javascript:void(0);" onclick="cWindowHide();" id="cwin_close_btn">Close</a>';html+='   <div id="cwin_logo"></div>';html+='           <div class="clr"></div>';html+='  </div>';html+='  <div id="cWindowContentWrap"><div id="cWindowContent">';html+='  </div></div>';html+=' </div>';html+=' <div id="cwin_mr"></div>';html+=' <div style="clear: both;"></div>';html+=' <!-- bottom section -->';html+=' <div id="cwin_bl"></div>';html+=' <div id="cwin_bm"></div>';html+=' <div id="cwin_br"></div>';html+=' <div style="clear: both;"></div>';html+='</div>';var cWindow=joms.jQuery(html).addClass('new').prependTo('body');return cWindow;}
function cWindowShow(windowCall,winTitle,winContentWidth,winContentHeight,winType)
{joms.jQuery('#community-wrap iframe').addClass('hide').css('visibility','hidden');var cWindow=joms.jQuery('#cWindow');if(cWindow.length<1)cWindow=cWindowDraw();winType=(winType==''||winType==null)?'dialog':winType;winContentWidth=parseInt(winContentWidth);winContentHeight=parseInt(winContentHeight);if(cWindow.hasClass('new'))
{var cWindowSize=cWindowGetSize(winContentWidth,winContentHeight);cWindowResizeAddTask('#cWindow',{'width':cWindowSize.width(),'height':cWindowSize.height(),'left':cWindowSize.left(),'margin-top':cWindowSize.top(),'z-index':cGetZIndexMax()+1},{'animate':false});cWindowResizeAddTask('#cWindowContentOuter, #cwin_tm, #cwin_bm',{'width':cWindowSize.contentOuterWidth()},{'animate':false});cWindowResizeAddTask('#cWindowContentOuter, #cwin_ml, #cwin_mr',{'height':cWindowSize.contentOuterHeight()},{'animate':false});cWindowResizeAddTask('#cWindowContentWrap',{'height':cWindowSize.contentWrapHeight()},{'animate':false});cWindowResizeExecuteTask(function()
{cWindow.removeClass('new');});}
joms.jQuery('#cWindow').attr('class',winType);joms.jQuery('#cwin_logo').html(winTitle);joms.jQuery('#cWindowContent').empty();joms.jQuery('#cWindowAction').remove();jax.loadingFunction=function(){joms.jQuery('#cWindowContentWrap').addClass('loading').css('overflow','hidden');};jax.doneLoadingFunction=function(){joms.jQuery('#cWindowContentWrap').removeClass('loading').css('overflow','auto');};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";})}
cWindowResize2(winContentWidth,winContentHeight,windowCall);}
function cWindowHide()
{if(joms.jQuery('#cWindowAction').size()>0)
{joms.jQuery('#cWindowAction').animate({bottom:-30},function()
{joms.jQuery('#cWindow').fadeOut('fast',function(){joms.jQuery('#cWindowAction').remove();joms.jQuery(this).remove();});});}else{joms.jQuery('#cWindow').fadeOut('fast',function(){joms.jQuery(this).remove();});}
setTimeout(function(){joms.jQuery('.video-player iframe').addClass('hide').css('visibility','visible')},600);}
function cWindowGetSize(winContentWidth,winContentHeight)
{var cWindowSize={contentWrapHeight:function(){return winContentHeight},contentOuterWidth:function(){return winContentWidth},contentOuterHeight:function(){return winContentHeight+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()+(document.documentElement["clientHeight"]-this.height())/2}};return cWindowSize;}
function cWindowResize(newHeight,callback,action)
{newHeight=parseInt(newHeight);cWindowResize2(joms.jQuery('#cWindowContentOuter').width(),newHeight,callback);if(action!=undefined)cWindowActions(action);}
function cWindowResize2(winContentWidth,winContentHeight,callback)
{var cWindowSize=cWindowGetSize(winContentWidth,winContentHeight);var options={'animate':(joms.jQuery('#cWindow').width()==cWindowSize.width())};joms.jQuery('#cWindowContent').addClass('resizing');cWindowResizeAddTask('#cWindow',{'width':cWindowSize.width(),'height':cWindowSize.height(),'left':cWindowSize.left(),'marginTop':cWindowSize.top()},options);cWindowResizeAddTask('#cWindowContentOuter, #cwin_tm, #cwin_bm',{'width':cWindowSize.contentOuterWidth()},options);cWindowResizeAddTask('#cWindowContentOuter, #cwin_ml, #cwin_mr',{'height':cWindowSize.contentOuterHeight()},options);cWindowResizeAddTask('#cWindowContentWrap',{'height':cWindowSize.contentWrapHeight()},options);if(joms.jQuery('#cWindow').width()>cWindowSize.width()||joms.jQuery('#cWindow').height()>cWindowSize.height())
cWindowResizeTask.reverse();cWindowResizeExecuteTask(callback);}
var cWindowResizeTask=new Array();function cWindowResizeAddTask(target,props,options)
{var defaultProps={};joms.jQuery.extend(defaultProps,props);var defaultOptions={'animate':true,'queue':false,'duration':400,'easing':'swing','complete':function(){clearTimeout(window.cWindowResizeComplete);window.cWindowResizeComplete=setTimeout(function()
{joms.jQuery('#cWindowContent').removeClass('resizing');},400);joms.jQuery(this).removeClass('resizing');}};joms.jQuery.extend(defaultOptions,options);if(defaultOptions.animate)
{cWindowResizeTask.push(function(){joms.jQuery(target).addClass('resizing').animate(defaultProps,defaultOptions);});}else{cWindowResizeTask.push(function(){joms.jQuery(target).css(defaultProps);});}}
function cWindowResizeExecuteTask(callback)
{do
{cWindowResizeTask[0]();cWindowResizeTask.splice(0,1);}
while(cWindowResizeTask.length>0);if(callback!=undefined&&typeof(callback)=="string")eval(callback);if(typeof(callback)=="function")callback();}
var cWindowActionsPoll;function cWindowActions(action)
{clearInterval(cWindowActionsPoll);setTimeout(function(){clearInterval(cWindowActionsPoll);cWindowActionsPoll=setInterval(function()
{var n=joms.jQuery('.resizing').length;if(n<1)
{_cWindowActions(action);clearInterval(cWindowActionsPoll);}},300);},300);}
function _cWindowActions(action)
{joms.jQuery('#cWindowAction').remove();cWindowAction=joms.jQuery('<div>').attr('id','cWindowAction').html(action).css('bottom','-30px').appendTo('#cWindowContentOuter');cWindowResizeAddTask('#cWindow',{height:'+=30px'},{'duration':200});cWindowResizeAddTask('#cWindow',{marginTop:'-=15px'},{'duration':200});cWindowResizeAddTask('#cWindowContentOuter, #cwin_mr, #cwin_ml',{height:'+=30px'},{'duration':200});cWindowResizeExecuteTask();setTimeout(function(){joms.jQuery("#cWindowAction").animate({bottom:'0px'})},200);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;}

/* script.js */

var requesting=false;var jausersettingajax=null;var JANEWSPRO=new Class({showForm:function(parent){var container=parent.getElement('.ja-usersetting-options');if(container.offsetHeight<=0){$$('.ja-usersetting-options').each(function(el){if(el.offsetHeight>0){this.hideElement(el);}}.bind(this));this.showElement(container,container.getElement('form.ja-usersetting-form').offsetHeight);}else{this.hideElement(container);}
return false;},_bindingAndprocessingEventForm:function(parent){var forms=parent.getElements('.ja-usersetting form');if(forms.length>0){forms.each(function(form){if($defined(form)==false){alert("Could not found the form setting for this module, please try to check again");return;}
if(form.checkall!=null){var checkboxs=form.getElements('input.checkbox');$(form.checkall).addEvent('click',function(){var doCheck=this.checked;checkboxs.each(function(elm){elm.checked=doCheck;}.bind(this));});checkboxs.each(function(elm){elm.addEvent('click',function(){if(!this.checked){$(form.checkall).checked=false;}
else{var doCheck=true;checkboxs.each(function(el){if(!el.checked)doCheck=false;});$(form.checkall).checked=doCheck;}});}.bind(this));}
form.getElement('input.ja-cancel').addEvent('click',function(){this.hideElement(form.getParent());}.bind(this));var submit_bt=form.getElement('input.ja-submit');submit_bt.addEvent('click',function(){submit_bt.disabled=true;var url=location.href;if(url.indexOf('#')>-1){url=url.substr(0,url.indexOf('#'));}
if(url.indexOf('?')>-1)url+='&';else url+='?';url+='janajax=1&rand='+(Math.random()*Math.random());if(requesting){jausersettingajax.cancel();requesting=false;}
requesting=true;jausersettingajax=new Ajax(url,{method:'get',data:form.toQueryString(),onComplete:function(data){submit_bt.disabled=false;requesting=false;parent.innerHTML=data;this._bindingAndprocessingEventForm(parent);var JTooltips=new Tips($$('#'+parent.id+' .jahasTip'),{maxTitleChars:50,fixed:false,className:'tool-tip janews-tool'});}.bind(this),onFailure:function(){submit_bt.disabled=false;requesting=false;alert('fail request');}}).request();}.bind(this));}.bind(this));}},showElement:function(obj,height){if(!obj.fx){obj.fx=new Fx.Style(obj,'height');}
obj.fx.start(height);},hideElement:function(obj){obj.maxHeight=obj.offsetHeight;if(!obj.fx){obj.fx=new Fx.Style(obj,'height');}
obj.fx.start(0);}});


