Select <a> which href ends with some string
$("a[href*='id=ABC']").addClass('active_jquery_menu');
$('a[href$="ABC"]')...
Selector documentation can be found at http://docs.jquery.com/Selectors
For attributes:
= is exactly equal
!= is not equal
^= is starts with
$= is ends with
*= is contains
~= is contains word
|= is starts with prefix (i.e., |= "prefix" matches "prefix-...")
$("a[href*=ABC]").addClass('selected');
$('a[href$="ABC"]:first').attr('title');
This will return the title of the first link that has a URL which ends with "ABC".