console.log("init for gallery");
     this._super(element, model, template);
     this.parent = parent;
     console.log("init for gallery");
     this._super(element, model, template);
     this.parent = parent;
   modelStateChanged: function(property, value) {   
     if (value == 'loading') {
       this.parent.freeze('Ładowanie...');
   modelStateChanged: function(property, value) {   
     if (value == 'loading') {
       this.parent.freeze('Ładowanie...');
 
       /* fetch important parts */
       this.$pageListRoot = $('.image-gallery-page-list', this.element);
 
       /* fetch important parts */
       this.$pageListRoot = $('.image-gallery-page-list', this.element);