function(el, fn) {
	  	if(!el || el === document) {
	  		return false;
	  	}

	  	// don't search elements above pswp__scroll-wrap
	  	if(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) {
	  		return false;
	  	}

	  	if( fn(el) ) {
	  		return el;
	  	}

	  	return _closestElement(el.parentNode, fn);
	}
function(el, fn) {
	  	if(!el || el === document) {
	  		return false;
	  	}

	  	// don't search elements above pswp__scroll-wrap
	  	if(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) {
	  		return false;
	  	}

	  	if( fn(el) ) {
	  		return el;
	  	}

	  	return _closestElement(el.parentNode, fn);
	}
function ( el , fn ) { if ( ! el || el === document ) { return false ; } // don't search elements above pswp__scroll-wrap if ( el . getAttribute ( 'class' ) && el . getAttribute ( 'class' ) . indexOf ( 'pswp__scroll-wrap' ) > - 1 ) { return false ; } if ( fn ( el ) ) { return el ; } return _closestElement ( el . parentNode , fn ) ; }
amount of pixels to drag to determine direction of swipe
amount of pixels to drag to determine direction of swipe
closest element