function setSubTitles(id)//set all titles for the selected video
{
	selVideoTitle = $("#video" + id + "Caption");
	//alert(selVideoTitle.html());
	
	$("#videoTitle").html( selVideoTitle.html() );
	$("#videoSubTitle").html( $("#video" + id + "SubTitle").html() + "&nbsp;" );

	$('.col p').css("color", "#000000");
	selVideoTitle.css("color", "#CC3300");
}

function setupMainVideo() //onload - it will take the video marked as "main" and put all params in place 
{
	playURL = $('#main a')[0].href;
	$("#videoTopLeft").html("<div id='videoContainer'><a href=''><img src='/media/EFR001/images/static/ourcompany/inthemedia/video_main.jpg' /></a></div>");
	$('#videoContainer a')[0].href = playURL;
	id = playURL.substr(24, playURL.indexOf(',') - 24);
	
	setSubTitles(id);
}

function playVideoSwf(id, videoURL)
{
	var flashvars = {};
	flashvars.flvfile = videoURL;
	var params = {};
	params.wmode = 'opaque';
	params.menu = 'false';
	params.bgcolor = '#000000';
	var attributes = {};
	attributes.id = 'videoContainer';
	swfobject.embedSWF('/media/EFR001/images/static/ourcompany/js/videoPlayer.swf', 'videoContainer', '720', '405', '8', '/media/EFR001/images/static/ourcompany/js/expressInstall.swf', flashvars, params, attributes);

	setSubTitles(id);
}

function onVideoEnd()
{
	setupMainVideo();
}

