<!--
$(function() {
	$f('player', 'http://3dup.com/videos/plc.swf', {
		onStart: function() {
			$('div.overlay').overlay({effect: 'apple'}).load();
			var slc = this.getControls();
			slc.enable({all: true, fullscreen: false})
			slc.css({
					backgroundColor: '#222222',
					buttonColor: '#515455',
					timeBgColor: '#555555',
					timeColor: '#D3D3D3',
					durationColor: '#FFFFFF',
					progressColor: '#2D2E2F',
					bufferColor:'#3F3F3F',
					volumeSliderColor: '#000000',
					sliderColor: '#000000',
					backgroundGradient: [0.6,0.3,0,0,0],
					bufferGradient: 'high',
					sliderGradient: 'medium',	
					progressGradient: 'low',
					volumeSliderGradient: 'medium',
					buttonOverColor: '#6E6E6E',
					tooltipColor: '#515455',
					tooltipTextColor: '#FFFFFF',
					height: '24'
				}
			);
			return false;
		},

		onBeforeFullscreen: function() {
			$('div.overlay').overlay({effect: 'apple'}).load();
			this.hide().pause();
			var slc = this.getControls();
			slc.enable({all: true, fullscreen: false});
			slc.css({
					backgroundColor: '#222222',
					buttonColor: '#515455',
					timeBgColor: '#555555',
					timeColor: '#D3D3D3',
					durationColor: '#FFFFFF',
					progressColor: '#2D2E2F',
					bufferColor:'#3F3F3F',
					volumeSliderColor: '#000000',
					sliderColor: '#000000',
					backgroundGradient: [0.6,0.3,0,0,0],
					bufferGradient: 'high',
					sliderGradient: 'medium',	
					progressGradient: 'low',
					volumeSliderGradient: 'medium',
					buttonOverColor: '#6E6E6E',
					tooltipColor: '#515455',
					tooltipTextColor: '#FFFFFF',
					height: '24'
				}
			);
			return false;
		},

		onKeyPress: function(key) {
			if (key == 27) {
				$('div.overlay').overlay().close();
				this.getControls().enable({all: true, fullscreen:true});
			}
		},

		key: '#$976a199ef2d7d1efa50',

		clip: {
			autoPlay: false,
			autoBuffering: true,
			accelerated: true
		},
		canvas: {
			backgroundColor: '#000000',
			backgroundGradient: 'none'
		},
		plugins:  {
			controls: {
				backgroundColor:'#CADFDC',
				buttonColor:'#A2B2AF',
				timeBgColor:'#A2B2AF',
				timeColor:'#FFFFFF',
				durationColor:'#D6FEFB',
				progressColor:'#A2B2AF',
				bufferColor:'#B5C7C4',
				volumeSliderColor:'#A2B2AF',
				sliderColor:'#A2B2AF',
				backgroundGradient:'high',
				bufferGradient:'high',
				sliderGradient:'medium',
				progressGradient:'low',
				volumeSliderGradient:'medium',
				buttonOverColor:'#99A7A4',
				tooltipColor:'#708880',
				height: '24'
			}
		}
	});

	$('div.overlay').overlay({
		effect: 'apple',
		expose: '#000000',

		onLoad: function() {
			if (parent.document.getElementById('splash') != null) {
				parent.document.getElementById('splash').style.background = 'none';
			}
			if (parent.document.getElementById('player') != null) {
				parent.document.getElementById('player').style.background = 'none';
			}

			var embed = $('#player :first');
			var el = this.getContent();
			var height = el.height();

			embed.css({
				width:parseInt(el.width()) - 80,
				height:parseInt(height) - 80,
				left:parseInt(el.css('left')) + 40,
				top:parseInt(el.css('top')) + 40
			});

			$f().resume();
		},

		onClose: function() {
			$('#player :first').css({
				top: null,
				left: null,
				width: null,
				height: null
			});
			$f().getControls().enable({all: true, fullscreen: true}).css({
					backgroundColor:'#CADFDC',
					buttonColor:'#A2B2AF',
					timeBgColor:'#A2B2AF',
					timeColor:'#FFFFFF',
					durationColor:'#D6FEFB',
					progressColor:'#A2B2AF',
					bufferColor:'#B5C7C4',
					volumeSliderColor:'#A2B2AF',
					sliderColor:'#A2B2AF',
					backgroundGradient:'high',
					bufferGradient:'high',
					sliderGradient:'medium',
					progressGradient:'low',
					volumeSliderGradient:'medium',
					buttonOverColor:'#99A7A4',
					tooltipColor:'#708880',
					height: '24'
				}
			);
		}
	});
});
//-->

