First, All of the stuff below is quite generic and samples only, refer to the documentation.
Second, all the files are considered "foreign" (including symbolic links) during an upgrade and must be reimplemented.
prettyPhoto (Best, and actually free - does not support slide on iOS )
FloatBox (Best, not free for commercial sites)
Flare (Not free)
Slimbox2 (Free, not good on mobile devices)
Install below Confluence
Somewhere else in the filesystem with symbolic linking
Along the way, I have given up having individual symbolic links pr. library/framework, so now I place all under "confluence-ext-libs"
This requires support for Linking in Tomcat. the server.xml file has to be changed adding the allowedLinked parameter:
Create the filestructure:
Link under Confluence (only needed once)
The Common Part
Now these can be referenced as /opt/confluence/confluence in the server root, so in Custom HTML (header part) add:
Some lighboxes requires to be initiated (the Jquery reference $ is AJS.$ for Confluence):