if(typeof (AC)=="undefined"){AC={};}if(typeof (document.event)=="undefined"){document.event={};}if(Event.Publisher){Object.extend(document.event,Event.Publisher);}AC.SwapView=Class.create({_view:null,currentContent:null,delegate:null,initialize:function(e){if(typeof e==="string"){this._viewId=e;}else{this._view=$(e);}if(this._view){var D=this._view.childNodes,A;while(A=D[0]){this._view.removeChild(A);}this._view.addClassName("swapView");}},view:function(){if(!this._view){this._view=$(this._viewId);if(this._view){this._view.innerHTML="";this._view.addClassName("swapView");}}return this._view;},setDelegate:function(e){this.delegate=e;},setContent:function(e){if(e==this.currentContent){return ;}if(this.currentContent&&typeof (this.delegate.willClose)=="function"){this.delegate.willClose(this,this.currentContent);}if(e&&typeof (this.delegate.isContentLoaded)=="function"){if(!this.delegate.isContentLoaded(this,e)){if(typeof (this.delegate.loadContent)=="function"){this.delegate.loadContent(this,e);return ;}}}this.setLoadedContent(e);},setLoadedContent:function(A){if(typeof (this.delegate.willShow)=="function"){A=this.delegate.willShow(this,this.currentContent,A);}var e=true;if(typeof (this.delegate.shouldAnimateContentChange)=="function"){e=this.delegate.shouldAnimateContentChange(this,this.currentContent,A);}if(e&&typeof (this.delegate.willAnimate)=="function"){this.didAnimate=true;if(this.view()&&A&&this.currentContent!==A){this.view().appendChild(A);}if(typeof (this.delegate.didAppendContent)=="function"){this.delegate.didAppendContent(this,A);}var D=this.delegate.willAnimate(this,this.currentContent,A,this.didShow.bind(this,A));}else{this.didAnimate=false;if(this.currentContent!==A){if(this.currentContent&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent);}if(A){this.view().appendChild(A);}if(typeof (this.delegate.didAppendContent)=="function"){this.delegate.didAppendContent(this,A);}}if(A){$(A).setOpacity(1);}this.didShow(A);}},didShow:function(e){if(this.currentContent&&(this.currentContent!==e)&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent);}if(typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.currentContent,e);}this.currentContent=e;}});if(typeof (AC.ViewMaster)=="undefined"){AC.ViewMaster={};}AC.ViewMaster.Viewer=Class.create({view:null,triggerClassName:null,currentSection:null,requestedSection:null,sections:null,orderedSections:null,_locked:false,_didShowInitial:false,options:null,initialSectionFromId:function(e){return this.sectionWithId(e);},sectionWithId:function(Y){if(!Y){return null;}var D=null;if(Y&&this.sections.get(Y)){D=this.sections.get(Y);}if(!D){var A,e=null;A=document.getElementById(Y);if(A===this.view._view){A=null;}if(!A){e=document.getElementsByName(Y);}if(e&&e.length>0){A=e[0];}if(A===this.view._view){A=null;}if(A){if(A.tagName.toLowerCase()==="a"){if(Element.Methods.hasClassName(A,this.triggerClassName)){D=this.addSection(A);}}else{D=this.addSection(A);}}}return D;},indexOfSection:function(e){return this.orderedSections.indexOf(e.id);},initialize:function(Y,R,S,X){if(S){this.triggerClassName=S;}this.sections=$H();this.orderedSections=[];this.options=X||{};this.triggerEvent=this.options.triggerEvent||"click";var D=null;if(Y){for(var M=0;M<Y.length;M++){section=this.addSection(Y.item(M));if(!D){D=section;}}}this.view=new AC.SwapView(R);this.view.setDelegate(this);var e=document.location.hash.replace(/#/,""),L;if(e!==this.view._viewId){var a=document.getElementsByClassName(this.triggerClassName);for(var M=0,A;(A=a[M]);M++){if(A.getAttribute("href").match("#"+e)){L=this.sectionWithId(e);break;}}}if(L){D=L;}if(!D&&typeof this.options.initialId==="string"&&this.options.initialId.length>0){D=this.sectionWithId(this.options.initialId);}this.show(D);Event.observe(document,this.triggerEvent,this._triggerClicked.bindAsEventListener(this));if(AC.Detector.isIEStrict()){Event.observe(document,"mouseup",this._triggerClicked.bindAsEventListener(this));}if(typeof (this.listenForEvent)=="function"){this.selectSectionFromEventHandler=this.selectSectionFromEvent.bind(this);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);if(this.options.parentSectionId){this.listenForEvent(AC.ViewMaster,"ViewMasterWillCloseNotification",false,function(v){var q=v.event_data.data;if(this===q.sender){return ;}if(q.outgoingView&&q.outgoingView.id===this.options.parentSectionId){this.willClose(this.view,this.currentSection);}});}}},selectSectionFromEvent:function(e){if(e.event_data.data.sender===this){return ;}if(e.event_data.data.parentTriggerClassName!==this.triggerClassName){return ;}this.selectSectionWithIdEvent(e.event_data.data.parentSectionId,e.event_data.data.event);},selectSectionWithIdEvent:function(S,L){var e=this.sectionWithId(S),Y=null,A,D,M=false;if(e){Y=e.triggers();if(Y&&Y.length>0){for(A=0;(D=Y[A]);A++){if(Element.Methods.hasClassName(D,this.triggerClassName)){M=true;break;}}}if(!M){D=document.createElement("a");D.className=this.triggerClassName;D.href="#"+S;D.style.display="none";document.body.appendChild(D);e._triggers.push(D);}this.triggerClicked(L,$(D));}},setDelegate:function(e){this.delegate=e;if(this.delegate&&typeof (this.delegate.didShow)==="function"&&this.currentSection&&this.currentSection.isContentLoaded()){this.delegate.didShow(this,this.previousSection,this.currentSection);}},addSection:function(e){var A=new AC.ViewMaster.Section(e,this);this.sections.set(A.id,A);this.orderedSections.push(A.id);return A;},triggerClicked:function(e,A){A.addClassName("active");if(e&&this.options.silentTriggers){Event.stop(e);}var Y=null;if(!!A.href.match(/#previous/)){Y=this.getPreviousSection();}else{if(!!A.href.match(/#next/)){Y=this.getNextSection();}else{if(!this.sectionRegExp){this.sectionRegExp=this.options.sectionRegExp||new RegExp(/#(.*)$/);}var D=A.href.match(this.sectionRegExp);if(D){var L=D[1];}else{L=A.name;}Y=this.sections.get(L);}}if(!Y){Y=this.addSection(A);}if(Y.isContentRemote()){if(Y.isContentLoaded()){Y.clearTrigger(A);}if(e){Event.stop(e);}}if(Y==this.currentSection){if(e){Event.stop(e);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}return ;}else{if(!Y){return ;}}this._didShowInitial=true;setTimeout(this.show.bind(this,Y),1);},_triggerClicked:function(e){if(this._locked){Event.stop(e);return ;}var D=e.element();if(AC.Detector.isIEStrict()&&e.type==="mouseup"){if(D&&D.nodeName.toUpperCase()==="A"){D=D.down("."+this.triggerClassName);}}else{while(D&&D.nodeName.toUpperCase()!="A"&&D.nodeName.toUpperCase()!="BODY"){D=D.parentNode;}}if(D&&D.href&&Element.Methods.hasClassName(D,this.triggerClassName)){if(this.options.parentSectionId&&(typeof (this.stopListeningForEvent)=="function")&&(typeof (this.listenForEvent)=="function")&&(typeof (AC.ViewMaster.dispatchEvent)=="function")){var A=this;Event.stop(e);this.stopListeningForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,function(Y){this.stopListeningForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",false,arguments.callee);A.triggerClicked(Y,D);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);});AC.ViewMaster.dispatchEvent("ViewMasterSelectSectionWithIdNotification",{sender:this,parentSectionId:this.options.parentSectionId,parentTriggerClassName:this.options.parentTriggerClassName,event:e});}else{this.triggerClicked(e,D);}}},isContentLoaded:function(A,e){return e.isContentLoaded();},loadContent:function(A,e){if(e){e.loadContent();}},_showContentDidLoad:false,contentDidLoad:function(D,A,e){if(A&&A.firstChild){this._showContentDidLoad=true;}this.view.setLoadedContent(D);AC.loadRemoteContent.insertScriptFragment(A);if(this._showContentDidLoad&&this.delegate&&typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.previousSection,this.currentSection);}this._showContentDidLoad=false;},show:function(A,e){if(this._locked||(!A&&!e)){return ;}if(!this.options.alwaysShowSection&&A==this.currentSection){return ;}this._locked=true;this.previousSection=this.currentSection;this.currentSection=A;this.view.setContent(A);if(typeof this.options.ensureInView==="boolean"&&this.options.ensureInView){if(this._didShowInitial){var D=A.content.viewportOffset()[1];if(D<0||D>(document.viewport.getHeight()*0.75)){new Effect.ScrollTo(A.content,{duration:0.3});}}else{$(document.body).scrollTo();}}},showFirst:function(){this.show(this.getFirstSection());},getFirstSection:function(){return this.sections.get(this.orderedSections[0]);},showNext:function(){this.show(this.getNextSection());},getNextSection:function(){var A=this.orderedSections.indexOf(this.currentSection.id);var e=(this.orderedSections.length-1)==A?0:A+1;return this.sections.get(this.orderedSections[e]);},showPrevious:function(){this.show(this.getPreviousSection());},getPreviousSection:function(){var e=this.orderedSections.indexOf(this.currentSection.id);var A=0==e?this.orderedSections.length-1:e-1;return this.sections.get(this.orderedSections[A]);},willShow:function(A,D,e){if(this.delegate&&typeof (this.delegate.willShow)=="function"){this.delegate.willShow(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}this._repaintTriggers(this.previousSection,this.currentSection);if(this._didShowInitial&&e&&e!=this.previousSection){$(e.content).setOpacity(0);$(e.content).removeClassName("hidden");}if(e){return e.willShow(this);}return null;},willClose:function(e,A){if(this.delegate&&typeof (this.delegate.willClose)=="function"){this.delegate.willClose(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterWillCloseNotification",{sender:this,outgoingView:A});}if(this.previousSection){this.previousSection.willClose(this);}},shouldAnimateContentChange:function(D,A,e){return (typeof this.options.shouldAnimateContentChange==="boolean")?this.options.shouldAnimateContentChange:true;},willAnimate:function(A,D,e,L){var S=this.options.animationDuration||0.4;var Y=Math.random()+"Queue";if(!this._didShowInitial&&typeof (L)=="function"){L();return ;}if(D){return new Effect.Parallel([new Effect.Opacity(D,{sync:true,from:1,to:0}),new Effect.Opacity(e,{sync:true,from:0,to:1})],{duration:S,afterFinish:L,queue:{scope:Y}});}else{return new Effect.Opacity(e,{from:0,to:1,duration:S,afterFinish:L,queue:{scope:Y}});}},didAppendContent:function(e,A){if(this.delegate&&typeof this.delegate.didAppendContent==="function"){this.delegate.didAppendContent(this,A);}},didShow:function(A,D,e){if(this.currentSection){this.currentSection.didShow(this);}this._didShowInitial=true;this._locked=false;if(!this._showContentDidLoad&&this.delegate&&typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.previousSection,this.currentSection);}if(typeof (AC.ViewMaster.dispatchEvent)=="function"){AC.ViewMaster.dispatchEvent("ViewMasterDidShowNotification",{sender:this,outgoingView:this.previousSection,incomingView:this.currentSection});}},_repaintTriggers:function(A,e){if(A){var S=A.triggers();for(var D=0,Y;(Y=S[D]);D++){Y.removeClassName("active");}S=A.relatedElements();for(var D=0,Y;(Y=S[D]);D++){Y.removeClassName("active");}}if(e){var L=e.triggers();for(var D=0,Y;(Y=L[D]);D++){Y.addClassName("active");}L=e.relatedElements();for(var D=0,Y;(Y=L[D]);D++){Y.addClassName("active");}}}});if(Event.Publisher){Object.extend(AC.ViewMaster,Event.Publisher);}if(Event.Listener){Object.extend(AC.ViewMaster.Viewer.prototype,Event.Listener);}AC.ViewMaster.Section=Class.create({content:null,moviePanel:null,controllerPanel:null,movie:null,_movieController:null,movieLink:null,endState:null,hasShown:false,_isContentRemote:false,isContentRemote:function(){return this._isContentRemote;},_isContentLoaded:true,isContentLoaded:function(){return this._isContentLoaded;},_onMoviePlayable:Prototype.EmptyFunction,_onMovieFinished:Prototype.EmptyFunction,id:null,triggers:function(){if(!this._triggers){this._triggers=[];var Y=new RegExp("#"+this.id+"$");if(this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp){Y=this.viewMaster.sectionRegExp||this.viewMaster.options.sectionRegExp;Y=Y.toString().replace(/^\//,"").replace(/\/$/,"");Y=new RegExp(Y.replace("(.*)",this.id));}var D=document.getElementsByClassName(this.viewMaster.triggerClassName);for(var e=0,A;(A=$(D[e]));e++){if(A.tagName.toLowerCase()!=="a"){continue;}if(A.href.match(Y)){this._triggers.push(A);}}}return this._triggers;},relatedElements:function(){if(!this._relatedElements){this._relatedElements=document.getElementsByClassName(this.id);}return this._relatedElements;},initialize:function(D,M){this.content=$(D);if(this.content.tagName.toLowerCase()==="a"){var e=this.content.href;var L=e.split("#");this._contentURL=L[0];var Y=window.location.href.split("#");var S=D.className;if(L.length===2){this.id=L[1];}if(this._contentURL.length>0&&(this._contentURL!==Y[0])&&(!this._contentURL.startsWith("#")||this._contentURL!==e)){this._isContentRemote=true;this._isContentLoaded=false;}else{var a=$(this.id)||$("MASKED-"+this.id);if(a){this.content=a;}}if(!this.id){this.id=this.content.name;}}else{this.id=D.id;}if(!this._isContentRemote||this._isContentLoaded){this.content.setAttribute("id","MASKED-"+this.id);}if(M){this.viewMaster=M;}if(!this._isContentRemote&&this._isContentLoaded&&!this.content.hasClassName("content")){var A=this.content.getElementsByClassName("content")[0];if(A){this.content=A;}}this.isMobile=AC.Detector.isMobile();},clearTrigger:function(e){if(e.href===("#"+this.id)){return ;}e.href="#"+this.id;e.removeAttribute("id");e.removeAttribute("name");},remoteContentDidLoad:function(e,A){this.clearTrigger(this.content);this.content=$(e);this.content.setAttribute("id","MASKED-"+this.id);this._isContentLoaded=true;this.viewMaster.contentDidLoad(this,A);},loadContent:function(){if(this._isContentLoaded){var A=this;A.viewMaster.contentDidLoad(A,null);}else{if(this.content.className.indexOf("imageLink")!==-1){var e=document.createElement("div");e.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(e);}else{if(this.content.className.indexOf("movieLink")!==-1){var e=document.createElement("div");e.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(e);}else{AC.loadRemoteContent(this._contentURL,true,true,this.remoteContentDidLoad.bind(this));}}}},willShow:function(){if(!this.hasShown){this.hasShown=true;var e=this.content.getElementsByClassName("imageLink");for(var A=0;A<e.length;A++){this._loadImage(e[A]);}if(!this.moviePanel){this.movieLink=this.content.getElementsByClassName("movieLink")[0];this.posterLink=this.content.getElementsByClassName("posterLink")[0];if(this.movieLink){this._loadMovie();}}}return this.content;},_loadImage:function(A){var e=document.createElement("img");e.setAttribute("src",A.href);e.setAttribute("alt",A.title);A.parentNode.replaceChild(e,A);},_loadMovie:function(){this.moviePanel=$(document.createElement("div"));this.moviePanel.addClassName("moviePanel");this.movieLink.parentNode.replaceChild(this.moviePanel,this.movieLink);this.controllerPanel=$(document.createElement("div"));this.controllerPanel.addClassName("controllerPanel");this.moviePanel.parentNode.insertBefore(this.controllerPanel,this.moviePanel.nextSibling);this.endState=$(this.content.getElementsByClassName("endState")[0]);if(this.endState){this.endState.parentNode.removeChild(this.endState);var e=$(this.endState.getElementsByClassName("replay")[0]);if(e){e.observe("click",function(A){Event.stop(A);this.replayMovie();}.bindAsEventListener(this));}}},didShow:function(A){var e=this.hasMovie()&&!this.isMobile;if(e){this._movieController=new AC.QuicktimeController();this.controllerPanel.innerHTML="";this.controllerPanel.appendChild(this._movieController.render());}this._playMovie();if(e){this._onMoviePlayable=this._movieController.monitorMovie.bind(this._movieController);this._onMovieFinished=this.didFinishMovie.bind(this);this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished});}},willClose:function(e){this._closeController();this._closeMovie();},_closeMovie:function(){if(this.movie&&this.moviePanel){this.moviePanel.removeChild(this.movie);this.movie=null;this.moviePanel.innerHTML="";}},_closeController:function(){if(this._movieController&&this._movieController.movie&&this.hasMovie()&&!this.isMobile){this._movieController.Stop();this._movieController.detachFromMovie();this.controllerPanel.addClassName("inactive");this._movieController.replay=this.replayMovie.bind(this);this.controllerPanel.observe("click",this._movieController.replay);}},hasMovie:function(){return !!this.movieLink;},didFinishMovie:function(){if(!this.hasMovie()){return ;}this._closeController();this._closeMovie();if(this.endState){this.moviePanel.appendChild(this.endState);}if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didFinishMovie",this);}},_playMovie:function(){if(this.movieLink&&this.moviePanel){this.moviePanel.innerHTML="";if(this.posterLink&&this.posterLink.href){var A=this.posterLink.href;}var L=this.movieLink.getAttribute("href",2).toQueryParams();var Y=L.width||640;var e=L.height||480;var D=L.bgcolor||"white";this.movie=AC.Quicktime.packageMovie(this.movieLink.id+"movieId",this.movieLink.getAttribute("href",2),{width:Y,height:e,controller:false,posterFrame:A,showlogo:false,autostart:true,cache:true,bgcolor:D,aggressiveCleanup:false});this.moviePanel.appendChild(this.movie);if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this);}}},replayMovie:function(){if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("replayMovie",this);}this._playMovie();this.controllerPanel.removeClassName("inactive");this.controllerPanel.stopObserving("click",this._movieController.replay);this._movieController.replay=null;this._movieController.attachToMovie(this.movie,{onMoviePlayable:this._onMoviePlayable,onMovieFinished:this._onMovieFinished});}});AC.ViewMaster.SlideshowViewer=Class.create();Object.extend(AC.ViewMaster.SlideshowViewer.prototype,AC.ViewMaster.Viewer.prototype);Object.extend(AC.ViewMaster.SlideshowViewer.prototype,{_superInitialize:AC.ViewMaster.Viewer.prototype.initialize,initialize:function(Y,e,L,D,A){this._superInitialize(Y,e,L,A);this.slideshow=new AC.ViewMaster.Slideshow(this,D,A);},start:function(){this.slideshow.start();},stop:function(){this.slideshow.stop();},reset:function(){if(this._isLocked){this._needsReset=true;}else{this.slideshow.reset();}},superDidShow:AC.ViewMaster.Viewer.prototype.didShow,didShow:function(A,D,e){this.superDidShow(A,D,e);if(this._needsReset){this._needsReset=false;this.slideshow.reset();}},next:function(){this.slideshow.next();},previous:function(){this.slideshow.previous();}});AC.ViewMaster.Slideshow=Class.create();if(Event.Listener){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Listener);}if(Event.Publisher){Object.extend(AC.ViewMaster.Slideshow.prototype,Event.Publisher);}Object.extend(AC.ViewMaster.Slideshow.prototype,{contentController:null,animationTimeout:null,options:null,_playing:false,_active:false,_progress:0,setProgress:function(e){this._progress=e;},progress:function(){return this._progress;},initialize:function(e,D,A){this.contentController=e;this.triggerClassName=D;this.options=A||{};if(!A.addNoListeners){this.listenForEvent(AC.ViewMaster,"ViewMasterWillShowNotification",true,this.willShow);this.listenForEvent(AC.ViewMaster,"ViewMasterDidShowNotification",true,this.didShow);}if(this.options.autoplay){this.start();}if(this.triggerClassName){Event.observe(document,"click",this._triggerHandler.bindAsEventListener(this));}},start:function(){if(this._active){return ;}this._active=true;if(this.options.wipeProgress=="always"||this.options.wipeProgress=="on start"){this._progress=0;}this.play(true);this._repaintTriggers();if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didStart",this);}},stop:function(){if(!this._active){return ;}this._active=false;this.pause();this._repaintTriggers();if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didEnd",this);}},play:function(e){if(!this._active){return ;}if(this.options.wipeProgress=="always"||(this.options.wipeProgress=="on play"&&!e)){this._progress=0;}this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay());this._playing=true;},_update:function(){if(typeof (this.options.onProgress)=="function"){this.options.onProgress(this._progress,this.delay());}if(this._progress>=this.delay()){this._progress=0;this.next();}else{this._progress+=this._heartbeatDelay();this.animationTimeout=setTimeout(this._update.bind(this),this._heartbeatDelay());}},delay:function(){return this.options.delay||5000;},_heartbeatDelay:function(){return this.options.heartbeatDelay||100;},pause:function(){clearTimeout(this.animationTimeout);this._playing=false;},next:function(){if(this.options.willEnd&&(this.contentController.getNextSection()==this.contentController.getFirstSection())){if(typeof (document.event.dispatchEvent)=="function"){document.event.dispatchEvent("didEnd",this);}return ;}this.contentController.showNext();},previous:function(){this.contentController.showPrevious();},reset:function(){this.contentController.showFirst();this.setProgress(0);},willShow:function(e){if(e.event_data.data.sender!=this.contentController){return ;}this.pause();},didShow:function(e){if(e.event_data.data.sender!=this.contentController){return ;}this.play();},_triggerHandler:function(e){var A=e.element();var D=null;if(A.hasClassName(this.triggerClassName)&&A.href.match(/#slideshow-toggle/)){Event.stop(e);if(this._active){this.stop();}else{this.start();}}},_repaintTriggers:function(){if(!this.triggerClassName){return ;}var A=document.getElementsByClassName(this.triggerClassName);for(var e=A.length-1;e>=0;e--){this._repaintTrigger(A[e]);}},_repaintTrigger:function(e){var A=$(e);if(this._active){A.addClassName("playing");}else{A.removeClassName("playing");}}});AC.loadRemoteContent=function(a,e,D,M,Y,S){if(typeof a!=="string"){return ;}if(typeof e!=="boolean"){e=true;}if(typeof D!=="boolean"){D=true;}var L=arguments.callee;var A=L._loadArgumentsByUrl[a];if(!A){L._loadArgumentsByUrl[a]={contentURL:a,importScripts:e,importCSS:D,callback:M,context:Y,delegate:S};new Ajax.Request(a,{method:"get",requestHeaders:{Accept:"text/xml"},onSuccess:arguments.callee.loadTemplateHTMLFromRequest,onFailure:arguments.callee.failedToadTemplateHTMLFromRequest,onException:function(R,X){throw (X);},onCreate:function(R){R.request.overrideMimeType("text/xml");}});}};AC.loadRemoteContent._loadArgumentsByUrl={};AC.loadRemoteContent.loadTemplateHTMLFromRequest=function(A){var Y=A.request.url;var q=arguments.callee;var a=AC.loadRemoteContent._loadArgumentsByUrl[Y];var G=window.document;var X=A.responseXMLValue().documentElement;if(AC.Detector.isIEStrict()){X=X.ownerDocument;}var G=window.document;var v=document.createDocumentFragment();if(a.importScripts){AC.loadRemoteContent.importScriptsFromXMLDocument(X,v,a);}if(a.importCSS){AC.loadRemoteContent.importCssFromXMLDocumentAtLocation(X,Y,a);}var k=null;var e=null;var M=X.getElementsByTagName("body")[0];if(!M){return ;}M.normalize();var e=Element.Methods.childNodeWithNodeTypeAtIndex(M,Node.ELEMENT_NODE,0);var S=AC.Detector.isSafari2();if(e){if(S){k=G._importNode(e,true);}else{k=G.importNode(e,true);}if(k.cleanSpaces){k.cleanSpaces(true);}}else{if(M.cleanSpaces){M.cleanSpaces(true);}else{if(typeof M.normalize==="function"){M.normalize();}}var R=M.childNodes;k=G.createDocumentFragment();var d=/\S/;for(var L=0,D=0;(D=R[L]);L++){var u=(S)?G._importNode(D,true):G.importNode(D,true);k.appendChild(u);}}var U=a.callback;U(k,v,a.context);};AC.loadRemoteContent.javascriptTypeValueRegExp=new RegExp("text/javascript","i");AC.loadRemoteContent.javascriptLanguageValueRegExp=new RegExp("javascript","i");AC.loadRemoteContent.documentScriptsBySrc=function(){if(!AC.loadRemoteContent._documentScriptsBySrc){AC.loadRemoteContent._documentScriptsBySrc={};var A=document.getElementsByTagName("script");if(!A||A.length===0){return AC.loadRemoteContent._documentScriptsBySrc;}for(var D=0,e=null;(e=A[D]);D++){var Y=e.getAttribute("type");var S=null;var M=e.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(Y)&&!this.javascriptLanguageValueRegExp.test(M)){continue;}if(e.hasAttribute){var L=e.hasAttribute("src");}else{var L=Element.Methods.hasAttribute(e,"src");}if(L){var S=e.getAttribute("src");AC.loadRemoteContent._documentScriptsBySrc[S]=S;}}}return AC.loadRemoteContent._documentScriptsBySrc;};AC.loadRemoteContent.importScriptsFromXMLDocument=function(u,D,I){var S=u.getElementsByTagName("script"),M,R,G,j,Y=I.contentURL,T=I.delegate,L=I.context,A=(T&&typeof T.shouldImportScript==="function"),X=true;if(!D){D=document.createDocumentFragment();}var q=AC.loadRemoteContent.documentScriptsBySrc();for(var x=0,d=null;(d=S[x]);x++){M=d.getAttribute("type");R=null;X=true;G=d.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(M)&&!this.javascriptLanguageValueRegExp.test(G)){continue;}if(d.hasAttribute){j=d.hasAttribute("src");R=d.getAttribute("src");}else{R=d.getAttribute("src");j=((R!=null)&&(R!==""));}if(d.getAttribute("id")==="Redirect"||(A&&!T.shouldImportScriptForContentURL(d,Y,L))){continue;}if(j){if(!q.hasOwnProperty(R)){var U=document.createElement("script");U.setAttribute("type","text/javascript");U.src=R;AC.loadRemoteContent._documentScriptsBySrc[R]=R;D.appendChild(U);}}else{var U=document.createElement("script");U.setAttribute("type","text/javascript");if(AC.Detector.isIEStrict()){var v=new Function(d.text);U.onreadystatechange=function(){var w=window.event.srcElement;if(!w.isLoaded&&((w.readyState=="complete")||(w.readyState=="loaded"))){w.onreadystatechange=null;w.isLoaded=true;v();}};}else{var k=navigator.userAgent.toLowerCase();var e=(k.indexOf("applewebkit")!=-1);var a=parseInt(parseFloat(k.substring(k.lastIndexOf("safari/")+7)));var g=(e&&a>=419);if(g){U.innerHTML=d.innerHTML;}else{U.text=d.text;}}AC.loadRemoteContent._documentScriptsBySrc[R]=R;D.appendChild(U);}}return D;};AC.loadRemoteContent.insertScriptFragment=function(A){if(!A){return ;}var e=document.getElementsByTagName("head")[0];e.appendChild(A);e=null;};AC.loadRemoteContent.documentLinksByHref=function(){if(!AC.loadRemoteContent._documentLinksByHref){AC.loadRemoteContent._documentLinksByHref={};var A=document.getElementsByTagName("link");if(!A||A.length===0){return AC.loadRemoteContent._documentLinksByHref;}for(var D=0,L=null;(L=A[D]);D++){var Y=L.getAttribute("type");if(L.type.toLowerCase()!=="text/css"){continue;}var S=null;if(L.hasAttribute){var e=L.hasAttribute("href");}else{var e=Element.hasAttribute(L,"href");}if(e){var S=L.getAttribute("href");AC.loadRemoteContent._documentLinksByHref[S]=S;}}}return AC.loadRemoteContent._documentLinksByHref;};AC.loadRemoteContent.__importCssElementInHeadFromLocation=function(L,M,A){var Y=(L.tagName.toUpperCase()==="LINK");if(Y){var S=L.getAttribute("type");if(!S||S&&S.toLowerCase()!=="text/css"){return ;}var D=L.getAttribute("href");if(!D.startsWith("http")&&!D.startsWith("/")){var R=D;if(A.pathExtension().length>0){A=A.stringByDeletingLastPathComponent();}D=A.stringByAppendingPathComponent(R);}if(AC.Detector.isIEStrict()){var e=window.document.createStyleSheet(D,1);}else{var a=window.document.importNode(L,true);a.href=D;}AC.loadRemoteContent.documentLinksByHref()[D]=D;}if(!AC.Detector.isIEStrict()||(AC.Detector.isIEStrict()&&!Y)){M.insertBefore(a,M.firstChild);}};AC.loadRemoteContent.importCssFromXMLDocumentAtLocation=function(a,A,M){var R=window.document.getElementsByTagName("head")[0];var D=[];D.addObjectsFromArray(a.getElementsByTagName("style"));D.addObjectsFromArray(a.getElementsByTagName("link"));if(D){var Y=AC.loadRemoteContent.documentLinksByHref();for(var L=0,S=null;(S=D[L]);L++){var e=S.getAttribute("href");if(Y.hasOwnProperty(e)){continue;}this.__importCssElementInHeadFromLocation(S,R,A);}}};Ajax.Request.prototype._overrideMimeType=null;Ajax.Request.prototype.overrideMimeType=function(e){this._overrideMimeType=e;if(this.transport.overrideMimeType){this.transport.overrideMimeType(e);}};Ajax.Request.prototype._doesOverrideXMLMimeType=function(){return (this._overrideMimeType==="text/xml");};Ajax.Response.prototype.responseXMLValue=function(){if(AC.Detector.isIEStrict()){var e=this.transport.responseXML.documentElement;if(!e&&this.request._doesOverrideXMLMimeType()){this.transport.responseXML.loadXML(this.transport.responseText);}}return this.transport.responseXML;};