var videoPlayer;window.addEvents({domready:function(){var A=0;$$("body#home ul#leftNav li.level2").each(function(C){if(C.getElement("span.video")){videoFile=C.getElement("span.video").get("html");}else{videoFile=false;}if(videoFile&&videoFile.length){playLink=new Element("a",{html:"Play",href:videoFile,"class":"play"});playSpan=new Element("span",{html:"&nbsp;&nbsp;|&nbsp;&nbsp;"});playSpan.grab(playLink,"top");C.getElement("p").grab(playSpan,"top");A++;}});$$("a.play").each(function(C){C.addEvent("click",function(D){D.preventDefault();parentLi=C.getParent().getParent().getParent();setPlaylistStates(parentLi);cgvideoplayerPlay(parentLi.get("id"),parentLi.getElement("span.video").get("html"));});});containerId="welcome-box";if(Browser.Plugins.Flash.version<9||(Browser.Plugins.Flash.version==9&&Browser.Plugins.Flash.build<115)){warning=new Element("p");warning.set("html",'You appear to be using an older version of Flash that does not support our lovely video content. Please visit <a href="http://www.adobe.com/go/getflash/">Adobe\'s Flash Player site</a> to upgrade and start viewing now.');$("welcome-box").grab(warning,"bottom");}else{$("welcome-box").set("html","");var B=new Swiff("/flash/cgvideoplayerhome.swf",{id:"player",width:$(containerId).getSize().x,height:$(containerId).getSize().y,container:containerId,vars:{autoplay:true,playlist:"/general/playlist",overlaytitle:" ",overlayimg:"/flash/intro.swf",overlaydescr:" ",color01:"0xFFFFFF",color02:"0x00E1FF"}});$("welcome-box").style.background="none";}}});function cgvideoplayer_Finished(){setPlaylistStates(false);}function cgvideoplayer_Play(){return ;}function cgvideoplayer_Pause(){return ;}function cgvideoplayer_Next(){return ;}function cgvideoplayer_Previous(){return ;}function cgvideoplayer_Title(A){if($(A)){setPlaylistStates($(A));}}function cgvideoplayer_Location(A){return ;}function cgvideoplayerPlay(B,A){$("player")["VideoPlay"](B,A);}function setPlaylistStates(A){$$("body#home ul#leftNav li.level2").each(function(B){B.removeClass("selected");if(B.getElement("span.now-playing")){B.getElement("span.now-playing").dispose();}B.getElement("p").fade("show");if(B==A){nowPlaying=new Element("span",{html:"Now Playing: ","class":"now-playing"});B.grab(nowPlaying,"top");B.addClass("selected");B.getElement("p").fade("hide");}});}