$("a.player").flowplayer({
	src:'/wp/wp-content/uploads/video/flowplayer-3.1.3.swf',
	wmode:'transparent'},
	{ 'plugins': {
		'controls': {
			'height': 20,
			'backgroundColor': '#222222',
			'progressColor': '#444444',
			'bufferColor': '#333333',
			'buttonColor': '#444444',
			'buttonOverColor': '#666666',
			'play': true,
			'volume': true,
			'scrubber': true,
			'time': false,
			'autoHide': 'always',
			'hideDelay': 2500,
			'backgroundGradient': 'none',
			'progressGradient': 'none',
			'sliderGradient': 'none'
		}
	},
	clip: { 
        autoPlay: true,  
        autoBuffering: true,
        accelerated: true,
        scaling: 'fit'
    },
    canvas: { backgroundGradient: 'none' }
});

$("a.player#splash").flowplayer({src:'/wp/wp-content/uploads/video/flowplayer-3.1.3.swf',wmode:'transparent'},{
	'plugins': {
		'controls': {
			'height': 20,
			'backgroundColor': '#222222',
			'progressColor': '#444444',
			'bufferColor': '#333333',
			'buttonColor': '#444444',
			'buttonOverColor': '#666666',
			'play': true,
			'volume': true,
			'scrubber': true,
			'time': false,
			'autoHide': 'always',
			'hideDelay': 2500,
			'backgroundGradient': 'none',
			'progressGradient': 'none',
			'sliderGradient': 'none'
		}
	},
	clip: { 
        autoPlay: true,  
        autoBuffering: true,
        accelerated: true,
        scaling: 'fit',
        onBeforeFinish: function() { 
            window.location = $("#splashHeaderText a").attr('href');
        }
    },
    canvas: { backgroundGradient: 'none' }
});

$("a.videoOverlay[rel]").click(function() { $(this).each(function(i) { 
    $(this).overlay({ 
        expose: { 
        color: '#000', 
        loadSpeed: 250, 
        opacity: 0.9 
    },
    left: "center",
    top: '15%',
    closeOnClick: true, 
    api: true,
    onLoad: function() { this.getOverlay().find("a.player").flowplayer(0).load(); }, 
    onClose: function() { $f().unload(); }
	}).load();
	});
});

/*
$("a.videoOverlay").click(function() {
	$(this).overlay({
        expose: { 
	        color: '#000', 
	        loadSpeed: 250, 
	        opacity: 0.9 
	    },
	    left: "center",
	    top: '20%',
	    closeOnClick: true, 
	    api: true,
	    onLoad: function() { player.load(); }, 
        onClose: function() { player.unload(); }
	}).load();
});
*/
