$(document).ready(function(){
    $("li.onglet").css({
        '-moz-border-radius-topleft' : '4px',
        '-moz-border-radius-topright' : '4px',
        '-webkit-border-top-left-radius' : '4px',
        '-webkit-border-top-right-radius' : '4px',
        '-khtml-border-top-left-radius' : '4px',
        '-khtml-border-top-right-radius' : '4px'
    });
    $(".menusec").css({
        '-moz-border-radius' : '6px',
        '-webkit-border-radius' : '6px',
        '-khtml-border-radius' : '6px'
    });
    $(".menurepos").draggable({
        cursor: 'move',
        start: function(event,ui){
            $(this).removeClass(menuPos);
            $(this).removeAttr('style');
        },
        stop: function(event,ui){
            if (window.innerWidth) {
                var largeur=window.innerWidth;
                var longueur=window.innerHeight;
            } else {
                largeur=document.body.clientWidth;
                longueur=document.body.clientHeight;
            }
            $(this).removeAttr('style');
            menuPos=(ui.offset.top<longueur/2 ? 'menuh' : 'menub');
            menuPos+=(ui.offset.left<largeur/2 ? 'g' : 'd');
            $(this).addClass(menuPos);
            jQuery.post(prefixe+'ajax/parametre','menupos='+menuPos);
        }
    });
});
$(".menurepos").removeAttr('style');

