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(f){if(typeof f==="string"){this._viewId=f;}else{this._view=$(f);}if(this._view){var q=this._view.childNodes,A;while(A=q[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(f){this.delegate=f;},setContent:function(f){if(f==this.currentContent){return ;}if(this.currentContent&&typeof (this.delegate.willClose)=="function"){this.delegate.willClose(this,this.currentContent);}if(f&&typeof (this.delegate.isContentLoaded)=="function"){if(!this.delegate.isContentLoaded(this,f)){if(typeof (this.delegate.loadContent)=="function"){this.delegate.loadContent(this,f);return ;}}}this.setLoadedContent(f);},setLoadedContent:function(A){if(typeof (this.delegate.willShow)=="function"){A=this.delegate.willShow(this,this.currentContent,A);}var f=true;if(typeof (this.delegate.shouldAnimateContentChange)=="function"){f=this.delegate.shouldAnimateContentChange(this,this.currentContent,A);}if(f&&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 q=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(f){if(this.currentContent&&(this.currentContent!==f)&&this.currentContent.parentNode){this.currentContent.parentNode.removeChild(this.currentContent);}if(typeof (this.delegate.didShow)=="function"){this.delegate.didShow(this,this.currentContent,f);}this.currentContent=f;}});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(f){return this.sectionWithId(f);},sectionWithId:function(y){if(!y){return null;}var q=null;if(y&&this.sections.get(y)){q=this.sections.get(y);}if(!q){var A,f=null;A=document.getElementById(y);if(A===this.view._view){A=null;}if(!A){f=document.getElementsByName(y);}if(f&&f.length>0){A=f[0];}if(A===this.view._view){A=null;}if(A){if(A.tagName.toLowerCase()==="a"){if(Element.Methods.hasClassName(A,this.triggerClassName)){q=this.addSection(A);}}else{q=this.addSection(A);}}}return q;},indexOfSection:function(f){return this.orderedSections.indexOf(f.id);},initialize:function(y,p,M,k){if(M){this.triggerClassName=M;}this.sections=$H();this.orderedSections=[];this.options=k||{};this.triggerEvent=this.options.triggerEvent||"click";var q=null;if(y){for(var s=0;s<y.length;s++){section=this.addSection(y.item(s));if(!q){q=section;}}}this.view=new AC.SwapView(p);this.view.setDelegate(this);var f=document.location.hash.replace(/#/,""),d;if(f!==this.view._viewId){var a=document.getElementsByClassName(this.triggerClassName);for(var s=0,A;(A=a[s]);s++){if(A.getAttribute("href").match(new RegExp("#"+f+"(?![_w-])"))){d=this.sectionWithId(f);break;}}}if(d){q=d;}if(!q&&typeof this.options.initialId==="string"&&this.options.initialId.length>0){q=this.sectionWithId(this.options.initialId);}this.show(q);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(o){var C=o.event_data.data;if(this===C.sender){return ;}if(C.outgoingView&&C.outgoingView.id===this.options.parentSectionId){this.willClose(this.view,this.currentSection);}});}}},selectSectionFromEvent:function(f){if(f.event_data.data.sender===this){return ;}if(f.event_data.data.parentTriggerClassName!==this.triggerClassName){return ;}this.selectSectionWithIdEvent(f.event_data.data.parentSectionId,f.event_data.data.event);},selectSectionWithIdEvent:function(M,d){var f=this.sectionWithId(M),y=null,A,q,s=false;if(f){y=f.triggers();if(y&&y.length>0){for(A=0;(q=y[A]);A++){if(Element.Methods.hasClassName(q,this.triggerClassName)){s=true;break;}}}if(!s){q=document.createElement("a");q.className=this.triggerClassName;q.href="#"+M;q.style.display="none";document.body.appendChild(q);f._triggers.push(q);}this.triggerClicked(d,$(q));}},setDelegate:function(f){this.delegate=f;if(this.delegate&&typeof (this.delegate.didShow)==="function"&&this.currentSection&&this.currentSection.isContentLoaded()){this.delegate.didShow(this,this.previousSection,this.currentSection);}},addSection:function(f){var A=new AC.ViewMaster.Section(f,this);this.sections.set(A.id,A);this.orderedSections.push(A.id);return A;},triggerClicked:function(f,A){A.addClassName("active");if(f&&this.options.silentTriggers){Event.stop(f);}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 q=A.href.match(this.sectionRegExp);if(q){var d=q[1];}else{d=A.name;}y=this.sections.get(d);}}if(!y){y=this.addSection(A);}if(y.isContentRemote()){if(y.isContentLoaded()){y.clearTrigger(A);}if(f){Event.stop(f);}}if(y==this.currentSection){if(f){Event.stop(f);}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(f){if(this.options.passive){return ;}if(this._locked){Event.stop(f);return ;}var q=f.element();if(AC.Detector.isIEStrict()&&f.type==="mouseup"){if(q&&q.nodeName.toUpperCase()==="A"){q=q.down("."+this.triggerClassName);}}else{while(q&&q.nodeName.toUpperCase()!="A"&&q.nodeName.toUpperCase()!="BODY"){q=q.parentNode;}}if(q&&q.href&&Element.Methods.hasClassName(q,this.triggerClassName)){if(this.options.parentSectionId&&(typeof (this.stopListeningForEvent)=="function")&&(typeof (this.listenForEvent)=="function")&&(typeof (AC.ViewMaster.dispatchEvent)=="function")){var A=this;Event.stop(f);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,q);this.listenForEvent(AC.ViewMaster,"ViewMasterSelectSectionWithIdNotification",true,this.selectSectionFromEventHandler);});AC.ViewMaster.dispatchEvent("ViewMasterSelectSectionWithIdNotification",{sender:this,parentSectionId:this.options.parentSectionId,parentTriggerClassName:this.options.parentTriggerClassName,event:f});}else{this.triggerClicked(f,q);}}},isContentLoaded:function(A,f){return f.isContentLoaded();},loadContent:function(A,f){if(f){f.loadContent();}},_showContentDidLoad:false,contentDidLoad:function(q,A,f){if(A&&A.firstChild){this._showContentDidLoad=true;}this.view.setLoadedContent(q);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,f){if(this._locked||(!A&&!f)){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 q=A.content.viewportOffset()[1];if(q<0||q>(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 f=(this.orderedSections.length-1)==A?0:A+1;return this.sections.get(this.orderedSections[f]);},showPrevious:function(){this.show(this.getPreviousSection());},getPreviousSection:function(){var f=this.orderedSections.indexOf(this.currentSection.id);var A=0==f?this.orderedSections.length-1:f-1;return this.sections.get(this.orderedSections[A]);},willShow:function(A,q,f){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&&f&&f!=this.previousSection){$(f.content).setOpacity(0);$(f.content).removeClassName("hidden");}if(f){return f.willShow(this);}return null;},willClose:function(f,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(q,A,f){return (typeof this.options.shouldAnimateContentChange==="boolean")?this.options.shouldAnimateContentChange:true;},willAnimate:function(A,q,f,d){var M=this.options.animationDuration||0.4;var y=Math.random()+"Queue";if(!this._didShowInitial&&typeof (d)=="function"){d();return ;}if(this.delegate&&typeof this.delegate.willAnimate=="function"){return this.delegate.willAnimate(this,q,f,d,y);}if(q){return new Effect.Parallel([new Effect.Opacity(q,{sync:true,from:1,to:0}),new Effect.Opacity(f,{sync:true,from:0,to:1})],{duration:M,afterFinish:d,queue:{scope:y}});}else{return new Effect.Opacity(f,{from:0,to:1,duration:M,afterFinish:d,queue:{scope:y}});}},didAppendContent:function(f,A){if(this.delegate&&typeof this.delegate.didAppendContent==="function"){this.delegate.didAppendContent(this,A);}},didShow:function(A,q,f){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,f){if(A){var M=A.triggers();for(var q=0,y;(y=M[q]);q++){y.removeClassName("active");}M=A.relatedElements();for(var q=0,y;(y=M[q]);q++){y.removeClassName("active");}}if(f){var d=f.triggers();for(var q=0,y;(y=d[q]);q++){y.addClassName("active");}d=f.relatedElements();for(var q=0,y;(y=d[q]);q++){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 q=document.getElementsByClassName(this.viewMaster.triggerClassName);for(var f=0,A;(A=$(q[f]));f++){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(q,s){this.content=$(q);if(this.content.tagName.toLowerCase()==="a"){var f=this.content.href;var d=f.split("#");this._contentURL=d[0];var y=window.location.href.split("#");var M=q.className;if(d.length===2){this.id=d[1];}if(this._contentURL.length>0&&(this._contentURL!==y[0])&&(!this._contentURL.startsWith("#")||this._contentURL!==f)){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=q.id;}if(!this._isContentRemote||this._isContentLoaded){this.content.setAttribute("id","MASKED-"+this.id);}if(s){this.viewMaster=s;}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(f){if(f.href===("#"+this.id)){return ;}f.href="#"+this.id;f.removeAttribute("id");f.removeAttribute("name");},remoteContentDidLoad:function(f,A){this.clearTrigger(this.content);this.content=$(f);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 f=document.createElement("div");f.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(f);}else{if(this.content.className.indexOf("movieLink")!==-1){var f=document.createElement("div");f.appendChild(this.content.cloneNode(true));this.remoteContentDidLoad(f);}else{AC.loadRemoteContent(this._contentURL,true,true,this.remoteContentDidLoad.bind(this));}}}},willShow:function(){if(!this.hasShown){this.hasShown=true;var f=this.content.getElementsByClassName("imageLink");for(var A=0;A<f.length;A++){this._loadImage(f[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 f=document.createElement("img");f.setAttribute("src",A.href);f.setAttribute("alt",A.title);A.parentNode.replaceChild(f,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 f=$(this.endState.getElementsByClassName("replay")[0]);if(f){f.observe("click",function(A){Event.stop(A);this.replayMovie();}.bindAsEventListener(this));}}},didShow:function(A){var f=this.hasMovie()&&!this.isMobile;if(f){this._movieController=new AC.QuicktimeController();this.controllerPanel.innerHTML="";this.controllerPanel.appendChild(this._movieController.render());}this._playMovie();if(f){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(f){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 d=this.movieLink.getAttribute("href",2).toQueryParams();var y=d.width||640;var f=d.height||480;var q=d.bgcolor||"white";this.movie=AC.Quicktime.packageMovie(this.movieLink.id+"movieId",this.movieLink.getAttribute("href",2),{width:y,height:f,controller:false,posterFrame:A,showlogo:false,autostart:true,cache:true,bgcolor:q,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,f,d,q,A){this._superInitialize(y,f,d,A);this.slideshow=new AC.ViewMaster.Slideshow(this,q,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,q,f){this.superDidShow(A,q,f);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(f){this._progress=f;},progress:function(){return this._progress;},initialize:function(f,q,A){this.contentController=f;this.triggerClassName=q;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(f){if(!this._active){return ;}if(this.options.wipeProgress=="always"||(this.options.wipeProgress=="on play"&&!f)){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(f){if(f.event_data.data.sender!=this.contentController){return ;}this.pause();},didShow:function(f){if(f.event_data.data.sender!=this.contentController){return ;}this.play();},_triggerHandler:function(f){var A=f.element();var q=null;if(A.hasClassName(this.triggerClassName)&&A.href.match(/#slideshow-toggle/)){Event.stop(f);if(this._active){this.stop();}else{this.start();}}},_repaintTriggers:function(){if(!this.triggerClassName){return ;}var A=document.getElementsByClassName(this.triggerClassName);for(var f=A.length-1;f>=0;f--){this._repaintTrigger(A[f]);}},_repaintTrigger:function(f){var A=$(f);if(this._active){A.addClassName("playing");}else{A.removeClassName("playing");}}});AC.loadRemoteContent=function(a,f,q,s,y,M){if(typeof a!=="string"){return ;}if(typeof f!=="boolean"){f=true;}if(typeof q!=="boolean"){q=true;}var d=arguments.callee;var A=d._loadArgumentsByUrl[a];if(!A){d._loadArgumentsByUrl[a]={contentURL:a,importScripts:f,importCSS:q,callback:s,context:y,delegate:M};new Ajax.Request(a,{method:"get",requestHeaders:{Accept:"text/xml"},onSuccess:arguments.callee.loadTemplateHTMLFromRequest,onFailure:arguments.callee.failedToadTemplateHTMLFromRequest,onException:function(p,k){throw (k);},onCreate:function(p){p.request.overrideMimeType("text/xml");}});}};AC.loadRemoteContent._loadArgumentsByUrl={};AC.loadRemoteContent.loadTemplateHTMLFromRequest=function(A){var y=A.request.url;var C=arguments.callee;var a=AC.loadRemoteContent._loadArgumentsByUrl[y];var t=window.document;var k=A.responseXMLValue().documentElement;if(AC.Detector.isIEStrict()){k=k.ownerDocument;}var t=window.document;var o=document.createDocumentFragment();if(a.importScripts){AC.loadRemoteContent.importScriptsFromXMLDocument(k,o,a);}if(a.importCSS){AC.loadRemoteContent.importCssFromXMLDocumentAtLocation(k,y,a);}var j=null;var f=null;var s=k.getElementsByTagName("body")[0];if(!s){return ;}s.normalize();var f=Element.Methods.childNodeWithNodeTypeAtIndex(s,Node.ELEMENT_NODE,0);var M=AC.Detector.isSafari2();if(f){if(M){j=t._importNode(f,true);}else{j=t.importNode(f,true);}if(j.cleanSpaces){j.cleanSpaces(true);}}else{if(s.cleanSpaces){s.cleanSpaces(true);}else{if(typeof s.normalize==="function"){s.normalize();}}var p=s.childNodes;j=t.createDocumentFragment();var L=/\S/;for(var d=0,q=0;(q=p[d]);d++){var I=(M)?t._importNode(q,true):t.importNode(q,true);j.appendChild(I);}}var Q=a.callback;Q(j,o,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 q=0,f=null;(f=A[q]);q++){var y=f.getAttribute("type");var M=null;var s=f.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(y)&&!this.javascriptLanguageValueRegExp.test(s)){continue;}if(f.hasAttribute){var d=f.hasAttribute("src");}else{var d=Element.Methods.hasAttribute(f,"src");}if(d){var M=f.getAttribute("src");AC.loadRemoteContent._documentScriptsBySrc[M]=M;}}}return AC.loadRemoteContent._documentScriptsBySrc;};AC.loadRemoteContent.importScriptsFromXMLDocument=function(I,q,x){var M=I.getElementsByTagName("script"),s,p,t,w,y=x.contentURL,B=x.delegate,d=x.context,A=(B&&typeof B.shouldImportScript==="function"),k=true;if(!q){q=document.createDocumentFragment();}var C=AC.loadRemoteContent.documentScriptsBySrc();for(var S=0,L=null;(L=M[S]);S++){s=L.getAttribute("type");p=null;k=true;t=L.getAttribute("language");if(!this.javascriptTypeValueRegExp.test(s)&&!this.javascriptLanguageValueRegExp.test(t)){continue;}if(L.hasAttribute){w=L.hasAttribute("src");p=L.getAttribute("src");}else{p=L.getAttribute("src");w=((p!=null)&&(p!==""));}if(L.getAttribute("id")==="Redirect"||(A&&!B.shouldImportScriptForContentURL(L,y,d))){continue;}if(w){if(!C.hasOwnProperty(p)){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.src=p;AC.loadRemoteContent._documentScriptsBySrc[p]=p;q.appendChild(Q);}}else{var Q=document.createElement("script");Q.setAttribute("type","text/javascript");if(AC.Detector.isIEStrict()){var o=new Function(L.text);Q.onreadystatechange=function(){var e=window.event.srcElement;if(!e.isLoaded&&((e.readyState=="complete")||(e.readyState=="loaded"))){e.onreadystatechange=null;e.isLoaded=true;o();}};}else{var j=navigator.userAgent.toLowerCase();var f=(j.indexOf("applewebkit")!=-1);var a=parseInt(parseFloat(j.substring(j.lastIndexOf("safari/")+7)));var Y=(f&&a>=419);if(Y){Q.innerHTML=L.innerHTML;}else{Q.text=L.text;}}AC.loadRemoteContent._documentScriptsBySrc[p]=p;q.appendChild(Q);}}return q;};AC.loadRemoteContent.insertScriptFragment=function(A){if(!A){return ;}var f=document.getElementsByTagName("head")[0];f.appendChild(A);f=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 q=0,d=null;(d=A[q]);q++){var y=d.getAttribute("type");if(d.type.toLowerCase()!=="text/css"){continue;}var M=null;if(d.hasAttribute){var f=d.hasAttribute("href");}else{var f=Element.hasAttribute(d,"href");}if(f){var M=d.getAttribute("href");AC.loadRemoteContent._documentLinksByHref[M]=M;}}}return AC.loadRemoteContent._documentLinksByHref;};AC.loadRemoteContent.__importCssElementInHeadFromLocation=function(d,s,A){var y=(d.tagName.toUpperCase()==="LINK");if(y){var M=d.getAttribute("type");if(!M||M&&M.toLowerCase()!=="text/css"){return ;}var q=d.getAttribute("href");if(!q.startsWith("http")&&!q.startsWith("/")){var p=q;if(A.pathExtension().length>0){A=A.stringByDeletingLastPathComponent();}q=A.stringByAppendingPathComponent(p);}if(AC.Detector.isIEStrict()){var f=window.document.createStyleSheet(q,1);}else{var a=window.document.importNode(d,true);a.href=q;}AC.loadRemoteContent.documentLinksByHref()[q]=q;}if(!AC.Detector.isIEStrict()||(AC.Detector.isIEStrict()&&!y)){s.insertBefore(a,s.firstChild);}};AC.loadRemoteContent.importCssFromXMLDocumentAtLocation=function(a,A,s){var p=window.document.getElementsByTagName("head")[0];var q=[];q.addObjectsFromArray(a.getElementsByTagName("style"));q.addObjectsFromArray(a.getElementsByTagName("link"));if(q){var y=AC.loadRemoteContent.documentLinksByHref();for(var d=0,M=null;(M=q[d]);d++){var f=M.getAttribute("href");if(y.hasOwnProperty(f)){continue;}this.__importCssElementInHeadFromLocation(M,p,A);}}};Ajax.Request.prototype._overrideMimeType=null;Ajax.Request.prototype.overrideMimeType=function(f){this._overrideMimeType=f;if(this.transport.overrideMimeType){this.transport.overrideMimeType(f);}};Ajax.Request.prototype._doesOverrideXMLMimeType=function(){return (this._overrideMimeType==="text/xml");};Ajax.Response.prototype.responseXMLValue=function(){if(AC.Detector.isIEStrict()){var f=this.transport.responseXML.documentElement;if(!f&&this.request._doesOverrideXMLMimeType()){this.transport.responseXML.loadXML(this.transport.responseText);}}return this.transport.responseXML;};