The gallery is Gallery2
The errors are not specific to the gallery (that was the first example I has to hand) - they occur with the ISPConfig admin pages, and my wordpress blogs. All the errors are similar.
Running in the console is fine - no probs. It doesn't seem to be an access problem as such, because refreshing the page a few times allows the content to be displayed properly.