Change:

Code:
 var currentImage = 0;
to

Code:
 var currentImage = -1;
so it starts on the first image in the array.