$(document).ready(function() {
	$("#pl").scrollable({items:'div.entries',mousewheel: true}).navigator();
});

$(function() {
	$("a.overlay[rel]").overlay({
		onLoad: function(content) {
			this.getOverlay().find("a.player").flowplayer(0).load();
		},
		onClose: function(content) {
			$f().unload();
		}
	});

	// install flowplayers
	
	// this is for a the single overlays
	$f("a.player", "/images/global/swf/flowplayer/flowplayer.commercial-3.2.7.swf", {
		key: fpKey,
		clip: { autoPlay: true, scaling: 'fit' },
		play: { label: 'Play', replayLabel: 'Play again', fadeSpeed: 3000 },
		canvas: { backgroundColor: '#000000' },
		plugins: {
			controls: {
				url: '/images/global/swf/flowplayer/plugins/flowplayer.controls-3.2.5.swf', 
	     		height: 21,
	    		bottom: 0,
				opacity: 0.95,
				timeColor: '#ffffff',
				durationColor: '#ffffff',			
				progressColor: '#b3b3b3',
				progressGradient: [0.2, 0.05],			
				bufferColor: '#6a6a6a',
				bufferGradient: [0.05, 0.2],
				sliderColor: '#717171',
				sliderGradient: [0.2, 0.05],
				buttonColor: '#666666',
				buttonOverColor: '#ffffff',
				timeBgColor: 'transparent',
				backgroundColor: '#000000',
				backgroundGradient: [0.2, 0.05],
				time: true,
				mute: false,
				volume: false,
				autoHide: 'always',
				hideDelay: 4000,
				tooltipColor: '#000000', 
	            tooltipTextColor: '#ffffff'
			}
		}
	});
});
