/*
 * Video overlay and launch behaviour
 */
$(function() {
	var videoHTML = new Array();
	videoHTML[0] = '<iframe src="http://content.bitsontherun.com/players/uWoqrquk-WeL1uEbe.html" width="480" height="510" frameborder="0" scrolling="auto"></iframe>';
	
	/**
	 * Open video behaviour
	 */
	$('#header a.video-open, #rh-col a.video-open').click(function() {
		$('body').append('<div id="video-overlay"><div id="video-container">'+videoHTML[0]+'<a href="#close" class="video-close">[x] Close</a></div></div>');
		return false;
	});
	
	/**
	 * Close video behaviour
	 */
	$('#video-container a.video-close').live('click', function() {
		$('#video-container').remove();
		$('#video-overlay').fadeOut('slow', function() {
			$(this).remove();
		});
		return false;
	});
});
