On div hover with some class, find the last class and add class to a link element with the same last class. How in jQuery?
<p>How to add a class to an element(link) when hovering a div with the last class? Here is what I mean:</p>

<p>I have this code:</p>

<pre><code>&lt;a href="http://google.com" class="menu nice menu-2"&gt;Google&lt;/a&gt;
&lt;a href="http://yahoo.com" class="menu nice menu-10"&gt;Yahoo&lt;/a&gt;
&lt;a href="http://facebook.com" class="menu nice menu-20"&gt;Facebook&lt;/a&gt;
</code></pre>

<p>.
.
.</p>

<pre><code>&lt;div class="pretty fixed menu-20"&gt;Some text here&lt;/div&gt;
</code></pre>

<p>IMPORTANT! I do not know the name of div class. I only know that it will be always the last one! So when I have classes like pretty, fixed and menu-20, I need menu-20.</p>

<p>Now, I have to find the last class of the div and somehow find the same class in link element and add class to that link element e.g. "awesome" so it look like:</p>

<pre><code>&lt;a href="http://google.com" class="menu nice menu-2"&gt;Google&lt;/a&gt;
&lt;a href="http://yahoo.com" class="menu nice menu-10"&gt;Yahoo&lt;/a&gt;
&lt;a href="http://facebook.com" class="menu nice menu-20 awesome"&gt;Facebook&lt;/a&gt;
</code></pre>

<p>.</p>

<p>How to do this?</p>

<p>Thanks in advance.</p>
