/*  */
var JCEMediaObject={version:{'flash':'10,0,22,87','windowsmedia':'5,1,52,701','quicktime':'6,0,2,0','realmedia':'7,0,0,0','shockwave':'8,5,1,0'},init:function(base,v){var t=this;this.base=base;for(n in v){t.version[n]=v[n]}},getSite:function(){var base=this.base;if(base){var site=document.location.href;var parts=site.split(':\/\/');var port=parts[0];var url=parts[1];if(url.indexOf(base)!=-1){url=url.substr(0,url.indexOf(base))}else{url=url.substr(0,url.indexOf('/'))||url}return port+'://'+url+base}return''},writeObject:function(cls,cb,mt,p){var h='',n;var msie=/msie/i.test(navigator.userAgent);var webkit=/webkit/i.test(navigator.userAgent);if(!/:\/\//.test(p.src)){p.src=this.getSite()+p.src;if(mt=='video/x-ms-wmv'){p.url=p.src}}h+='<object ';if(mt=='application/x-shockwave-flash'&&!msie){h+='type="'+mt+'" data="'+p.src+'" '}else{h+='codebase="'+cb+'" classid="clsid:'+cls+'" '}for(n in p){if(p[n]!==''){if(/(id|name|width|height|style)$/.test(n)){h+=n+'="'+p[n]+'"'}}}h+='>';for(n in p){if(p[n]!==''){if(!/(id|name|width|height|style)$/.test(n)){h+='<param name="'+n+'" value="'+p[n]+'">'}}}if(!msie&&mt!='application/x-shockwave-flash'){h+='<object type="'+mt+'" data="'+p.src+'"';for(n in p){if(p[n]!==''){h+=n+'="'+p[n]+'"'}}h+='></object>'}h+='</object>';document.write(h)},flash:function(p){if(typeof p.wmode=='undefined'){p['wmode']='opaque'}this.writeObject('D27CDB6E-AE6D-11cf-96B8-444553540000','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version['flash'],'application/x-shockwave-flash',p)},shockwave:function(p){this.writeObject('166B1BCA-3F9C-11CF-8075-444553540000','http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version='+this.version['shockwave'],'application/x-director',p)},quicktime:function(p){this.writeObject('02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','http://www.apple.com/qtactivex/qtplugin.cab#version='+this.version['quicktime'],'video/quicktime',p)},realmedia:function(p){this.writeObject('CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version['realmedia'],'audio/x-pn-realaudio-plugin',p)},windowsmedia:function(p){p.url=p.src;this.writeObject('6BF52A52-394A-11D3-B153-00C04F79FAA6','http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version='+this.version['windowsmedia'],'video/x-ms-wmv',p)},divx:function(p){this.writeObject('67DABFBF-D0AB-41FA-9C46-CC0F21721616','http://go.divx.com/plugin/DivXBrowserPlugin.cab','video/divx',p)}};function writeFlash(p){JCEMediaObject.flash(p)};function writeShockWave(p){JCEMediaObject.shockwave(p)};function writeQuickTime(p){JCEMediaObject.quicktime(p)};function writeRealMedia(p){JCEMediaObject.realmedia(p)};function writeWindowsMedia(p){JCEMediaObject.windowsmedia(p)};function writeDivX(p){JCEMediaObject.divx(p)};

/*  */
(function(){window.JCEMediaBox={options:{popup:{width:'',height:'',legacy:0,overlay:1,overlayopacity:0.8,overlaycolor:'#000000',resize:0,icons:1,fadespeed:500,scalespeed:500,hideobjects:1,scrolling:'fixed',labels:{'close':'Close','next':'Next','previous':'Previous','numbers':'{$current} of {$total}','cancel':'Cancel'}},tooltip:{speed:150,offsets:{x:16,y:16},position:'br',opacity:0.8,background:'#000000',color:'#ffffff'},base:'/',pngfix:false,pngfixclass:'',theme:'standard',themecustom:'',themepath:'plugins/system/jcemediabox/themes',imgpath:'plugins/system/jcemediabox/img'},init:function(options){this.extend(this.options,options);if(this.isIE6)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};this.ready()},ready:function(){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);return JCEMediaBox._init()},false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);return JCEMediaBox._init()}});if(document.documentElement.doScroll&&window==window.top)(function(){if(JCEMediaBox.domLoaded)return;try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}return JCEMediaBox._init()})()}JCEMediaBox.Event.add(window,"load",function(){return JCEMediaBox._init()})},getSite:function(){var base=this.options.base;if(base){var site=document.location.href;var parts=site.split(':\/\/');var port=parts[0];var url=parts[1];if(url.indexOf(base)!=-1){url=url.substr(0,url.indexOf(base))}else{url=url.substr(0,url.indexOf('/'))||url}return port+'://'+url+base}return null},_init:function(){if(this.domLoaded)return;this.domLoaded=true;var t=this,d=document,na=navigator,ua=na.userAgent;t.isOpera=window.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isIE7=t.isIE&&/MSIE [7]/.test(ua);this.site=this.getSite();if(!this.site)return false;this.Popup.init();this.ToolTip.init()},each:function(o,cb,s){var n,l;if(!o)return 0;s=s||o;if(o.length!==undefined){for(n=0,l=o.length;n<l;n++){if(cb.call(s,o[n],n,o)===false)return 0}}else{for(n in o){if(o.hasOwnProperty(n)){if(cb.call(s,o[n],n,o)===false)return 0}}}return 1},extend:function(o,e){var t=JCEMediaBox,i,l,a=arguments;for(i=1,l=a.length;i<l;i++){e=a[i];t.each(e,function(v,n){if(v!==undefined)o[n]=v})}return o},trim:function(s){return(s?''+s:'').replace(/^\s*|\s*$/g,'')},DOM:{get:function(s){if(typeof(s)=='string')return document.getElementById(s);return s},select:function(p,o){var t=this,r=[],s,parts,at,tag,each=JCEMediaBox.each;o=o||document;if(p=='*'){return o.getElementsByTagName(p)}if(o.querySelectorAll){return o.querySelectorAll(p)}function inArray(a,v){var i,l;if(a){for(i=0,l=a.length;i<l;i++){if(a[i]===v)return true}}return false}s=p.split(',');each(s,function(selectors){parts=JCEMediaBox.trim(selectors).split('.');tag=parts[0]||'*';cl=parts[1]||'';if(/\[(.*?)\]/.test(tag)){tag=tag.replace(/(.*?)\[(.*?)\]/,function(a,b,c){at=c;return b})}var elements=o.getElementsByTagName(tag);if(cl||at){each(elements,function(el){if(cl){if(t.hasClass(el,cl)){if(!inArray(r,el)){r.push(el)}}}if(at){if(el.getAttribute(at)){if(!inArray(r,el)){r.push(el)}}}})}else{r=elements}});return r},hasClass:function(el,c){return new RegExp(c).test(el.className)},addClass:function(el,c){if(!this.hasClass(el,c)){el.className=JCEMediaBox.trim(el.className+' '+c)}},removeClass:function(el,c){if(this.hasClass(el,c)){var s=el.className;var re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");var v=s.replace(re,' ');v=v.replace(/^\s|\s$/g,'');el.className=v}},show:function(el){el.style.display='block'},hide:function(el){el.style.display='none'},remove:function(el){var p=el.parentNode||document.body;p.removeChild(el)},style:function(n,na,v){var isIE=JCEMediaBox.isIE,r,s;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase()});s=n.style;if(typeof v=='undefined'){if(na=='float')na=isIE?'styleFloat':'cssFloat';r=s[na];if(document.defaultView&&!r){if(/float/i.test(na))na='float';na=na.replace(/[A-Z]/g,function(a){return'-'+a}).toLowerCase();try{r=document.defaultView.getComputedStyle(n,null).getPropertyValue(na)}catch(e){}}if(n.currentStyle&&!r)r=n.currentStyle[na];return r}else{switch(na){case'opacity':v=parseFloat(v);if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block'}s[na]=v;break;case'float':na=isIE?'styleFloat':'cssFloat';break;default:if(v&&/(margin|padding|width|height|top|bottom|left|right)/.test(na)){v=/^[\-0-9\.]+$/.test(v)?v+'px':v}break}s[na]=v}},styles:function(el,props){var t=this;JCEMediaBox.each(props,function(v,s){return t.style(el,s,v)})},attribute:function(el,s,v){if(typeof v=='undefined'){if(s=='class'){return el.className}v=el.getAttribute(s);if(/^on/.test(s)){v=v.replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1')}if(s=='hspace'&&v==-1){v=''}return v}if(v===''){el.removeAttribute(s)}switch(s){case'style':if(typeof v=='object'){this.styles(el,v)}else{el.style.cssText=v}break;case'class':el.className=v||'';break;default:el.setAttribute(s,v);break}},attributes:function(el,attribs){var t=this;JCEMediaBox.each(attribs,function(v,s){t.attribute(el,s,v)})},create:function(el,attribs,html){var o=document.createElement(el);this.attributes(o,attribs);if(typeof html!='undefined'){o.innerHTML=html}return o},add:function(n,o,a,h){if(typeof o=='string'){a=a||{};o=this.create(o,a,h)}n.appendChild(o);return o},addBefore:function(n,o,c){if(typeof c=='undefined'){c=n.firstChild}n.insertBefore(o,c)},png:function(el){var s;if(el.nodeName=='IMG'){s=el.src;if(/\.png$/i.test(s)){this.attribute(el,'src',JCEMediaBox.site+'plugins/system/jcemediabox/img/blank.gif');this.style(el,'filter',"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"')")}}else{s=this.style(el,'background-image');if(/\.png/i.test(s)){var bg=/url\("(.*)"\)/.exec(s)[1];this.styles(el,{'background-image':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+bg+"', sizingMethod='image')"})}}}},Event:{events:[],add:function(o,n,f,s){var t=this;cb=function(e){if(t.disabled)return;e=e||window.event;if(e&&JCEMediaBox.isIE){if(!e.target){e.target=e.srcElement||document}if(!e.relatedTarget&&e.fromElement){e.relatedTarget=e.fromElement==e.target?e.toElement:e.fromElement}JCEMediaBox.extend(e,{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}})}if(e&&JCEMediaBox.isWebKit){if(e.target.nodeType==3){e.target=e.target.parentNode}}if(!s)return f(e);return f.call(s,e)};function _add(o,n,f){if(o.attachEvent){o.attachEvent('on'+n,f)}else if(o.addEventListener){o.addEventListener(n,f,false)}else{o['on'+n]=f}}t.events.push({obj:o,name:n,func:f,cfunc:cb,scope:s});_add(o,n,cb)},remove:function(o,n,f){var t=this,a=t.events,s=false,r;JCEMediaBox.each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false}});return s},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null}catch(ex){}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e)},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false},destroy:function(){var t=this;JCEMediaBox.each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null});t.events=[];t=null},addUnload:function(f,s){var t=this;f={func:f,scope:s||this};if(!t.unloads){function unload(){var li=t.unloads,o,n;if(li){for(n in li){o=li[n];if(o&&o.func)o.func.call(o.scope,1)}if(window.detachEvent){window.detachEvent('onbeforeunload',fakeUnload);window.detachEvent('onunload',unload)}else if(window.removeEventListener)window.removeEventListener('unload',unload,false);t.unloads=o=li=w=unload=0;if(window.CollectGarbage)CollectGarbage()}};function fakeUnload(){var d=document;if(d.readyState=='interactive'){function stop(){d.detachEvent('onstop',stop);if(unload)unload();d=0};if(d)d.attachEvent('onstop',stop);window.setTimeout(function(){if(d)d.detachEvent('onstop',stop)},0)}};if(window.attachEvent){window.attachEvent('onunload',unload);window.attachEvent('onbeforeunload',fakeUnload)}else if(window.addEventListener)window.addEventListener('unload',unload,false);t.unloads=[f]}else t.unloads.push(f);return f},removeUnload:function(f){var u=this.unloads,r=null;JCEMediaBox.each(u,function(o,i){if(o&&o.func==f){u.splice(i,1);r=f;return false}});return r}},Dimensions:{getWidth:function(){return document.documentElement.clientWidth||document.body.clientWidth||this.innerWidth||0},getHeight:function(){return document.documentElement.clientHeight||document.body.clientHeight||this.innerHeight||0},getScrollHeight:function(){return document.documentElement.scrollHeight||document.body.scrollHeight||0},getScrollWidth:function(){return document.documentElement.scrollWidth||document.body.scrollWidth||0},getScrollTop:function(){return document.documentElement.scrollTop||this.pageYOffset||document.body.scrollTop||0},getScrollbarWidth:function(){var each=JCEMediaBox.each,DOM=JCEMediaBox.DOM;if(this.scrollbarWidth){return this.scrollbarWidth}var outer=DOM.add(document.body,'div',{'style':{position:'absolute',visibility:'hidden',width:200,height:200,border:0,margin:0,padding:0,overflow:'hidden'}});var inner=DOM.add(outer,'div',{'style':{width:'100%',height:200,border:0,margin:0,padding:0}});var w1=parseInt(inner.offsetWidth);outer.style.overflow='scroll';var w2=parseInt(inner.offsetWidth);if(w1==w2){w2=parseInt(outer.clientWidth)}document.body.removeChild(outer);this.scrollbarWidth=(w1-w2);return this.scrollbarWidth},outerWidth:function(n){var v=0,x=0;x=n.offsetWidth;if(!x){JCEMediaBox.each(['padding-left','padding-right','border-left','border-right','width'],function(s){v=parseFloat(JCEMediaBox.DOM.style(n,s));v=/[0-9]/.test(v)?v:0;x=x+v})}return x},outerHeight:function(n){var v=0,x=0;x=n.offsetHeight;if(!x){JCEMediaBox.each(['padding-top','padding-bottom','border-top','border-bottom','height'],function(s){v=parseFloat(JCEMediaBox.DOM.style(n,s));v=/[0-9]/.test(v)?v:0;x=x+v})}return x}},FX:{animate:function(el,props,speed,cb){var DOM=JCEMediaBox.DOM;var options={speed:speed||100,callback:cb||function(){}};var styles={};JCEMediaBox.each(props,function(v,s){sv=parseFloat(DOM.style(el,s));styles[s]=[sv,v]});new JCEMediaBox.fx(el,options).custom(styles);return true}}};JCEMediaBox.XHR=function(options,scope){this.options={method:'GET',async:true,headers:{},data:null,encoding:'utf-8',success:function(){},error:function(){}};JCEMediaBox.extend(this.options,options);this.scope=scope||this};JCEMediaBox.XHR.prototype={setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(JCEMediaBox.isIE?new ActiveXObject('Microsoft.XMLHTTP'):false)},onStateChange:function(){if(this.transport.readyState!=4||!this.running){return}this.running=false;var status=0;if((this.transport.status>=200)&&(this.transport.status<300)){var s=this.transport.responseText;var x=this.transport.responseXML;this.options.success.call(this.scope,s,x)}else{this.options.error.call(this.scope,this.transport,this.options)}this.transport.onreadystatechange=function(){};this.transport=null},send:function(url){var t=this,extend=JCEMediaBox.extend;if(this.running){return this}this.running=true;this.setTransport();var method=this.options.method.toUpperCase();if(this.options.urlEncoded&&method=='POST'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';extend(this.options.headers,{'Content-type':'application/x-www-form-urlencoded'+encoding})}this.transport.open(method,url,this.options.async);this.transport.onreadystatechange=function(){return t.onStateChange()};if((this.options.method=='post')&&this.transport.overrideMimeType){extend(this.options.headers,{'Connection':'close'})}for(var type in this.options.headers){try{this.transport.setRequestHeader(type,this.options.headers[type])}catch(e){}}this.transport.send(this.options.data)}},JCEMediaBox.fx=function(el,options){this.element=el;this.callback=options.callback;this.speed=options.speed;this.wait=true;this.fps=50;this.now={}};JCEMediaBox.fx.prototype={step:function(){var time=new Date().getTime();if(time<this.time+this.speed){this.cTime=time-this.time;this.setNow()}else{var t=this;this.clearTimer();this.now=this.to;setTimeout(function(){t.callback.call(t.element,t)},10)}this.increase()},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p])}},compute:function(from,to){var change=to-from;return this.transition(this.cTime,from,change,this.speed)},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this},start:function(from,to){var t=this;if(!this.wait)this.clearTimer();if(this.timer)return;this.from=from;this.to=to;this.time=new Date().getTime();this.timer=setInterval(function(){return t.step()},Math.round(1000/this.fps));return this},custom:function(o){if(this.timer&&this.wait)return;var from={};var to={};for(property in o){from[property]=o[property][0];to[property]=o[property][1]}return this.start(from,to)},increase:function(){for(var p in this.now){this.setStyle(this.element,p,this.now[p])}},transition:function(t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},setStyle:function(e,p,v){JCEMediaBox.DOM.style(e,p,v)}},JCEMediaBox.ToolTip={init:function(){var t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event;var theme=JCEMediaBox.options.theme=='custom'?JCEMediaBox.options.themecustom:JCEMediaBox.options.theme;this.tooltiptheme='';new JCEMediaBox.XHR({success:function(text,xml){var re=/<!-- THEME START -->([\s\S]*?)<!-- THEME END -->/;if(re.test(text)){text=re.exec(text)[1]}t.tooltiptheme=text}}).send(JCEMediaBox.site+JCEMediaBox.options.themepath+'/'+theme+'/tooltip.html');function _withinElement(el,e,fn){var p=e.relatedTarget;while(p&&p!=el){try{p=p.parentNode}catch(e){p=el}}if(p!=el){return fn.call(this)}return false}each(DOM.select('.jcetooltip, .jce_tooltip'),function(el){Event.add(el,'mouseover',function(e){_withinElement(el,e,function(){return t.start(el)})});Event.add(el,'mouseout',function(e){_withinElement(el,e,function(){return t.end(el)})});Event.add(el,'mousemove',function(e){return t.locate(e)})})},create:function(){if(!this.toolTip){var DOM=JCEMediaBox.DOM;this.toolTip=DOM.add(document.body,'div',{'style':{'opacity':0},'class':'jcemediabox-tooltip'},this.tooltiptheme)}},start:function(el){var t=this,DOM=JCEMediaBox.DOM;if(!this.tooltiptheme)return false;this.create();var text=el.title||'',title='';if(/::/.test(text)){var parts=text.split('::');title=parts[0].trim();text=parts[1].trim()}var cls=el.className.replace(/(jce_?)tooltip/gi,'');this.toolTip.title=el.title;DOM.attribute(el,'title','');var h='';if(title){h+='<h4>'+title+'</h4>'}if(text){h+='<p>'+text+'</p>'}var tn=DOM.get('jcemediabox-tooltip-text');if(typeof tn=='undefined'){this.toolTip.className='jcemediabox-tooltip-simple';this.toolTip.innerHTML=h}else{tn.innerHTML=h}DOM.style(t.toolTip,'visibility','visible');JCEMediaBox.FX.animate(t.toolTip,{'opacity':JCEMediaBox.options.tooltip.opacity},JCEMediaBox.options.tooltip.speed)},end:function(el){var t=this,DOM=JCEMediaBox.DOM;if(!this.tooltiptheme)return false;DOM.attribute(el,'title',this.toolTip.title);DOM.styles(this.toolTip,{'visibility':'hidden','opacity':0})},locate:function(e){if(!this.tooltiptheme)return false;this.create();var o=JCEMediaBox.options.tooltip.offsets;var page={'x':e.pageX||e.clientX+document.documentElement.scrollLeft,'y':e.pageY||e.clientY+document.documentElement.scrollTop};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var pos={'x':page.x+o.x,'y':page.y+o.y};var ah=0;switch(JCEMediaBox.options.tooltip.position){case'tl':pos.x=(page.x-tip.x)-o.x;pos.y=(page.y-tip.y)-(ah+o.y);break;case'tr':pos.x=page.x+o.x;pos.y=(page.y-tip.y)-(ah+o.y);break;case'tc':pos.x=(page.x-Math.round((tip.x/2)))+o.x;pos.y=(page.y-tip.y)-(ah+o.y);break;case'bl':pos.x=(page.x-tip.x)-o.x;pos.y=(page.y+Math.round((tip.y/2)))-(ah+o.y);break;case'br':pos.x=page.x+o.x;pos.y=page.y+o.y;break;case'bc':pos.x=(page.x-(tip.x/2))+o.x;pos.y=page.y+ah+o.y;break}JCEMediaBox.DOM.styles(this.toolTip,{top:pos.y,left:pos.x})},position:function(element){}},JCEMediaBox.Popup={addons:{'flash':{},'image':{},'html':{}},setAddons:function(n,o){JCEMediaBox.extend(this.addons[n],o)},getAddons:function(n){if(n){return this.addons[n]}return this.addons},getAddon:function(v,n){var t=this,cp=false,r,each=JCEMediaBox.each;addons=this.getAddons(n);each(this.addons,function(o,s){each(o,function(fn){r=fn.call(this,v);if(typeof r!='undefined'){cp=r}})});return cp},cleanEvent:function(s){return s.replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1')},params:function(s){var a=[],x=[];if(s instanceof Array){x=s}else{if(s.indexOf('&')!=-1){x=s.split(/&(amp;)?/g)}else{x=s.split(/;/g)}}JCEMediaBox.each(x,function(n,i){if(n){n=n.replace(/^([^\[]+)(\[|=|:)([^\]]*)(\]?)$/,function(a,b,c,d){if(d){if(!/[^0-9]/.test(d)){return'"'+b+'":'+parseInt(d)}return'"'+b+'":"'+d+'"'}return''});if(n){a.push(n)}}});return eval('({'+a.join(',')+'})')},getCookie:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e))},setCookie:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"")},convert:function(){var t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM;each(DOM.select('a[href]'),function(el){if(/com_jce/.test(el.href)){var p,s,r=[];var oc=DOM.attribute('onclick');s=oc.replace(/&amp;/g,'&').replace(/&#39;/g,"'").split("'");p=t.params(s[0]);img=p['img']||'';title=p['title']||'';if(img){if(!/http:\/\//.test(img)){if(img.charAt(0)=='/'){img=img.substr(1)}img=t.site.replace(/http:\/\/([^\/]+)/,'')+img}DOM.attributes(el,{'href':img,'title':title.replace(/_/,' '),'onclick':''});DOM.addClass(el,'jcepopup')}}})},translate:function(s){var t=this;if(!s){s=this.popup.theme}s=s.replace(/\{#(\w+?)\}/g,function(a,b){return JCEMediaBox.options.popup.labels[b]});return s},styles:function(o){var v,s,x=[];if(!o)return{};JCEMediaBox.each(o.split(';'),function(s,i){s=s.replace(/(.*):(.*)/,function(a,b,c){return"'"+b+"':'"+c+"'"});x.push(s)});return eval('({'+x.join(',')+'})')},getType:function(el){var o={},type;if(/(director|windowsmedia|mplayer|quicktime|real|divx|flash)/.test(el.type)){type=/(director|windowsmedia|mplayer|quicktime|real|divx|flash)/.exec(el.type)[1]}o=this.getAddon(el.src);if(o&&o.type){type=o.type}return type||el.type||'iframe'},mediatype:function(c){var ci,cb,mt;c=/(director|windowsmedia|mplayer|quicktime|real|divx|flash)/.exec(c);switch(c[1]){case'director':case'application/x-director':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'windowsmedia':case'mplayer':case'application/x-mplayer2':ci='6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'quicktime':case'video/quicktime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'real':case'realaudio':case'audio/x-pn-realaudio-plugin':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0';mt='audio/x-pn-realaudio-plugin';break;case'divx':case'video/divx':ci='67dabfbf-d0ab-41fa-9c46-cc0f21721616';cb='http://go.divx.com/plugin/DivXBrowserPlugin.cab';mt='video/divx';break;default:case'flash':case'application/x-shockwave-flash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0';mt='application/x-shockwave-flash';break}return{'classid':ci,'codebase':cb,'mediatype':mt}},islocal:function(s){if(/^(\w+):\/\//.test(s)){return new RegExp('^('+JCEMediaBox.site+')').test(s)}else{return true}},frameWidth:function(){var t=this,w=0,el=this.frame;JCEMediaBox.each(['left','right'],function(s){w=w+parseFloat(JCEMediaBox.DOM.style(el,'padding-'+s))});return parseFloat(this.frame.clientWidth-w)},frameHeight:function(){var t=this,h=0,el=this.frame,DIM=JCEMediaBox.Dimensions;JCEMediaBox.each(['top','bottom'],function(s){h=h+parseFloat(JCEMediaBox.DOM.style(el,'padding-'+s))});h=h+((JCEMediaBox.isIE6||JCEMediaBox.isIE7)?DIM.getScrollbarWidth():0);return parseInt(DIM.getHeight())-h},width:function(){return this.frameWidth()-JCEMediaBox.Dimensions.getScrollbarWidth()},height:function(){var h=0,t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,DIM=JCEMediaBox.Dimensions;each(['top','bottom'],function(s){var el=t['info-'+s];if(el){h=h+parseInt(DIM.outerHeight(el))}});return this.frameHeight()-h},printPage:function(){if(this.active.type=='image'){}else{}},zoom:function(el){var t=this,DOM=JCEMediaBox.DOM,extend=JCEMediaBox.extend,each=JCEMediaBox.each,s,m,x,y;var child=el.firstChild;var zoom=DOM.create('span');if(child&&child.nodeName=='IMG'){var align=child.getAttribute('align');var vspace=child.getAttribute('vspace');var hspace=child.getAttribute('hspace');var w=child.getAttribute('width')||child.style.width||0;var h=child.getAttribute('height')||child.style.height||0;var styles={'width':w,'height':h};each(['top','right','bottom','left'],function(pos){styles['margin-'+pos]=DOM.style(child,'margin-'+pos);styles['padding-'+pos]=DOM.style(child,'padding-'+pos);each(['width','style','color'],function(prop){styles['border-'+pos+'-'+prop]=DOM.style(child,'border-'+pos+'-'+prop)})});if(/\w+/.test(align)){extend(styles,{'float':/left|right/.test(align)?align:'','text-align':/top|middle|bottom/.test(align)?align:''})}if(vspace>0){extend(styles,{'margin-top':parseInt(vspace),'margin-bottom':parseInt(vspace)})}if(hspace>0){extend(styles,{'margin-left':parseInt(hspace),'margin-right':parseInt(hspace)})}extend(styles,{'float':DOM.style(child,'float'),'text-align':child.style.textAlign});function _buildIcon(el,zoom,child,styles){var pos,w=styles.width||0,h=styles.height||0;var span=DOM.add(el,'span',{'class':'jcemediabox-zoom-span','style':child.style.cssText});DOM.styles(span,styles);DOM.add(span,child);DOM.add(span,zoom);each(['style','align','border','hspace','vspace'],function(v,i){child.removeAttribute(v)});DOM.addClass(zoom,'jcemediabox-zoom-image');pos=el.className.match(/icon-(top-right|top-left|bottom-right|bottom-left|left|right|center|centre)/);if(pos){pos=pos[1];pos=(/^(left|right)/.test(pos))?'bottom '+pos:pos.replace(/-/,' ')}else{pos='bottom right'}var top=-h,left=0;if(JCEMediaBox.isIE6&&/\.png/i.test(DOM.style(zoom,'background-image'))){var zw=parseFloat(DOM.style(zoom,'width'));var zh=parseFloat(DOM.style(zoom,'height'));if(/(bottom)/.test(pos))top=-zh;if(/(right)/.test(pos))left=w-zw;DOM.style(zoom,'left',left);DOM.style(el,'position','static');DOM.png(zoom)}DOM.styles(zoom,{'top':top,'background-position':pos});DOM.styles(child,{'margin':0,'padding':0,'float':'none','border':'none'})}if(/^(0|auto)/.test(w)||/^(0|auto)/.test(h)){x=new Image();x.src=child.src;x.onload=function(){extend(styles,{width:parseInt(x.width),height:parseInt(x.height)});_buildIcon(el,zoom,child,styles)}}else{_buildIcon(el,zoom,child,styles)}}else{DOM.addClass(zoom,'jcemediabox-zoom-link');if(DOM.hasClass(el,'icon-left')){DOM.addBefore(el,zoom)}else{DOM.add(el,zoom)}if(JCEMediaBox.isIE7){DOM.style(zoom,'display','inline-block')}}return zoom},auto:function(){var t=this;JCEMediaBox.each(this.popups,function(el,i){if(el.auto){if(el.auto=='autopopup-single'){var cookie=t.getCookie('jceutilities_autopopup_'+el.id);if(!cookie){t.setCookie('jceutilities_autopopup_'+el.id,1);t.start(el)}}else if(el.auto=='autopopup-multiple'){t.start(el)}}})},init:function(){window.jcepopup=this;this.create()},create:function(){var t=this,auto=false,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event;this.popups=[],this.popuptheme='';if(JCEMediaBox.options.popup.legacy==1){t.convert()}each(DOM.select('a.jcebox, a.jcelightbox, a.jcepopup, area.jcebox, area.jcelightbox, area.jcepopup'),function(el,i){if(/(jcelightbox|jcebox)/.test(el.className)){DOM.removeClass(el,'jcelightbox');DOM.removeClass(el,'jcebox');DOM.addClass(el,'jcepopup')}if(!DOM.hasClass(el,'nopopup')){if(JCEMediaBox.options.popup.icons==1&&el.nodeName=='A'&&!/(noicon|icon-none|noshow)/.test(el.className)&&el.style.display!='none'){var zoom=t.zoom(el)}if(DOM.hasClass(el,'noshow')){DOM.hide(el)}var group='',p='';if(!auto&&el.id){if(c=el.className.match(/autopopup-(single|multiple)/)){auto=c[0]}}var title=el.title||'';var rel=el.rel||'';if(title&&/(\w+\[.*\])/.test(title)){p=t.params(title);DOM.attribute(el,'title',p.title||'');group=p.group||''}if(rel&&/(\w+\[.*\])/.test(rel)){var args=[];rel=rel.replace(/\b((\w+)\[(.*?)\])(;?)/g,function(a,b,c){args.push(b);return''});p=t.params(args);DOM.attribute(el,'rel',rel||p.rel||'');group=p.group||''}else{var rx='alternate|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark|nofollow|licence|tag|friend';var lb='(lightbox(\[(.*?)\])?)';var lt='(lyte(box|frame|show)(\[(.*?)\])?)';group=rel.replace(new RegExp('\s*('+rx+'|'+lb+'|'+lt+')\s*'),'','gi')}if(el.nodeName=='AREA'){if(!p){p=t.params(el.href)}group=group||'AREA_ELEMENT'}var o={'src':el.href,'title':p.title||title,'group':DOM.hasClass(el,'nogroup')?'':group,'type':p.type||el.type||'','params':p||{},'id':el.id||'','auto':auto};el.href=el.href.replace(/&type=(ajax|text\/html|text\/xml)/,'');t.popups.push(o);Event.add(el,'click',function(e){Event.cancel(e);return t.start(o,i)});auto=false}});var theme=JCEMediaBox.options.theme=='custom'?JCEMediaBox.options.themecustom:JCEMediaBox.options.theme;new JCEMediaBox.XHR({success:function(text,xml){var re=/<!-- THEME START -->([\s\S]*?)<!-- THEME END -->/;if(re.test(text)){text=re.exec(text)[1]}t.popuptheme=text;t.auto()}}).send(JCEMediaBox.site+JCEMediaBox.options.themepath+'/'+theme+'/popup.html')},open:function(url,title,group,type,params){var link={'src':url,'title':title,'group':group,'type':type,'params':params};return this.start(link)},start:function(p,i){var t=this,n=0,x=0,items=[],each=JCEMediaBox.each;if(this.build()){if(p.group){each(this.popups,function(o,x){if(o.group==p.group){items.push(o);if(i&&x==i){n=items.indexOf(o)}}});if(!p.auto&&typeof i=='undefined'){items.push(p);n=items.length-1}}else{items.push(p)}return this.show(items,n)}},build:function(){var t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event;this.page=DOM.add(document.body,'div',{id:'jcemediabox-popup-page'});if(JCEMediaBox.options.popup.overlay==1){this.overlay=DOM.add(this.page,'div',{id:'jcemediabox-popup-overlay',style:{'opacity':0,'background-color':JCEMediaBox.options.popup.overlaycolor}})}if(!this.popuptheme){return false}this.popuptheme=this.popuptheme.replace(/<!--(.*?)-->/g,'');this.popuptheme=this.translate(this.popuptheme);this.frame=DOM.add(this.page,'div',{id:'jcemediabox-popup-frame'},'<div id="jcemediabox-popup-body">'+this.popuptheme+'</div>');each(DOM.select('*[id]',this.frame),function(el){var s=el.id.replace('jcemediabox-popup-','');t[s]=el;DOM.hide(el)});Event.add(this.frame,'click',function(e){if(e.target&&e.target==t.frame){t.close()}});if(this.closelink){Event.add(this.closelink,'click',function(){return t.close()})}if(this.cancellink){Event.add(this.cancellink,'click',function(){return t.close()})}if(this.next){Event.add(this.next,'click',function(){return t.nextItem()})}if(this.prev){Event.add(this.prev,'click',function(){return t.previousItem()})}if(this.numbers){this.numbers.tmpHTML=this.numbers.innerHTML}if(this.print){Event.add(this.print,'click',function(){return t.printPage()})}if(JCEMediaBox.isIE6){DOM.png(this.body);each(DOM.select('*',this.body),function(el){if(DOM.attribute(el,'id')=='jcemediabox-popup-content'){return}DOM.png(el)})}return true},show:function(items,n){var t=this,DOM=JCEMediaBox.DOM,DIM=JCEMediaBox.Dimensions;this.items=items;this.bind(true);DOM.show(this.body);var top=(DIM.getHeight()-DIM.outerHeight(this.body))/2;DOM.style(this.body,'top',top);if(JCEMediaBox.isIE6||JCEMediaBox.options.popup.scrolling=='scroll'){DOM.style(this.page,'position','absolute');DOM.style(this.overlay,'height',DIM.getScrollHeight());DOM.style(this.body,'top',DIM.getScrollTop()+top)}if(JCEMediaBox.options.popup.overlay==1&&this.overlay){DOM.show(this.overlay);JCEMediaBox.FX.animate(this.overlay,{'opacity':JCEMediaBox.options.popup.overlayopacity},JCEMediaBox.options.popup.fadespeed)}return this.change(n)},bind:function(open){var t=this,isIE6=JCEMediaBox.isIE6,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event;if(isIE6){each(DOM.select('select'),function(el){if(open){el.tmpStyle=el.style.visibility||''}el.style.visibility=open?'hidden':el.tmpStyle})}if(JCEMediaBox.options.popup.hideobjects){each(DOM.select('object, embed'),function(el){if(el.id=='jcemediabox-popup-object')return;if(open){el.tmpStyle=el.style.visibility||''}el.style.visibility=open?'hidden':el.tmpStyle})}var scroll=JCEMediaBox.options.popup.scrollpopup;if(open){Event.add(document,'keydown',function(e){t.listener(e)});if(isIE6){Event.add(window,'scroll',function(e){DOM.style(t.overlay,'height',JCEMediaBox.Dimensions.getScrollHeight())});Event.add(window,'scroll',function(e){DOM.style(t.overlay,'width',JCEMediaBox.Dimensions.getScrollWidth())})}}else{if(isIE6||!scroll){Event.remove(window,'scroll');Event.remove(window,'resize')}Event.remove(document,'keydown')}},listener:function(e){switch(e.keyCode){case 27:this.close();break;case 37:this.previousItem();break;case 39:this.nextItem();break}},queue:function(n){var t=this,s=JCEMediaBox.options.popup.fadespeed,ss=JCEMediaBox.options.popup.scalespeed;var changed=false;JCEMediaBox.each(['top','bottom'],function(s){var el=t['info-'+s];if(el){var v=JCEMediaBox.Dimensions.outerHeight(el);var style={};style['top']=s=='top'?v:-v;JCEMediaBox.DOM.style(el,'z-index',-1);JCEMediaBox.FX.animate(el,style,ss,function(){if(!changed){changed=true;JCEMediaBox.FX.animate(t.content,{'opacity':0},JCEMediaBox.options.popup.fadespeed,function(){return t.change(n)})}})}})},nextItem:function(){if(this.items.length==1)return false;var n=this.index+1;if(n<0||n>=this.items.length){return false}return this.queue(n)},previousItem:function(){if(this.items.length==1)return false;var n=this.index-1;if(n<0||n>=this.items.length){return false}return this.queue(n)},info:function(){var each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event;if(this.caption){var title=this.active.caption||this.active.title||'',text='';var ex='([-!#$%&\'\*\+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'\*\+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+)';var ux='((news|telnet|nttp|file|http|ftp|https)://[-!#$%&\'\*\+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'\*\+\\./0-9=?A-Z^_`a-z{|}~]+)';function processRe(h){h=h.replace(new RegExp(ex,'g'),'<a href="mailto:$1" target="_blank" title="$1">$1</a>');h=h.replace(new RegExp(ux,'g'),'<a href="$1" target="_blank" title="$1">$1</a>');return h}if(/::/.test(title)){var parts=title.split('::');title=parts[0].trim();text=parts[1].trim()}var h='';if(title){h+='<h4>'+title+'</h4>'}if(text){h+='<p>'+text+'</p>'}this.caption.innerHTML=h;if((JCEMediaBox.isIE6||JCEMediaBox.isIE7)&&!h){this.caption.innerHTML='&nbsp;'}each(DOM.select('*',this.caption),function(el){if(el.nodeName!='A'){each(el.childNodes,function(n,i){if(n.nodeType==3){var s=n.innerText||n.textContent||n.data||null;if(s&&/(@|:\/\/)/.test(s)){if(s=processRe(s)){n.parentNode.innerHTML=s}}}})}})}var t=this,html='',len=this.items.length;if(this.numbers&&len>1){var html=this.numbers.tmpHTML||'{$numbers}';if(/\{\$numbers\}/.test(html)){this.numbers.innerHTML='';for(var i=0;i<len;i++){var n=i+1;var link=DOM.add(this.numbers,'a',{'href':'javascript:;','title':this.items[i].title||n,'class':(this.index==i)?'active':''},n);Event.add(link,'click',function(e){var x=parseInt(e.target.innerHTML)-1;if(t.index==x){return false}return t.queue(x)})}}if(/\{\$(current|total)\}/.test(html)){this.numbers.innerHTML=html.replace('{$current}',this.index+1).replace('{$total}',len)}}else{this.numbers.innerHTML=''}each(['top','bottom'],function(v,i){var el=t['info-'+v];if(el){el.style.visibility='hidden';DOM.show(el);each(DOM.select('*[id]',el),function(s){DOM.show(s)})}});DOM.hide(this.next);DOM.hide(this.prev);if(len>1){if(this.prev){if(this.index>0){DOM.show(this.prev)}else{DOM.hide(this.prev)}}if(this.next){if(this.index<len-1){DOM.show(this.next)}else{DOM.hide(this.next)}}}},change:function(n){var t=this,extend=JCEMediaBox.extend,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,isIE=JCEMediaBox.isIE;var p={},s,o,w,h;if(n<0||n>=this.items.length){return false}this.index=n;this.active={};DOM.show(this.container);if(this.loader){DOM.show(this.loader)}if(this.cancellink){DOM.show(this.cancellink)}if(this.object){this.object=null}this.content.innerHTML='';o=this.items[n];extend(p,this.getAddon(o.src,o.type));extend(p,o.params);extend(this.active,{'src':p.src||o.src,'title':o.title,'caption':p.caption||'','type':p.type||this.getType(o),'params':p||{},'width':p.width||JCEMediaBox.options.popup.width||0,'height':p.height||JCEMediaBox.options.popup.height||0});this.info();switch(this.active.type){case'image':if(this.print&&this.options.print){this.print.style.visibility='visible'}this.img=new Image();this.img.onload=function(){return t.setup()};this.img.src=this.active.src;break;case'flash':case'director':case'shockwave':case'mplayer':case'windowsmedia':case'quicktime':case'realaudio':case'real':case'divx':if(this.print){this.print.style.visibility='hidden'}p.src=this.active.src;var base=/:\/\//.test(p.src)?'':this.site;this.object='';w=this.width();h=this.height();var mt=this.mediatype(this.active.type);if(this.active.type=='flash'){p.wmode='transparent';p.base=base}if(/(mplayer|windowsmedia)/i.test(this.active.type)){p.baseurl=base;if(isIE){p.url=p.src;delete p.src}}delete p.title;delete p.group;p.width=this.active.width=p.width||w;p.height=this.active.height=p.height||h;function makeParam(args){var h='';for(n in args){if(args[n]){h+='<param name="'+n+'" value="'+args[n]+'" />'}}return h}var flash=/flash/i.test(this.active.type);if(flash||isIE){this.object='<object id="jcemediabox-popup-object" ';if(flash&&!isIE){this.object+='type="'+mt.mediatype+'" data="'+p.src+'" '}else{this.object+='codebase="'+mt.codebase+'" classid="clsid:'+mt.classid+'" '}for(n in p){if(p[n]!==''){if(/(id|name|width|height|style|type)$/.test(n)){t.object+=n+'="'+decodeURIComponent(p[n])+'"'}}}this.object+='>';for(n in p){if(p[n]!==''&&!/(id|name|width|height|style|type)/.test(n)){t.object+='<param name="'+n+'" value="'+decodeURIComponent(p[n])+'" />'}}this.object+='</object>'}else{this.object='<embed id="jcemediabox-popup-object"';for(n in p){if(p[n]!==''){t.object+=' '+n+'="'+decodeURIComponent(p[n])+'"'}}this.object+='></embed>'}this.active.type='media';this.setup();break;case'ajax':case'text/html':case'text/xml':if(this.print&&this.options.print){this.print.style.visibility='visible'}this.active.width=this.active.width||this.width();this.active.height=this.active.height||this.height();if(this.islocal(this.active.src)){if(!/tmpl=component/i.test(this.active.src)){this.active.src+=/\?/.test(this.active.src)?'&tmpl=component':'?tmpl=component'}this.active.type='ajax'}else{this.active.type='iframe';this.setup()}styles=extend(this.styles(p.styles),{display:'none'});this.ajax=DOM.add(this.content,'div',{id:'jcemediabox-popup-ajax','style':styles});if(JCEMediaBox.isIE6){DOM.style(this.ajax,'margin-right',JCEMediaBox.Dimensions.getScrollbarWidth())}if(JCEMediaBox.isIE7){DOM.style(this.ajax,'padding-right',JCEMediaBox.Dimensions.getScrollbarWidth())}this.active.src=this.active.src.replace(/\&type=(ajax|text\/html|text\/xml)/,'');new JCEMediaBox.XHR({method:'POST',success:function(text,xml){var data=text,html=data,re=/<body[^>]*>([\s\S]*?)<\/body>/;if(re.test(data)){html=re.exec(data)[1]}t.ajax.innerHTML=html;if(t.loader){DOM.show(t.loader)}each(DOM.select('a',t.content),function(el){JCEMediaBox.Event.add(el,'click',function(){if(el.href&&el.href.indexOf('#')==-1){t.close()}})});return t.setup()}}).send(this.active.src);break;case'iframe':default:if(this.print){this.print.style.visibility='hidden'}if(this.islocal(this.active.src)){if(!/tmpl=component/i.test(this.active.src)){this.active.src+=/\?/.test(this.active.src)?'&tmpl=component':'?tmpl=component'}}this.active.width=this.active.width||this.width();this.active.height=this.active.height||this.height();this.active.type='iframe';this.setup();break}return false},resize:function(w,h,x,y){if(w>x){h=h*(x/w);w=x;if(h>y){w=w*(y/h);h=y}}else if(h>y){w=w*(y/h);h=y;if(w>x){h=h*(x/w);w=x}}w=Math.round(w);h=Math.round(h);return{width:Math.round(w),height:Math.round(h)}},setup:function(){var t=this,DOM=JCEMediaBox.DOM,Event=JCEMediaBox.Event,w,h;w=this.active.width;h=this.active.height;if(this.active.type=='image'){var x=this.img.width;var y=this.img.height;w=w||x;h=h||y;if(w!=x||h!=y){var dim=this.resize(x,y,w,h);w=dim.width;h=dim.height}}if(JCEMediaBox.options.popup.resize==1||JCEMediaBox.options.popup.scrolling=='fixed'){var x=this.width();var y=this.height();var dim=this.resize(w,h,x,y);w=dim.width;h=dim.height}DOM.styles(this.content,{width:w,height:h});DOM.hide(this.content);if(this.active.type=='image'){this.content.innerHTML='<img id="jcemediabox-popup-img" src="'+this.active.src+'" title="'+this.active.title+'" width="'+w+'" height="'+h+'" />'}return this.animate()},animate:function(){var t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM,FX=JCEMediaBox.FX,DIM=JCEMediaBox.Dimensions;var ss=JCEMediaBox.options.popup.scalespeed,fs=JCEMediaBox.options.popup.fadespeed;var cw=DIM.outerWidth(this.content);var ch=DIM.outerHeight(this.content);var ih=0;each(['top','bottom'],function(v,i){var el=t['info-'+v];if(el){ih=ih+DIM.outerHeight(el)}});var st=DOM.style(this.page,'position')=='fixed'?0:DIM.getScrollTop();var top=st+(this.frameHeight()/2)-((ch+ih)/2);DOM.style(this.content,'opacity',0);FX.animate(this.body,{'height':ch,'top':top,'width':cw},ss,function(){if(t.loader){DOM.hide(t.loader)}if(t.active.type=='media'&&t.object){t.content.innerHTML=t.object}DOM.show(t.content);if(t.active.type=='ajax'){DOM.show(t.ajax)}t.content.focus();if(t.active.type=='iframe'){t.iframe=DOM.add(t.content,'iframe',{id:'jcemediabox-popup-iframe',frameBorder:0,allowTransparency:true,scrolling:t.active.params.scrolling||'auto','style':{width:t.active.width,height:t.active.height}});t.iframe.setAttribute('src',t.active.src)}function showInfo(){var itop=t['info-top'];if(itop){each(DOM.select('*[id]',itop),function(el){if(/jcemediabox-popup-(next|prev)/.test(DOM.attribute(el,'id'))){return}DOM.show(el)});var h=DIM.outerHeight(itop);DOM.styles(itop,{'z-index':-1,'top':h,'visibility':'visible'});FX.animate(itop,{'top':0},ss,function(){itop.style.zIndex=0})}var ibottom=t['info-bottom'];if(ibottom){each(DOM.select('*[id]',ibottom),function(el){if(/jcemediabox-popup-(next|prev)/.test(DOM.attribute(el,'id'))){return}DOM.show(el)});var h=DIM.outerHeight(ibottom);DOM.styles(ibottom,{'z-index':-1,'top':-h,'visibility':'visible'});FX.animate(ibottom,{'top':0},ss,function(){ibottom.style.zIndex=0})}if(t.closelink){DOM.show(t.closelink)}}if(JCEMediaBox.isIE&&t.active.type=='media'){DOM.style(t.content,'opacity',1);showInfo()}else{FX.animate(t.content,{'opacity':1},fs,function(){showInfo()})}})},close:function(){var t=this,each=JCEMediaBox.each,DOM=JCEMediaBox.DOM;each(['img','object','iframe','ajax'],function(i,v){t[v]=null});if(this.closelink){DOM.hide(this.closelink)}this.content.innerHTML='';each(['top','bottom'],function(i,v){if(t['info-'+v]){DOM.hide(t['info-'+v])}});DOM.remove(this.frame);if(this.overlay){if(JCEMediaBox.isIE6){this.bind();DOM.remove(this.page)}else{JCEMediaBox.FX.animate(this.overlay,{'opacity':0},JCEMediaBox.options.popup.fadespeed,function(){t.bind();DOM.remove(t.page)})}}else{DOM.remove(this.page)}return false}}})();JCEMediaBox.Event.addUnload(function(){JCEMediaBox.Event.destroy()});

/*  */
JCEMediaBox.Popup.setAddons('flash',{flash:function(v){if(/\.swf\b/.test(v)){return{type:'flash'}}},youtube:function(v){if(/youtube(.+)\/(.+)/.test(v)){if(/v=/g.test(v)){s=v.replace(/(.+)v=([^&\/]+)/g,'v/$2')}else{s='v'+v.substring(v.lastIndexOf('/'))}return{width:425,height:350,type:'flash','wmode':'opaque','src':v.replace(/(youtube([^\/]+)\/)(.+)/,function(a,b){return b+s})}}},metacafe:function(v){if(/metacafe(.+)\/(watch|fplayer)\/(.+)/.test(v)){var s=tinymce.trim(v);if(!/\.swf/i.test(s)){if(s.charAt(s.length-1)=='/'){s=s.substring(0,s.length-1)}s=s+'.swf'}return{width:400,height:345,type:'flash',attributes:{'flash_wmode':'opaque','src':s.replace(/watch/i,'fplayer')}}}},dailymotion:function(v){if(/dailymotion(.+)\/(swf|video)\//.test(v)){var s=tinymce.trim(v);s=s.replace(/_(.*)/,'');return{width:420,height:339,type:'flash','wmode':'opaque','src':s.replace(/video/i,'swf')}}},googlevideo:function(v){if(/google(.+)\/(videoplay|googleplayer\.swf)\?docid=(.+)/.test(v)){return{width:425,height:326,type:'flash','id':'VideoPlayback','wmode':'opaque','src':v.replace(/videoplay/g,'googleplayer.swf')}}},vimeo:function(v){if(/vimeo.com\/([0-9]+)/.test(v)){return{width:400,height:320,type:'flash','wmode':'opaque','src':v.replace(/vimeo.com\/([0-9]+)/,'vimeo.com/moogaloop.swf?clip_id=$1')}}}});JCEMediaBox.Popup.setAddons('image',{image:function(v){if(/\.(jpg|jpeg|png|gif|bmp|tif)$/i.test(v)){return{type:'image'}}}});

/*  */
JCEMediaBox.Popup.setAddons('flash',{twitvid:function(v){if(/twitvid(.+)\/(.+)/.test(v)){var s='http://www.twitvid.com/player/';return{width:425,height:344,type:'flash','allowFullScreen':true,'allowscriptaccess':'always','allowNetworking':'all','wmode':'transparent','src':v.replace(/(.+)twitvid([^\/]+)\/(.+)/,function(a,b,c,d){return s+d})}}}});JCEMediaBox.Popup.setAddons('image',{twitpic:function(v){if(/twitpic(.+)\/(.+)/.test(v)){return{type:'image'}}}});

/*  */
//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License.

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

/*  */
/*
# ------------------------------------------------------------------------
# JA T3v2 Plugin - Template framework for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license - GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details 
# on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

function switchFontSize (ckname,val){
	var bd = document.getElementsByTagName('body');
	if (!bd || !bd.length) return;
	bd = bd[0];
	var oldclass = 'fs'+CurrentFontSize;
	switch (val) {
		case 'inc':
			if (CurrentFontSize+1 < 7) {
				CurrentFontSize++;
			}		
		break;
		case 'dec':
			if (CurrentFontSize-1 > 0) {
				CurrentFontSize--;
			}		
		break;
		case 'reset':
		default:
			CurrentFontSize = DefaultFontSize;			
	}
	var newclass = 'fs'+CurrentFontSize;
	bd.className = bd.className.replace(new RegExp('fs.?', 'g'), '');
	bd.className = trim(bd.className);
	bd.className += (bd.className?' ':'') + newclass;
	createCookie(ckname, CurrentFontSize, 365);
}

function switchTool (ckname, val) {
	createCookie(ckname, val, 365);
	window.location.reload();
}

function cpanel_reset () {	
	var matches = document.cookie.match('(?:^|;)\\s*' + tmpl_name.escapeRegExp() + '_([^=]*)=([^;]*)', 'g');
	if (!matches) return;
	for (i=0;i<matches.length;i++) {
		var ck = matches[i].match('(?:^|;)\\s*' + tmpl_name.escapeRegExp() + '_([^=]*)=([^;]*)');
		if (ck) {
			createCookie (tmpl_name+'_'+ck[1], '', -1);
		}
	}
	
	if (window.location.href.indexOf ('?')>-1) window.location.href = window.location.href.substr(0,window.location.href.indexOf ('?'));
	else window.location.reload();
}

function cpanel_apply () {
	var elems = document.getElementById('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] = getDeepestWrapper (el); 
		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_;
}

/*  */
/*
# ------------------------------------------------------------------------
# JA T3v2 Plugin - Template framework for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license - GNU/GPL V2, http://www.gnu.org/licenses/gpl2.html. For details 
# on licensing, Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

var jaMegaMenuMoo = new Class({

	initialize: function(menu, options){
		this.options = $extend({
			slide:	true, //enable slide
			duration: 300, //slide speed. lower for slower, bigger for faster
			fading: false, //Enable fading
			bgopacity: 0.9, //set the transparent background. 0 to disable, 0<bgopacity<1: the opacity of the background
			delayHide: 500,
			direction: 'down',
			action: 'mouseenter', //mouseenter or click
			hidestyle: 'normal'
		}, options || {});
		//ignore delayHide if no animation
		if (!this.options.slide && !this.options.fading) this.options.delayHide = 10;
		
		this.menu = menu;
		this.childopen = new Array();
		this.imageloaded = false;
		this.loaded = false;
		//window.addEvent('load', this.start.bind(this));
		this.start();
	},
	
	start: function () {
		//do nothing if loaded
		if (this.loaded) return;
		
		this.menu = $(this.menu);
		//preload images
		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;
				
				//call this start if cannot load image after sometime
				this.start.delay (3000, this);
				return ;
			}
		}
		
		//mark as called
		this.loaded = true;
		
		//get wrapper
		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.setStyle ('position', 'relative');
		this.items.each (function(li) {
			//link item
			if ((a = li.getElement('a.mega')) && this.isChild (a, li)) li.a = a;
			else li.a = null;
			//parent
			li._parent = this.getParent (li);
			//child content
			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});
				//fix for overflow
				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;
					//fix for ie6/7
					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);
					}
				}

				//show direction
				if (this.options.direction == 'up') {
					if (li.level0) {
						li.childcontent.setStyle ('top', -li.childcontent.offsetHeight); //ajust top position
					} else {
						li.childcontent.setStyle ('bottom', 0);
					}
				}
			}
			else li.childcontent = null;
			
			if (li.childcontent && this.options.bgopacity) {
				//Make transparent background
				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 ({'width': li._w});
				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);
				}
				//Init Fx.Styles for childcontent
				li.fx = new Fx.Styles(li.childcontent_inner, {duration: this.options.duration, transition: Fx.Transitions.linear, onComplete: this.itemAnimDone.bind(this, li)});
				//effect
				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;
					//li.eff_off['margin-top'] = -li._h;
				}
			}
			
			if (this.options.action=='click' && li.childcontent) {
				li.addEvent('click', function(e) {
					var event = new Event (e);
					if (li.hasClass ('group')) return;
					if (li.childcontent) {
						if (li.status == 'open') {
							if (this.cursorIn (li, event)) {
								this.itemHide (li);
							} else {
								this.itemHideOthers(li);
							}
						} else {
							this.itemShow (li);
						}
					} else {
						if (li.a) location.href = li.a.href;
					}
					event.stop();
				}.bind (this));
			
				//If action is click, click on windows will close all submenus
				this.windowClickFn = function (e) {		
					this.itemHideOthers(null);
				}.bind (this);				
			}

			if (this.options.action == 'mouseover' || this.options.action == 'mouseenter') {
				li.addEvent('mouseenter', function(e) {
					if (li.hasClass ('group')) return;
					$clear (li.timer);
					this.itemShow (li);
					e.stop();
				}.bind (this));
				
				li.addEvent('mouseleave', function(e) {
					if (li.hasClass ('group')) return;
					$clear (li.timer);
					if (li.childcontent) li.timer = this.itemHide.delay(this.options.delayHide, this, [li, e]);
					else this.itemHide (li, e);
					e.stop();
				}.bind (this));
				
				//if has childcontent, don't goto link before open childcontent - fix for touch screen
				if (li.a && li.childcontent) {
					li.clickable = false;
					li.a.addEvent ('click',function (e){
						if (!li.clickable) {
							new Event(e).stop();
						}
					}.bind (this));
				}
				
			}
			
			//when click on a link - close all open childcontent
			if (li.a && !li.childcontent) {
				li.a.addEvent ('click',function (e){
					this.itemHideOthers (null);
					//Remove current class
					this.menu.getElements ('.active').removeClass ('active');
					//Add current class
					var p = li;
					while (p) {
						p.addClass ('active');
						p.a.addClass ('active');
						p = p._parent;
					}
					//new Event (e).stop();
				}.bind (this));
			}
			
			if (li.childcontent) this.positionSubmenu (li);
		},this);
		
		if (this.options.slide || this.options.fading) {
			//hide all content child
			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; //don't need do anything
		//Setup the class
		this.itemOver (li);
		//push to show queue
		li.status = 'open';
		this.enableclick.delay (100, this, li);
		this.childopen.push (li);
		//hide other
		this.itemHideOthers (li);
		if (li.childcontent) {
			if (this.options.action=='click' && this.childopen.length && !this.windowClickEventAdded) {
				//addEvent click for window
				$(document.body).addEvent ('click', this.windowClickFn);
				this.windowClickEventAdded = true;
			}
			//reposition the submenu
			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);
		//if (li._parent) this.itemShow (li._parent);
	},
	
	itemHide: function (li, e) {
		if (e && e.page) { //if event
			if (this.cursorIn (li, e) || this.cursorIn (li.childcontent, e)) {
				return;
			} //cursor in li
			var p=li._parent;
			if (p && !this.cursorIn (p, e) && !this.cursorIn(p.childcontent, e)) {
				p.fireEvent ('mouseleave', e); //fire mouseleave event
			}
		}
		clearTimeout(li.timer);
		this.itemOut(li);
		li.status = 'close';
		this.childopen.remove (li);
		if (li.childcontent) {
			if (this.options.action=='click' && !this.childopen.length && this.windowClickEventAdded) {
				//removeEvent click for window
				$(document.body).removeEvent ('click', this.windowClickFn);
				this.windowClickEventAdded = false;
			}
		}
		
		if (!$defined(li.fx) || !$defined(li.childcontent)) return;
		
		if (li.childcontent.getStyle ('opacity') == 0) return;
		li.childcontent.setStyles ({'overflow': 'hidden'});
		if (li.childcontent_inner1.ol) li.childcontent_inner1.setStyles ({'overflow': 'hidden'});
		li.fx.stop();
		switch (this.options.hidestyle) {
		case 'fast': 
			li.fx.options.duration = 100;
			li.fx.start ($merge(li.eff_off,{'opacity':0}));
			break;
		case 'fastwhenshow': //when other show
			if (!e) { //force hide, not because of event => hide fast
				//li.fx.options.duration = 300;
				li.fx.start ($merge(li.eff_off,{'opacity':0}));
			} else {	//hide as normal
				li.fx.start (li.eff_off);
			}
			break;
		case 'normal':
		default:
			li.fx.start (li.eff_off);
			break;
		}
		//li.fx.start (li.eff_off);		
	},
	
	itemAnimDone: function (li) {
		//hide done
		if (li.status == 'close'){
			//reset duration and enable opacity if not fading
			if (this.options.hidestyle.test (/fast/)) {
				li.fx.options.duration = this.options.duration;
				if (!this.options.fading) li.childcontent_inner.setStyle ('opacity', 1);
			}
			//hide
			li.childcontent.setStyles ({'display': 'none'});
			this.disableclick.delay (100, this, li);
		}
		
		//show done
		if (li.status == 'open'){
			li.childcontent.setStyles ({'overflow': ''});
			if (li.childcontent_inner1.ol) li.childcontent_inner1.setStyles ({'overflow-y': 'auto'});
		}
	},
	
	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) {
				//check position
				var lcor = li.getCoordinates();
				var ccor = li.childcontent.getCoordinates();
				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 {
				//check position
				var lcor = li.getCoordinates();						
				var ccor = li.childcontent.getCoordinates();
				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 {
			//check if it's out of view-port
			var lcor = li.getCoordinates();
			var ccor = li.childcontent.getCoordinates();
			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) {
				//change the direction and position for submenu
				li.childcontent.setStyle ('margin-left', -ccor.width + 20);
				li.eff_on['margin-left'] = 0;
				li.eff_off['margin-left'] = li._w + 20;
				li.childcontent_inner.setStyle ('margin-left', li.eff_off['margin-left']);
			}
		}		
	}
});


/*  */
/**
* @version		$Id: caption.js 5263 2006-10-02 01:25:24Z webImagery $
* @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

/**
* JCaption javascript behavior
*
* Used for displaying image captions
*
* @package	Joomla
* @since	1.5
* @version	1.0
*/
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;
		}

		//Windows fix
		if (!align)
			align = element.getStyle("float");  // Rest of the world fix
		if (!align) // IE DOM Fix
			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
});


/*  */
/******************************************************************************
Name:    Highslide JS
Version: 4.1.7 (September 28 2009)
Config:  default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash +packed
Author:  Torstein Hønsi
Support: http://highslide.com/support

Licence:
Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5
License (http://creativecommons.org/licenses/by-nc/2.5/).

You are free:
	* to copy, distribute, display, and perform the work
	* to make derivative works

Under the following conditions:
	* Attribution. You must attribute the work in the manner  specified by  the
	  author or licensor.
	* Noncommercial. You may not use this work for commercial purposes.

* For  any  reuse  or  distribution, you  must make clear to others the license
  terms of this work.
* Any  of  these  conditions  can  be  waived  if  you  get permission from the 
  copyright holder.

Your fair use and other rights are in no way affected by the above.
******************************************************************************/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('q(!m){A m={Z:{9m:\'aB\',b7:\'dE...\',aQ:\'8x 2d dF\',bk:\'8x 2d dD 2d dC\',9k:\'dA 2d dB D (f)\',cc:\'dG by <i>aa ac</i>\',cg:\'dH 2d dM aa ac dN\',8z:\'a9\',8N:\'a5\',8P:\'ab\',8T:\'am\',8Q:\'am (dL)\',aT:\'dK\',a6:\'ak\',ad:\'ak 1p (al)\',bd:\'aj\',a8:\'aj 1p (al)\',8y:\'a9 (8g 18)\',8O:\'a5 (8g 3l)\',8M:\'ab\',aY:\'1:1\',3A:\'dJ %1 dz %2\',9F:\'8x 2d 24 2D, dy ar do 2d 3w. dp 8g dm N 1B ar 31.\'},5c:\'K/dj/\',7L:\'dk.5e\',6o:\'dl.5e\',6B:5B,96:5B,4o:15,93:15,51:15,6y:15,4v:dq,b6:0.75,9y:L,9a:5,3M:2,dr:3,5E:1j,bo:\'4I 3l\',bn:1,bw:L,ck:\'dw://K.dx/\',cd:\'dv\',aJ:L,91:[\'a\',\'55\'],3h:[],cf:5B,43:0,7X:50,6P:1j,8K:L,4P:L,3O:\'6p\',7V:L,4h:\'1Q\',9p:\'1Q\',aU:I,aV:I,9H:L,4D:ap,6w:ap,67:L,1Z:\'du-ds\',7Q:{2U:\'<O 1W="K-2U"><5W>\'+\'<1L 1W="K-31">\'+\'<a 23="#" 2h="{m.Z.8y}">\'+\'<1E>{m.Z.8z}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-3S">\'+\'<a 23="#" 2h="{m.Z.ad}">\'+\'<1E>{m.Z.a6}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-3e">\'+\'<a 23="#" 2h="{m.Z.a8}">\'+\'<1E>{m.Z.bd}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-1B">\'+\'<a 23="#" 2h="{m.Z.8O}">\'+\'<1E>{m.Z.8N}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-3w">\'+\'<a 23="#" 2h="{m.Z.8M}">\'+\'<1E>{m.Z.8P}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-19-2I">\'+\'<a 23="#" 2h="{m.Z.9k}">\'+\'<1E>{m.Z.aY}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-24">\'+\'<a 23="#" 2h="{m.Z.8Q}" >\'+\'<1E>{m.Z.8T}</1E></a>\'+\'</1L>\'+\'</5W></O>\',aR:\'<O 1W="K-ec"><5W>\'+\'<1L 1W="K-31">\'+\'<a 23="#" 2h="{m.Z.8y}" 2k="E m.31(k)">\'+\'<1E>{m.Z.8z}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-1B">\'+\'<a 23="#" 2h="{m.Z.8O}" 2k="E m.1B(k)">\'+\'<1E>{m.Z.8N}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-3w">\'+\'<a 23="#" 2h="{m.Z.8M}" 2k="E 1j">\'+\'<1E>{m.Z.8P}</1E></a>\'+\'</1L>\'+\'<1L 1W="K-24">\'+\'<a 23="#" 2h="{m.Z.8Q}" 2k="E m.24(k)">\'+\'<1E>{m.Z.8T}</1E></a>\'+\'</1L>\'+\'</5W></O>\'+\'<O 1W="K-1f"></O>\'+\'<O 1W="K-e9"><O>\'+\'<1E 1W="K-3W" 2h="{m.Z.aT}"><1E></1E></1E>\'+\'</O></O>\'},6e:[],a3:L,Y:[],9Z:[\'67\',\'3y\',\'4h\',\'9p\',\'aU\',\'aV\',\'1Z\',\'3M\',\'ef\',\'ek\',\'em\',\'b3\',\'ej\',\'ei\',\'eg\',\'b2\',\'cj\',\'9H\',\'3T\',\'62\',\'3h\',\'43\',\'M\',\'P\',\'9P\',\'6P\',\'8K\',\'4P\',\'eh\',\'di\',\'e7\',\'2E\',\'7V\',\'45\',\'4Q\',\'3O\',\'81\',\'9J\',\'4D\',\'6w\',\'6G\',\'b0\',\'2O\',\'2V\',\'cN\',\'cq\',\'1e\'],1S:[],5F:0,8V:{x:[\'bL\',\'18\',\'4S\',\'3l\',\'bJ\'],y:[\'6v\',\'16\',\'95\',\'4I\',\'7w\']},7A:{},b2:{},b3:{},81:{aF:{},29:{},ay:{}},3V:[],6d:[],4B:{},4y:[],7o:[],5m:[],7s:{},7Z:{},7i:[],49:/dU\\/4\\.0/.1a(4C.6t)?8:8A((4C.6t.5P().2t(/.+(?:au|dV|dT|1A)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1A:(V.6k&&!2a.3L),4x:/cA/.1a(4C.6t),6i:/dS.+au:1\\.[0-8].+dR/.1a(4C.6t),$:C(1w){q(1w)E V.8C(1w)},2n:C(2b,3n){2b[2b.W]=3n},1c:C(ba,3U,4c,5V,bc){A el=V.1c(ba);q(3U)m.3E(el,3U);q(bc)m.R(el,{8a:0,8k:\'1x\',9z:0});q(4c)m.R(el,4c);q(5V)5V.1X(el);E el},3E:C(el,3U){N(A x 3c 3U)el[x]=3U[x];E el},R:C(el,4c){N(A x 3c 4c){q(m.1A&&x==\'1z\'){q(4c[x]>0.99)el.G.dZ(\'6q\');J el.G.6q=\'b9(1z=\'+(4c[x]*2v)+\')\'}J el.G[x]=4c[x]}},2w:C(el,1d,3u){A 4z,59,4k;q(1F 3u!=\'7a\'||3u===I){A 2C=bh;3u={44:2C[2],2V:2C[3],6L:2C[4]}}q(1F 3u.44!=\'3A\')3u.44=5B;3u.2V=1o[3u.2V]||1o.b8;3u.7c=m.3E({},1d);N(A 3a 3c 1d){A e=1I m.fx(el,3u,3a);4z=8A(m.8j(el,3a))||0;59=8A(1d[3a]);4k=3a!=\'1z\'?\'F\':\'\';e.3q(4z,59,4k)}},8j:C(el,1d){q(V.82){E V.82.bz(el,I).bx(1d)}J{q(1d==\'1z\')1d=\'6q\';A 3n=el.6s[1d.2f(/\\-(\\w)/g,C(a,b){E b.aX()})];q(1d==\'6q\')3n=3n.2f(/b9\\(1z=([0-9]+)\\)/,C(a,b){E b/2v});E 3n===\'\'?1:3n}},7I:C(){A d=V,w=2a,5C=d.7N&&d.7N!=\'8o\'?d.47:d.1f;A M=m.1A?5C.8w:(d.47.8w||7g.e2),P=m.1A?5C.cu:7g.e0;m.4j={M:M,P:P,5Q:m.1A?5C.5Q:e1,5K:m.1A?5C.5K:cS}},6D:C(el){q(/55/i.1a(el.3F)){A 7h=V.2z(\'1M\');N(A i=0;i<7h.W;i++){A u=7h[i].cR;q(u&&u.2f(/^.*?#/,\'\')==el.22.3a){el=7h[i];5p}}}A p={x:el.4T,y:el.87};5h(el.b5){el=el.b5;p.x+=el.4T;p.y+=el.87;q(el!=V.1f&&el!=V.47){p.x-=el.5Q;p.y-=el.5K}}E p},2I:C(a,29,3q,T){q(!a)a=m.1c(\'a\',I,{1n:\'1x\'},m.28);q(1F a.66==\'C\')E 29;q(T==\'3z\'){N(A i=0;i<m.4y.W;i++){q(m.4y[i]&&m.4y[i].a==a){m.4y[i].c3();m.4y[i]=I;E 1j}}m.aI=L}1C{1I m.5U(a,29,3q,T);E 1j}1D(e){E L}},94:C(a,29,3q){E m.2I(a,29,3q,\'3z\')},9N:C(){E m.1c(\'O\',{1b:\'K-3z-S\',2i:m.7O(m.7Q.aR)})},4R:C(el,3F,1b){A 1l=el.2z(3F);N(A i=0;i<1l.W;i++){q((1I 4W(1b)).1a(1l[i].1b)){E 1l[i]}}E I},7O:C(s){s=s.2f(/\\s/g,\' \');A 2l=/{m\\.Z\\.([^}]+)\\}/g,5R=s.2t(2l),Z;q(5R)N(A i=0;i<5R.W;i++){Z=5R[i].2f(2l,"$1");q(1F m.Z[Z]!=\'1U\')s=s.2f(5R[i],m.Z[Z])}E s},cI:C(){A 1l=V.2z(\'a\');N(A i=0;i<1l.W;i++){A T=m.aD(1l[i]);q(T&&!1l[i].aC){(C(){A t=T;q(m.1y(m,\'cP\',{7E:1l[i],T:t})){1l[i].2k=(T==\'2D\')?C(){E m.2I(k)}:C(){E m.94(k,{2E:t})}}})();1l[i].aC=L}}m.6r()},aD:C(el){q(el.7r==\'K\')E\'2D\';J q(el.7r==\'K-2S\')E\'2S\';J q(el.7r==\'K-1h\')E\'1h\';J q(el.7r==\'K-3x\')E\'3x\'},7W:C(a){N(A i=0;i<m.5m.W;i++){q(m.5m[i][0]==a){A c=m.5m[i][1];m.5m[i][1]=c.6u(1);E c}}E I},bB:C(e){A 2b=m.6r();N(A i=0;i<2b.57.W;i++){A a=2b.57[i];q(m.42(a,\'2E\')==\'2S\'&&m.42(a,\'7V\'))m.2n(m.7o,a)}m.88(0)},88:C(i){q(!m.7o[i])E;A a=m.7o[i];A 5T=m.4r(m.42(a,\'9P\'));q(!5T)5T=m.9N();A 2S=1I m.7p(a,5T,1);2S.90=C(){};2S.3t=C(){m.2n(m.5m,[a,5T]);m.88(i+1)};2S.92()},aK:C(){A 85=0,72=-1,Y=m.Y,B,1G;N(A i=0;i<Y.W;i++){B=Y[i];q(B){1G=B.U.G.1G;q(1G&&1G>85){85=1G;72=i}}}q(72==-1)m.3b=-1;J Y[72].3I()},42:C(a,65){a.66=a.2k;A p=a.66?a.66():I;a.66=I;E(p&&1F p[65]!=\'1U\')?p[65]:(1F m[65]!=\'1U\'?m[65]:I)},7q:C(a){A 1e=m.42(a,\'1e\');q(1e)E 1e;E a.23},4r:C(1w){A 1P=m.$(1w),4H=m.7Z[1w],a={};q(!1P&&!4H)E I;q(!4H){4H=1P.6u(L);4H.1w=\'\';m.7Z[1w]=4H;E 1P}J{E 4H.6u(L)}},3G:C(d){q(d)m.9d.1X(d);m.9d.2i=\'\'},1u:C(B){C 4X(1d){E\'bG( ( ( cK = V.47.\'+1d+\' ? V.47.\'+1d+\' : V.1f.\'+1d+\' ) ) + \\\'F\\\' );\'}q(!m.2W){m.2W=m.1c(\'O\',{1b:\'K-dg K-2y-D\',68:\'\',2k:C(){q(m.1y(m,\'df\'))m.24()}},{1m:\'21\',1z:0},m.28,L)}m.2W.G.1n=\'\';m.2W.68+=\'|\'+B.Q;q(m.6i&&m.aM)m.R(m.2W,{9B:\'7M(\'+m.5c+\'d9.ai)\',1z:1});J m.2w(m.2W,{1z:B.43},m.7X)},9s:C(Q){q(!m.2W)E;q(1F Q!=\'1U\')m.2W.68=m.2W.68.2f(\'|\'+Q,\'\');q((1F Q!=\'1U\'&&m.2W.68!=\'\')||(m.2q&&m.42(m.2q,\'43\')))E;q(m.6i&&m.aM)m.2W.G.1n=\'1x\';J m.2w(m.2W,{1z:0},m.7X,I,C(){m.2W.G.1n=\'1x\'})},8B:C(7H,B){A 1i=B=B||m.2F();q(m.2q)E 1j;J m.1i=1i;1C{m.2q=7H;7H.2k()}1D(e){m.1i=m.2q=I}1C{q(!7H||B.3h[1]!=\'41\')B.24()}1D(e){}E 1j},7D:C(el,2p){A B=m.2F(el);q(B)E m.8B(B.7U(2p),B);J E 1j},31:C(el){E m.7D(el,-1)},1B:C(el){E m.7D(el,1)},6U:C(e){q(!e)e=2a.2B;q(!e.2H)e.2H=e.9X;q(1F e.2H.a2!=\'1U\')E L;q(!m.1y(m,\'de\',e))E L;A B=m.2F();A 2p=I;ao(e.d6){2c 70:q(B)B.73();E L;2c 32:2p=2;5p;2c 34:2c 39:2c 40:2p=1;5p;2c 8:2c 33:2c 37:2c 38:2p=-1;5p;2c 27:2c 13:2p=0}q(2p!==I){q(2p!=2)m.4Y(V,2a.3L?\'97\':\'9b\',m.6U);q(!m.aJ)E L;q(e.58)e.58();J e.bl=1j;q(B){q(2p==0){B.24()}J q(2p==2){q(B.1p)B.1p.bq()}J{q(B.1p)B.1p.3e();m.7D(B.Q,2p)}E 1j}}E L},d3:C(11){m.2n(m.1S,m.3E(11,{1V:\'1V\'+m.5F++}))},d0:C(1s){A 35=1s.2O;q(1F 35==\'7a\'){N(A i=0;i<35.W;i++){A o={};N(A x 3c 1s)o[x]=1s[x];o.2O=35[i];m.2n(m.6d,o)}}J{m.2n(m.6d,1s)}},9O:C(7E,7F){A el,2l=/^K-U-([0-9]+)$/;el=7E;5h(el.22){q(el.6S!==1U)E el.6S;q(el.1w&&2l.1a(el.1w))E el.1w.2f(2l,"$1");el=el.22}q(!7F){el=7E;5h(el.22){q(el.3F&&m.6K(el)){N(A Q=0;Q<m.Y.W;Q++){A B=m.Y[Q];q(B&&B.a==el)E Q}}el=el.22}}E I},2F:C(el,7F){q(1F el==\'1U\')E m.Y[m.3b]||I;q(1F el==\'3A\')E m.Y[el]||I;q(1F el==\'9l\')el=m.$(el);E m.Y[m.9O(el,7F)]||I},6K:C(a){E(a.2k&&a.2k.cp().2f(/\\s/g,\' \').2t(/m.(d2|e)d8/))},bi:C(){N(A i=0;i<m.Y.W;i++)q(m.Y[i]&&m.Y[i].6f)m.aK()},1y:C(5Y,9R,2C){E 5Y&&5Y[9R]?(5Y[9R](5Y,2C)!==1j):L},8q:C(e){q(!e)e=2a.2B;q(e.dd>1)E L;q(!e.2H)e.2H=e.9X;A el=e.2H;5h(el.22&&!(/K-(2D|3w|3z|3W)/.1a(el.1b))){el=el.22}A B=m.2F(el);q(B&&(B.5J||!B.6f))E L;q(B&&e.T==\'8t\'){q(e.2H.a2)E L;A 2t=el.1b.2t(/K-(2D|3w|3W)/);q(2t){m.2A={B:B,T:2t[1],18:B.x.H,M:B.x.D,16:B.y.H,P:B.y.D,aL:e.7B,aP:e.7G};m.2o(V,\'7v\',m.6W);q(e.58)e.58();q(/K-(2D|3z)-9L/.1a(B.S.1b)){B.3I();m.9D=L}E 1j}J q(/K-3z/.1a(el.1b)&&m.3b!=B.Q){B.3I();B.53(\'1q\')}}J q(e.T==\'cm\'){m.4Y(V,\'7v\',m.6W);q(m.2A){q(m.52&&m.2A.T==\'2D\')m.2A.B.S.G.4w=m.52;A 3J=m.2A.3J;q(!3J&&!m.9D&&!/(3w|3W)/.1a(m.2A.T)){q(m.1y(B,\'da\'))B.24()}J q(3J||(!3J&&m.aI)){m.2A.B.53(\'1q\')}q(m.2A.B.3N)m.2A.B.3N.G.1n=\'1x\';q(3J)m.1y(m.2A.B,\'dc\',m.2A);m.9D=1j;m.2A=I}J q(/K-2D-9L/.1a(el.1b)){el.G.4w=m.52}}E 1j},6W:C(e){q(!m.2A)E L;q(!e)e=2a.2B;A a=m.2A,B=a.B;q(B.1h){q(!B.3N)B.3N=m.1c(\'O\',I,{1k:\'2m\',M:B.x.D+\'F\',P:B.y.D+\'F\',18:B.x.cb+\'F\',16:B.y.cb+\'F\',1G:4,9B:(m.1A?\'dh\':\'1x\'),1z:.cY},B.U,L);q(B.3N.G.1n==\'1x\')B.3N.G.1n=\'\'}a.dX=e.7B-a.aL;a.dY=e.7G-a.aP;A 9T=1o.cO(1o.aO(a.dX,2)+1o.aO(a.dY,2));q(!a.3J)a.3J=(a.T!=\'2D\'&&9T>0)||(9T>(m.cT||5));q(a.3J&&e.7B>5&&e.7G>5){q(!m.1y(B,\'ew\',a))E 1j;q(a.T==\'3W\')B.3W(a);J{B.9x(a.18+a.dX,a.16+a.dY);q(a.T==\'2D\')B.S.G.4w=\'3w\'}}E 1j},aN:C(e){1C{q(!e)e=2a.2B;A 6n=/fv/i.1a(e.T);q(!e.2H)e.2H=e.9X;q(m.1A)e.a1=6n?e.ft:e.fs;A B=m.2F(e.2H);q(!B.6f)E;q(!B||!e.a1||m.2F(e.a1,L)==B||m.2A)E;m.1y(B,6n?\'fC\':\'fA\',e);N(A i=0;i<B.1S.W;i++)(C(){A o=m.$(\'1V\'+B.1S[i]);q(o&&o.78){q(6n)m.R(o,{1m:\'21\',1n:\'\'});m.2w(o,{1z:6n?o.1z:0},o.3Y)}})()}1D(e){}},2o:C(el,2B,3R){q(el==V&&2B==\'3Z\')m.2n(m.7i,3R);1C{el.2o(2B,3R,1j)}1D(e){1C{el.aE(\'6g\'+2B,3R);el.fr(\'6g\'+2B,3R)}1D(e){el[\'6g\'+2B]=3R}}},4Y:C(el,2B,3R){1C{el.4Y(2B,3R,1j)}1D(e){1C{el.aE(\'6g\'+2B,3R)}1D(e){el[\'6g\'+2B]=I}}},7m:C(i){q(m.a3&&m.6e[i]&&m.6e[i]!=\'1U\'){A 1M=V.1c(\'1M\');1M.4J=C(){1M=I;m.7m(i+1)};1M.1e=m.6e[i]}},cH:C(3A){q(3A&&1F 3A!=\'7a\')m.9a=3A;A 2b=m.6r();N(A i=0;i<2b.5b.W&&i<m.9a;i++){m.2n(m.6e,m.7q(2b.5b[i]))}q(m.1Z)1I m.5v(m.1Z,C(){m.7m(0)});J m.7m(0);q(m.6o)A 5e=m.1c(\'1M\',{1e:m.5c+m.6o})},7f:C(){q(!m.28){m.7I();m.4U=m.1A&&m.49<7;m.c1=m.4U&&86.ff==\'fg:\';N(A x 3c m.76){q(1F m[x]!=\'1U\')m.Z[x]=m[x];J q(1F m.Z[x]==\'1U\'&&1F m.76[x]!=\'1U\')m.Z[x]=m.76[x]}m.28=m.1c(\'O\',{1b:\'K-28\'},{1k:\'2m\',18:0,16:0,M:\'2v%\',1G:m.4v,9o:\'aB\'},V.1f,L);m.2s=m.1c(\'a\',{1b:\'K-2s\',2h:m.Z.aQ,2i:m.Z.b7,23:\'bI:;\'},{1k:\'2m\',16:\'-4m\',1z:m.b6,1G:1},m.28);m.9d=m.1c(\'O\',I,{1n:\'1x\'},m.28);m.2y=m.1c(\'O\',{1b:\'K-2y K-2y-D\'},{1m:(m.4x&&m.49<cC)?\'21\':\'1q\'},m.28,1);m.3r=m.1c(\'O\',I,{az:\'aA\',fW:\'fS\'},I,L);1o.fQ=C(t,b,c,d){E c*t/d+b};1o.b8=C(t,b,c,d){E c*(t/=d)*t+b};1o.8F=C(t,b,c,d){E-c*(t/=d)*(t-2)+b};m.cB=m.4U;m.c9=((2a.3L&&m.49<9)||4C.aS==\'aW\'||(m.1A&&m.49<5.5));m.1y(k,\'fI\')}},3Z:C(){q(m.9c)E;m.9c=L;N(A i=0;i<m.7i.W;i++)m.7i[i]()},7S:C(){A el,1l,6k=[],5b=[],57=[],3g={},2l;N(A i=0;i<m.91.W;i++){1l=V.2z(m.91[i]);N(A j=0;j<1l.W;j++){el=1l[j];2l=m.6K(el);q(2l){m.2n(6k,el);q(2l[0]==\'m.2I\')m.2n(5b,el);J q(2l[0]==\'m.94\')m.2n(57,el);A g=m.42(el,\'2O\')||\'1x\';q(!3g[g])3g[g]=[];m.2n(3g[g],el)}}}m.4M={6k:6k,3g:3g,5b:5b,57:57};E m.4M},6r:C(){E m.4M||m.7S()},24:C(el){A B=m.2F(el);q(B)B.24();E 1j}};m.fx=C(36,1s,1d){k.1s=1s;k.36=36;k.1d=1d;q(!1s.bb)1s.bb={}};m.fx.5l={9e:C(){(m.fx.3H[k.1d]||m.fx.3H.ag)(k);q(k.1s.3H)k.1s.3H.an(k.36,k.4s,k)},3q:C(8i,2d,4k){k.9t=(1I 7d()).7k();k.4z=8i;k.59=2d;k.4k=4k;k.4s=k.4z;k.H=k.9h=0;A 7g=k;C t(79){E 7g.3H(79)}t.36=k.36;q(t()&&m.3V.2n(t)==1){m.b1=fK(C(){A 3V=m.3V;N(A i=0;i<3V.W;i++)q(!3V[i]())3V.fO(i--,1);q(!3V.W){fM(m.b1)}},13)}},3H:C(79){A t=(1I 7d()).7k();q(79||t>=k.1s.44+k.9t){k.4s=k.59;k.H=k.9h=1;k.9e();k.1s.7c[k.1d]=L;A 9q=L;N(A i 3c k.1s.7c)q(k.1s.7c[i]!==L)9q=1j;q(9q){q(k.1s.6L)k.1s.6L.an(k.36)}E 1j}J{A n=t-k.9t;k.9h=n/k.1s.44;k.H=k.1s.2V(n,0,1,k.1s.44);k.4s=k.4z+((k.59-k.4z)*k.H);k.9e()}E L}};m.3E(m.fx,{3H:{1z:C(fx){m.R(fx.36,{1z:fx.4s})},ag:C(fx){1C{q(fx.36.G&&fx.36.G[fx.1d]!=I)fx.36.G[fx.1d]=fx.4s+fx.4k;J fx.36[fx.1d]=fx.4s}1D(e){}}}});m.5v=C(1Z,3t){k.3t=3t;k.1Z=1Z;A v=m.49,4d;k.9v=m.1A&&v>=5.5&&v<7;q(!1Z){q(3t)3t();E}m.7f();k.2j=m.1c(\'2j\',{eC:0},{1m:\'1q\',1k:\'2m\',eI:\'eM\',M:0},m.28,L);A 4A=m.1c(\'4A\',I,I,k.2j,1);k.2K=[];N(A i=0;i<=8;i++){q(i%3==0)4d=m.1c(\'4d\',I,{P:\'1Q\'},4A,L);k.2K[i]=m.1c(\'2K\',I,I,4d,L);A G=i!=4?{eK:0,eJ:0}:{1k:\'4K\'};m.R(k.2K[i],G)}k.2K[4].1b=1Z+\' K-1g\';k.aq()};m.5v.5l={aq:C(){A 1e=m.5c+(m.eB||"eA/")+k.1Z+".ai";A ah=m.4x?m.28:I;k.3C=m.1c(\'1M\',I,{1k:\'2m\',16:\'-4m\'},ah,L);A 3s=k;k.3C.4J=C(){3s.a7()};k.3C.1e=1e},a7:C(){A o=k.1v=k.3C.M/4,H=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],1u={P:(2*o)+\'F\',M:(2*o)+\'F\'};N(A i=0;i<=8;i++){q(H[i]){q(k.9v){A w=(i==1||i==7)?\'2v%\':k.3C.M+\'F\';A O=m.1c(\'O\',I,{M:\'2v%\',P:\'2v%\',1k:\'4K\',2e:\'1q\'},k.2K[i],L);m.1c(\'O\',I,{6q:"ep:eq.bt.eu(ev=ex, 1e=\'"+k.3C.1e+"\')",1k:\'2m\',M:w,P:k.3C.P+\'F\',18:(H[i][0]*o)+\'F\',16:(H[i][1]*o)+\'F\'},O,L)}J{m.R(k.2K[i],{9B:\'7M(\'+k.3C.1e+\') \'+(H[i][0]*o)+\'F \'+(H[i][1]*o)+\'F\'})}q(2a.3L&&(i==3||i==5))m.1c(\'O\',I,1u,k.2K[i],L);m.R(k.2K[i],1u)}}k.3C=I;q(m.4B[k.1Z])m.4B[k.1Z].5L();m.4B[k.1Z]=k;q(k.3t)k.3t()},4n:C(H,1v,af,3Y,2V){A B=k.B,5D=B.U.G,1v=1v||0,H=H||{x:B.x.H+1v,y:B.y.H+1v,w:B.x.14(\'2g\')-2*1v,h:B.y.14(\'2g\')-2*1v};q(af)k.2j.G.1m=(H.h>=4*k.1v)?\'21\':\'1q\';m.R(k.2j,{18:(H.x-k.1v)+\'F\',16:(H.y-k.1v)+\'F\',M:(H.w+2*k.1v)+\'F\'});H.w-=2*k.1v;H.h-=2*k.1v;m.R(k.2K[4],{M:H.w>=0?H.w+\'F\':0,P:H.h>=0?H.h+\'F\':0});q(k.9v)k.2K[3].G.P=k.2K[5].G.P=k.2K[4].G.P},5L:C(ae){q(ae)k.2j.G.1m=\'1q\';J m.3G(k.2j)}};m.6O=C(B,1u){k.B=B;k.1u=1u;k.3i=1u==\'x\'?\'bO\':\'bP\';k.3j=k.3i.5P();k.5w=1u==\'x\'?\'c2\':\'c8\';k.6T=k.5w.5P();k.9n=1u==\'x\'?\'c7\':\'c4\';k.aZ=k.9n.5P();k.1H=k.30=0};m.6O.5l={14:C(Q){ao(Q){2c\'9C\':E k.1K+k.3k+(k.t-m.2s[\'1v\'+k.3i])/2;2c\'9K\':E k.H+k.cb+k.1H+(k.D-m.2s[\'1v\'+k.3i])/2;2c\'2g\':E k.D+2*k.cb+k.1H+k.30;2c\'4V\':E k.4i-k.3o-k.4t;2c\'8p\':E k.14(\'4V\')-2*k.cb-k.1H-k.30;2c\'5S\':E k.H-(k.B.1g?k.B.1g.1v:0);2c\'9u\':E k.14(\'2g\')+(k.B.1g?2*k.B.1g.1v:0);2c\'2J\':E k.1Y?1o.5t((k.D-k.1Y)/2):0}},83:C(){k.cb=(k.B.S[\'1v\'+k.3i]-k.t)/2;k.4t=m[\'9z\'+k.9n]},a4:C(){k.t=k.B.el[k.3j]?3v(k.B.el[k.3j]):k.B.el[\'1v\'+k.3i];k.1K=k.B.1K[k.1u];k.3k=(k.B.el[\'1v\'+k.3i]-k.t)/2;q(k.1K==0||k.1K==-1){k.1K=(m.4j[k.3j]/2)+m.4j[\'26\'+k.5w]}},7Y:C(){A B=k.B;k.2R=\'1Q\';q(B.9p==\'4S\')k.2R=\'4S\';J q(1I 4W(k.6T).1a(B.4h))k.2R=I;J q(1I 4W(k.aZ).1a(B.4h))k.2R=\'4p\';k.H=k.1K-k.cb+k.3k;q(k.1u==\'x\')B.6G=1o.2Y(B.6G||k.19,B.b0*k.19/B.y.19);k.D=1o.2Y(k.19,B[\'4p\'+k.3i]||k.19);k.2N=B.67?1o.2Y(B[\'2Y\'+k.3i],k.19):k.19;q(B.2T&&B.3y){k.D=B[k.3j];k.1Y=k.19}q(k.1u==\'x\'&&m.5E)k.2N=B.4D;k.2H=B[\'2H\'+k.1u.aX()];k.3o=m[\'9z\'+k.5w];k.26=m.4j[\'26\'+k.5w];k.4i=m.4j[k.3j]},6V:C(i){A B=k.B;q(B.2T&&(B.3y||m.5E)){k.1Y=i;k.D=1o.4p(k.D,k.1Y);B.S.G[k.6T]=k.14(\'2J\')+\'F\'}J k.D=i;B.S.G[k.3j]=i+\'F\';B.U.G[k.3j]=k.14(\'2g\')+\'F\';q(B.1g)B.1g.4n();q(B.3N)B.3N.G[k.3j]=i+\'F\';q(k.1u==\'y\'&&B.5I&&B.1f.G.P!=\'1Q\')B.5I.1f.G.2e=\'1Q\';q(B.2x){A d=B.2r;q(k.8W===1U)k.8W=B.1r[\'1v\'+k.3i]-d[\'1v\'+k.3i];d.G[k.3j]=(k.D-k.8W)+\'F\';q(k.1u==\'x\')B.46.G.M=\'1Q\';q(B.1f)B.1f.G[k.3j]=\'1Q\'}q(k.1u==\'x\'&&B.1t)B.5k(L);q(k.1u==\'x\'&&B.1p&&B.2T){q(i==k.19)B.1p.5i(\'19-2I\');J B.1p.4N(\'19-2I\')}},9I:C(i){k.H=i;k.B.U.G[k.6T]=i+\'F\';q(k.B.1g)k.B.1g.4n()}};m.5U=C(a,29,3q,3d){q(V.bu&&m.1A&&!m.9c){m.2o(V,\'3Z\',C(){1I m.5U(a,29,3q,3d)});E}k.a=a;k.3q=3q;k.3d=3d||\'2D\';k.2x=(3d==\'3z\');k.2T=!k.2x;m.a3=1j;k.1S=[];k.1i=m.1i;m.1i=I;m.7f();A Q=k.Q=m.Y.W;N(A i=0;i<m.9Z.W;i++){A 3a=m.9Z[i];k[3a]=29&&1F 29[3a]!=\'1U\'?29[3a]:m[3a]}q(!k.1e)k.1e=a.23;A el=(29&&29.9Q)?m.$(29.9Q):a;el=k.av=el.2z(\'1M\')[0]||el;k.6C=el.1w||a.1w;q(!m.1y(k,\'fb\'))E L;N(A i=0;i<m.Y.W;i++){q(m.Y[i]&&m.Y[i].a==a&&!(k.1i&&k.3h[1]==\'41\')){m.Y[i].3I();E 1j}}q(!m.fa)N(A i=0;i<m.Y.W;i++){q(m.Y[i]&&m.Y[i].av!=el&&!m.Y[i].6M){m.Y[i].6X()}}m.Y[Q]=k;q(!m.9y&&!m.2q){q(m.Y[Q-1])m.Y[Q-1].24();q(1F m.3b!=\'1U\'&&m.Y[m.3b])m.Y[m.3b].24()}k.el=el;k.1K=m.6D(el);m.7I();A x=k.x=1I m.6O(k,\'x\');x.a4();A y=k.y=1I m.6O(k,\'y\');y.a4();q(/55/i.1a(el.3F))k.at(el);k.U=m.1c(\'O\',{1w:\'K-U-\'+k.Q,1b:\'K-U \'+k.9J},{1m:\'1q\',1k:\'2m\',1G:m.4v+=2},I,L);k.U.eS=k.U.eP=m.aN;q(k.3d==\'2D\'&&k.3M==2)k.3M=0;q(!k.1Z||(k.1i&&k.2T&&k.3h[1]==\'41\')){k[k.3d+\'9U\']()}J q(m.4B[k.1Z]){k.9G();k[k.3d+\'9U\']()}J{k.61();A B=k;1I m.5v(k.1Z,C(){B.9G();B[B.3d+\'9U\']()})}E L};m.5U.5l={9w:C(e){2a.86.23=k.1e},9G:C(){A 1g=k.1g=m.4B[k.1Z];1g.B=k;1g.2j.G.1G=k.U.G.1G-1;m.4B[k.1Z]=I},61:C(){q(k.6M||k.2s)E;k.2s=m.2s;A B=k;k.2s.2k=C(){B.6X()};q(!m.1y(k,\'eZ\'))E;A B=k,l=k.x.14(\'9C\')+\'F\',t=k.y.14(\'9C\')+\'F\';q(!2X&&k.1i&&k.3h[1]==\'41\')A 2X=k.1i;q(2X){l=2X.x.14(\'9K\')+\'F\';t=2X.y.14(\'9K\')+\'F\';k.2s.G.1G=m.4v++}48(C(){q(B.2s)m.R(B.2s,{18:l,16:t,1G:m.4v++})},2v)},eX:C(){A B=k;A 1M=V.1c(\'1M\');k.S=1M;1M.4J=C(){q(m.Y[B.Q])B.69()};q(m.eW)1M.eG=C(){E 1j};1M.1b=\'K-2D\';m.R(1M,{1m:\'1q\',1n:\'3D\',1k:\'2m\',6G:\'4m\',1G:3});1M.2h=m.Z.9F;q(m.4x)m.28.1X(1M);q(m.1A&&m.eV)1M.1e=I;1M.1e=k.1e;k.61()},eQ:C(){q(!m.1y(k,\'eR\'))E;k.S=m.7W(k.a);q(!k.S)k.S=m.4r(k.9P);q(!k.S)k.S=m.9N();k.9V([\'6E\']);q(k.6E){A 1f=m.4R(k.S,\'O\',\'K-1f\');q(1f)1f.1X(k.6E);k.6E.G.1n=\'3D\'}m.1y(k,\'eT\');A 1r=k.1r=k.S;q(/(3x|1h)/.1a(k.2E))k.8E(1r);m.28.1X(k.U);m.R(k.U,{1k:\'f0\',8a:\'0 \'+m.93+\'F 0 \'+m.4o+\'F\'});k.S=m.1c(\'O\',{1b:\'K-3z\'},{1k:\'4K\',1G:3,2e:\'1q\'},k.U);k.46=m.1c(\'O\',I,I,k.S,1);k.46.1X(1r);m.R(1r,{1k:\'4K\',1n:\'3D\',9o:m.Z.9m||\'\'});q(k.M)1r.G.M=k.M+\'F\';q(k.P)m.R(1r,{P:k.P+\'F\',2e:\'1q\'});q(1r.1R<k.4D)1r.G.M=k.4D+\'F\';q(k.2E==\'2S\'&&!m.7W(k.a)){k.61();A B=k;A 2S=1I m.7p(k.a,1r);2S.1e=k.1e;2S.3t=C(){q(m.Y[B.Q])B.69()};2S.90=C(){86.23=B.1e};2S.92()}J q(k.2E==\'1h\'&&k.3O==\'6p\'){k.6x()}J k.69()},69:C(){1C{q(!k.S)E;k.S.4J=I;q(k.6M)E;J k.6M=L;A x=k.x,y=k.y;q(k.2s){m.R(k.2s,{16:\'-4m\'});k.2s=I;m.1y(k,\'cl\')}q(k.2T){x.19=k.S.M;y.19=k.S.P;m.R(k.S,{M:x.t+\'F\',P:y.t+\'F\'});k.U.1X(k.S);m.28.1X(k.U)}J q(k.84)k.84();x.83();y.83();m.R(k.U,{18:(x.1K+x.3k-x.cb)+\'F\',16:(y.1K+x.3k-y.cb)+\'F\'});k.9j();k.bS();A 2M=x.19/y.19;x.7Y();k.2R(x);y.7Y();k.2R(y);q(k.2x)k.b4();q(k.1t)k.5k(0,1);q(k.67){q(k.2T)k.cy(2M);J k.8u();A 1O=k.1p;q(1O&&k.1i&&1O.2U&&1O.aH){A H=1O.ct.1k||\'\',p;N(A 1u 3c m.8V)N(A i=0;i<5;i++){p=k[1u];q(H.2t(m.8V[1u][i])){p.H=k.1i[1u].H+(k.1i[1u].1H-p.1H)+(k.1i[1u].D-p.D)*[0,0,.5,1,1][i];q(1O.aH==\'fc\'){q(p.H+p.D+p.1H+p.30>p.26+p.4i-p.4t)p.H=p.26+p.4i-p.D-p.3o-p.4t-p.1H-p.30;q(p.H<p.26+p.3o)p.H=p.26+p.3o}}}}q(k.2T&&k.x.19>(k.x.1Y||k.x.D)){k.bZ();q(k.1S.W==1)k.5k()}}k.9i()}1D(e){k.9w(e)}},8E:C(5V,1Q){A c=m.4R(5V,\'7y\',\'K-1f\');q(/(1h|3x)/.1a(k.2E)){q(k.45)c.G.M=k.45+\'F\';q(k.4Q)c.G.P=k.4Q+\'F\'}},6x:C(){q(k.ax)E;A B=k;k.1f=m.4R(k.1r,\'7y\',\'K-1f\');q(k.2E==\'1h\'){k.61();A 4Z=m.3r.6u(1);k.1f.1X(4Z);k.f4=k.1r.1R;q(!k.45)k.45=4Z.1R;A 5s=k.1r.1T-k.1f.1T,h=k.4Q||m.4j.P-5s-m.51-m.6y,4J=k.3O==\'6p\'?\' 4J="q (m.Y[\'+k.Q+\']) m.Y[\'+k.Q+\'].69()" \':\'\';k.1f.2i+=\'<1h 3a="m\'+(1I 7d()).7k()+\'" f6="0" Q="\'+k.Q+\'" \'+\' G="M:\'+k.45+\'F; P:\'+h+\'F" \'+4J+\' 1e="\'+k.1e+\'" ></1h>\';k.4Z=k.1f.2z(\'O\')[0];k.1h=k.1f.2z(\'1h\')[0];q(k.3O==\'6l\')k.8f()}q(k.2E==\'3x\'){k.1f.1w=k.1f.1w||\'m-eN-1w-\'+k.Q;A a=k.81;q(!a.29)a.29={};q(1F a.29.aG==\'1U\')a.29.aG=\'er\';q(9g)9g.eL(k.1e,k.1f.1w,k.45,k.4Q,a.eH||\'7\',a.eD,a.aF,a.29,a.ay)}k.ax=L},84:C(){q(k.1h&&!k.4Q){k.1h.G.P=k.1f.G.P=k.8v()+\'F\'}k.1r.1X(m.3r);q(!k.x.19)k.x.19=k.1r.1R;k.y.19=k.1r.1T;k.1r.8X(m.3r);q(m.1A&&k.aw>3v(k.1r.6s.P)){k.aw=3v(k.1r.6s.P)}m.R(k.U,{1k:\'2m\',8a:\'0\'});m.R(k.S,{M:k.x.t+\'F\',P:k.y.t+\'F\'})},8v:C(){A h;1C{A 2u=k.5I=k.1h.9S||k.1h.60.V;A 3r=2u.1c(\'O\');3r.G.az=\'aA\';2u.1f.1X(3r);h=3r.87;q(m.1A)h+=3v(2u.1f.6s.51)+3v(2u.1f.6s.6y)-1}1D(e){h=fL}E h},8f:C(){A 5d=k.1r.1R-k.4Z.1R;m.3G(k.4Z);q(5d<0)5d=0;A 5s=k.1r.1T-k.1h.1T;q(k.5I&&!k.4Q&&k.y.D==k.y.19)k.5I.1f.G.2e=\'1q\';m.R(k.1h,{M:1o.9Y(k.x.D-5d)+\'F\',P:1o.9Y(k.y.D-5s)+\'F\'});m.R(k.1f,{M:k.1h.G.M,P:k.1h.G.P});k.5r=k.1h;k.2r=k.5r},b4:C(){k.8E(k.1r);q(k.2E==\'3x\'&&k.3O==\'6p\')k.6x();q(k.x.D<k.x.19&&!k.6P)k.x.D=k.x.19;q(k.y.D<k.y.19&&!k.8K)k.y.D=k.y.19;k.2r=k.1r;m.R(k.46,{1k:\'4K\',M:k.x.D+\'F\'});m.R(k.1r,{8k:\'1x\',M:\'1Q\',P:\'1Q\'});A 1P=m.4R(k.1r,\'7y\',\'K-1f\');q(1P&&!/(1h|3x)/.1a(k.2E)){A 5o=1P;1P=m.1c(5o.fV,I,{2e:\'1q\'},I,L);5o.22.fT(1P,5o);1P.1X(m.3r);1P.1X(5o);A 5d=k.1r.1R-1P.1R;A 5s=k.1r.1T-1P.1T;1P.8X(m.3r);A 6N=m.4x||4C.aS==\'aW\'?1:0;m.R(1P,{M:(k.x.D-5d-6N)+\'F\',P:(k.y.D-5s)+\'F\',2e:\'1Q\',1k:\'4K\'});q(6N&&5o.1T>1P.1T){1P.G.M=(3v(1P.G.M)+6N)+\'F\'}k.5r=1P;k.2r=k.5r}q(k.1h&&k.3O==\'6p\')k.8f();q(!k.5r&&k.y.D<k.46.1T)k.2r=k.S;q(k.2r==k.S&&!k.6P&&!/(1h|3x)/.1a(k.2E)){k.x.D+=17}q(k.2r&&k.2r.1T>k.2r.22.1T){48("1C { m.Y["+k.Q+"].2r.G.2e = \'1Q\'; } 1D(e) {}",m.6B)}},at:C(55){A c=55.fE.7C(\',\');N(A i=0;i<c.W;i++)c[i]=3v(c[i]);q(55.fk.5P()==\'fB\'){k.x.1K+=c[0]-c[2];k.y.1K+=c[1]-c[2];k.x.t=k.y.t=2*c[2]}J{A 5H,6m,5G=5H=c[0],5u=6m=c[1];N(A i=0;i<c.W;i++){q(i%2==0){5G=1o.2Y(5G,c[i]);5H=1o.4p(5H,c[i])}J{5u=1o.2Y(5u,c[i]);6m=1o.4p(6m,c[i])}}k.x.1K+=5G;k.x.t=5H-5G;k.y.1K+=5u;k.y.t=6m-5u}},2R:C(p,5g){A 4G,2X=p.2H,1u=p==k.x?\'x\':\'y\';q(2X&&2X.2t(/ /)){4G=2X.7C(\' \');2X=4G[0]}q(2X&&m.$(2X)){p.H=m.6D(m.$(2X))[1u];q(4G&&4G[1]&&4G[1].2t(/^[-]?[0-9]+F$/))p.H+=3v(4G[1]);q(p.D<p.2N)p.D=p.2N}J q(p.2R==\'1Q\'||p.2R==\'4S\'){A 8r=1j;A 5j=p.B.67;q(p.2R==\'4S\')p.H=1o.5t(p.26+(p.4i+p.3o-p.4t-p.14(\'2g\'))/2);J p.H=1o.5t(p.H-((p.14(\'2g\')-p.t)/2));q(p.H<p.26+p.3o){p.H=p.26+p.3o;8r=L}q(!5g&&p.D<p.2N){p.D=p.2N;5j=1j}q(p.H+p.14(\'2g\')>p.26+p.4i-p.4t){q(!5g&&8r&&5j){p.D=1o.2Y(p.D,p.14(1u==\'y\'?\'4V\':\'8p\'))}J q(p.14(\'2g\')<p.14(\'4V\')){p.H=p.26+p.4i-p.4t-p.14(\'2g\')}J{p.H=p.26+p.3o;q(!5g&&5j)p.D=p.14(1u==\'y\'?\'4V\':\'8p\')}}q(!5g&&p.D<p.2N){p.D=p.2N;5j=1j}}J q(p.2R==\'4p\'){p.H=1o.fh(p.H-p.D+p.t)}q(p.H<p.3o){A cw=p.H;p.H=p.3o;q(5j&&!5g)p.D=p.D-(p.H-cw)}},cy:C(2M){A x=k.x,y=k.y,3Q=1j,2Z=1o.2Y(x.19,x.D),3X=1o.2Y(y.19,y.D),3y=(k.3y||m.5E);q(2Z/3X>2M){ 2Z=3X*2M;q(2Z<x.2N){2Z=x.2N;3X=2Z/2M}3Q=L}J q(2Z/3X<2M){ 3X=2Z/2M;3Q=L}q(m.5E&&x.19<x.2N){x.1Y=x.19;y.D=y.1Y=y.19}J q(k.3y){x.1Y=2Z;y.1Y=3X}J{x.D=2Z;y.D=3X}3Q=k.8u(3y?I:2M,3Q);q(3y&&y.D<y.1Y){y.1Y=y.D;x.1Y=y.D*2M}q(3Q||3y){x.H=x.1K-x.cb+x.3k;x.2N=x.D;k.2R(x,L);y.H=y.1K-y.cb+y.3k;y.2N=y.D;k.2R(y,L);q(k.1t)k.5k()}},8u:C(2M,3Q){A x=k.x,y=k.y;q(k.1t){5h(y.D>k.6w&&x.D>k.4D&&y.14(\'2g\')>y.14(\'4V\')){y.D-=10;q(2M)x.D=y.D*2M;k.5k(0,1);3Q=L}}E 3Q},fn:C(){q(k.2r){A h=/1h/i.1a(k.2r.3F)?(k.8v()+1)+\'F\':\'1Q\';q(k.1f)k.1f.G.P=h;k.2r.G.P=h;k.y.6V(k.1r.1T)}},9i:C(){A x=k.x,y=k.y;k.53(\'1q\');m.1y(k,\'fm\');q(k.1p&&k.1p.2G)k.1p.2G.5q();k.9f(1,{U:{M:x.14(\'2g\'),P:y.14(\'2g\'),18:x.H,16:y.H},S:{18:x.1H+x.14(\'2J\'),16:y.1H+y.14(\'2J\'),M:x.1Y||x.D,P:y.1Y||y.D}},m.6B)},9f:C(1J,2d,3Y){A 5y=k.3h,8n=1J?(k.1i?k.1i.a:I):m.2q,t=(5y[1]&&8n&&m.42(8n,\'3h\')[1]==5y[1])?5y[1]:5y[0];q(k[t]&&t!=\'2I\'){k[t](1J,2d);E}q(k.1g&&!k.3M){q(1J)k.1g.4n();J k.1g.5L((k.2x&&k.4P))}q(!1J)k.71();A B=k,x=B.x,y=B.y,2V=k.2V;q(!1J)2V=k.cN||2V;A 6l=1J?C(){q(B.1g)B.1g.2j.G.1m="21";48(C(){B.6R()},50)}:C(){B.5N()};q(1J)m.R(k.U,{M:x.t+\'F\',P:y.t+\'F\'});q(1J&&k.2x){m.R(k.U,{18:(x.1K-x.cb+x.3k)+\'F\',16:(y.1K-y.cb+y.3k)+\'F\'})}q(k.cq){m.R(k.U,{1z:1J?0:1});m.3E(2d.U,{1z:1J})}m.2w(k.U,2d.U,{44:3Y,2V:2V,3H:C(3n,2C){q(B.1g&&B.3M&&2C.1d==\'16\'){A 6j=1J?2C.H:1-2C.H;A H={w:x.t+(x.14(\'2g\')-x.t)*6j,h:y.t+(y.14(\'2g\')-y.t)*6j,x:x.1K+(x.H-x.1K)*6j,y:y.1K+(y.H-y.1K)*6j};B.1g.4n(H,0,1)}q(B.2x){q(2C.1d==\'18\')B.46.G.18=(x.H-3n)+\'F\';q(2C.1d==\'16\')B.46.G.16=(y.H-3n)+\'F\'}}});m.2w(k.S,2d.S,3Y,2V,6l);q(1J){k.U.G.1m=\'21\';k.S.G.1m=\'21\';q(k.2x)k.1r.G.1m=\'21\';k.a.1b+=\' K-4F-4h\'}},64:C(1J,2d){k.3M=1j;A B=k,t=1J?m.6B:0;q(1J){m.2w(k.U,2d.U,0);m.R(k.U,{1z:0,1m:\'21\'});m.2w(k.S,2d.S,0);k.S.G.1m=\'21\';m.2w(k.U,{1z:1},t,I,C(){B.6R()})}q(k.1g){k.1g.2j.G.1G=k.U.G.1G;A 6Y=1J||-1,1v=k.1g.1v,8d=1J?3:1v,8e=1J?1v:3;N(A i=8d;6Y*i<=6Y*8e;i+=6Y,t+=25){(C(){A o=1J?8e-i:8d-i;48(C(){B.1g.4n(0,o,1)},t)})()}}q(1J){}J{48(C(){q(B.1g)B.1g.5L(B.4P);B.71();m.2w(B.U,{1z:0},m.96,I,C(){B.5N()})},t)}},41:C(1J,2d,8i){q(!1J)E;A B=k,1i=k.1i,x=k.x,y=k.y,3p=1i.x,3m=1i.y,U=k.U,S=k.S,1t=k.1t;m.4Y(V,\'7v\',m.6W);m.R(S,{M:(x.1Y||x.D)+\'F\',P:(y.1Y||y.D)+\'F\'});q(1t)1t.G.2e=\'21\';k.1g=1i.1g;q(k.1g)k.1g.B=B;1i.1g=I;A 5n=m.1c(\'O\',{1b:\'K-2D\'},{1k:\'2m\',1G:4,2e:\'1q\',1n:\'1x\'});A 8l={cJ:1i,ch:k};N(A n 3c 8l){k[n]=8l[n].S.6u(1);m.R(k[n],{1k:\'2m\',8k:0,1m:\'21\'});5n.1X(k[n])}U.1X(5n);q(k.2x)m.R(k.46,{18:0,16:0});q(1t){1t.1b=\'\';U.1X(1t)}5n.G.1n=\'\';1i.S.G.1n=\'1x\';q(m.4x){A 2t=4C.6t.2t(/cA\\/([0-9]{3})/);q(2t&&3v(2t[1])<cC)k.U.G.1m=\'21\'}m.2w(U,{M:x.D},{44:m.cf,3H:C(3n,2C){A H=2C.H,4l=1-H;A 1d,D={},8L=[\'H\',\'D\',\'1H\',\'30\'];N(A n 3c 8L){1d=8L[n];D[\'x\'+1d]=4l*3p[1d]+H*x[1d];D[\'y\'+1d]=4l*3m[1d]+H*y[1d];D.cx=4l*(3p.1Y||3p.D)+H*(x.1Y||x.D);D.6H=4l*3p.14(\'2J\')+H*x.14(\'2J\');D.cL=4l*(3m.1Y||3m.D)+H*(y.1Y||y.D);D.6J=4l*3m.14(\'2J\')+H*y.14(\'2J\')}q(B.1g)B.1g.4n({x:D.3f,y:D.4L,w:D.6h+D.4g+D.8S+2*x.cb,h:D.63+D.4a+D.8R+2*y.cb});1i.U.G.fD=\'fU(\'+(D.4L-3m.H)+\'F, \'+(D.6h+D.4g+D.8S+D.3f+2*3p.cb-3p.H)+\'F, \'+(D.63+D.4a+D.8R+D.4L+2*3m.cb-3m.H)+\'F, \'+(D.3f-3p.H)+\'F)\';m.R(S,{16:(D.4a+y.14(\'2J\'))+\'F\',18:(D.4g+x.14(\'2J\'))+\'F\',51:(y.H-D.4L)+\'F\',4o:(x.H-D.3f)+\'F\'});m.R(U,{16:D.4L+\'F\',18:D.3f+\'F\',M:(D.4g+D.8S+D.6h+2*x.cb)+\'F\',P:(D.4a+D.8R+D.63+2*y.cb)+\'F\'});m.R(5n,{M:(D.cx||D.6h)+\'F\',P:(D.cL||D.63)+\'F\',18:(D.4g+D.6H)+\'F\',16:(D.4a+D.6J)+\'F\',1m:\'21\'});m.R(B.cJ,{16:(3m.H-D.4L+3m.1H-D.4a+3m.14(\'2J\')-D.6J)+\'F\',18:(3p.H-D.3f+3p.1H-D.4g+3p.14(\'2J\')-D.6H)+\'F\'});m.R(B.ch,{1z:H,16:(y.H-D.4L+y.1H-D.4a+y.14(\'2J\')-D.6J)+\'F\',18:(x.H-D.3f+x.1H-D.4g+x.14(\'2J\')-D.6H)+\'F\'});q(1t)m.R(1t,{M:D.6h+\'F\',P:D.63+\'F\',18:(D.4g+x.cb)+\'F\',16:(D.4a+y.cb)+\'F\'})},6L:C(){U.G.1m=S.G.1m=\'21\';S.G.1n=\'3D\';5n.G.1n=\'1x\';B.a.1b+=\' K-4F-4h\';B.6R();1i.5N();B.1i=I}})},c6:C(o,el){q(!k.1i)E 1j;N(A i=0;i<k.1i.1S.W;i++){A 6Q=m.$(\'1V\'+k.1i.1S[i]);q(6Q&&6Q.1V==o.1V){k.9E();6Q.fX=k.Q;m.2n(k.1S,k.1i.1S[i]);E L}}E 1j},6R:C(){k.6f=L;k.3I();q(k.2x&&k.3O==\'6l\')k.6x();q(k.1h){1C{A B=k,2u=k.1h.9S||k.1h.60.V;m.2o(2u,\'8t\',C(){q(m.3b!=B.Q)B.3I()})}1D(e){}q(m.1A&&1F k.5J!=\'fR\')k.1h.G.M=(k.45-1)+\'F\'}q(k.43)m.1u(k);q(m.2q&&m.2q==k.a)m.2q=I;k.co();A p=m.4j,8I=m.7A.x+p.5Q,8H=m.7A.y+p.5K;k.8Y=k.x.H<8I&&8I<k.x.H+k.x.14(\'2g\')&&k.y.H<8H&&8H<k.y.H+k.y.14(\'2g\');q(k.1t)k.c5();m.1y(k,\'fG\')},co:C(){A Q=k.Q;A 1Z=k.1Z;1I m.5v(1Z,C(){1C{m.Y[Q].cn()}1D(e){}})},cn:C(){A 1B=k.7U(1);q(1B&&1B.2k.cp().2t(/m\\.2I/))A 1M=m.1c(\'1M\',{1e:m.7q(1B)})},7U:C(2p){A 7P=k.7t(),as=m.4M.3g[k.2O||\'1x\'];q(!as[7P+2p]&&k.1p&&k.1p.bs){q(2p==1)E as[0];J q(2p==-1)E as[as.W-1]}E as[7P+2p]||I},7t:C(){A 2b=m.6r().3g[k.2O||\'1x\'];q(2b)N(A i=0;i<2b.W;i++){q(2b[i]==k.a)E i}E I},bQ:C(){q(k[k.62]){A 2b=m.4M.3g[k.2O||\'1x\'];q(2b){A s=m.Z.3A.2f(\'%1\',k.7t()+1).2f(\'%2\',2b.W);k[k.62].2i=\'<O 1W="K-3A">\'+s+\'</O>\'+k[k.62].2i}}},9j:C(){q(!k.1i){N(A i=0;i<m.6d.W;i++){A 1O=m.6d[i],35=1O.2O;q(1F 35==\'1U\'||35===I||35===k.2O)k.1p=1I m.80(k.Q,1O)}}J{k.1p=k.1i.1p}A 1O=k.1p;q(!1O)E;A Q=1O.4e=k.Q;1O.bE();1O.5i(\'19-2I\');q(1O.2U){A o=1O.ct||{};o.4O=1O.2U;o.1V=\'2U\';k.4E(o)}q(1O.2G)1O.2G.77(k);q(!k.1i&&k.3T)1O.3S(L);q(1O.3T){1O.3T=48(C(){m.1B(Q)},(1O.fe||eF))}},6X:C(){m.3G(k.U);m.Y[k.Q]=I;q(m.2q==k.a)m.2q=I;m.9s(k.Q);q(k.2s)m.2s.G.18=\'-4m\';m.1y(k,\'cl\')},bT:C(){q(k.6a)E;k.6a=m.1c(\'a\',{23:m.ck,2H:m.cd,1b:\'K-6a\',2i:m.Z.cc,2h:m.Z.cg});k.4E({4O:k.6a,1k:k.cj||\'16 18\',1V:\'6a\'})},9V:C(8b,cz){N(A i=0;i<8b.W;i++){A T=8b[i],s=I;q(T==\'a0\'&&!m.1y(k,\'eE\'))E;J q(T==\'56\'&&!m.1y(k,\'ez\'))E;q(!k[T+\'5a\']&&k.6C)k[T+\'5a\']=T+\'-N-\'+k.6C;q(k[T+\'5a\'])k[T]=m.4r(k[T+\'5a\']);q(!k[T]&&!k[T+\'89\']&&k[T+\'cM\'])1C{s=ey(k[T+\'cM\'])}1D(e){}q(!k[T]&&k[T+\'89\']){s=k[T+\'89\']}q(!k[T]&&!s){k[T]=m.4r(k.a[\'cF\'+T+\'5a\']);q(!k[T]){A 1B=k.a.cE;5h(1B&&!m.6K(1B)){q((1I 4W(\'K-\'+T)).1a(1B.1b||I)){q(!1B.1w)k.a[\'cF\'+T+\'5a\']=1B.1w=\'1V\'+m.5F++;k[T]=m.4r(1B.1w);5p}1B=1B.cE}}}q(!k[T]&&!s&&k.62==T)s=\'\\n\';q(!k[T]&&s)k[T]=m.1c(\'O\',{1b:\'K-\'+T,2i:s});q(cz&&k[T]){A o={1k:(T==\'56\')?\'6v\':\'7w\'};N(A x 3c k[T+\'cD\'])o[x]=k[T+\'cD\'][x];o.4O=k[T];k.4E(o)}}},53:C(1m){q(m.cB)k.6I(\'f9\',1m);q(m.c9)k.6I(\'f1\',1m);q(m.6i)k.6I(\'*\',1m)},6I:C(3F,1m){A 1l=V.2z(3F);A 1d=3F==\'*\'?\'2e\':\'1m\';N(A i=0;i<1l.W;i++){q(1d==\'1m\'||(V.82.bz(1l[i],"").bx(\'2e\')==\'1Q\'||1l[i].ca(\'1q-by\')!=I)){A 2P=1l[i].ca(\'1q-by\');q(1m==\'21\'&&2P){2P=2P.2f(\'[\'+k.Q+\']\',\'\');1l[i].5Z(\'1q-by\',2P);q(!2P)1l[i].G[1d]=1l[i].9M}J q(1m==\'1q\'){A 3K=m.6D(1l[i]);3K.w=1l[i].1R;3K.h=1l[i].1T;q(!k.43){A bv=(3K.x+3K.w<k.x.14(\'5S\')||3K.x>k.x.14(\'5S\')+k.x.14(\'9u\'));A bA=(3K.y+3K.h<k.y.14(\'5S\')||3K.y>k.y.14(\'5S\')+k.y.14(\'9u\'))}A 6F=m.9O(1l[i]);q(!bv&&!bA&&6F!=k.Q){q(!2P){1l[i].5Z(\'1q-by\',\'[\'+k.Q+\']\');1l[i].9M=1l[i].G[1d];1l[i].G[1d]=\'1q\'}J q(2P.be(\'[\'+k.Q+\']\')==-1){1l[i].5Z(\'1q-by\',2P+\'[\'+k.Q+\']\')}}J q((2P==\'[\'+k.Q+\']\'||m.3b==6F)&&6F!=k.Q){1l[i].5Z(\'1q-by\',\'\');1l[i].G[1d]=1l[i].9M||\'\'}J q(2P&&2P.be(\'[\'+k.Q+\']\')>-1){1l[i].5Z(\'1q-by\',2P.2f(\'[\'+k.Q+\']\',\'\'))}}}}},3I:C(){k.U.G.1G=m.4v+=2;N(A i=0;i<m.Y.W;i++){q(m.Y[i]&&i==m.3b){A 4u=m.Y[i];4u.S.1b+=\' K-\'+4u.3d+\'-9L\';q(4u.2T){4u.S.G.4w=m.1A?\'bf\':\'7J\';4u.S.2h=m.Z.bk}m.1y(4u,\'eY\')}}q(k.1g)k.1g.2j.G.1G=k.U.G.1G-1;k.S.1b=\'K-\'+k.3d;q(k.2T){k.S.2h=m.Z.9F;q(m.6o){m.52=2a.3L?\'7J\':\'7M(\'+m.5c+m.6o+\'), 7J\';q(m.1A&&m.49<6)m.52=\'bf\';k.S.G.4w=m.52}}m.3b=k.Q;m.2o(V,2a.3L?\'97\':\'9b\',m.6U);m.1y(k,\'eU\')},9x:C(x,y){k.x.9I(x);k.y.9I(y)},3W:C(e){A w,h,r=e.M/e.P;w=1o.4p(e.M+e.dX,1o.2Y(k.4D,k.x.19));q(k.2T&&1o.9Y(w-k.x.19)<12)w=k.x.19;h=k.2x?e.P+e.dY:w/r;q(h<1o.2Y(k.6w,k.y.19)){h=1o.2Y(k.6w,k.y.19);q(k.2T)w=h*r}k.9r(w,h)},9r:C(w,h){k.y.6V(h);k.x.6V(w);k.U.G.P=k.y.14(\'2g\')+\'F\'},24:C(){q(k.5J||!k.6f)E;q(k.3h[1]==\'41\'&&m.2q){m.2F(m.2q).6X();m.2q=I}q(!m.1y(k,\'f8\'))E;k.5J=L;q(k.1p&&!m.2q)k.1p.3e();m.4Y(V,2a.3L?\'97\':\'9b\',m.6U);1C{q(k.2x)k.c0();k.S.G.4w=\'f7\';k.9f(0,{U:{M:k.x.t,P:k.y.t,18:k.x.1K-k.x.cb+k.x.3k,16:k.y.1K-k.y.cb+k.y.3k},S:{18:0,16:0,M:k.x.t,P:k.y.t}},m.96)}1D(e){k.5N()}},c0:C(){q(m.6i){q(!m.5x)m.5x=m.1c(\'O\',I,{1k:\'2m\'},m.28);m.R(m.5x,{M:k.x.D+\'F\',P:k.y.D+\'F\',18:k.x.H+\'F\',16:k.y.H+\'F\',1n:\'3D\'})}q(k.2E==\'3x\')1C{m.$(k.1f.1w).f3()}1D(e){}q(k.3O==\'6l\'&&!k.4P)k.bY();q(k.2r&&k.2r!=k.5r)k.2r.G.2e=\'1q\'},bY:C(){q(m.1A&&k.1h)1C{k.1h.60.V.1f.2i=\'\'}1D(e){}q(k.2E==\'3x\')9g.f2(k.1f.1w);k.1f.2i=\'\'},bg:C(){q(k.1g)k.1g.2j.G.1n=\'1x\';k.3N=I;k.U.G.1n=\'1x\';m.2n(m.4y,k)},c3:C(){1C{m.Y[k.Q]=k;q(!m.9y&&m.3b!=k.Q){1C{m.Y[m.3b].24()}1D(e){}}A z=m.4v++,5D={1n:\'\',1G:z};m.R(k.U,5D);k.5J=1j;A o=k.1g||0;q(o){q(!k.3M)5D.1m=\'1q\';m.R(o.2j,5D)}q(k.1p){k.9j()}k.9i()}1D(e){}},4E:C(o){A el=o.4O,54=(o.bV==\'2y\'&&!/7z$/.1a(o.1k));q(1F el==\'9l\')el=m.4r(el);q(o.3z)el=m.1c(\'O\',{2i:o.3z});q(!el||1F el==\'9l\')E;q(!m.1y(k,\'f5\',{11:el}))E;el.G.1n=\'3D\';o.1V=o.1V||o.4O;q(k.3h[1]==\'41\'&&k.c6(o,el))E;k.9E();A M=o.M&&/^[0-9]+(F|%)$/.1a(o.M)?o.M:\'1Q\';q(/^(18|3l)7z$/.1a(o.1k)&&!/^[0-9]+F$/.1a(o.M))M=\'eO\';A 11=m.1c(\'O\',{1w:\'1V\'+m.5F++,1V:o.1V},{1k:\'2m\',1m:\'1q\',M:M,9o:m.Z.9m||\'\',1z:0},54?m.2y:k.1t,L);q(54)11.6S=k.Q;11.1X(el);m.3E(11,{1z:1,bN:0,bM:0,3Y:(o.64===0||o.64===1j||(o.64==2&&m.1A))?0:5B});m.3E(11,o);q(k.bK){k.5A(11);q(!11.78||k.8Y)m.2w(11,{1z:11.1z},11.3Y)}m.2n(k.1S,m.5F-1)},5A:C(11){A p=11.1k||\'95 4S\',54=(11.bV==\'2y\'),6Z=11.bN,6z=11.bM;q(54){m.2y.G.1n=\'3D\';11.6S=k.Q;q(11.1R>11.22.1R)11.G.M=\'2v%\'}J q(11.22!=k.1t)k.1t.1X(11);q(/18$/.1a(p))11.G.18=6Z+\'F\';q(/4S$/.1a(p))m.R(11,{18:\'50%\',4o:(6Z-1o.5t(11.1R/2))+\'F\'});q(/3l$/.1a(p))11.G.3l=-6Z+\'F\';q(/^bL$/.1a(p)){m.R(11,{3l:\'2v%\',93:k.x.cb+\'F\',16:-k.y.cb+\'F\',4I:-k.y.cb+\'F\',2e:\'1Q\'});k.x.1H=11.1R}J q(/^bJ$/.1a(p)){m.R(11,{18:\'2v%\',4o:k.x.cb+\'F\',16:-k.y.cb+\'F\',4I:-k.y.cb+\'F\',2e:\'1Q\'});k.x.30=11.1R}A 8Z=11.22.1T;11.G.P=\'1Q\';q(54&&11.1T>8Z)11.G.P=m.4U?8Z+\'F\':\'2v%\';q(/^16/.1a(p))11.G.16=6z+\'F\';q(/^95/.1a(p))m.R(11,{16:\'50%\',51:(6z-1o.5t(11.1T/2))+\'F\'});q(/^4I/.1a(p))11.G.4I=-6z+\'F\';q(/^6v$/.1a(p)){m.R(11,{18:(-k.x.1H-k.x.cb)+\'F\',3l:(-k.x.30-k.x.cb)+\'F\',4I:\'2v%\',6y:k.y.cb+\'F\',M:\'1Q\'});k.y.1H=11.1T}J q(/^7w$/.1a(p)){m.R(11,{1k:\'4K\',18:(-k.x.1H-k.x.cb)+\'F\',3l:(-k.x.30-k.x.cb)+\'F\',16:\'2v%\',51:k.y.cb+\'F\',M:\'1Q\'});k.y.30=11.1T;11.G.1k=\'2m\'}},bS:C(){k.9V([\'56\',\'a0\'],L);k.bQ();q(k.a0)m.1y(k,\'es\');q(k.56)m.1y(k,\'et\');q(k.56&&k.9H)k.56.1b+=\' K-3w\';q(m.bw)k.bT();N(A i=0;i<m.1S.W;i++){A o=m.1S[i],6A=o.9Q,35=o.2O;q((!6A&&!35)||(6A&&6A==k.6C)||(35&&35===k.2O)){q(k.2T||(k.2x&&o.fd))k.4E(o)}}A 7K=[];N(A i=0;i<k.1S.W;i++){A o=m.$(\'1V\'+k.1S[i]);q(/7z$/.1a(o.1k))k.5A(o);J m.2n(7K,o)}N(A i=0;i<7K.W;i++)k.5A(7K[i]);k.bK=L},9E:C(){q(!k.1t)k.1t=m.1c(\'O\',{1b:k.9J},{1k:\'2m\',M:(k.x.D||(k.3y?k.M:I)||k.x.19)+\'F\',P:(k.y.D||k.y.19)+\'F\',1m:\'1q\',2e:\'1q\',1G:m.1A?4:\'1Q\'},m.28,L)},5k:C(98,bW){A 1t=k.1t,x=k.x,y=k.y;m.R(1t,{M:x.D+\'F\',P:y.D+\'F\'});q(98||bW){N(A i=0;i<k.1S.W;i++){A o=m.$(\'1V\'+k.1S[i]);A 9A=(m.4U||V.7N==\'8o\');q(o&&/^(6v|7w)$/.1a(o.1k)){q(9A){o.G.M=(1t.1R+2*x.cb+x.1H+x.30)+\'F\'}y[o.1k==\'6v\'?\'1H\':\'30\']=o.1T}q(o&&9A&&/^(18|3l)7z$/.1a(o.1k)){o.G.P=(1t.1T+2*y.cb)+\'F\'}}}q(98){m.R(k.S,{16:y.1H+\'F\'});m.R(1t,{16:(y.1H+y.cb)+\'F\'})}},c5:C(){A b=k.1t;b.1b=\'\';m.R(b,{16:(k.y.1H+k.y.cb)+\'F\',18:(k.x.1H+k.x.cb)+\'F\',2e:\'21\'});q(m.4x)b.G.1m=\'21\';k.U.1X(b);N(A i=0;i<k.1S.W;i++){A o=m.$(\'1V\'+k.1S[i]);o.G.1G=o.1V==\'2U\'?5:4;q(!o.78||k.8Y){o.G.1m=\'21\';m.R(o,{1m:\'21\',1n:\'\'});m.2w(o,{1z:o.1z},o.3Y)}}},71:C(){q(!k.1S.W)E;q(k.1p){A c=k.1p.2U;q(c&&m.2F(c)==k)c.22.8X(c)}N(A i=0;i<k.1S.W;i++){A o=m.$(\'1V\'+k.1S[i]);q(o&&o.22==m.2y&&m.2F(o)==k)m.3G(o)}q(k.2x&&k.4P){k.1t.G.16=\'-4m\';m.28.1X(k.1t)}J m.3G(k.1t)},bZ:C(){q(k.1p&&k.1p.2U){k.1p.4N(\'19-2I\');E}k.74=m.1c(\'a\',{23:\'bI:m.Y[\'+k.Q+\'].73();\',2h:m.Z.9k,1b:\'K-19-2I\'});q(!m.1y(k,\'fP\'))E;k.4E({4O:k.74,1k:m.bo,78:L,1z:m.bn})},73:C(){1C{q(!m.1y(k,\'fN\'))E;q(k.74)m.3G(k.74);k.3I();A 2Z=k.x.D;k.9r(k.x.19,k.y.19);A 3f=k.x.H-(k.x.D-2Z)/2;q(3f<m.4o)3f=m.4o;k.9x(3f,k.y.H);k.53(\'1q\')}1D(e){k.9w(e)}},5N:C(){k.a.1b=k.a.1b.2f(\'K-4F-4h\',\'\');k.53(\'21\');q(k.2x&&k.4P&&k.3h[1]!=\'41\'){k.bg()}J{q(k.1g&&k.3M)k.1g.5L();m.3G(k.U)}q(m.5x)m.5x.G.1n=\'1x\';k.71();q(!m.2y.7u.W)m.2y.G.1n=\'1x\';q(k.43)m.9s(k.Q);m.1y(k,\'fJ\');m.Y[k.Q]=I;m.bi()}};m.7p=C(a,S,7b){k.a=a;k.S=S;k.7b=7b};m.7p.5l={92:C(){A 2L;q(!k.1e)k.1e=m.7q(k.a);q(k.1e.2t(\'#\')){A 2b=k.1e.7C(\'#\');k.1e=2b[0];k.1w=2b[1]}q(m.7s[k.1e]){k.ce=m.7s[k.1e];q(k.1w)k.9W();J k.5X();E}1C{2L=1I ci()}1D(e){1C{2L=1I bj("fF.bD")}1D(e){1C{2L=1I bj("bt.bD")}1D(e){k.90()}}}A 3s=k;2L.fH=C(){q(3s.2L.bu==4){q(3s.1w)3s.9W();J 3s.5X()}};A 1e=k.1e;k.2L=2L;q(m.fo)1e=1e.2f(/$/,(/\\?/.1a(1e)?\'&\':\'?\')+\'fp=\'+(1I 7d()).7k());2L.cG(\'fl\',1e,L);2L.cr(\'X-eo-fi\',\'ci\');2L.cr(\'fj-fq\',\'fz/x-fy-a2-fw\');2L.fu(I)},9W:C(){m.7f();A 3U=2a.3L||m.c1?{1e:\'cX:cW\'}:I;k.1h=m.1c(\'1h\',3U,{1k:\'2m\',16:\'-4m\'},m.28);k.5X()},5X:C(){A s=k.ce||k.2L.cV,7x;q(k.7b)m.7s[k.1e]=s;q(!m.1A||m.49>=5.5){s=s.2f(1I 4W(\'<db[^>]*>\',\'cv\'),\'\').2f(1I 4W(\'<cs[^>]*>.*?</cs>\',\'cv\'),\'\');q(k.1h){A 2u=k.1h.9S;q(!2u&&k.1h.60)2u=k.1h.60.V;q(!2u){A 3s=k;48(C(){3s.5X()},25);E}2u.cG();2u.d1(s);2u.24();1C{s=2u.8C(k.1w).2i}1D(e){1C{s=k.1h.V.8C(k.1w).2i}1D(e){}}m.3G(k.1h)}J{7x=/(<1f[^>]*>|<\\/1f>)/d4;q(7x.1a(s))s=s.7C(7x)[m.1A?1:2]}}m.4R(k.S,\'7y\',\'K-1f\').2i=s;k.3t();N(A x 3c k)k[x]=I}};m.80=C(4e,1s){q(m.d5!==1j)m.7S();k.4e=4e;N(A x 3c 1s)k[x]=1s[x];q(k.d7)k.bF();q(k.2G)k.2G=m.bH(k)};m.80.5l={bF:C(){k.2U=m.1c(\'O\',{2i:m.7O(m.7Q.2U)},I,m.28);A 6b=[\'3S\',\'3e\',\'31\',\'1B\',\'3w\',\'19-2I\',\'24\'];k.1N={};A 3s=k;N(A i=0;i<6b.W;i++){k.1N[6b[i]]=m.4R(k.2U,\'1L\',\'K-\'+6b[i]);k.4N(6b[i])}k.1N.3e.G.1n=\'1x\'},bE:C(){q(k.bs||!k.2U)E;A B=m.Y[k.4e],5e=B.7t(),2l=/7e$/;q(5e==0)k.5i(\'31\');J q(2l.1a(k.1N.31.2z(\'a\')[0].1b))k.4N(\'31\');q(5e+1==m.4M.3g[B.2O||\'1x\'].W){k.5i(\'1B\');k.5i(\'3S\')}J q(2l.1a(k.1N.1B.2z(\'a\')[0].1b)){k.4N(\'1B\');k.4N(\'3S\')}},4N:C(1N){q(!k.1N)E;A br=k,a=k.1N[1N].2z(\'a\')[0],2l=/7e$/;a.2k=C(){br[1N]();E 1j};q(2l.1a(a.1b))a.1b=a.1b.2f(2l,\'\')},5i:C(1N){q(!k.1N)E;A a=k.1N[1N].2z(\'a\')[0];a.2k=C(){E 1j};q(!/7e$/.1a(a.1b))a.1b+=\' 7e\'},bq:C(){q(k.3T)k.3e();J k.3S()},3S:C(bp){q(k.1N){k.1N.3S.G.1n=\'1x\';k.1N.3e.G.1n=\'\'}k.3T=L;q(!bp)m.1B(k.4e)},3e:C(){q(k.1N){k.1N.3e.G.1n=\'1x\';k.1N.3S.G.1n=\'\'}cZ(k.3T);k.3T=I},31:C(){k.3e();m.31(k.1N.31)},1B:C(){k.3e();m.1B(k.1N.1B)},3w:C(){},\'19-2I\':C(){m.2F().73()},24:C(){m.24(k.1N.24)}};m.bH=C(1p){C 77(B){m.3E(1s||{},{4O:4q,1V:\'2G\',1b:\'K-2G-\'+5f+\'-11 \'+(1s.1b||\'\')});q(m.4U)1s.64=0;B.4E(1s);m.R(4q.22,{2e:\'1q\'})};C 26(3P){5q(1U,1o.5t(3P*4q[3B?\'1R\':\'1T\']*0.7))};C 5q(i,7T){q(i===1U)N(A j=0;j<6c.W;j++){q(6c[j]==m.Y[1p.4e].a){i=j;5p}}q(i===1U)E;A as=4q.2z(\'a\'),4F=as[i],4b=4F.22,18=3B?\'c2\':\'c8\',3l=3B?\'c7\':\'c4\',M=3B?\'bO\':\'bP\',4T=\'1v\'+18,1R=\'1v\'+M,7l=O.22.22[1R],7j=7l-2j[1R],5M=3v(2j.G[3B?\'18\':\'16\'])||0,2Q=5M,cU=20;q(7T!==1U){2Q=5M-7T;q(2Q>0)2Q=0;q(2Q<7j)2Q=7j}J{N(A j=0;j<as.W;j++)as[j].1b=\'\';4F.1b=\'K-4F-4h\';A 8U=i>0?as[i-1].22[4T]:4b[4T],7R=4b[4T]+4b[1R]+(as[i+1]?as[i+1].22[1R]:0);q(7R>7l-5M)2Q=7l-7R;J q(8U<-5M)2Q=-8U}A 8G=4b[4T]+(4b[1R]-7n[1R])/2+2Q;m.2w(2j,3B?{18:2Q}:{16:2Q},I,\'8F\');m.2w(7n,3B?{18:8G}:{16:8G},I,\'8F\');8D.G.1n=2Q<0?\'3D\':\'1x\';8J.G.1n=(2Q>7j)?\'3D\':\'1x\'};A 6c=m.4M.3g[m.Y[1p.4e].2O||\'1x\'],1s=1p.2G,5f=1s.5f||\'bR\',8c=(5f==\'cQ\'),4f=8c?[\'O\',\'5W\',\'1L\',\'1E\']:[\'2j\',\'4A\',\'4d\',\'2K\'],3B=(5f==\'bR\'),4q=m.1c(\'O\',{1b:\'K-2G K-2G-\'+5f,2i:\'<O 1W="K-2G-en">\'+\'<\'+4f[0]+\'><\'+4f[1]+\'></\'+4f[1]+\'></\'+4f[0]+\'></O>\'+\'<O 1W="K-26-1J"><O></O></O>\'+\'<O 1W="K-26-e3"><O></O></O>\'+\'<O 1W="K-7n"><O></O></O>\'},{1n:\'1x\'},m.28),5z=4q.7u,O=5z[0],8D=5z[1],8J=5z[2],7n=5z[3],2j=O.e5,4A=4q.2z(4f[1])[0],4d;N(A i=0;i<6c.W;i++){q(i==0||!3B)4d=m.1c(4f[2],I,I,4A);(C(){A a=6c[i],4b=m.1c(4f[3],I,I,4d),e4=i;m.1c(\'a\',{23:a.23,2k:C(){m.2F(k).3I();E m.8B(a)},2i:m.bU?m.bU(a):a.2i},I,4b)})()}q(!8c){8D.2k=C(){26(-1)};8J.2k=C(){26(1)};m.2o(4A,V.dW!==1U?\'dQ\':\'e6\',C(e){A 3P=0;e=e||2a.2B;q(e.bX){3P=e.bX/ee;q(m.3L)3P=-3P}J q(e.bm){3P=-e.bm/3}q(3P)26(-3P*0.2);q(e.58)e.58();e.bl=1j})}E{77:77,5q:5q}};m.76=m.Z;A e8=m.5U;q(m.1A){(C(){1C{V.47.ea(\'18\')}1D(e){48(bh.eb,50);E}m.3Z()})()}m.2o(V,\'ed\',m.3Z);m.2o(2a,\'8s\',m.3Z);m.2o(V,\'3Z\',C(){q(m.7L||m.43){A G=m.1c(\'G\',{T:\'dP/8j\'},I,V.2z(\'dO\')[0]);C 5O(8m,8h){q(!m.1A){G.1X(V.dt(8m+" {"+8h+"}"))}J{A 1i=V.bC[V.bC.W-1];q(1F(1i.5O)=="7a")1i.5O(8m,8h)}}C 4X(1d){E\'bG( ( ( cK = V.47.\'+1d+\' ? V.47.\'+1d+\' : V.1f.\'+1d+\' ) ) + \\\'F\\\' );\'}q(m.7L)5O(\'.K 1M\',\'4w: 7M(\'+m.5c+m.7L+\'), 7J !dn;\');5O(\'.K-2y-D\',(m.4U||(m.1A&&V.7N==\'8o\'))?\'1k: 2m; \'+\'18:\'+4X(\'5Q\')+\'16:\'+4X(\'5K\')+\'M:\'+4X(\'8w\')+\'P:\'+4X(\'cu\'):\'1k: dI; M: 2v%; P: 2v%; 18: 0; 16: 0\')}});m.2o(2a,\'3W\',C(){m.7I();q(m.2y)N(A i=0;i<m.2y.7u.W;i++){A 1P=m.2y.7u[i],B=m.2F(1P);B.5A(1P);q(1P.1V==\'2G\')B.1p.2G.5q()}});m.2o(V,\'7v\',C(e){m.7A={x:e.7B,y:e.7G}});m.2o(V,\'8t\',m.8q);m.2o(V,\'cm\',m.8q);m.2o(V,\'3Z\',m.cI);m.2o(2a,\'8s\',m.cH);m.2o(2a,\'8s\',m.bB)}',62,990,'||||||||||||||||||||this||hs||||if||||||||||var|exp|function|size|return|px|style|pos|null|else|highslide|true|width|for|div|height|key|setStyles|content|type|wrapper|document|length||expanders|lang||overlay|||get||top||left|full|test|className|createElement|prop|src|body|outline|iframe|last|false|position|els|visibility|display|Math|slideshow|hidden|innerContent|options|overlayBox|dim|offset|id|none|fireEvent|opacity|ie|next|try|catch|span|typeof|zIndex|p1|new|up|tpos|li|img|btn|ss|node|auto|offsetWidth|overlays|offsetHeight|undefined|hsId|class|appendChild|imgSize|outlineType||visible|parentNode|href|close||scroll||container|params|window|arr|case|to|overflow|replace|wsize|title|innerHTML|table|onclick|re|absolute|push|addEventListener|op|upcoming|scrollerDiv|loading|match|doc|100|animate|isHtml|viewport|getElementsByTagName|dragArgs|event|args|image|objectType|getExpander|thumbstrip|target|expand|imgPad|td|xhr|ratio|minSize|slideshowGroup|hiddenBy|tblPos|justify|ajax|isImage|controls|easing|dimmer|tgt|min|xSize|p2|previous||||sg|elem||||name|focusKey|in|contentType|pause|xpos|groups|transitions|ucwh|wh|tb|right|lastY|val|marginMin|lastX|custom|clearing|pThis|onLoad|opt|parseInt|move|swf|useBox|html|number|isX|graphic|block|extend|tagName|discardElement|step|focus|hasDragged|elPos|opera|outlineWhileAnimating|releaseMask|objectLoadTime|delta|changed|func|play|autoplay|attribs|timers|resize|ySize|dur|ready||crossfade|getParam|dimmingOpacity|duration|objectWidth|mediumContent|documentElement|setTimeout|uaVersion|yp1|cell|styles|tr|expKey|tree|xp1|anchor|clientSize|page|unit|invPos|9999px|setPosition|marginLeft|max|dom|getNode|now|marginMax|blurExp|zIndexCounter|cursor|safari|sleeping|start|tbody|pendingOutlines|navigator|minWidth|createOverlay|active|tgtArr|clone|bottom|onload|relative|ypos|anchors|enable|overlayId|preserveContent|objectHeight|getElementByClass|center|offsetLeft|ieLt7|fitsize|RegExp|fix|removeEventListener|ruler||marginTop|styleRestoreCursor|doShowHide|relToVP|area|heading|htmls|preventDefault|end|Id|images|graphicsDir|wDiff|cur|mode|moveOnly|while|disable|allowReduce|sizeOverlayBox|prototype|cacheBindings|fadeBox|cNode|break|selectThumb|scrollingContent|hDiff|round|minY|Outline|uclt|mask|trans|domCh|positionOverlay|250|iebody|stl|padToMinWidth|idCounter|minX|maxX|iDoc|isClosing|scrollTop|destroy|curTblPos|afterClose|addRule|toLowerCase|scrollLeft|matches|opos|cache|Expander|parent|ul|loadHTML|obj|setAttribute|contentWindow|showLoading|numberPosition|ysize|fade|param|getParams|allowSizeReduction|owner|contentLoaded|credits|buttons|group|slideshows|preloadTheseImages|isExpanded|on|xsize|geckoMac|fac|all|after|maxY|over|restoreCursor|before|filter|getAnchors|currentStyle|userAgent|cloneNode|above|minHeight|writeExtendedContent|marginBottom|offY|tId|expandDuration|thumbsUserSetId|getPosition|maincontent|wrapperKey|maxWidth|ximgPad|showHideElements|yimgPad|isHsAnchor|complete|onLoadStarted|kdeBugCorr|Dimension|allowWidthReduction|oDiv|afterExpand|hsKey|lt|keyHandler|setSize|dragHandler|cancelLoading|dir|offX||destroyOverlays|topmostKey|doFullExpand|fullExpandLabel||langDefaults|add|hideOnMouseOut|gotoEnd|object|pre|curAnim|Date|disabled|init|self|imgs|onReady|minTblPos|getTime|overlayWidth|preloadFullImage|marker|preloadTheseAjax|Ajax|getSrc|rel|cachedGets|getAnchorIndex|childNodes|mousemove|below|regBody|DIV|panel|mouse|clientX|split|previousOrNext|element|expOnly|clientY|adj|getPageSize|pointer|os|expandCursor|url|compatMode|replaceLang|current|skin|activeRight|updateAnchors|scrollBy|getAdjacentAnchor|cacheAjax|getCacheBinding|dimmingDuration|calcExpanded|clones|Slideshow|swfOptions|defaultView|calcBorders|htmlGetSize|topZ|location|offsetTop|preloadAjaxElement|Text|padding|types|floatMode|startOff|endOff|correctIframeSize|arrow|dec|from|css|border|names|sel|other|BackCompat|maxsize|mouseClickHandler|hasMovedMin|load|mousedown|fitOverlayBox|getIframePageHeight|clientWidth|Click|previousTitle|previousText|parseFloat|transit|getElementById|scrollUp|setObjContainerSize|easeOutQuad|markerPos|mY|mX|scrollDown|allowHeightReduction|props|moveTitle|nextText|nextTitle|moveText|closeTitle|yp2|xp2|closeText|activeLeft|oPos|sizeDiff|removeChild|mouseIsOver|parOff|onError|openerTagNames|run|marginRight|htmlExpand|middle|restoreDuration|keypress|doWrapper||numberOfImagesToPreload|keydown|isReady|garbageBin|update|changeSize|swfobject|state|show|initSlideshow|fullExpandTitle|string|cssDirection|ucrb|direction|align|done|resizeTo|undim|startTime|osize|hasAlphaImageLoader|error|moveTo|allowMultipleInstances|margin|ie6|background|loadingPos|hasFocused|genOverlayBox|restoreTitle|connectOutline|dragByHeading|setPos|wrapperClassName|loadingPosXfade|blur|origProp|getSelfRendered|getWrapperKey|contentId|thumbnailId|evt|contentDocument|distance|Create|getInline|getElementContent|srcElement|abs|overrides|caption|relatedTarget|form|continuePreloading|calcThumb|Next|playText|onGraphicLoad|pauseTitle|Previous|Highslide|Move|JS|playTitle|hide|vis|_default|appendTo|png|Pause|Play|spacebar|Close|call|switch|200|preloadGraphic|and||getImageMapAreaCorrection|rv|thumb|newHeight|hasExtendedContent|attributes|clear|both|ltr|hsHasSetClick|isUnobtrusiveAnchor|detachEvent|flashvars|wmode|fixedControls|hasHtmlExpanders|enableKeyListener|focusTopmost|clickX|dimmingGeckoFix|wrapperMouseHandler|pow|clickY|loadingTitle|contentWrapper|vendor|resizeTitle|targetX|targetY|KDE|toUpperCase|fullExpandText|rb|maxHeight|timerId|headingOverlay|captionOverlay|htmlSizeOperations|offsetParent|loadingOpacity|loadingText|easeInQuad|alpha|tag|orig|nopad|pauseText|indexOf|hand|sleep|arguments|reOrder|ActiveXObject|focusTitle|returnValue|detail|fullExpandOpacity|fullExpandPosition|wait|hitSpace|sls|repeat|Microsoft|readyState|clearsX|showCredits|getPropertyValue||getComputedStyle|clearsY|preloadAjax|styleSheets|XMLHTTP|checkFirstAndLast|getControls|expression|Thumbstrip|javascript|rightpanel|gotOverlays|leftpanel|offsetY|offsetX|Width|Height|getNumber|horizontal|getOverlays|writeCredits|stripItemFormatter|relativeTo|doPanels|wheelDelta|destroyObject|createFullExpand|htmlPrepareClose|ie6SSL|Left|awake|Bottom|showOverlays|reuseOverlay|Right|Top|hideIframes|getAttribute||creditsText|creditsTarget|cachedGet|transitionDuration|creditsTitle|newImg|XMLHttpRequest|creditsPosition|creditsHref|onHideLoading|mouseup|preloadNext|prepareNextOutline|toString|fadeInOut|setRequestHeader|script|overlayOptions|clientHeight|gi|tmpMin|ximgSize|correctRatio|addOverlay|Safari|hideSelects|525|Overlay|nextSibling|_|open|preloadImages|setClickEvents|oldImg|ignoreMe|yimgSize|Eval|easingClose|sqrt|onSetClickEvent|float|useMap|pageYOffset|dragSensitivity|mgnRight|responseText|blank|about|01|clearTimeout|addSlideshow|write|htmlE|registerOverlay|ig|dynamicallyUpdateAnchors|keyCode|useControls|xpand|geckodimmer|onImageClick|link|onDrop|button|onKeyDown|onDimmerClick|dimming|white|maincontentText|graphics|zoomin|zoomout|keys|important|drag|Use|1001|outlineStartOffset|shadow|createTextNode|drop|_self|http|com|click|of|Expand|actual|front|bring|Loading|cancel|Powered|Go|fixed|Image|Resize|esc|the|homepage|HEAD|text|mousewheel|Gecko|Macintosh|ra|Trident|it|onmousewheel|||removeAttribute|innerHeight|pageXOffset|innerWidth|down|pI|firstChild|DOMMouseScroll|maincontentEval|HsExpander|footer|doScroll|callee|header|DOMContentLoaded|120|captionId|headingEval|maincontentId|headingText|headingId|captionText||captionEval|inner|Requested|progid|DXImageTransform|transparent|onAfterGetCaption|onAfterGetHeading|AlphaImageLoader|sizingMethod|onDrag|scale|eval|onBeforeGetHeading|outlines|outlinesDir|cellSpacing|expressInstallSwfurl|onBeforeGetCaption|500|oncontextmenu|version|borderCollapse|fontSize|lineHeight|embedSWF|collapse|flash|200px|onmouseout|htmlCreate|onBeforeGetContent|onmouseover|onAfterGetContent|onFocus|flushImgSize|blockRightClick|imageCreate|onBlur|onShowLoading|static|IFRAME|removeSWF|StopPlay|newWidth|onCreateOverlay|frameborder|default|onBeforeClose|SELECT|allowSimultaneousLoading|onInit|fit|useOnHtml|interval|protocol|https|floor|With|Content|shape|GET|onBeforeExpand|reflow|forceAjaxReload|dummy|Type|attachEvent|toElement|fromElement|send|mouseover|urlencoded||www|application|onMouseOut|circle|onMouseOver|clip|coords|Msxml2|onAfterExpand|onreadystatechange|onActivate|onAfterClose|setInterval|300|clearInterval|onDoFullExpand|splice|onCreateFullExpand|linearTween|boolean|1px|insertBefore|rect|nodeName|paddingTop|reuse'.split('|'),0,{}))


/*  */
/*
  Easing Equations v1.5
  May 1, 2003
  (c) 2003 Robert Penner, all rights reserved. 
  This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html.  
  
  These tweening functions provide different flavors of 
  math-based motion under a consistent API. 
  
  Types of easing:
  
	  Linear
	  Quadratic
	  Cubic
	  Quartic
	  Quintic
	  Sinusoidal
	  Exponential
	  Circular
	  Elastic
	  Back
	  Bounce

  Changes:
  1.5 - added bounce easing
  1.4 - added elastic and back easing
  1.3 - tweaked the exponential easing functions to make endpoints exact
  1.2 - inline optimizations (changing t and multiplying in one step)--thanks to Tatsuo Kato for the idea
  
  Discussed in Chapter 7 of 
  Robert Penner's Programming Macromedia Flash MX
  (including graphs of the easing equations)
  
  http://www.robertpenner.com/profmx
  http://www.amazon.com/exec/obidos/ASIN/0072223561/robertpennerc-20
*/


// simple linear tweening - no easing
// t: current time, b: beginning value, c: change in value, d: duration
Math.linearTween = function (t, b, c, d) {
	return c*t/d + b;
};


 ///////////// QUADRATIC EASING: t^2 ///////////////////

// quadratic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be in frames or seconds/milliseconds
Math.easeInQuad = function (t, b, c, d) {
	return c*(t/=d)*t + b;
};

// quadratic easing out - decelerating to zero velocity
Math.easeOutQuad = function (t, b, c, d) {
	return -c *(t/=d)*(t-2) + b;
};

// quadratic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuad = function (t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t + b;
	return -c/2 * ((--t)*(t-2) - 1) + b;
};


 ///////////// CUBIC EASING: t^3 ///////////////////////

// cubic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInCubic = function (t, b, c, d) {
	return c*(t/=d)*t*t + b;
};

// cubic easing out - decelerating to zero velocity
Math.easeOutCubic = function (t, b, c, d) {
	return c*((t=t/d-1)*t*t + 1) + b;
};

// cubic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutCubic = function (t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t*t + b;
	return c/2*((t-=2)*t*t + 2) + b;
};


 ///////////// QUARTIC EASING: t^4 /////////////////////

// quartic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInQuart = function (t, b, c, d) {
	return c*(t/=d)*t*t*t + b;
};

// quartic easing out - decelerating to zero velocity
Math.easeOutQuart = function (t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

// quartic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuart = function (t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
	return -c/2 * ((t-=2)*t*t*t - 2) + b;
};


 ///////////// QUINTIC EASING: t^5  ////////////////////

// quintic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInQuint = function (t, b, c, d) {
	return c*(t/=d)*t*t*t*t + b;
};

