  function preload(arrayOfImages) {
    $(arrayOfImages).each(function(){
        $('<img/>')[0].src = this;
        // Alternatively you could use:
        // (new Image()).src = this;
    });
  }

// Usage:

  preload([
    'images/homePage/1.jpg',
    'images/homePage/2.jpg',
    'images/homePage/3.jpg',
    'images/homePage/4.jpg',
    'images/homePage/5.jpg',
    'images/homePage/6.jpg',
    'images/homePage/7.jpg',
    'images/homePage/8.jpg',
    'images/homePage/9.jpg',
    'images/homePage/10.jpg',
    'images/homePage/11.jpg',
    'images/homePage/12.jpg',
    'images/homePage/13.jpg',
    'images/homePage/14.jpg',
    'images/homePage/15.jpg'
  ]);


  function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1500, function() {
            $active.removeClass('active last-active');
        });
  }

  $(function() {
    setInterval( "slideSwitch()", 4000 );
  });
