prev:<br />
// if image is NOT part of a set..<br />
if((imageLink.getAttribute('rel') == 'lightbox'))<br />
{<br />
// add single image to imageArray<br />
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('titl')));<br />
} else{<br />
// if image is part of a set..<br />
// loop through anchors, find other images in set, and add them to imageArray<br />
for (var i=0; i<anchors><br />
</anchors> var anchor = anchors[i];<br />
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel')))<br />
{<br />
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));<br />
}<br />
}<br />
imageArray.removeDuplicates();<br />
while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}<br />
}</p>
<p>aft:<br />
// if image is part of a set..<br />
if( (imageLink.getAttribute('rel') != null) && (imageLink.getAttribute('rel') != 'lightbox' ) && (imageLink.getAttribute('rel').toLowerCase().match('lightbox')) )<br />
{<br />
// loop through anchors, find other images in set, and add them to imageArray<br />
for (var i=0; i<anchors .length;><br />
</anchors> {<br />
var anchor = anchors[i];<br />
if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel')))<br />
{<br />
imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));<br />
}<br />
}<br />
imageArray.removeDuplicates();<br />
while(imageArray[imageNum][0] != imageLink.getAttribute('href')) { imageNum++;}<br />
}<br />
else<br />
{<br />
// if image is NOT part of a set..<br />
// add single image to imageArray<br />
imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));<br />
}