

/* Page functions  */



    $(document).ready(function() {

      

      // nav bar stuff



      $('ul.sf-menu').superfish({ autoArrows: false, dropShadows: false,

        onBeforeShow: function() {

          var index = $('#navMenu > li').index(this.parent());

          $(this).parent().parent().parent().css('background-position', '0px ' + (0 - ((index + 1) * 26)) + 'px');

        },

        onHide: function() {

          $(this).parent().parent().parent().css('background-position', '0px 0px');

        }

      });

      

      // this makes hover work with li's that have no dropdown

      $('#navMenu > :not(li:has(ul))').hover(function() {

          var index = $('#navMenu > li').index(this);

          $(this).parent().parent().css('background-position', '0px ' + (0 - ((index + 1) * 26)) + 'px');

      }, function() {

          $(this).parent().parent().css('background-position', '0px 0px');

      });

      

      // end nav bar stuff

			//this is for the side nav - accordion

			$("dd").hide();

			$("dt a").click(function(){

				$("dd:visible").slideUp("slow");

				$(this).parent().next().slideDown("slow");

				return false;

			});

		

    });
