I have been having trouble with adding a separate active class to the sub menu of this vertical accordion menu. 

So basically what should be happening is that when you click on the sub menu item the 'li' background should appear blue.

<http://jsfiddle.net/tebrown/fadptmsu/>

```
var checkCookie = $.cookie("nav-item");
if (checkCookie != "") {
$('#cssmenu > li > a:eq('+checkCookie+')').addClass('active').next().show();
}

$('#cssmenu > li > ul > li > a').click(function(){
var checkElement = $(this).next();
$(this).removeClass('testing');
$(this).closest('li').addClass('testing');  

});

$('#cssmenu > li > a').click(function(){

  var navIndex = $('#cssmenu > li > a').index(this);
  $.cookie("nav-item", navIndex);
  $('#cssmenu li ul').slideUp();
   if ($(this).next().is(":visible")){

       $(this).next().slideUp();
   } else {
   $(this).next().slideToggle();
   }
   $('#cssmenu li a').removeClass('active');

   $(this).addClass('active');
 });

```

If anyone could help me out with this that would be great :)

Cheers