slideshow small bug...?

slideshow small bug...?


Hi to all,
i hope this email will be well-explained, if not forgive me as i am
not a pro-programmer :)
i needed to add a slideshow (i name it DIMITRIOS.slideshow) in a
Microsoft Sharepoint Portal (MSP).
i found online a cool way by using some simple code which call the
jquery and using an MSP library of photos creates a nice slideshow.
Cool!
My only issue is that between the photos, i get an intermediate
"empty" photo (with the classic "X" mark as if i am calling a non
existing photo).
The code is the following, can you assist me on deleting that part of
the code, so my intermediate odject will never appear?
i think it has to do with the "interval" object in the code...
Thank you in advance, my code is the one below:
****************************************
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/
jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var DIMITRIOS = {} || DIMITRIOS;
DIMITRIOS.Slideshow = function() {
this.images = null;
this.current = -1;
this.wrapper = null;
this.duration = 3000;
this.delay = 1000;
this.init = function() {
this.images = loadImages();
this.wrapper.css("display", "none");
this.wrapper = $("div.slideshow", this.wrapper.parent
(":first").append('<div class="slideshow"></div>'));
this.wrapper.html('<img src="' + this.images[+
+this.current] + '"/>');
this.intervalObj = window.setInterval(this.showImage,
this.duration + this.delay);
}
this.showImage = function() {
if (++slideshow.current >= slideshow.images.length) {
slideshow.current = 0;
}
slideshow.wrapper.fadeOut(slideshow.delay, function() {
slideshow.wrapper.html('<img src="' + slideshow.images
[slideshow.current] + '"/>');
slideshow.wrapper.fadeIn(slideshow.delay);
});
}
var loadImages = function() {
var images = $("table.ms-summarystandardbody td.ms-vb2
a");
var imagesList = new Array(images.length);
var i = -1;
images.each(function() {
imagesList[++i] = this.href.replace('about:', '');
});
return imagesList;
}
};
var slideshow;
$().ready(function() {
slideshow = new DIMITRIOS.Slideshow();
slideshow.wrapper = $("table.ms-summarystandardbody td.ms-vb2
a").parents("div[id^=WebPart]");
slideshow.init();
});
</script>
****************************************