code: function _prepareConfig ( $elem, container, opts ) {
  
          var $container, direction,
              config = {};
  
          opts || ( opts = {} );
  
          container || ( container = ownerWindow( $elem ) );
          config.$container = $container = wrapContainer( container );
          config.container = container = $container[0];
  
          checkOptions( opts );
  
          direction = opts.direction || 'both';
          config.useVertical = direction === 'both' || direction === 'vertical';
          config.useHorizontal = direction === 'both' || direction === 'horizontal';
  
          config.partially = opts.partially;
          config.excludeHidden = opts.excludeHidden;
          config.borderBox = opts.box !== 'content-box';
          config.containerIsWindow = $.isWindow( container );
  
          if ( opts.tolerance !== undefined ) {
              config.toleranceType = ( isNumber( opts.tolerance ) || opts.tolerance.slice( -3 ) === "px" ) ? "add" : "multiply";
              config.tolerance = config.toleranceType === "add" ? parseFloat( opts.tolerance ) : parseFloat( opts.tolerance ) / 100 + 1;
          } else {
              config.tolerance = 0;
              config.toleranceType = "add";
          }
  
          // Create an object to cache DOM queries with regard to the viewport, for faster repeated access.
          config.cache = {};
  
          return config;
      }
docs: Prepares the configuration for a single element query. Returns the config object which is to be consumed by
  _isInView().
  
  @param {jQuery}                                    $elem                       single element, or set of elements
  @param {Window|Document|HTMLElement|jQuery|string} [container=window]
  @param {Object}                                    [opts]
  @param {boolean}                                   [opts.partially=false]
  @param {boolean}                                   [opts.excludeHidden=false]
  @param {string}                                    [opts.direction="both"]
  @param {string}                                    [opts.box="border-box"]     alternatively, "content-box"
  @param {number|string}                             [opts.tolerance=0]          number only (px), or with unit ("px" or "%" only)
  
  @returns {Object}