/* Video Handler and Loader
 * Night-time Renewal 
 * Developed by: Christopher Short <chris@bluepenguinweb.com>
 */
 
 var ntrVideo = {
	player: '/media/videogallery/FlowPlayerDark.swf',
	auto: 'true',
	init: function() {
		$(".video_info a").click(function() {
										  ntrVideo.loadVideo(this);
										  return false;
										  });
	},
	loadVideo: function(element) {
		var so = new SWFObject(ntrVideo.player, "slideshow", "400px", "330px", "8");
		so.addParam("wmode", "transparent");
		so.addParam("allowFullScreen", "true");
		var config = "{showStopButton: false, showMenu: false, showScrubber: true, showVolumeSlider: true, showMuteVolumeButton: true, showFullScreenButton: false, controlBarBackgroundColor: 0x012a4e, autoplay: "+ntrVideo.auto+", videoFile: '"+element.href+"'}";
		so.addVariable("config", config);
		so.write("flashcontent");
		var title = "<span id=\"play_info\">Now Playing: "+element.title+"</span>";
		$("#play_info").replaceWith(title);
	}
 }