
function infos() {
	if ($("#info-" + quelSection).length) {
    	$("#info-" + quelSection).css({ display:"block" });
  	}
}


$(document).ready(function(){

	//Show the right tab
	onglets();

	//Show the info div if there is one
	infos();

	//Hide all details div
	$(".content").hide();

	//Show the detail div of a package if the package variable is defined
	if(quelForfait != "") {
		$("#bloc-offre-" + quelForfait + " .content").css({ display:"block" });
	}

	var id=location.hash;
	if (id!='') {
		$(".content:visible").slideUp("slow");
		$(".active").removeClass("active");
		$(id).toggleClass("active");
		$(id).parent().parent().parent().children(".content").css({ display:"block" });
	}
	//Function on the details button
	$(".btdetailsreservation").click(function(){
		if($(this).is(".active")) {
           $(this).toggleClass("active");
           $(this).parent().parent().parent().children(".content").slideToggle();
           return false;
		} else {
			$(".content:visible").slideUp("slow"); // close all visible divs with the class of .content
			$(".active").removeClass("active"); // remove the class active from all bt's with the class of .on
			$(this).toggleClass("active");
			$(this).parent().parent().parent().children(".content").slideToggle();
			var id=$(this).attr('id');
			location.hash=id;
			xt_click(this,'C','2','PubHiv0910_'+id,'A');
			return false;
		}
	});

});
