Add a class to first li if last li contains class
<p>There is a class that is being added to the li on hover <a href="http://jsfiddle.net/6PfKb/9/" rel="nofollow">in this fiddle</a>.</p>

<p>I want to be able to add a class to the first li if the last li has the .on class applied to it. I have tried something like this but it doesn't seem to work?</p>

<pre><code>if ($("li.top-level:last").contains(document.on))
   {
        $('li.top-level:first').addClass('first');
   }
</code></pre>

<p><a href="http://jsfiddle.net/aaronk85/6PfKb/21/" rel="nofollow">Updated fiddle</a> with suggested answer.</p>
