;(function($){
	$(function() {
		// hide all lists that are adjacent to category headers (sub-categories)
		$('#plugPubs h4 + ul').hide();
		
		// Category link click handler (for sub-category support)
		$('#plugPubs h4 a').click(function(){ 
			// find the sub-category list for this category link
			$ul = $(this).closest("h4").next("ul");
			
			// more than one child in the sub-category list
			if($ul.children("li").length > 1) {
				// expand the sibling list
				$ul.slideToggle();
				
				// don't go to the link
				return false;
			} else {
				// treat the link as a normal link
				return true;
			}
		});
	});
})(jQuery);
