function FixStickyTopMenu() {
var e = window.location.pathname;
if (!$.browser.mobile) {
var a = $(".second-level-menu-wrapper")
, s = $("body");
if (0 == a.length)
return;
var n = -1
, o = function() {
-1 == n && (n = a.offset().top);
var o = $(window).scrollTop();
o >= n ? (a.addClass("fixed"),
-1 !== e.indexOf("/platform/sap/") && s.css("margin-top", "175px")) : (a.removeClass("fixed"),
s.css("margin-top", "0"))
};
if ($(window).load(o).scroll(o),
-1 !== e.indexOf("/case-studies/")) {
var r = e.split("/")[1];
$('.second-level-menu-wrapper .sub-navigation-bar a[href^="/' + r + '"]').addClass("active")
} else
$('.second-level-menu-wrapper .sub-navigation-bar a[href="' + e + '"]').addClass("active")
}
}
function FixStickyBottomMenu() {
if (window.location.pathname,
!$.browser.mobile) {
var a = $(".welcome-to-os-nav");
if ($("body"),
0 == a.length)
return;
var b = -1
, c = function() {
-1 == b && (b = a.offset().top);
var c = $(window).scrollTop();
50 >= c && $(".page-nav li").removeClass("active"),
c >= b ? a.addClass("fixed") : a.removeClass("fixed")
};
$(window).load(c).scroll(c),
$('.welcome-to-os-nav .page-nav li a[href="' + window.location.hash + '"]').parent().addClass("active")
}
}
function ToggleStickyBottomMenu() {
function a(a) {
var b = $(document).scrollTop();
$(".page-nav li a").each(function() {
var a = $(this)
, c = $(a.attr("href"))
, d = c.position().top
, e = c.position().top + c.height();
b >= d - 250 && e + 250 > b ? ($(".page-nav li").removeClass("active"),
a.parent().addClass("active")) : a.parent().removeClass("active")
})
}
if (!$.browser.mobile) {
$(document).on("scroll", a);
var b = function(a) {
history.replaceState ? history.replaceState(null, null, a) : location.hash = a
};
$('.page-nav li a[href^="#"]').on("click", function(c) {
c.preventDefault(),
$(document).off("scroll"),
$(this).each(function() {
$(this).parent().removeClass("active")
}),
$(this).parent().addClass("active");
var d = this.hash;
$target = $(d),
$("html, body").stop().animate({
scrollTop: $target.offset().top - 60
}, 500, "swing", function() {
$(document).on("scroll", a),
b(d)
})
})
}
}
function IsEmail(a) {
var b = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return b.test(a)
}
function sendKISScontextToMarketo() {
setTimeout(function() {
var a, b, c;
try {
var d = 1 === $(framePopupSelector).contents().find(frameMktoSelector).length;
if (d ? (a = $(framePopupSelector).contents().find(frameMktoSelector),
b = $(framePopupSelector).attr("src").split("/"),
c = b[b.length - 2]) : (a = document.getElementById("mkto_frame").contentWindow,
b = window.location.pathname.split("/"),
c = b[b.length - 2]),
void 0 !== a) {
var e = {
input: "KM_LastFormSubmissionContext",
origin: "website",
currPageContext: c
};
d ? a[0].contentWindow.postMessage(e, "*") : a.postMessage(e, "*")
}
} catch (a) {}
}, 1e3)
}
function hideSearchBar() {
$('.header-hero-wrapper div[class*="with-search"]').removeClass("with-search")
}
function hideDropDown() {
$('.navigation-bar li[class*="open"]').removeClass("open"),
$("[data-dropdown-wrapper]").hide(),
$("body").removeClass("mega-menu"),
"/" !== window.location.pathname && initial.addClass("open")
}
function toggleDropdowMenu(a) {
var b = $('.navigation-bar li[class*="open"]');
$('.navigation-bar li[class*="open"]').removeClass("open"),
$("[data-dropdown-wrapper]").hide(),
$("[data-dropdown-wrapper='" + $(a).attr("data-name") + "']").toggle(),
$("body").addClass("mega-menu"),
a.parent().hasClass("open") ? (a.parent().removeClass("open"),
b.addClass("open")) : (a.parent().addClass("open"),
b.removeClass("open"))
}
!function(a, b, c, d) {
function e(a, b) {
return a[b] === d ? t[b] : a[b]
}
function f() {
var a = b.pageYOffset;
return a === d ? r.scrollTop : a
}
function g(a, b) {
var c = t["on" + a];
c && (w(c) ? c.call(b[0]) : (c.addClass && b.addClass(c.addClass),
c.removeClass && b.removeClass(c.removeClass))),
b.trigger("lazy" + a, [b]),
k()
}
function h(b) {
g(b.type, a(this).off(p, h))
}
function i(c) {
if (z.length) {
c = c || t.forceLoad,
A = 1 / 0;
var d, e, i = f(), j = b.innerHeight || r.clientHeight, k = b.innerWidth || r.clientWidth;
for (d = 0,
e = z.length; e > d; d++) {
var l, m = z[d], q = m[0], s = m[n], u = !1, v = c || y(q, o) < 0;
if (a.contains(r, q)) {
if (c || !s.visibleOnly || q.offsetWidth || q.offsetHeight) {
if (!v) {
var x = q.getBoundingClientRect()
, B = s.edgeX
, C = s.edgeY;
l = x.top + i - C - j,
v = i >= l && x.bottom > -C && x.left <= k + B && x.right > -B
}
if (v) {
m.on(p, h),
g("show", m);
var D = s.srcAttr
, E = w(D) ? D(m) : q.getAttribute(D);
E && (q.src = E),
u = !0
} else
A > l && (A = l)
}
} else
u = !0;
u && (y(q, o, 0),
z.splice(d--, 1),
e--)
}
e || g("complete", a(r))
}
}
function j() {
B > 1 ? (B = 1,
i(),
setTimeout(j, t.throttle)) : B = 0
}
function k(a) {
z.length && (a && "scroll" === a.type && a.currentTarget === b && A >= f() || (B || setTimeout(j, 0),
B = 2))
}
function l() {
v.lazyLoadXT()
}
function m() {
i(!0)
}
var n = "lazyLoadXT"
, o = "lazied"
, p = "load error"
, q = "lazy-hidden"
, r = c.documentElement || c.body
, s = b.onscroll === d || !!b.operamini || !r.getBoundingClientRect
, t = {
autoInit: !0,
selector: "img[data-src]",
blankImage: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
throttle: 99,
forceLoad: s,
loadEvent: "pageshow",
updateEvent: "load orientationchange resize scroll touchmove focus",
forceEvent: "lazyloadall",
oninit: {
removeClass: "lazy"
},
onshow: {
addClass: q
},
onload: {
removeClass: q,
addClass: "lazy-loaded"
},
onerror: {
removeClass: q
},
checkDuplicates: !0
}
, u = {
srcAttr: "data-src",
edgeX: 0,
edgeY: 0,
visibleOnly: !0
}
, v = a(b)
, w = a.isFunction
, x = a.extend
, y = a.data || function(b, c) {
return a(b).data(c)
}
, z = []
, A = 0
, B = 0;
a[n] = x(t, u, a[n]),
a.fn[n] = function(c) {
c = c || {};
var d, f = e(c, "blankImage"), h = e(c, "checkDuplicates"), i = e(c, "scrollContainer"), j = e(c, "show"), l = {};
a(i).on("scroll", k);
for (d in u)
l[d] = e(c, d);
return this.each(function(d, e) {
if (e === b)
a(t.selector).lazyLoadXT(c);
else {
var i = h && y(e, o)
, m = a(e).data(o, j ? -1 : 1);
if (i)
return void k();
f && "IMG" === e.tagName && !e.src && (e.src = f),
m[n] = x({}, l),
g("init", m),
z.push(m),
k()
}
})
}
,
a(c).ready(function() {
g("start", v),
v.on(t.updateEvent, k).on(t.forceEvent, m),
a(c).on(t.updateEvent, k),
t.autoInit && (v.on(t.loadEvent, l),
l())
})
}(window.jQuery || window.Zepto || window.$, window, document),
function(a) {
var b = {}
, c = {
mode: "horizontal",
slideSelector: "",
infiniteLoop: !0,
hideControlOnEnd: !1,
speed: 500,
easing: null,
slideMargin: 0,
startSlide: 0,
randomStart: !1,
captions: !1,
ticker: !1,
tickerHover: !1,
adaptiveHeight: !1,
adaptiveHeightSpeed: 500,
video: !1,
useCSS: !0,
preloadImages: "visible",
responsive: !0,
slideZIndex: 50,
wrapperClass: "bx-wrapper",
touchEnabled: !0,
swipeThreshold: 50,
oneToOneTouch: !0,
preventDefaultSwipeX: !0,
preventDefaultSwipeY: !1,
pager: !0,
pagerType: "full",
pagerShortSeparator: " / ",
pagerSelector: null,
buildPager: null,
pagerCustom: null,
controls: !0,
nextText: "Next",
prevText: "Prev",
nextSelector: null,
prevSelector: null,
autoControls: !1,
startText: "Start",
stopText: "Stop",
autoControlsCombine: !1,
autoControlsSelector: null,
auto: !1,
pause: 4e3,
autoStart: !0,
autoDirection: "next",
autoHover: !1,
autoDelay: 0,
autoSlideForOnePage: !1,
minSlides: 1,
maxSlides: 1,
moveSlides: 0,
slideWidth: 0,
onSliderLoad: function() {},
onSlideBefore: function() {},
onSlideAfter: function() {},
onSlideNext: function() {},
onSlidePrev: function() {},
onSliderResize: function() {}
};
a.fn.bxSlider = function(d) {
if (0 == this.length)
return this;
if (this.length > 1)
return this.each(function() {
a(this).bxSlider(d)
}),
this;
var e = {}
, f = this;
b.el = this;
var g = a(window).width()
, h = a(window).height()
, j = function() {
e.settings = a.extend({}, c, d),
e.settings.slideWidth = parseInt(e.settings.slideWidth),
e.children = f.children(e.settings.slideSelector),
e.children.length < e.settings.minSlides && (e.settings.minSlides = e.children.length),
e.children.length < e.settings.maxSlides && (e.settings.maxSlides = e.children.length),
e.settings.randomStart && (e.settings.startSlide = Math.floor(Math.random() * e.children.length)),
e.active = {
index: e.settings.startSlide
},
e.carousel = e.settings.minSlides > 1 || e.settings.maxSlides > 1,
e.carousel && (e.settings.preloadImages = "all"),
e.minThreshold = e.settings.minSlides * e.settings.slideWidth + (e.settings.minSlides - 1) * e.settings.slideMargin,
e.maxThreshold = e.settings.maxSlides * e.settings.slideWidth + (e.settings.maxSlides - 1) * e.settings.slideMargin,
e.working = !1,
e.controls = {},
e.interval = null,
e.animProp = "vertical" == e.settings.mode ? "top" : "left",
e.usingCSS = e.settings.useCSS && "fade" != e.settings.mode && function() {
var a = document.createElement("div")
, b = ["WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"];
for (var c in b)
if (void 0 !== a.style[b[c]])
return e.cssPrefix = b[c].replace("Perspective", "").toLowerCase(),
e.animProp = "-" + e.cssPrefix + "-transform",
!0;
return !1
}(),
"vertical" == e.settings.mode && (e.settings.maxSlides = e.settings.minSlides),
f.data("origStyle", f.attr("style")),
f.children(e.settings.slideSelector).each(function() {
a(this).data("origStyle", a(this).attr("style"))
}),
k()
}
, k = function() {
f.wrap('
");
return c.inlineElement = f,
f
}
return b.updateStatus("ready"),
b._parseMarkup(d, {}, c),
d
}
}
});
var I, J = "ajax", K = function() {
I && d.removeClass(I)
}, L = function() {
K(),
b.req && b.req.abort()
};
a.magnificPopup.registerModule(J, {
options: {
settings: null,
cursor: "mfp-ajax-cur",
tError: '
The content could not be loaded.'
},
proto: {
initAjax: function() {
b.types.push(J),
I = b.st.ajax.cursor,
x(i + "." + J, L),
x("BeforeChange." + J, L)
},
getAjax: function(c) {
I && d.addClass(I),
b.updateStatus("loading");
var e = a.extend({
url: c.src,
success: function(d, e, f) {
var g = {
data: d,
xhr: f
};
z("ParseAjax", g),
b.appendContent(a(g.data), J),
c.finished = !0,
K(),
b._setFocus(),
setTimeout(function() {
b.wrap.addClass(r)
}, 16),
b.updateStatus("ready"),
z("AjaxContentAdded")
},
error: function() {
K(),
c.finished = c.loadError = !0,
b.updateStatus("error", b.st.ajax.tError.replace("%url%", c.src))
}
}, b.st.ajax.settings);
return b.req = a.ajax(e),
""
}
}
});
var M, N = function(c) {
if (c.data && void 0 !== c.data.title)
return c.data.title;
var d = b.st.image.titleSrc;
if (d) {
if (a.isFunction(d))
return d.call(b, c);
if (c.el)
return c.el.attr(d) || ""
}
return ""
};
a.magnificPopup.registerModule("image", {
options: {
markup: '
',
cursor: "mfp-zoom-out-cur",
titleSrc: "title",
verticalFit: !0,
tError: '
The image could not be loaded.'
},
proto: {
initImage: function() {
var a = b.st.image
, c = ".image";
b.types.push("image"),
x(n + c, function() {
"image" === b.currItem.type && a.cursor && d.addClass(a.cursor)
}),
x(i + c, function() {
a.cursor && d.removeClass(a.cursor),
w.off("resize" + q)
}),
x("Resize" + c, b.resizeImage),
b.isLowIE && x("AfterChange", b.resizeImage)
},
resizeImage: function() {
var a = b.currItem;
if (a && a.img && b.st.image.verticalFit) {
var c = 0;
b.isLowIE && (c = parseInt(a.img.css("padding-top"), 10) + parseInt(a.img.css("padding-bottom"), 10)),
a.img.css("max-height", b.wH - c)
}
},
_onImageHasSize: function(a) {
a.img && (a.hasSize = !0,
M && clearInterval(M),
a.isCheckingImgSize = !1,
z("ImageHasSize", a),
a.imgHidden && (b.content && b.content.removeClass("mfp-loading"),
a.imgHidden = !1))
},
findImageSize: function(a) {
var c = 0
, d = a.img[0]
, e = function(f) {
M && clearInterval(M),
M = setInterval(function() {
return d.naturalWidth > 0 ? void b._onImageHasSize(a) : (c > 200 && clearInterval(M),
c++,
void (3 === c ? e(10) : 40 === c ? e(50) : 100 === c && e(500)))
}, f)
};
e(1)
},
getImage: function(c, d) {
var e = 0
, f = function() {
c && (c.img[0].complete ? (c.img.off(".mfploader"),
c === b.currItem && (b._onImageHasSize(c),
b.updateStatus("ready")),
c.hasSize = !0,
c.loaded = !0,
z("ImageLoadComplete")) : (e++,
200 > e ? setTimeout(f, 100) : g()))
}
, g = function() {
c && (c.img.off(".mfploader"),
c === b.currItem && (b._onImageHasSize(c),
b.updateStatus("error", h.tError.replace("%url%", c.src))),
c.hasSize = !0,
c.loaded = !0,
c.loadError = !0)
}
, h = b.st.image
, i = d.find(".mfp-img");
if (i.length) {
var j = document.createElement("img");
j.className = "mfp-img",
c.img = a(j).on("load.mfploader", f).on("error.mfploader", g),
j.src = c.src,
i.is("img") && (c.img = c.img.clone()),
j = c.img[0],
j.naturalWidth > 0 ? c.hasSize = !0 : j.width || (c.hasSize = !1)
}
return b._parseMarkup(d, {
title: N(c),
img_replaceWith: c.img
}, c),
b.resizeImage(),
c.hasSize ? (M && clearInterval(M),
c.loadError ? (d.addClass("mfp-loading"),
b.updateStatus("error", h.tError.replace("%url%", c.src))) : (d.removeClass("mfp-loading"),
b.updateStatus("ready")),
d) : (b.updateStatus("loading"),
c.loading = !0,
c.hasSize || (c.imgHidden = !0,
d.addClass("mfp-loading"),
b.findImageSize(c)),
d)
}
}
});
var O, P = function() {
return void 0 === O && (O = void 0 !== document.createElement("p").style.MozTransform),
O
};
a.magnificPopup.registerModule("zoom", {
options: {
enabled: !1,
easing: "ease-in-out",
duration: 300,
opener: function(a) {
return a.is("img") ? a : a.find("img")
}
},
proto: {
initZoom: function() {
var a, c = b.st.zoom, d = ".zoom";
if (c.enabled && b.supportsTransition) {
var e, f, g = c.duration, h = function(a) {
var b = a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image")
, d = "all " + c.duration / 1e3 + "s " + c.easing
, e = {
position: "fixed",
zIndex: 9999,
left: 0,
top: 0,
"-webkit-backface-visibility": "hidden"
}
, f = "transition";
return e["-webkit-" + f] = e["-moz-" + f] = e["-o-" + f] = e[f] = d,
b.css(e),
b
}, k = function() {
b.content.css("visibility", "visible")
};
x("BuildControls" + d, function() {
if (b._allowZoom()) {
if (clearTimeout(e),
b.content.css("visibility", "hidden"),
a = b._getItemToZoom(),
!a)
return void k();
f = h(a),
f.css(b._getOffset()),
b.wrap.append(f),
e = setTimeout(function() {
f.css(b._getOffset(!0)),
e = setTimeout(function() {
k(),
setTimeout(function() {
f.remove(),
a = f = null,
z("ZoomAnimationEnded")
}, 16)
}, g)
}, 16)
}
}),
x(j + d, function() {
if (b._allowZoom()) {
if (clearTimeout(e),
b.st.removalDelay = g,
!a) {
if (a = b._getItemToZoom(),
!a)
return;
f = h(a)
}
f.css(b._getOffset(!0)),
b.wrap.append(f),
b.content.css("visibility", "hidden"),
setTimeout(function() {
f.css(b._getOffset())
}, 16)
}
}),
x(i + d, function() {
b._allowZoom() && (k(),
f && f.remove(),
a = null)
})
}
},
_allowZoom: function() {
return "image" === b.currItem.type
},
_getItemToZoom: function() {
return !!b.currItem.hasSize && b.currItem.img
},
_getOffset: function(c) {
var d;
d = c ? b.currItem.img : b.st.zoom.opener(b.currItem.el || b.currItem);
var e = d.offset()
, f = parseInt(d.css("padding-top"), 10)
, g = parseInt(d.css("padding-bottom"), 10);
e.top -= a(window).scrollTop() - f;
var h = {
width: d.width(),
height: (v ? d.innerHeight() : d[0].offsetHeight) - g - f
};
return P() ? h["-moz-transform"] = h.transform = "translate(" + e.left + "px," + e.top + "px)" : (h.left = e.left,
h.top = e.top),
h
}
}
});
var Q = "iframe"
, R = "//about:blank"
, S = function(a) {
if (b.currTemplate[Q]) {
var c = b.currTemplate[Q].find("iframe");
c.length && (a || (c[0].src = R),
b.isIE8 && c.css("display", a ? "block" : "none"))
}
};
a.magnificPopup.registerModule(Q, {
options: {
markup: '
',
srcAction: "iframe_src",
patterns: {
youtube: {
index: "youtube.com",
id: "v=",
src: "//www.youtube.com/embed/%id%?autoplay=1"
},
vimeo: {
index: "vimeo.com/",
id: "/",
src: "//player.vimeo.com/video/%id%?autoplay=1"
},
gmaps: {
index: "//maps.google.",
src: "%id%&output=embed"
}
}
},
proto: {
initIframe: function() {
b.types.push(Q),
x("BeforeChange", function(a, b, c) {
b !== c && (b === Q ? S() : c === Q && S(!0));
}),
x(i + "." + Q, function() {
S()
})
},
getIframe: function(c, d) {
var e = c.src
, f = b.st.iframe;
a.each(f.patterns, function() {
return e.indexOf(this.index) > -1 ? (this.id && (e = "string" == typeof this.id ? e.substr(e.lastIndexOf(this.id) + this.id.length, e.length) : this.id.call(this, e)),
e = this.src.replace("%id%", e),
!1) : void 0
});
var g = {};
return f.srcAction && (g[f.srcAction] = e),
b._parseMarkup(d, g, c),
b.updateStatus("ready"),
d
}
}
});
var T = function(a) {
var c = b.items.length;
return a > c - 1 ? a - c : 0 > a ? c + a : a
}
, U = function(a, b, c) {
return a.replace(/%curr%/gi, b + 1).replace(/%total%/gi, c)
};
a.magnificPopup.registerModule("gallery", {
options: {
enabled: !1,
arrowMarkup: '
',
preload: [0, 2],
navigateByImgClick: !0,
arrows: !0,
tPrev: "Previous (Left arrow key)",
tNext: "Next (Right arrow key)",
tCounter: "%curr% of %total%"
},
proto: {
initGallery: function() {
var c = b.st.gallery
, d = ".mfp-gallery"
, f = Boolean(a.fn.mfpFastClick);
return b.direction = !0,
!(!c || !c.enabled) && (g += " mfp-gallery",
x(n + d, function() {
c.navigateByImgClick && b.wrap.on("click" + d, ".mfp-img", function() {
return b.items.length > 1 ? (b.next(),
!1) : void 0
}),
e.on("keydown" + d, function(a) {
37 === a.keyCode ? b.prev() : 39 === a.keyCode && b.next()
})
}),
x("UpdateStatus" + d, function(a, c) {
c.text && (c.text = U(c.text, b.currItem.index, b.items.length))
}),
x(m + d, function(a, d, e, f) {
var g = b.items.length;
e.counter = g > 1 ? U(c.tCounter, f.index, g) : ""
}),
x("BuildControls" + d, function() {
if (b.items.length > 1 && c.arrows && !b.arrowLeft) {
var d = c.arrowMarkup
, e = b.arrowLeft = a(d.replace(/%title%/gi, c.tPrev).replace(/%dir%/gi, "left")).addClass(t)
, g = b.arrowRight = a(d.replace(/%title%/gi, c.tNext).replace(/%dir%/gi, "right")).addClass(t)
, h = f ? "mfpFastClick" : "click";
e[h](function() {
b.prev()
}),
g[h](function() {
b.next()
}),
b.isIE7 && (y("b", e[0], !1, !0),
y("a", e[0], !1, !0),
y("b", g[0], !1, !0),
y("a", g[0], !1, !0)),
b.container.append(e.add(g))
}
}),
x(o + d, function() {
b._preloadTimeout && clearTimeout(b._preloadTimeout),
b._preloadTimeout = setTimeout(function() {
b.preloadNearbyImages(),
b._preloadTimeout = null
}, 16)
}),
void x(i + d, function() {
e.off(d),
b.wrap.off("click" + d),
b.arrowLeft && f && b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),
b.arrowRight = b.arrowLeft = null
}))
},
next: function() {
b.direction = !0,
b.index = T(b.index + 1),
b.updateItemHTML()
},
prev: function() {
b.direction = !1,
b.index = T(b.index - 1),
b.updateItemHTML()
},
goTo: function(a) {
b.direction = a >= b.index,
b.index = a,
b.updateItemHTML()
},
preloadNearbyImages: function() {
var a, c = b.st.gallery.preload, d = Math.min(c[0], b.items.length), e = Math.min(c[1], b.items.length);
for (a = 1; a <= (b.direction ? e : d); a++)
b._preloadItem(b.index + a);
for (a = 1; a <= (b.direction ? d : e); a++)
b._preloadItem(b.index - a)
},
_preloadItem: function(c) {
if (c = T(c),
!b.items[c].preloaded) {
var d = b.items[c];
d.parsed || (d = b.parseEl(c)),
z("LazyLoad", d),
"image" === d.type && (d.img = a('
').on("load.mfploader", function() {
d.hasSize = !0
}).on("error.mfploader", function() {
d.hasSize = !0,
d.loadError = !0,
z("LazyLoadError", d)
}).attr("src", d.src)),
d.preloaded = !0
}
}
}
});
var V = "retina";
a.magnificPopup.registerModule(V, {
options: {
replaceSrc: function(a) {
return a.src.replace(/\.\w+$/, function(a) {
return "@2x" + a
})
},
ratio: 1
},
proto: {
initRetina: function() {
if (window.devicePixelRatio > 1) {
var a = b.st.retina
, c = a.ratio;
c = isNaN(c) ? c() : c,
c > 1 && (x("ImageHasSize." + V, function(a, b) {
b.img.css({
"max-width": b.img[0].naturalWidth / c,
width: "100%"
})
}),
x("ElementParse." + V, function(b, d) {
d.src = a.replaceSrc(d, c)
}))
}
}
}
}),
function() {
var b = 1e3
, c = "ontouchstart"in window
, d = function() {
w.off("touchmove" + f + " touchend" + f)
}
, e = "mfpFastClick"
, f = "." + e;
a.fn.mfpFastClick = function(e) {
return a(this).each(function() {
var g, h = a(this);
if (c) {
var i, j, k, l, m, n;
h.on("touchstart" + f, function(a) {
l = !1,
n = 1,
m = a.originalEvent ? a.originalEvent.touches[0] : a.touches[0],
j = m.clientX,
k = m.clientY,
w.on("touchmove" + f, function(a) {
m = a.originalEvent ? a.originalEvent.touches : a.touches,
n = m.length,
m = m[0],
(Math.abs(m.clientX - j) > 10 || Math.abs(m.clientY - k) > 10) && (l = !0,
d())
}).on("touchend" + f, function(a) {
d(),
l || n > 1 || (g = !0,
a.preventDefault(),
clearTimeout(i),
i = setTimeout(function() {
g = !1
}, b),
e())
})
})
}
h.on("click" + f, function() {
g || e()
})
})
}
,
a.fn.destroyMfpFastClick = function() {
a(this).off("touchstart" + f + " click" + f),
c && w.off("touchmove" + f + " touchend" + f)
}
}(),
B()
}(window.jQuery || window.Zepto),
function(a, b, c, d) {
"use strict";
var e = function() {
var a = c.body || c.documentElement
, a = a.style;
return "" == a.WebkitTransition ? "-webkit-" : "" == a.MozTransition ? "-moz-" : "" == a.OTransition ? "-o-" : "" == a.transition && ""
}
, f = e() !== !1
, g = function(a, b, c) {
var d = {}
, f = e();
d[f + "transform"] = "translateX(" + b + ")",
d[f + "transition"] = f + "transform " + c + "s linear",
a.css(d)
}
, h = "ontouchstart"in b
, i = b.navigator.pointerEnabled || b.navigator.msPointerEnabled
, j = function(a) {
if (h)
return !0;
if (!i || "undefined" == typeof a || "undefined" == typeof a.pointerType)
return !1;
if ("undefined" != typeof a.MSPOINTER_TYPE_MOUSE) {
if (a.MSPOINTER_TYPE_MOUSE != a.pointerType)
return !0
} else if ("mouse" != a.pointerType)
return !0;
return !1
};
a.fn.imageLightbox = function(d) {
var d = a.extend({
selector: 'id="imagelightbox"',
allowedTypes: "png|jpg|jpeg|gif",
animationSpeed: 250,
preloadNext: !0,
enableKeyboard: !0,
quitOnEnd: !1,
quitOnImgClick: !1,
quitOnDocClick: !0,
onStart: !1,
onEnd: !1,
onLoadStart: !1,
onLoadEnd: !1
}, d)
, e = a([])
, k = a()
, l = a()
, m = 0
, n = 0
, o = 0
, p = !1
, q = function(b) {
return "a" == a(b).prop("tagName").toLowerCase() && new RegExp(".(" + d.allowedTypes + ")$","i").test(a(b).attr("href"))
}
, r = function() {
if (!l.length)
return !0;
var c = .8 * a(b).width()
, d = .9 * a(b).height()
, e = new Image;
e.src = l.attr("src"),
e.onload = function() {
if (m = e.width,
n = e.height,
m > c || n > d) {
var f = m / n > c / d ? m / c : n / d;
m /= f,
n /= f
}
l.css({
width: m + "px",
height: n + "px",
top: (a(b).height() - n) / 2 + "px",
left: (a(b).width() - m) / 2 + "px"
})
}
}
, s = function(b) {
if (p)
return !1;
if (b = "undefined" != typeof b && ("left" == b ? 1 : -1),
l.length) {
if (b !== !1 && (e.length < 2 || d.quitOnEnd === !0 && (b === -1 && 0 == e.index(k) || 1 === b && e.index(k) == e.length - 1)))
return u(),
!1;
var c = {
opacity: 0
};
f ? g(l, 100 * b - o + "px", d.animationSpeed / 1e3) : c.left = parseInt(l.css("left")) + 100 * b + "px",
l.animate(c, d.animationSpeed, function() {
t()
}),
o = 0
}
p = !0,
d.onLoadStart !== !1 && d.onLoadStart(),
setTimeout(function() {
l = a("
").attr("src", k.attr("href")).load(function() {
l.appendTo("body"),
r();
var c = {
opacity: 1
};
if (l.css("opacity", 0),
f)
g(l, -100 * b + "px", 0),
setTimeout(function() {
g(l, "0px", d.animationSpeed / 1e3)
}, 50);
else {
var h = parseInt(l.css("left"));
c.left = h + "px",
l.css("left", h - 100 * b + "px")
}
if (l.animate(c, d.animationSpeed, function() {
p = !1,
d.onLoadEnd !== !1 && d.onLoadEnd()
}),
d.preloadNext) {
var i = e.eq(e.index(k) + 1);
i.length || (i = e.eq(0)),
a("
").attr("src", i.attr("href")).load()
}
}).error(function() {
d.onLoadEnd !== !1 && d.onLoadEnd()
});
var c = 0
, h = 0
, n = 0;
l.on(i ? "pointerup MSPointerUp" : "click", function(a) {
if (a.preventDefault(),
d.quitOnImgClick)
return u(),
!1;
if (j(a.originalEvent))
return !0;
var b = (a.pageX || a.originalEvent.pageX) - a.target.offsetLeft;
k = e.eq(e.index(k) - (m / 2 > b ? 1 : -1)),
k.length || (k = e.eq(m / 2 > b ? e.length : 0)),
s(m / 2 > b ? "left" : "right")
}).on("touchstart pointerdown MSPointerDown", function(a) {
return !(j(a.originalEvent) && !d.quitOnImgClick) || (f && (n = parseInt(l.css("left"))),
void (c = a.originalEvent.pageX || a.originalEvent.touches[0].pageX))
}).on("touchmove pointermove MSPointerMove", function(a) {
return !(j(a.originalEvent) && !d.quitOnImgClick) || (a.preventDefault(),
h = a.originalEvent.pageX || a.originalEvent.touches[0].pageX,
o = c - h,
void (f ? g(l, -o + "px", 0) : l.css("left", n - o + "px")))
}).on("touchend touchcancel pointerup pointercancel MSPointerUp MSPointerCancel", function(a) {
return !(j(a.originalEvent) && !d.quitOnImgClick) || void (Math.abs(o) > 50 ? (k = e.eq(e.index(k) - (o < 0 ? 1 : -1)),
k.length || (k = e.eq(o < 0 ? e.length : 0)),
s(o > 0 ? "right" : "left")) : f ? g(l, "0px", d.animationSpeed / 1e3) : l.animate({
left: n + "px"
}, d.animationSpeed / 2))
})
}, d.animationSpeed + 100)
}
, t = function() {
return !!l.length && (l.remove(),
void (l = a()))
}
, u = function() {
return !!l.length && void l.animate({
opacity: 0
}, d.animationSpeed, function() {
t(),
p = !1,
d.onEnd !== !1 && d.onEnd()
})
};
return a(b).on("resize", r),
d.quitOnDocClick && a(c).on(h ? "touchend" : "click", function(b) {
l.length && !a(b.target).is(l) && u()
}),
d.enableKeyboard && a(c).on("keyup", function(a) {
return !l.length || (a.preventDefault(),
27 == a.keyCode && u(),
void (37 != a.keyCode && 39 != a.keyCode || (k = e.eq(e.index(k) - (37 == a.keyCode ? 1 : -1)),
k.length || (k = e.eq(37 == a.keyCode ? e.length : 0)),
s(37 == a.keyCode ? "left" : "right"))))
}),
a(c).on("click", this.selector, function(b) {
return !q(this) || (b.preventDefault(),
!p && (p = !1,
d.onStart !== !1 && d.onStart(),
k = a(this),
void s()))
}),
this.each(function() {
return !q(this) || void (e = e.add(a(this)))
}),
this.switchImageLightbox = function(a) {
var b = e.eq(a);
if (b.length) {
var c = e.index(k);
k = b,
s(a < c ? "left" : "right")
}
return this
}
,
this.quitImageLightbox = function() {
return u(),
this
}
,
this
}
}(jQuery, window, document),
function(a, b, c) {
"$:nomunge";
function d(a) {
return a = a || location.href,
"#" + a.replace(/^[^#]*#?(.*)$/, "$1")
}
var e, f = "hashchange", g = document, h = a.event.special, i = g.documentMode, j = "on" + f in b && (i === c || i > 7);
a.fn[f] = function(a) {
return a ? this.bind(f, a) : this.trigger(f)
}
,
a.fn[f].delay = 50,
h[f] = a.extend(h[f], {
setup: function() {
return !j && void a(e.start)
},
teardown: function() {
return !j && void a(e.stop)
}
}),
e = function() {
function e() {
var c = d()
, g = n(k);
c !== k ? (m(k = c, g),
a(b).trigger(f)) : g !== k && (location.href = location.href.replace(/#.*/, "") + g),
h = setTimeout(e, a.fn[f].delay)
}
var h, i = {}, k = d(), l = function(a) {
return a
}, m = l, n = l;
return i.start = function() {
h || e()
}
,
i.stop = function() {
h && clearTimeout(h),
h = c
}
,
a.browser.msie && !j && function() {
var b, c;
i.start = function() {
b || (c = a.fn[f].src,
c = c && c + d(),
b = a('
').hide().one("load", function() {
c || m(d()),
e()
}).attr("src", c || "javascript:0").insertAfter("body")[0].contentWindow,
g.onpropertychange = function() {
try {
"title" === event.propertyName && (b.document.title = g.title)
} catch (a) {}
}
)
}
,
i.stop = l,
n = function() {
return d(b.location.href)
}
,
m = function(c, d) {
var e = b.document
, h = a.fn[f].domain;
c !== d && (e.title = g.title,
e.open(),
h && e.write(''),
e.close(),
b.location.hash = c)
}
}(),
i
}()
}(jQuery, this),
!function(a) {
function b(a) {
return String(a).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">")
}
var c = function(a) {
var b, c, d = {};
if ("" === a)
return {};
for (b = 0; b < a.length; b += 1)
c = a[b].split("="),
2 === c.length && (d[c[0]] = decodeURIComponent(c[1].replace(/\+/g, " ")));
return d
};
a.queryParams = function() {
return c(window.location.search.substr(1).split("&"))
}
,
a.hashParams = function() {
return c(window.location.hash.substr(1).split("&"))
}
,
window.Swiftype = window.Swiftype || {},
Swiftype.root_url = Swiftype.root_url || "https://api.swiftype.com",
Swiftype.pingUrl = function(a, b) {
var c = setTimeout(b, 350)
, d = new Image;
return d.onload = d.onerror = function() {
clearTimeout(c),
b()
}
,
d.src = a,
!1
}
,
Swiftype.pingSearchResultClick = function(b, c, d) {
var e = {
t: (new Date).getTime(),
engine_key: b,
doc_id: c,
q: Swiftype.currentQuery
}
, f = Swiftype.root_url + "/api/v1/public/analytics/pc?" + a.param(e);
Swiftype.pingUrl(f, d)
}
,
a.fn.swiftypeSearch = function(b) {
var b = a.extend({}, a.fn.swiftypeSearch.defaults, b);
return this.each(function() {
var c = a(this)
, d = a.meta ? a.extend({}, b, c.data()) : b;
c.data("swiftype-config-search", d),
c.selectedCallback = function(b) {
return function(c) {
var e = a(this);
c.preventDefault(),
Swiftype.pingSearchResultClick(d.engineKey, b.id, function() {
window.location = e.attr("href")
})
}
}
,
c.registerResult = function(b, d) {
b.data("swiftype-item", d),
a("a", b).click(c.selectedCallback(d))
}
,
c.getContentCache = function() {
return a("#" + g)
}
;
var e = a(d.resultContainingElement)
, f = e.html()
, g = "st-content-cache"
, h = c.getContentCache()
, i = function(a, b) {
location.hash = "stq=" + encodeURIComponent(a) + "&stp=" + b
}
, j = function(b, c) {
function i(a) {
if (void 0 !== a) {
var b = a;
return "function" == typeof b && (b = b.call()),
b
}
}
c = a.extend({
page: 1
}, c);
var j = {};
h.length || (e.after("
"),
h.html(f).hide()),
d.loadingFunction(b, e),
Swiftype.currentQuery = b,
j.q = b,
j.engine_key = d.engineKey,
j.page = c.page,
j.per_page = i(d.perPage),
j.search_fields = i(d.searchFields),
j.fetch_fields = i(d.fetchFields),
j.facets = i(d.facets),
j.filters = i(d.filters),
j.document_types = i(d.documentTypes),
j.functional_boosts = i(d.functionalBoosts),
j.sort_field = i(d.sortField),
j.sort_direction = i(d.sortDirection),
j.spelling = i(d.spelling),
a.getJSON(Swiftype.root_url + "/api/v1/public/engines/search.json?callback=?", j).success(l)
};
a(window).hashchange(function() {
var b = a.hashParams();
if (b.stq)
j(b.stq, {
page: b.stp
});
else {
var d = c.getContentCache();
d.length && (e.html(d.html()),
d.remove())
}
});
var k = c.parents("form");
k && k.bind("submit", function(a) {
a.preventDefault();
var b = c.val();
i(b, 1)
}),
a(document).on("click", "[data-hash][data-page]", function(b) {
b.preventDefault();
var c = a(this);
i(a.hashParams().stq, c.data("page"))
}),
a(document).on("click", "[data-hash][data-spelling-suggestion]", function(b) {
b.preventDefault();
var c = a(this);
i(c.data("spelling-suggestion"), 1)
});
var l = function(a) {
"function" == typeof d.preRenderFunction && d.preRenderFunction.call(c, a),
d.renderResultsFunction(c.getContext(), a),
"function" == typeof d.postRenderFunction && d.postRenderFunction.call(c, a)
};
c.getContext = function() {
return {
config: d,
resultContainer: e,
registerResult: c.registerResult
}
}
,
a(window).hashchange()
})
}
;
var d = function(b, c) {
var d, e = -1, f = b.config;
a.each(c, function(a, b) {
b.num_pages > e && (d = a,
e = b.num_pages)
});
var g = c[d].current_page
, h = c[d].num_pages;
a(f.renderPaginationForType(d, g, h)).appendTo(b.resultContainer)
}
, e = function(b, c) {
var e = b.resultContainer
, f = b.config;
e.html(""),
a.each(c.records, function(c, d) {
a.each(d, function(d, g) {
b.registerResult(a(f.renderFunction(c, g)).appendTo(e), g)
})
}),
d(b, c.info)
}
, f = function(a, c) {
return '
"
}
, g = function(a, b) {
b.html('
loading...
')
}
, h = function(b) {
var c = 0
, d = this.getContext().resultContainer
, e = null;
b.info && a.each(b.info, function(a, b) {
c += b.total_result_count,
b.spelling_suggestion && (e = b.spelling_suggestion.text)
}),
0 === c && d.html("
No results found.
"),
null !== e && d.append('
")
}
, i = function(a, b, c) {
var d, e, f = '
';
return 1 != b && (d = b - 1,
f = f + '
« previous '),
c > b && (e = b + 1,
f = f + '
next » '),
f += "
"
};
a.fn.swiftypeSearch.defaults = {
attachTo: void 0,
documentTypes: void 0,
facets: void 0,
filters: void 0,
engineKey: void 0,
searchFields: void 0,
functionalBoosts: void 0,
sortField: void 0,
sortDirection: void 0,
fetchFields: void 0,
preRenderFunction: void 0,
postRenderFunction: h,
loadingFunction: g,
renderResultsFunction: e,
renderFunction: f,
renderPaginationForType: i,
perPage: 10,
spelling: "strict"
}
}(jQuery),
function(a) {
function b(a) {
this.size = 0,
this.limit = a,
this._keymap = {}
}
var c = function(a) {
var b, c, d = {};
if ("" === a)
return {};
for (b = 0; b < a.length; b += 1)
c = a[b].split("="),
2 === c.length && (d[c[0]] = decodeURIComponent(c[1].replace(/\+/g, " ")));
return d
};
a.queryParams = function() {
return c(window.location.search.substr(1).split("&"))
}
,
a.hashParams = function() {
return c(window.location.hash.substr(1).split("&"))
}
;
var d = 0;
window.Swiftype = window.Swiftype || {},
Swiftype.root_url = Swiftype.root_url || "https://api.swiftype.com",
Swiftype.pingUrl = function(a, b) {
var c = setTimeout(b, 350)
, d = new Image;
return d.onload = d.onerror = function() {
clearTimeout(c),
b()
}
,
d.src = a,
!1
}
,
Swiftype.pingAutoSelection = function(b, c, d, e) {
var f = {
t: (new Date).getTime(),
engine_key: b,
doc_id: c,
prefix: d
}
, g = Swiftype.root_url + "/api/v1/public/analytics/pas?" + a.param(f);
Swiftype.pingUrl(g, e)
}
,
Swiftype.findSelectedSection = function() {
function b(a) {
var b = a.replace(/\s+/g, "");
return b = b.toLowerCase()
}
var c = a.hashParams().sts;
c && (c = b(c),
a("h1, h2, h3, h4, h5, h6").each(function(d) {
if ($this = a(this),
b($this.text()).indexOf(c) >= 0)
return this.scrollIntoView(!0),
!1
}))
}
,
Swiftype.htmlEscape = Swiftype.htmlEscape || function(a) {
return String(a).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">")
}
,
a.fn.swiftype = function(c) {
Swiftype.findSelectedSection();
var c = a.extend({}, a.fn.swiftype.defaults, c);
return this.each(function() {
var f = a(this)
, g = a.meta ? a.extend({}, c, f.data()) : c;
f.attr("autocomplete", "off"),
f.data("swiftype-config-autocomplete", g),
f.submitted = !1,
f.cache = new b(10),
f.emptyQueries = [],
f.isEmpty = function(b) {
return a.inArray(e(b), this.emptyQueries) >= 0
}
,
f.addEmpty = function(a) {
f.emptyQueries.unshift(e(a))
}
;
var i = g.dropdownStylesFunction(f)
, j = a('
')
, k = a("
").addClass(g.suggestionListClass).appendTo(j).css(i).hide();
j.appendTo(g.autocompleteContainingElement);
var l = a("<" + g.suggestionListType + " />").appendTo(k);
f.data("swiftype-list", l),
f.abortCurrent = function() {
f.currentRequest && f.currentRequest.abort()
}
,
f.showList = function() {
n(g.disableAutocomplete) === !1 && k.show()
}
,
f.hideList = function(a) {
a ? k.hide() : setTimeout(function() {
k.hide()
}, 10)
}
,
f.focused = function() {
return f.is(":focus")
}
,
f.submitting = function() {
f.submitted = !0
}
,
f.listResults = function() {
return a(g.resultListSelector, l)
}
,
f.activeResult = function() {
return f.listResults().filter("." + g.activeItemClass).first()
}
,
f.prevResult = function() {
var a = f.listResults()
, b = a.index(f.activeResult())
, c = b - 1
, d = a.eq(c);
f.listResults().removeClass(g.activeItemClass),
c >= 0 && d.addClass(g.activeItemClass)
}
,
f.nextResult = function() {
var a = f.listResults()
, b = a.index(f.activeResult())
, c = b + 1
, d = a.eq(c);
f.listResults().removeClass(g.activeItemClass),
c >= 0 && d.addClass(g.activeItemClass)
}
,
f.selectedCallback = function(a) {
return function() {
var b = f.val()
, c = function() {
g.onComplete(a, b)
};
Swiftype.pingAutoSelection(g.engineKey, a.id, b, c)
}
}
,
f.registerResult = function(a, b) {
a.data("swiftype-item", b),
a.click(f.selectedCallback(b)).mouseover(function() {
f.listResults().removeClass(g.activeItemClass),
a.addClass(g.activeItemClass)
})
}
,
f.getContext = function() {
return {
config: g,
list: l,
registerResult: f.registerResult
}
}
;
var m, o = !1;
f.lastValue = "",
f.keyup(function(a) {
return o ? void (o = !1) : void (a.which > 36 && a.which < 41 || 16 == a.which || (g.typingDelay > 0 ? (clearTimeout(m),
m = setTimeout(function() {
h(f)
}, g.typingDelay)) : h(f)))
}),
f.styleDropdown = function() {
k.css(g.dropdownStylesFunction(f))
}
,
a(window).resize(function(a) {
f.styleDropdown()
}),
f.keydown(function(a) {
f.styleDropdown();
var b = f.activeResult();
switch (a.which) {
case 13:
0 !== b.length && l.is(":visible") ? (a.preventDefault(),
f.selectedCallback(b.data("swiftype-item"))()) : f.currentRequest && f.submitting(),
f.hideList(),
o = !0;
break;
case 38:
a.preventDefault(),
0 === b.length ? f.listResults().last().addClass(g.activeItemClass) : f.prevResult();
break;
case 40:
a.preventDefault(),
0 === b.length ? f.listResults().first().addClass(g.activeItemClass) : b != f.listResults().last() && f.nextResult();
break;
case 27:
f.hideList(),
o = !0;
break;
default:
f.submitted = !1
}
}),
f.keypress(function(a) {
13 == a.which && f.activeResult().length > 0 && a.preventDefault()
});
var p = !1
, q = !1;
a(document).bind("mousedown.swiftype" + ++d, function() {
p = !0
}),
a(document).bind("mouseup.swiftype" + d, function() {
p = !1,
q && (q = !1,
f.hideList())
}),
f.blur(function() {
p ? q = !0 : f.hideList()
}),
f.focus(function() {
setTimeout(function() {
f.select()
}, 10),
f.listResults().filter(":not(." + g.noResultsClass + ")").length > 0 && f.showList()
})
})
}
;
var e = function(b) {
return a.trim(b).toLowerCase()
}
, f = function(b, c) {
b.abortCurrent();
var d = {}
, f = b.data("swiftype-config-autocomplete");
d.q = c,
d.engine_key = f.engineKey,
d.search_fields = n(f.searchFields),
d.fetch_fields = n(f.fetchFields),
d.filters = n(f.filters),
d.document_types = n(f.documentTypes),
d.functional_boosts = n(f.functionalBoosts),
d.sort_field = n(f.sortField),
d.sort_direction = n(f.sortDirection),
d.per_page = f.resultLimit;
var g = Swiftype.root_url + "/api/v1/public/engines/suggest.json";
b.currentRequest = a.ajax({
type: "GET",
dataType: "jsonp",
url: g,
data: d
}).success(function(a) {
var d = e(c);
return a.record_count > 0 ? (b.cache.put(d, a.records),
void i(b, a.records, c)) : (b.addEmpty(d),
b.data("swiftype-list").empty(),
void b.hideList())
})
}
, g = function(a, b) {
var c = e(b);
if (a.isEmpty(c))
return a.data("swiftype-list").empty(),
void a.hideList();
var d = a.cache.get(c);
d ? i(a, d, b) : f(a, b)
}
, h = function(b) {
var c = b.val();
if (c !== b.lastValue)
return b.lastValue = c,
"" === a.trim(c) ? (b.data("swiftype-list").empty(),
void b.hideList()) : void ("undefined" != typeof b.data("swiftype-config-autocomplete").engineKey && g(b, c))
}
, i = function(a, b, c) {
var d = a.data("swiftype-list")
, e = a.data("swiftype-config-autocomplete");
d.empty(),
a.hideList(!0),
e.resultRenderFunction(a.getContext(), b);
var f = a.listResults().length;
(f > 0 && a.focused() || void 0 !== e.noResultsMessage) && (a.submitted ? a.submitted = !1 : a.showList())
}
, j = function(b, c) {
var d = b.list
, e = b.config;
a.each(c, function(c, f) {
a.each(f, function(f, g) {
b.registerResult(a("
" + e.renderFunction(c, g) + " ").appendTo(d), g)
})
})
}
, k = function(a, b) {
return '
' + Swiftype.htmlEscape(b.title) + "
"
}
, l = function(a, b) {
window.location = a.url
}
, m = function(b) {
var c = b.data("swiftype-config-autocomplete")
, d = c.attachTo ? a(c.attachTo) : b
, e = d.offset()
, f = {
position: "absolute",
"z-index": 9999,
top: e.top + d.outerHeight() + 1,
left: e.left
};
return c.setWidth && (f.width = d.outerWidth() - 2),
f
}
, n = function(a) {
if (void 0 !== a) {
var b = a;
return "function" == typeof b && (b = b.call()),
b
}
};
b.prototype.put = function(a, b) {
var c = {
key: a,
value: b
};
return this._keymap[a] = c,
this.tail ? (this.tail.newer = c,
c.older = this.tail) : this.head = c,
this.tail = c,
this.size === this.limit ? this.shift() : void this.size++
}
,
b.prototype.shift = function() {
var a = this.head;
return a && (this.head.newer ? (this.head = this.head.newer,
this.head.older = void 0) : this.head = void 0,
a.newer = a.older = void 0,
delete this._keymap[a.key]),
a
}
,
b.prototype.get = function(a, b) {
var c = this._keymap[a];
if (void 0 !== c)
return c === this.tail ? c.value : (c.newer && (c === this.head && (this.head = c.newer),
c.newer.older = c.older),
c.older && (c.older.newer = c.newer),
c.newer = void 0,
c.older = this.tail,
this.tail && (this.tail.newer = c),
this.tail = c,
b ? c : c.value)
}
,
b.prototype.remove = function(a) {
var b = this._keymap[a];
if (b)
return delete this._keymap[b.key],
b.newer && b.older ? (b.older.newer = b.newer,
b.newer.older = b.older) : b.newer ? (b.newer.older = void 0,
this.head = b.newer) : b.older ? (b.older.newer = void 0,
this.tail = b.older) : this.head = this.tail = void 0,
this.size--,
b.value
}
,
b.prototype.clear = function() {
this.head = this.tail = void 0,
this.size = 0,
this._keymap = {}
}
,
"function" == typeof Object.keys ? b.prototype.keys = function() {
return Object.keys(this._keymap)
}
: b.prototype.keys = function() {
var a = [];
for (var b in this._keymap)
a.push(b);
return a
}
,
a.fn.swiftype.defaults = {
activeItemClass: "active",
attachTo: void 0,
documentTypes: void 0,
filters: void 0,
engineKey: void 0,
searchFields: void 0,
functionalBoosts: void 0,
sortField: void 0,
sortDirection: void 0,
fetchFields: void 0,
noResultsClass: "noResults",
noResultsMessage: void 0,
onComplete: l,
resultRenderFunction: j,
renderFunction: k,
dropdownStylesFunction: m,
resultLimit: void 0,
suggestionListType: "ul",
suggestionListClass: "autocomplete",
resultListSelector: "li",
setWidth: !0,
typingDelay: 80,
disableAutocomplete: !1,
autocompleteContainingElement: "body"
}
}(jQuery),
$(function() {
function a(a) {
if ("function" == typeof jQuery && a instanceof jQuery && (a = a[0]),
void 0 !== $(".swtpbutton")[0])
try {
var b = $(".swtpbutton")[0].getBoundingClientRect()
, c = a.getBoundingClientRect();
return c.left >= 0 && c.bottom + b.height <= (window.innerHeight || document.documentElement.clientHeight) && c.right <= (window.innerWidth || document.documentElement.clientWidth)
} catch (a) {
}
}
function b() {
return function() {
if (void 0 !== $(".result").last()[0])
if (a($(".result").last()))
$(".swtpbutton").css({
position: "relative",
bottom: "initial",
width: "auto",
"padding-left": "0px",
"padding-right": "0px",
"border-left": "0px solid #e6e6e6",
"border-bottom": "0px solid #e6e6e6"
});
else {
var b = $(".result").last()[0].getBoundingClientRect().width;
$(".swtpbutton").css({
position: "fixed",
bottom: "0",
width: b,
"padding-left": "0px",
"padding-right": "0px",
"border-left": "1px solid #e6e6e6",
"border-bottom": "1px solid #e6e6e6"
})
}
}
}
var c = function(a, b) {
var c = b.highlight.body;
void 0 === c && (c = b.body.substring(0, 300)),
c = c.concat("...");
var d = '
' + b.url + ' ' + c.replace("matchCookie", " ").replace("match Cookie", "") + "
";
return d
}
, d = function(a, b) {
var c = '
' + b.title + "
";
return c = void 0 !== b.description ? c.concat('
' + b.description.replace("matchCookie", " ").replace("match Cookie", "") + "
") : void 0 !== b.highlight.body ? c.concat('
' + b.highlight.body.replace("matchCookie", " ").replace("match Cookie", "").substring(0, 700) + "
") : c.concat('
' + b.body.replace("matchCookie", " ").replace("match Cookie", "").substring(0, 700) + "
")
}
, e = function(a, b) {
var c = []
, d = "/search/#stq=" + $("#st-search-input").val() + "&stp=1"
, e = {
type: "post",
url: d,
title: "",
id: "",
_type: "page",
_index: "crawled",
_version: null,
sort: null,
highlight: {
title: ""
}
};
$.each(b, function(a, b) {
$.each(b, function(a, b) {
b.type && c.length < 5 && c.push(b),
c.length > 4
}),
c.length > 4
});
var f = $('
')
, g = $('
');
$.each(c, function(b, c) {
var d = '
' + c.title + "
";
d = void 0 !== c.description ? d.concat('
' + c.description.replace("matchCookie", " ").replace("match Cookie", "") + "
") : void 0 !== c.highlight.body ? d.concat('
' + c.highlight.body.replace("matchCookie", " ").replace("match Cookie", "").substring(0, 500) + "
") : d.concat('
' + c.body.replace("matchCookie", " ").replace("match Cookie", "").substring(0, 500) + "
"),
a.registerResult($('
' + d + " ").appendTo(g), c)
}),
c.length > 0 && (a.registerResult($('
See all results
').appendTo(g), e),
g.appendTo(f)),
c.length > 0 && f.appendTo(a.list)
}
, f = b();
$(window).on("DOMContentLoaded load resize scroll", f),
$("#st-search-input").keydown(function(a) {
13 !== a.which || $(".autocomplete li.active").is(":visible") || (window.location = "/search/#stq=" + $(this).val() + "&stp=1",
$("#st-search-input-2").val($(this).val()))
}),
$("#st-search-input-2").keydown(function(a) {
13 !== a.which || $(".autocomplete li.active").is(":visible") || (window.location.hash = "#stq=" + $(this).val() + "&stp=1",
$(".inpt-search-mobile").val($(this).val()),
$("#st-search-input").val($(this).val()))
}),
$(".inpt-search-mobile").keydown(function(a) {
13 !== a.which || $(".autocomplete li.active").is(":visible") || (window.location.hash = "#stq=" + $(this).val() + "&stp=1",
$("#st-search-input-2").val($(this).val()),
$(".search-overlay").toggle(),
$("body").removeClass("mobile-body-no-scroll"))
}),
$(document).ready(function() {
"" !== $.hashParams().stq && ($("#st-search-input").val($.hashParams().stq),
$("#st-search-input-2").val($.hashParams().stq),
$(".inpt-search-mobile").val($.hashParams().stq))
}),
$(window).hashchange(function() {
"" !== $.hashParams().stq && ($("#st-search-input").val($.hashParams().stq),
$("#st-search-input-2").val($.hashParams().stq),
$(".inpt-search-mobile").val($.hashParams().stq))
}),
$(document).delegate(".autocomplete li", "mouseout", function() {
$(this).removeClass("active")
}),
$("#st-search-input").swiftypeSearch({
resultContainingElement: "#st-results-container",
engineKey: "GZhgtDYXiyvDjz48t2SP",
renderFunction: c,
perPage: 10,
resultPageURL: "/search/"
}),
$(".inpt-search-mobile").swiftypeSearch({
resultContainingElement: "#st-results-container",
engineKey: "GZhgtDYXiyvDjz48t2SP",
renderFunction: c,
perPage: 10,
resultPageURL: "/search/"
}),
$("#st-search-input").swiftype({
engineKey: "GZhgtDYXiyvDjz48t2SP",
resultRenderFunction: e,
setWidth: !1,
resultLimit: 5,
fetchFields: {
page: ["url", "body", "title", "type", "highlight", "sections"]
}
}),
$("#st-search-input-2").swiftype({
engineKey: "GZhgtDYXiyvDjz48t2SP",
fetchFields: {
page: ["url", "body", "title", "type", "highlight", "sections"]
},
renderFunction: d,
resultLimit: 5
})
}),
!function(a) {
"use strict";
a.fn.succinct = function(b) {
var c = a.extend({
size: 240,
omission: "...",
ignore: !0
}, b);
return this.each(function() {
var b, d, e = a(this), f = /[!-\/:-@\[-`{-~]$/, g = function() {
e.each(function() {
b = a(this).text(),
b.length > c.size && (d = a.trim(b).substring(0, c.size).split(" ").slice(0, -1).join(" "),
c.ignore && (d = d.replace(f, "")),
a(this).text(d + c.omission))
})
};
g()
})
}
}(jQuery),
!function(a) {
"use strict";
a.fn.zAccordion = function(b) {
var c = {
timeout: 6e3,
width: null,
slideWidth: null,
tabWidth: null,
height: null,
startingSlide: 0,
slideClass: null,
easing: null,
speed: 1200,
auto: !0,
trigger: "click",
pause: !0,
invert: !1,
animationStart: function() {},
animationComplete: function() {},
buildComplete: function() {},
errors: !1
}
, d = {
displayError: function(a, b) {
window.console && b
},
findChildElements: function(a) {
return void 0 !== a.children().get(0)
},
getNext: function(a, b) {
var c = b + 1;
return c >= a && (c = 0),
c
},
fixHeight: function(a) {
return null === a.height && void 0 !== a.slideHeight ? (a.height = a.slideHeight,
!0) : null !== a.height && void 0 === a.slideHeight || (null !== a.height || void 0 !== a.slideHeight) && void 0
},
getUnits: function(a) {
return null !== a ? a.toString().indexOf("%") > -1 ? "%" : (a.toString().indexOf("px") > -1,
"px") : void 0
},
toInteger: function(a) {
return null !== a ? parseInt(a, 10) : void 0
},
sizeAccordion: function(a, b) {
return void 0 === b.width && void 0 === b.slideWidth && void 0 === b.tabWidth ? (d.displayError("width must be defined", b.errors),
!1) : void 0 !== b.width && void 0 === b.slideWidth && void 0 === b.tabWidth ? b.width > 100 && "%" === b.widthUnits ? (d.displayError("width cannot be over 100%", b.errors),
!1) : (b.slideWidthUnits = b.widthUnits,
b.tabWidthUnits = b.widthUnits,
"%" === b.widthUnits ? (b.tabWidth = 100 / (a.children().size() + 1),
b.slideWidth = 100 - (a.children().size() - 1) * b.tabWidth) : (b.tabWidth = b.width / (a.children().size() + 1),
b.slideWidth = b.width - (a.children().size() - 1) * b.tabWidth),
!0) : void 0 === b.width && void 0 !== b.slideWidth && void 0 === b.tabWidth ? (d.displayError("width must be defined", b.errors),
!1) : void 0 === b.width && void 0 === b.slideWidth && void 0 !== b.tabWidth ? (d.displayError("width must be defined", b.errors),
!1) : void 0 !== b.width && void 0 === b.slideWidth && void 0 !== b.tabWidth ? b.widthUnits !== b.tabWidthUnits ? (d.displayError("Units do not match", b.errors),
!1) : b.width > 100 && "%" === b.widthUnits ? (d.displayError("width cannot be over 100%", b.errors),
!1) : a.children().size() * b.tabWidth > 100 && "%" === b.widthUnits || a.children().size() * b.tabWidth > b.width && "px" === b.widthUnits ? (d.displayError("tabWidth too large for accordion", b.errors),
!1) : (b.slideWidthUnits = b.widthUnits,
b.slideWidth = "%" === b.widthUnits ? 100 - (a.children().size() - 1) * b.tabWidth : b.width - (a.children().size() - 1) * b.tabWidth,
!0) : void 0 !== b.width && void 0 !== b.slideWidth && void 0 === b.tabWidth ? b.widthUnits !== b.slideWidthUnits ? (d.displayError("Units do not match", b.errors),
!1) : b.width > 100 && "%" === b.widthUnits ? (d.displayError("width cannot be over 100%", b.errors),
!1) : b.slideWidth >= b.width ? (d.displayError("slideWidth cannot be greater than or equal to width", b.errors),
!1) : a.children().size() * b.slideWidth < 100 && "%" === b.widthUnits || a.children().size() * b.slideWidth < b.width && "px" === b.widthUnits ? (d.displayError("slideWidth too small for accordion", b.errors),
!1) : (b.tabWidthUnits = b.widthUnits,
b.tabWidth = "%" === b.widthUnits ? (100 - b.slideWidth) / (a.children().size() - 1) : (b.width - b.slideWidth) / (a.children().size() - 1),
!0) : void 0 === b.width && void 0 !== b.slideWidth && void 0 !== b.tabWidth ? (d.displayError("width must be defined", b.errors),
!1) : void 0 !== b.width && void 0 !== b.slideWidth && void 0 !== b.tabWidth ? (d.displayError("At maximum two of three attributes (width, slideWidth, and tabWidth) should be defined", b.errors),
!1) : void 0
},
timer: function(a) {
var b = a.data("next") + 1;
if (a.data("pause") && a.data("inside") && a.data("auto"))
try {
clearTimeout(a.data("interval"))
} catch (a) {}
else if (a.data("pause") && !a.data("inside") && a.data("auto")) {
try {
clearTimeout(a.data("interval"))
} catch (a) {}
a.data("interval", setTimeout(function() {
a.children(a.children().get(0).tagName + ":nth-child(" + b + ")").trigger(a.data("trigger"))
}, a.data("timeout")))
} else if (!a.data("pause") && a.data("auto")) {
try {
clearTimeout(a.data("interval"))
} catch (a) {}
a.data("interval", setTimeout(function() {
a.children(a.children().get(0).tagName + ":nth-child(" + b + ")").trigger(a.data("trigger"));
}, a.data("timeout")))
}
}
}
, e = {
init: function(b) {
var e, f = ["slideWidth", "tabWidth", "startingSlide", "slideClass", "animationStart", "animationComplete", "buildComplete"];
for (e = 0; e < f.length; e += 1)
void 0 !== a(this).data(f[e].toLowerCase()) && (a(this).data(f[e], a(this).data(f[e].toLowerCase())),
a(this).removeData(f[e].toLowerCase()));
return b = a.extend(c, b, a(this).data()),
this.length <= 0 ? (d.displayError("Selector does not exist", b.errors),
!1) : d.fixHeight(b) ? d.findChildElements(this) ? b.speed > b.timeout ? (d.displayError("Speed cannot be greater than timeout", b.errors),
!1) : (b.heightUnits = d.getUnits(b.height),
b.height = d.toInteger(b.height),
b.widthUnits = d.getUnits(b.width),
b.width = d.toInteger(b.width),
b.slideWidthUnits = d.getUnits(b.slideWidth),
b.slideWidth = d.toInteger(b.slideWidth),
b.tabWidthUnits = d.getUnits(b.tabWidth),
b.tabWidth = d.toInteger(b.tabWidth),
null !== b.slideClass && (b.slideOpenClass = b.slideClass + "-open",
b.slideClosedClass = b.slideClass + "-closed",
b.slidePreviousClass = b.slideClass + "-previous"),
!!d.sizeAccordion(this, b) && this.each(function() {
var c, e, f, g, h = b, i = a(this), j = [], k = -1;
c = h.slideWidth - h.tabWidth,
e = i.get(0).tagName,
f = i.children().get(0).tagName,
g = i.children().size(),
i.data(a.extend({}, {
auto: h.auto,
interval: null,
timeout: h.timeout,
trigger: h.trigger,
current: h.startingSlide,
previous: k,
next: d.getNext(g, h.startingSlide),
slideClass: h.slideClass,
inside: !1,
pause: h.pause
})),
"%" === h.heightUnits && (h.height = "BODY" === i.parent().get(0).tagName ? .01 * h.height * a(window).height() : .01 * h.height * i.parent().height(),
h.heightUnits = "px"),
i.children().each(function(b) {
var d, e, k;
e = h.invert ? e = (g - 1) * h.tabWidth - b * h.tabWidth : b * h.tabWidth,
j[b] = e,
d = h.invert ? 10 * (g - 1 - b) : 10 * b,
null !== h.slideClass && a(this).addClass(h.slideClass),
a(this).css({
top: 0,
"z-index": d,
margin: 0,
padding: 0,
float: "left",
display: "block",
position: "absolute",
overflow: "hidden",
width: h.slideWidth + h.widthUnits,
height: h.height + h.heightUnits
}),
"LI" === f && a(this).css({
"text-indent": 0
}),
h.invert ? a(this).css({
right: e + h.widthUnits,
float: "right"
}) : a(this).css({
left: e + h.widthUnits,
float: "left"
}),
b === h.startingSlide ? (a(this).css("cursor", "default"),
null !== h.slideClass && a(this).addClass(h.slideOpenClass)) : (a(this).css("cursor", "pointer"),
null !== h.slideClass && a(this).addClass(h.slideClosedClass),
b > h.startingSlide && !h.invert ? (k = b + 1,
i.children(f + ":nth-child(" + k + ")").css({
left: j[k - 1] + c + h.widthUnits
})) : b < h.startingSlide && h.invert && (k = b + 1,
i.children(f + ":nth-child(" + k + ")").css({
right: j[k - 1] + c + h.widthUnits
})))
}),
i.css({
display: "block",
height: h.height + h.heightUnits,
width: h.width + h.widthUnits,
padding: 0,
position: "relative",
overflow: "hidden"
}),
("UL" === e || "OL" === e) && i.css({
"list-style": "none"
}),
i.hover(function() {
if (i.data("inside", !0),
i.data("pause"))
try {
clearTimeout(i.data("interval"))
} catch (a) {}
}, function() {
i.data("inside", !1),
i.data("auto") && i.data("pause") && d.timer(i)
}),
i.children().bind(h.trigger, function() {
if (a(this).index() !== i.data("current")) {
var b, e, l, m;
for (l = k + 1,
m = i.data("current") + 1,
0 !== l && null !== h.slideClass && i.children(f + ":nth-child(" + l + ")").removeClass(h.slidePreviousClass),
i.children(f + ":nth-child(" + m + ")"),
null !== h.slideClass && i.children(f + ":nth-child(" + m + ")").addClass(h.slidePreviousClass),
k = i.data("current"),
i.data("previous", i.data("current")),
l = k,
l += 1,
i.data("current", a(this).index()),
m = i.data("current"),
m += 1,
i.children().css("cursor", "pointer"),
a(this).css("cursor", "default"),
null !== h.slideClass && (i.children().addClass(h.slideClosedClass).removeClass(h.slideOpenClass),
a(this).addClass(h.slideOpenClass).removeClass(h.slideClosedClass)),
i.data("next", d.getNext(g, a(this).index())),
d.timer(i),
h.animationStart(),
h.invert ? i.children(f + ":nth-child(" + m + ")").stop().animate({
right: j[i.data("current")] + h.widthUnits
}, h.speed, h.easing, h.animationComplete) : i.children(f + ":nth-child(" + m + ")").stop().animate({
left: j[i.data("current")] + h.widthUnits
}, h.speed, h.easing, h.animationComplete),
b = 0; g > b; b += 1)
e = b + 1,
b < i.data("current") && (h.invert ? i.children(f + ":nth-child(" + e + ")").stop().animate({
right: h.width - e * h.tabWidth + h.widthUnits
}, h.speed, h.easing) : i.children(f + ":nth-child(" + e + ")").stop().animate({
left: j[b] + h.widthUnits
}, h.speed, h.easing)),
b > i.data("current") && (h.invert ? i.children(f + ":nth-child(" + e + ")").stop().animate({
right: (g - e) * h.tabWidth + h.widthUnits
}, h.speed, h.easing) : i.children(f + ":nth-child(" + e + ")").stop().animate({
left: j[b] + c + h.widthUnits
}, h.speed, h.easing));
return !1
}
}),
i.data("auto") && d.timer(i),
h.buildComplete()
})) : (d.displayError("No child elements available", b.errors),
!1) : (d.displayError("height must be defined", b.errors),
!1)
},
stop: function() {
a(this).data("auto") && (clearTimeout(a(this).data("interval")),
a(this).data("auto", !1))
},
start: function() {
if (!a(this).data("auto")) {
var b = a(this).data("next") + 1;
a(this).data("auto", !0),
a(this).children(a(this).children().get(0).tagName + ":nth-child(" + b + ")").trigger(a(this).data("trigger"))
}
},
trigger: function(b) {
(b >= a(this).children().size() || 0 > b) && (b = 0),
b += 1,
a(this).children(a(this).children().get(0).tagName + ":nth-child(" + b + ")").trigger(a(this).data("trigger"))
},
destroy: function(b) {
var c, d, f = a(this).data("slideClass");
return void 0 !== b && (c = void 0 === b.removeStyleAttr || b.removeStyleAttr,
d = void 0 !== b.removeClasses && b.removeClasses),
clearTimeout(a(this).data("interval")),
a(this).children().stop().unbind(a(this).data("trigger")),
a(this).unbind("mouseenter mouseleave mouseover mouseout"),
c && (a(this).removeAttr("style"),
a(this).children().removeAttr("style")),
d && (a(this).children().removeClass(f),
a(this).children().removeClass(f + "-open"),
a(this).children().removeClass(f + "-closed"),
a(this).children().removeClass(f + "-previous")),
a(this).removeData(),
void 0 !== b && "undefined" !== b.destroyComplete && ("undefined" != typeof b.destroyComplete.afterDestroy && b.destroyComplete.afterDestroy(),
b.destroyComplete.rebuild) ? e.init.apply(this, [b.destroyComplete.rebuild]) : void 0
}
};
return e[b] ? e[b].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof b && b ? void a.error("zAccordion: " + b + " does not exist.") : e.init.apply(this, arguments)
}
}(jQuery);