dojo.require('uzh.image.Gallery');
dojo.require('uzh.image.GalleryEditor');
dojo.require('dojo.data.ItemFileReadStore');

dojo.ready(function() {
  var gallery = dijit.byId('gallery');
  if (gallery) {
    var hash = window.location.hash;
    gallery.setDataStore(
        new dojo.data.ItemFileReadStore({ data: { items: galleryImages }}),
        { count:20 },
        {
          imageThumbAttr: "thumb",
          imageLargeAttr: "large"
        }
      );
    if (hash.match(/#\d+/)) {
      gallery.showImage(parseInt(hash.substring(1)) - 1);
    }
  }
});


