//*** fancybox Core Script ***
!(function (e, t, i, o) {
"use strict";
var n = i("html"),
a = i(e),
r = i(t),
l = (i.fancybox = function () {
l.open.apply(this, arguments);
}),
s = navigator.userAgent.match(/msie/i),
c = null,
d = void 0 !== t.createTouch,
p = function (e) {
return e && e.hasOwnProperty && e instanceof i;
},
h = function (e) {
return e && "string" === i.type(e);
},
f = function (e) {
return h(e) && e.indexOf("%") > 0;
},
u = function (e, t) {
var i = parseInt(e, 10) || 0;
return t && f(e) && (i = (l.getViewport()[t] / 100) * i), Math.ceil(i);
},
g = function (e, t) {
return u(e, t) + "px";
};
i.extend(l, {
version: "2.1.5",
defaults: {
padding: 15,
margin: 20,
width: 800,
height: 600,
minWidth: 100,
minHeight: 100,
maxWidth: 9999,
maxHeight: 9999,
pixelRatio: 1,
autoSize: !0,
autoHeight: !1,
autoWidth: !1,
autoResize: !0,
autoCenter: !d,
fitToView: !0,
aspectRatio: !1,
topRatio: 0.5,
leftRatio: 0.5,
scrolling: "auto",
wrapCSS: "",
arrows: !0,
closeBtn: !0,
closeClick: !1,
nextClick: !1,
mouseWheel: !0,
autoPlay: !1,
playSpeed: 3e3,
preload: 3,
modal: !1,
loop: !0,
ajax: { dataType: "html", headers: { "X-fancyBox": !0 } },
iframe: { scrolling: "auto", preload: !0 },
swf: { wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always" },
keys: { next: { 13: "left", 34: "up", 39: "left", 40: "up" }, prev: { 8: "right", 33: "down", 37: "right", 38: "down" }, close: [27], play: [32], toggle: [70] },
direction: { next: "left", prev: "right" },
scrollOutside: !0,
index: 0,
type: null,
href: null,
content: null,
title: null,
tpl: {
wrap: '
The requested content cannot be loaded.
Please try again later.
',
closeBtn: '").html(t).find(e.selector))
: p(t) &&
(t.data(d) ||
t.data(
d,
i('
')
.insertAfter(t)
.hide()
),
(t = t.show().detach()),
e.wrap.bind("onReset", function () {
i(this).find(t).length && t.hide().replaceAll(t.data(d)).data(d, !1);
}));
break;
case "image":
t = e.tpl.image.replace("/president/presidents-crisis-handbook/~/media/{href}", a);
break;
case "swf":
(t = '
");
}
(p(t) && t.parent().is(e.inner)) || e.inner.append(t),
l.trigger("beforeShow"),
e.inner.css("overflow", "yes" === n ? "scroll" : "no" === n ? "hidden" : n),
l._setDimension(),
l.reposition(),
(l.isOpen = !1),
(l.coming = null),
l.bindEvents(),
l.isOpened ? c.prevMethod && l.transitions[c.prevMethod]() : i(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),
l.transitions[l.isOpened ? e.nextMethod : e.openMethod](),
l._preloadImages();
}
},
_setDimension: function () {
var e,
t,
o,
n,
a,
r,
s,
c,
d,
p,
h,
m,
y,
v,
w,
x,
b,
k = l.getViewport(),
C = 0,
_ = l.wrap,
O = l.skin,
T = l.inner,
S = l.current,
W = S.width,
E = S.height,
L = S.minWidth,
R = S.minHeight,
j = S.maxWidth,
P = S.maxHeight,
A = S.scrolling,
H = S.scrollOutside ? S.scrollbarWidth : 0,
M = S.margin,
$ = u(M[1] + M[3]),
I = u(M[0] + M[2]);
if (
(_.add(O).add(T).width("auto").height("auto").removeClass("fancybox-tmp"),
(a = $ + (o = u(O.outerWidth(!0) - O.width()))),
(r = I + (n = u(O.outerHeight(!0) - O.height()))),
(s = f(W) ? ((k.w - a) * u(W)) / 100 : W),
(c = f(E) ? ((k.h - r) * u(E)) / 100 : E),
"iframe" === S.type)
) {
if (((x = S.content), S.autoHeight && 1 === x.data("ready")))
try {
x[0].contentWindow.document.location && (T.width(s).height(9999), (b = x.contents().find("body")), H && b.css("overflow-x", "hidden"), (c = b.outerHeight(!0)));
} catch (e) {}
} else (S.autoWidth || S.autoHeight) && (T.addClass("fancybox-tmp"), S.autoWidth || T.width(s), S.autoHeight || T.height(c), S.autoWidth && (s = T.width()), S.autoHeight && (c = T.height()), T.removeClass("fancybox-tmp"));
if (
((W = u(s)),
(E = u(c)),
(h = s / c),
(L = u(f(L) ? u(L, "w") - a : L)),
(j = u(f(j) ? u(j, "w") - a : j)),
(R = u(f(R) ? u(R, "h") - r : R)),
(d = j),
(p = P = u(f(P) ? u(P, "h") - r : P)),
S.fitToView && ((j = Math.min(k.w - a, j)), (P = Math.min(k.h - r, P))),
(v = k.w - $),
(w = k.h - I),
S.aspectRatio
? (W > j && (E = u((W = j) / h)), E > P && (W = u((E = P) * h)), W < L && (E = u((W = L) / h)), E < R && (W = u((E = R) * h)))
: ((W = Math.max(L, Math.min(W, j))), S.autoHeight && "iframe" !== S.type && (T.width(W), (E = T.height())), (E = Math.max(R, Math.min(E, P)))),
S.fitToView)
)
if ((T.width(W).height(E), _.width(W + o), (m = _.width()), (y = _.height()), S.aspectRatio))
for (; (m > v || y > w) && W > L && E > R && !(C++ > 19); )
(E = Math.max(R, Math.min(P, E - 10))), (W = u(E * h)) < L && (E = u((W = L) / h)), W > j && (E = u((W = j) / h)), T.width(W).height(E), _.width(W + o), (m = _.width()), (y = _.height());
else (W = Math.max(L, Math.min(W, W - (m - v)))), (E = Math.max(R, Math.min(E, E - (y - w))));
H && "auto" === A && E < c && W + o + H < v && (W += H),
T.width(W).height(E),
_.width(W + o),
(m = _.width()),
(y = _.height()),
(e = (m > v || y > w) && W > L && E > R),
(t = S.aspectRatio ? W < d && E < p && W < s && E < c : (W < d || E < p) && (W < s || E < c)),
i.extend(S, { dim: { width: g(m), height: g(y) }, origWidth: s, origHeight: c, canShrink: e, canExpand: t, wPadding: o, hPadding: n, wrapSpace: y - O.outerHeight(!0), skinSpace: O.height() - E }),
!x && S.autoHeight && E > R && E < P && !t && T.height("auto");
},
_getPosition: function (e) {
var t = l.current,
i = l.getViewport(),
o = t.margin,
n = l.wrap.width() + o[1] + o[3],
a = l.wrap.height() + o[0] + o[2],
r = { position: "absolute", top: o[0], left: o[3] };
return (
t.autoCenter && t.fixed && !e && a <= i.h && n <= i.w ? (r.position = "fixed") : t.locked || ((r.top += i.y), (r.left += i.x)),
(r.top = g(Math.max(r.top, r.top + (i.h - a) * t.topRatio))),
(r.left = g(Math.max(r.left, r.left + (i.w - n) * t.leftRatio))),
r
);
},
_afterZoomIn: function () {
var e = l.current;
e &&
((l.isOpen = l.isOpened = !0),
l.wrap.css("overflow", "visible").addClass("fancybox-opened"),
l.update(),
(e.closeClick || (e.nextClick && l.group.length > 1)) &&
l.inner.css("cursor", "pointer").bind("click.fb", function (t) {
i(t.target).is("a") || i(t.target).parent().is("a") || (t.preventDefault(), l[e.closeClick ? "close" : "next"]());
}),
e.closeBtn &&
i(e.tpl.closeBtn)
.appendTo(l.skin)
.bind("click.fb", function (e) {
e.preventDefault(), l.close();
}),
e.arrows && l.group.length > 1 && ((e.loop || e.index > 0) && i(e.tpl.prev).appendTo(l.outer).bind("click.fb", l.prev), (e.loop || e.index < l.group.length - 1) && i(e.tpl.next).appendTo(l.outer).bind("click.fb", l.next)),
l.trigger("afterShow"),
e.loop || e.index !== e.group.length - 1 ? l.opts.autoPlay && !l.player.isActive && ((l.opts.autoPlay = !1), l.play()) : l.play(!1));
},
_afterZoomOut: function (e) {
(e = e || l.current),
i(".fancybox-wrap").trigger("onReset").remove(),
i.extend(l, { group: {}, opts: {}, router: !1, current: null, isActive: !1, isOpened: !1, isOpen: !1, isClosing: !1, wrap: null, skin: null, outer: null, inner: null }),
l.trigger("afterClose", e);
},
}),
(l.transitions = {
getOrigPosition: function () {
var e = l.current,
t = e.element,
i = e.orig,
o = {},
n = 50,
a = 50,
r = e.hPadding,
s = e.wPadding,
c = l.getViewport();
return (
!i && e.isDom && t.is(":visible") && ((i = t.find("img:first")).length || (i = t)),
p(i) ? ((o = i.offset()), i.is("img") && ((n = i.outerWidth()), (a = i.outerHeight()))) : ((o.top = c.y + (c.h - a) * e.topRatio), (o.left = c.x + (c.w - n) * e.leftRatio)),
("fixed" === l.wrap.css("position") || e.locked) && ((o.top -= c.y), (o.left -= c.x)),
(o = { top: g(o.top - r * e.topRatio), left: g(o.left - s * e.leftRatio), width: g(n + s), height: g(a + r) })
);
},
step: function (e, t) {
var i,
o,
n = t.prop,
a = l.current,
r = a.wrapSpace,
s = a.skinSpace;
("width" !== n && "height" !== n) ||
((i = t.end === t.start ? 1 : (e - t.start) / (t.end - t.start)),
l.isClosing && (i = 1 - i),
(o = e - ("width" === n ? a.wPadding : a.hPadding)),
l.skin[n](u("width" === n ? o : o - r * i)),
l.inner[n](u("width" === n ? o : o - r * i - s * i)));
},
zoomIn: function () {
var e = l.current,
t = e.pos,
o = e.openEffect,
n = "elastic" === o,
a = i.extend({ opacity: 1 }, t);
delete a.position,
n ? ((t = this.getOrigPosition()), e.openOpacity && (t.opacity = 0.1)) : "fade" === o && (t.opacity = 0.1),
l.wrap.css(t).animate(a, { duration: "none" === o ? 0 : e.openSpeed, easing: e.openEasing, step: n ? this.step : null, complete: l._afterZoomIn });
},
zoomOut: function () {
var e = l.current,
t = e.closeEffect,
i = "elastic" === t,
o = { opacity: 0.1 };
i && ((o = this.getOrigPosition()), e.closeOpacity && (o.opacity = 0.1)), l.wrap.animate(o, { duration: "none" === t ? 0 : e.closeSpeed, easing: e.closeEasing, step: i ? this.step : null, complete: l._afterZoomOut });
},
changeIn: function () {
var e,
t = l.current,
i = t.nextEffect,
o = t.pos,
n = { opacity: 1 },
a = l.direction;
(o.opacity = 0.1),
"elastic" === i && ((e = "down" === a || "up" === a ? "top" : "left"), "down" === a || "right" === a ? ((o[e] = g(u(o[e]) - 200)), (n[e] = "+=200px")) : ((o[e] = g(u(o[e]) + 200)), (n[e] = "-=200px"))),
"none" === i ? l._afterZoomIn() : l.wrap.css(o).animate(n, { duration: t.nextSpeed, easing: t.nextEasing, complete: l._afterZoomIn });
},
changeOut: function () {
var e = l.previous,
t = e.prevEffect,
o = { opacity: 0.1 },
n = l.direction;
"elastic" === t && (o["down" === n || "up" === n ? "top" : "left"] = ("up" === n || "left" === n ? "-" : "+") + "=200px"),
e.wrap.animate(o, {
duration: "none" === t ? 0 : e.prevSpeed,
easing: e.prevEasing,
complete: function () {
i(this).trigger("onReset").remove();
},
});
},
}),
(l.helpers.overlay = {
defaults: { closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !d, fixed: !0 },
overlay: null,
fixed: !1,
el: i("html"),
create: function (e) {
(e = i.extend({}, this.defaults, e)),
this.overlay && this.close(),
(this.overlay = i('
').appendTo(l.coming ? l.coming.parent : e.parent)),
(this.fixed = !1),
e.fixed && l.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), (this.fixed = !0));
},
open: function (e) {
var t = this;
(e = i.extend({}, this.defaults, e)),
this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(e),
this.fixed || (a.bind("resize.overlay", i.proxy(this.update, this)), this.update()),
e.closeClick &&
this.overlay.bind("click.overlay", function (e) {
if (i(e.target).hasClass("fancybox-overlay")) return l.isActive ? l.close() : t.close(), !1;
}),
this.overlay.css(e.css).show();
},
close: function () {
var e, t;
a.unbind("resize.overlay"),
this.el.hasClass("fancybox-lock") && (i(".fancybox-margin").removeClass("fancybox-margin"), (e = a.scrollTop()), (t = a.scrollLeft()), this.el.removeClass("fancybox-lock"), a.scrollTop(e).scrollLeft(t)),
i(".fancybox-overlay").remove().hide(),
i.extend(this, { overlay: null, fixed: !1 });
},
update: function () {
var e,
i = "100%";
this.overlay.width(i).height("100%"),
s ? ((e = Math.max(t.documentElement.offsetWidth, t.body.offsetWidth)), r.width() > e && (i = r.width())) : r.width() > a.width() && (i = r.width()),
this.overlay.width(i).height(r.height());
},
onReady: function (e, t) {
var o = this.overlay;
i(".fancybox-overlay").stop(!0, !0),
o || this.create(e),
e.locked && this.fixed && t.fixed && (o || (this.margin = r.height() > a.height() && i("html").css("margin-right").replace("px", "")), (t.locked = this.overlay.append(t.wrap)), (t.fixed = !1)),
!0 === e.showEarly && this.beforeShow.apply(this, arguments);
},
beforeShow: function (e, t) {
var o, n;
t.locked &&
(!1 !== this.margin &&
(i("*")
.filter(function () {
return "fixed" === i(this).css("position") && !i(this).hasClass("fancybox-overlay") && !i(this).hasClass("fancybox-wrap");
})
.addClass("fancybox-margin"),
this.el.addClass("fancybox-margin")),
(o = a.scrollTop()),
(n = a.scrollLeft()),
this.el.addClass("fancybox-lock"),
a.scrollTop(o).scrollLeft(n)),
this.open(e);
},
onUpdate: function () {
this.fixed || this.update();
},
afterClose: function (e) {
this.overlay && !l.coming && this.overlay.fadeOut(e.speedOut, i.proxy(this.close, this));
},
}),
(l.helpers.title = {
defaults: { type: "float", position: "bottom" },
beforeShow: function (e) {
var t,
o,
n = l.current,
a = n.title,
r = e.type;
if ((i.isFunction(a) && (a = a.call(n.element, n)), h(a) && "" !== i.trim(a))) {
switch (((t = i('
' + a + "
")), r)) {
case "inside":
o = l.skin;
break;
case "outside":
o = l.wrap;
break;
case "over":
o = l.inner;
break;
default:
(o = l.skin), t.appendTo("body"), s && t.width(t.width()), t.wrapInner('
'), (l.current.margin[2] += Math.abs(u(t.css("margin-bottom"))));
}
t["top" === e.position ? "prependTo" : "appendTo"](o);
}
},
}),
(i.fn.fancybox = function (e) {
var t,
o = i(this),
n = this.selector || "",
a = function (a) {
var r,
s,
c = i(this).blur(),
d = t;
a.ctrlKey ||
a.altKey ||
a.shiftKey ||
a.metaKey ||
c.is(".fancybox-wrap") ||
((r = e.groupAttr || "data-fancybox-group"),
(s = c.attr(r)) || ((r = "rel"), (s = c.get(0)[r])),
s && "" !== s && "nofollow" !== s && (d = (c = (c = n.length ? i(n) : o).filter("[" + r + '="' + s + '"]')).index(this)),
(e.index = d),
!1 !== l.open(c, e) && a.preventDefault());
};
return (
(t = (e = e || {}).index || 0),
n && !1 !== e.live ? r.undelegate(n, "click.fb-start").delegate(n + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", a) : o.unbind("click.fb-start").bind("click.fb-start", a),
this.filter("[data-fancybox-start=1]").trigger("click"),
this
);
}),
r.ready(function () {
var t, o, a, r;
void 0 === i.scrollbarWidth &&
(i.scrollbarWidth = function () {
var e = i('
').appendTo("body"),
t = e.children(),
o = t.innerWidth() - t.height(99).innerWidth();
return e.remove(), o;
}),
void 0 === i.support.fixedPosition && (i.support.fixedPosition = ((a = i('
').appendTo("body")), (r = 20 === a[0].offsetTop || 15 === a[0].offsetTop), a.remove(), r)),
i.extend(l.defaults, { scrollbarWidth: i.scrollbarWidth(), fixed: i.support.fixedPosition, parent: i("body") }),
(t = i(e).width()),
n.addClass("fancybox-lock-test"),
(o = i(e).width()),
n.removeClass("fancybox-lock-test"),
i("").appendTo("head");
});
})(window, document, jQuery),
(function (e) {
"use strict";
var t = e.fancybox,
i = function (t, i, o) {
return (
(o = o || ""),
"object" === e.type(o) && (o = e.param(o, !0)),
e.each(i, function (e, i) {
t = t.replace("$" + e, i || "");
}),
o.length && (t += (t.indexOf("?") > 0 ? "&" : "?") + o),
t
);
};
t.helpers.media = {
defaults: {
youtube: {
matcher: /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
params: { autoplay: 1, autohide: 1, fs: 1, rel: 0, hd: 1, wmode: "opaque", enablejsapi: 1 },
type: "iframe",
url: "//www.youtube.com/embed/$3",
},
vimeo: { matcher: /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, params: { autoplay: 1, hd: 1, show_title: 1, show_byline: 1, show_portrait: 0, fullscreen: 1 }, type: "iframe", url: "//player.vimeo.com/video/$1" },
metacafe: {
matcher: /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
params: { autoPlay: "yes" },
type: "swf",
url: function (t, i, o) {
return (o.swf.flashVars = "playerVars=" + e.param(i, !0)), "//www.metacafe.com/fplayer/" + t[1] + "/.swf";
},
},
dailymotion: { matcher: /dailymotion.com\/video\/(.*)\/?(.*)/, params: { additionalInfos: 0, autoStart: 1 }, type: "swf", url: "//www.dailymotion.com/swf/video/$1" },
twitvid: { matcher: /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, params: { autoplay: 0 }, type: "iframe", url: "//www.twitvid.com/embed.php?guid=$1" },
twitpic: { matcher: /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, type: "image", url: "//twitpic.com/show/full/$1/" },
instagram: { matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, type: "image", url: "//$1/p/$2/media/?size=l" },
google_maps: {
matcher: /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
type: "iframe",
url: function (e) {
return "//maps.google." + e[1] + "/" + e[3] + e[4] + "&output=" + (e[4].indexOf("layer=c") > 0 ? "svembed" : "embed");
},
},
},
beforeLoad: function (t, o) {
var n,
a,
r,
l,
s = o.href || "",
c = !1;
for (n in t)
if (t.hasOwnProperty(n) && ((a = t[n]), (r = s.match(a.matcher)))) {
(c = a.type), (l = e.extend(!0, {}, a.params, o[n] || (e.isPlainObject(t[n]) ? t[n].params : null))), (s = "function" === e.type(a.url) ? a.url.call(this, r, l, o) : i(a.url, r, l));
break;
}
c && ((o.href = s), (o.type = c), (o.autoHeight = !1));
},
};
})(jQuery)
//*** lightbox fancybox settings***
$(function () {
$(".lightbox").fancybox({
padding: 0, margin: 0, fitToView: !0, topRatio: 0.5, width: 1450, height: 816, aspectRatio: !0, closeClick: !1,
tpl: {
closeBtn: '
',
}
});
});