function abrir(direccion, pantallacompleta, herramientas, direcciones, estado, barramenu, barrascroll, cambiatamano, ancho, alto, izquierda, arriba, sustituir){
     var opciones = "fullscreen=" + pantallacompleta +
                 ",toolbar=" + herramientas +
                 ",location=" + direcciones +
                 ",status=" + estado +
                 ",menubar=" + barramenu +
                 ",scrollbars=" + barrascroll +
                 ",resizable=" + cambiatamano +
                 ",width=" + ancho +
                 ",height=" + alto +
                 ",left=" + izquierda +
                 ",top=" + arriba;
     var ventana = window.open(direccion,"venta",opciones,sustituir);

}

function loadLytebox(idsec, caption, rev) {
	var objLink = document.createElement('a');
	objLink.setAttribute('href', 'font/eventos/eventos-view.php?f='+idsec);
	objLink.setAttribute('rel','lyteframe');
	objLink.setAttribute('title',caption);
	objLink.setAttribute('rev',rev);
	myLytebox.start(objLink, false, true);
}

$(function(){

	// Datepicker
	$('#datepicker').datepicker({
		inline: true,
                onSelect: function(){
		            var fecha=$("#datepicker").datepicker('getDate'); 
		            loadLytebox(fecha, 'Descripcion Evento', 'width:600px; height:500px');
                }
	});
	
	//hover states on the static widgets
	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);
	
});

