how can I show and hide images with jQuery. Currently I am using:

HTML Code:

$("a.M").click(function () {
$("a.W").click(function () {
That shows and hides but when I click the button (a href) twice the image changes to the correct one on the first click, but on the second click it disappears. Any ideas on how not to have it completely disappear on the second click? Thanks