/*
 * 200Wins.com FlowPlayer Video Parameters
 * Video: Richard Petty 200 Wins Video 2009	
 * Updated: 7/20/2009
 * 
 */


$(document).ready(function() {

	var links = document.getElementById("extra").getElementsByTagName("a");  
	// loop those links and alter their click behaviour 
	for (var i = 0; i < links.length; i++) { 
	    links[i].onclick = function() { 
	         
	        // play the clip specified in href- attribute with Flowplayer 
	        $f().play(this.getAttribute("href", 2)); 
	         
	        // by returning false normal link behaviour is skipped 
	        return false; 
	    } 
	}



	$('div#video-player').flowplayer('/swf/flowplayer.commercial-3.0.7.swf',  { 
	
	<!-- Licences: Needed to remove Flowplayer logo from player  -->
	<!--	key: '@cdca89d19e01f3d48b3',  	200wins.com Licence. Comment out when testing in Staging -->
		key: '#@cdca89d19e01f3d48b3',  		<!--staging.200wins.com Licence. Comment out when going Live -->
	
		clip:{ 
			url: '/swf/video_200wins1.flv', 
			autoPlay: true,
			autoBuffering: true			  
		},										

	
		canvas: {backgroundColor: "#4e53bc"},
		
		plugins: {
		   controls: {
		      volumeSliderColor: '#000000',
		      bufferGradient: 'none',
		      backgroundGradient: [0.6,0.3,0,0,0],
		      sliderColor: '#3434ea',
		      progressGradient: 'medium',
		      bufferColor: '#4e53bc',
		      tooltipTextColor: '#ffffff',
		      durationColor: '#000ad6',
		      progressColor: '#030649',
		      backgroundColor: '#000000',
		      buttonOverColor: '#4248cd',
		      borderRadius: '25',
		      timeBgColor: '#555555',
		      sliderGradient: 'none',
		      tooltipColor: '#5F747C',
		      volumeSliderGradient: 'none',
		      timeColor: '#010bd5',
		      buttonColor: '#7c7d8d',
		      height: 24,
		      opacity: 1.0
		   }
		}
							 
	}); 

	
});
