$(function() {

	$("#HorizPlayList").scrollable({items:'div.Clips', size:3, clickable:false});

	$("a.Item").overlay({
		speed: 'slow',
		finish:  { 
     	   top: 10 
    	},
    	close: 'none',
		// setup exposing (optional operation);
		onBeforeLoad: function() {
			this.getBackgroundImage().expose({api: true}).load();	
		},				
		
		onLoad: function(content) {
			// find the player contained inside this overlay and load it
			this.getContent().find("a.player").flowplayer(0).load();
		},
		
		onClose: function(content) {
			$f().unload();
			
			// close exposing
			this.getBackgroundImage().expose().close();
		}
	});				
	
	// install flowplayers
	$("a.player").flowplayer("http://www.controlanything.com/Flash/flowplayer.commercial-3.1.1.swf", {
		key: '@cae6090f73625b6c70e',
		plugins: {
			controls: {
				autoHide: 'always',
				width: '98%',
				bottom: 3,
				left: '50%',
				borderRadius: 10,
				}
			}
		}); 
});
