jQuery(document).ready(function(){
	jQuery("#video").hide();
});

function video_abrir(code, titulo){
	jQuery("#fade").fadeIn(500, function(){
		var xp = Math.round((jQuery(window).width() - jQuery("#video").width()) / 2);
		var yp = Math.round((jQuery(window).height() - jQuery("#video").height()) / 2);
		jQuery("#video").load("YT.asp", {code: code, titulo: titulo}).css({left:xp,top:yp}).fadeIn(500);
	});
}

function video_cerrar(){
	jQuery('#fade, #video').fadeOut(500);
}