// quintic easing out - decelerating to zero velocity
Math.easeOutQuint = function (t, b, c, d) {
	return c*((t=t/d-1)*t*t*t*t + 1) + b;
};

// quintic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuint = function (t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
	return c/2*((t-=2)*t*t*t*t + 2) + b;
};



 ///////////// SINUSOIDAL EASING: sin(t) ///////////////

// sinusoidal easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInSine = function (t, b, c, d) {
	return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
};

// sinusoidal easing out - decelerating to zero velocity
Math.easeOutSine = function (t, b, c, d) {
	return c * Math.sin(t/d * (Math.PI/2)) + b;
};

// sinusoidal easing in/out - accelerating until halfway, then decelerating
Math.easeInOutSine = function (t, b, c, d) {
	return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
};


 ///////////// EXPONENTIAL EASING: 2^t /////////////////

// exponential easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInExpo = function (t, b, c, d) {
	return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
};

// exponential easing out - decelerating to zero velocity
Math.easeOutExpo = function (t, b, c, d) {
	return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
};

// exponential easing in/out - accelerating until halfway, then decelerating
Math.easeInOutExpo = function (t, b, c, d) {
	if (t==0) return b;
	if (t==d) return b+c;
	if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
	return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
};


 /////////// CIRCULAR EASING: sqrt(1-t^2) //////////////

