public/vendor/fancybox/jquery.fancybox.js
function (e, onlyAbsolute) {
			var current = F.current,
				wrap    = current ? current.wrap : null,
				pos;

			if (wrap) {
				pos = F._getPosition(onlyAbsolute);

				if (e && e.type === 'scroll') {
					delete pos.position;

					wrap.stop(true, true).animate(pos, 200);

				} else {
					wrap.css(pos);

					current.pos = $.extend({}, current.dim, pos);
				}
			}
		}
function (e, onlyAbsolute) {
			var current = F.current,
				wrap    = current ? current.wrap : null,
				pos;

			if (wrap) {
				pos = F._getPosition(onlyAbsolute);

				if (e && e.type === 'scroll') {
					delete pos.position;

					wrap.stop(true, true).animate(pos, 200);

				} else {
					wrap.css(pos);

					current.pos = $.extend({}, current.dim, pos);
				}
			}
		}
function ( e , onlyAbsolute ) { var current = F . current , wrap = current ? current . wrap : null , pos ; if ( wrap ) { pos = F . _getPosition ( onlyAbsolute ) ; if ( e && e . type === 'scroll' ) { delete pos . position ; wrap . stop ( true , true ) . animate ( pos , 200 ) ; } else { wrap . css ( pos ) ; current . pos = $ . extend ( { } , current . dim , pos ) ; } } }
Center inside viewport and toggle position type to fixed or absolute if needed
Center inside viewport and toggle position type to fixed or absolute if needed