// Video Player Initialization
var player = null;

function playerReady(thePlayer) {
	player = window.document[thePlayer.id];
}

function loadFile(file) {
	player.sendEvent('STOP');
	player.sendEvent('LOAD', file);
	player.sendEvent('PLAY', 'true');
}

function createPlayer() {
	var flashvars = {
	file: "1.mp4",
	image: 'img/homevideo/thumb1L.jpg',
	logo: 'img/homevideo/videologo.png',
	controlbar: 'none'
}

var params = {
	allowfullscreen: "true",
	allowscriptaccess: "always"
}

var attributes = {
	id: "player1",
	name: "player1"
}

swfobject.embedSWF("vid/player.swf", "placeholder1", "560", "352", "9.0.0", 'swf/expressInstall.swf', flashvars, params, attributes);
}

// Video Thumbnail Click Function
$(document).ready(function() {

createPlayer();

$('#video_container li').click(function () {
	$('#video_container .play').css('background-image', 'url(img/homevideo/thumbs_play.png)');
	$('#video_container .play').text('');
	$(this).children('.play').css('background-image', 'none');
	$(this).children('.play').text('Now Playing..');
});

});