var com;if(!com){com={}}if(!com.fivevoltlogic){com.fivevoltlogic={}}com.fivevoltlogic.slideoscope={_v:"0.3.4",MAX_THUMB_SIZE:30,locales:{},DOM:"dom",XML:"xml",JSON:"json",OBJ:"obj",RSS:"rss",NONE:"no-transition",FADE:"fade",BLACK:0,GREY:1,GRAY:1,WHITE:2,NAV_NONE:0,NAV_INDICES:1,NAV_THUMBS:2,PLAYING:1,PAUSED:2,LOOPED:3,STOPPED:4,NEXT:5,PREVIOUS:6,ERROR:7,LOADING:8,_feedbackDuration:500,_themes:["black","grey","white"],_onClick:function(F){var H=false;var G=this.getCurrentAlbum();var E=G?G.getCurrentSlide():null;if(this._obs&&this._obs.onClick&&E){H=this._obs.onClick(E)}if(!H){YAHOO.util.Event.preventDefault(F)}},_appear:function(G,H){if(this.getTransitionStyle()==this.FADE&&H){var F=YAHOO.util.Dom;var I=F.get(G);var J=0;if(I.style.display=="none"){F.setStyle(I,"opacity",0);F.setStyle(I,"display","")}else{J=0}new YAHOO.util.Anim(G,{opacity:{from:J,to:1}},H,YAHOO.util.Easing.easeOut).animate()}else{YAHOO.util.Dom.setStyle(G,"display","")}},_fade:function(E,F){if(this.getTransitionStyle()==this.FADE){var D=new YAHOO.util.Anim(E,{opacity:{to:0}},F,YAHOO.util.Easing.easeOut);D.onComplete.subscribe(function(){YAHOO.util.Dom.setStyle(this.getEl(),"display","none")});D.animate()}else{YAHOO.util.Dom.setStyle(E,"display","none")}},_lang:null,_path:null,_canvasWidth:0,_canvasHeight:0,_err:false,_base:null,_currentAlbum:null,_obs:null,_source:null,_url:null,_panels:null,_activePanel:-1,_showFeedback:false,_albums:null,_slideDuration:5000,_transitionDuration:300,_transitionStyle:"no-transition",_target:"slideoscope",_usePermalinks:false,_showHUDLinks:false,_hudOn:false,_sourceType:null,_nav:false,_isRandom:false,_playhead:2,_preload:false,_interval:null,_loadingTimeout:null,_prefix:"sos-",_navType:0,_autoPlay:false,_doesLoop:false,_loopCount:0,_atEnd:false,_pollInterval:500,_currentTheme:0,_keyboard:false,_loadCount:0,_isProcessed:false,_documentTitle:null,_debug:["_path","_sourceType","_canvasWidth","_canvasHeight","_err","_currentAlbum","_base","_playhead","_atEnd","_showFeedback","_slideDuration","_transitionDuration","_transitionStyle","_target","_isRandom","_navType","_url","_autoPlay","_doesLoop","_usePermalinks","_showHUDLinks","_loopCount","_atEnd","_loadCount","_lang","_isProcessed","_activePanel","_preload","_loadingTimeout"],destroy:function(){for(var B=0;B<this._albums.length;B++){this._albums[B].destroy()}clearTimeout(this._interval);this._currentAlbum=this._obs=this._albums=null},removeTheme:function(E){var D=YAHOO.util.Dom;var F=this.getTarget();D.removeClass(F,this._themes[E])},getSource:function(){return this._source},applyTheme:function(H,F){var J=YAHOO.util.Dom;var G=this.getTarget();if(F){for(var I=0;I<this._themes.length;I++){if(this._themes[H]!=this._themes[I]){J.removeClass(G,this._themes[I])}}}J.addClass(G,this._themes[H])},_localize:function(B){return this.locales[this._lang][B.toUpperCase()]},useKeyboard:function(C){var D=this._keyboard;this._keyboard=C?true:false;if(this._keyboard!=D){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.usesKeyboard)}}if(C){YAHOO.util.Event.addListener(document,"keydown",function(A,B){B._keyboardHandler(A)},this)}else{YAHOO.util.Event.removeListener(document,"keydown")}},_mouseHandler:function(I){var H=this.getTarget();var J=YAHOO.util.Event.getTarget(I);while(J&&J.id!=H){J=J.parentNode}var K=YAHOO.util.Dom.getXY(J);var G=YAHOO.util.Event.getXY(I);var L=!(G[0]<K[0]||G[0]>K[0]+this.getWidth()||G[1]<K[1]||G[1]>K[1]+this.getHeight());if(L!=this._hudOn){YAHOO.util.Dom.get("sos-hud").style.display=L&&this.showsHUDLinks()?"":"none";this._hudOn=L;if(this._obs){if(!L&&this._obs.onMouseOut){this._obs.onMouseOut()}else{if(L&&this._obs.onMouseOver){this._obs.onMouseOver()}}}}YAHOO.util.Event.stopEvent(I)},_keyboardHandler:function(D){var C=false;if(!D.altKey&&!D.ctrlKey&&!D.shiftKey&&!D.metaKey){switch(D.keyCode){case 32:this.playPause();C=true;break;case 39:this.nextSlide(true);C=true;break;case 37:this.previousSlide(true);C=true;break}}if(C){YAHOO.util.Event.stopEvent(D)}},usesKeyboard:function(){return this._keyboard},setCanvasSize:function(C,D){this._canvasWidth=C?C:0;this._canvasHeight=D?D:0},getSourceType:function(){return this._sourceType},getPathToSlideoscope:function(){return this._url},_getPathToDefaultThumbnail:function(){return this.getPathToSlideoscope()+"img/default-thumbnail.png"},_getPathToProxy:function(D){var F=this;if(!D){D=F.PHP}var E=null;switch(D){case F.PHP_PROXY:default:E="proxy.php"}return F.getPathToSlideoscope()+"proxies/"+E},getWidth:function(){return this._canvasWidth},getHeight:function(){return this._canvasHeight},getVersion:function(){return this._v},setObserver:function(D){var C=this;D._slideoscope=C;C._obs=D;return C},getObserver:function(){return this._obs},setBase:function(D){var F=this;if(!D.charAt(D.length-1)!="/"){D=D+"/"}var E=F.b;F._base=D;if(F._base!=E){if(F._obs&&F._obs.onPropertyChange){F._obs.onPropertyChange(F.getBase)}}return F},getBase:function(){return this._base},preload:function(B){this._preload=B?true:false},doesPreload:function(){return this._preload},setTarget:function(){var C=this;var D=C._target;C._target=t;if(C._target!=D){if(C._obs&&C._obs.onPropertyChange){C._obs.onPropertyChange(C.getTarget)}}return C},getTarget:function(){return this._target},setSlideDuration:function(E){var D=this;var F=D._slideDuration;D._slideDuration=parseInt(E);if(E!=F){if(D._obs&&D._obs.onPropertyChange){D._obs.onPropertyChange(D.getSlideDuration)}}return D},getSlideDuration:function(){return this._slideDuration},setTransitionDuration:function(D){var C=this._transitionDuration;this._transitionDuration=parseInt(D);if(D!=C){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.getTransitionDuration)}}return this},getTransitionDuration:function(){return this._transitionDuration},setTransitionStyle:function(D){if(D==this.FADE&&!this.API.canAnimate()){D=this.NONE}var C=this._transitionStyle;this._transitionStyle=D;if(D!=C){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.getTransitionStyle)}}return this},getTransitionStyle:function(){return this._transitionStyle},setRandom:function(D){var F=this;if(!F._isProcessed){D=D?true:false;var E=F._isRandom;F._isRandom=D;if(D!=E){if(F._obs&&F._obs.onPropertyChange){F._obs.onPropertyChange(F.isRandom)}}}return F},isRandom:function(){return this._isRandom},getNavigationType:function(){return this._navType},setNavigationType:function(H){var G=this;var F=this._navType;G._navType=H;if(H!=F){if(G._albums){for(var E=0;E<G._albums.length;E++){G._albums[E]._buildNav(G._navType)}}if(G._obs&&G._obs.onPropertyChange){G._obs.onPropertyChange(G.getNavigationType)}}return G},showFeedback:function(C){C=C?true:false;var D=this._showFeedback;this._showFeedback=C;if(C!=D){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.showsFeedback)}}return this},showsFeedback:function(){return this._showFeedback},setAutoPlay:function(D){var F=this;D=D?true:false;var E=F._autoPlay;if(D!=E){if(F._obs&&F._obs.onPropertyChange){F._obs.onPropertyChange(F.autoPlays)}}if(D&&(F.isPaused()||F.isStopped())){F._autoPlay=D;if(F._isProcessed){F.play()}}else{if(!D&&F.isPlaying()){F.pause();F._autoPlay=D}}return F},autoPlays:function(){return this._autoPlay},loop:function(C){C=C?true:false;var D=this._doesLoop;this._doesLoop=C;if(C!=D){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this._doesLoop)}}return this},doesLoop:function(){return this._doesLoop},usesPermalinks:function(){return this._usePermalinks},usePermalinks:function(C){C=C?true:false;var D=this._usePermalinks;this._usePermalinks=C;if(C){this._updateBrowserState()}else{document.title=this._documentTitle}if(C!=D){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.usesPermalinks)}}return this},showsHUDLinks:function(){return this._showHUDLinks},showHUDLinks:function(C){if(arguments.length==0){C=true}C=C?true:false;var D=this._showHUDLinks;this._showHUDLinks=C;if(C!=D){if(this._obs&&this._obs.onPropertyChange){this._obs.onPropertyChange(this.showsHUDLinks)}}return this},getLoopCount:function(){return this._loopCount},getCurrentAlbum:function(){return this._currentAlbum!=null?this._albums[this._currentAlbum]:null},showSlide:function(H,F){var G=this;if(G._err){return false}var E=this.getCurrentAlbum();if(H==E.getCurrentSlide().getIndex()){return false}if(E.showSlide(H)){G._clearFeedback();if(F){if(G._playhead!=G.PAUSED&&G.autoPlays()){G._updateFeedback(G.PAUSED)}G._playhead=G.PAUSED}G._resetInterval();if(G._obs&&G._obs.onSlide){G._obs.onSlide(E.getCurrentSlide())}if(F&&G.autoPlays()&&G._obs&&G._obs.onPause){G._obs.onPause()}}else{if(!E.getSlides()[H].isReady()){G.pause(false);G._updateFeedback(G.LOADING);G._loadingTimeout=window.setTimeout("com.fivevoltlogic.slideoscope.showSlide("+H+","+clicked+")",G._pollInterval)}}return G},_updateBrowserState:function(){if(!this.usesPermalinks()){return }try{var D=this.getCurrentAlbum().getCurrentSlide();document.title=D.getTitle();var E="#id="+this.getCurrentAlbum().getId()+"&num="+D.getIndex();document.location.hash=E}catch(F){}},nextSlide:function(F){var G=this;clicked=arguments.length>0?clicked:false;if(G._err){return false}var E=G.getCurrentAlbum();var H=E.nextSlide();if(!H){if(!G._atEnd){G._playhead=G.PLAYING;G._updateFeedback(G.LOADING);G._loadingTimeout=window.setTimeout("com.fivevoltlogic.slideoscope.nextSlide("+clicked+")",G._pollInterval)}else{G._playhead=G.PAUSED;G._resetInterval()}return false}G._clearFeedback();G._clearPoll();if(G.autoPlays()&&F){G._updateFeedback(G.NEXT);G._playhead=G.PAUSED}else{if(G.autoPlays()){G._resetInterval()}}if(H&&G._obs&&G._obs.onSlide){G._obs.onSlide(E.getCurrentSlide())}return G},_clearPoll:function(){this._clearFeedback();this._loadingTimeout=null},previousSlide:function(){var D=this;if(D._err){return false}var C=D.getCurrentAlbum();if(!C.previousSlide()){D._loadingTimeout=window.setTimeout("com.fivevoltlogic.slideoscope.previousSlide(true)",D._pollInterval);return false}D._clearPoll();D._updateFeedback(D.PREVIOUS);D._playhead=D.PAUSED;D._resetInterval();if(D._obs&&D._obs.onSlide){D._obs.onSlide(C.getCurrentSlide())}},pause:function(D){var F=this;D=arguments.length==0||arguments[0];var E=F._playhead;F._playhead=F.PAUSED;F._resetInterval();if(E!=F._playhead){if(D){F._updateFeedback(this.PAUSED)}if(F._obs&&F._obs.onPause){F._obs.onPause()}}},setLanguage:function(C){var D=this;C=(C||"EN").toUpperCase();if(!D.locales[C]){C="EN"}D._lang=C;return D},_initFromElement:function(){var l=com.fivevoltlogic.util.DOM;var W=YAHOO.util.Dom;var Z=YAHOO.util.Event;var k=this;var i=document.getElementsByTagName("script");for(a in i){if(i[a].src&&i[a].src.match(/slideoscope.js$/)){k._url=i[a].src.replace(/slideoscope*\.js/,"")}else{if(i[a].src&&i[a].src.match(/slideoscope-full.js$/)){k._url=i[a].src.replace(/slideoscope-full*\.js/,"")}}}k._documentTitle=document.title;var V=W.get(k.getTarget());Z.addListener(V,"mouseover",k._mouseHandler,true,k);Z.addListener(V,"mouseout",k._mouseHandler,false,k);if(!V){k._failure("Unable to load slideoscope into the page.");return false}if(!k._language){var T=l.getAncestorsAttributeNamed(V,"lang",true);k.setLanguage(T)}var g=W.getRegion(V);k.setCanvasSize(g.right-g.left,g.bottom-g.top);V.style.height=V.style.width="auto";k.setAutoPlay(W.hasClass(V,"autoplay"));k.useKeyboard(W.hasClass(V,"keyboard"));k.setRandom(W.hasClass(V,"random"));k.showFeedback(W.hasClass(V,"feedback"));k.loop(W.hasClass(V,"loop"));k.preload(W.hasClass(V,"preload"));k.usePermalinks(W.hasClass(V,"permalinks"));k.showHUDLinks(W.hasClass(V,"hud"));if(W.hasClass(V,"thumbs")){k.setNavigationType(k.NAV_THUMBS)}else{if(W.hasClass(V,"indices")){k.setNavigationType(k.NAV_INDICES)}}var d=k.API.isMobile();if(!d&&W.hasClass(V,k.FADE)){k.setTransitionStyle(k.FADE)}else{if(!d&&W.hasClass(V,k.SLIDE_UP)){k.setTransitionStyle(k.SLIDE_UP)}else{k.setTransitionStyle(k.NONE)}}var U=V.className.split(" ");for(var a=0;a<U.length;a++){for(var c=0;c<k._themes.length;c++){if(U[a]==k._themes[c]){k.applyTheme(c)}}d=U[a].match(/transition-(\d+)/);if(d){k.setTransitionDuration(parseInt(d[1]))}else{d=U[a].match(/duration-(\d+)/);if(d){k.setSlideDuration(parseInt(d[1]))}}}k._err=false;k._currentAlbum=null;k._interval=null;k._loopCount=0;k._atEnd=false;k._isProcessed=false;k._panels=new Array();l.pruneChildren(V);V.appendChild(l.createComment("generated by slideoscope v"+k.getVersion()+" (http://www.fivevoltlogic.com/slideoscope/) on "+new Date().toString()));V.appendChild(l.create("div",{id:"sos-panels",style:{display:"none",width:k.getWidth()+"px",height:k.getHeight()+"px"}}));V.appendChild(k._buildFeedback());var j,Y;j=Y=50;var X={width:j+"px",height:Y+"px","margin-top":(k.getHeight()/2-Y/2)+"px"};j=Y=null;var h=l.create("div",{id:"sos-hud",style:{display:"none",width:k.getWidth()+"px"}});var f=l.create("a",{"class":"sos-hud-prev",title:"View the previous image",href:"#",style:X});var e=l.create("a",{"class":"sos-hud-next",title:"View the next image",href:"#",style:X});var b=l.create("span");b.appendChild(l.createText("View the previous image"));f.appendChild(b);b=l.create("span");b.appendChild(l.createText("View the next image"));e.appendChild(b);e.onclick=function(){com.fivevoltlogic.slideoscope.nextSlide();return false};f.onclick=function(){com.fivevoltlogic.slideoscope.previousSlide();return false};h.appendChild(f);h.appendChild(e);V.appendChild(h);if(k._obs&&k._obs.onInit){k._obs.onInit()}},_preLoad:function(E){var F=this;F._path=E;F._err=false;F._loadCount++;F.API.init();if(F._loadCount==1){F._initFromElement()}else{clearTimeout(F._interval);for(var D=0;D<F._albums.length;D++){F._albums[D].destroy()}}F._addBackdrop();F._albums=new Array();F._updateFeedback(F.LOADING)},addPanel:function(E){var F="random-id-"+this._panels.length;var D=com.fivevoltlogic.util.DOM.create("div",{id:F,"class":"sos-panel",style:{display:"none",width:this.getWidth()+"px",height:this.getHeight()+"px"}});D.appendChild(E);YAHOO.util.Dom.get("sos-panels").appendChild(D);this._panels.push(F);return F},showPanel:function(H){var J=this;if(J._err){return false}J.pause(false);var K=J._panels.indexOf(H);if(K<0){J._failure('Unable to show panel "'+H.toString()+'"');return false}if(K>=0&&K==J._activePanel){return true}if(J._activePanel>=0){J.dismissPanel(false)}J._activePanel=K;var L=YAHOO.util.Dom;var I=L.get(H);var G=J.getCurrentAlbum();if(J.getNavigationType()!=J.NAV_NONE&&G){L.get(G._getMarkupNavId()).style.visibility="hidden"}L.get("sos-panels").style.display="";I.style.display="";if(J._obs&&J._obs.onPanel){J._obs.onPanel(H)}return true},dismissPanel:function(I){if(this._activePanel>=0){var J=YAHOO.util.Dom;var F=this.getCurrentAlbum();if(this.getNavigationType()!=this.NAV_NONE&&F){J.get(F._getMarkupNavId()).style.visibility="visible"}var G=this._panels[this._activePanel];this._activePanel=-1;var H=J.get(G);H.style.display="none";J.get("sos-panels").style.display="none";if(this._obs&&this._obs.onPanelEnd){this._obs.onPanelEnd(G)}}if(I){this.play()}return true},loadObject:function(D){var C=this;C._sourceType=C.OBJ;C._source=D;C._preLoad(D);C._success(D,C.OBJ);return C},loadJSON:function(F,H){var G=this;G._sourceType=G.JSON;if(!F){F="images.json"}else{F=G._preparePath(F,H)}G._source=F;G._preLoad(F);var E={success:function(A){var B=com.fivevoltlogic.slideoscope;B._success(A,B.JSON)},failure:function(A){var B=com.fivevoltlogic.slideoscope;B._failure(A,B.JSON)},scope:G};YAHOO.util.Connect.asyncRequest("GET",F,E,null);return G},load:function(D,C){this.loadXML(D,C);return this},loadRSS:function(F,H){var G=this;G._sourceType=G.RSS;if(!F){F="images.rss"}else{F=G._preparePath(F,H)}G._source=F;var E={success:function(A){var B=com.fivevoltlogic.slideoscope;B._success(A,B.RSS)},failure:function(A){var B=com.fivevoltlogic.slideoscope;B._failure(A,B.RSS)},scope:G};G._preLoad(F);YAHOO.util.Connect.asyncRequest("GET",F,E,null);return G},loadDOM:function(F){var H=this;H._sourceType=H.DOM;if(!F){F="sos-source"}H._source=F;var E=false;try{E=YAHOO.util.Dom.get(F)}catch(G){H._failure();return false}if(!E){H._failure();return false}H._preLoad(F);H._success(E,H.DOM);return H},loadXML:function(F,H){var G=this;G._sourceType=G.XML;if(!F){F="images.xml"}else{F=G._preparePath(F,H)}G._source=F;G._preLoad(F);var E={success:function(A){var B=com.fivevoltlogic.slideoscope;B._success(A,B.XML)},failure:function(A){var B=com.fivevoltlogic.slideoscope;B._failure(A,B.XML)},scope:G};YAHOO.util.Connect.asyncRequest("GET",F,E,null);return G},_showsNav:function(){var B=this;return B._navType==B.NAV_THUMBS||B._navType==B.NAV_INDICES},_preparePath:function(E,D){if(!D){D=this._getPathToProxy()}var F="http://";return E.substring(0,F.length)==F?D+"?path="+encodeURIComponent(E):E},play:function(){var E=this;if(E._err){return false}if(E.autoPlays()){var D=E.getCurrentAlbum();var F=D.getCurrentSlide().getIndex();if(F==D.getSlides().length-1){E.showSlide(0)}E._atEnd=false;E._playhead=E.PLAYING;E._updateFeedback(E.PLAYING);if(E._obs){if(E._obs.onPlay){E._obs.onPlay()}if(E._obs.onSlide){E._obs.onSlide(D.getCurrentSlide())}}E._resetInterval()}else{return E.nextSlide()}},playPause:function(){return this.isPlaying()?this.pause():this.play()},isPaused:function(){return this._playhead==this.PAUSED},isStopped:function(){return this._playhead==this.STOPPED||!this.autoPlays()},isPlaying:function(){return this.autoPlays()&&this._playhead==this.PLAYING},isLoading:function(){return this._playhead==this.LOADING},_getPrefix:function(){return this._prefix},_setCurrentAlbum:function(B){this._currentAlbum=parseInt(B)},_buildFeedbackItem:function(H){var K=com.fivevoltlogic.util.DOM;var L=K.create("dl");var I=K.create("dt");var J=K.create("span");J.appendChild(K.createText("Feedback:"));I.appendChild(J);L.appendChild(I);var G=K.create("dd");J=K.create("span");J.appendChild(K.createText(H));G.appendChild(J);L.appendChild(G);return L},_buildFeedback:function(){var K=this;var G=com.fivevoltlogic.util.DOM;var L=G.create("div",{id:"sos-feedback",style:{width:K.getWidth()+"px",height:K.getHeight()+"px"}});var I={style:{display:"none",width:+K.getWidth()+"px",height:K.getHeight()+"px"}};var J=K._getPrefix();I.id=J+"loading-feedback";var H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("LOAD")));L.appendChild(H);I.id=J+"loop-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("LOOP")));L.appendChild(H);I.id=J+"previous-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("PREV")));L.appendChild(H);I.id=J+"next-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("NEXT")));L.appendChild(H);I.id=J+"play-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("PLAY")));L.appendChild(H);I.id=J+"pause-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("PAUSE")));L.appendChild(H);I.id=J+"stop-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("STOP")));L.appendChild(H);I.id=J+"error-feedback";H=G.create("div",I);H.appendChild(K._buildFeedbackItem(K._localize("ERROR")));L.appendChild(H);return L},_addBackdrop:function(){var C=this;var D=YAHOO.util.Dom.get(C.getTarget());D.appendChild(com.fivevoltlogic.util.DOM.create("div",{id:C._getPrefix()+"backdrop",style:{width:C.getWidth()+"px",height:C.getHeight()+"px"}}))},_removeBackdrop:function(){try{com.fivevoltlogic.util.DOM.prune(this._getPrefix()+"backdrop")}catch(B){}},_preProcess:function(){this._removeBackdrop()},_postProcess:function(){var B=this;if(B._err){return false}if(B._albums.length==0){B._failure("No albums!");return false}B._setCurrentAlbum(0);B._begin()},_begin:function(){var F=this;var D=F.getCurrentAlbum();if(!D){return false}if(!D.isReady(F.doesPreload(),F.getNavigationType())){setTimeout(F.toString()+"._begin()",200);return false}try{YAHOO.util.Dom.get(D._getMarkupNavId()).style.visibility=""}catch(E){}F._clearFeedback();F._isProcessed=true;if(F._obs&&F._obs.onLoad){F._obs.onLoad()}if(F.autoPlays()&&D.getSlides().length>1){return F.play()}return true},addAlbum:function(C){var D=this;D._albums.push(C);YAHOO.util.Dom.get(D.getTarget()).appendChild(C._build());YAHOO.util.Event.addListener("sos-canvas-"+C.getId(),"click",function(A,B){B._onClick(A)},D,true)},_doFeedback:function(G){var I=this;var F=YAHOO.util.Dom;var G=this._getPrefix()+G;F.get(G).style.display="";F.get(G).style.opacity=1;var H=F.get(G).parentNode;if(G==I._getPrefix()+"error-feedback"){for(var J=0;J<I._albums.length;J++){I._albums[J]._element.style.display="none"}H.style.position="relative"}else{if(G==I._getPrefix()+"loading-feedback"){H.style.position="absolute";H.style.zIndex="100"}else{H.style.position="absolute";I._fade(G,I._feedbackDuration/1000);H.style.zIndex="100"}}},_clearFeedback:function(){var F=this;var E=YAHOO.util.Dom;var G=["loading","loop","play","stop","pause","next","previous","error"];for(var H=0;H<G.length;H++){E.get(F._getPrefix()+G[H]+"-feedback").style.display="none";E.get(F._getPrefix()+G[H]+"-feedback").style.opacity=0}if(G.length){E.get(F._getPrefix()+G[H-1]+"-feedback").parentNode.style.position="absolute"}},_updateFeedback:function(C){var D=this;if(D._showFeedback||C==D.LOADING){this._clearFeedback();switch(C){case D.PAUSED:D._doFeedback("pause-feedback");break;case D.LOOPED:D._doFeedback("loop-feedback");break;case D.PLAYING:D._doFeedback("play-feedback");break;case D.STOPPED:D._doFeedback("stop-feedback");break;case D.PREVIOUS:D._doFeedback("previous-feedback");break;case D.NEXT:D._doFeedback("next-feedback");break;case D.ERROR:D._doFeedback("error-feedback");break;case D.LOADING:D._doFeedback("loading-feedback");break;default:return false}return true}},_resetInterval:function(){var G=this;clearTimeout(G._interval);if(G._err){return }var E=G.getCurrentAlbum();if(G.isPlaying()){var H=E.getCurrentSlide();var F=H.getDuration()?H.getDuration():G.getSlideDuration();G._interval=window.setTimeout(G.toString()+".nextSlide();",F)}},_success:function(o,s){var $=this;$._preProcess();switch(s){case $.OBJ:case $.JSON:try{var a=$._sourceType==$.OBJ?o.gallery.albums:eval("("+o.responseText+")")["gallery"]["albums"];for(var i=0;i<a.length;i++){var t=new $.Album($);t.initWithJSON(a[i],$.doesPreload());$.addAlbum(t)}}catch(e){$._failure(e);return false}break;case $.RSS:var d;try{if(window.ActiveXObject){d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(o.responseText)}else{var p=new DOMParser();d=p.parseFromString(o.responseText,"text/xml")}var r=doc.documentElement;var c=r.getElementsByTagName("channel")[0];var a=new $.Album($);a.initWithRSS(c,$.doesPreload());$.addAlbum(a)}catch(e){$._failure(e);return false}break;case $.XML:var d;if(window.ActiveXObject){d=new ActiveXObject("Microsoft.XMLDOM");d.async="false";d.loadXML(o.responseText)}else{var p=new DOMParser();d=p.parseFromString(o.responseText,"text/xml")}var r=d.documentElement;var a=r.getElementsByTagName("album");for(i=0;i<a.length;i++){var t=new com.fivevoltlogic.slideoscope.Album($);t.initWithXML(a[i],$.doesPreload());$.addAlbum(t)}break;case $.DOM:var albums=com.fivevoltlogic.util.DOM.getDescendantsWithAttributeValue(o,null,"class","album");if(!albums){$._failure("No albums!")}for(var i=0;i<albums.length;i++){var a=new com.fivevoltlogic.slideoscope.Album($);a.initWithDOM(albums[i],true);$.addAlbum(a)}break;default:$._failure("Unknown data source of '"+s+"'")}return $._postProcess()},_error:function(B){if(this._obs&&this._obs.onError){this._obs.onError(new $.Error(msg),false)}},_failure:function(I){var L=this;var H=YAHOO.util.Dom;L._removeBackdrop();var K=H.get("sos-panels");if(K){K.style.display="none";K=null}var J="";L._err=true;if(typeof I=="string"){J=I}else{J=L._localize("ERROR")}L.autoPlays(false);if(L._obs&&L._obs.onError){L._obs.onError(new L.Error(J),true)}var M=H.get(this._getPrefix()+"error-feedback");if(!M){throw new Error("Fatal error: unable to build slideoscope into element #"+L.getTarget())}var N=M.getElementsByTagName("span").item(1);N.innerHTML=J;L._updateFeedback(L.ERROR)},toString:function(){return"com.fivevoltlogic.slideoscope"}};com.fivevoltlogic.slideoscope.locales.EN={PLAY:"Play",PAUSE:"Pause",NEXT:"Next Slide",PREV:"Previous Slide",LOOP:"Loop",LOAD:"Loading...",VIEW:"View",GOTO:"Go to",ERROR:"An error occurred while loading the slideoscope"};com.fivevoltlogic.slideoscope.API={init:function(){},canAnimate:function(){return(YAHOO&&YAHOO.util&&YAHOO.util.Anim)},getId:function(){return"yui2"},isMobile:function(){return YAHOO.env.ua.mobile?true:false}};if(!com.fivevoltlogic.util){com.fivevoltlogic.util={}}if(!com.fivevoltlogic.util){com.fivevoltlogic.util={}}com.fivevoltlogic.util.DOM={getAttributeNamed:function(F,E){for(var D=0;D<F.attributes.length;D++){if(F.attributes[D].nodeName.toUpperCase()==E.toUpperCase()){return F.attributes[D].nodeValue}}return null},createComment:function(B){return document.createComment(B?B:"")},createText:function(B){return document.createTextNode(B?B:"")},create:function(J,G){var I,F=null;G=G||{};var H=document.createElement(J);for(I in G){switch(I){case"style":for(F in G.style){YAHOO.util.Dom.setStyle(H,F,G.style[F])}break;case"class":H.className=G["class"];break;default:H[I]=G[I];break}}return H},getNodeText:function(G){var H="";if(G.nodeType==1){var I=G.childNodes;for(var J=0;J<I.length;J++){var F=this.getNodeText(I[J]);H+=F?F:""}}else{if(G.nodeType==3){H+=G.nodeValue}else{return""}}return H},nodelistToArray:function(F){var D=new Array(F.length);for(var E=0;E<F.length;E++){D[E]=F.item(E)}return D},getAncestorsAttributeNamed:function(G,J,I){if(arguments.length==2){I=false}var H=I?G:G.parentNode;if(!H){return false}while(H){if(H.attributes){var F=this.getAttributeNamed(H,J);if(F!=null){return F}}H=H.parentNode}return null},getDescendantsWithAttributeValue:function(L,J,O,N){var K=L.getElementsByTagName(J?J:"*");var P=new Array();if(!K){return P}for(var M=0;M<K.length;M++){var I=K[M].getAttributeNode(O);if(I&&I.value==N){P.push(K[M])}}return P},prune:function(B){if(typeof B=="string"){B=document.getElementById(B)}if(!B){return false}B.parentNode.removeChild(B);return true},pruneChildren:function(B){if(!B){return }while(B.hasChildNodes()){B.removeChild(B.firstChild)}return true}};com.fivevoltlogic.slideoscope.Slide=function(C){var D=this;D._id=null;D._caption=null;D._title=null;D._link=null;D._src=null;D._target=false;D._duration=0;D._image=null;D._thumb=null;D._index=0;D._element=null;D._album=C;D._isLoaded=false};com.fivevoltlogic.slideoscope.Slide.prototype={destroy:function(){var B=this;com.fivevoltlogic.util.DOM.prune(B._getMarkupId());if(B._thumb){B._thumb.destroy()}},_postInit:function(D){var C=this;C._build();C._thumb.load();if(D){C.load()}},isLastInAlbum:function(){return this.getIndex()==this._album._slides.length-1},load:function(){var B=this;if(B._isLoaded){return true}if(B._image){return false}B._image=new Image();B._image._ref=B;B._image.onload=function(){var R=this._ref;if(!R._album){return }R._album._slideHasLoaded(R.getIndex());R._isLoaded=true;R._album._slides[(!R.isLastInAlbum()?R.getIndex()+1:0)].load();var O=R._album._sos;var K=this._ref._element.getElementsByTagName("img")[0];var N=this.width;var A=this.height;var P=O.getWidth();var Q=O.getHeight();if(N>P||A>Q){if(N/A>=P/Q){A=Math.round(A*P/N);N=P}else{N=Math.round(N*Q/A);A=Q}}var M="";if(N<P){var L=Math.floor((P/2)-(N/2));M="margin-left: "+L+"px;"}if(A<Q){L=Math.floor((Q/2)-(A/2));M+=" margin-top:"+L+"px;"}K.setAttribute("width",N);K.setAttribute("height",A);if(M){K.setAttribute("style",M)}if(R==R._album.getInitialSlide()){R.show(true)}};this._image.src=this.getSrc()},_preInit:function(){this._setIndex(this._album._slides.length);this._setId(this._album.getId()+"-slide-"+this.getIndex());this._thumb=new com.fivevoltlogic.slideoscope.Thumbnail(this);this._thumb.initWithSrc(this._album._sos._getPathToDefaultThumbnail())},initWithDOM:function(U){this._preInit();var N=com.fivevoltlogic.util.DOM;var W=N.getDescendantsWithAttributeValue;var V=N.getAttributeNamed;var S=N.getNodeText;var R=W(U,null,"class","title");if(R.length){R=N.getNodeText(R[0]);if(R){this._setTitle(R)}}var T=W(U,null,"class","caption");if(T.length){T=S(T[0]);if(T){this._setCaption(T)}}var M=W(U,"a","class","link");if(M.length){var P=M[0].toString();if(P){this._setLink(M[0].toString())}var R=V(link[0],"target");if(R){this._setTarget(R)}}var X=W(U,null,"class","thumb");if(X.length){var Q=V(X[0],"src");if(Q){this._thumb._setSrc(Q)}}X=W(U,null,"class","large");if(!X.length){throw new Error("No image specified!")}Q=V(X[0],"src");this._setSrc(Q);var O=W(U,null,"class","pause");if(O.length){O=parseFloat(S(O[0]));if(O){this._setDuration(O*1000)}}this._postInit(true)},initWithXML:function(P,K){var J=com.fivevoltlogic.util.DOM;var Q=J.getAttributeNamed;var R=this;R._preInit();var O=Q(P,"title");var L=Q(P,"id");var N=Q(P,"pause");if(L){R._setId(L)}if(O){R._setTitle(O)}if(N){R._setDuration(N*1000)}R._setCaption(Q(P,"caption"));R._setLink(Q(P,"link"));R._setTarget(Q(P,"target"));var M=Q(P,"src");R._setSrc(R._album.getPathToImages()+M);if(R._album.getPathToThumbnails()){R._thumb._setSrc(R._album.getPathToThumbnails()+M)}R._postInit(K)},initWithRSS:function(Q,S){var L=this;L._preInit();var R=Q.getElementsByTagName("title")[0].childNodes[0].nodeValue;var M=com.fivevoltlogic.util.DOM;var V=M.getAttributeNamed;var N=Q.getElementsByTagName("guid")[0].childNodes[0].nodeValue;L._setId(N);L._setTitle(R);L._setLink(V(Q.getElementsByTagName("link")[0],"href"));var P=false;try{P=V(Q.getElementsByTagName("media:content")[0],"url")}catch(T){try{P=V(Q.getElementsByTagName("content")[0],"url")}catch(U){}}L._setSrc(P);try{var T=Q.getElementsByTagName("media:thumbnail")[0];L._thumb.initWithRSS(T)}catch(O){try{var T=Q.getElementsByTagName("thumbnail")[0];L._thumb.initWithRSS(T)}catch(P){}}L._postInit(S)},initWithJSON:function(P,M){var N=this;N._preInit();var J=P.id;var K=P.title;var L=P.pause;if(L){N._setDuration(L*1000)}if(J){N._setId(J)}if(K){N._setTitle(K)}N._setCaption(P.caption);N._setLink(P.link);N._setTarget(P.target);N._setSrc(N._album.getPathToImages()+P.src);var I=N._album._sos;var O=I.getSourceType();if(N._album.getPathToThumbnails()){N._thumb._setSrc(N._album.getPathToThumbnails()+P.src)}N._postInit(M)},isReady:function(B){return this._isLoaded&&(!B||this._thumb.isReady())},getThumbnail:function(){return this._thumb},toString:function(){return this.getTitle()},_setId:function(B){this._id=B},_setCaption:function(B){this._caption=B},_setTitle:function(B){this._title=B},_setLink:function(B){if(!B){B=null}this._link=B},_setTarget:function(B){if(!B){B=null}this._target=B},_setSrc:function(B){this._src=B},_setIndex:function(B){this._index=B},_setDuration:function(B){this._duration=B},_setThumbWidth:function(B){this._thumbWidth=B},_setThumbHeight:function(B){this._thumbHeight=B},_getAlt:function(){return this.getTitle()},_getCaptionId:function(){return this._album.getId()+"-caption-"+this.getIndex()},_getTitleId:function(){return this._album.getId()+"-title-"+this.getIndex()},_getNavMarkupId:function(){return"nav-"+this._album.getId()+"-"+this.getIndex()},_getMarkupId:function(){return this._album.getId()+"-"+this.getIndex()},getId:function(){return this._id},getCaption:function(){return this._caption},getDuration:function(){return this._duration},getTitle:function(){return this._title?this._title:"Slide #"+(this.getIndex()+1)},getLink:function(){return this._link},getTarget:function(){return this._target},getIndex:function(){return this._index},getSrc:function(){return this._src},getAlbum:function(){return this._album},equals:function(B){return B instanceof com.fivevoltlogic.slideoscope.Slide&&this._album.equals(B.getAlbum())&&this.getIndex()==B.getIndex()},show:function(M){var H=this.getAlbum();var L=H._sos;var K=this;var N=YAHOO.util.Dom;var J=H.getCurrentSlide();var I=M?0:L.getTransitionDuration()/1000;N.addClass(K._getNavMarkupId(),"current");L._appear(K._element,I);if(J&&J!=K){L._fade(J._element,I);N.removeClass(J._getNavMarkupId(),"current")}H._setCurrentSlide(K.getIndex());H._sos._updateBrowserState(K);return true},getElement:function(){return this._element},_build:function(){var S=this;var K=com.fivevoltlogic.util.DOM;var Q=YAHOO.util.Event;S._element=K.create("div",{"class":"slide",id:S._getMarkupId(),style:{height:S._album._sos.getHeight()+"px",width:this._album._sos.getWidth()+"px",display:"none"}});if(S.getTitle()){var N=K.create("div",{"class":"title",id:S._getTitleId()});var L=K.create("p");var O=K.create("span");O.appendChild(K.createText(S.getTitle()));L.appendChild(O);N.appendChild(L);S._element.appendChild(N)}var M={title:S._album._sos._localize("GOTO")+' "'+S.getTitle()+'"',"class":"link"};var R={id:S.getId(),"class":"slide",src:S.getSrc(),alt:S._getAlt(),style:{margin:"0",padding:"0"}};if(S.getLink()){M.href=S.getLink();if(S.getTarget()){M.target=S.getTarget}}var T=K.create("img",R);var P=K.create("a",M);if(S.getLink()){P.appendChild(T);S._element.appendChild(P)}else{S._element.appendChild(T)}if(S.getCaption()){var N=K.create("div",{"class":"caption",id:S._getCaptionId()});var L=K.create("p");var O=K.create("span");O.appendChild(K.createText(S.getCaption()));L.appendChild(O);N.appendChild(L);S._element.appendChild(N)}}};com.fivevoltlogic.slideoscope.Thumbnail=function(C){var D=this;D._slide=C;D._w=null;D._h=null;D._isLoaded=false;D._img=null;D._src=null};com.fivevoltlogic.slideoscope.Thumbnail.prototype={destroy:function(){},initWithSrc:function(B){this._setSrc(B);this._postInit()},initWithRSS:function(E){var D=com.fivevoltlogic.util.DOM;var F=this;F._setSrc(D.getAttributeNamed(E,"url"));F._postInit()},_postInit:function(){},_setSrc:function(B){this._src=B},load:function(){var B=this;B._img=new Image();B._isLoaded=false;B._img._ref=this;B._img.onload=function(){this._ref._isLoaded=true;this._ref._setThumbDimensions(this.width,this.height);this._ref._slide._album._thumbHasLoaded(this._ref)};B._img.src=B._src},isReady:function(){return this._isLoaded},_setWidth:function(B){this._w=B},_setHeight:function(B){this._h=B},getWidth:function(){return this._w},getHeight:function(){return this._h},_setThumbDimensions:function(J,I){if(J&&I){var F,G=0;var H=this._slide._album._sos.MAX_THUMB_SIZE;if(J>H||I>H){if(J>=I){F=H;G=Math.round(I*H/J)}else{G=H;F=Math.round(J*H/I)}}else{F=J;G=I}this._setWidth(F);this._setHeight(G)}},getSrc:function(){return this._src},equals:function(B){return false}};com.fivevoltlogic.slideoscope.Album=function(C){var D=this;D._sos=C;D._id=null;D._pathToImages=null;D._pathToThumbnails=null;D._title=null;D._description=null;D._index=0;D._slides=Array();D._currentSlide=0;D._element=null;D._nav=null;D._slidesLoaded=0;D._thumbsLoaded=0};com.fivevoltlogic.slideoscope.Album.prototype={destroy:function(){var G=this;for(var H=0;H<G._slides.length;H++){G._slides[H].destroy()}YAHOO.util.Event.removeListener(G._sos._getPrefix()+"canvas-"+G.getId(),"click");var E=com.fivevoltlogic.util.DOM;try{E.prune(G._getMarkupNavId());E.prune(YAHOO.util.Dom.getElementsByClassName("canvas","div",G.getId())[0]);E.prune(G.getId())}catch(F){}},_preInit:function(){var B=this;B._index=B._sos._albums.length;B._slides=new Array();B._setId("album-"+B.getIndex());B._setTitle("Album #"+B.getIndex())},_postInit:function(E){var F=this;var D=F.getInitialSlide();F._setCurrentSlide(D.getIndex());if(!E){F.getCurrentSlide().load()}},getInitialSlide:function(){var E=this;var F=0;if(E._sos.usesPermalinks()){var D=/^#id=(\w+)/.exec(document.location.hash);if(!D||D[1]!=E.getId()){}else{D=/&num=(\d+)/.exec(document.location.hash);F=(D?D[1]:0)}}return E._slides[F]},initWithDOM:function(F){var G=this;G._preInit();G._setTitle("test");G._setDescription("test");G._pathToImages=G._pathToThumbnails=null;var H=com.fivevoltlogic.util.DOM.getDescendantsWithAttributeValue(F,null,"class","slide");for(var E=0;E<H.length;E++){G._slides.push(new com.fivevoltlogic.slideoscope.Slide(G).initWithDOM(H[E]))}this._postInit(true)},initWithXML:function(P,L){var J=this;this._preInit();var K=com.fivevoltlogic.util.DOM;var M=K.getAttributeNamed(P,"id");var O=K.getAttributeNamed(P,"title");if(M){J._setId(M)}var L=K.getAttributeNamed(P,"lgPath");if(!L){L="./"}else{L=L+(L.charAt(L.length-1)!="/"?"/":"")}this._setPathToImages((J._sos.getBase()?J._sos.getBase():"")+L);L=K.getAttributeNamed(P,"tnPath");if(L){L=L+(L.charAt(L.length-1)=="/"?"":"/");J._setPathToThumbnails((J._sos.getBase()?J._sos.getBase():"")+L)}J._setDescription(K.getAttributeNamed(P,"description"));var Q=P.getElementsByTagName("img");if(J._sos.isRandom()){Q=K.nodelistToArray(Q);Q.sort(function(){return(Math.round(Math.random())-0.5)})}for(var R=0;R<Q.length;R++){var N=new com.fivevoltlogic.slideoscope.Slide(J);N.initWithXML(Q[R],L);J._slides.push(N)}J._postInit(L)},initWithRSS:function(H,I){var J=this;this._preInit();J._setTitle(H.getElementsByTagName("title")[0].childNodes[0].nodeValue);J._setId(J.getTitle().replace(/[^\w]/g,""));var G=H.getElementsByTagName("item");for(var K=0;K<G.length;K++){var L=new com.fivevoltlogic.slideoscope.Slide(J);L.initWithRSS(G[K],I);J._slides.push(L)}J._postInit(I)},initWithJSON:function(I,L){var N=this;N._preInit();var J=I.id;var K=I.title;if(J){N._setId(J)}if(K){N._setTitle(K)}var M=I.lgPath;if(!M){M="./"}else{M=M+(M.charAt(M.length-1)=="/"?"":"/")}this._setPathToImages((N._sos.getBase()?N._sos.getBase():"")+M);M=I.tnPath;if(M){M=M+(M.charAt(M.length-1)=="/"?"":"/");N._setPathToThumbnails((N._sos.getBase()?N._sos.getBase():"")+M)}for(var O=0;O<I.slides.length;O++){var P=new com.fivevoltlogic.slideoscope.Slide(N);P.initWithJSON(I.slides[O],L);N._slides.push(P)}this._postInit(L)},isReady:function(E,D){var F=this;if(E){return F._slidesLoaded==F._slides.length&&F._thumbsLoaded==F._slides.length}else{F._sos;return F.getCurrentSlide().isReady(D)&&(F._sos.getNavigationType()!=F._sos.THUMBS||(F._thumbsLoaded==F._slides.length))}return false},isSlideReady:function(B){if(B<0||B>=this._slides.length){return false}return this._slides[B]._loaded==true},_slideHasLoaded:function(B){if(this._slides[B]==this.getCurrentSlide()){this.showSlide(B)}this._slidesLoaded++},_thumbHasLoaded:function(H){var G=this;G._thumbsLoaded++;var F=YAHOO.util.Dom.get(G._getMarkupNavId());if(F){F=F.getElementsByTagName("li")[H._slide.getIndex()];var E=F.getElementsByTagName("img")[0];if(E){E.width=H.getWidth();E.height=H.getHeight()}}},toString:function(){return this.getTitle()},equals:function(B){return B instanceof com.fivevoltlogic.slideoscope.Album&&this.getId()==B.getId()},getIndex:function(){return this._index},getSlides:function(){return this._slides},showSlide:function(B){if(B<0||B>=this._slides.length){throw new Error("Unable to show slide "+B)}if(!this._slides[B].isReady()){this._slides[B].load();return false}return this._slides[B].show()},nextSlide:function(){var E=this;var D=E.getCurrentSlide();var F=D.getIndex();if(F==E._slides.length-1){if(E._sos.doesLoop()){if(E.getSlides().length>1){F=0;E._sos._loopCount++;E._sos._updateFeedback(E._sos.LOOPED);if(E._sos._obs&&E._sos._obs.onLoop){E._sos._obs.onLoop()}}return E.showSlide(F)}else{E._sos._updateFeedback(E._sos.STOPPED);E._sos._playhead=E.PAUSED;E._sos._atEnd=true;if(E._sos._obs&&E._sos._obs.onEnd){E._sos._obs.onEnd()}return true}}else{if(!E._slides[F+1].isReady()){return false}else{F++;return E.showSlide(F)}}},previousSlide:function(){var E=this;var D=E.getCurrentSlide();var F=D.getIndex();F--;if(F<0){if(!E._sos.doesLoop()){return true}F=E._slides.length-1;E._sos._updateFeedback(E._sos.LOOPED);if(E._sos._obs&&E._sos._obs.onLoop()){E._sos._obs.onLoop()}}else{E._sos._updateFeedback(E._sos.PREVIOUS)}return E.showSlide(F)},_setId:function(B){this._id=B},_setPathToImages:function(B){this._pathToImages=B},_setPathToThumbnails:function(B){this._pathToThumbnails=B},_setTitle:function(B){this._title=B},_setDescription:function(B){this._description=B},_setCurrentSlide:function(B){this._currentSlide=B},getId:function(){return this._id},getPathToImages:function(){return this._pathToImages},getPathToThumbnails:function(){return this._pathToThumbnails},getTitle:function(){return this._title},getDescription:function(){return this._description},getCurrentSlide:function(){return this._currentSlide!=null?this._slides[this._currentSlide]:null},_getMarkupNavId:function(){return this._sos._getPrefix()+"nav-"+this.getId()},_build:function(){var J=this;var G=J._sos;var K=com.fivevoltlogic.util.DOM;this._element=K.create("div",{id:J.getId(),"class":"album",style:{width:G.getWidth()+"px"}});var H=K.create("div",{id:G._getPrefix()+"canvas-"+J.getId(),"class":"canvas",style:{width:G.getWidth()+"px",height:G.getHeight()+"px"}});for(var L=0;L<J._slides.length;L++){var I=J._slides[L];H.appendChild(I.getElement())}J._element.appendChild(H);J._buildNav(G.getNavigationType());return J._element},_buildNav:function(R){var N=this;if(N._nav){N._element.removeChild(N._nav)}N._nav=null;if(R==N._sos.NAV_NONE){return }var P=com.fivevoltlogic.util.DOM;var S=R==N._sos.NAV_THUMBS;var W=null;N._nav=P.create("div",{"class":"nav",id:N._getMarkupNavId(),style:{width:N._sos.getWidth()+"px",visibility:S&&!N.isReady()?"hidden":""}});if(S){W=P.create("div",{"class":"thumbs"})}var X=P.create(N._sos.isRandom()?"ul":"ol");X.style.width=N._sos.getWidth()+"px";for(var Z=0;Z<N._slides.length;Z++){var Q=N._slides[Z];var U=P.create("a",{href:"javascript: "+N._sos+".showSlide("+Z+", true); void(0);",title:N._sos._localize("VIEW")+' "'+Q.getTitle()+'"'});if(S){var O=Q.getThumbnail();var R=P.create("img",{src:O.getSrc(),alt:Q.getTitle()});if(O.getWidth()){R.setAttribute("width",O.getWidth())}if(O.getHeight()){R.setAttribute("height",O.getHeight())}U.appendChild(R)}else{var Y=P.create("span");Y.appendChild(P.createText((new String(Z+1).length<2?"0":"")+(Z+1)+" "));U.appendChild(Y)}var V=N._sos.getCurrentAlbum();if(V){V=Q.equals(V.getCurrentSlide())}var T=P.create("li",{id:Q._getNavMarkupId(),"class":"li-"+(Z+1)+(V?" current":"")});T.appendChild(U);X.appendChild(T)}if(S){W.appendChild(X);N._nav.appendChild(W)}else{N._nav.appendChild(X)}N._element.appendChild(N._nav)}};com.fivevoltlogic.slideoscope.Observer=function(){};com.fivevoltlogic.slideoscope.Observer.prototype={initialize:function(){},onLoad:function(){},onSlide:function(B){},onAlbumm:function(B){},onPlay:function(){},onPause:function(){},onError:function(C,D){},onPropertyChange:function(B){},onLoop:function(){},onMouseOver:function(){},onMouseOut:function(){},onClick:function(B){return true},onEnd:function(){}};com.fivevoltlogic.slideoscope.Error=function(B){this._err=B?B:"An unknown error occurred."};com.fivevoltlogic.slideoscope.Error.prototype={toString:function(){return this._err}};