function loadVideo(element, video_path)
{
	var height = $("#"+element).height();
	var width = $("#"+element).width();
  var flashvars = {video_path:video_path, flash_width:width, flash_height:height};
	var params = {allowFullScreen:true, bgcolor:"000000"};
	swfobject.embedSWF(site_root+"flash/video_player.swf", element, width, height, "9.0.0", "expressInstall.swf", flashvars, params);
}

function removeVideo(element)
{
	swfobject.removeSWF(element);
}

function play_film(container, video_player_path, the_video_path, width, height)
{
	if(!width) { 
		var width = 377;
	}
	if(!height) { 
		var height = 358;
	}
	var flashvars = { video_path: the_video_path, flash_width: width/*768*/ , flash_height: height };	
	var params = { allowFullScreen: true, bgcolor: "000000" };
	swfobject.embedSWF(video_player_path, container, width/*768*/, height, "9.0.0", "expressInstall.swf", flashvars, params);	
}

function swap_stage(core_media)
{
	$('[class^=core_stage_]').removeClass('selected');
	$('.core_stage_'+core_media).addClass('selected');
	
	// Set article preview position	
	var top = 17 + (82 * (core_media - 1));
	top = "-"+top+"px";
	$('.core_stage_'+core_media+' .article_preview').css('top', top)
}
