$(function(){
  $('#box-content .content').hide().eq(0).show();
  
  if ($.browser.msie) {
    $('#main-menu li').hide();
    $('#main-menu li').css('line-height', '32px');
    $('#main-menu li').each(function() {
      $(this).stop().find('a').animate({ fontSize: '22px' }, 'fast', null, function() {
        $(this).parent('li').show();
      });
    });
  }
  
  $('#main-menu li').bind('mouseover', function(e) {
    e.preventDefault();
    
    if ($(this).attr('id') == 'menu3' || $(this).attr('id') == 'menu4') {
      $(this).stop().find('a').animate({ fontSize: '32px' }, { duration: 'fast', queue: false });
    } else {
      $(this).stop().find('a').animate({ fontSize: '42px' }, { duration: 'fast', queue: false });
    }
    
    var element = '#' + $(this).attr('id') + '-content';
    if ($(element).length > 0) {
      $('#box-content .content').hide();
      $(element).show();
    }
  });
  
  $('#main-menu li').bind('mouseout', function(e) {
    $(this).find('a').animate({ fontSize: '22px' }, { duration: 'fast', queue: false });
  });
});

