But wait there's more! Sorry but you have another error in the code as well with vbgallery.
If a user uploads a photo titled MyPhoto.JPG into vbgallery, vbg will create a thumbnail called MyPhoto_thumb.jpg by default.
However, your code in the pop up window is looking for MyPhoto_thumb.JPG (extension in caps like the original file) and so the user will see red x's instead of thumbnails when they look through their images because Linux treats the file extensions in a case sensitive manner.
Now if you click on that red x inserted thumbnail it WILL take you to the correct full size photo because the full size photo does end in .JPG or whatever the all caps extension happened to be.
This should be as easy as making the _thumb file always end in a lowercase version of whatever the original extension is or else storing the actual thumbnail file name or checking it in some way.
For now I have told my members NOT to choose the thumbnail insertion when looking through their vbgallery files to insert but to choose full size insertion until the code can be fixed to handle the file extension case problem.
Thanks in advance for the fix, sorry to keep piling these on you, but my members are a picky bunch and usually find any issues with any code with any browser, etc...