// circular easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInCirc = function (t, b, c, d) {
	return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
};

// circular easing out - decelerating to zero velocity
Math.easeOutCirc = function (t, b, c, d) {
	return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
};

// circular easing in/out - acceleration until halfway, then deceleration
Math.easeInOutCirc = function (t, b, c, d) {
	if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
	return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
};


 /////////// ELASTIC EASING: exponentially decaying sine wave  //////////////

// t: current time, b: beginning value, c: change in value, d: duration, a: amplitude (optional), p: period (optional)
// t and d can be in frames or seconds/milliseconds

Math.easeInElastic = function (t, b, c, d, a, p) {
	if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
	if (a < Math.abs(c)) { a=c; var s=p/4; }
	else var s = p/(2*Math.PI) * Math.asin (c/a);
	return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
};

Math.easeOutElastic = function (t, b, c, d, a, p) {
	if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
	if (a < Math.abs(c)) { a=c; var s=p/4; }
	else var s = p/(2*Math.PI) * Math.asin (c/a);
	return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
};

Math.easeInOutElastic = function (t, b, c, d, a, p) {
	if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
	if (a < Math.abs(c)) { a=c; var s=p/4; }
	else var s = p/(2*Math.PI) * Math.asin (c/a);
	if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
};


 /////////// BACK EASING: overshooting cubic easing: (s+1)*t^3 - s*t^2  //////////////

