/*======================================================================
	MIGHTY LEAF: Flash Video Player Configuration
	--------------------------------------------------------------------
	Source: http://activeden.net/item/video-player-v2/34501
	--------------------------------------------------------------------
	Company: WebLinc    |    Author: Jon Aldinger    |    Date: 02.02.10
	--------------------------------------------------------------------
	Customizations: 
	* Created this config file to allow for caching and easier maintenance
	* Placed all swfObject variables in a closure to avoid pollution of the window object 
	* Established public options to allow control from the admin
----------------------------------------------------------------------*/
(function() {
	var playerPath = '/resources/mightyleaf/flash/video-player.swf';
	
	var flashvars = {};
	/*---------------------------------
		PATHS
	---------------------------------*/
	flashvars.imagePath = videoPlayerPublicOptions.previewImagePath;
	flashvars.videoPath = videoPlayerPublicOptions.videoPath;
	flashvars.title = videoPlayerPublicOptions.title;
	flashvars.description = videoPlayerPublicOptions.description;

	/*---------------------------------
		CONTROLS
	---------------------------------*/
	flashvars.viewInfoButton = 'true';
	flashvars.viewFullscreenButton = 'true';
	flashvars.viewScaleButton = 'false';
	flashvars.viewVolumeControls = 'true';
	flashvars.viewTime = 'true';
	flashvars.viewBigPlayButton = 'true';
	flashvars.viewRightClickMenu = 'true';

	/*---------------------------------
		MOUSE / KEYBOARD FUNCTIONS
	---------------------------------*/
	flashvars.mouseHide = 'true';
	flashvars.mouseHideTime = '3';		// seconds, must be a whole number
	flashvars.doubleClick = 'false';	// toggle view size
	flashvars.oneClick = 'true';		// click the video for play/pause
	flashvars.spaceKey = 'true';		// play/pause on SPACE key

	/*---------------------------------
		VIDEO FUNCTIONS
	---------------------------------*/
	flashvars.videoLoop = 'false';
	flashvars.videoAutoPlay = videoPlayerPublicOptions.autoPlay;
	flashvars.videoBufferTime = '0.1';	// seconds	
	flashvars.tlInterval = '100000';
	flashvars.soundVolume = '0.8';		// 0 = Min, 1 = Max
	flashvars.fullSizeView = '2';		// start size - 1: actual size, 2: fill player but preserve aspect ratio, 3: stretch to fill entire player

	/*---------------------------------
		APPEARANCE
	---------------------------------*/
	flashvars.spacing = '10';			// between controls
	flashvars.controlHeight = '25';
	flashvars.volumeLengthW =  '50';

	// controls background
	flashvars.color1 = '0xf8f7f5';
	flashvars.color2 = '0xeeeae7';
	flashvars.alpha1 = '1';
	flashvars.alpha2 = '1';

	// controls border
	flashvars.borderColor = '0xe7e4d8';
	flashvars.borderAlpha = '1';

	// time view background
	flashvars.timeColor1 = '0x333333';
	flashvars.timeColor2 = '0x111111';
	flashvars.timeAlpha1 = '1';
	flashvars.timeAlpha2 = '1';

	// time view text color
	flashvars.timeTextColor1 = '0xffffff';
	flashvars.timeTextColor2 = '0x888888';

	// scrubber height
	flashvars.scrubberHeight = '4';

	// scrubber background
	flashvars.scrubberColor1 = '0x333333';
	flashvars.scrubberAlpha1 = '1';

	// scrubber fill
	flashvars.scrubberColor2 = '0x92bb6c';
	flashvars.scrubberAlpha2 = '1';

	// scrubber glow filter
	flashvars.filterColor = '0xe7ffd0';
	flashvars.filterAlpha = '0.5';

	// control buttons color
	flashvars.buttonColor = '0x333333';

	// title color
	flashvars.titleColor = '0x92bb6c';

	// description color
	flashvars.descriptionColor = '0xdcdcdc';

	// info background
	flashvars.infoBackgroundColor = '0x000000';
	flashvars.infoBackgroundAlpha = '0.75';

	/*---------------------------------
		PARAMS
	---------------------------------*/
	var params = {
		wmode: 'transparent',
		scale: 'noscale',
		allowfullscreen: 'true',
		salign: 'tl',
		bgcolor: '000000'
	};

	/*---------------------------------
		ATTRIBUTES
	---------------------------------*/
	var attributes = {};

	/*---------------------------------
		INIT
	---------------------------------*/
	swfobject.embedSWF(playerPath, videoPlayerPublicOptions.divId, '100%', videoPlayerPublicOptions.playerHeight, '9.0.0', false, flashvars, params, attributes);
})();
