function verif(id)
{
    if(confirm('Vous confirmez ?')) { $('form#suppr'+id).submit(); } //si ca return TRUE c'est qu'on a choisit OK
}


$(function() 
{
	$('.light').click(function() {
		var theId = $(this).attr("id");
		$('#k'+theId).lightbox_me({ centered: true }); return false;
	});
	
	$("#formulaire_add a").livequery('click', function()
	{ $('#formulaire_add_hide').show();  return false;  });
	
	$('a.close_formulaire_add').livequery('click', function()
	{ $('#formulaire_add_hide').hide(); return false; });
	
	$("td.event_exist").livequery('click', function()
	{
		var theDay = $(this).attr("id"); $('table.agenda td').removeClass('focus'); $(this).parent().parent().find('td#'+theDay).addClass('focus');
		$('#test_events div').hide(); $('#test_events div.'+theDay).show();  return false; 
	});

	$("p.event_seemore a").livequery('click', function()
	{ $(this).parent().parent().find('.event_description').slideToggle();  return false;  });

	$("tr.name_mois a").livequery('click', function()
	{
		var idMonth = $(this).attr("id"); var Split = idMonth.split('_'); var monthTo = Split[1]; var yearTo = Split[2]; var userAgenda = Split[3];
		var Conteneur = $('.thismonth:first');
		var existMonth = $('div#'+idMonth).length; /* alert(existMonth); */
		if (existMonth == 1) { $('.thismonth').hide();  $('div#'+idMonth).show(); }
		else { $.get("http://www.livraddict.com/agenda/agenda_small.php", {search_mois: 1, mois: monthTo, annee: yearTo, user: userAgenda}, 
			function success(data){ $('.thismonth').hide();   Conteneur.after(data); $('#'+idMonth).show(); return false;  });  } return false; 
	});

	$('#choix_date').datepicker($.datepicker.regional['fr']);
	
}); // fin ready
