	$(document).ready(function(){
		// reveal or conceal the continuation of the CEO's message
		$("#focus_sig a").click(function(ev){
			ev.preventDefault();
			$(this).fadeOut(300,function(){ $(this).siblings("a").fadeIn(300); });
			$("#focus_continued").slideToggle();
		});
		
		// zebra-stripe newsbreak
		$("#newsbreak li:odd").addClass("odd");

		// toggle between videos
		if (swfobject.hasFlashPlayerVersion("9.0.0")) {
			$("body").addClass("hasFlashPlayer");

			// find all the links
			$("#videos a.stayHere").click(function(ev){
				ev.preventDefault();

				var link = this;
				var parent = $(this).parent();
				var wrapper = $("#videoWrapper");
				
				// if the currently selected link was clicked, ignore it
				if ( parent.hasClass("current") ) { return; }
				
				// indicate which is the currently selected video, and de-select others
				parent.addClass("current").siblings().removeClass("current");
				
				// hide the current video
				wrapper.fadeOut(300,function(){

					var att = { data:link.href, width:"387", height:"332" };
					var par = {};
					var id = "videoTarget";
					// safely remove the previous video
					if( !$("#"+id).is("div") ) {
						swfobject.removeSWF(id);
						wrapper.append("<div id='"+id+"' />")
					}
					// add the newly selected video
					var swf = swfobject.createSWF(att, par, id);
					// avoid awkward flicker by setting a timeout
					setTimeout(function(){ wrapper.fadeIn(300);	},300);

				}); // close wrapper fadeout callback
			}); // close video click handler

			// click the first video link
			$("#videos a:eq(0)").click();

		} // close if hasFlashPlayer

	});
