GRM=window.GRM||{};

$(document).ready(function(){
    //tolgo il rel sulle immagini per non aver problemi con rel
    $('.antImg a').each(function(){
        $(this).attr('rel', 'gallery');
    });
    if($.fn.fancybox){
        $('.antImg a').fancybox({
            titleShow:false
        });
    }
    //correzione tasti fissi
    $('#fissi a').last().css({
        'borderRight':'none',
        'marginRight':'0px',
        'paddingRight':'0px'
    });

    //gestione menu
    GRM.larghezzaDivisoria=1;
    GRM.larghezzaCompleta=$('#menu').width();
    GRM.numeroBottoni=$('.btnMenu').length;
    GRM.larghezaBottoniTotale=0;
    $('.btnMenu').each(function(){
        GRM.larghezaBottoniTotale+=$(this).outerWidth(true);
    });
    GRM.paddingBottoni=Math.floor((GRM.larghezzaCompleta-(GRM.larghezaBottoniTotale+(GRM.larghezzaDivisoria*(GRM.numeroBottoni-1))))/GRM.numeroBottoni/2);
    $('.btnMenu').each(function(index){
        $(this).css({
            'paddingLeft':GRM.paddingBottoni+'px',
            'paddingRight':GRM.paddingBottoni+'px'
        });
        if(index!=(GRM.numeroBottoni-1)){
            $(this).css('borderRightWidth',GRM.larghezzaDivisoria+'px');
        }
    });
    //fine gestione menu

    //gestisco form in home richiesta info
    $('#richiestaInfo textarea').focus(function(){
        $(this).css({
            'backgroundImage':'none'
        });
    });
//fine gestione form
});


