How to swap an image

How to swap an image

I'm new to jQuery and I'm trying to customize it for an image swapping effect on my site. My problem is that I have 6 images which I want to open in the #view div. How do I assign a thumbnail (I made one for each image) to link to a diff image which will load itself in #view? I named the images img1, img2, img3... for posterity's sake. Do I use each() or something else entirely?

Here is a sample HTML I made for this

<ul class="list">
<li><a href="#" class="pic"><img src="img1.jpg" /></a></li>
<li><a href="#" class="pic"><img src="img2.jpg" /></a></li>
<li><a href="#" class="pic"><img src="img3.jpg" /></a></li>
<li><a href="#" class="pic"><img src="img4.jpg" /></a></li>
<li><a href="#" class="pic"><img src="img5.jpg" /></a></li>
<li><a href="#" class="pic"><img src="img6.jpg" /></a></li>
</ul>


Help ,anyone?