$(document).ready(function() {

  // Hover emulation for IE 6.
  if ($.browser.msie && (navigator.appVersion.indexOf('MSIE 6')!=-1 || parseInt(jQuery.browser.version) == 6)) {
    $('#companies li').hover(function() {
      $(this).addClass('iehover');
    }, function() {
      $(this).removeClass('iehover');
    });

    $('#companies ul').hover(function() {
      $('#intro li').addClass('iehover');
    }, function() {
      $('#intro li').removeClass('iehover');
    });
  }
  
  // Delayed mouseout.
  $('#companies li').hover(function() {
    // Stop the timer.
    clearTimeout(this.sfTimer);
    // Display child lists.
    $('> ul', this).css('left', '1px')
      // Immediately hide nephew lists.
      .parent().siblings('li').children('ul').css('left', '-999em');
  }, function() {
    // Start the timer.
    var uls = $('> ul', this);
    this.sfTimer = setTimeout(function() {
      uls.css('left', '-999em');
    }, 400);
  });
});


