/**
 * Add the tabs functionality to the images, video section on the page
 */
(function ($) {
	
	var flvplayer_url= "http://www.platipus.nl/flvplayer/download/1.0/FLVPlayer.swf";
	var colorbox_padding = 30;
	$(document).ready(function(){
		$('.colorbox-flvplayer').colorbox({
			title: function(){				
				return $(this).attr('title');				
			},
			width: function(){
				var w = $(this).attr('width');
				w = parseInt(w);
				
				return w+colorbox_padding;
			},
			heigth: function(){
				return $(this).attr('height');
			},
			html: function(){
				var width = $(this).attr('width');
				var height = $(this).attr('height');				
				var url = $(this).attr('href');
				
				var output = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-44455'+
					'3540000" codebase="http://download.macromedia.com/pub/sho'+
					'ckwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'"'+
					'height="'+height+'" id="VideoPlayer" align="middle">'+
					'<param name="allowScriptAccess" value="*" /> <param name='+
					'"allowFullScreen" value="true" /> <param name="movie" '+
					'value="'+flvplayer_url+'?video='+url+'&autoplay=true" /> <param name"qual'+
					'ity" value="high" /><param name="bgcolor" value="#ffffff" '+
					'/> <embed src="'+flvplayer_url+'?video='+url+'&autoplay=true" quality="hig'+
					'h" bgcolor="#000000" width="'+width+'" height="'+height+'" name='+
					'"VideoPlayer" align="middle" allowScriptAccess="*"'+
					' allowFullScreen="true" type="application/x-shockwave-flash"'+
					' pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
					'</object>'
				return output;
			}
		});
	})
	
})(jQuery);


	;

