In shadowbox.js, find the createHTML function (right near the bottom, around line 2428.
Within this function there are 3 places where html (the variable) has a string appended to it, and where that string ends with \n
Remove the \n from each of those strings, eg
html += '/>\n'; becomes html += '/>';
html += '>\n'; becomes html += '>';
html += '</' + obj.tag + '>\n'; becomes html += '</' + obj.tag + '>';
[The \n introduces totally unnecessary text nodes that actually cause an error the second time anything is displayed in the shadowbox because Firefox doesn't like to appendChild() to a textnode]
Combine literacy with curiosity and a whole world of information opens up to you