runner/reporters/html/base/js/vendor/magnific-popup/jquery.magnific-popup.js
function(isLarge) {
			var el;
			if(isLarge) {
				el = mfp.currItem.img;
			} else {
				el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
			}

			var offset = el.offset();
			var paddingTop = parseInt(el.css('padding-top'),10);
			var paddingBottom = parseInt(el.css('padding-bottom'),10);
			offset.top -= ( $(window).scrollTop() - paddingTop );


			/*
			
			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.

			 */
			var obj = {
				width: el.width(),
				// fix Zepto height+padding issue
				height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
			};

			// I hate to do this, but there is no another option
			if( getHasMozTransform() ) {
				obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
			} else {
				obj.left = offset.left;
				obj.top = offset.top;
			}
			return obj;
		}
function(isLarge) {
			var el;
			if(isLarge) {
				el = mfp.currItem.img;
			} else {
				el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
			}

			var offset = el.offset();
			var paddingTop = parseInt(el.css('padding-top'),10);
			var paddingBottom = parseInt(el.css('padding-bottom'),10);
			offset.top -= ( $(window).scrollTop() - paddingTop );


			/*
			
			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.

			 */
			var obj = {
				width: el.width(),
				// fix Zepto height+padding issue
				height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
			};

			// I hate to do this, but there is no another option
			if( getHasMozTransform() ) {
				obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
			} else {
				obj.left = offset.left;
				obj.top = offset.top;
			}
			return obj;
		}
function ( isLarge ) { var el ; if ( isLarge ) { el = mfp . currItem . img ; } else { el = mfp . st . zoom . opener ( mfp . currItem . el || mfp . currItem ) ; } var offset = el . offset ( ) ; var paddingTop = parseInt ( el . css ( 'padding-top' ) , 10 ) ; var paddingBottom = parseInt ( el . css ( 'padding-bottom' ) , 10 ) ; offset . top -= ( $ ( window ) . scrollTop ( ) - paddingTop ) ; /*
			
			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.

			 */ var obj = { width : el . width ( ) , // fix Zepto height+padding issue height : ( _isJQ ? el . innerHeight ( ) : el [ 0 ] . offsetHeight ) - paddingBottom - paddingTop } ; // I hate to do this, but there is no another option if ( getHasMozTransform ( ) ) { obj [ '-moz-transform' ] = obj [ 'transform' ] = 'translate(' + offset . left + 'px,' + offset . top + 'px)' ; } else { obj . left = offset . left ; obj . top = offset . top ; } return obj ; }
Get element postion relative to viewport
Get element postion relative to viewport