jQuery(document).ready(function() {       
        jQuery('#MenuTop li:first').remove();
        jQuery('#MenuTop li:first').remove();
        //w = Math.round((document.documentElement.clientWidth - 100) / 4);
        //alert(w);
        sfrs();
        jQuery(window).resize(function() {
            sfrs();    
        });

    });

    
    function sfrs() {
        //alert('a');
        //alert(jQuery('#sf_pod2').height());
        count = jQuery('.root').size();
        //alert(count);
        i = 4;
        g = 10;
        w = Math.round((document.documentElement.clientWidth - g) / 4);
        if (w < 230) {
            i = 3;
            w = Math.round((document.documentElement.clientWidth - g) / 3);  
            if (w < 232) {
                i = 2;
                w = Math.round((document.documentElement.clientWidth - g) / 2);    
            }  
        }
        i = Math.floor(count / 4) + 1;
        //alert(w);
        //jQuery('#MenuTop .root').css('width', w + 'px');
        //jQuery('#MenuTop li').css('width', '');
        jQuery('#MenuTop li').css('width', (w - g)+ 'px');
        jQuery('#MenuTop .SM').css('width', '228px');
        jQuery('#MenuTop .SM li').css('width', '228px');
        //jQuery('#MenuTop .SM').css('width', '200px');
        //jQuery('#MenuTop .SM').css('white-space', 'nowrap');
        //alert(jQuery('sf_pod2').height());
        //jQuery('#sf_pod2_td').height(26 * (Math.floor(count/i)) + 'px');
        //jQuery('#sf_pod4').css('height', jQuery('#sf_pod2' ).height() + 'px');
        //jQuery('body').html(jQuery('#sf_pod2').height());
        //alert(jQuery('#sf_pod2').height());
        //alert(40*i + 'px');
    }