// back easing in - backtracking slightly, then reversing direction and moving to target
// t: current time, b: beginning value, c: change in value, d: duration, s: overshoot amount (optional)
// t and d can be in frames or seconds/milliseconds
// s controls the amount of overshoot: higher s means greater overshoot
// s has a default value of 1.70158, which produces an overshoot of 10 percent
// s==0 produces cubic easing with no overshoot
Math.easeInBack = function (t, b, c, d, s) {
	if (s == undefined) s = 1.70158;
	return c*(t/=d)*t*((s+1)*t - s) + b;
};

// back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target
Math.easeOutBack = function (t, b, c, d, s) {
	if (s == undefined) s = 1.70158;
	return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
};

// back easing in/out - backtracking slightly, then reversing direction and moving to target,
// then overshooting target, reversing, and finally coming back to target
Math.easeInOutBack = function (t, b, c, d, s) {
	if (s == undefined) s = 1.70158; 
	if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
};


 /////////// BOUNCE EASING: exponentially decaying parabolic bounce  //////////////

// bounce easing in
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInBounce = function (t, b, c, d) {
	return c - Math.easeOutBounce (d-t, 0, c, d) + b;
};

// bounce easing out
Math.easeOutBounce = function (t, b, c, d) {
	if ((t/=d) < (1/2.75)) {
		return c*(7.5625*t*t) + b;
	} else if (t < (2/2.75)) {
		return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
	} else if (t < (2.5/2.75)) {
		return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
	} else {
		return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
	}
};

