$(function() {
	
	// setup player without "internal" playlists
	$f("player", "/flash/flowplayer.commercial-3.1.5.swf", {
		clip: {
			
			// by default clip lasts 5 seconds
		//duration: 5,
			
			baseUrl: 'http://cdn.cloudfiles.mosso.com/c46482/',
		
		scaling: 'scale',
			
			autoPlay: true, 
        	autoBuffering: true,
		 	// track start event for this clip   
        	onBegin: function(clip) {   
            	pageTracker._trackEvent("Videos", "Play", window.location.pathname+":" + this.getClip().url);  
        	},   
          
        	// track pause event for this clip   
        	onPause: function(clip) {   
            	pageTracker._trackEvent("Videos", "Pause", window.location.pathname+":" + this.getClip().url);  
        	},   
          
        	// track stop event for this clip   
        	onStop: function(clip) {   
            	pageTracker._trackEvent("Videos", "Stop", window.location.pathname+":" + this.getClip().url);  
        	},   
          
        	// track finish event for this clip   
        	onFinish: function(clip) {   
			
			//hide the controlbar
				$f().getPlugin("play").hide();
            	pageTracker._trackEvent("Videos", "Finish", window.location.pathname+":" + this.getClip().url);  
				
				
			
				
        	},
	onCuepoint: function(clip, p) {
		if(p.name == 'FlashButton'){
		
			$("#FreeTrialButton a img").effect("bounce", { times:4 }, 500);

			
		}
		}
		
		
		},
		
		// show playlist buttons in controlbar
	plugins:  {
		controls: {
			//playlist: true,
			

		} 
	},	
		
		// product key from your account 
    		key: '#@2d63e3835e5fbde69db' 
	
		
		
		
	// use playlist plugin. again loop is true
	}).playlist("div.clips", {loop:true,playOnClick: true});
	
	 //$("div.playlist").scrollable({size:3}); 
	 
	 
	// setup scrolling for the playlist elements
	$("div.playlist").scrollable({
		items:'div.clips',
		vertical:true,
		next:'a.down',
		prev:'a.up'
	});

	
});

