D7: jQuery script for creating 'active' links in menu system. (partially works)
I'm pretty sure Drupal 7 does that for you out of the box. I can see, from my D7 site, I have first, last active-trail classes

&lt;ul class="menu"&gt;&lt;li class="first leaf"&gt;&lt;a href="/opportunities" title=""&gt;Opportunities&lt;/a&gt;&lt;/li&gt;
&lt;li class="leaf active-trail"&gt;&lt;a href="/organisations" title="" class="active-trail active"&gt;Organisations&lt;/a&gt;&lt;/li&gt;
&lt;li class="last leaf"&gt;&lt;a href="/events" title=""&gt;Events&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


As can be seen above the LI have the class you require. Do you have any custom code, modules or theme functions causing this not to happen on your site?