/*

//////////////////////////////////////////////////
	DEFAULT USAGE
//////////////////////////////////////////////////

	$("a[href$=flv]").unbind("click").bind("click", function(e){
		e.preventDefault();
		var href = $(this).attr('href');
		try {
			video.player.playVideo(href);
		} catch(e) {
			$('#video').empty().prepend(video.embed(href,video.size.small)).delay(50, function(){
				video.player = $(this).find('object').get(0);
			});
		}
	});

*/

var video = {

	size  : {
		small  : { swf: '/flash/small.swf',  w: 434, h: 373, id: 'video' },
		medium : { swf: '/flash/medium.swf', w: 658, h: 421, id: 'video' }
	},

	embed : function(flv, info, id) {
		if (id !== undefined) { info.id = id }
		return	'<object type="application/x-shockwave-flash"'
				+	'	data="' +info.swf+ '"'
				+	'	width="' +info.w+ '" height="' +info.h+ '"'
				+	'	id="' +info.id+ 'Player">'
				+	'	<param name="movie" value="' +info.swf+ '" />'
				+	'	<param name="allowScriptAccess" value="always" />'
				+	'	<param name="allowFullScreen" value="true" />'
				+	'	<param name="flashvars" value="flv=' +flv+ '" />'
				+	'	<param name="wmode" value="transparent" />'
				+	'	<p>You must download <a href="http://www.macromedia.com/go/getflashplayer">Adobe&rsquo;s Flash Plugin</a> to view this content.</p>'
				+	'</object>';
	},
	
	player : ''
	
};

$.fn.delay = function(time, callback){
    jQuery.fx.step.delay = function(){};
    return this.animate({delay:1}, time, callback);
};