highlight menu item using jQuery with 2 menus
<p>I've got 2 menus going on. One is in the header; the other shows up on the left sidebar of the page.</p>

<p><strong>HEADER</strong></p>

<pre><code>&lt;div id="topmenu"&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/baseball"&gt;Baseball&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="/football"&gt;Football&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p><strong>ON BASEBALL PAGE</strong></p>

<pre><code>&lt;div id="leftmenu"&gt;
    &lt;ul id="teams"&gt;
        &lt;li&gt;&lt;a href="/yankees"&gt;Yankees&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
        &lt;li&gt;&lt;a href="/redsox"&gt;Red Sox&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
        &lt;li&gt;&lt;a href="/cubs"&gt;Cubs&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Here's how I highlight the #topmenu (long story, but it works):</p>

<pre><code>  $(function(){

    var url = window.location.pathname, 
        urlRegExp = new RegExp(url.replace(/\/$/,'') + "$"); 
        $('#topmenu li a').each(function(){

            if(urlRegExp.test(this.href.replace(/\/$/,''))){
                $(this).addClass('blue');
            }
        });
   });
</code></pre>

<p>The challenge is with the #leftmenu: </p>

<p>1 - I'm showing/hiding content from each -li- using jQuery</p>

<p>2 - When the page initially loads, the #topmenu item is higlighted, but I also want the first item in #leftmenu to be highlighted also. In other words, <strong>I want the same page to appear when the #topmenu item is selected, and when the first #leftmenu item is selected. How can I make this happen?</strong></p>

<p>If it helps, the baseball page is setup like so:</p>

<p><strong>Baseball.php</strong></p>

<pre><code>&lt;div id="header"&gt;
&lt;/div&gt;

&lt;div id="main"&gt;
&lt;?php include('baseball_stuff.php'); ?&gt;
&lt;/div&gt;

&lt;div id="footer"&gt;
&lt;/div&gt;
</code></pre>

<p>Then I link to baseball.php in the #topmenu and link to baseball_stuff.php in the #leftmenu, so I don't have to duplicate the content.</p>

<p>jsfiddle: <a href="http://jsfiddle.net/Ft8FR/" rel="nofollow">http://jsfiddle.net/Ft8FR/</a></p>
