$(document).ready(function () {  // hide all ULs inside LI.drawer except the first one where h2 is not labeled 'open'  $('LI.navTab H2:not(.open)').next().hide();     // apply the open class  // $('LI.navTab UL:first').addClass('open');    $('H2.navTab-handle').click(function () {    // hide the currently visible drawer contents    $('LI.navTab UL:visible').slideUp();        // remove the open class from the currently open drawer    $('H2.open').removeClass('open');        // show the associated drawer content to 'this' (this is the current H2 element)    // since the drawer content is the next element after the clicked H2, we find    // it and show it using this:    $(this).next().slideDown();        // set a class indicating on the H2 that the drawer is open    $(this).addClass('open');  }); });
