$(document).ready(function(){	
		$('#anniversaire').datepicker({
			yearRange: "-80:+0", // this is the option you're looking for
			changeMonth: true,
			changeYear: true,
			firstDay: 1 
		});
		
		$('#debut').datepicker({
			yearRange: "+0:+5", // this is the option you're looking for
			changeMonth: true,
			changeYear: true,
			firstDay: 1 
		});
		
		$('#fin').datepicker({
			yearRange: "+0:+5", // this is the option you're looking for
			changeMonth: true,
			changeYear: true,
			firstDay: 1 
		});
		
		$('#date_tache').datepicker({
			yearRange: "-1:+1", // this is the option you're looking for
			changeMonth: true,
			changeYear: true,
			firstDay: 1 
		});
		
		$("#liste_clients_packs").accordion({
			autoHeight: false,
			active : false
		});
		
		$("#liste_clients_heberg").accordion({
			autoHeight: false,
			active : false
		});
		

});
	
function supprimer_client(lien, id, url_site) {
	var id = id ;
	var client = lien.parent().parent();
	//alert(id);
	if (confirm("Etes vous sûr(e) de vouloir supprimer définitivement ce client ?"))
	{
		$.get(url_site+"/ajax/supprimer_client.php", {id: id},
		function(data) {
			client.fadeOut('slow');
		}
	)
	}
	else
	{
		
	}		
}

function supprimer_pack(lien, id, url_site) {
	var id = id ;
	var pack = lien.parent().parent();
	//alert(id);
	if (confirm("Etes vous sûr(e) de vouloir supprimer définitivement ce pack d'heures ?"))
	{
		$.get(url_site+"/ajax/supprimer_pack.php", {id: id},
		function(data) {
			pack.fadeOut('slow');
		}
	)
	}
	else
	{
		
	}		
}

function supprimer_heberg(lien, id, url_site) {
	var id = id ;
	var heberg = lien.parent().parent();
	//alert(id);
	if (confirm("Etes vous sûr(e) de vouloir supprimer définitivement cet élément ?"))
	{
		$.get(url_site+"/ajax/supprimer_heberg.php", {id: id},
		function(data) {
			heberg.fadeOut('slow');
		}
	)
	}
	else
	{
		
	}		
}

function supprimer_tache(lien, id, id_pack, duree, url_site) {
	var id = id ;
	var id_pack = id_pack ;
	var duree = duree ;
	var tache = lien.parent().parent();
	//alert(id);
	if (confirm("Etes vous sûr(e) de vouloir supprimer définitivement cette tâche ?"))
	{
		$.get(url_site+"/ajax/supprimer_tache.php", {id: id, id_pack: id_pack, duree: duree},
		function(data) {
			tache.fadeOut('slow');
		}
	)
	}
	else
	{
		
	}		
}