var autoTimerId = -1;

jQuery(document).ready(function($) {

  $('ul.header-bar li:first').addClass("active");
  autoTimerId = setInterval( function(){slideSwitch();}, 5500 );
  

  function slideSwitch() {
      var $active = $('ul.header-bar li.active');
      if ( $active.length == 0 ) $active = $('ul.header-bar li:last');
      
      var $next =  $active.next().length ? $active.next() : $('ul.header-bar li:first');

      $active.fadeOut('slow', function() {
          $next.fadeIn('slow');
          $next.addClass('active');
          $active.removeClass('active');
        });
        
      
    }
    
});

