/* END SCROLL BAR LOGIC
194125
function getScrollElementFromTarget(elem, stopParent) {
        stopParent = stopParent || document;
        if (!elem) {
            return stopParent;
        }

        var position = elem.style.position,
            excludeStaticParent = position === 'absolute',
            overflowRegex = /(auto|scroll)/,
            scrollParent = elem;

        while (!!scrollParent && scrollParent !== stopParent) {
            if (!(excludeStaticParent && scrollParent.style.position === 'static')) {
                var computedStyle = getComputedStyle(scrollParent);

                if (overflowRegex.test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {
                    break;
                }
            }

            scrollParent = scrollParent.parentElement;
        }

        return position === 'fixed' || !scrollParent || scrollParent === elem ? elem.ownerDocument || stopParent : scrollParent;
    }
685271
function scroll(e) {
    var attr = e.element.attributes;

    if (!(attr || attr.href)) return;
    var target = $(attr.href.value).plain(0);

    if (!target) return;
    e.preventDefault();

    //
    // Store the current window top Y and difference.
    //
    this.y = document.body.scrollTop;
    this.target = target.offsetTop;
    this.direction = this.target > this.y ? 1 : -1;
    this.delta = Math.abs(this.y - this.target);

    //
    // Start the animation.
    //
    this.animated = setInterval(this.animate.bind(this), 10);
  }
263224
function scrollBy( x, y ) {
				// Webkit doesn't support "scrollTop/scrollLeft"
				// on documentElement/body element.
				if ( /body|html/.test( parent.getName() ) )
					parent.getWindow().$.scrollBy( x, y );
				else {
					parent.$.scrollLeft += x;
					parent.$.scrollTop += y;
				}
			}
359322
function () {
            clearTimeout(scrollendTID);
            $el.off('scroll', handleScroll);
            $el.off('touchstart', handleTouchstart);
            $el.off('touchmove', handleTouchmove);
            $el.off('touchend', handleTouchend);
        }
1096828
function _fnScrollBarWidth ()
	{
		// On first run a static variable is set, since this is only needed once.
		// Subsequent runs will just use the previously calculated value
		if ( ! DataTable.__scrollbarWidth ) {
			var inner = $('<p/>').css( {
				width: '100%',
				height: 200,
				padding: 0
			} )[0];
	
			var outer = $('<div/>')
				.css( {
					position: 'absolute',
					top: 0,
					left: 0,
					width: 200,
					height: 150,
					padding: 0,
					overflow: 'hidden',
					visibility: 'hidden'
				} )
				.append( inner )
				.appendTo( 'body' );
	
			var w1 = inner.offsetWidth;
			outer.css( 'overflow', 'scroll' );
			var w2 = inner.offsetWidth;
	
			if ( w1 === w2 ) {
				w2 = outer[0].clientWidth;
			}
	
			outer.remove();
	
			DataTable.__scrollbarWidth = w1 - w2;
		}
	
		return DataTable.__scrollbarWidth;
	}
206862
function Scrollbar (pane) {
      this.pane = pane;
      this.pane.el.append(this.el);
      this.innerEl = this.pane.inner.get(0);

      this.dragging = false;
      this.enter = false;
      this.shown = false;

      // hovering
      this.pane.el.mouseenter($.proxy(this, 'mouseenter'));
      this.pane.el.mouseleave($.proxy(this, 'mouseleave'));

      // dragging
      this.el.mousedown($.proxy(this, 'mousedown'));

      // scrolling
      this.innerPaneScrollListener = $.proxy(this, 'scroll');
      this.pane.inner.scroll(this.innerPaneScrollListener);

      // wheel -optional-
      this.innerPaneMouseWheelListener = $.proxy(this, 'mousewheel');
      this.pane.inner.bind('mousewheel', this.innerPaneMouseWheelListener);

      // show
      var initialDisplay = this.pane.options.initialDisplay;

      if (initialDisplay !== false) {
        this.show();
        if (this.pane.autoHide) {
            this.hiding = setTimeout($.proxy(this, 'hide'), parseInt(initialDisplay, 10) || 3000);
        }
      }
    }
1014756
function updateSidebar () {
      var top = (doc && doc.scrollTop) || body.scrollTop
      var headerHeight = header.offsetHeight
      if (top > (headerHeight - 25)) {
        // main.classList.add('fix-sidebar')
        header.classList.add('fix-header')
      } else {
        // main.classList.remove('fix-sidebar')
        header.classList.remove('fix-header')
      }
      if (animating || !allLinks) return
      var last
      for (var i = 0; i < allLinks.length; i++) {
        var link = allLinks[i]
        if (link.offsetTop > top) {
          if (!last) last = link
          break
        } else {
          last = link
        }
      }
      if (last) {
        setActive(last.id)
      }
    }
816002
function scrollbarWidth() {
      // Append a temporary scrolling element to the DOM, then measure
      // the difference between between its outer and inner elements.
      var tempEl = $('<div class="scrollbar-width-tester" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');
      $('body').append(tempEl);
      var width = $(tempEl).innerWidth();
      var widthMinusScrollbars = $('div', tempEl).innerWidth();
      tempEl.remove();
      // On OS X if the scrollbar is set to auto hide it will have zero width. On webkit we can still
      // hide it using ::-webkit-scrollbar { width:0; height:0; } but there is no moz equivalent. So we're
      // forced to sniff Firefox and return a hard-coded scrollbar width. I know, I know...
      if (width === widthMinusScrollbars && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
        return 17;
      }
      return (width - widthMinusScrollbars);
    }
623522
function ghostScroll() {
        clearTimeout(scrollendTID);
        if (ghostScrollStart === null) {
            ghostScrollStart = new Date().getTime();
        }
        if (new Date().getTime() - ghostScrollStart > GHOST_SCROLL_TIMEOUT) {
            handleScrollEnd();
            return;
        }
        fireScroll();
        scrollendTID = setTimeout(ghostScroll, GHOST_SCROLL_INTERVAL);
    }
475017
function scrollTop() {
    var assign;

    var args = [], len = arguments.length;
    while ( len-- ) args[ len ] = arguments[ len ];
    var top = args[0];
    var duration = args[1];
    var easing = args[2];
    var callback = args[3];
    if (args.length === 3 && typeof easing === 'function') {
      (assign = args, top = assign[0], duration = assign[1], callback = assign[2], easing = assign[3]);
    }
    var dom = this;
    if (typeof top === 'undefined') {
      if (dom.length > 0) { return dom[0].scrollTop; }
      return null;
    }
    return dom.scrollTo(undefined, top, duration, easing, callback);
  }
1116680
function scrollIntoView() {
			jQuery(window).scrollTop(0);
			scrollContainer.scrollTop($this.offset().top - scrollContainer.offset().top + scrollContainer.scrollTop());
		}
1194786
function(scrollX, scrollY) {
        var dimensionModel = this.dimensionModel;
        var summaryHeight = dimensionModel.get('summaryHeight');
        var summaryPosition = dimensionModel.get('summaryPosition');
        var topHeight = dimensionModel.get('headerHeight');
        var bottomHeight = scrollX ? dimensionConst.SCROLLBAR_WIDTH : 0;

        if (scrollY && summaryHeight) {
            if (summaryPosition === summaryPositionConst.TOP) {
                topHeight += summaryHeight + dimensionConst.TABLE_BORDER_WIDTH;
            } else {
                bottomHeight += summaryHeight;
            }
        }

        return {
            top: topHeight,
            bottom: bottomHeight
        };
    }
575904
function endTraversal() {
        var pane = _getPane(ACTIVE_PANE);

        if (_traversingFileList) {
            _traversingFileList = false;

            _makeFileMostRecent(pane.id, pane.getCurrentlyViewedFile());
        }
    }
842242
function resizeScrollbar() {
      var contentSize = $contentEl[sizeAttr]();
      var scrollOffset = $scrollContentEl[scrollOffsetAttr](); // Either scrollTop() or scrollLeft().
      var scrollbarSize = $scrollbarEl[sizeAttr]();
      var scrollbarRatio = scrollbarSize / contentSize;

      // Calculate new height/position of drag handle.
      // Offset of 2px allows for a small top/bottom or left/right margin around handle.
      var handleOffset = Math.round(scrollbarRatio * scrollOffset) + 2;
      var handleSize = Math.floor(scrollbarRatio * (scrollbarSize - 2)) - 2;

      if (scrollbarSize < contentSize) {
        if (scrollDirection === 'vert'){
          $dragHandleEl.css({'top': handleOffset, 'height': handleSize});
        } else {
          $dragHandleEl.css({'left': handleOffset, 'width': handleSize});
        }
        $scrollbarEl.show();
      } else {
         $scrollbarEl.hide();
      }
    }
583659
function() {
    var elTbody = this._elTbody,
        elBdContainer = this._elBdContainer;
    
    // IE 6 and 7 only when y-scrolling not enabled
    if(!this.get("height") && (ua.ie)) {
        // Snap outer container height to content
        elBdContainer.style.height = 
                // but account for x-scrollbar if it is visible
                (elBdContainer.scrollWidth > elBdContainer.offsetWidth ) ?
                (elTbody.parentNode.offsetHeight + 18) + "px" : 
                elTbody.parentNode.offsetHeight + "px";
    }

    // Sync message tbody
    if(this._elTbody.rows.length === 0) {
        this._elMsgTbody.parentNode.style.width = this.getTheadEl().parentNode.offsetWidth + "px";
    }
    else {
        this._elMsgTbody.parentNode.style.width = "";
    }
}
333699
function () {
        clearTimeout(this.holdTimeout);

        clearInterval(this.scrollIntervalY);
        this.scrollIntervalY = undefined;
        clearInterval(this.scrollIntervalX);
        this.scrollIntervalX = undefined;
      }
1046296
function (e) {
    var posX = 0, posY = 0;
    e = e || window.event;
    if (typeof e.pageX !== "undefined") {
      posX = e.pageX;
      posY = e.pageY;
    } else if (typeof e.clientX !== "undefined") { // MSIE
      posX = e.clientX + scroll.x;
      posY = e.clientY + scroll.y;
    }
    return {
      left: posX,
      top: posY
    };
  }