Removed document.ready, its unneded in gallery.tpl