[Hummingbird] Page Cache JavaScript

I have found 3 of our websites have issue with JavaScript Image Galleries not loading on pages that are cached. If I clear the cache the javascript works for a couple of days then stops again (only to come back when i once again clear the cache) Is there a specific way the page cache has to be implemented to stop JavaScript breaking every few days for certain types of image galleries?