MooTools.More={version:"1.4.0.1",build:"a4244edf2aa97ac8a196fc96082dd35af1abab87"};var Asset={javascript:function(d,b){if(!b){b={};}var a=new Element("script",{src:d,type:"text/javascript"}),e=b.document||document,c=b.onload||b.onLoad;delete b.onload;delete b.onLoad;delete b.document;if(c){if(typeof a.onreadystatechange!="undefined"){a.addEvent("readystatechange",function(){if(["loaded","complete"].contains(this.readyState)){c.call(this);}});}else{a.addEvent("load",c);}}return a.set(b).inject(e.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d});var c=a.onload||a.onLoad,e=a.document||document;delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head);},image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){};delete b[f];delete b[g];d[g]=function(){if(!d){return;}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);}return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0;b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++;b.onProgress.call(this,a,e,f);if(a==c.length){b.onComplete();}},onerror:function(){a++;b.onError.call(this,a,e,f);if(a==c.length){b.onComplete();}}}));}));}};;var History={};History.System=new Class({Implements:[Options,Events],options:{observeDelay:100,iframeSrc:'/history/history.html'},initialize:function(options){this.setOptions(options);this.state=null;return this;},start:function(){this.observe.periodical(this.options.observeDelay,this);this.started=true;this.observe();this.setState(this.state,true);window.fireEvent('historystart',[this.state]);return this;},observe:function(){if(this.timeout){return;}
var state=this.getState();if(this.state==state){return;}
if(((Browser.Engine.trident&&(!document.querySelectorAll)))&&(this.state!==null)){this.setState(state,false);}
else{this.state=state;}
window.fireEvent('placechange',[state]);},observeTimeout:function(){if(this.timeout)this.timeout=$clear(this.timeout);else this.timeout=this.observeTimeout.delay(200,this);},getHash:function(){var href=top.location.href;var pos=href.indexOf('#')+1;return(pos)?href.substr(pos):'';},getState:function(){var state=this.getHash();if(this.iframe){var doc=this.iframe.contentWindow.document;if(doc&&doc.body.id=='state'){var istate=doc.body.innerText;if(this.state==state)return istate;this.istateOld=true;}else return this.istate;}
return state;},setState:function(state,initial){state=$pick(state,'');top.location.hash=state||'#';if(Browser.Engine.trident&&(!document.querySelectorAll)&&(initial||this.istateOld)){$L.from('History.System').debug('Old IE mode');if(!this.iframe){this.iframe=new Element('iframe',{src:this.options.iframeSrc,style:'visibility: hidden;height:1px;'}).injectInside(document.body);this.istate=this.state;}
try{var doc=this.iframe.contentWindow.document;doc.open();doc.write('<html><body id="state">'+state+'</body></html>');doc.close();this.istateOld=false;}catch(e){};}
this.state=state;}});History.Manager=new Class({system:null,observers:[],initialize:function(system){this.system=system.start();$L.from('History').info('Started.');$L.from('History').debug('Place changed: '+this.system.getState());window.addEvent('placechange',function(state){$L.from('History').debug('Place changed: '+state);this.observers.each(function(observer){this.notify(observer,state);},this);}.bind(this));},addListener:function(callback){var observer={'callback':callback};this.observers.push(observer);var state=this.getState();this.notify(observer,state);$L.from('History').debug('Listener added and notified.');},notify:function(observer,state){observer.callback(state);},getState:function(){return this.system.getState();}});History.usingHistoryApi=function()
{return!History.forceOldMode&&History.supportsHistoryApi();};History.supportsHistoryApi=function()
{return!!(window.history&&history.pushState);};History.instance=function(){if(!History._instance){History._instance=new History.Manager(new History.System);}
return History._instance;};History.forceOldMode=false;;var Map=new Class({overlays:null,links:null,annotation:null,toggleFx:null,msgClickToOpen:'Click to use map',msgClickToClose:'Click to close',initialize:function()
{$('Map-cover').setStyle('opacity',0.05);},afterPreload:function(onAfterPreload){$('Progress-bar').fade('hide').set('tween',{duration:'long',chain:'cancel'}).fade('in');this.preload(function(){this.init();onAfterPreload();}.bind(this));},show:function(state)
{this.ensureOpen();var prefixInfo='Map-annotation-';var prefixOver='Map-overlay-';var prefixLink='Map-point-';var info=null;var over=null;if(state==='')
{$('Map-slide').fade('hide');this.annotation.empty();info=$(prefixInfo+'Intro');over=$(prefixOver+'Intro');link=$(prefixLink+'Intro');}
else
{$('Map-slide').fade('in');info=$(prefixInfo+state);over=$(prefixOver+state);link=$(prefixLink+state);_gaq.push(['_trackEvent','Map','Open',state]);}
if(info)
{var html=info.get('html');var show=function(){this.annotation.set('html',html).fade('in');}.bind(this);if(this.annotation.get('html')){this.annotation.fade('out').get('tween').chain(show);}else{this.annotation.fade('hide');show();}}
if(over)
{this.overlays.fade('out');over.fade('in');}
if(link)
{this.links.removeClass('active');link.addClass('active');}},init:function(){this.links=$('Map-wrap').getElements('a').each(function(anchor){var point=anchor.get('id').replace(/^Map-point-/,'');anchor.set('href','#'+point);});this.overlays=$('Map-wrap').getElements('div').set('tween',{duration:'600'}).fade('hide');this.annotation=$('Map-slide-content').fade('hide').set('tween',{duration:'300'});$('Map-toggle').set('html',this.msgClickToOpen).addEvent('click',function(){this.toggle();}.bind(this));$('Map-cover').addEvent('click',function(){this.toggle();}.bind(this));this.toggleFx=new Fx.Tween('Focus-wrap',{duration:'long',transition:'pow:out',link:'cancel',property:'height'});},ensureOpen:function()
{var toggler=$('Map-toggle');var hash=window.location.hash.replace(/^#/,'');if(hash&&'Map-toggle-open'===toggler.get('class'))
{this.toggle();}},toggle:function()
{var cover=$('Map-cover');var toggler=$('Map-toggle');if('Map-toggle-open'===toggler.get('class'))
{this.openMap(cover,toggler,this.toggleFx,this.mapFx);toggler.set('class','Map-toggle-close');}
else
{this.closeMap(cover,toggler,this.toggleFx,this.mapFx);toggler.set('class','Map-toggle-open');}},openMap:function(cover,toggler,toggleFx,mapFx)
{cover.setStyle('display','none');toggler.set('html',this.msgClickToClose);toggleFx.start(350,600);},closeMap:function(cover,toggler,toggleFx,mapFx)
{cover.setStyle('display','block');toggler.set('html',this.msgClickToOpen);toggleFx.start(600,350);window.location.hash='';},preload:function(loaded)
{var imgs=[];$('Map-wrap').getElements('div').each(function(item){var url=item.getStyle('background').replace('url(','').replace(')','');imgs.push(url);});imgs.push('/assets/application/img/basemap.png');var count=imgs.length;Asset.images(imgs,{onComplete:function(){$('Progress-bar').fade('out');loaded();},onProgress:function(counter,index,source){$('Progress').setStyle('width',Math.round(counter/count*100)+'%');},onError:function(counter,index,source){}});}});;var Slides=new Class({slideID:'Map-slide',imageID:'Map-image',wrapID:'Map-wrap',small:'/small/',large:'/large/',showing:false,initialize:function()
{var self=this;$(this.slideID).addEvent('click',function(elem){self.ifIsImage(elem,function(img){self.show(img);});});$(this.wrapID).addEvent('click',function(elem){self.ifShowing(function(){self.hide();});});$(this.imageID).fade('hide');},ifIsImage:function(elem,callbackTrue)
{var img=elem.target;if('IMG'===img.tagName)
{callbackTrue(img);}},ifShowing:function(callbackTrue)
{if(this.showing){callbackTrue();}},show:function(img)
{var source=img.get('src').replace(this.small,this.large);var caption=img.get('alt');$(this.imageID).empty().grab(new Element('img',{src:source,alt:caption})).grab(new Element('div.caption',{text:caption}));this.showing=true;$(this.imageID).fade('in');},hide:function()
{this.showing=false;$(this.imageID).fade('out');},change:function(state)
{var self=this;self.ifShowing(function(){self.hide();});}});;var Bootstrap=new Class({initialize:function()
{History.forceOldMode=false;if($('Map-wrap'))
{var slides=new Slides();History.instance().addListener(function(state){slides.change(state);});var map=new Map();map.afterPreload(function(){History.instance().addListener(function(state){map.show(state);});});}}});window.addEvent('domready',function(){new Bootstrap();});
