component['frgRightPhotos'] = Class.create({

  THREAD_ID: null,
  EXEC_UID: null,
  arrParams:  null,

  initialize: function(arrInstVars, arrParams, arrLang)
  {
    this.THREAD_ID    = arrInstVars.THREAD_ID;
    this.EXEC_UID     = arrInstVars.EXEC_UID;
    
    try {   
      $(this.EXEC_UID+'-showAll').observe('click', this._showAll.bind(this));
    }catch(e){};
    
    this.arrImages = $$('div[EXEC_UID='+this.EXEC_UID+'] a[_name="photos"]');
    this.arrImages.each(function(el)
    {
        el.observe('click', this._showLargePhoto.bind(this))
    }.bind(this));
  },
  
  _showAll: function(evt)
  {
    evt.stop();
    evt.element().hide();
    var element = $(this.EXEC_UID+'-gallery');
    
    var elementDimensions = element.getDimensions();
    var elementHeight = element.getHeight();
    var contentHeight = $(this.EXEC_UID+'-galleryContent').getHeight();
    
    new Effect.Scale(element, Math.ceil((contentHeight*100)/elementHeight), Object.extend({
      scaleX: false
    }, {duration: 1.5}));      
  },
  _showLargePhoto: function(evt)
  {
    $(document).fire('slideShow:start', {intStartImgNum: evt.findElement('a[_num]').getAttribute('_num'), arrImagesElements: this.arrImages});
    evt.stop();
  }
});
arrJsLoaded['component.frgRightPhotos.js']=true;init.jsLoaded("component.frgRightPhotos.js");