/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
window.ENSAB=window.ENSAB||{};

$(document).ready(function(){
    ENSAB.larghezzaCompleta=$('#menu').width();
    ENSAB.numeroBottoni=$('#menu>ul>li.cssMenui').length;
    ENSAB.larghezaBottoniTotale=0;
    $('#menu>ul>li.cssMenui').removeAttr('style').each(function(){
        ENSAB.larghezaBottoniTotale+=$(this).outerWidth(true);
    });
    ENSAB.paddingBottoni=Math.floor((ENSAB.larghezzaCompleta-ENSAB.larghezaBottoniTotale)/(ENSAB.numeroBottoni-1));
    $('#menu>ul>li.cssMenui').each(function(index){
        if(index!=0){
            $(this).css('paddingLeft',ENSAB.paddingBottoni+'px');
        }
       
    });

});


