Randy,
Yes, big thanks for the details.
Its been bugging me for ages now and where it all fits together as I wanted to keep a tidy code file going off server.
Now I know where it is I can just keep one and add to any upgrades I need to do.. Plus this now allows me to be a bit more adventurous with the JavaScript add-ins as well.
Just perfected a Lightbox (Modal Image Gallery) that looks great.
Will do a write up in my running blog on it as I have seen Mary allude to Modals becoming more of the norm in to the future.