Slide show messing up my slide up?

Slide show messing up my slide up?

So I tried my hand at adding a slide show using jquery to the site, but it doesnt seem to be working and now my slide up wont work because of it.

Html
  1. <h1> Tylers Work</h1>
  2.   <h2 id="caption">How it all got started</h2>
  3.   <img id="slide" src="TylerPic.jpg" alt="">
  4.   <div id="slides">
  5.   <img src="logo1.jpg" alt="Logo 1">
  6.   <img src="logo2.png" alt="Logo 2">
  7.   <img src="logo3.png" alt="Logo 3">
  8.   </div>
Css:
  1. img{
  2.     height: 250px;
  3. }

  4. #slides img{
  5.     display: none;
  6. }
jQuery
  1. //Slide up and down button to cover the scroll bar so only the pictures show
  2. $("#slideUp").click(function(){
  3. $("#textArea").slideUp();
  4. });//end slide up

  5. //Slide up and down button to reveal the scroll bar
  6. $("#slideDown").click(function(){
  7. $("#textArea").slideDown();
  8. });//end slide down


  9. //Slide Show

  10. var image, imageCounter = 0, imageCache = [];
  11. $("#slides img").each(function)() { 
  12. image = new Image();
  13. image.src = $(this).attr("src");
  14. image.title = $(this).attr("alt");
  15. imageCache[imageCounter] = image;
  16. imageCounter++;
  17. });

  18. //Start Slide Show
  19. imageCounter = 0;
  20. var nextImage;
  21. setInterval ( function() {
  22. $("#caption").fadeOut(1000);
  23. $("#slide").fadeOut(1000);
  24. function() {
  25. imageCounter = (imageCounter + 1) % imageCache.length;
  26. nextImage = imageCache[imageCounter];
  27. $("#slide").attr("src", nextImage.src).fadeIn(1000);
  28. $("#caption").text(nextImage.title).fadeIn(1000);
  29. }
  30. };
  31. },
  32. 3000);

  33. });//end ready