//Created by Adrian Hennelly
//The Little Bear Menu Version 1.03
function initAccordion() {
  $('#accordion ul').hide();
  //$('#res-arrow').hide();
  $('#accordion ul:first').hide();//Changed from show to hide so that the menu loads in a colapsed state
  $('#accordion li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
      	 $('#accordion ul:visible').slideUp('normal');//Added this line so that an open menu can be closed with out having to open another one
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#accordion ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        //$('#res-arrow:visible').slideUp('normal');
        return false;
        }
      }
    );
    

  }
$(document).ready(function() {initAccordion();});
