$(document).ready(initDocumentNews);
				
	function initDocumentNews(){
		isScrollingDisabled="false";
		
		
		$("a").click(videoLinkListener);
		
		function videoLinkListener(event){
			var hrefString=$(event.target).attr("href");
			
			if(hrefString.split('__')[0]=="#flvPLayer" && hrefString.split('__').length==4){
				videoURL=hrefString.split("__")[1];
				videoWidth=hrefString.split("__")[2];
				videoHeight=hrefString.split("__")[3];
					
				if($("#lightboxBackground").length==0){	launchFLVPlayer();	}
			}
		}
		
		if(window.location.hash){
			var hrefString=window.location.hash;
			
			if(hrefString.split('__')[0]=="#flvPLayer" && hrefString.split('__').length==4){
				videoURL=hrefString.split("__")[1];
				videoWidth=hrefString.split("__")[2];
				videoHeight=hrefString.split("__")[3];
					
				if($("#lightboxBackground").length==0){	launchFLVPlayer();	}
			}
		}
			
		function launchFLVPlayer(){
			lightboxStartFunction=createFLVPlayerPage;
			
			lightboxEndFunction=removeFLVPlayerPage;
		
			launchLightboxBackground();
		}
		
		function createFLVPlayerPage(){
			$("body").append("<div id='flvPlayerLightBoxContainer'></div>");
			
			$("#flvPlayerLightBoxContainer").css("z-index", "10001");
			
			var windowWidth=Number(videoWidth)+44;
			var windowHeight=Number(videoHeight)+44;
			
			$("#flvPlayerLightBoxContainer").css("width", windowWidth+"px");
			$("#flvPlayerLightBoxContainer").css("height", windowHeight+"px");
			
			$("#flvPlayerLightBoxContainer").css("margin-left", "-"+(windowWidth/2)+"px");
			$("#flvPlayerLightBoxContainer").css("margin-top", "-"+(windowHeight/2)+"px");
			
			$.ajax(
				{
					type: "GET",
					url: "interface/php/flv_player.php",
					data: "flvURL="+videoURL+"&flvWidth="+videoWidth+"&flvHeight="+videoHeight+"&languageID=0",
					success: function(html){
						$("#flvPlayerLightBoxContainer").html(html);
					}
				}
			);
		}
		
		function removeFLVPlayerPage(){
			$("#flvPlayerLightBoxContainer").remove();
			removeLightboxBackground();
		}
		
	}
	
	
	
	