Add class to second instance of text
<p>Let's say my section contains the pages "Red", "Green" and "Blue". Each page has the title in a H1 tag as well as a shared #sidebar navigation showing all three links. How can I get jQuery to detect the text entered in the H1, find the same text in #sidebar, and add a class to the #sidebar link if a match is found?</p>

<p>HTML:</p>

<pre><code>&lt;h1&gt;Red&lt;/h1&gt;
&lt;div id="sidebar"&gt;
  &lt;a href="#"&gt;Red&lt;/a&gt;&lt;br&gt;
  &lt;a href="#"&gt;Green&lt;/a&gt;&lt;br&gt;
  &lt;a href="#"&gt;Blue&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>CSS:</p>

<pre><code>#sidebar { float: right; }
.current-section { background: red; }
</code></pre>

<p>Sorry - I'm a jQuery beginner at best. Here's a Fiddle: <a href="http://jsfiddle.net/BxCgT/" rel="nofollow">http://jsfiddle.net/BxCgT/</a></p>
