AC.ViewMaster.AudioSection=Class.create();Object.extend(AC.ViewMaster.AudioSection.prototype,AC.ViewMaster.Section.prototype);if(Event.Listener){Object.extend(AC.ViewMaster.AudioSection.prototype,Event.Listener)}Object.extend(AC.ViewMaster.AudioSection.prototype,{mediaType:function(){var a=this.movieLink.getAttribute("href",2).split("."),b;if(a.length===2){b=a[1]}else{b="quicktime"}return this.movieLink?"audio/"+b:"text/html"},_superInitialize:AC.ViewMaster.Section.prototype.initialize,initialize:function(a,b){this._superInitialize(a,b);if(Event.Listener){this.listenForEvent(window.AC.ViewMaster,"ViewMasterDidShowNotification",false,this.viewMasterDidShowNotificationCallback.bind(this))}},viewMasterDidShowNotificationCallback:function(b){var c=b.event_data.data,a=c.incomingView;if(a===this&&(a===this.viewMaster.currentSection)){if(this._movieController&&!this._movieController.isPlaying()){this._movieController.Play()}}},newMovieController:function(){return new AC.QuickTime.CircularController(null,{state:AC.QuickTime.States.Polling})},defaultMovieWidth:function(){return 1},defaultMovieHeight:function(){return 1},_super_playMovie:AC.ViewMaster.Section.prototype._playMovie,_playMovie:function(){if(AC.Detector.isIEStrict()){if(this.movieLink&&this.moviePanel){this.moviePanel.innerHTML="";if(this.posterLink&&this.posterLink.href){var a=this.posterLink.href}this.moviePanel.appendChild(this._audioElement);this.movie=AC.HTMLPlusTimeSlideshow.create(this._audioElement,null,{autoplay:true,controller:this._movieController,listenForViewMasterWillShowNotification:false})}}else{this._super_playMovie()}},firstControllerTrigger:function(){var a=this.triggers(),b,c;if(!a){return null}for(b=0;(c=a[b]);b++){if(c.hasClassName("controller")){return c}}return null},_super_loadMovie:AC.ViewMaster.Section.prototype._loadMovie,_loadMovie:function(){this._super_loadMovie();if(AC.Detector.isIEStrict()){this._audioElement=document.createElement("t:AUDIO");this._audioElement.setAttribute("begin","indefinite");var a=this.movieLink.getAttribute("href",2).split(".");if(a.length===2){a=a[0]+".mp3"}this._audioElement.setAttribute("src",a)}if(this.controllerPanel.parentNode!==document.body){document.body.appendChild(this.controllerPanel)}},_superWillClose:AC.ViewMaster.Section.prototype.willClose,willClose:function(){if(this.currentTriggerControllerElement){this.currentTriggerControllerElement.style.visibility="visible";this.controllerPanel.style.visibility="hidden"}return this._superWillClose()},_superDidShow:AC.ViewMaster.Section.prototype.didShow,didShow:function(){if(!this.isMobile){var b=this.viewMaster.currentTrigger(),c=b.parentNode,a;this.currentTriggerControllerElement=this.firstControllerTrigger();a=Element.cumulativeOffset(this.currentTriggerControllerElement);this.controllerPanel.style.left=a.left+"px";this.controllerPanel.style.top=a.top+"px";this.controllerPanel.style.position="absolute";this.controllerPanel.style.visibility="visible";this.currentTriggerControllerElement.style.visibility="hidden"}return this._superDidShow()},_closeMovie:function(){if(!AC.Detector.isIEStrict()&&this.movie&&this.moviePanel){this.moviePanel.removeChild(this.movie);this.movie=null;this.moviePanel.innerHTML=""}}});AC.ViewMaster.AudioGallery=Class.create();Object.extend(AC.ViewMaster.AudioGallery.prototype,AC.ViewMaster.Viewer.prototype);Object.extend(AC.ViewMaster.AudioGallery.prototype,{_superInitialize:AC.ViewMaster.Viewer.prototype.initialize,initialize:function(d,a,e,c,b){if(!a){a=document.createElement("div");document.body.appendChild(a)}a.style.left="0px";a.style.top="0px";a.style.width="1px";a.style.height="1px";a.style.position="fixed";this._superInitialize(d,a,e,b);this.slideshow=new AC.ViewMaster.Slideshow(this,c,b)},createSectionForContent:function(a){return new AC.ViewMaster.AudioSection(a,this)},_superTriggerClicked:AC.ViewMaster.Viewer.prototype.triggerClicked,triggerClicked:function(a,b){if(!AC.Detector.isMobile()){this._superTriggerClicked(a,b)}}});