var video = "video/flowplayer-3.0.7.swf";
if (sub) {
	video = "../video/flowplayer-3.0.7.swf";
}
var MyPlayer = flowplayer("player", video, {
		 // our fake fullscreen action.  
	    onBeforeFullscreen: function()  { 
	        
			document.getElementById("logo").style.display = 'none';
	
	        // 1. launch overlay 
	        $("div.overlay").overlay().load(); 
	         
	        // 2. pause the player and make it hidden while overlay "grows" 
	        this.hide().pause(); 
	         
	        // 3. disable fullscreen button when overlayed 
	        this.getControls().enable({fullscreen:false}); 
	         
	        // 4. disable normal fullscreen action by returning false 
	        return false; 
	    }, 
	     
	    // when esc is pressed above the player, "fullscreen" is closed 
	    onKeyPress: function(key) { 
	        if (key == 27) { 
	            $("div.overlay").overlay().close();
	            document.getElementById("logo").style.display = 'block';
	        } 
	    }, 
	    canvas: {
	    	backgroundGradient: 'none'
	    },         
        plugins:  { 
	        controls: {             
	             
	            // custom colors 
	            bufferColor: '#333333', 
	            progressColor: '#ff9a48',             
	            buttonOverColor: '#999999', 
	             
	            // custom height 
	            height: 30, 
	             
	            // setup auto hide 
	            autoHide: 'always', 
	             
	            // a little more styling              
	            width: '98%',  
	            bottom: 5, 
	            left: '50%', 
	            borderRadius: 15 
	             
	        } 
	    } 
});