

///////////////////////////////////////////////////////////////////////////////////
$(document).observe('dom:loaded', function(){  

	var player=$("player");
	
	flashembed(player,
		// flash setup
		{
			src: "/flash/flowplayer.swf",
			width: video_data.width,
			height: video_data.height,
			bgcolor:"#000000",
			version: [9,115], 

			// if a lower flash version is detected 
			onFail: function(flashVersion, flowplayerConfig) { 
				/// "this"  points to current flash parameters 
				this.version = null; 
				this.onFail = null; 
				flowplayerConfig.config.videoFile =  video_data.flv_file;

				// perform new flashembed() call with our new configuration 
				flashembed("player", this, flowplayerConfig); 
			}  			
			
		},

		// flowplayer setup:  http://flowplayer.org/player/configuration.html
		{config: {
				videoFile: video_data.file
		}}
	);

})

	


///////////////////////////////////////////////////////////////////////////////////
get_window_size = function(w) {
	var dims={};
        w = w ? w : window;
        
        dims.width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
        dims.height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
        
        return dims;
}

