$(window).load(function() {    

 var images = [
            "shinari.jpg",
            "shinari2.jpg",
            "shinari3.jpg",
            "shinari4.jpg",
            "shinari5.jpg"
        ];
        // The index variable will keep track of which image is currently showing
        var index = 0;
        
        // Call backstretch for the first time,
        // In this case, I'm settings speed of 500ms for a fadeIn effect between images.
        $.backstretch(images[index], {speed: 2000});
        
        // Set an interval that increments the index and sets the new image
        // Note: The fadeIn speed set above will be inherited
        setInterval(function() {
            index = (index >= images.length - 1) ? 0 : index + 1;
            $.backstretch(images[index]);
        }, 7000);

});

