function turkeys() {       
    //Call the gallery function to run the slideshow, 5000 = change to next image after 5 seconds  
    slideshow();
    setInterval('slideshow()',5000);  
}

function slideshow() {
    
    // If no images are visible, fade in the first image.
    var current
    if ($('#slideshow img:visible').length) {
        current = $('#slideshow img:visible')
    } else {
        $('#slideshow img:first').fadeIn(1000);
        return;
    };
    
    // Get the next image. If the slideshow has reached the last image, repeat the first image.
    var next
    if (current.next().length) {
        next = current.next()
    } else {
        next = $('#slideshow img:first')
    };
    
    // Fade in the next image.
    next.fadeIn(1500);
    
    // Fade out the current image.
    current.fadeOut(1500);
                   
}
