$(document).ready(function() {
	
	
});


function showWork (workId)
{
	for (var i=0;i<flashIds.length;i++) {
		var obj = swfobject.getObjectById(flashIds[i]);
		c(obj)
		if (obj)
			obj.jsDisable();
	}
	
	var flashVars = {
		workId:workId
	}

	var playerWidth = 636;
	var params = { 
		menu: "false", 
		allowScriptAccess:"sameDomain", 
		allowfullscreen :"true",
		wmode:"transparent"
		};
	var attributes = { 
		id: "player", 
		name: "player" 
		};
	swfobject.embedSWF("/flash/player.swf", "videoEmbed", "636", "500", "9.0.0","expressInstall.swf", flashVars, params, attributes);
	
	var left = (1000-playerWidth)/2;
	var top = 75;
	
	$("#videoContainer")
		.show()
		.css ({position:"absolute", top:top+"px", left:left+"px"})
		
	$("#videoUnderlay")
		.show()
		.css ({width:$("#work").width()-14, height:$("#work").height()-6, opacity:.90})
		.click (function (){
			$("#video")
				.html("<div id=\"videoEmbed\">xxx</div>");
			$("#videoContainer")
				.hide();
			$("#videoUnderlay")
				.hide();
		});
}

function closeVideo () 
{
	for (var i=0;i<flashIds.length;i++) {
		var obj = swfobject.getObjectById(flashIds[i]);
		if (obj)
			obj.jsEnable();
	}
	
	$("#video").html("<div id=\"videoEmbed\">xxx</div>");
	$("#videoContainer")
		.hide();
	$("#videoUnderlay")
		.hide();
}

function stopSound (mp3)
{
	for (var i=0;i<flashIds.length;i++) {
		c(flashIds[i])
		var obj = swfobject.getObjectById(flashIds[i]);
		if (obj) {
			obj.stopSound(mp3);
		}
	}
}




