Automaticaly toggle an "active" class on navigation elements
Source code on GitHub
$('ul').activeNavToggler();
You can specify the child element selector and the class to be applied.
$(".parent").activeNavToggler({ childSelector: '.child', activeClass: 'foobar' });