var player; $(document).ready(function() { if( $("#video-player").length != 0 ) { // we are in the middle of a service, so show the video player = $f("video-player", swf_config, fp_config).load(); // player events player.onFullscreen( function() { pageTracker._trackEvent("Player", "Fullscreen"); } ); // clip events player.onBufferEmpty( function(clip) { pageTracker._trackEvent(clip.serviceTime, "Buffer Empty"); } ); player.onFinish( showGreeting ); player.onFinish( function(clip) { pageTracker._trackEvent(clip.serviceTime, "Finish"); } ); player.onStart( function(clip) { pageTracker._trackEvent(clip.serviceTime, "Play"); } ); player.onStop( function(clip) { pageTracker._trackEvent(clip.serviceTime, "Stop"); } ); $("#lobby").show("slow"); } if( $("#countdown").length != 0 ) { // display our countdown $("#countdown").countdown( { until: 207, description: "until the next service", alwaysExpire: true, onExpiry: expired, onTick: tick } ); } registerClickEvents(); }); function showGreeting() { $("#video-player").hide("fast"); $("#closing").slideDown("slow"); $(".title").hide(); $(".meta").hide(); } function registerClickEvents() { $(".pop-connection-card").click( OpenConnectionCard ); $(".pop-lobby").click( OpenInternetLobby ); $(".pop-help").click( OpenHelp ); $(".pop-anonymous").click( OpenAnonymous ); $(".pop-give").click( function() { javascript:pageTracker._trackPageview('/internet/give/'); }); $("#toggle").click( function() { $("#wrapper-note").toggle(); }); $("#print").click( function () { window.print(); }); } function expired() { $("#countdown").countdown("destroy"); $("#lobby").hide("fast"); $("#live").show("slow"); } function tick(current) { if(0) { // we are currently live, so we don't want to show the lobby button return; } if(current[0] == 0 && current[1] == 0 && current[2] == 0 && current[3] == 0 && current[4] == 0 && current[5] < 30) { $("#lobby").show("slow"); } } function OpenConnectionCard() { window.open( "http://www.celebration.org/internet/connection_card/", "connection_card", "height=800, width=480, scrollbars=1, resizable=1" ); return false; } function OpenAnonymous() { window.open( "http://www.celebration.org/internet/anonymous/", "anonymous", "height=550, width=480" ); return false; } function OpenInternetLobby() { window.open( "http://www.celebration.org/internet/chat/", "chat", "height=600, width=800" ); return false; } function OpenHelp() { window.open( "http://celebration.campfirenow.com/e76e1", "help", "height=640, width=960, scrollbars=1, resizable=1" ); return false; }