$(document).ready(function() {
	
	$("#video1").click(function() {
		$(".cadre").append("<div class='video'></div>");
		$(".video").dialog({
			bgiframe: false,
			autoOpen: false,
			modal: true,
			show: 'slide',
			hide: 'slide',
			width: 500,
			height: 430,
			title: "Vid&eacute;o",
			open: function() {
				$(".video").append("<a href='#' style='width:425px;height:350px;' id='player'></a>");
				flowplayer("player", "javascript/flowplayer-3.1.5.swf", {
					clip:  {
						url: 'video/presentation.flv',					
	        			autoPlay: true, 
	        			autoBuffering: true,
	        			bufferLength : 3
					},
				});
			},
			close: function() {
				$(".video").remove();
			}
		});
		$(".video").dialog("open");
	});
	
	$("#video2").click(function() {
		$(".cadre").append("<div class='video'></div>");
		$(".video").dialog({
			bgiframe: false,
			autoOpen: false,
			modal: true,
			show: 'slide',
			hide: 'slide',
			width: 500,
			height: 430,
			title: "Vid&eacute;o",
			open: function() {
				$(".video").append("<a href='#' style='width:425px;height:350px;' id='player'></a>");
				flowplayer("player", "javascript/flowplayer-3.1.5.swf", {
					clip:  {
						url: 'video/coike-2010.flv',
	        			autoPlay: true, 
	        			autoBuffering: true,
	        			bufferLength : 3
					}
				});
			},
			close: function() {
				$(".video").remove();
			}
		});
		$(".video").dialog("open");
	});
});
