$(document).ready(function() {

	// Footer Note management
    var divFootNote = $("div").filter("#footnote");
    divFootNote.hide();
    var listNote = new Array(0);
    var annotNb = 1;
    var currentNb = 1;
    var titleCont;
    var existPos;
    $("div#siteContainer a.footnote").each(function (i) {
        divFootNote.show();
        titleCont = jQuery.trim($(this).attr("title"));
        // Test if already exist
        existPos = jQuery.inArray(titleCont, listNote);
        if (existPos == -1) {
            listNote.push(titleCont);
            currentNb = annotNb;
            var noteCnt = "<span>(" + currentNb + ")</span><p>" + titleCont + "</p>";
            divFootNote.append(noteCnt);
            annotNb = annotNb + 1;
        } else {
            currentNb = existPos+1;
        }
        $(this).append("<span class='exposant'>" + currentNb + "</span>");
    });

	$('#siteContainer a.footnote').brTip({title: 'Annotation', opacity: 1, fadeIn: 'fast', fadeOut: 'fast'});

	// Search example
	$('#searchBox #query').example('Mot de recherche');

    // Table alternate color
	$('#contentBlock table[@class !="mgnlControlBarSmall"] tr:odd').addClass('altRow');


});