[jQuery] manipulate a Menu/List

[jQuery] manipulate a Menu/List


HI, i've a menu (build by typoscript) which i want to manipulate with
jquery.
menu structure:
<ul id="subMenu">
<li class="aLink">
<a href="index.php?id=15">Subpage 1</a>
<ul>
<li class="aLink">
<a href="index.php?id=19">Level 3 - 1</a>
</li>
<li class="aLink">
<a href="index.php?id=18">Level 3 - 2</a>
</li>
</ul>
</li>
<li class="aLink">
<a href="index.php?id=14" class="subcurrent">Subpage 2</a>
</li>
</ul>
Now i want to give the actual <a ..> the class 'subcurrent' - no
Problem.
But i want to give the "Subpage 1" Link the class 'subcurrent', too,
when "Level 3-2" is clicked.
How do i get the "Subpage 1" Link?
At the moment my js look like this:
$('ul#subMenu li a').click(function(){
$('a.subcurrent').removeClass('subcurrent');
$(this).addClass('subcurrent');
$
(this).parent().parent().parent().find('a').slice(0,1).addClass('subcurrent');
});
But thats not a good solution, cause $
(this).parent().parent().parent().find('a').slice(0,1).addClass('subcurrent');
fires on the "Subpage 1" Link, too, when "Subpage 2" is clicked.
Hope you can help and thanks in advance
Patric