  $(document).ready(function() {

    var menu_interval;

    // Initialise the scrolling pane in our menu.
    $('#nav-menu-list').jScrollPane(
        {
          dragMaxHeight: 10,
          showArrows: true
        }
      );
		// Automatically scroll to the selected item.
		$('#nav-menu-list')[0].scrollTo('li.current');

    // Set up a couple of events for hovering over the arrow buttons.
    $('.menu-arrow').bind(
        'mouseover',
        function()
        {
          menu_interval = setInterval('scrollTheMenu(' + $(this).attr('rel') + ')', 100);
          return false;
        }
      );
    $('.menu-arrow').bind(
        'mouseout',
        function()
        {
          clearInterval(menu_interval);
          return false;
        }
      );

  });
  function scrollTheMenu(amount)
  {
    $('#nav-menu-list')[0].scrollBy(amount);
  }
