
		
(function($){
	$(function(){
			$('#lb_container').click(closeVideo)
		}
	);
})(jQuery);

function closeVideo() {
	$('#lb_container')[0].style.display='none';
	$('#swfHolder')[0].style.display='none';
		$('#swfHolder').html('');
} 
var loadedVideo = false;
function openVideo() {
		var swfCode = 
			'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="760" height="400" name="flashvideo" id="flashvideo">' +
			'<param name="movie" value="/McGaw-VideoLibrary.swf">' +
			'<param name="quality" value="best">' +
			'<param name="wmode" value="transparent">' +
			'<param name="flashvars" value="xmlfile='+flashVars.xmlfile+'&amp;initialURL='+flashVars.initialURL+'"/>' +
			'<param name="allowscriptaccess" value="always">' +
			'<param name="scale" value="noscale">' +
			'<embed src="/McGaw-VideoLibrary.swf" flashvars="xmlfile='+flashVars.xmlfile+'&amp;initialURL='+flashVars.initialURL+'" wmode="transparent" quality="best" scale="noscale" allowscriptaccess="always" id="flashvideo" name="flashvideo" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="400"></embed>' +
			'</object>';
		$('#swfHolder').html(swfCode);
		if (document.documentElement && document.documentElement.scrollHeight) {
			pageHeight = document.documentElement.scrollHeight;
		} else if (document.body) {
			pageHeight = document.body.scrollHeight;
		}
		if (document.documentElement && document.documentElement.scrollWidth) {
			pageWidth = document.documentElement.scrollWidth;
		} else if (document.body) {
			pageWidth = document.body.scrollWidth;
		}
		var posMain = $('#main').position();
		
		var pageLeft = posMain.left
		$('#swfHolder')[0].style.left=pageLeft+"px";
		$('#lb_container')[0].style.height=pageHeight;
	loadedVideo = true;
	$('#lb_container')[0].style.display='';
	$('#swfHolder')[0].style.display='';
}

