/*
 *
 * Big Cartel theme for Flowplayer
 *
 */

var bigcartel = $.extend({
	player: {
	
		params: {
			src: 'http://cache0.bigcartel.com/videos/player/bigcartel.player.swf',
			wmode: 'opaque',
			version: [9, 115]
		},
				
		config: {
			key: '#$75bb91be0edd4439b11',
			
			clip: {
				provider: 'rtmp',
				scaling: 'fit',				
				onStart: function(clip) {
					try { pageTracker._trackEvent('Videos', 'Play', clip.url); } catch(e) {}
		        },
		        onPause: function(clip) { 
		            try { pageTracker._trackEvent('Videos', 'Pause', clip.url, parseInt(this.getTime())); } catch(e) {}
		        },
		        onStop: function(clip) { 
		            try { pageTracker._trackEvent('Videos', 'Stop', clip.url, parseInt(this.getTime())); } catch(e) {}
		        },
		        onFinish: function(clip) { 
		            try { pageTracker._trackEvent('Videos', 'Finish', clip.url); } catch(e) {}
		        }
			},
			
			onFullscreen: function() {
				try { pageTracker._trackEvent('Videos', 'Fullscreen On', this.getClip().url, parseInt(this.getTime())); } catch(e) {}
			},
			
			onFullscreenExit: function() {
				try { pageTracker._trackEvent('Videos', 'Fullscreen Off', this.getClip().url, parseInt(this.getTime())); } catch(e) {}
			},
			
			canvas: {
				backgroundColor:'#000000', 
				backgroundGradient: 'none'
			},
			
			play: {
				url: 'http://cache0.bigcartel.com/videos/player/bigcartel.player.play.png',
				width: 90,
				height: 90,
				replayLabel: null
			},
			
			plugins: {
				controls: {
					url: 'bigcartel.player.controls.swf',
					autoHide: 'always',
					hideDelay: 3000,

					all: false,
					play: true,
					scrubber: true,
					volume: false,
					mute: false,
					time: false,
					fullscreen: true,

					backgroundColor: '#222222',
					backgroundGradient: 'none',
					timeColor: '#333333',
					durationColor: '#333333',					
					progressColor: '#666666',
					progressGradient: 'medium',
					bufferColor: '#333333',
					bufferGradient: 'none',
					sliderColor: '#000000',
					sliderGradient: 'none',
					buttonColor: '#444444',
					buttonOverColor: '#8eac1a',
					tooltipColor: '#8eac1a'
				},
				
				rtmp: {
					url: 'bigcartel.player.rtmp.swf',
					netConnectionUrl: 'rtmp://streaming.bigcartel.com/cfx/st'
				}
			},
			
			contextMenu: [
				{'About Big Cartel...': function() {
					location.href = 'http://bigcartel.com';
				}}, 
		        'Big Cartel Video Player 1.0'
			]
		}		
	}
}, bigcartel || {});

