Just a simple example of how :path works with active states on menu items.
Code:
$('ul a:path').parent().addClass('active');
$('ul a:current').each(function() {
$(this).replaceWith($(this).text());
});
Click these to see how it works on query strings as well.