.delay() function doesn't work on attr() function
<p>I have some images in my website and with this code I would like to hide them, change the shown image and show them back, but the new picture shows instantly. I don't know what to do.</p>

<p>This is the javascript:</p>

<pre><code>$(document).ready(function() {
  $('.show').click(function() {
    $(this).removeClass("show").addClass("clickedShow");
    $('.show').animate({opacity: 0}, 1000);
    $(this).delay(1000).animate({opacity: 0}, 1000);

    $(this).animate({opacity: 1}, 1000).attr("src", "pic2.png");
    $('.show').delay(1000).animate({opacity: 1}, 1000).attr("src", "pic2.png");
  });
});
</code></pre>
