/**
 * Menu fixé et transparent - http://www.webinventif.fr/barre-de-navigation-fixe-depliable-et-transparente/
 * 
 * Copyright (c) 2008 Julien Chauvin (webinventif.fr)
 * Licensed under the Creative Commons License:
 * http://creativecommons.org/licenses/by/3.0/
 *
 * Date: 2008-02-25
 */
function fixed_bottom(select,offS){
    return Number(-offS+document.documentElement.clientHeight-select.offsetHeight+document.documentElement.scrollTop+document.body.scrollTop)+'px';
}

$(document).ready(function(){

    $("#magicmenu").show();
    $("#magiccontent").hide();
    
    if($.browser.msie){
        if($.browser.version=="6.0"){
            $("#magicmaxi").hide();
            $("#magicbox").css('position','absolute');
        } else if($.browser.version=="7.0"){
            $("#magicbox").css('position','fixed');
            $("#magicmaxi").hide();
        }
    }else{
        $("#magicbox").css('position','fixed');
        $("#magicmaxi").hide();
    }

    /**
     * Fermer la boite quand on enleve la souris
     */
    $("#magiccontent").mouseout(function() {
        $("#magiccontent").slideUp("slow",function(){
            $("#magiccontent").hide();
            //$(this).show();
        });
        return false;
    });
    
    /**
     * Ouvrir la boite quand on passe la souris
     */
    $("#magicmenu").mouseover(function() {
        $("#magiccontent").slideUp("slow", function() {
            $("#magiccontent").show();
            //$(this).show();
        });
    });

    $("#magiccontent").fadeTo("fast",0.8);
});