title: jQuery: set 'active' class in menu from secondary link
body: <p>I have a standard css/jquery menu where I use addClass/removeClass to set whatever <code>li</code> I am on to 'current'. However, the code to do this uses <code>$(this)</code>. I want to also do this same set of procedures from links not in the menu. For example, I would like the menu 'active' flag to be in the right place after following a page link that is somewhere buried in the page content and not in the menu itself.</p>
  
  <p>Menu HTML</p>
  
  <pre><code>&lt;ul class="nav2"&gt;
  &lt;li class="current"&gt;&lt;a href="#tab-1" rel="panel"&gt;Page one&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#tab-2" rel="panel"&gt;Page two&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#tab-3" rel="panel"&gt;Page three&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#tab-4" rel="panel"&gt;Page four&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Page HTML</p>
  
  <pre><code>&lt;p&gt;Herein you will find a further description of
      &lt;a href="#tab-2" rel="panel"&gt;page two&lt;/a&gt;.
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>$('a[rel=panel]').click(function (e) {
      $('a[rel=panel]').parent('li').removeClass('current');
      $(this).parent().addClass('current');
  
      //$("a [href='" + $(this).attr('href') + "']").parent('li').addClass('current');
  });
  </code></pre>
  
  <p>(The commented out line is my failed attempt to make the "secondary" link act just like the "primary" link in the menu.)</p>
  
  <p>Help? Thanks!</p>