function init_onglet_une_page(id_du_ul, id_du_contenant){
	// fontion pour la sous-nav
	$("#"+id_du_ul).children("li").each(function(){
		$this = $(this);
		linkto = $($this).children("a").attr("href");
		$($this).children("a").addClass("l-"+linkto.substring(1));
		$(linkto).hide();
		$($this).children("a").click(function(){
			$("#"+id_du_ul).children("li").removeClass("active");
			$(this).parent().addClass("active");
			linkto = $(this).attr("href");
			$("#"+id_du_contenant+">div").hide();
			$(linkto).show();
			return false;
		});
	});
	
	// ouvrir onglet par default
	doc_loc = document.location;
	doc_loc = doc_loc.toString();
	tab_link = doc_loc.split("#");
	if(tab_link.length>1 && tab_link[1].length > 1){
		$("#"+id_du_ul + " a.l-"+tab_link[1]).trigger("click");
	}
	
	// lien vers les onglets dans la page
	$("#"+id_du_contenant+" a.l-lien-onglet").each(function(){
		$this = $(this);
		link_split = $($this).attr("href").split("#");
		if(doc_loc.indexOf(link_split[0]) != -1){
				$($this).click(function(){
					link_split = $(this).attr("href").split("#");
					$("#"+id_du_ul + " a.l-"+link_split[1]).trigger("click");
				})
		}
	})
	
}
$(function(){init_onglet_une_page("l-sous-nav","l-sous-contenant")})
