﻿//convert unordered list into collaspible panel
$(function() {
    $('li:has(ul)')
      .click(function(event) {
          if (this == event.target) {
              if ($(this).children().is(':hidden')) {
                  $(this)
      .css('list-style-image', 'url(../images/bg_bullet.gif)')
      .children().show();
              } else {
                  $(this)
      .css('list-style-image', 'url(../images/bg_bullet.gif)')
      .children().hide();
              }
          } return false;
      })
      .css('cursor', 'pointer')
      .click();
    $('li:not(:has(ul))').css({
        cursor: 'default', 'list-style-image': 'none'
    })
         .click(function(event) {
             event.stopPropagation();
             return true;
         })
});