// bounce easing in/out
Math.easeInOutBounce = function (t, b, c, d) {
	if (t < d/2) return Math.easeInBounce (t*2, 0, c, d) * .5 + b;
	return Math.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b;
};


//trace (">> Penner easing equations loaded");








/*  */
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

/*  */
﻿/*
 * language: English
*/
hs.lang = {
   cssDirection:     'ltr',
   loadingText :     'Loading...',
   loadingTitle :    'Click to cancel',
   focusTitle :      'Click to bring to front',
   fullExpandTitle : 'Expand to actual size (f)',
   fullExpandText :  'Full size',
   creditsText :     'Powered by <i>Highslide JS</i>',
   creditsTitle :    'Go to the Highslide JS homepage',
   previousText :    'Previous',
   previousTitle :   'Previous (arrow left)',
   nextText :        'Next',
   nextTitle :       'Next (arrow right)',
   moveTitle :       'Move',
   moveText :        'Move',
   closeText :       'Close',
   closeTitle :      'Close (esc)',
   resizeTitle :     'Resize',
   playText :        'Play',
   playTitle :       'Play slideshow (spacebar)',
   pauseText :       'Pause',
   pauseTitle :      'Pause slideshow (spacebar)',
   number :          'Image %1 of %2',
   restoreTitle :    'Click to close image, click and drag to move. Use arrow keys for next and previous.'
};

