How can I change the <a href"" onclick of another Image with Jquery?
<p>I have a script to change the img src displayed in a div (main_view) when the image in another div (gallery) is clicked:</p>

<p><strong>JS</strong></p>

<pre><code>//Swap Image on Click
   $("ul.thumb li a").click(function() {
    var mainImage = $(this).attr("href"); //Find Image Name
    $("#main_view img").attr({ src: mainImage });
    return false;
   });
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;div id="gallery"&gt;
  &lt;ul class="thumb"&gt;
    &lt;li&gt;&lt;a href="images/childrentxt.png"&gt;&lt;img src="images/buttons/kids.png"
         title="children.htm" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="images/martialartstxt.png"&gt;&lt;img src="images/buttons/dee.png"
         title="mma.htm" /&gt;&lt;/a&gt;&lt;/li&gt;   
    &lt;li&gt;&lt;a href="images/cardiotxt.png"&gt;&lt;img src="images/buttons/cardio.png"
         title="fitness.htm" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="images/combattxt.png"&gt;&lt;img src="images/buttons/tristan.png"
         title="combat.htm" /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

&lt;div id="main_view"&gt;
    &lt;a href="fitness.htm" title="Mixed Martial Arts" target="_self"&gt;
    &lt;img src="images/maintxt.png" alt="" /&gt;&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>I would then like to allow the user to click the image displayed in the main_view div to navigate to the page associated with that image.</p>

<p>I'm new to jquery and js and have not been successful in writing script to do this.</p>

<p>Currently the "main_view's img src" is found in the "gallery's a href".  I've been trying  to use the "gallery img title" to store the value to be used to update the "main_view a href" onclick.  Can someone please HELP me??</p>

<p>Thanks,
Tracey</p>
