/** JQuery dossier**/

$(function() {
var listeFiches = $("#JQ_LISTEFICHES");
var motscles = $("span.JQ_MOTCLE");

$("#JQ_DOSSIERS").addClass("jq_Dossiers");
listeFiches.addClass("jq_ListeFiches");
motscles.addClass("jq_MotcleLien").click(afficheListeFiches);
$("div.JQ_FICHES").addClass("jq_FichesCachees").appendTo(listeFiches);

var actif = null;
var ancre = location.hash;
if ((ancre != null) && (ancre.length > 0)) {
	if (ancre.indexOf("#m_") == 0) {
		actif = $(ancre + "_l");
	}
}
if ((actif == null) || (actif.length == 0))  {
	actif = $(motscles[0]);
}
actif.click();

});

function afficheListeFiches() {
var id = this.id;
$("span.jq_MotcleActif").addClass("jq_MotcleLien").removeClass("jq_MotcleActif");
$(this).addClass("jq_MotcleActif").removeClass("jq_MotcleLien");
$("div.jq_FichesActives").addClass("jq_FichesCachees").removeClass("jq_FichesActives");
$("#" + id + "_fiches").addClass("jq_FichesActives").removeClass("jq_FichesCachees");
}