/*  */
/*
*  Highslide site settings
*  DO NOT EDIT. Generated on 2009-07-02 14:23:35 (GMT) by the Highslide Configuration Component 2.0.4
*/

hs.showCredits = false;
hs.creditsPosition = 'top left';
hs.graphicsDir = 'plugins/content/highslide/graphics/';
hs.outlineStartOffset = 3;
hs.outlineWhileAnimating = false;
hs.lang.loadingText = 'Chargement...';
hs.lang.loadingTitle = 'Cliquer pour annuler';
hs.loadingOpacity = 0.75;
hs.dimmingOpacity = 0.8;
hs.captionEval = 'this.thumb.title';
hs.padToMinWidth = false;
hs.padToMinWidth = false;
hs.lang.focusTitle = 'Cliquer pour mettre au 1er plan';
hs.lang.closeText = 'Fermer';
hs.lang.closeTitle = 'Cliquer pour fermer';
hs.lang.resizeTitle = 'Redimensionner';
hs.lang.moveText = 'Déplacer';
hs.lang.nextText = 'Suivant';
hs.lang.previousText = 'Précédent';
hs.expandCursor = 'zoomin.cur';
hs.restoreCursor = 'zoomout.cur';
hs.creditsHref = 'http://vikjavev.no/highslide/';
hs.lang.creditsText = 'Réalisé par  <i>Highslide JS</i>';
hs.lang.creditsTitle = 'Lien sur le site de Highslide JS';
hs.easing = '';
hs.easingClose = hs.easing;
hs.fullExpandOpacity = 1.0;
hs.lang.fullExpandTitle = 'Cliquer pour afficher la taille réélle';
hs.marginTop = 10;
hs.marginBottom = 15;
hs.marginLeft = 10;
hs.marginRight = 15;
hs.minHeight = 200;
hs.minWidth = 200;
hs.numberOfImagesToPreload = 5;
hs.transitions = ['expand', 'fade'];
hs.fullExpandPosition = 'bottom right';
hs.objectLoadTime = 'before';
hs.align = '';
hs.anchor = '';
hs.allowSizeReduction = true;
hs.fadeInOut = true;
hs.allowMultipleInstances = true;
hs.allowWidthReduction = true;
hs.allowHeightReduction = true;
hs.blockRightClick = false;
hs.enableKeyListener = true;
hs.dynamicallyUpdateAnchors = true;
hs.useBox = false;
hs.cacheAjax = true;
hs.preserveContent = true;
hs.dragByHeading = true;
hs.dragSensitivity = 5;
hs.dimmingDuration = 50;
hs.expandDuration = 250;
hs.transitionDuration = 500;
hs.expandSteps = 10;
hs.zIndexCounter = 1001;
hs.lang.restoreTitle = 'Cliquer=Fermer - Cliquer-glisser=Déplacer - Clavier: Flèche gauche=Précédent - Flèche droite=Suivant';
hs.Expander.prototype.onBeforeGetCaption = function(sender)
{
	if (typeof sender.captionId != 'undefined' && sender.captionId != null)
	{
		if (document.getElementById( sender.captionId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/hsjcaption(["']*):\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.captionId;
				div['className'] = 'highslide-caption';
				var onclickstyle = onclick.match(/hsjcaptionstyle(["']*):\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
	return true;
}
hs.Expander.prototype.onBeforeGetHeading = function(sender)
{
	if (typeof sender.headingId != 'undefined' && sender.headingId != null)
	{
		if (document.getElementById( sender.headingId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/hsjheading(["']*):\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.headingId;
				div['className'] = 'highslide-heading';
				var onclickstyle = onclick.match(/hsjheadingstyle(["']*):\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
	return true;
}
hs.Expander.prototype.onBeforeGetContent = function(sender)
{
	if (typeof sender.contentId != 'undefined' && sender.contentId != null)
	{
		if (document.getElementById( sender.contentId ) == null && sender.a.onclick != null)
		{
			var onclick = sender.a.onclick.toString();
			var onclickprop = onclick.match(/hsjcontent(["']*):\s*('|")([^'"]*)/);
			if (onclickprop != null)
			{
				var text = unescape( onclickprop[3] );
				var div = document.createElement('div');
				div['innerHTML'] = hs.replaceLang( text );
				div['id'] = sender.contentId;
				div['className'] = 'highslide-html-content';
				var onclickstyle = onclick.match(/hsjcontentstyle(["']*):\s*('|")([^'"]*)/);
				if (onclickstyle != null)
				{
					var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
					if (styles != null)
					{
						for (var i = 0; i < styles.length; i++)
						{
							var arr;
							arr = styles[i].split(":");
							div.style[arr[0]] = arr[1].replace( " ", "");
						}
					}
				}
				sender.a.appendChild( div );
			}
		}
	}
	return true;
}
hs.Expander.prototype.onBeforeExpand = function (sender) {
	if (this.custom != null
       &&this.custom['overlayId'] != null)
    {
		sender.createOverlay( this.custom );
	}
	return true;
}
hs.Expander.prototype.onInit = function (sender)
{
	if (sender.a.onclick != null)
	{
		var onclick = sender.a.onclick.toString();
		var onclickprop = onclick.match(/overlayId(["']*):\s*('|")([^'"]*)/);
		if (onclickprop != null)
		{
			var overlayId = onclickprop[3];
			if (document.getElementById( overlayId ) == null)
			{
				var onclickprop = onclick.match(/hsjcustomOverlay(["']*):\s*('|")([^'"]*)/);
				if (onclickprop != null)
				{
					var text = unescape( onclickprop[3] );
					var div = document.createElement('div');
					div['innerHTML'] = hs.replaceLang( text );
					div['id'] = overlayId;
					div['className'] = 'highslide-overlay';
					var onclickstyle = onclick.match(/hsjcustomOverlayStyle(["']*):\s*('|")([^'"]*)/);
					if (onclickstyle != null)
					{
						var styles = onclickstyle[3].match(/([^:; ])*:\s*([^,;}])*/g);
						if (styles != null)
						{
							for (var i = 0; i < styles.length; i++)
							{
								var arr;
								arr = styles[i].split(":");
								div.style[arr[0]] = arr[1].replace( " ", "");
							}
						}
					}
					sender.a.appendChild( div );
					var overlayExists = false;
					for (var i = 0; i < hs.overlays.length; i++)
					{
						if (hs.overlays[i].overlayId == overlayId)
						{
							overlayExists = true;
						}
					}
					if (! overlayExists)
					{
						onclickprop = onclick.match(/customOverlay(["']*):\s*{\s*([^}]*)}/);
						if (onclickprop != null)
						{
							try
							{
								eval( "var opts = {" + onclickprop[2] + "}" );
								opts.overlayId = overlayId;
								if (typeof sender.thumb.id != "undefined" && sender.thumb.id != "")
								{
									opts.thumbnailId = sender.thumb.id;
									hs.registerOverlay( opts );
								}
								else
								if (typeof sender.a.id != "undefined" && sender.a.id != "")
								{
									opts.thumbnailId = sender.a.id;
									hs.registerOverlay( opts );
								}
							}
							catch(e)
							{
								//	ignore
							}
						}
					}
				}
			}
		}
	}
	return true;
}

/*  */
function submitacymailingform(task,formName){
	var varform = eval('document.'+formName);
	if(!varform.elements) varform = varform[1];

       if(task != 'optout'){
         nameField = varform.elements['user[name]'];
         if(nameField && (( typeof acymailing != 'undefined' && nameField.value == acymailing['NAMECAPTION'] ) || nameField.value.length < 2)){
           if(typeof acymailing != 'undefined'){ alert(acymailing['NAME_MISSING']); }
           nameField.className = nameField.className +' invalid';
           return false;
         }
       }

       var emailField = varform.elements['user[email]'];
       if(emailField){
       emailField.value = emailField.value.replace(/ /g,"");
        var filter = /^([a-z0-9_'&\.\-\+])+\@(([a-z0-9\-])+\.)+([a-z0-9]{2,10})+$/i;
        if(!emailField || (typeof acymailing != 'undefined' && emailField.value == acymailing['EMAILCAPTION']) || !filter.test(emailField.value)){
          if(typeof acymailing != 'undefined'){ alert(acymailing['VALID_EMAIL']); }
          emailField.className = emailField.className +' invalid';
          return false;
        }
       }
       
       	if(task != 'optout' && typeof acymailing != 'undefined' && typeof acymailing['reqFields'+formName] != 'undefined' && acymailing['reqFields'+formName].length > 0){

			for(var i =0;i<acymailing['reqFields'+formName].length;i++){
				elementName = 'user['+acymailing['reqFields'+formName][i]+']';
				elementToCheck = varform.elements[elementName];
				if(elementToCheck){
					var isValid = false;
					if(typeof elementToCheck.value != 'undefined'){
						if(elementToCheck.value.length>0){
							if(typeof acymailing['excludeValues'+formName] == 'undefined' || typeof acymailing['excludeValues'+formName][acymailing['reqFields'+formName][i]] == 'undefined' || acymailing['excludeValues'+formName][acymailing['reqFields'+formName][i]] != elementToCheck.value) isValid = true;
						 }
					}else{
						for(var a=0; a < elementToCheck.length; a++){
						   if(elementToCheck[a].checked && elementToCheck[a].value.length>0) isValid = true;
						}
					}
					if(!isValid){
						elementToCheck.className = elementToCheck.className +' invalid';
						alert(acymailing['validFields'+formName][i]);
						return false;
					}
				}else{
					if((varform.elements[elementName+'[day]'] && varform.elements[elementName+'[day]'].value<1) || (varform.elements[elementName+'[month]'] && varform.elements[elementName+'[month]'].value<1) || (varform.elements[elementName+'[year]'] && varform.elements[elementName+'[year]'].value<1902)){
						if(varform.elements[elementName+'[day]'] && varform.elements[elementName+'[day]'].value<1) varform.elements[elementName+'[day]'].className = varform.elements[elementName+'[day]'].className + ' invalid';
						if(varform.elements[elementName+'[month]'] && varform.elements[elementName+'[month]'].value<1) varform.elements[elementName+'[month]'].className = varform.elements[elementName+'[month]'].className + ' invalid';
						if(varform.elements[elementName+'[year]'] && varform.elements[elementName+'[year]'].value<1902) varform.elements[elementName+'[year]'].className = varform.elements[elementName+'[year]'].className + ' invalid';
						alert(acymailing['validFields'+formName][i]);
						return false;
					}	
				}
			}
		}

        var captchaField = varform.elements['acycaptcha'];
        if(captchaField){
     	   if(captchaField.value.length<1){
     		   if(typeof acymailing != 'undefined'){ alert(acymailing['CAPTCHA_MISSING']); }
     		   captchaField.className = captchaField.className +' invalid';
                return false;
     	   }
        }
        
       if(task != 'optout'){
         termsandconditions = varform.terms;
         if(termsandconditions && !termsandconditions.checked){
           if(typeof acymailing != 'undefined'){ alert(acymailing['ACCEPT_TERMS']); }
           termsandconditions.className = termsandconditions.className +' invalid';
           return false;
         }
       }
       
       taskField = varform.task;
       taskField.value = task;

       varform.submit();

       if(window.parent && window.parent.document.getElementById('sbox-window')){
       	window.parent.document.getElementById('sbox-window').close();
       }

       return false;
     }


