
	$.videoOpen = function(data){
		var videoHTML='<div id="video_layer"><div id="flash_layer"></div><div id="content_layer"><p id="video_Txt">';
		if($('#videobox').length == 0){
			$("body").append('<div id="videobox"></div>');
		}
		$("#videobox").css('opacity', "0.6");
		videoHTML += data.txt;
		videoHTML += '</p></div></div>';
		if($("#video_layer").length>=1)$("#video_layer").remove();
		$("body").append(videoHTML);
		$("#video_layer").css('left', $(window).width() / 2 - ($('#video_layer').width() / 2))
		$("#video_layer").css('top',getPageScroll()[1] + (getPageHeight() / 10));
                $.videoPlay(vURL+data.flv+".flv");
		$("#videobox").bind("click",function(){closeVideo()});
	};
	function closeVideo(){
		$(document).unbind("click");
		$('#videobox').remove();
		$("#video_layer").remove();
	}
	function getPageScroll() {
    var xScroll, yScroll;
    if (self.pageYOffset) {
      yScroll = self.pageYOffset;
      xScroll = self.pageXOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
      yScroll = document.documentElement.scrollTop;
      xScroll = document.documentElement.scrollLeft;
    } else if (document.body) {// all other Explorers
      yScroll = document.body.scrollTop;
      xScroll = document.body.scrollLeft;	
    }
    return new Array(xScroll,yScroll) 
  }

 $.videoPlay = function(flv,element_id){
	 	var element_id = element_id ? element_id : 'flash_layer';
		return flowplayer( element_id ,{src:"/tiger/video/player/flowplayer-3.1.5.swf", width:640, height:376}, {
			clip:{
		        autoPlay: true,
		        autoBuffering: true
		    } ,
		    playlist: [flv],
			canvas:{background: '#000000',backgroundGradient:[0,0,0,]},
		    plugins:{controls:
		        	{
			    		display:"block",
			    		opacity:0.8,
			        	timeColor:"#000000",
			        	sliderColor:"#464646",
			        	buttonOverColor:"#999999",
			        	bufferColor:"#464646",
			        	progressColor:"#000000",
			        	buttonColor:"#666666",
			        	durationColor:"#000000",
			        	backgroundColor:"#000000",
			        	backgroundGradient:"none"
		            }
		    }
		});
	};
  function getPageHeight() {
    var windowHeight
    if (self.innerHeight) {	// all except Explorer
      windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
      windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
      windowHeight = document.body.clientHeight;
    }	
    return windowHeight
  }
 
