$(function(){
   var pageurl = "/"
   $('#nav li').css({
     background : 'url('+pageurl+'images/square.png) 5px 0.8em no-repeat'
   });
   $('#nav li:has(ul)')
     .click(function(event){
        if (this == event.target) {
          if ($(this).children().is(':hidden')) {
             $(this)
               .css({
                background : 'url('+pageurl+'images/minus.png) 5px 0.8em no-repeat'  
               })
               .children().slideDown('slow');
          } else {
             $(this)
              .css({
               background : 'url('+pageurl+'images/plus.png) 5px 0.8em no-repeat'              
              })          
              .children().slideUp('slow');
          }
        }
        return true;
    })
     .css({
        cursor:'pointer',
        background : 'url('+pageurl+'images/plus.png) 5px 0.8em no-repeat'  
     })
     .children().hide();
     
   $('#nav li:not(:has(ul))').css({
      cursor: 'default'
   });
           
 });

  
