A quick and dirty fix for this is to change the plugin at hook init_startup to only include the scripts where gallery pictures are presented.
I only have them in Member and Forumhome so my init_startup hook is:
Code:
Content visible to verified customers only.