function loadHtml5LightBox(o) {
!function (t) {
t.fn.html5lightbox = function (i) {
var e = this; e.options = t.extend({ defaultvideovolume: 1, autoplay: !0, html5player: !0, responsive: !0, nativehtml5controls: !1, videohidecontrols: !1, useflashonie9: !0, useflashonie10: !1, useflashonie11: !1, shownavigation: !0, thumbwidth: 96, thumbheight: 72, thumbgap: 4, thumbtopmargin: 12, thumbbottommargin: 12, thumbborder: 1, thumbbordercolor: "transparent", thumbhighlightbordercolor: "#fff", thumbopacity: 1, navbuttonwidth: 32, overlaybgcolor: "#000", overlayopacity: .9, bgcolor: "#fff", bordersize: 8, borderradius: 0, bordermargin: 16, bordertopmargin: 16, bordertopmarginsmall: 48, barautoheight: !0, barheight: 64, loadingwidth: 64, loadingheight: 64, resizespeed: 400, fadespeed: 400, jsfolder: o, skinsfoldername: "http://im.hunt.in/tri/skins/default/", loadingimage: "lightbox-loading.gif", nextimage: "lightbox-next.png", previmage: "lightbox-prev.png", closeimage: "lightbox-close.png", playvideoimage: "lightbox-playvideo.png", titlebgimage: "lightbox-titlebg.png", navarrowsprevimage: "lightbox-navprev.png", navarrowsnextimage: "lightbox-navnext.png", navarrowsalwaysshowontouch: !0, navarrowsbottomscreenwidth: 479, closeonoverlay: !0, alwaysshownavarrows: !1, showplaybutton: !0, playimage: "lightbox-play.png", pauseimage: "lightbox-pause.png", fullscreenmode: !1, fullscreencloseimage: "lightbox-close-fullscreen.png", fullscreennextimage: "lightbox-next-fullscreen.png", fullscreenprevimage: "lightbox-prev-fullscreen.png", videobgcolor: "#fff", showtitle: !0, titlestyle: "bottom", titleinsidecss: "color:#fff; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;", titlebottomcss: "color:#333; font-size:16px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left;", showdescription: !0, descriptioninsidecss: "color:#fff; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;", descriptionbottomcss: "color:#333; font-size:12px; font-family:Arial,Helvetica,sans-serif; overflow:hidden; text-align:left; margin:4px 0px 0px; padding: 0px;", showtitleprefix: !0, titleprefix: "%NUM / %TOTAL", autoslide: !1, slideinterval: 5e3, showtimer: !0, timerposition: "bottom", timerheight: 2, timercolor: "#dc572e", timeropacity: 1, initvimeo: !0, inityoutube: !0, imagepercentage: 75, sidetobottomscreenwidth: 479, errorwidth: 280, errorheight: 48, errorcss: "text-align:center; color:#ff0000; font-size:14px; font-family:Arial, sans-serif;", enabletouchswipe: !0, supportesckey: !0, supportarrowkeys: !0, version: "3.3", stamp: !0, freemark: "72,84,77,76,53,32,76,105,103,104,116,98,111,120,32,70,114,101,101,32,86,101,114,115,105,111,110" }, i), "undefined" != typeof html5lightbox_options && html5lightbox_options && t.extend(e.options, html5lightbox_options), t("div#html5lightbox_options").length && t.each(t("div#html5lightbox_options").data(), function (o, t) { e.options[o.toLowerCase()] = t }); var n = 960, s = 540, l = 0, r = 1, a = 2, h = 3, p = 4, d = 5, c = 6, m = 7, u = 8, g = 9; e.options.types = ["IMAGE", "FLASH", "VIDEO", "YOUTUBE", "VIMEO", "PDF", "MP3", "WEB", "FLV", "DAILYMOTION", "DIV"], e.options.htmlfolder = window.location.href.substr(0, window.location.href.lastIndexOf("/") + 1), e.options.skinsfolder = e.options.skinsfoldername, e.options.skinsfolder.length > 0 && "/" != e.options.skinsfolder[e.options.skinsfolder.length - 1] && (e.options.skinsfolder += "/"), "/" != e.options.skinsfolder.charAt(0) && "http:" != e.options.skinsfolder.substring(0, 5) && "https:" != e.options.skinsfolder.substring(0, 6) && (e.options.skinsfolder = e.options.jsfolder + e.options.skinsfolder); var b, f, w = "", x = e.options.freemark.split(","); for (b = 0; b < x.length; b++) w += String.fromCharCode(x[b]); e.options.freemark = w; var v = "hmtamgli5cboxh.iclolms"; for (b = 1; 5 >= b; b++) v = v.slice(0, b) + v.slice(b + 1); for (f = v.length, b = 0; 5 > b; b++) v = v.slice(0, f - 9 + b) + v.slice(f - 8 + b); -1 != e.options.htmlfolder.indexOf(v) && (e.options.stamp = !1), e.options.flashInstalled = !1; try { new ActiveXObject("ShockwaveFlash.ShockwaveFlash") && (e.options.flashInstalled = !0) } catch (y) { navigator.mimeTypes["application/x-shockwave-flash"] && (e.options.flashInstalled = !0) } if (e.options.html5VideoSupported = !!document.createElement("video").canPlayType, e.options.isChrome = null != navigator.userAgent.match(/Chrome/i), e.options.isFirefox = null != navigator.userAgent.match(/Firefox/i), e.options.isOpera = null != navigator.userAgent.match(/Opera/i) || null != navigator.userAgent.match(/OPR\//i), e.options.isSafari = null != navigator.userAgent.match(/Safari/i), e.options.isIE11 = null != navigator.userAgent.match(/Trident\/7/) && null != navigator.userAgent.match(/rv:11/), e.options.isIE = null != navigator.userAgent.match(/MSIE/i) && !e.options.isOpera, e.options.isIE10 = null != navigator.userAgent.match(/MSIE 10/i) && !this.options.isOpera, e.options.isIE9 = null != navigator.userAgent.match(/MSIE 9/i) && !e.options.isOpera, e.options.isIE8 = null != navigator.userAgent.match(/MSIE 8/i) && !e.options.isOpera, e.options.isIE7 = null != navigator.userAgent.match(/MSIE 7/i) && !e.options.isOpera, e.options.isIE6 = null != navigator.userAgent.match(/MSIE 6/i) && !e.options.isOpera, e.options.isIE678 = e.options.isIE6 || e.options.isIE7 || e.options.isIE8, e.options.isIE6789 = e.options.isIE6 || e.options.isIE7 || e.options.isIE8 || e.options.isIE9, e.options.isAndroid = null != navigator.userAgent.match(/Android/i), e.options.isIPad = null != navigator.userAgent.match(/iPad/i), e.options.isIPhone = null != navigator.userAgent.match(/iPod/i) || null != navigator.userAgent.match(/iPhone/i), e.options.isIOS = e.options.isIPad || e.options.isIPhone, e.options.isMobile = e.options.isAndroid || e.options.isIPad || e.options.isIPhone, e.options.isIOSLess5 = e.options.isIPad && e.options.isIPhone && (null != navigator.userAgent.match(/OS 4/i) || null != navigator.userAgent.match(/OS 3/i)), e.options.supportCSSPositionFixed = !e.options.isIE6 && !e.options.isIOSLess5, e.options.iequirksmode = e.options.isIE6789 && "CSS1Compat" != document.compatMode, e.options.isTouch = "ontouchstart" in window, e.options.isMobile && (e.options.autoplay = !1), e.options.navheight = 0, e.options.thumbgap += 2 * e.options.thumbborder, e.options.resizeTimeout = -1, e.slideTimeout = null, e.autosliding = !1, e.elemArray = new Array, e.options.curElem = -1, e.defaultoptions = t.extend({}, e.options), e.options.initvimeo && e.options.inityoutube) { var k = document.createElement("script"); k.src = ("https:" == document.location.protocol ? "https" : "http") + "://www.youtube.com/iframe_api"; var $ = document.getElementsByTagName("script")[0]; $.parentNode.insertBefore(k, $) } return e.showing = !1, e.supportKeyboard = function () { t(document).keyup(function (o) { e.showing && (e.options.supportesckey && 27 == o.keyCode ? e.finish() : e.options.supportarrowkeys && (39 == o.keyCode ? e.gotoSlide(-1) : 37 == o.keyCode && e.gotoSlide(-2))) }) }, e.supportKeyboard(), e.init = function () { e.showing = !1, e.readData(), e.createMarkup(), e.initSlide() }, e.readData = function () { e.each(function () { if ("a" == this.nodeName.toLowerCase() || "area" == this.nodeName.toLowerCase()) { var o = t(this), i = "mediatype" in o.data() ? o.data("mediatype") : e.checkType(o.attr("href")); if (!(0 > i)) { for (var n = 0; n < e.elemArray.length; n++) if (o.attr("href") == e.elemArray[n][r]) return; e.elemArray.push(new Array(i, o.attr("href"), o.attr("title"), o.data("group"), o.data("width"), o.data("height"), o.data("webm"), o.data("ogg"), o.data("thumbnail"), o.data("description"))) } } }) }, e.createMarkup = function () { e.options.titlecss || (e.options.titlecss = "inside" == e.options.titlestyle ? e.options.titleinsidecss : e.options.titlebottomcss), e.options.descriptioncss || (e.options.descriptioncss = "inside" == e.options.titlestyle ? e.options.descriptioninsidecss : e.options.descriptionbottomcss), e.options.titlecss = t.trim(e.options.titlecss), e.options.titlecss.length > 1 && ("{" == e.options.titlecss.charAt(0) && (e.options.titlecss = e.options.titlecss.substring(1)), "}" == e.options.titlecss.charAt(e.options.titlecss.length - 1) && (e.options.titlecss = e.options.titlecss.substring(0, e.options.titlecss.length - 1))), e.options.descriptioncss = t.trim(e.options.descriptioncss), e.options.descriptioncss.length > 1 && ("{" == e.options.descriptioncss.charAt(0) && (e.options.descriptioncss = e.options.descriptioncss.substring(1)), "}" == e.options.descriptioncss.charAt(e.options.descriptioncss.length - 1) && (e.options.descriptioncss = e.options.descriptioncss.substring(0, e.options.descriptioncss.length - 1))), e.options.errorcss = t.trim(e.options.errorcss), e.options.errorcss.length > 1 && ("{" == e.options.errorcss.charAt(0) && (e.options.errorcss = e.options.errorcss.substring(1)), "}" == e.options.errorcss.charAt(e.options.errorcss.length - 1) && (e.options.errorcss = e.options.errorcss.substring(0, e.options.errorcss.length - 1))); var o = ".html5-hide {display:none !important;} #html5box-html5-lightbox #html5-text {" + e.options.titlecss + "}"; o += "#html5box-html5-lightbox .html5-description {" + e.options.descriptioncss + "}", o += "#html5box-html5-lightbox .html5-error {" + e.options.errorcss + "}", (e.options.navarrowsalwaysshowontouch || e.options.alwaysshownavarrows) && (o += "#html5box-html5-lightbox .html5-prev-touch {left:0px;top:50%;margin-top:-16px;margin-left:-32px;} #html5box-html5-lightbox .html5-next-touch {right:0px;top:50%;margin-top:-16px;margin-right:-32px;}", o += "@media (max-width: " + e.options.navarrowsbottomscreenwidth + "px) { #html5box-html5-lightbox .html5-prev-touch {top:100%;left:0;margin:0;} #html5box-html5-lightbox .html5-next-touch {top:100%;right:0;margin:0;} }"), o += "#html5box-html5-lightbox .html5-prev-fullscreen {display:block;} #html5box-html5-lightbox .html5-next-fullscreen {display:block;} #html5box-html5-lightbox .html5-prev-bottom-fullscreen {display:none;} #html5box-html5-lightbox .html5-next-bottom-fullscreen {display:none;}", o += "@media (max-width: " + e.options.navarrowsbottomscreenwidth + "px) {#html5box-html5-lightbox .html5-prev-fullscreen {display:none;} #html5box-html5-lightbox .html5-next-fullscreen {display:none;} #html5box-html5-lightbox .html5-prev-bottom-fullscreen {display:block;} #html5box-html5-lightbox .html5-next-bottom-fullscreen {display:block;} }", "right" == e.options.titlestyle ? (o += "#html5box-html5-lightbox #html5-elem-wrap {width:" + e.options.imagepercentage + "%;height:100%;} #html5box-html5-lightbox #html5-elem-data-box {min-height:100%;}", o += "@media (max-width: " + e.options.sidetobottomscreenwidth + "px) {#html5box-html5-lightbox #html5-elem-wrap {width:100%;height:auto;} #html5box-html5-lightbox #html5-elem-data-box {width:100%;height:auto;min-height:0;}}") : "left" == e.options.titlestyle && (o += "#html5box-html5-lightbox #html5-elem-wrap {height:100%;} #html5box-html5-lightbox #html5-elem-data-box {width:" + String(100 - e.options.imagepercentage) + "%;min-height:100%;}", o += "@media (max-width: " + e.options.sidetobottomscreenwidth + "px) {#html5box-html5-lightbox #html5-elem-wrap {width:100%;height:auto;} #html5box-html5-lightbox #html5-elem-data-box {width:100%;height:auto;min-height:0;}}"), t("head").append(""), e.$lightbox = t("
The requested content cannot be loaded.
Please try again later.
"), e.options.positionFixed = e.options.supportCSSPositionFixed && e.options.responsive && !e.options.iequirksmode, e.$lightbox.css({ position: e.options.positionFixed ? "fixed" : "absolute" }), e.$lightbox.appendTo("body"), e.$lightboxBox = t("#html5-lightbox-box", e.$lightbox), e.$elem = t("#html5-elem-box", e.$lightbox), e.$elemWrap = t("#html5-elem-wrap", e.$lightbox), e.$loading = t("#html5-loading", e.$lightbox), e.$error = t("#html5-error", e.$lightbox), e.$image = t("#html5-image", e.$lightbox); var i = ""; "left" == e.options.titlestyle ? e.$elem.prepend(i) : e.$elem.append(i), e.$elemData = t("#html5-elem-data-box", e.$lightbox), e.$text = t("#html5-text", e.$lightbox), e.options.borderradius > 0 && (e.$elem.css({ "border-radius": e.options.borderradius + "px", "-moz-border-radius": e.options.borderradius + "px", "-webkit-border-radius": e.options.borderradius + "px" }), "inside" == e.options.titlestyle ? e.$elemWrap.css({ "border-radius": e.options.borderradius + "px", "-moz-border-radius": e.options.borderradius + "px", "-webkit-border-radius": e.options.borderradius + "px" }) : "bottom" == e.options.titlestyle && (e.$elemWrap.css({ "border-top-left-radius": e.options.borderradius + "px", "-moz-top-left-border-radius": e.options.borderradius + "px", "-webkit-top-left-border-radius": e.options.borderradius + "px", "border-top-right-radius": e.options.borderradius + "px", "-moz-top-right-border-radius": e.options.borderradius + "px", "-webkit-top-right-border-radius": e.options.borderradius + "px" }), e.$elemData.css({ "border-bottom-left-radius": e.options.borderradius + "px", "-moz-top-bottom-border-radius": e.options.borderradius + "px", "-webkit-bottom-left-border-radius": e.options.borderradius + "px", "border-bottom-right-radius": e.options.borderradius + "px", "-moz-bottom-right-border-radius": e.options.borderradius + "px", "-webkit-bottom-right-border-radius": e.options.borderradius + "px" }))), "right" == e.options.titlestyle || "left" == e.options.titlestyle ? (e.$lightboxBox.css({ "background-color": e.options.bgcolor }), "right" == e.options.titlestyle ? (e.$elemWrap.css({ position: "relative", "float": "left" }), e.$elemData.css({ position: "relative", overflow: "hidden", padding: e.options.bordersize + "px" })) : (e.$elemWrap.css({ position: "relative", overflow: "hidden" }), e.$elemData.css({ position: "relative", "float": "left", padding: e.options.bordersize + "px" }))) : "inside" == e.options.titlestyle ? (e.$elemData.css({ position: "absolute", margin: e.options.bordersize + "px", bottom: 0, left: 0, "background-color": "#333", "background-color": "rgba(51, 51, 51, 0.6)" }), e.$text.css({ padding: e.options.bordersize + "px " + 2 * e.options.bordersize + "px" })) : (e.$elemData.css({ position: "relative", width: "100%", height: e.options.barautoheight ? "auto" : e.options.barheight + "px", padding: "0 0 " + e.options.bordersize + "px 0", "background-color": e.options.bgcolor, "text-align": "left" }), e.$text.css({ margin: "0 " + e.options.bordersize + "px" })), e.options.fullscreenmode ? (e.$lightbox.append(""), e.$next = t(".html5-next-fullscreen", e.$lightbox), e.$prev = t(".html5-prev-fullscreen", e.$lightbox), e.$lightboxBox.append(""), e.$nextbottom = t(".html5-next-bottom-fullscreen", e.$lightbox), e.$prevbottom = t(".html5-prev-bottom-fullscreen", e.$lightbox), e.$nextbottom.click(function () { e.nextArrowClicked() }), e.$prevbottom.click(function () { e.prevArrowClicked() }), e.$lightbox.append(""), e.$close = t("#html5-close-fullscreen", e.$lightbox)) : (e.$elemWrap.append(""), e.$next = t("#html5-next", e.$lightbox), e.$prev = t("#html5-prev", e.$lightbox), (e.options.isTouch && e.options.navarrowsalwaysshowontouch || e.options.alwaysshownavarrows) && (e.$lightboxBox.append(""), e.$nexttouch = t(".html5-next-touch", e.$lightbox), e.$prevtouch = t(".html5-prev-touch", e.$lightbox), e.$nexttouch.click(function () { e.nextArrowClicked() }), e.$prevtouch.click(function () { e.prevArrowClicked() })), e.$lightboxBox.append(""), e.$close = t("#html5-close", e.$lightbox)), e.options.closeonoverlay && t("#html5-lightbox-overlay", e.$lightbox).click(e.finish), e.$close.click(e.finish), e.$next.click(function () { e.nextArrowClicked() }), e.$prev.click(function () { e.prevArrowClicked() }), t(window).resize(function () { clearTimeout(e.options.resizeTimeout), e.options.resizeTimeout = setTimeout(function () { e.resizeWindow() }, 500) }), t(window).scroll(function () { e.scrollBox() }), t(window).bind("orientationchange", function (o) { e.options.isMobile && e.resizeWindow() }), e.options.isIPhone && (e.options.windowInnerHeight = window.innerHeight, setInterval(function () { e.options.windowInnerHeight != window.innerHeight && (e.options.windowInnerHeight = window.innerHeight, e.resizeWindow()) }, 500)), e.options.enabletouchswipe && e.enableSwipe() }, e.slideTimer = function (o, t, i) { var e = this; e.timeout = o; var n = 50, s = null, l = 0, r = !1, a = !1, h = !1; return this.pause = function () { a && (r = !0, clearInterval(s)) }, this.resume = function (o) { (!h || o) && (h = !1, a && r && (r = !1, s = setInterval(function () { l += n, l > e.timeout && (clearInterval(s), t && t()), i && i(l / e.timeout) }, n))) }, this.stop = function () { clearInterval(s), i && i(-1), l = 0, r = !1, a = !1 }, this.start = function () { l = 0, r = !1, a = !0, s = setInterval(function () { l += n, l > e.timeout && (clearInterval(s), t && t()), i && i(l / e.timeout) }, n) }, this.startandpause = function () { l = 0, r = !0, a = !0, h = !0 }, this }, e.updateTimer = function (o) { var i = Math.round(100 * o); i > 100 && (i = 100), 0 > i && (i = 0), t("#html5-timer", e.$lightbox).css({ display: "block", width: i + "%" }) }, e.initSlide = function () { e.autosliding = !1, e.slideTimeout = e.slideTimer(e.options.slideinterval, function () { e.gotoSlide(-1) }, e.options.showtimer ? function (o) { e.updateTimer(o) } : null), e.options.autoslide && (e.slideTimeout.stop(), e.autosliding = !0) }, e.nextArrowClicked = function () { e.options.nextElem <= e.options.curElem && e.options.onlastarrowclicked && window[e.options.onlastarrowclicked] && "function" == typeof window[e.options.onlastarrowclicked] && window[e.options.onlastarrowclicked](), e.gotoSlide(-1) }, e.prevArrowClicked = function () { e.options.prevElem >= e.options.curElem && e.options.onfirstarrowclicked && window[e.options.onfirstarrowclicked] && "function" == typeof window[e.options.onfirstarrowclicked] && window[e.options.onfirstarrowclicked](), e.gotoSlide(-2) }, e.calcNextPrevElem = function () { e.options.nextElem = -1, e.options.prevElem = -1, e.options.inGroup = !1, e.options.groupIndex = 0, e.options.groupCount = 0; for (var o = e.elemArray[e.options.curElem][h], t = 0; t < e.elemArray.length; t++) e.matchGroup(o, e.elemArray[t][h]) && (t == e.options.curElem && (e.options.groupIndex = e.options.groupCount), e.options.groupCount++); var i, n = e.elemArray[e.options.curElem][h]; if (void 0 != n && null != n) { for (i = e.options.curElem + 1; i < e.elemArray.length; i++) if (e.matchGroup(n, e.elemArray[i][h])) { e.options.nextElem = i; break } if (e.options.nextElem < 0) for (i = 0; i < e.options.curElem; i++) if (e.matchGroup(n, e.elemArray[i][h])) { e.options.nextElem = i; break } if (e.options.nextElem >= 0) { for (i = e.options.curElem - 1; i >= 0; i--) if (e.matchGroup(n, e.elemArray[i][h])) { e.options.prevElem = i; break } if (e.options.prevElem < 0) for (i = e.elemArray.length - 1; i > e.options.curElem; i--) if (e.matchGroup(n, e.elemArray[i][h])) { e.options.prevElem = i; break } } } (e.options.nextElem >= 0 || e.options.prevElem >= 0) && (e.options.inGroup = !0) }, e.calcBoxPosition = function (o, i) { var n = o + 2 * e.options.bordersize, s = i + 2 * e.options.bordersize, l = window.innerHeight ? window.innerHeight : t(window).height(), r = Math.round((l - e.options.navheight) / 2 - s / 2); "bottom" == e.options.titlestyle && (r -= Math.round(e.options.barheight / 2)); var a = t(window).width() < e.options.navarrowsbottomscreenwidth ? e.options.bordertopmarginsmall : e.options.bordertopmargin; if (a > r && (r = a), window.self != window.top && parent.window.jQuery && parent.window.jQuery("#" + e.options.iframeid).length) { var h = parent.window.jQuery("#" + e.options.iframeid).offset().top, p = parent.window.document.body.scrollTop; r = a, r += p > h ? p - h : 0 } return [n, s, r] }, e.hideNavArrows = function () { var o = !1, t = !1; e.options.inGroup && ((e.options.arrowloop || !e.options.arrowloop && e.options.prevElem < e.options.curElem) && (o = !0), (e.options.arrowloop || !e.options.arrowloop && e.options.prevElem < e.options.curElem) && (t = !0)), o ? (e.$prev.removeClass("html5-hide"), e.$prevbottom && e.$prevbottom.removeClass("html5-hide"), e.$prevtouch && e.$prevtouch.removeClass("html5-hide")) : (e.$prev.addClass("html5-hide"), e.$prevbottom && e.$prevbottom.addClass("html5-hide"), e.$prevtouch && e.$prevtouch.addClass("html5-hide")), t ? (e.$next.removeClass("html5-hide"), e.$nextbottom && e.$nextbottom.removeClass("html5-hide"), e.$nexttouch && e.$nexttouch.removeClass("html5-hide")) : (e.$next.addClass("html5-hide"), e.$nextbottom && e.$nextbottom.addClass("html5-hide"), e.$nexttouch && e.$nexttouch.addClass("html5-hide")) }, e.clickHandler = function () { var o = t(this), i = {}; if (t.each(o.data(), function (o, t) { i[o.toLowerCase()] = t }), e.options = t.extend(e.options, e.defaultoptions, i), e.init(), e.elemArray.length <= 0) return !0; e.hideObjects(); for (var n = 0; n < e.elemArray.length && e.elemArray[n][r] != o.attr("href") ; n++); if (n == e.elemArray.length) return !0; e.options.curElem = n, e.calcNextPrevElem(), e.reset(), e.$lightbox.show(); var s = e.calcBoxPosition(e.options.loadingwidth, e.options.loadingheight), l = s[0], a = s[1], h = s[2]; return e.options.iequirksmode ? e.$lightboxBox.css({ top: h }) : e.$lightboxBox.css({ "margin-top": h }), e.options.positionFixed || e.$lightboxBox.css("margin-top", t(window).scrollTop() + e.options.bordertopmargin), "left" == e.options.titlestyle || "right" == e.options.titlestyle ? e.$lightboxBox.css({ width: l, height: a }) : (e.$lightboxBox.css({ width: l, height: "auto" }), e.$elemWrap.css({ width: l, height: a })), e.loadCurElem(), !1 }, e.loadThumbnail = function (o, i) { var n = new Image; t(n).load(function () { var n; n = this.width / this.height <= e.options.thumbwidth / e.options.thumbheight ? "width:100%;" : "height:100%;", t(".html5-nav-thumb").eq(i).html("") }), n.src = o }, e.matchGroup = function (o, i) { if (!o || !i) return !1; var e = o.split(":"), n = i.split(":"), s = !1; for (var l in e) if (t.inArray(e[l], n) > -1) { s = !0; break } return s }, e.showNavigation = function () { if (e.options.shownavigation && e.currentElem && e.currentElem[h]) { var o, i = !1, n = e.currentElem[h]; for (o = 0; o < e.elemArray.length; o++) if (e.matchGroup(n, e.elemArray[o][h]) && e.elemArray[o][u] && e.elemArray[o][u].length > 0) { i = !0; break } if (i && (e.options.navheight = e.options.thumbheight + e.options.thumbtopmargin + e.options.thumbbottommargin, !(t(".html5-nav").length > 0))) { t("body").append(""); var s = 0; for (o = 0; o < e.elemArray.length; o++) e.matchGroup(n, e.elemArray[o][h]) && e.elemArray[o][u] && e.elemArray[o][u].length > 0 && (t(".html5-nav-list").append(""), this.loadThumbnail(e.elemArray[o][u], s), s++); t(".html5-nav-thumb").hover(function () { t(this).css({ opacity: 1 }), t(this).css({ border: e.options.thumbborder + "px solid " + e.options.thumbhighlightbordercolor }) }, function () { t(this).css({ opacity: e.options.thumbopacity }), t(this).css({ border: e.options.thumbborder + "px solid " + e.options.thumbbordercolor }) }), t(".html5-nav-thumb").click(function () { var o = t(this).data("arrayindex"); o >= 0 && e.gotoSlide(o) }), e.options.totalwidth = s * (e.options.thumbgap + e.options.thumbwidth + 2 * e.options.thumbborder), t(".html5-nav-list").css({ display: "block", position: "relative", "margin-left": 0, width: e.options.totalwidth + "px" }).append(""); var l = t(".html5-nav-mask"), r = t(".html5-nav-prev"), a = t(".html5-nav-next"); r.click(function () { var o = t(".html5-nav-list"), i = t(".html5-nav-next"), n = t(window).width(), s = n - 2 * e.options.navbuttonwidth, l = parseInt(o.css("margin-left")) + s; l >= 0 ? (l = 0, t(this).css({ "background-position": "center left" })) : t(this).css({ "background-position": "center right" }), l <= s - e.options.totalwidth ? i.css({ "background-position": "center left" }) : i.css({ "background-position": "center right" }), o.animate({ "margin-left": l }) }), a.click(function () { var o = t(".html5-nav-list"), i = t(".html5-nav-prev"), n = t(window).width(), s = n - 2 * e.options.navbuttonwidth, l = parseInt(o.css("margin-left")) - s; l <= s - e.options.totalwidth ? (l = s - e.options.totalwidth, t(this).css({ "background-position": "center left" })) : t(this).css({ "background-position": "center right" }), l >= 0 ? i.css({ "background-position": "center left" }) : i.css({ "background-position": "center right" }), o.animate({ "margin-left": l }) }); var p = t(window).width(); e.options.totalwidth <= p ? (l.css({ width: e.options.totalwidth + "px" }), r.hide(), a.hide()) : (l.css({ width: p - 2 * e.options.navbuttonwidth + "px" }), r.show(), a.show()) } } }, e.loadElem = function (o) { switch (e.currentElem = o, e.showing = !0, e.showNavigation(), e.$elem.unbind("mouseenter").unbind("mouseleave").unbind("mousemove"), e.$loading.show(), e.options.onshowitem && window[e.options.onshowitem] && "function" == typeof window[e.options.onshowitem] && window[e.options.onshowitem](o), o[l]) { case 0: var i = new Image; t(i).load(function () { e.showImage(o, i.width, i.height) }), t(i).error(function () { e.showError() }), i.src = o[r]; break; case 1: e.showSWF(o); break; case 2: case 8: e.showVideo(o); break; case 3: case 4: case 9: e.showYoutubeVimeo(o); break; case 5: e.showPDF(o); break; case 6: e.showMP3(o); break; case 7: e.showWeb(o); break; case 10: e.showDiv(o) } }, e.loadCurElem = function () { e.loadElem(e.elemArray[e.options.curElem]) }, e.showError = function () { e.$loading.hide(), e.resizeLightbox(e.options.errorwidth, e.options.errorheight, !0, function () { e.$error.show(), e.$elem.fadeIn(e.options.fadespeed, function () { e.showData() }) }) }, e.calcTextWidth = function (o) { return o - 36 }, e.showTitle = function (o, i, n) { "inside" == e.options.titlestyle && e.$elemData.css({ width: o + "px" }); var s = ""; e.options.showtitle && i && i.length > 0 && (s += i), e.options.inGroup && (e.options.showtitleprefix && (s = e.options.titleprefix.replace("%NUM", e.options.groupIndex + 1).replace("%TOTAL", e.options.groupCount) + " " + s), e.options.showplaybutton && (s = " " + s)), e.options.showdescription && n && n.length > 0 && (s += '' + n + "
"), e.$text.html(s), e.options.inGroup && e.options.showplaybutton && (e.autosliding ? (t("#html5-play", e.$lightbox).hide(), t("#html5-pause", e.$lightbox).show()) : (t("#html5-play", e.$lightbox).show(), t("#html5-pause", e.$lightbox).hide()), t("#html5-play", e.$lightbox).click(function () { t("#html5-play", e.$lightbox).hide(), t("#html5-pause", e.$lightbox).show(), e.slideTimeout && (e.slideTimeout.stop(), e.slideTimeout.start(), e.autosliding = !0) }), t("#html5-pause", e.$lightbox).click(function () { t("#html5-play", e.$lightbox).show(), t("#html5-pause", e.$lightbox).hide(), e.slideTimeout && (e.slideTimeout.stop(), e.autosliding = !1) })) }, e.showImage = function (o, t, i) { var n, s; o[p] ? n = o[p] : (n = t, o[p] = t), o[d] ? s = o[d] : (s = i, o[d] = i); var l = e.calcElemSize({ w: n, h: s }, !0); e.resizeLightbox(l.w, l.h, !0, function () { e.showTitle(l.w, o[a], o[g]); var t = e.options.showtimer && e.options.inGroup ? "" : ""; e.$image.show(), e.$image.html("" + t + "
"), e.$elem.fadeIn(e.options.fadespeed, function () { e.showData() }), e.autosliding && (e.slideTimeout.stop(), e.slideTimeout.start()) }) }, e.showSWF = function (o) { var i = o[p] ? o[p] : n, l = o[d] ? o[d] : s, h = e.calcElemSize({ w: i, h: l }, !0); i = h.w, l = h.h, e.resizeLightbox(i, l, !0, function () { e.showTitle(h.w, o[a], o[g]), e.$image.html("").show(), e.embedFlash(t("#html5lightbox-swf"), o[r], "window", { width: i, height: l }), e.$elem.show(), e.showData(), e.autosliding && (e.slideTimeout.stop(), e.slideTimeout.start()) }) }, e.showVideo = function (o) {
e.slideTimeout.stop(); var i = o[p] ? o[p] : n, h = o[d] ? o[d] : s, u = e.calcElemSize({ w: i, h: h }, !0); i = u.w, h = u.h, e.resizeLightbox(i, h, !0, function () {
e.showTitle(u.w, o[a], o[g]), e.$image.html("").show(); var n = !1; if (e.options.isIE678 || 8 == o[l] || e.options.isIE9 && e.options.useflashonie9 || e.options.isIE10 && e.options.useflashonie10 || e.options.isIE11 && e.options.useflashonie11 ? n = !1 : e.options.isMobile ? n = !0 : !e.options.html5player && e.options.flashInstalled || !e.options.html5VideoSupported || (!e.options.isFirefox && !e.options.isOpera || (e.options.isFirefox || e.options.isOpera) && (o[m] || o[c])) && (n = !0), n) {
var s = o[r]; (e.options.isFirefox || e.options.isOpera || !s) && (s = o[c] ? o[c] : o[m]), e.embedHTML5Video(t("#html5lightbox-video"), s, e.options.autoplay);
} else { var p = o[r]; "/" != p.charAt(0) && "http:" != p.substring(0, 5) && "https:" != p.substring(0, 6) && (p = e.options.htmlfolder + p), e.embedFlash(t("#html5lightbox-video"), e.options.jsfolder + "html5boxplayer.swf", "transparent", { width: i, height: h, jsobjectname: "html5Lightbox", hidecontrols: e.options.videohidecontrols ? "1" : "0", hideplaybutton: "0", videofile: p, hdfile: "", ishd: "0", defaultvolume: e.options.defaultvideovolume, autoplay: e.options.autoplay ? "1" : "0", errorcss: ".html5box-error" + e.options.errorcss, id: 0 }) } e.$elem.show(), e.showData()
})
}, e.loadNext = function () { t(window).trigger("html5lightbox.videofinished"), e.autosliding && e.gotoSlide(-1) }, e.getYoutubeParams = function (o) { var t = {}; if (o.indexOf("?") < 0) return t; for (var i = o.substring(o.indexOf("?") + 1).split("&"), e = 0; e < i.length; e++) { var n = i[e].split("="); n && 2 == n.length && "v" != n[0].toLowerCase() && (t[n[0].toLowerCase()] = n[1]) } return t }, e.prepareYoutubeHref = function (o) { var t = "", i = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\??v?=?))([^#\&\?]*).*/, e = o.match(i); e && e[7] && 11 == e[7].length && (t = e[7]); var n = "https:" == window.location.protocol ? "https:" : "http:", s = n + "//www.youtube.com/embed/" + t, l = this.getYoutubeParams(o), r = !0; for (var a in l) r ? (s += "?", r = !1) : s += "&", s += a + "=" + l[a]; return s }, e.prepareDailymotionHref = function (o) { if (o.match(/\:\/\/.*(dai\.ly)/i)) { var t = "https:" == window.location.protocol ? "https:" : "http:", i = o.match(/(dai\.ly\/)([a-zA-Z0-9\-\_]+)/)[2]; o = t + "//www.dailymotion.com/embed/video/" + i } return o }, e.showYoutubeVimeo = function (o) { e.slideTimeout.stop(); var i = o[p] ? o[p] : n, h = o[d] ? o[d] : s, c = e.calcElemSize({ w: i, h: h }, !0); i = c.w, h = c.h, e.resizeLightbox(i, h, !0, function () { e.showTitle(c.w, o[a], o[g]), e.$image.html("").show(); var i = o[r]; if (3 == o[l] && (i = e.prepareYoutubeHref(i)), 9 == o[l] && (i = e.prepareDailymotionHref(i)), e.options.autoplay && (i += i.indexOf("?") < 0 ? "?autoplay=1" : "&autoplay=1"), 3 == o[l] ? (i += i.indexOf("?") < 0 ? "?wmode=transparent&rel=0" : "&wmode=transparent&rel=0", e.options.videohidecontrols && (i += "&controls=0&showinfo=0"), i += "&enablejsapi=1&origin=" + document.location.protocol + "//" + document.location.hostname) : 4 == o[l] && (i += i.indexOf("?") < 0 ? "?" : "&", i += "api=1&player_id=html5boxiframevideo"), t("#html5lightbox-video").html(""), e.$elem.show(), e.showData(), 3 == o[l] && "object" == typeof YT && "function" == typeof YT.Player) new YT.Player("html5boxiframevideo", { events: { onStateChange: function (o) { o.data == YT.PlayerState.ENDED && (t(window).trigger("html5lightbox.videofinished"), e.autosliding && e.gotoSlide(-1)) } } }); else if (4 == o[l] && "function" == typeof $f) { var n = t("#html5boxiframevideo")[0], s = $f(n); s.addEvent("ready", function () { s.addEvent("finish", function (o) { t(window).trigger("html5lightbox.videofinished"), e.autosliding && e.gotoSlide(-1) }) }) } }) }, e.showPDF = function (o) { }, e.showMP3 = function (o) { }, e.showDiv = function (o) { var i = t(window).width(), n = window.innerHeight ? window.innerHeight : t(window).height(), s = o[p] ? o[p] : i, l = o[d] ? o[d] : n - e.options.navheight, h = e.calcElemSize({ w: s, h: l }, !1); s = h.w, l = h.h, e.resizeLightbox(s, l, !0, function () { e.$loading.hide(), e.showTitle(h.w, o[a], o[g]), e.$image.html("").show(); var i = o[r]; t(i).length > 0 ? t("#html5lightbox-div").html(t(i).html()) : t("#html5lightbox-div").html("The specified div ID does not exist.
"), e.$elem.show(), e.showData(), e.autosliding && (e.slideTimeout.stop(), e.slideTimeout.start()) }) }, e.showWeb = function (o) { var i = t(window).width(), n = window.innerHeight ? window.innerHeight : t(window).height(), s = o[p] ? o[p] : i, l = o[d] ? o[d] : n - e.options.navheight, h = e.calcElemSize({ w: s, h: l }, !1); s = h.w, l = h.h, e.resizeLightbox(s, l, !0, function () { e.$loading.hide(), e.showTitle(h.w, o[a], o[g]), e.$image.html("").show(), t("#html5lightbox-web").html(""), e.$elem.show(), e.showData(), e.autosliding && (e.slideTimeout.stop(), e.slideTimeout.start()) }) }, e.scrollBox = function () { }, e.resizeWindow = function () { if (e.currentElem && e.options.responsive) { var o, i, r, a = t(window).width(), h = window.innerHeight ? window.innerHeight : t(window).height(); 7 == e.currentElem[l] || 10 == e.currentElem[l] ? (o = e.currentElem[p] ? e.currentElem[p] : a, i = e.currentElem[d] ? e.currentElem[d] : h - e.options.navheight, r = !1) : (o = e.currentElem[p] ? e.currentElem[p] : n, i = e.currentElem[d] ? e.currentElem[d] : s, r = !0); var c = e.calcElemSize({ w: o, h: i }, r), m = e.calcBoxPosition(c.w, c.h), u = m[0], g = m[1], b = m[2]; if (e.$lightboxBox.css({ "margin-top": b }), e.options.positionFixed || e.$lightboxBox.css("margin-top", t(window).scrollTop() + e.options.bordertopmargin), "left" == e.options.titlestyle || "right" == e.options.titlestyle ? e.$lightboxBox.css({ width: u, height: g }) : (e.$lightboxBox.css({ width: u, height: "auto" }), e.$elemWrap.css({ width: u, height: g })), "inside" == e.options.titlestyle && e.$elemData.css({ width: c.w + "px" }), !(t(".html5-nav").length <= 0)) { t(".html5-nav-list").css({ "margin-left": 0 }); var f = t(".html5-nav-mask"), w = t(".html5-nav-prev"), x = t(".html5-nav-next"), a = t(window).width(); e.options.totalwidth <= a ? (f.css({ width: e.options.totalwidth + "px" }), w.hide(), x.hide()) : (f.css({ width: a - 2 * e.options.navbuttonwidth + "px" }), w.show(), x.show()) } } }, e.calcElemSize = function (o, i) { if (!e.options.responsive) return o; var n = t(window).width(); n = n ? n : t(document).width(); var s = window.innerHeight ? window.innerHeight : t(window).height(); s = s ? s : t(document).height(), ("left" == e.options.titlestyle || "right" == e.options.titlestyle) && n > e.options.sidetobottomscreenwidth && (o.w = 100 * o.w / e.options.imagepercentage); var l = t(window).width() < e.options.navarrowsbottomscreenwidth ? e.options.bordertopmarginsmall : e.options.bordertopmargin, r = s - e.options.navheight - 2 * e.options.bordersize - 2 * l; "bottom" == e.options.titlestyle && (r -= e.options.barheight), ("left" == e.options.titlestyle || "right" == e.options.titlestyle) && n <= e.options.sidetobottomscreenwidth && (i = !1), o.h > r && (i && (o.w = Math.round(o.w * r / o.h)), o.h = r); var a = n - 2 * e.options.bordersize - 2 * e.options.bordermargin; return (e.options.fullscreenmode && n > e.options.navarrowsbottomscreenwidth || (e.options.isTouch && e.options.navarrowsalwaysshowontouch || e.options.alwaysshownavarrows) && n > e.options.navarrowsbottomscreenwidth) && (a -= 64), o.w > a && (i && (o.h = Math.round(o.h * a / o.w)), o.w = a), o }, e.showData = function () { e.$text.text().length > 0 && e.$elemData.show(), ("bottom" == e.options.titlestyle || "inside" == e.options.titlestyle) && e.$lightboxBox.css({ height: "auto" }), e.$text.text().length > 0 && "bottom" == e.options.titlestyle && e.$elemData.css({ "max-height": e.options.barheight + "px" }), t("#html5-lightbox-overlay", e.$lightbox).css({ height: Math.max(t(window).height(), t(document).height()) }), t(window).trigger("html5lightbox.lightboxopened") }, e.resizeLightbox = function (o, i, n, s) { e.hideNavArrows(); var l = e.calcBoxPosition(o, i), r = l[0], a = l[1], h = l[2]; if (e.$loading.hide(), e.options.nextElem <= e.options.curElem && e.options.onlastitem && window[e.options.onlastitem] && "function" == typeof window[e.options.onlastitem] && window[e.options.onlastitem](e.currentElem), e.options.prevElem >= e.options.curElem && e.options.onfirstitem && window[e.options.onfirstitem] && "function" == typeof window[e.options.onfirstitem] && window[e.options.onfirstitem](e.currentElem), e.options.fullscreenmode || e.options.isTouch && e.options.navarrowsalwaysshowontouch || e.options.alwaysshownavarrows || (e.$elem.bind("mouseenter mousemove", function () { (e.options.arrowloop && e.options.prevElem >= 0 || !e.options.arrowloop && e.options.prevElem >= 0 && e.options.prevElem < e.options.curElem) && e.$prev.fadeIn(), (e.options.arrowloop && e.options.nextElem >= 0 || !e.options.arrowloop && e.options.nextElem >= 0 && e.options.nextElem > e.options.curElem) && e.$next.fadeIn() }), e.$elem.bind("mouseleave", function () { e.$next.fadeOut(), e.$prev.fadeOut() })), e.$lightboxBox.css({ "margin-top": h }), e.options.positionFixed || e.$lightboxBox.css("margin-top", t(window).scrollTop() + e.options.bordertopmargin), "left" == e.options.titlestyle || "right" == e.options.titlestyle) { var p = n ? e.options.resizespeed : 0; r == e.$lightboxBox.width() && a == e.$lightboxBox.height() && (p = 0), e.$lightboxBox.animate({ width: r }, p).animate({ height: a }, p, function () { e.onAnimateFinish(s) }) } else { var p = n ? e.options.resizespeed : 0; r == e.$elemWrap.width() && a == e.$elemWrap.height() && (p = 0), e.$lightboxBox.css({ width: r, height: "auto" }), e.$elemWrap.animate({ width: r }, p).animate({ height: a }, p, function () { e.onAnimateFinish(s) }) } }, e.onAnimateFinish = function (o) { e.$loading.show(), e.$close.show(), e.$elem.css({ "background-color": e.options.bgcolor }), o() }, e.reset = function () { e.showing = !1, e.$image.empty(), e.$text.empty(), e.$error.hide(), e.$loading.hide(), e.$image.hide(), ("bottom" == e.options.titlestyle || "inside" == e.options.titlestyle) && e.$elemData.hide(), e.options.fullscreenmode || e.$close.hide(), e.$elem.css({ "background-color": "" }) }, e.resetNavigation = function () { e.options.navheight = 0, t(".html5-nav").remove() }, e.finish = function () { t("#html5-lightbox-video", e.$lightbox).length && t("#html5-lightbox-video", e.$lightbox).attr("src", ""), t("head").find("style").each(function () { "html5box-html5-lightbox" == t(this).data("creator") && t(this).remove() }), e.slideTimeout.stop(), e.reset(), e.resetNavigation(), e.$lightbox.remove(), e.showObjects(), e.options.oncloselightbox && window[e.options.oncloselightbox] && "function" == typeof window[e.options.oncloselightbox] && window[e.options.oncloselightbox](e.currentElem), e.onLightboxClosed && "function" == typeof e.onLightboxClosed && e.onLightboxClosed(e.currentElem) }, e.pauseSlide = function () { }, e.playSlide = function () { }, e.gotoSlide = function (o) { if (-1 == o) { if (e.options.nextElem < 0) return; e.options.curElem = e.options.nextElem } else if (-2 == o) { if (e.options.prevElem < 0) return; e.options.curElem = e.options.prevElem } else o >= 0 && (e.options.curElem = o); e.autosliding && e.slideTimeout.stop(), e.calcNextPrevElem(), e.reset(), e.loadCurElem() }, e.enableSwipe = function () { e.$elem.html5lightboxTouchSwipe({ preventWebBrowser: !1, swipeLeft: function () { e.gotoSlide(-1) }, swipeRight: function () { e.gotoSlide(-2) } }) }, e.hideObjects = function () { t("select, embed, object").css({ visibility: "hidden" }) }, e.showObjects = function () { t("select, embed, object").css({ visibility: "visible" }) }, e.embedHTML5Video = function (o, i, n) { o.html(""), e.options.nativehtml5controls || (t("video", o).data("src", i), t("video", o).lightboxHTML5VideoControls(e.options.skinsfolder, e, e.options.videohidecontrols, !1, e.options.defaultvideovolume)), t("video", o).unbind("ended").bind("ended", function () { t(window).trigger("html5lightbox.videofinished"), e.autosliding && e.gotoSlide(-1) }) }, e.embedFlash = function (o, i, n, s) { if (e.options.flashInstalled) { var l = { pluginspage: "http://www.adobe.com/go/getflashplayer", quality: "high", allowFullScreen: "true", allowScriptAccess: "always", type: "application/x-shockwave-flash" }; l.width = "100%", l.height = "100%", l.src = i, l.flashVars = t.param(s), l.wmode = n; var r = ""; for (var a in l) r += a + "=" + l[a] + " "; o.html("") } else o.html("The required Adobe Flash Player plugin is not installed
") }, e.checkType = function (o) { return o ? o.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i) ? 0 : o.match(/[^\.]\.(swf)\s*$/i) ? 1 : o.match(/\.(mp4|m4v|ogv|ogg|webm)(.*)?$/i) ? 2 : o.match(/\:\/\/.*(youtube\.com)/i) || o.match(/\:\/\/.*(youtu\.be)/i) ? 3 : o.match(/\:\/\/.*(vimeo\.com)/i) ? 4 : o.match(/\:\/\/.*(dailymotion\.com)/i) || o.match(/\:\/\/.*(dai\.ly)/i) ? 9 : o.match(/[^\.]\.(pdf)\s*$/i) ? 5 : o.match(/[^\.]\.(mp3)\s*$/i) ? 6 : o.match(/[^\.]\.(flv)\s*$/i) ? 8 : o.match(/\#\w+/i) ? 10 : 7 : -1 }, e.showLightbox = function (o, i, n, s, l, r, a, h, p) { e.options = t.extend(e.options, e.defaultoptions), e.init(), e.reset(), e.$lightbox.show(); var d = e.calcBoxPosition(e.options.loadingwidth, e.options.loadingheight), c = d[0], m = d[1], u = d[2]; e.$lightboxBox.css({ "margin-top": u }), e.options.positionFixed || e.$lightboxBox.css("margin-top", t(window).scrollTop() + e.options.bordertopmargin), "left" == e.options.titlestyle || "right" == e.options.titlestyle ? e.$lightboxBox.css({ width: c, height: m }) : (e.$lightboxBox.css({ width: c, height: "auto" }), e.$elemWrap.css({ width: c, height: m })), e.loadElem(new Array(o, i, n, null, s, l, r, a, h, p)) }, e.addItem = function (o, t, i, n, s, l, r, a, h) { type = e.checkType(o), e.elemArray.push(new Array(type, o, t, i, n, s, l, r, a, h)) }, e.showItem = function (o) { if (e.options = t.extend(e.options, e.defaultoptions), e.init(), e.elemArray.length <= 0) return !0; e.hideObjects(); for (var i = 0; i < e.elemArray.length && e.elemArray[i][r] != o; i++); if (i == e.elemArray.length) return !0; e.options.curElem = i, e.calcNextPrevElem(), e.reset(), e.$lightbox.show(); var n = e.calcBoxPosition(e.options.loadingwidth, e.options.loadingheight), s = n[0], l = n[1], a = n[2]; return e.$lightboxBox.css({ "margin-top": a }), e.options.positionFixed || e.$lightboxBox.css("margin-top", t(window).scrollTop() + e.options.bordertopmargin), "left" == e.options.titlestyle || "right" == e.options.titlestyle ? e.$lightboxBox.css({ width: s, height: l }) : (e.$lightboxBox.css({ width: s, height: "auto" }), e.$elemWrap.css({ width: s, height: l })), e.loadCurElem(), !1 }, e.unbind("click").click(e.clickHandler)
}
}(jQuery), function (o) { o.fn.html5lightboxTouchSwipe = function (t) { var i = { preventWebBrowser: !1, swipeLeft: null, swipeRight: null, swipeTop: null, swipeBottom: null }; return t && o.extend(i, t), this.each(function () { function t(o) { var t = o.originalEvent; t.targetTouches.length >= 1 ? (r = t.targetTouches[0].pageX, a = t.targetTouches[0].pageY) : s(o) } function e(o) { i.preventWebBrowser && o.preventDefault(); var t = o.originalEvent; t.targetTouches.length >= 1 ? (h = t.targetTouches[0].pageX, p = t.targetTouches[0].pageY) : s(o) } function n(o) { h > 0 || p > 0 ? (l(), s(o)) : s(o) } function s(o) { r = -1, a = -1, h = -1, p = -1 } function l() { Math.abs(h - r) > Math.abs(p - a) ? h > r ? i.swipeRight && i.swipeRight.call() : i.swipeLeft && i.swipeLeft.call() : p > a ? i.swipeBottom && i.swipeBottom.call() : i.swipeTop && i.swipeTop.call() } var r = -1, a = -1, h = -1, p = -1; try { o(this).bind("touchstart", t), o(this).bind("touchmove", e), o(this).bind("touchend", n), o(this).bind("touchcancel", s) } catch (d) { } }) } }(jQuery), function (o) { o.fn.lightboxHTML5VideoControls = function (t, i, e, n, s) { var l = "ontouchstart" in window, r = l ? "touchstart" : "mousedown", a = l ? "touchmove" : "mousemove", h = l ? "touchcancel" : "mouseup", p = "click", d = 32, c = l ? 48 : 36, m = null, u = null, g = !1, b = !1, f = !0, w = null != navigator.userAgent.match(/iPod/i) || null != navigator.userAgent.match(/iPhone/i), x = o(this).data("ishd"), v = o(this).data("hd"), y = o(this).data("src"), k = o(this); if (k.get(0).removeAttribute("controls"), w) { var $ = k.height() - c; k.css({ height: $ }) } var E = o("
"); w || (k.after(E), E.css({ position: "absolute", top: "50%", left: "50%", display: "block", cursor: "pointer", width: 64, height: 64, "margin-left": -32, "margin-top": -32, "background-image": "url('" + t + "html5boxplayer_playvideo.png')", "background-position": "center center", "background-repeat": "no-repeat" }).bind(p, function () { k.get(0).play() })); var A = o("
"), T = o("
"); k.after(T), k.after(A), A.css({ display: "none", position: "fixed", left: 0, top: 0, bottom: 0, right: 0, "z-index": 2147483647 }), T.css({ display: "block", position: "absolute", width: "100%", height: c, left: 0, bottom: 0, right: 0, "max-width": "640px", margin: "0 auto" }); var S = function () { f = !0 }; k.bind(p, function () { f = !0 }).hover(function () { f = !0 }, function () { f = !1 }), e || setInterval(function () { f && (T.show(), f = !1, clearTimeout(m), m = setTimeout(function () { k.get(0).paused || T.fadeOut() }, 5e3)) }, 250), o(".html5boxVideoControlsBg", T).css({ display: "block", position: "absolute", width: "100%", height: "100%", left: 0, top: 0, "background-color": "#000000", opacity: .7, filter: "alpha(opacity=70)" }), o(".html5boxPlayPause", T).css({ display: "block", position: "relative", width: d + "px", height: d + "px", margin: Math.floor((c - d) / 2), "float": "left" }); var z = o(".html5boxPlay", T), I = o(".html5boxPause", T); z.css({ display: "block", position: "absolute", top: 0, left: 0, width: d + "px", height: d + "px", cursor: "pointer", "background-image": "url('" + t + "html5boxplayer_playpause.png')", "background-position": "top left" }).hover(function () { o(this).css({ "background-position": "bottom left" }) }, function () { o(this).css({ "background-position": "top left" }) }).bind(p, function () { k.get(0).play() }), I.css({ display: "none", position: "absolute", top: 0, left: 0, width: d + "px", height: d + "px", cursor: "pointer", "background-image": "url('" + t + "html5boxplayer_playpause.png')", "background-position": "top right" }).hover(function () { o(this).css({ "background-position": "bottom right" }) }, function () { o(this).css({ "background-position": "top right" }) }).bind(p, function () { k.get(0).pause() }); var B = o(".html5boxTimeCurrent", T), F = o(".html5boxTimeTotal", T), C = o(".html5boxSeeker", T), P = o(".html5boxSeekerPlay", T), M = o(".html5boxSeekerBuffer", T), L = o(".html5boxSeekerHandler", T); if (B.css({ display: "block", position: "relative", "float": "left", "line-height": c + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff" }), F.css({ display: "block", position: "relative", "float": "right", "line-height": c + "px", "font-weight": "normal", "font-size": "12px", margin: "0 8px", "font-family": "Arial, Helvetica, sans-serif", color: "#fff" }), C.css({ display: "block", cursor: "pointer", overflow: "hidden", position: "relative", height: "10px", "background-color": "#222", margin: Math.floor((c - 10) / 2) + "px 4px" }).bind(r, function (o) { var t = l ? o.originalEvent.touches[0] : o, i = t.pageX - C.offset().left; P.css({ width: i }), k.get(0).currentTime = i * k.get(0).duration / C.width(), C.bind(a, function (o) { var t = l ? o.originalEvent.touches[0] : o, i = t.pageX - C.offset().left; P.css({ width: i }), k.get(0).currentTime = i * k.get(0).duration / C.width() }) }).bind(h, function () { C.unbind(a) }), M.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#444" }), P.css({ display: "block", position: "absolute", left: 0, top: 0, height: "100%", "background-color": "#fcc500" }), !w && (k.get(0).requestFullscreen || k.get(0).webkitRequestFullScreen || k.get(0).mozRequestFullScreen || k.get(0).webkitEnterFullScreen || k.get(0).msRequestFullscreen)) { var O = function (o) { o ? (k.get(0).requestFullscreen ? k.get(0).requestFullscreen() : k.get(0).webkitRequestFullScreen ? k.get(0).webkitRequestFullScreen() : k.get(0).mozRequestFullScreen ? k.get(0).mozRequestFullScreen() : k.get(0).webkitEnterFullScreen && k.get(0).webkitEnterFullScreen(), k.get(0).msRequestFullscreen && k.get(0).msRequestFullscreen()) : document.cancelFullScreen ? document.cancelFullScreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen() }, H = function (t) { T.css({ position: t ? "fixed" : "absolute" }); var i = D.css("background-position") ? D.css("background-position").split(" ")[1] : D.css("background-position-y"); D.css({ "background-position": (t ? "right" : "left") + " " + i }), A.css({ display: t ? "block" : "none" }), t ? (o(document).bind("mousemove", S), T.css({ "z-index": 2147483647 })) : (o(document).unbind("mousemove", S), T.css({ "z-index": "" })) }; document.addEventListener("fullscreenchange", function () { b = document.fullscreen, H(document.fullscreen) }, !1), document.addEventListener("mozfullscreenchange", function () { b = document.mozFullScreen, H(document.mozFullScreen) }, !1), document.addEventListener("webkitfullscreenchange", function () { b = document.webkitIsFullScreen, H(document.webkitIsFullScreen) }, !1), k.get(0).addEventListener("webkitbeginfullscreen", function () { b = !0 }, !1), k.get(0).addEventListener("webkitendfullscreen", function () { b = !1 }, !1), o("head").append(""); var D = o(".html5boxFullscreen", T); D.css({ display: "block", position: "relative", "float": "right", width: d + "px", height: d + "px", margin: Math.floor((c - d) / 2), cursor: "pointer", "background-image": "url('" + t + "html5boxplayer_fullscreen.png')", "background-position": "left top" }).hover(function () { var t = o(this).css("background-position") ? o(this).css("background-position").split(" ")[0] : o(this).css("background-position-x"); o(this).css({ "background-position": t + " bottom" }) }, function () { var t = o(this).css("background-position") ? o(this).css("background-position").split(" ")[0] : o(this).css("background-position-x"); o(this).css({ "background-position": t + " top" }) }).bind(p, function () { b = !b, O(b) }) } if (v) { var j = o(".html5boxHD", T); j.css({ display: "block", position: "relative", "float": "right", width: d + "px", height: d + "px", margin: Math.floor((c - d) / 2), cursor: "pointer", "background-image": "url('" + t + "html5boxplayer_hd.png')", "background-position": (x ? "right" : "left") + " center" }).bind(p, function () { x = !x, o(this).css({ "background-position": (x ? "right" : "left") + " center" }), i.isHd = x; var t = k.get(0).isPaused; k.get(0).setAttribute("src", (x ? v : y) + "#t=" + k.get(0).currentTime), t ? w || k.get(0).pause() : k.get(0).play() }) } k.get(0).volume = s; var V = 0 == s ? 1 : s, W = k.get(0).volume; if (k.get(0).volume = W / 2 + .1, k.get(0).volume === W / 2 + .1) { k.get(0).volume = W; var N = o(".html5boxVolume", T), q = o(".html5boxVolumeButton", T), _ = o(".html5boxVolumeBar", T), G = o(".html5boxVolumeBarBg", T), Y = o(".html5boxVolumeBarActive", T); N.css({ display: "block", position: "relative", "float": "right", width: d + "px", height: d + "px", margin: Math.floor((c - d) / 2) }).hover(function () { clearTimeout(u); var o = k.get(0).volume; Y.css({ height: Math.round(100 * o) + "%" }), _.show() }, function () { clearTimeout(u), u = setTimeout(function () { _.hide() }, 1e3) }), q.css({ display: "block", position: "absolute", top: 0, left: 0, width: d + "px", height: d + "px", cursor: "pointer", "background-image": "url('" + t + "html5boxplayer_volume.png')", "background-position": "top " + (W > 0 ? "left" : "right") }).hover(function () { var t = o(this).css("background-position") ? o(this).css("background-position").split(" ")[0] : o(this).css("background-position-x"); o(this).css({ "background-position": t + " bottom" }) }, function () { var t = o(this).css("background-position") ? o(this).css("background-position").split(" ")[0] : o(this).css("background-position-x"); o(this).css({ "background-position": t + " top" }) }).bind(p, function () { var t = k.get(0).volume; t > 0 ? (V = t, t = 0) : t = V; var i = o(this).css("background-position") ? o(this).css("background-position").split(" ")[1] : o(this).css("background-position-y"); q.css({ "background-position": (t > 0 ? "left" : "right") + " " + i }), k.get(0).volume = t, Y.css({ height: Math.round(100 * t) + "%" }) }), _.css({ display: "none", position: "absolute", left: 4, bottom: "100%", width: 24, height: 80, "margin-bottom": Math.floor((c - d) / 2), "background-color": "#000000", opacity: .7, filter: "alpha(opacity=70)" }), G.css({ display: "block", position: "relative", width: 10, height: 68, margin: 7, cursor: "pointer", "background-color": "#222" }), Y.css({ display: "block", position: "absolute", bottom: 0, left: 0, width: "100%", height: "100%", "background-color": "#fcc500" }), G.bind(r, function (o) { var t = l ? o.originalEvent.touches[0] : o, i = 1 - (t.pageY - G.offset().top) / G.height(); i = i > 1 ? 1 : 0 > i ? 0 : i, Y.css({ height: Math.round(100 * i) + "%" }), q.css({ "background-position": "left " + (i > 0 ? "top" : "bottom") }), k.get(0).volume = i, G.bind(a, function (o) { var t = l ? o.originalEvent.touches[0] : o, i = 1 - (t.pageY - G.offset().top) / G.height(); i = i > 1 ? 1 : 0 > i ? 0 : i, Y.css({ height: Math.round(100 * i) + "%" }), q.css({ "background-position": "left " + (i > 0 ? "top" : "bottom") }), k.get(0).volume = i }) }).bind(h, function () { G.unbind(a) }) } var R = function (o) { var t = Math.floor(o / 3600), i = 10 > t ? "0" + t : t, e = Math.floor((o - 60 * t) / 60), n = 10 > e ? "0" + e : e, s = Math.floor(o - (3600 * t + 60 * e)), l = 10 > s ? "0" + s : s, r = n + ":" + l; return t > 0 && (r = i + ":" + r), r }; n && E.hide(), e && T.hide(); var Q = function () { n || E.hide(), e || (z.hide(), I.show()) }, X = function () { n || E.show(), e || (T.show(), clearTimeout(m), z.show(), I.hide()) }, U = function () { o(window).trigger("html5lightbox.videoended"), n || E.show(), e || (T.show(), clearTimeout(m), z.show(), I.hide()) }, K = function () { var o = k.get(0).currentTime; if (o) { B.text(R(o)); var t = k.get(0).duration; if (t && (F.text(R(t)), !g)) { var i = C.width(), e = Math.round(i * o / t); P.css({ width: e }), L.css({ left: e }) } } }, Z = function () { if (k.get(0).buffered && k.get(0).buffered.length > 0 && !isNaN(k.get(0).buffered.end(0)) && !isNaN(k.get(0).duration)) { var o = C.width(); M.css({ width: Math.round(o * k.get(0).buffered.end(0) / k.get(0).duration) }) } }; try { k.bind("play", Q), k.bind("pause", X), k.bind("ended", U), k.bind("timeupdate", K), k.bind("progress", Z) } catch (J) { } } }(jQuery), jQuery(document).ready(function () { "undefined" == typeof html5Lightbox && (html5Lightbox = jQuery(".html5lightbox").html5lightbox()) })
} !function () { for (var o = document.getElementsByTagName("script"), t = "", i = 0; i < o.length; i++) o[i].src && o[i].src.match(/html5lightbox\.js/i) && (t = o[i].src.substr(0, o[i].src.lastIndexOf("/") + 1)); var e = !1; if ("undefined" == typeof jQuery) e = !0; else { var n = jQuery.fn.jquery.split("."); (n[0] < 1 || 1 == n[0] && n[1] < 6) && (e = !0) } if (e) { var s = document.getElementsByTagName("head")[0], l = document.createElement("script"); l.setAttribute("type", "text/javascript"), l.readyState ? l.onreadystatechange = function () { ("loaded" == l.readyState || "complete" == l.readyState) && (l.onreadystatechange = null, loadHtml5LightBox(t)) } : l.onload = function () { loadHtml5LightBox(t) }, l.setAttribute("src", t + "jquery.js"), s.appendChild(l) } else loadHtml5LightBox(t) }();