code: function ($image, current, target) {
        var root = target.closest('.clearing-assembled'),
            container = root.find('div').first(),
            visible_image = container.find('.visible-img'),
            image = visible_image.find('img').not($image);
  
        if (!this.locked()) {
          // set the image to the selected thumbnail
          image
            .attr('src', this.load($image))
            .css('visibility', 'hidden');
  
          this.loaded(image, function () {
            image.css('visibility', 'visible');
            // toggle the gallery
            root.addClass('clearing-blackout');
            container.addClass('clearing-container');
            visible_image.show();
            this.fix_height(target)
              .caption(visible_image.find('.clearing-caption'), $image)
              .center(image)
              .shift(current, target, function () {
                target.siblings().removeClass('visible');
                target.addClass('visible');
              });
          }.bind(this));
        }
      }
docs: event callbacks