function EpisodePopup(episode, photoIndex) {
  this.episode_ = episode;
  this.detached_ = false;
  this.$popup_ = null;
  this.$newPopup_ = null;
  this.$tnSel_ = null;
  this.$tnBox_ = null;
  this.$thumbnails_ = [];
  this.fadeTimeout_ = null;

  var contentWidth = $('#content').width();
  this.maxThumbnails_ = Math.floor(contentWidth / viewfinder.popup.TOTAL_WIDTH);

  // Create the popup photo info with layout callback.
  var epPopup = this;
  this.photoInfo_ = new PopupPhotoInfo(episode, photoIndex, function($img) {
    epPopup.layoutCallback_($img);
  });

  this.show();
}
/**
 * A popup to cycle through photos in an episode. Thumbnails are
 * constructed and the starting image loaded asynchronously. The displayed
 * photo is controlled via the PopupPhotoInfo object.
 *
 * @param {object} episode.
 * @param {number} photoIndex is index to photoArray within episode.
 */
A popup to cycle through photos in an episode. Thumbnails are
constructed and the starting image loaded asynchronously. The displayed
photo is controlled via the PopupPhotoInfo object.

@param {object} episode.
@param {number} photoIndex is index to photoArray within episode.
A popup to cycle through photos in an episode . Thumbnails are constructed and the starting image loaded asynchronously . The displayed photo is controlled via the PopupPhotoInfo object . @param { object } episode . @param { number } photoIndex is index to photoArray within episode .
function EpisodePopup(episode, photoIndex) {
  this.episode_ = episode;
  this.detached_ = false;
  this.$popup_ = null;
  this.$newPopup_ = null;
  this.$tnSel_ = null;
  this.$tnBox_ = null;
  this.$thumbnails_ = [];
  this.fadeTimeout_ = null;
  var contentWidth = $('#content').width();
  this.maxThumbnails_ = Math.floor(contentWidth / viewfinder.popup.TOTAL_WIDTH);
  var epPopup = this;
  this.photoInfo_ = new PopupPhotoInfo(episode, photoIndex, function($img) {
    epPopup.layoutCallback_($img);
  });
  this.show();
}
function EpisodePopup ( episode , photoIndex ) { this . episode_ = episode ; this . detached_ = false ; this . $popup_ = null ; this . $newPopup_ = null ; this . $tnSel_ = null ; this . $tnBox_ = null ; this . $thumbnails_ = [ ] ; this . fadeTimeout_ = null ; var contentWidth = $ ( '#content' ) . width ( ) ; this . maxThumbnails_ = Math . floor ( contentWidth / viewfinder . popup . TOTAL_WIDTH ) ; var epPopup = this ; this . photoInfo_ = new PopupPhotoInfo ( episode , photoIndex , function ( $img ) { epPopup . layoutCallback_ ( $img ) ; } ) ; this . show ( ) ; }
A popup to cycle through photos in an episode.
A popup to cycle through photos in an episode .
// Create the popup photo info with layout callback.