$(document).ready( function () {
	//faq
	$("ul.reponse:not('.open_at_load')").hide();
	$("li.question span").each( function () {
		var TexteSpan = $(this).text();
		$(this).replaceWith('<a href="" title="Afficher la r&eacute;ponse">'+ TexteSpan + '</a>') ;
	} ) ;
	$("li.question > a").click( function () {
		if ($(this).next("ul.reponse:visible").length != 0) {
			$(this).next("ul.reponse").slideUp("normal", function () { $(this).parent().removeClass("open") } );
		}
		else {
			$("ul.reponse").slideUp("normal", function () { $(this).parent().removeClass("open") } );
			$(this).next("ul.reponse").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
		return false;
	});
	//faq
	$("ul.subMenu:not('.open_at_load')").hide();
	$("li.toggleSubMenu span").each( function () {
		var TexteSpan = $(this).text();
		$(this).replaceWith('<a href="" title="Afficher le sous-menu">' + TexteSpan + '</a>') ;
	} ) ;
	$("li.toggleSubMenu > a").click( function () {
		if ($(this).next("ul.subMenu:visible").length != 0) {
			$(this).next("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } );
		}
		else {
			$("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } );
			$(this).next("ul.subMenu").slideDown("normal", function () { $(this).parent().addClass("open") } );
		}
		return false;
	});

	$(".subMenu li > a").click( function () {
		if ($(this).attr("class")!="direct"){
			page=($(this).attr("href"));
			$.ajax({
				url: page,cache: false,success:function(html){
					afficher(html);
				},
				error:function(XMLHttpRequest, textStatus, errorThrows){
				}
			});
			$(".subMenu li > a").removeClass("select");
			return false;
		}else{
			return true;
		}
	});
	function afficher(donnees){
		$("#centre").empty();
		$("#centre").append(donnees);
		replacecufon();
	}
	function replacecufon(){
		Cufon.refresh(['.top-title']);
	}
} ) ;
// -->
