$(document).ready(function()
{
     // Hide all unordered list elements in the accordion
     $('#local_nav_accordion ul').css('display','none');

     // Get the location of the calling script
     var loc = window.location.pathname;
     var parts = loc.split('/');
         var p = "";
     for (var i = 2; i < parts.length - 1; i++)
     {
         if (parts[i] == '')
         {
             continue;
         }
                 p += " ul." + parts[i];
         $(p).slideDown(0);
     }
//    REMOVED to stop the "shutter" in the RDS Menu per Brian Dennis. /////////////////////
//     // Listen for any clicks within the accordion
//     $('#local_nav_accordion a').click(function(e)
//     {
//         // Get the first-level children for the item clicked
//         var ul_children = $(this).parent().find('ul').children(':first');
//         if (ul_children.length > 0)
//         {
//             // Show those children elements which are hidden
//             if (ul_children.parent().css('display') != 'block')
//             {
//                 ul_children.parent().slideDown('slow');
//             }
//             // Hide them
//             else
//             {
//                 ul_children.parent().slideUp('slow');
//             }
//         }
//         // Otherwise, follow the link
//     });
//    $('#local_nav_accordion').collapsiblemenu({displaySpeed: 'slow', hideSpeed: 'slow'});
});

