﻿// An accordion-like collapsing menu
// This might be possible using Accordion, but the h5 background images complicate things
// so I did it manually - phil 20080501

$(document).ready(function () {
   
    $('div#nav-slide div.content:not(:)').hide();    // hide all div.content's inside div#nav-slide except the first one
    $('div#nav-slide a.drawer-handle:first').addClass('');
    
    $('a.drawer-handle').click(function () {
        // hide all the drawer contents
        $('a.drawer-handle').removeClass('open');
        $('div#nav-slide div.content').slideUp();

        // show the associated drawer content to 'this' (this is the current a element)
        // since the drawer content is the next element after the clicked a, we find
        // it and show it
        $(this).parent().next().slideDown();
        $(this).addClass('open');
        
        return false;

    });
});