Update loadgallery.js