That's not Lightbox, it's Slimbox. This is the close function:
Code:
function D(){if(G>=0){r();G=w=E=-1;a.style.display="none";x.cancel().chain(l).start(0)}return false}
Which is a bit cryptic. If not so compressed, it would look like so:
Code:
function D(){
if(G>=0){
r();
G=w=E=-1;
a.style.display="none";
x.cancel().chain(l).start(0);
}
return false;
}
That if(G>=0) is just a conditional that checks to see if a Slimbox is actually open. That stuff inside its braces calls other functions and sets things, all for the purpose of carrying out the close of the Slimbox.
So you could just slip your command in there:
Code:
function D(){if(G>=0){marqueeInit.ar[0].stopMarquee=false;r();G=w=E=-1;a.style.display="none";x.cancel().chain(l).start(0)}return false}
Now, as for removing the onmousedown code from the body tag, good idea. The onmousedown event isn't always the best choice anyway. You could add onclick to the a tags in the crawler, ex:
Code:
<a href="images/image1lg.jpg" rel="lightbox" onclick="marqueeInit.ar[0].stopMarquee=true;"><img src="images/image1.jpg" border="0" /></a>
But Slimbox might overwrite that, that depends upon how it is adding the onclick to the rel="lightbox" links. It could work, but it would be safer to add the event to the images, ex:
Code:
<a href="images/image1lg.jpg" rel="lightbox"><img onclick="marqueeInit.ar[0].stopMarquee=true;" src="images/image1.jpg" border="0" /></a>
Bookmarks