This may have to do with the domain names, to check you can add in this code just above where the gallery code is on the page:
<?php die("The value of _SERVER['HTTP_HOST'] is: " . $_SERVER['HTTP_HOST']); ?>
If this does not have a value or comes back with something other than the ip address you are using to access the site then it may be the cause of the problem you are experiencing. Please post back and let us know what you discover and if we need to look into this further I can open a ticket for you.