Image gallery Tutorial Question

I have the XML Image gallery Tutorial from this website working perfectly, but the only problem is that the thumbnails don’t load de thumbs in sequence. So it loads thumb # 1 and then #4 and #2… How can I make to work in sequence?

thanks