// Flowplayer Embed

flowplayer("player", "/flash/flowplayer.commercial-3.0.7.swf", { 
	key: '@324433ceab0d64f6a3f',
    	clip: {
        	autoPlay: false,
            	autoBuffering: true
         },
         
		plugins:  { 
            controls:  {  
            	bufferColor: '#d52d2a',
            	progressColor: '#9b1917',
            	timeColor: '#cccccc'
        	}
		},         
			play: { 
            	url: '/flash/play_btn.png', 
            	width: 77, 
            	height: 77 
		}            
});

// get all links that are inside div#clips
var links = document.getElementById("clips").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;
	}
}

