/*
 * CloroxCSR.com FlowPlayer Video Parameters
 * Video: CEO Don Knauss	
 * Updated: 01/13/2010
 * 
 */

$(document).ready(function(){

	$('a#video-player1').flowplayer('/swf/flowplayer.commercial-3.0.7.swf',  { 
	
	<!-- Licences: Needed to remove Flowplayer logo from player  -->
		 //<!-- key: '@e48cf876a95fa62cb3f',--> 	<!-- cloroxcsr.com Licence. Comment out when testing in Staging -->
		key: '#@e48cf876a95fa62cb3f', 		//<!--staging.cloroxcsr.com Licence. Comment out when going Live -->
			
		clip:{ 
			autoPlay: true  
		},											
	
		canvas: {backgroundColor: '#000000'},
					
		plugins: {
			controls: {
				timeColor: '#f28b07',
				buttonOverColor: '#728B94',
				bufferColor: '#6c9cbc',
				backgroundColor: '#0162da',
				buttonColor: '#0c50ac',
				sliderColor: '#2d378b',
				durationColor: '#f98e06',
				borderRadius: '23',
				progressGradient: 'medium',
				backgroundGradient: [0.6,0.3,0,0,0],
				sliderGradient: 'none',
				bufferGradient: 'none',
				progressColor: '#0b1484',
				fullscreen: false,
				opacity:1.0
			}
		}		 			 
	});

	$('#ugPopup1').overlay({
		target: 'div#video1',
	
		// IE6/7 fix: in order to make video play and then stop playing inside
		// of an overlay in IE, we need to manually play & stop the flowplayer
		// using the onLoad & onClose handlers

		onLoad: function(content) {
			if (jQuery.browser.msie)
				$f('video-player1').play();
		},
		
		onClose: function(content) {
			if (jQuery.browser.msie)
				$f('video-player1').stop();
		}
	});
	
});
	