$(document).ready(function(){
	$('#next-month, #prev-month').live('click',function(){
		var next = $(this).attr('alt');
	
		//alert( next );
		$.post('inc/calendar.php',
			{mes: next},
			function( data ){
				$('#calendar').html(data); 
		});
	});
	
	
	$("a.externo").click(function( e ){
		e.preventDefault();
		window.open( $(this).attr('href') );
	});
	
	$("#nav li").hover(
		function(){
			$( this ).find('ul').slideDown();
		},
		function(){
			$( this ).find('ul').slideUp();
		}
	);
	$("#overlay-j").live('click',function(){
		$( this ).remove();
		$('#banner_flutuante').remove();
		$('body').css({overflow: 'auto'});
	});
});
function overlay_j( opac, body_height, color, zindex )
{
	var lay = document.createElement('div');
	$( lay ).attr( {id : 'overlay-j'} );
	$( lay ).css( {background: color} );
	$( lay ).css( {'z-index': zindex} );
	$('body').after( lay );
	
	$( lay ).css({height: body_height+'px', opacity: opac});
}
function createFloater( el, id, top, src )
{
	var floater = document.createElement( el );
	
	if( el=='img' )
		floater.src = src;
	floater.id = id;


	floater.style.position = 'absolute';

	floater.style.top = '50%';
	floater.style.left ='50%';
	floater.style.cursor ='pointer';
	floater.style.zIndex ='100';
	
	document.body.appendChild( floater );
}


