---- lightbox/js/lightbox.js 2009-03-12 22:18:36.369854061 +0200
-+++ lightbox/js/lightbox.js 2009-03-12 22:15:26.021123357 +0200
+--- lightbox/js/lightbox.js 2009-03-12 22:15:26.021123357 +0200
++++ lightbox/js/lightbox.js 2009-03-12 22:32:42.575029579 +0200
@@ -46,13 +46,13 @@
// Configurationl
//
if (target) {
event.stop();
this.start(target);
-@@ -213,18 +213,12 @@
+@@ -213,18 +213,15 @@
this.imageArray = [];
var imageNum = 0;
-
- while (this.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
- }
-+ this.imageArray =
-+ $$(imageLink.tagName + '[href][class="media"]').
-+ collect(function(anchor){ return [anchor.href, anchor.firstChild.getAttribute('title')]; }).
-+ uniq();
-+
-+ while (this.imageArray[imageNum][0] != imageLink.href) { imageNum++; }
++ this.imageArray =
++ $$(imageLink.tagName + '[href][class="media"]').
++ collect(function(anchor){
++ var url = anchor.directlink ? anchor.directlink : anchor.href;
++ return [url, anchor.firstChild.getAttribute('title')]; }).
++ uniq();
++
++ var url = imageLink.directlink ? imageLink.directlink : imageLink.href;
++ while (this.imageArray[imageNum][0] != url) { imageNum++; }
// calculate top and left offset for the lightbox
var arrayPageScroll = document.viewport.getScrollOffsets();