vendor: 18,319 bytes, lines 1-243
1/*! 2 * jQuery Cycle2; version: 2.0.2 build: 20140114 3 * http://jquery.malsup.com/cycle2/ 4 * Copyright (c) 2014 M. Alsup; Dual licensed: MIT/GPL 5 */ 6(function (e) { 7 "use strict"; 8 function t(e) { 9 return(e || "").toLowerCase() 10 } 11 12 var i = "2.0.2"; 13 e.fn.cycle = function (i) { 14 var n; 15 return 0 !== this.length || e.isReady ? this.each(function () { 16 var n, s, o, c, r = e(this), a = e.fn.cycle.log; 17 if (!r.data("cycle.opts")) { 18 (r.data("cycle-log") === !1 || i && i.log === !1 || s && s.log === !1) && (a = e.noop), a("--c2 init--"), n = r.data(); 19 for (var l in n)n.hasOwnProperty(l) && /^cycle[A-Z]+/.test(l) && (c = n[l], o = l.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, t), a(o + ":", c, "(" + typeof c + ")"), n[o] = c); 20 s = e.extend({}, e.fn.cycle.defaults, n, i || {}), s.timeoutId = 0, s.paused = s.paused || !1, s.container = r, s._maxZ = s.maxZ, s.API = e.extend({_container: r}, e.fn.cycle.API), s.API.log = a, s.API.trigger = function (e, t) { 21 return s.container.trigger(e, t), s.API 22 }, r.data("cycle.opts", s), r.data("cycle.API", s.API), s.API.trigger("cycle-bootstrap", [s, s.API]), s.API.addInitialSlides(), s.API.preInitSlideshow(), s.slides.length && s.API.initSlideshow() 23 } 24 }) : (n = {s: this.selector, c: this.context}, e.fn.cycle.log("requeuing slideshow (dom not ready)"), e(function () { 25 e(n.s, n.c).cycle(i) 26 }), this) 27 }, e.fn.cycle.API = {opts: function () { 28 return this._container.data("cycle.opts") 29 }, addInitialSlides: function () { 30 var t = this.opts(), i = t.slides; 31 t.slideCount = 0, t.slides = e(), i = i.jquery ? i : t.container.find(i), t.random && i.sort(function () { 32 return Math.random() - .5 33 }), t.API.add(i) 34 }, preInitSlideshow: function () { 35 var t = this.opts(); 36 t.API.trigger("cycle-pre-initialize", [t]); 37 var i = e.fn.cycle.transitions[t.fx]; 38 i && e.isFunction(i.preInit) && i.preInit(t), t._preInitialized = !0 39 }, postInitSlideshow: function () { 40 var t = this.opts(); 41 t.API.trigger("cycle-post-initialize", [t]); 42 var i = e.fn.cycle.transitions[t.fx]; 43 i && e.isFunction(i.postInit) && i.postInit(t) 44 }, initSlideshow: function () { 45 var t, i = this.opts(), n = i.container; 46 i.API.calcFirstSlide(), "static" == i.container.css("position") && i.container.css("position", "relative"), e(i.slides[i.currSlide]).css("opacity", 1).show(), i.API.stackSlides(i.slides[i.currSlide], i.slides[i.nextSlide], !i.reverse), i.pauseOnHover && (i.pauseOnHover !== !0 && (n = e(i.pauseOnHover)), n.hover(function () { 47 i.API.pause(!0) 48 }, function () { 49 i.API.resume(!0) 50 })), i.timeout && (t = i.API.getSlideOpts(i.currSlide), i.API.queueTransition(t, t.timeout + i.delay)), i._initialized = !0, i.API.updateView(!0), i.API.trigger("cycle-initialized", [i]), i.API.postInitSlideshow() 51 }, pause: function (t) { 52 var i = this.opts(), n = i.API.getSlideOpts(), s = i.hoverPaused || i.paused; 53 t ? i.hoverPaused = !0 : i.paused = !0, s || (i.container.addClass("cycle-paused"), i.API.trigger("cycle-paused", [i]).log("cycle-paused"), n.timeout && (clearTimeout(i.timeoutId), i.timeoutId = 0, i._remainingTimeout -= e.now() - i._lastQueue, (0 > i._remainingTimeout || isNaN(i._remainingTimeout)) && (i._remainingTimeout = void 0))) 54 }, resume: function (e) { 55 var t = this.opts(), i = !t.hoverPaused && !t.paused; 56 e ? t.hoverPaused = !1 : t.paused = !1, i || (t.container.removeClass("cycle-paused"), 0 === t.slides.filter(":animated").length && t.API.queueTransition(t.API.getSlideOpts(), t._remainingTimeout), t.API.trigger("cycle-resumed", [t, t._remainingTimeout]).log("cycle-resumed")) 57 }, add: function (t, i) { 58 var n, s = this.opts(), o = s.slideCount, c = !1; 59 "string" == e.type(t) && (t = e.trim(t)), e(t).each(function () { 60 var t, n = e(this); 61 i ? s.container.prepend(n) : s.container.append(n), s.slideCount++, t = s.API.buildSlideOpts(n), s.slides = i ? e(n).add(s.slides) : s.slides.add(n), s.API.initSlide(t, n, --s._maxZ), n.data("cycle.opts", t), s.API.trigger("cycle-slide-added", [s, t, n]) 62 }), s.API.updateView(!0), c = s._preInitialized && 2 > o && s.slideCount >= 1, c && (s._initialized ? s.timeout && (n = s.slides.length, s.nextSlide = s.reverse ? n - 1 : 1, s.timeoutId || s.API.queueTransition(s)) : s.API.initSlideshow()) 63 }, calcFirstSlide: function () { 64 var e, t = this.opts(); 65 e = parseInt(t.startingSlide || 0, 10), (e >= t.slides.length || 0 > e) && (e = 0), t.currSlide = e, t.reverse ? (t.nextSlide = e - 1, 0 > t.nextSlide && (t.nextSlide = t.slides.length - 1)) : (t.nextSlide = e + 1, t.nextSlide == t.slides.length && (t.nextSlide = 0)) 66 }, calcNextSlide: function () { 67 var e, t = this.opts(); 68 t.reverse ? (e = 0 > t.nextSlide - 1, t.nextSlide = e ? t.slideCount - 1 : t.nextSlide - 1, t.currSlide = e ? 0 : t.nextSlide + 1) : (e = t.nextSlide + 1 == t.slides.length, t.nextSlide = e ? 0 : t.nextSlide + 1, t.currSlide = e ? t.slides.length - 1 : t.nextSlide - 1) 69 }, calcTx: function (t, i) { 70 var n, s = t; 71 return i && s.manualFx && (n = e.fn.cycle.transitions[s.manualFx]), n || (n = e.fn.cycle.transitions[s.fx]), n || (n = e.fn.cycle.transitions.fade, s.API.log('Transition "' + s.fx + '" not found. Using fade.')), n 72 }, prepareTx: function (e, t) { 73 var i, n, s, o, c, r = this.opts(); 74 return 2 > r.slideCount ? (r.timeoutId = 0, void 0) : (!e || r.busy && !r.manualTrump || (r.API.stopTransition(), r.busy = !1, clearTimeout(r.timeoutId), r.timeoutId = 0), r.busy || (0 !== r.timeoutId || e) && (n = r.slides[r.currSlide], s = r.slides[r.nextSlide], o = r.API.getSlideOpts(r.nextSlide), c = r.API.calcTx(o, e), r._tx = c, e && void 0 !== o.manualSpeed && (o.speed = o.manualSpeed), r.nextSlide != r.currSlide && (e || !r.paused && !r.hoverPaused && r.timeout) ? (r.API.trigger("cycle-before", [o, n, s, t]), c.before && c.before(o, n, s, t), i = function () { 75 r.busy = !1, r.container.data("cycle.opts") && (c.after && c.after(o, n, s, t), r.API.trigger("cycle-after", [o, n, s, t]), r.API.queueTransition(o), r.API.updateView(!0)) 76 }, r.busy = !0, c.transition ? c.transition(o, n, s, t, i) : r.API.doTransition(o, n, s, t, i), r.API.calcNextSlide(), r.API.updateView()) : r.API.queueTransition(o)), void 0) 77 }, doTransition: function (t, i, n, s, o) { 78 var c = t, r = e(i), a = e(n), l = function () { 79 a.animate(c.animIn || {opacity: 1}, c.speed, c.easeIn || c.easing, o) 80 }; 81 a.css(c.cssBefore || {}), r.animate(c.animOut || {}, c.speed, c.easeOut || c.easing, function () { 82 r.css(c.cssAfter || {}), c.sync || l() 83 }), c.sync && l() 84 }, queueTransition: function (t, i) { 85 var n = this.opts(), s = void 0 !== i ? i : t.timeout; 86 return 0 === n.nextSlide && 0 === --n.loop ? (n.API.log("terminating; loop=0"), n.timeout = 0, s ? setTimeout(function () { 87 n.API.trigger("cycle-finished", [n]) 88 }, s) : n.API.trigger("cycle-finished", [n]), n.nextSlide = n.currSlide, void 0) : (s && (n._lastQueue = e.now(), void 0 === i && (n._remainingTimeout = t.timeout), n.paused || n.hoverPaused || (n.timeoutId = setTimeout(function () { 89 n.API.prepareTx(!1, !n.reverse) 90 }, s))), void 0) 91 }, stopTransition: function () { 92 var e = this.opts(); 93 e.slides.filter(":animated").length && (e.slides.stop(!1, !0), e.API.trigger("cycle-transition-stopped", [e])), e._tx && e._tx.stopTransition && e._tx.stopTransition(e) 94 }, advanceSlide: function (e) { 95 var t = this.opts(); 96 return clearTimeout(t.timeoutId), t.timeoutId = 0, t.nextSlide = t.currSlide + e, 0 > t.nextSlide ? t.nextSlide = t.slides.length - 1 : t.nextSlide >= t.slides.length && (t.nextSlide = 0), t.API.prepareTx(!0, e >= 0), !1 97 }, buildSlideOpts: function (i) { 98 var n, s, o = this.opts(), c = i.data() || {}; 99 for (var r in c)c.hasOwnProperty(r) && /^cycle[A-Z]+/.test(r) && (n = c[r], s = r.match(/^cycle(.*)/)[1].replace(/^[A-Z]/, t), o.API.log("[" + (o.slideCount - 1) + "]", s + ":", n, "(" + typeof n + ")"), c[s] = n); 100 c = e.extend({}, e.fn.cycle.defaults, o, c), c.slideNum = o.slideCount; 101 try { 102 delete c.API, delete c.slideCount, delete c.currSlide, delete c.nextSlide, delete c.slides 103 } catch (a) { 104 } 105 return c 106 }, getSlideOpts: function (t) { 107 var i = this.opts(); 108 void 0 === t && (t = i.currSlide); 109 var n = i.slides[t], s = e(n).data("cycle.opts"); 110 return e.extend({}, i, s) 111 }, initSlide: function (t, i, n) { 112 var s = this.opts(); 113 i.css(t.slideCss || {}), n > 0 && i.css("zIndex", n), isNaN(t.speed) && (t.speed = e.fx.speeds[t.speed] || e.fx.speeds._default), t.sync || (t.speed = t.speed / 2), i.addClass(s.slideClass) 114 }, updateView: function (e, t) { 115 var i = this.opts(); 116 if (i._initialized) { 117 var n = i.API.getSlideOpts(), s = i.slides[i.currSlide]; 118 !e && t !== !0 && (i.API.trigger("cycle-update-view-before", [i, n, s]), 0 > i.updateView) || (i.slideActiveClass && i.slides.removeClass(i.slideActiveClass).eq(i.currSlide).addClass(i.slideActiveClass), e && i.hideNonActive && i.slides.filter(":not(." + i.slideActiveClass + ")").hide(), 0 === i.updateView && setTimeout(function () { 119 i.API.trigger("cycle-update-view", [i, n, s, e]) 120 }, n.speed / (i.sync ? 2 : 1)), 0 !== i.updateView && i.API.trigger("cycle-update-view", [i, n, s, e]), e && i.API.trigger("cycle-update-view-after", [i, n, s])) 121 } 122 }, getComponent: function (t) { 123 var i = this.opts(), n = i[t]; 124 return"string" == typeof n ? /^\s*[\>|\+|~]/.test(n) ? i.container.find(n) : e(n) : n.jquery ? n : e(n) 125 }, stackSlides: function (t, i, n) { 126 var s = this.opts(); 127 t || (t = s.slides[s.currSlide], i = s.slides[s.nextSlide], n = !s.reverse), e(t).css("zIndex", s.maxZ); 128 var o, c = s.maxZ - 2, r = s.slideCount; 129 if (n) { 130 for (o = s.currSlide + 1; r > o; o++)e(s.slides[o]).css("zIndex", c--); 131 for (o = 0; s.currSlide > o; o++)e(s.slides[o]).css("zIndex", c--) 132 } else { 133 for (o = s.currSlide - 1; o >= 0; o--)e(s.slides[o]).css("zIndex", c--); 134 for (o = r - 1; o > s.currSlide; o--)e(s.slides[o]).css("zIndex", c--) 135 } 136 e(i).css("zIndex", s.maxZ - 1) 137 }, getSlideIndex: function (e) { 138 return this.opts().slides.index(e) 139 }}, e.fn.cycle.log = function () { 140 window.console && console.log && console.log("[cycle2] " + Array.prototype.join.call(arguments, " ")) 141 }, e.fn.cycle.version = function () { 142 return"Cycle2: " + i 143 }, e.fn.cycle.transitions = {custom: {}, none: {before: function (e, t, i, n) { 144 e.API.stackSlides(i, t, n), e.cssBefore = {opacity: 1, display: "block"} 145 }}, fade: {before: function (t, i, n, s) { 146 var o = t.API.getSlideOpts(t.nextSlide).slideCss || {}; 147 t.API.stackSlides(i, n, s), t.cssBefore = e.extend(o, {opacity: 0, display: "block"}), t.animIn = {opacity: 1}, t.animOut = {opacity: 0} 148 }}, fadeout: {before: function (t, i, n, s) { 149 var o = t.API.getSlideOpts(t.nextSlide).slideCss || {}; 150 t.API.stackSlides(i, n, s), t.cssBefore = e.extend(o, {opacity: 1, display: "block"}), t.animOut = {opacity: 0} 151 }}, scrollHorz: {before: function (e, t, i, n) { 152 e.API.stackSlides(t, i, n); 153 var s = e.container.css("overflow", "hidden").width(); 154 e.cssBefore = {left: n ? s : -s, top: 0, opacity: 1, display: "block"}, e.cssAfter = {zIndex: e._maxZ - 2, left: 0}, e.animIn = {left: 0}, e.animOut = {left: n ? -s : s} 155 }}}, e.fn.cycle.defaults = {allowWrap: !0, autoSelector: ".cycle-slideshow[data-cycle-auto-init!=false]", delay: 0, easing: null, fx: "fade", hideNonActive: !0, loop: 0, manualFx: void 0, manualSpeed: void 0, manualTrump: !0, maxZ: 100, pauseOnHover: !1, reverse: !1, slideActiveClass: "cycle-slide-active", slideClass: "cycle-slide", slideCss: {position: "absolute", top: 0, left: 0}, slides: "> img", speed: 500, startingSlide: 0, sync: !0, timeout: 4e3, updateView: 0}, e(document).ready(function () { 156 e(e.fn.cycle.defaults.autoSelector).cycle() 157 }) 158})(jQuery), /*! Cycle2 autoheight plugin; Copyright (c) M.Alsup, 2012; version: 20130913 */ 159 function (e) { 160 "use strict"; 161 function t(t, n) { 162 var s, o, c, r = n.autoHeight; 163 if ("container" == r)o = e(n.slides[n.currSlide]).outerHeight(), n.container.height(o); else if (n._autoHeightRatio)n.container.height(n.container.width() / n._autoHeightRatio); else if ("calc" === r || "number" == e.type(r) && r >= 0) { 164 if (c = "calc" === r ? i(t, n) : r >= n.slides.length ? 0 : r, c == n._sentinelIndex)return; 165 n._sentinelIndex = c, n._sentinel && n._sentinel.remove(), s = e(n.slides[c].cloneNode(!0)), s.removeAttr("id name rel").find("[id],[name],[rel]").removeAttr("id name rel"), s.css({position: "static", visibility: "hidden", display: "block"}).prependTo(n.container).addClass("cycle-sentinel cycle-slide").removeClass("cycle-slide-active"), s.find("*").css("visibility", "hidden"), n._sentinel = s 166 } 167 } 168 169 function i(t, i) { 170 var n = 0, s = -1; 171 return i.slides.each(function (t) { 172 var i = e(this).height(); 173 i > s && (s = i, n = t) 174 }), n 175 } 176 177 function n(t, i, n, s) { 178 var o = e(s).outerHeight(); 179 i.container.animate({height: o}, i.autoHeightSpeed, i.autoHeightEasing) 180 } 181 182 function s(i, o) { 183 o._autoHeightOnResize && (e(window).off("resize orientationchange", o._autoHeightOnResize), o._autoHeightOnResize = null), o.container.off("cycle-slide-added cycle-slide-removed", t), o.container.off("cycle-destroyed", s), o.container.off("cycle-before", n), o._sentinel && (o._sentinel.remove(), o._sentinel = null) 184 } 185 186 e.extend(e.fn.cycle.defaults, {autoHeight: 0, autoHeightSpeed: 250, autoHeightEasing: null}), e(document).on("cycle-initialized", function (i, o) { 187 function c() { 188 t(i, o) 189 } 190 191 var r, a = o.autoHeight, l = e.type(a), d = null; 192 ("string" === l || "number" === l) && (o.container.on("cycle-slide-added cycle-slide-removed", t), o.container.on("cycle-destroyed", s), "container" == a ? o.container.on("cycle-before", n) : "string" === l && /\d+\:\d+/.test(a) && (r = a.match(/(\d+)\:(\d+)/), r = r[1] / r[2], o._autoHeightRatio = r), "number" !== l && (o._autoHeightOnResize = function () { 193 clearTimeout(d), d = setTimeout(c, 50) 194 }, e(window).on("resize orientationchange", o._autoHeightOnResize)), setTimeout(c, 30)) 195 }) 196 }(jQuery), /*! caption plugin for Cycle2; version: 20130306 */ 197 function (e) { 198 "use strict"; 199 e.extend(e.fn.cycle.defaults, {caption: "> .cycle-caption", captionTemplate: "{{slideNum}} / {{slideCount}}", overlay: "> .cycle-overlay", overlayTemplate: "<div>{{title}}</div><div>{{desc}}</div>", captionModule: "caption"}), e(document).on("cycle-update-view", function (t, i, n, s) { 200 "caption" === i.captionModule && e.each(["caption", "overlay"], function () { 201 var e = this, t = n[e + "Template"], o = i.API.getComponent(e); 202 o.length && t ? (o.html(i.API.tmpl(t, n, i, s)), o.show()) : o.hide() 203 }) 204 }), e(document).on("cycle-destroyed", function (t, i) { 205 var n; 206 e.each(["caption", "overlay"], function () { 207 var e = this, t = i[e + "Template"]; 208 i[e] && t && (n = i.API.getComponent("caption"), n.empty()) 209 }) 210 }) 211 }(jQuery), /*! command plugin for Cycle2; version: 20130707 */ 212 function (e) { 213 "use strict"; 214 var t = e.fn.cycle; 215 e.fn.cycle = function (i) { 216 var n, s, o, c = e.makeArray(arguments); 217 return"number" == e.type(i) ? this.cycle("goto", i) : "string" == e.type(i) ? this.each(function () { 218 var r; 219 return n = i, o = e(this).data("cycle.opts"), void 0 === o ? (t.log('slideshow must be initialized before sending commands; "' + n + '" ignored'), void 0) : (n = "goto" == n ? "jump" : n, s = o.API[n], e.isFunction(s) ? (r = e.makeArray(c), r.shift(), s.apply(o.API, r)) : (t.log("unknown command: ", n), void 0)) 220 }) : t.apply(this, arguments) 221 }, e.extend(e.fn.cycle, t), e.extend(t.API, {next: function () { 222 var e = this.opts(); 223 if (!e.busy || e.manualTrump) { 224 var t = e.reverse ? -1 : 1; 225 e.allowWrap === !1 && e.currSlide + t >= e.slideCount || (e.API.advanceSlide(t), e.API.trigger("cycle-next", [e]).log("cycle-next")) 226 } 227 }, prev: function () { 228 var e = this.opts(); 229 if (!e.busy || e.manualTrump) { 230 var t = e.reverse ? 1 : -1; 231 e.allowWrap === !1 && 0 > e.currSlide + t || (e.API.advanceSlide(t), e.API.trigger("cycle-prev", [e]).log("cycle-prev")) 232 } 233 }, destroy: function () { 234 this.stop(); 235 var t = this.opts(), i = e.isFunction(e._data) ? e._data : e.noop; 236 clearTimeout(t.timeoutId), t.timeoutId = 0, t.API.stop(), t.API.trigger("cycle-destroyed", [t]).log("cycle-destroyed"), t.container.removeData(), i(t.container[0], "parsedAttrs", !1), t.retainStylesOnDestroy || (t.container.removeAttr("style"), t.slides.removeAttr("style"), t.slides.removeClass(t.slideActiveClass)), t.slides.each(function () { 237 e(this).removeData(), i(this, "parsedAttrs", !1) 238 }) 239 }, jump: function (e) { 240 var t, i = this.opts(); 241 if (!i.busy || i.manualTrump) { 242 var n = parseInt(e, 10); 243 if (isNaN(n) || 0 > n || n >
243= i.slides.length)return i.API.log("goto: invalid slide index: " + n), void 0; 244 if (n == i.currSlide)return i.API.log("goto: skipping, already on slide", n), void 0; 245 i.nextSlide = n, clearTimeout(i.timeoutId), i.timeoutId = 0, i.API.log("goto: ", n, " (zero-index)"), t = i.currSlide < i.nextSlide, i.API.prepareTx(!0, t) 246 } 247 }, stop: function () { 248 var t = this.opts(), i = t.container; 249 clearTimeout(t.timeoutId), t.timeoutId = 0, t.API.stopTransition(), t.pauseOnHover && (t.pauseOnHover !== !0 && (i = e(t.pauseOnHover)), i.off("mouseenter mouseleave")), t.API.trigger("cycle-stopped", [t]).log("cycle-stopped") 250 }, reinit: function () { 251 var e = this.opts(); 252 e.API.destroy(), e.container.cycle() 253 }, remove: function (t) { 254 for (var i, n, s = this.opts(), o = [], c = 1, r = 0; s.slides.length > r; r++)i = s.slides[r], r == t ? n = i : (o.push(i), e(i).data("cycle.opts").slideNum = c, c++); 255 n && (s.slides = e(o), s.slideCount--, e(n).remove(), t == s.currSlide ? s.API.advanceSlide(1) : s.currSlide > t ? s.currSlide-- : s.currSlide++, s.API.trigger("cycle-slide-removed", [s, t, n]).log("cycle-slide-removed"), s.API.updateView()) 256 }}), e(document).on("click.cycle", "[data-cycle-cmd]", function (t) { 257 t.preventDefault(); 258 var i = e(this), n = i.data("cycle-cmd"), s = i.data("cycle-context") || ".cycle-slideshow"; 259 e(s).cycle(n, i.data("cycle-arg")) 260 }) 261 }(jQuery), /*! hash plugin for Cycle2; version: 20130905 */ 262 function (e) { 263 "use strict"; 264 function t(t, i) { 265 var n; 266 return t._hashFence ? (t._hashFence = !1, void 0) : (n = window.location.hash.substring(1), t.slides.each(function (s) { 267 if (e(this).data("cycle-hash") == n) { 268 if (i === !0)t.startingSlide = s; else { 269 var o = s > t.currSlide; 270 t.nextSlide = s, t.API.prepareTx(!0, o) 271 } 272 return!1 273 } 274 }), void 0) 275 } 276 277 e(document).on("cycle-pre-initialize", function (i, n) { 278 t(n, !0), n._onHashChange = function () { 279 t(n, !1) 280 }, e(window).on("hashchange", n._onHashChange) 281 }), e(document).on("cycle-update-view", function (e, t, i) { 282 i.hash && "#" + i.hash != window.location.hash && (t._hashFence = !0, window.location.hash = i.hash) 283 }), e(document).on("cycle-destroyed", function (t, i) { 284 i._onHashChange && e(window).off("hashchange", i._onHashChange) 285 }) 286 }(jQuery), /*! loader plugin for Cycle2; version: 20131121 */ 287 function (e) { 288 "use strict"; 289 e.extend(e.fn.cycle.defaults, {loader: !1}), e(document).on("cycle-bootstrap", function (t, i) { 290 function n(t, n) { 291 function o(t) { 292 var o; 293 "wait" == i.loader ? (r.push(t), 0 === l && (r.sort(c), s.apply(i.API, [r, n]), i.container.removeClass("cycle-loading"))) : (o = e(i.slides[i.currSlide]), s.apply(i.API, [t, n]), o.show(), i.container.removeClass("cycle-loading")) 294 } 295 296 function c(e, t) { 297 return e.data("index") - t.data("index") 298 } 299 300 var r = []; 301 if ("string" == e.type(t))t = e.trim(t); else if ("array" === e.type(t))for (var a = 0; t.length > a; a++)t[a] = e(t[a])[0]; 302 t = e(t); 303 var l = t.length; 304 l && (t.hide().appendTo("body").each(function (t) { 305 function c() { 306 0 === --a && (--l, o(d)) 307 } 308 309 var a = 0, d = e(this), u = d.is("img") ? d : d.find("img"); 310 return d.data("index", t), u = u.filter(":not(.cycle-loader-ignore)").filter(':not([src=""])'), u.length ? (a = u.length, u.each(function () { 311 this.complete ? c() : e(this).load(function () { 312 c() 313 }).on("error", function () { 314 0 === --a && (i.API.log("slide skipped;
vendor: 8,086 bytes, lines 314-455
314 img not loaded:", this.src), 0 === --l && "wait" == i.loader && s.apply(i.API, [r, n])) 315 }) 316 }), void 0) : (--l, r.push(d), void 0) 317 }), l && i.container.addClass("cycle-loading")) 318 } 319 320 var s; 321 i.loader && (s = i.API.add, i.API.add = n) 322 }) 323 }(jQuery), /*! pager plugin for Cycle2; version: 20130525 */ 324 function (e) { 325 "use strict"; 326 function t(t, i, n) { 327 var s, o = t.API.getComponent("pager"); 328 o.each(function () { 329 var o = e(this); 330 if (i.pagerTemplate) { 331 var c = t.API.tmpl(i.pagerTemplate, i, t, n[0]); 332 s = e(c).appendTo(o) 333 } else s = o.children().eq(t.slideCount - 1); 334 s.on(t.pagerEvent, function (e) { 335 e.preventDefault(), t.API.page(o, e.currentTarget) 336 }) 337 }) 338 } 339 340 function i(e, t) { 341 var i = this.opts(); 342 if (!i.busy || i.manualTrump) { 343 var n = e.children().index(t), s = n, o = s > i.currSlide; 344 i.currSlide != s && (i.nextSlide = s, i.API.prepareTx(!0, o), i.API.trigger("cycle-pager-activated", [i, e, t])) 345 } 346 } 347 348 e.extend(e.fn.cycle.defaults, {pager: "> .cycle-pager", pagerActiveClass: "cycle-pager-active", pagerEvent: "click.cycle", pagerTemplate: "<span>•</span>"}), e(document).on("cycle-bootstrap", function (e, i, n) { 349 n.buildPagerLink = t 350 }), e(document).on("cycle-slide-added", function (e, t, n, s) { 351 t.pager && (t.API.buildPagerLink(t, n, s), t.API.page = i) 352 }), e(document).on("cycle-slide-removed", function (t, i, n) { 353 if (i.pager) { 354 var s = i.API.getComponent("pager"); 355 s.each(function () { 356 var t = e(this); 357 e(t.children()[n]).remove() 358 }) 359 } 360 }), e(document).on("cycle-update-view", function (t, i) { 361 var n; 362 i.pager && (n = i.API.getComponent("pager"), n.each(function () { 363 e(this).children().removeClass(i.pagerActiveClass).eq(i.currSlide).addClass(i.pagerActiveClass) 364 })) 365 }), e(document).on("cycle-destroyed", function (e, t) { 366 var i = t.API.getComponent("pager"); 367 i && (i.children().off(t.pagerEvent), t.pagerTemplate && i.empty()) 368 }) 369 }(jQuery), /*! prevnext plugin for Cycle2; version: 20130709 */ 370 function (e) { 371 "use strict"; 372 e.extend(e.fn.cycle.defaults, {next: "> .cycle-next", nextEvent: "click.cycle", disabledClass: "disabled", prev: "> .cycle-prev", prevEvent: "click.cycle", swipe: !1}), e(document).on("cycle-initialized", function (e, t) { 373 if (t.API.getComponent("next").on(t.nextEvent, function (e) { 374 e.preventDefault(), t.API.next() 375 }), t.API.getComponent("prev").on(t.prevEvent, function (e) { 376 e.preventDefault(), t.API.prev() 377 }), t.swipe) { 378 var i = t.swipeVert ? "swipeUp.cycle" : "swipeLeft.cycle swipeleft.cycle", n = t.swipeVert ? "swipeDown.cycle" : "swipeRight.cycle swiperight.cycle"; 379 t.container.on(i, function () { 380 t.API.next() 381 }), t.container.on(n, function () { 382 t.API.prev() 383 }) 384 } 385 }), e(document).on("cycle-update-view", function (e, t) { 386 if (!t.allowWrap) { 387 var i = t.disabledClass, n = t.API.getComponent("next"), s = t.API.getComponent("prev"), o = t._prevBoundry || 0, c = void 0 !== t._nextBoundry ? t._nextBoundry : t.slideCount - 1; 388 t.currSlide == c ? n.addClass(i).prop("disabled", !0) : n.removeClass(i).prop("disabled", !1), t.currSlide === o ? s.addClass(i).prop("disabled", !0) : s.removeClass(i).prop("disabled", !1) 389 } 390 }), e(document).on("cycle-destroyed", function (e, t) { 391 t.API.getComponent("prev").off(t.nextEvent), t.API.getComponent("next").off(t.prevEvent), t.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle") 392 }) 393 }(jQuery), /*! progressive loader plugin for Cycle2; version: 20130315 */ 394 function (e) { 395 "use strict"; 396 e.extend(e.fn.cycle.defaults, {progressive: !1}), e(document).on("cycle-pre-initialize", function (t, i) { 397 if (i.progressive) { 398 var n, s, o = i.API, c = o.next, r = o.prev, a = o.prepareTx, l = e.type(i.progressive); 399 if ("array" == l)n = i.progressive; else if (e.isFunction(i.progressive))n = i.progressive(i); else if ("string" == l) { 400 if (s = e(i.progressive), n = e.trim(s.html()), !n)return; 401 if (/^(\[)/.test(n))try { 402 n = e.parseJSON(n) 403 } catch (d) { 404 return o.log("error parsing progressive slides", d), void 0 405 } else n = n.split(RegExp(s.data("cycle-split") || "\n")), n[n.length - 1] || n.pop() 406 } 407 a && (o.prepareTx = function (e, t) { 408 var s, o; 409 return e || 0 === n.length ? (a.apply(i.API, [e, t]), void 0) : (t && i.currSlide == i.slideCount - 1 ? (o = n[0], n = n.slice(1), i.container.one("cycle-slide-added", function (e, t) { 410 setTimeout(function () { 411 t.API.advanceSlide(1) 412 }, 50) 413 }), i.API.add(o)) : t || 0 !== i.currSlide ? a.apply(i.API, [e, t]) : (s = n.length - 1, o = n[s], n = n.slice(0, s), i.container.one("cycle-slide-added", function (e, t) { 414 setTimeout(function () { 415 t.currSlide = 1, t.API.advanceSlide(-1) 416 }, 50) 417 }), i.API.add(o, !0)), void 0) 418 }), c && (o.next = function () { 419 var e = this.opts(); 420 if (n.length && e.currSlide == e.slideCount - 1) { 421 var t = n[0]; 422 n = n.slice(1), e.container.one("cycle-slide-added", function (e, t) { 423 c.apply(t.API), t.container.removeClass("cycle-loading") 424 }), e.container.addClass("cycle-loading"), e.API.add(t) 425 } else c.apply(e.API) 426 }), r && (o.prev = function () { 427 var e = this.opts(); 428 if (n.length && 0 === e.currSlide) { 429 var t = n.length - 1, i = n[t]; 430 n = n.slice(0, t), e.container.one("cycle-slide-added", function (e, t) { 431 t.currSlide = 1, t.API.advanceSlide(-1), t.container.removeClass("cycle-loading") 432 }), e.container.addClass("cycle-loading"), e.API.add(i, !0) 433 } else r.apply(e.API) 434 }) 435 } 436 }) 437 }(jQuery), /*! tmpl plugin for Cycle2; version: 20121227 */ 438 function (e) { 439 "use strict"; 440 e.extend(e.fn.cycle.defaults, {tmplRegex: "{{((.)?.*?)}}"}), e.extend(e.fn.cycle.API, {tmpl: function (t, i) { 441 var n = RegExp(i.tmplRegex || e.fn.cycle.defaults.tmplRegex, "g"), s = e.makeArray(arguments); 442 return s.shift(), t.replace(n, function (t, i) { 443 var n, o, c, r, a = i.split("."); 444 for (n = 0; s.length > n; n++)if (c = s[n]) { 445 if (a.length > 1)for (r = c, o = 0; a.length > o; o++)c = r, r = r[a[o]] || i; else r = c[i]; 446 if (e.isFunction(r))return r.apply(c, s); 447 if (void 0 !== r && null !== r && r != i)return r 448 } 449 return i 450 }) 451 }}) 452 }(jQuery); 453/*! Backstretch - v2.0.4 - 2013-06-19 454 * http://srobbin.com/jquery-plugins/backstretch/ 455 * Copyright (c) 2013 Scott Robbin; Licensed MIT */
456(function(a,d,p){a.fn.backstretch=function(c,b){(c===p||0===c.length)&&a.error("No images were supplied for Backstretch");0===a(d).scrollTop()&&d.scrollTo(0,0);return this.each(function(){var d=a(this),g=d.data("backstretch");if(g){if("string"==typeof c&&"function"==typeof g[c]){g[c](b);return}b=a.extend(g.options,b);g.destroy(!0)}g=new q(this,c,b);d.data("backstretch",g)})};a.backstretch=function(c,b){return a("body").backstretch(c,b).data("backstretch")};a.expr[":"].backstretch=function(c){return a(c).data("backstretch")!==p};a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5E3,fade:0};var r={left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},s={position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999},q=function(c,b,e){this.options=a.extend({},a.fn.backstretch.defaults,e||{});this.images=a.isArray(b)?b:[b];a.each(this.images,function(){a("<img />")[0].src=this});this.isBody=c===document.body;this.$container=a(c);this.$root=this.isBody?l?a(d):a(document):this.$container;c=this.$container.children(".backstretch").first();this.$wrap=c.length?c:a('<div class="backstretch"></div>').css(r).appendTo(this.$container);this.isBody||(c=this.$container.css("position"),b=this.$container.css("zIndex"),this.$container.css({position:"static"===c?"relative":c,zIndex:"auto"===b?0:b,background:"none"}),this.$wrap.css({zIndex:-999998}));this.$wrap.css({position:this.isBody&&l?"fixed":"absolute"});this.index=0;this.show(this.index);a(d).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===d.pageYOffset&&(d.scrollTo(0,1),this.resize())},this))};q.prototype={resize:function(){try{var a={left:0,top:0},b=this.isBody?this.$root.width():this.$root.innerWidth(),e=b,g=this.isBody?d.innerHeight?d.innerHeight:this.$root.height():this.$root.innerHeight(),j=e/this.$img.data("ratio"),f;j>=g?(f=(j-g)/2,this.options.centeredY&&(a.top="-"+f+"px")):(j=g,e=j*this.$img.data("ratio"),f=(e-b)/2,this.options.centeredX&&(a.left="-"+f+"px"));this.$wrap.css({width:b,height:g}).find("img:not(.deleteable)").css({width:e,height:j}).css(a)}catch(h){}return this},show:function(c){if(!(Math.abs(c)>this.images.length-1)){var b=this,e=b.$wrap.find("img").addClass("deleteable"),d={relatedTarget:b.$container[0]};b.$container.trigger(a.Event("backstretch.before",d),[b,c]);this.index=c;clearInterval(b.interval);b.$img=a("<img />").css(s).bind("load",function(f){var h=this.width||a(f.target).width();f=this.height||a(f.target).height();a(this).data("ratio",h/f);a(this).fadeIn(b.options.speed||b.options.fade,function(){e.remove();b.paused||b.cycle();a(["after","show"]).each(function(){b.$container.trigger(a.Event("backstretch."+this,d),[b,c])})});b.resize()}).appendTo(b.$wrap);b.$img.attr("src",b.images[c]);return b}},next:function(){return this.show(this.index<this.images.length-1?this.index+1:0)},prev:function(){return this.show(0===this.index?this.images.length-1:this.index-1)},pause:function(){this.paused=!0;return this},resume:function(){this.paused=!1;this.next();return this},cycle:function(){1<this.images.length&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration));return this},destroy:function(c){a(d).off("resize.backstretch orientationchange.backstretch");clearInterval(this.interval);c||this.$wrap.remove();this.$container.removeData("backstretch")}};var l,f=navigator.userAgent,m=navigator.platform,e=f.match(/AppleWebKit\/([0-9]+)/),e=!!e&&e[1],h=f.match(/Fennec\/([0-9]+)/),h=!!h&&h[1],n=f.match(/Opera Mobi\/([0-9]+)/),t=!!n&&n[1],k=f.match(/MSIE ([0-9]+)/),k=!!k&&k[1];l=!((-1<m.indexOf("iPhone")||-1<m.indexOf("iPad")||-1<m.indexOf("iPod"))&&e&&534>e||d.operamini&&"[object OperaMini]"==={}.toString.call(d.operamini)||n&&7458>t||-1<f.indexOf("Android")&&e&&533>e||h&&6>h||"palmGetResource"in d&&e&&534>e||-1<f.indexOf("MeeGo")&&-1<f.indexOf("NokiaBrowser/8.5.0")||k&&6>=k)})(jQuery,window); 457/* Created by Jamie Lomas on 30/16/14. */ 458var backstretch_count = 0; 459(function ($) { 460 $.fn.extend({ 461 backstretchExtend: function (options, imagesArr) { 462 463 var defaults = { 464 height: '100%', 465 margin: 230, 466 fade: 750, 467 duration: 6000, 468 show_text: true, 469 show_pagi: true, 470 show_nextprev: true, 471 parallax: false, 472 parallax_maxwidth: 1024, 473 parallax_text: true, 474 next_txt: "Next", 475 prev_txt: "Prev" 476 }; 477 478 var options = $.extend(defaults, options); 479 480 return this.each(function () { 481 var ths = $(this); 482 var height = options.height; 483 var margin = options.margin; 484 var fade = options.fade; 485 var duration = options.duration; 486 var show_text = options.show_text; 487 var show_nextprev = options.show_nextprev; 488 var parallax = options.parallax; 489 var parallax_maxwidth = options.parallax_maxwidth; 490 var parallax_text = options.parallax_text; 491 var show_pagi = options.show_pagi; 492 493 var offset = ths.offset(); 494 var ths_margin = margin + offset.top; 495 496 //Add Backstretch element 497 ths.prepend("<div class='backstretch_wrap' style='height:100%; overflow: hidden'/>"); 498 499 //Check height on load 500 if(height != "100%"){ 501 backstretch_height(ths, height, ths_margin); 502 //Check height on resize 503 $(window).resize(function(){ 504 backstretch_height(ths, height, ths_margin); 505 }); 506 }else { 507 // School Sections 508 if ($("#school_sections_wrapper").css("position")=='fixed') { 509 ths_margin += $("#school_sections_wrapper").height(); 510 } 511 backstretch_height(ths, $(window).height()-ths_margin, 0); 512 //Check height on resize 513 $(window).resize(function(){ 514 backstretch_height(ths, $(window).height()-ths_margin, 0); 515 }); 516 } 517 518 //Do Backstretch from array 519 var backstretch_images = []; 520 jQuery.each(imagesArr, function( image, text ) { 521 backstretch_images.push(image); 522 }); 523 backstretch_count = backstretch_images.length; 524
525 ////////////////////////////////////////////////////////////////// 526 527 // Preload the first image 528 var o = backstretch_images[0], u = new Image; 529 u.onerror=function(){ 530 console.log("error with loading image"); 531 }; 532 u.onload=function(){ 533 // Start the slideshow passing only the first image 534 $(".backstretch_wrap").backstretch( 535 [backstretch_images[0]], 536 {duration: duration, fade: fade} 537 ); 538 if (backstretch_count > 1) { 539 // now we can push more images right before they should appear 540 var slider = $(".backstretch_wrap").data("backstretch"); 541 var imgCount = 0; 542 var timer = setInterval(function () { 543 ++imgCount; 544 545 if (imgCount === (backstretch_images.length - 1)) clearInterval(timer); 546 slider.images.push(backstretch_images[imgCount]); 547 }, 3000); 548 var restart = setInterval(function () { 549 $(".backstretch_wrap").backstretch("next"); 550 clearInterval(restart); 551 }, 3500); 552 } 553 }; 554 u.src=o; 555 556
557 ////////////////////////////////////////////////////////////////// 558 559 560 /*$(".backstretch_wrap", this).backstretch( 561 backstretch_images 562 , { 563 fade: fade, 564 duration: duration 565 });*/ 566 567 if(show_text == true){ 568 //Add text holder 569 $(".backstretch_wrap", ths).append("<div class='backstretch_text_wrap'><div class='backstretch_text' style='position: relative;'></div></div>"); 570 571 //Add and hide text elements 572 jQuery.each(imagesArr, function( image, text ) { 573 $(".backstretch_text", ths).append("<div class='slide' style='display:none; position: absolute;'>"+text+"</div>"); 574 }); 575 576 //Hide and show current text on backstrech change function 577 $(".backstretch_wrap", ths).on("backstretch.before", function (e, instance, index) { 578 $(".backstretch_text > div.slide", ths).fadeOut(fade); 579 }); 580 581 $(".backstretch_wrap", ths).on("backstretch.show", function (e, instance, index) { 582 $(".backstretch_text > div.slide", ths).eq(instance.index).fadeIn(fade); 583 }); 584 } 585 586 //Do Parallax 587 if(parallax == true){ 588 589 $(window).bind('resize load scroll', function() { 590 591 if($(window).width() > parallax_maxwidth){ 592 593 offset_top = ths.offset().top; 594 parallax_scroll = 0; 595 parallax_scroll = ($(window).scrollTop() - offset_top) * 0.7; 596 597 $(".backstretch", ths).each(function(){ 598 if($(window).scrollTop() >= offset_top) { 599 600 $(this).css({ 601 'margin-top': parallax_scroll + "px" 602 }); 603 604 }else{ 605 $(this).css({ 606 'margin-top': "0px" 607 }); 608 /*if(parallax_text == true){ 609 $(".backstretch_text", ths).css({ 610 'top': "0px" 611 }); 612 }*/ 613 } 614 615 if(parallax_text == true){ 616 parallax_text_scroll = ($(window).scrollTop()) * 0.7; 617 $(".backstretch_text", ths).css({ 618 'top': "-" + (parallax_text_scroll / 1.5) + "px" 619 }); 620 var notice_opacity = Math.max(0,Math.min(0.86,0.86-0.86*$(window).scrollTop()*0.75/200)); 621 $("#notices").css({
622 'opacity': + notice_opacity 623 }); 624 } 625 }); 626 627 628 }else{ 629 $(".backstretch", ths).each(function(){ 630 $(this).css({ 631 'margin-top': "0px" 632 }); 633 if(parallax_text == true){ 634 $(".backstretch_text", ths).css({ 635 'top': "0px" 636 }); 637 } 638 }) 639 } 640 641 642 }); 643 644 } 645 646 //Get backstrech count 647 //var backstretch_count = $(".backstretch_wrap").data("backstretch").images.length; 648 649 // If backstrech count is greater than one 650 if(window.backstretch_count > 1){ 651 652 if(show_pagi == true || show_nextprev == true){ 653 ths.prepend("<nav class='pager_nextprev' style='display: none'></nav>"); 654 $(".backstretch_wrap", ths).on("backstretch.show", function (e, instance, index) { 655 $(".pager_nextprev", ths).fadeIn(); 656 }); 657 } 658 659 //Create Backstrech pager 660 if(show_pagi == true){ 661 $(".pager_nextprev", ths).append("<div class='pager'></div>"); 662 663 var pagernum = -1; 664 backstretch_images.forEach(function(index) { 665 ++pagernum; 666 $(".pager", ths).append("<a data-slide='"+pagernum+"' href='#'><span>"+pagernum+"</span></a>"); 667 }); 668 669 // Pager click 670 $('.pager', this).find('a').click(function (x) { 671 x.preventDefault(); 672 $(".backstretch_wrap", ths).data('backstretch').show($(this).data("slide")); 673// $(".backstretch_wrap", ths).data('backstretch').next(); 674 //alert($(".backstretch_wrap", ths)); 675 }); 676 677 //Add active class to pager 678 $(".backstretch_wrap", ths).on("backstretch.after", function (e, instance, index) { 679 $(".pager a", ths).removeClass('selected').eq(index).addClass('selected'); 680 }); 681 } 682 683 //Add Backstretch next and prev 684 if(show_nextprev == true){ 685 686 $(".pager_nextprev", ths).prepend("<a href='#' class='next'>"+options.next_txt+"</a>"); 687 $(".pager_nextprev", ths).prepend("<a href='#' class='prev'>"+options.prev_txt+"</a>"); 688 689 690 //Next button click 691 $('.next', this).click(function(x) { 692 x.preventDefault(); 693 $(".backstretch_wrap", ths).data('backstretch').next(); 694 }); 695 696 //Prev button click 697 $('.prev', this).click(function(x) { 698 x.preventDefault(); 699 $(".backstretch_wrap", ths).data('backstretch').prev(); 700 }); 701 } 702 703 704 705 } 706 707 }); 708 709 710 711 712 } 713 }); 714})(jQuery); 715 716function backstretch_height(ths, height, ths_margin) { 717 if ($(window).height() < height+ths_margin) { 718 ths.css({'height': 'auto','height': $(window).height()-ths_margin}); 719 }else{ 720 ths.css({'height': 'auto','height': height}); 721 } 722 //$(".backstretch_wrap", ths).backstretch("resize"); 723} 724/*! 725 * Bootstrap v3.0.3 (http://getbootstrap.com) 726 * Copyright 2013 Twitter, Inc. 727 * Licensed under http://www.apache.org/licenses/LICENSE-2.0 728 */ 729 730if ("undefined" == typeof jQuery)throw new Error("Bootstrap requires jQuery"); 731+function (a) { 732 "use strict"; 733 function b() { 734 var a = document.createElement("bootstrap"), b = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend"}; 735 for (var c in b)if (void 0 !== a.style[c])return{end: b[c]} 736 } 737 738 a.fn.emulateTransitionEnd = function (b) { 739 var c = !1, d = this; 740 a(this).one(a.support.transition.end, function () { 741 c = !0 742 }); 743 var e = function () { 744 c || a(d).trigger(a.support.transition.end) 745 }; 746 return setTimeout(e, b), this 747 }, a(function () { 748 a.support.transition = b() 749 }) 750}(jQuery), +function (a) { 751 "use strict"; 752 var b = '[data-dismiss="alert"]', c = function (c) { 753 a(c).on("click", b, this.close) 754 }; 755 c.prototype.close = function (b) { 756 function c() { 757 f.trigger("closed.bs.alert").remove() 758 } 759 760 var d = a(this), e = d.attr("data-target"); 761 e || (e = d.attr("href"), e = e && e.replace(/.*(?=#[^\s]*$)/, "")); 762 var f = a(e); 763 b && b.preventDefault(), f.length || (f = d.hasClass("alert") ? d : d.parent()), f.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one(a.support.transition.end, c).emulateTransitionEnd(150) : c()) 764 }; 765 var d = a.fn.alert; 766 a.fn.alert = function (b) { 767 return this.each(function () { 768 var d = a(this), e = d.data("bs.alert"); 769 e || d.data("bs.alert", e = new c(this)), "string" == typeof b && e[b].call(
vendor: 34,068 bytes, lines 769-1288
769d) 770 }) 771 }, a.fn.alert.Constructor = c, a.fn.alert.noConflict = function () { 772 return a.fn.alert = d, this 773 }, a(document).on("click.bs.alert.data-api", b, c.prototype.close) 774}(jQuery), +function (a) { 775 "use strict"; 776 var b = function (c, d) { 777 this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d) 778 }; 779 b.DEFAULTS = {loadingText: "loading..."}, b.prototype.setState = function (a) { 780 var b = "disabled", c = this.$element, d = c.is("input") ? "val" : "html", e = c.data(); 781 a += "Text", e.resetText || c.data("resetText", c[d]()), c[d](e[a] || this.options[a]), setTimeout(function () { 782 "loadingText" == a ? c.addClass(b).attr(b, b) : c.removeClass(b).removeAttr(b) 783 }, 0) 784 }, b.prototype.toggle = function () { 785 var a = this.$element.closest('[data-toggle="buttons"]'), b = !0; 786 if (a.length) { 787 var c = this.$element.find("input"); 788 "radio" === c.prop("type") && (c.prop("checked") && this.$element.hasClass("active") ? b = !1 : a.find(".active").removeClass("active")), b && c.prop("checked", !this.$element.hasClass("active")).trigger("change") 789 } 790 b && this.$element.toggleClass("active") 791 }; 792 var c = a.fn.button; 793 a.fn.button = function (c) { 794 return this.each(function () { 795 var d = a(this), e = d.data("bs.button"), f = "object" == typeof c && c; 796 e || d.data("bs.button", e = new b(this, f)), "toggle" == c ? e.toggle() : c && e.setState(c) 797 }) 798 }, a.fn.button.Constructor = b, a.fn.button.noConflict = function () { 799 return a.fn.button = c, this 800 }, a(document).on("click.bs.button.data-api", "[data-toggle^=button]", function (b) { 801 var c = a(b.target); 802 c.hasClass("btn") || (c = c.closest(".btn")), c.button("toggle"), b.preventDefault() 803 }) 804}(jQuery), +function (a) { 805 "use strict"; 806 var b = function (b, c) { 807 this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = this.sliding = this.interval = this.$active = this.$items = null, "hover" == this.options.pause && this.$element.on("mouseenter", a.proxy(this.pause, this)).on("mouseleave", a.proxy(this.cycle, this)) 808 }; 809 b.DEFAULTS = {interval: 5e3, pause: "hover", wrap: !0}, b.prototype.cycle = function (b) { 810 return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this 811 }, b.prototype.getActiveIndex = function () { 812 return this.$active = this.$element.find(".item.active"), this.$items = this.$active.parent().children(), this.$items.index(this.$active) 813 }, b.prototype.to = function (b) { 814 var c = this, d = this.getActiveIndex(); 815 return b > this.$items.length - 1 || 0 > b ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () { 816 c.to(b) 817 }) : d == b ? this.pause().cycle() : this.slide(b > d ? "next" : "prev", a(this.$items[b])) 818 }, b.prototype.pause = function (b) { 819 return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition.end && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this 820 }, b.prototype.next = function () { 821 return this.sliding ? void 0 : this.slide("next") 822 }, b.prototype.prev = function () { 823 return this.sliding ? void 0 : this.slide("prev") 824 }, b.prototype.slide = function (b, c) { 825 var d = this.$element.find(".item.active"), e = c || d[b](), f = this.interval, g = "next" == b ? "left" : "right", h = "next" == b ? "first" : "last", i = this; 826 if (!e.length) { 827 if (!this.options.wrap)return; 828 e = this.$element.find(".item")[h]() 829 } 830 this.sliding = !0, f && this.pause(); 831 var j = a.Event("slide.bs.carousel", {relatedTarget: e[0], direction: g}); 832 if (!e.hasClass("active")) { 833 if (this.$indicators.length && (this.$indicators.find(".active").removeClass("active"), this.$element.one("slid.bs.carousel", function () { 834 var b = a(i.$indicators.children()[i.getActiveIndex()]); 835 b && b.addClass("active") 836 })), a.support.transition && this.$element.hasClass("slide")) { 837 if (this.$element.trigger(j), j.isDefaultPrevented())return; 838 e.addClass(b), e[0].offsetWidth, d.addClass(g), e.addClass(g), d.one(a.support.transition.end,function () { 839 e.removeClass([b, g].join(" ")).addClass("active"), d.removeClass(["active", g].join(" ")), i.sliding = !1, setTimeout(function () { 840 i.$element.trigger("slid.bs.carousel") 841 }, 0) 842 }).emulateTransitionEnd(600) 843 } else { 844 if (this.$element.trigger(j), j.isDefaultPrevented())return; 845 d.removeClass("active"), e.addClass("active"), this.sliding = !1, this.$element.trigger("slid.bs.carousel") 846 } 847 return f && this.cycle(), this 848 } 849 }; 850 var c = a.fn.carousel; 851 a.fn.carousel = function (c) { 852 return this.each(function () { 853 var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c), g = "string" == typeof c ? c : f.slide; 854 e || d.data("bs.carousel", e = new b(this, f)), "number" == typeof c ? e.to(c) : g ? e[g]() : f.interval && e.pause().cycle() 855 }) 856 }, a.fn.carousel.Constructor = b, a.fn.carousel.noConflict = function () { 857 return a.fn.carousel = c, this 858 }, a(document).on("click.bs.carousel.data-api", "[data-slide], [data-slide-to]", function (b) { 859 var c, d = a(this), e = a(d.attr("data-target") || (c = d.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "")), f = a.extend({}, e.data(), d.data()), g = d.attr("data-slide-to"); 860 g && (f.interval = !1), e.carousel(f), (g = d.attr("data-slide-to")) && e.data("bs.carousel").to(g), b.preventDefault() 861 }), a(window).on("load", function () { 862 a('[data-ride="carousel"]').each(function () { 863 var b = a(this); 864 b.carousel(b.data()) 865 }) 866 }) 867}(jQuery), +function (a) { 868 "use strict"; 869 var b = function (c, d) { 870 this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.transitioning = null, this.options.parent && (this.$parent = a(this.options.parent)), this.options.toggle && this.toggle() 871 }; 872 b.DEFAULTS = {toggle: !0}, b.prototype.dimension = function () { 873 var a = this.$element.hasClass("width"); 874 return a ? "width" : "height" 875 }, b.prototype.show = function () { 876 if (!this.transitioning && !this.$element.hasClass("in")) { 877 var b = a.Event("show.bs.collapse"); 878 if (this.$element.trigger(b), !b.isDefaultPrevented()) { 879 var c = this.$parent && this.$parent.find("> .panel > .in"); 880 if (c && c.length) { 881 var d = c.data("bs.collapse"); 882 if (d && d.transitioning)return; 883 c.collapse("hide"), d || c.data("bs.collapse", null) 884 } 885 var e = this.dimension(); 886 this.$element.removeClass("collapse").addClass("collapsing")[e](0), this.transitioning = 1; 887 var f = function () { 888 this.$element.removeClass("collapsing").addClass("in")[e]("auto"), this.transitioning = 0, this.$element.trigger("shown.bs.collapse") 889 }; 890 if (!a.support.transition)return f.call(this); 891 var g = a.camelCase(["scroll", e].join("-")); 892 this.$element.one(a.support.transition.end, a.proxy(f, this)).emulateTransitionEnd(350)[e](this.$element[0][g]) 893 } 894 } 895 }, b.prototype.hide = function () { 896 if (!this.transitioning && this.$element.hasClass("in")) { 897 var b = a.Event("hide.bs.collapse"); 898 if (this.$element.trigger(b), !b.isDefaultPrevented()) { 899 var c = this.dimension(); 900 this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"), this.transitioning = 1; 901 var d = function () { 902 this.transitioning = 0, this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse") 903 }; 904 return a.support.transition ? (this.$element[c](0).one(a.support.transition.end, a.proxy(d, this)).emulateTransitionEnd(350), void 0) : d.call(this) 905 } 906 } 907 }, b.prototype.toggle = function () { 908 this[this.$element.hasClass("in") ? "hide" : "show"]() 909 }; 910 var c = a.fn.collapse; 911 a.fn.collapse = function (c) { 912 return this.each(function () { 913 var d = a(this), e = d.data("bs.collapse"), f = a.extend({}, b.DEFAULTS, d.data(), "object" == typeof c && c); 914 e || d.data("bs.collapse", e = new b(this, f)), "string" == typeof c && e[c]() 915 }) 916 }, a.fn.collapse.Constructor = b, a.fn.collapse.noConflict = function () { 917 return a.fn.collapse = c, this 918 }, a(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function (b) { 919 var c, d = a(this), e = d.attr("data-target") || b.preventDefault() || (c = d.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, ""), f = a(e), g = f.data("bs.collapse"), h = g ? "toggle" : d.data(), i = d.attr("data-parent"), j = i && a(i); 920 g && g.transitioning || (j && j.find('[data-toggle=collapse][data-parent="' + i + '"]').not(d).addClass("collapsed"), d[f.hasClass("in") ? "addClass" : "removeClass"]("collapsed")), f.collapse(h) 921 }) 922}(jQuery), +function (a) { 923 "use strict"; 924 function b() { 925 a(d).remove(), a(e).each(function (b) { 926 var d = c(a(this)); 927 d.hasClass("open") && (d.trigger(b = a.Event("hide.bs.dropdown")), b.isDefaultPrevented() || d.removeClass("open").trigger("hidden.bs.dropdown")) 928 }) 929 } 930 931 function c(b) { 932 var c = b.attr("data-target"); 933 c || (c = b.attr("href"), c = c && /#/.test(c) && c.replace(/.*(?=#[^\s]*$)/, "")); 934 var d = c && a(c); 935 return d && d.length ? d : b.parent() 936 } 937 938 var d = ".dropdown-backdrop", e = "[data-toggle=dropdown]", f = function (b) { 939 a(b).on("click.bs.dropdown", this.toggle) 940 }; 941 f.prototype.toggle = function (d) { 942 var e = a(this); 943 if (!e.is(".disabled, :disabled")) { 944 var f = c(e), g = f.hasClass("open"); 945 if (b(), !g) { 946 if ("ontouchstart"in document.documentElement && !f.closest(".navbar-nav").length && a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click", b), f.trigger(d = a.Event("show.bs.dropdown")), d.isDefaultPrevented())return; 947 f.toggleClass("open").trigger("shown.bs.dropdown"), e.focus() 948 } 949 return!1 950 } 951 }, f.prototype.keydown = function (b) { 952 if (/(38|40|27)/.test(b.keyCode)) { 953 var d = a(this); 954 if (b.preventDefault(), b.stopPropagation(), !d.is(".disabled, :disabled")) { 955 var f = c(d), g = f.hasClass("open"); 956 if (!g || g && 27 == b.keyCode)return 27 == b.which && f.find(e).focus(), d.click(); 957 var h = a("[role=menu] li:not(.divider):visible a", f); 958 if (h.length) { 959 var i = h.index(h.filter(":focus")); 960 38 == b.keyCode && i > 0 && i--, 40 == b.keyCode && i < h.length - 1 && i++, ~i || (i = 0), h.eq(i).focus() 961 } 962 } 963 } 964 }; 965 var g = a.fn.dropdown; 966 a.fn.dropdown = function (b) { 967 return this.each(function () { 968 var c = a(this), d = c.data("bs.dropdown"); 969 d || c.data("bs.dropdown", d = new f(this)), "string" == typeof b && d[b].call(c) 970 }) 971 }, a.fn.dropdown.Constructor = f, a.fn.dropdown.noConflict = function () { 972 return a.fn.dropdown = g, this 973 }, a(document).on("click.bs.dropdown.data-api", b).on("click.bs.dropdown.data-api", ".dropdown form",function (a) { 974 a.stopPropagation() 975 }).on("click.bs.dropdown.data-api", e, f.prototype.toggle).on("keydown.bs.dropdown.data-api", e + ", [role=menu]", f.prototype.keydown) 976}(jQuery), +function (a) { 977 "use strict"; 978 var b = function (b, c) { 979 this.options = c, this.$element = a(b), this.$backdrop = this.isShown = null, this.options.remote && this.$element.load(this.options.remote) 980 }; 981 b.DEFAULTS = {backdrop: !0, keyboard: !0, show: !0}, b.prototype.toggle = function (a) { 982 return this[this.isShown ? "hide" : "show"](a) 983 }, b.prototype.show = function (b) { 984 var c = this, d = a.Event("show.bs.modal", {relatedTarget: b}); 985 this.$element.trigger(d), this.isShown || d.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.$element.on("click.dismiss.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(function () { 986 var d = a.support.transition && c.$element.hasClass("fade"); 987 c.$element.parent().length || c.$element.appendTo(document.body), c.$element.show(), d && c.$element[0].offsetWidth, c.$element.addClass("in").attr("aria-hidden", !1), c.enforceFocus(); 988 var e = a.Event("shown.bs.modal", {relatedTarget: b}); 989 d ? c.$element.find(".modal-dialog").one(a.support.transition.end,function () { 990 c.$element.focus().trigger(e) 991 }).emulateTransitionEnd(300) : c.$element.focus().trigger(e) 992 })) 993 }, b.prototype.hide = function (b) { 994 b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one(a.support.transition.end, a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal()) 995 }, b.prototype.enforceFocus = function () { 996 a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) { 997 this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.focus() 998 }, this)) 999 }, b.prototype.escape = function () { 1000 this.isShown && this.options.keyboard ? this.$element.on("keyup.dismiss.bs.modal", a.proxy(function (a) { 1001 27 == a.which && this.hide() 1002 }, this)) : this.isShown || this.$element.off("keyup.dismiss.bs.modal") 1003 }, b.prototype.hideModal = function () { 1004 var a = this; 1005 this.$element.hide(), this.backdrop(function () { 1006 a.removeBackdrop(), a.$element.trigger("hidden.bs.modal") 1007 }) 1008 }, b.prototype.removeBackdrop = function () { 1009 this.$backdrop && this.$backdrop.remove(), this.$backdrop = null 1010 }, b.prototype.backdrop = function (b) { 1011 var c = this.$element.hasClass("fade") ? "fade" : ""; 1012 if (this.isShown && this.options.backdrop) { 1013 var d = a.support.transition && c; 1014 if (this.$backdrop = a('<div class="modal-backdrop ' + c + '" />').appendTo(document.body), this.$element.on("click.dismiss.modal", a.proxy(function (a) { 1015 a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this)) 1016 }, this)), d && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b)return; 1017 d ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b() 1018 } else!this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b()) : b && b() 1019 }; 1020 var c = a.fn.modal; 1021 a.fn.modal = function (c, d) { 1022 return this.each(function () { 1023 var e = a(this), f = e.data("bs.modal"), g = a.extend({}, b.DEFAULTS, e.data(), "object" == typeof c && c); 1024 f || e.data("bs.modal", f = new b(this, g)), "string" == typeof c ? f[c](d) : g.show && f.show(d) 1025 }) 1026 }, a.fn.modal.Constructor = b, a.fn.modal.noConflict = function () { 1027 return a.fn.modal = c, this 1028 }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (b) { 1029 var c = a(this), d = c.attr("href"), e = a(c.attr("data-target") || d && d.replace(/.*(?=#[^\s]+$)/, "")), f = e.data("modal") ? "toggle" : a.extend({remote: !/#/.test(d) && d}, e.data(), c.data()); 1030 b.preventDefault(), e.modal(f, this).one("hide", function () { 1031 c.is(":visible") && c.focus() 1032 }) 1033 }), a(document).on("show.bs.modal", ".modal",function () { 1034 a(document.body).addClass("modal-open") 1035 }).on("hidden.bs.modal", ".modal", function () { 1036 a(document.body).removeClass("modal-open") 1037 }) 1038}(jQuery), +function (a) { 1039 "use strict"; 1040 var b = function (a, b) { 1041 this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init("tooltip", a, b) 1042 }; 1043 b.DEFAULTS = {animation: !0, placement: "top", selector: !1, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1}, b.prototype.init = function (b, c, d) { 1044 this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d); 1045 for (var e = this.options.trigger.split(" "), f = e.length; f--;) { 1046 var g = e[f]; 1047 if ("click" == g)this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) { 1048 var h = "hover" == g ? "mouseenter" : "focus", i = "hover" == g ? "mouseleave" : "blur"; 1049 this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this)) 1050 } 1051 } 1052 this.options.selector ? this._options = a.extend({}, this.options, {trigger: "manual", selector: ""}) : this.fixTitle() 1053 }, b.prototype.getDefaults = function () { 1054 return b.DEFAULTS 1055 }, b.prototype.getOptions = function (b) { 1056 return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {show: b.delay, hide: b.delay}), b 1057 }, b.prototype.getDelegateOptions = function () { 1058 var b = {}, c = this.getDefaults(); 1059 return this._options && a.each(this._options, function (a, d) { 1060 c[a] != d && (b[a] = d) 1061 }), b 1062 }, b.prototype.enter = function (b) { 1063 var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type); 1064 return clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? (c.timeout = setTimeout(function () { 1065 "in" == c.hoverState && c.show() 1066 }, c.options.delay.show), void 0) : c.show() 1067 }, b.prototype.leave = function (b) { 1068 var c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type); 1069 return clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? (c.timeout = setTimeout(function () { 1070 "out" == c.hoverState && c.hide() 1071 }, c.options.delay.hide), void 0) : c.hide() 1072 }, b.prototype.show = function () { 1073 var b = a.Event("show.bs." + this.type); 1074 if (this.hasContent() && this.enabled) { 1075 if (this.$element.trigger(b), b.isDefaultPrevented())return; 1076 var c = this.tip(); 1077 this.setContent(), this.options.animation && c.addClass("fade"); 1078 var d = "function" == typeof this.options.placement ? this.options.placement.call(this, c[0], this.$element[0]) : this.options.placement, e = /\s?auto?\s?/i, f = e.test(d); 1079 f && (d = d.replace(e, "") || "top"), c.detach().css({top: 0, left: 0, display: "block"}).addClass(d), this.options.container ? c.appendTo(this.options.container) : c.insertAfter(this.$element); 1080 var g = this.getPosition(), h = c[0].offsetWidth, i = c[0].offsetHeight; 1081 if (f) { 1082 var j = this.$element.parent(), k = d, l = document.documentElement.scrollTop || document.body.scrollTop, m = "body" == this.options.container ? window.innerWidth : j.outerWidth(), n = "body" == this.options.container ? window.innerHeight : j.outerHeight(), o = "body" == this.options.container ? 0 : j.offset().left; 1083 d = "bottom" == d && g.top + g.height + i - l > n ? "top" : "top" == d && g.top - l - i < 0 ? "bottom" : "right" == d && g.right + h > m ? "left" : "left" == d && g.left - h < o ? "right" : d, c.removeClass(k).addClass(d) 1084 } 1085 var p = this.getCalculatedOffset(d, g, h, i); 1086 this.applyPlacement(p, d), this.$element.trigger("shown.bs." + this.type) 1087 } 1088 }, b.prototype.applyPlacement = function (a, b) { 1089 var c, d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10); 1090 isNaN(g) && (g = 0), isNaN(h) && (h = 0), a.top = a.top + g, a.left = a.left + h, d.offset(a).addClass("in"); 1091 var i = d[0].offsetWidth, j = d[0].offsetHeight; 1092 if ("top" == b && j != f && (c = !0, a.top = a.top + f - j), /bottom|top/.test(b)) { 1093 var k = 0; 1094 a.left < 0 && (k = -2 * a.left, a.left = 0, d.offset(a), i = d[0].offsetWidth, j = d[0].offsetHeight), this.replaceArrow(k - e + i, i, "left") 1095 } else this.replaceArrow(j - f, j, "top"); 1096 c && d.offset(a) 1097 }, b.prototype.replaceArrow = function (a, b, c) { 1098 this.arrow().css(c, a ? 50 * (1 - a / b) + "%" : "") 1099 }, b.prototype.setContent = function () { 1100 var a = this.tip(), b = this.getTitle(); 1101 a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right") 1102 }, b.prototype.hide = function () { 1103 function b() { 1104 "in" != c.hoverState && d.detach() 1105 } 1106 1107 var c = this, d = this.tip(), e = a.Event("hide.bs." + this.type); 1108 return this.$element.trigger(e), e.isDefaultPrevented() ? void 0 : (d.removeClass("in"), a.support.transition && this.$tip.hasClass("fade") ? d.one(a.support.transition.end, b).emulateTransitionEnd(150) : b(), this.$element.trigger("hidden.bs." + this.type), this) 1109 }, b.prototype.fixTitle = function () { 1110 var a = this.$element; 1111 (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "") 1112 }, b.prototype.hasContent = function () { 1113 return this.getTitle() 1114 }, b.prototype.getPosition = function () { 1115 var b = this.$element[0]; 1116 return a.extend({}, "function" == typeof b.getBoundingClientRect ? b.getBoundingClientRect() : {width: b.offsetWidth, height: b.offsetHeight}, this.$element.offset()) 1117 }, b.prototype.getCalculatedOffset = function (a, b, c, d) { 1118 return"bottom" == a ? {top: b.top + b.height, left: b.left + b.width / 2 - c / 2} : "top" == a ? {top: b.top - d, left: b.left + b.width / 2 - c / 2} : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {top: b.top + b.height / 2 - d / 2, left: b.left + b.width} 1119 }, b.prototype.getTitle = function () { 1120 var a, b = this.$element, c = this.options; 1121 return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title) 1122 }, b.prototype.tip = function () { 1123 return this.$tip = this.$tip || a(this.options.template) 1124 }, b.prototype.arrow = function () { 1125 return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow") 1126 }, b.prototype.validate = function () { 1127 this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null) 1128 }, b.prototype.enable = function () { 1129 this.enabled = !0 1130 }, b.prototype.disable = function () { 1131 this.enabled = !1 1132 }, b.prototype.toggleEnabled = function () { 1133 this.enabled = !this.enabled 1134 }, b.prototype.toggle = function (b) { 1135 var c = b ? a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this; 1136 c.tip().hasClass("in") ? c.leave(c) : c.enter(c) 1137 }, b.prototype.destroy = function () { 1138 this.hide().$element.off("." + this.type).removeData("bs." + this.type) 1139 }; 1140 var c = a.fn.tooltip; 1141 a.fn.tooltip = function (c) { 1142 return this.each(function () { 1143 var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof c && c; 1144 e || d.data("bs.tooltip", e = new b(this, f)), "string" == typeof c && e[c]() 1145 }) 1146 }, a.fn.tooltip.Constructor = b, a.fn.tooltip.noConflict = function () { 1147 return a.fn.tooltip = c, this 1148 } 1149}(jQuery), +function (a) { 1150 "use strict"; 1151 var b = function (a, b) { 1152 this.init("popover", a, b) 1153 }; 1154 if (!a.fn.tooltip)throw new Error("Popover requires tooltip.js"); 1155 b.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {placement: "right", trigger: "click", content: "", template: '<div class="popover"><div class="arrow_left"><i class="fa fa-chevron-left"></i></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}), b.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), b.prototype.constructor = b, b.prototype.getDefaults = function () { 1156 return b.DEFAULTS 1157 }, b.prototype.setContent = function () { 1158 var a = this.tip(), b = this.getTitle(), c = this.getContent(); 1159 a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content")[this.options.html ? "html" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide() 1160 }, b.prototype.hasContent = function () { 1161 return this.getTitle() || this.getContent() 1162 }, b.prototype.getContent = function () { 1163 var a = this.$element, b = this.options; 1164 return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content) 1165 }, b.prototype.arrow = function () { 1166 return this.$arrow = this.$arrow || this.tip().find(".arrow") 1167 }, b.prototype.tip = function () { 1168 return this.$tip || (this.$tip = a(this.options.template)), this.$tip 1169 }; 1170 var c = a.fn.popover; 1171 a.fn.popover = function (c) { 1172 return this.each(function () { 1173 var d = a(this), e = d.data("bs.popover"), f = "object" == typeof c && c; 1174 e || d.data("bs.popover", e = new b(this, f)), "string" == typeof c && e[c]() 1175 }) 1176 }, a.fn.popover.Constructor = b, a.fn.popover.noConflict = function () { 1177 return a.fn.popover = c, this 1178 } 1179}(jQuery), +function (a) { 1180 "use strict"; 1181 function b(c, d) { 1182 var e, f = a.proxy(this.process, this); 1183 this.$element = a(c).is("body") ? a(window) : a(c), this.$body = a("body"), this.$scrollElement = this.$element.on("scroll.bs.scroll-spy.data-api", f), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || (e = a(c).attr("href")) && e.replace(/.*(?=#[^\s]+$)/, "") || "") + " .nav li > a", this.offsets = a([]), this.targets = a([]), this.activeTarget = null, this.refresh(), this.process() 1184 } 1185 1186 b.DEFAULTS = {offset: 10}, b.prototype.refresh = function () { 1187 var b = this.$element[0] == window ? "offset" : "position"; 1188 this.offsets = a([]), this.targets = a([]); 1189 var c = this; 1190 this.$body.find(this.selector).map(function () { 1191 var d = a(this), e = d.data("target") || d.attr("href"), f = /^#\w/.test(e) && a(e); 1192 return f && f.length && [ 1193 [f[b]().top + (!a.isWindow(c.$scrollElement.get(0)) && c.$scrollElement.scrollTop()), e] 1194 ] || null 1195 }).sort(function (a, b) { 1196 return a[0] - b[0] 1197 }).each(function () { 1198 c.offsets.push(this[0]), c.targets.push(this[1]) 1199 }) 1200 }, b.prototype.process = function () { 1201 var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight, d = c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget; 1202 if (b >= d)return g != (a = f.last()[0]) && this.activate(a); 1203 for (a = e.length; a--;)g != f[a] && b >= e[a] && (!e[a + 1] || b <= e[a + 1]) && this.activate(f[a]) 1204 }, b.prototype.activate = function (b) { 1205 this.activeTarget = b, a(this.selector).parents(".active").removeClass("active"); 1206 var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active"); 1207 d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy") 1208 }; 1209 var c = a.fn.scrollspy; 1210 a.fn.scrollspy = function (c) { 1211 return this.each(function () { 1212 var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c; 1213 e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]() 1214 }) 1215 }, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () { 1216 return a.fn.scrollspy = c, this 1217 }, a(window).on("load", function () { 1218 a('[data-spy="scroll"]').each(function () { 1219 var b = a(this); 1220 b.scrollspy(b.data()) 1221 }) 1222 }) 1223}(jQuery), +function (a) { 1224 "use strict"; 1225 var b = function (b) { 1226 this.element = a(b) 1227 }; 1228 b.prototype.show = function () { 1229 var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target"); 1230 if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) { 1231 var e = c.find(".active:last a")[0], f = a.Event("show.bs.tab", {relatedTarget: e}); 1232 if (b.trigger(f), !f.isDefaultPrevented()) { 1233 var g = a(d); 1234 this.activate(b.parent("li"), c), this.activate(g, g.parent(), function () { 1235 b.trigger({type: "shown.bs.tab", relatedTarget: e}) 1236 }) 1237 } 1238 } 1239 }, b.prototype.activate = function (b, c, d) { 1240 function e() { 1241 f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"), b.addClass("active"), g ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu") && b.closest("li.dropdown").addClass("active"), d && d() 1242 } 1243 1244 var f = c.find("> .active"), g = d && a.support.transition && f.hasClass("fade"); 1245 g ? f.one(a.support.transition.end, e).emulateTransitionEnd(150) : e(), f.removeClass("in") 1246 }; 1247 var c = a.fn.tab; 1248 a.fn.tab = function (c) { 1249 return this.each(function () { 1250 var d = a(this), e = d.data("bs.tab"); 1251 e || d.data("bs.tab", e = new b(this)), "string" == typeof c && e[c]() 1252 }) 1253 }, a.fn.tab.Constructor = b, a.fn.tab.noConflict = function () { 1254 return a.fn.tab = c, this 1255 }, a(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function (b) { 1256 b.preventDefault(), a(this).tab("show") 1257 }) 1258}(jQuery), +function (a) { 1259 "use strict"; 1260 var b = function (c, d) { 1261 this.options = a.extend({}, b.DEFAULTS, d), this.$window = a(window).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(c), this.affixed = this.unpin = null, this.checkPosition() 1262 }; 1263 b.RESET = "affix affix-top affix-bottom", b.DEFAULTS = {offset: 0}, b.prototype.checkPositionWithEventLoop = function () { 1264 setTimeout(a.proxy(this.checkPosition, this), 1) 1265 }, b.prototype.checkPosition = function () { 1266 if (this.$element.is(":visible")) { 1267 var c = a(document).height(), d = this.$window.scrollTop(), e = this.$element.offset(), f = this.options.offset, g = f.top, h = f.bottom; 1268 "object" != typeof f && (h = g = f), "function" == typeof g && (g = f.top()), "function" == typeof h && (h = f.bottom()); 1269 var i = null != this.unpin && d + this.unpin <= e.top ? !1 : null != h && e.top + this.$element.height() >= c - h ? "bottom" : null != g && g >= d ? "top" : !1; 1270 this.affixed !== i && (this.unpin && this.$element.css("top", ""), this.affixed = i, this.unpin = "bottom" == i ? e.top - d : null, this.$element.removeClass(b.RESET).addClass("affix" + (i ? "-" + i : "")), "bottom" == i && this.$element.offset({top: document.body.offsetHeight - h - this.$element.height()})) 1271 } 1272 }; 1273 var c = a.fn.affix; 1274 a.fn.affix = function (c) { 1275 return this.each(function () { 1276 var d = a(this), e = d.data("bs.affix"), f = "object" == typeof c && c; 1277 e || d.data("bs.affix", e = new b(this, f)), "string" == typeof c && e[c]() 1278 }) 1279 }, a.fn.affix.Constructor = b, a.fn.affix.noConflict = function () { 1280 return a.fn.affix = c, this 1281 }, a(window).on("load", function () { 1282 a('[data-spy="affix"]').each(function () { 1283 var b = a(this), c = b.data(); 1284 c.offset = c.offset || {}, c.offsetBottom && (c.offset.bottom = c.offsetBottom), c.offsetTop && (c.offset.top = c.offsetTop), b.affix(c) 1285 }) 1286 }) 1287}(jQuery); 1288/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup;
vendor: 4,189 bytes, lines 1288-1337
1288 v20140114 */ 1289(function (e) { 1290 "use strict"; 1291 e(document).on("cycle-bootstrap", function (e, t, i) { 1292 "carousel" === t.fx && (i.getSlideIndex = function (e) { 1293 var t = this.opts()._carouselWrap.children(), i = t.index(e); 1294 return i % t.length 1295 }, i.next = function () { 1296 var e = t.reverse ? -1 : 1; 1297 t.allowWrap === !1 && t.currSlide + e > t.slideCount - t.carouselVisible || (t.API.advanceSlide(e), t.API.trigger("cycle-next", [t]).log("cycle-next")) 1298 }) 1299 }), e.fn.cycle.transitions.carousel = {preInit: function (t) { 1300 t.hideNonActive = !1, t.container.on("cycle-destroyed", e.proxy(this.onDestroy, t.API)), t.API.stopTransition = this.stopTransition; 1301 for (var i = 0; t.startingSlide > i; i++)t.container.append(t.slides[0]) 1302 }, postInit: function (t) { 1303 var i, n, s, o, r = t.carouselVertical; 1304 t.carouselVisible && t.carouselVisible > t.slideCount && (t.carouselVisible = t.slideCount - 1); 1305 var l = t.carouselVisible || t.slides.length, c = {display: r ? "block" : "inline-block", position: "static"}; 1306 if (t.container.css({position: "relative", overflow: "hidden"}), t.slides.css(c), t._currSlide = t.currSlide, o = e('<div class="cycle-carousel-wrap"></div>').prependTo(t.container).css({margin: 0, padding: 0, top: 0, left: 0, position: "absolute"}).append(t.slides), t._carouselWrap = o, r || o.css("white-space", "nowrap"), t.allowWrap !== !1) { 1307 for (n = 0; (void 0 === t.carouselVisible ? 2 : 1) > n; n++) { 1308 for (i = 0; t.slideCount > i; i++)o.append(t.slides[i].cloneNode(!0)); 1309 for (i = t.slideCount; i--;)o.prepend(t.slides[i].cloneNode(!0)) 1310 } 1311 o.find(".cycle-slide-active").removeClass("cycle-slide-active"), t.slides.eq(t.startingSlide).addClass("cycle-slide-active") 1312 } 1313 t.pager && t.allowWrap === !1 && (s = t.slideCount - l, e(t.pager).children().filter(":gt(" + s + ")").hide()), t._nextBoundry = t.slideCount - t.carouselVisible, this.prepareDimensions(t) 1314 }, prepareDimensions: function (t) { 1315 var i, n, s, o, r = t.carouselVertical, l = t.carouselVisible || t.slides.length; 1316 if (t.carouselFluid && t.carouselVisible ? t._carouselResizeThrottle || this.fluidSlides(t) : t.carouselVisible && t.carouselSlideDimension ? (i = l * t.carouselSlideDimension, t.container[r ? "height" : "width"](i)) : t.carouselVisible && (i = l * e(t.slides[0])[r ? "outerHeight" : "outerWidth"](!0), t.container[r ? "height" : "width"](i)), n = t.carouselOffset || 0, t.allowWrap !== !1)if (t.carouselSlideDimension)n -= (t.slideCount + t.currSlide) * t.carouselSlideDimension; else for (s = t._carouselWrap.children(), o = 0; t.slideCount + t.currSlide > o; o++)n -= e(s[o])[r ? "outerHeight" : "outerWidth"](!0); 1317 t._carouselWrap.css(r ? "top" : "left", n) 1318 }, fluidSlides: function (t) { 1319 function i() { 1320 clearTimeout(s), s = setTimeout(n, 20) 1321 } 1322 1323 function n() { 1324 t._carouselWrap.stop(!1, !0); 1325 var e = t.container.width() / t.carouselVisible; 1326 e = Math.ceil(e - r), t._carouselWrap.children().width(e), t._sentinel && t._sentinel.width(e), l(t) 1327 } 1328 1329 var s, o = t.slides.eq(0), r = o.outerWidth() - o.width(), l = this.prepareDimensions; 1330 e(window).on("resize", i), t._carouselResizeThrottle = i, n() 1331 }, transition: function (t, i, n, s, o) { 1332 var r, l = {}, c = t.nextSlide - t.currSlide, a = t.carouselVertical, d = t.speed; 1333 if (t.allowWrap === !1) { 1334 s = c > 0; 1335 var u = t._currSlide, p = t.slideCount - t.carouselVisible; 1336 c > 0 && t.nextSlide > p && u == p ? c = 0 : c > 0 && t.nextSlide > p ? c = t.nextSlide - u - (t.nextSlide - p) : 0 > c && t.currSlide > p && t.nextSlide > p ? c = 0 : 0 > c && t.currSlide > p ? c += t.currSlide - p : u = t.currSlide, r = this.getScroll(t, a, u, c), t.API.opts()._currSlide = t.nextSlide > p ? p : t.nextSlide 1337 } else s && 0 === t.nextSlide ? (r = this.getDim(t, t.currSlide, a), o = this.genCallback(t, s, a, o)) : s || t.nextSlide != t.slideCount - 1 ? r = this.get
1337Scroll(t, a, t.currSlide, c) : (r = this.getDim(t, t.currSlide, a), o = this.genCallback(t, s, a, o)); 1338 l[a ? "top" : "left"] = s ? "-=" + r : "+=" + r, t.throttleSpeed && (d = r / e(t.slides[0])[a ? "height" : "width"]() * t.speed), t._carouselWrap.animate(l, d, t.easing, o) 1339 }, getDim: function (t, i, n) { 1340 var s = e(t.slides[i]); 1341 return s[n ? "outerHeight" : "outerWidth"](!0) 1342 }, getScroll: function (e, t, i, n) { 1343 var s, o = 0; 1344 if (n > 0)for (s = i; i + n > s; s++)o += this.getDim(e, s, t); else for (s = i; s > i + n; s--)o += this.getDim(e, s, t); 1345 return o 1346 }, genCallback: function (t, i, n, s) { 1347 return function () { 1348 var i = e(t.slides[t.nextSlide]).position(), o = 0 - i[n ? "top" : "left"] + (t.carouselOffset || 0); 1349 t._carouselWrap.css(t.carouselVertical ? "top" : "left", o), s() 1350 } 1351 }, stopTransition: function () { 1352 var e = this.opts(); 1353 e.slides.stop(!1, !0), e._carouselWrap.stop(!1, !0) 1354 }, onDestroy: function () { 1355 var t = this.opts(); 1356 t._carouselResizeThrottle && e(window).off("resize", t._carouselResizeThrottle), t.slides.prependTo(t.container), t._carouselWrap.remove() 1357 }} 1358})(jQuery); 1359/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140114 */ 1360(function (e) { 1361 "use strict"; 1362 e.event.special.swipe = e.event.special.swipe || {scrollSupressionThreshold: 10, durationThreshold: 1e3, horizontalDistanceThreshold: 30, verticalDistanceThreshold: 75, setup: function () { 1363 var t = e(this); 1364 t.bind("touchstart", function (i) { 1365 function n(t) { 1366 if (r) { 1367 var i = t.originalEvent.touches ? t.originalEvent.touches[0] : t; 1368 s = {time: (new Date).getTime(), coords: [i.pageX, i.pageY]}, Math.abs(r.coords[0] - s.coords[0]) > e.event.special.swipe.scrollSupressionThreshold && t.preventDefault() 1369 } 1370 } 1371 1372 var s, o = i.originalEvent.touches ? i.originalEvent.touches[0] : i, r = {time: (new Date).getTime(), coords: [o.pageX, o.pageY], origin: e(i.target)}; 1373 t.bind("touchmove", n).one("touchend", function () { 1374 t.unbind("touchmove", n), r && s && s.time - r.time < e.event.special.swipe.durationThreshold && Math.abs(r.coords[0] - s.coords[0]) > e.event.special.swipe.horizontalDistanceThreshold && Math.abs(r.coords[1] - s.coords[1]) < e.event.special.swipe.verticalDistanceThreshold && r.origin.trigger("swipe").trigger(r.coords[0] > s.coords[0] ? "swipeleft" : "swiperight"), r = s = void 0 1375 }) 1376 }) 1377 }}, e.event.special.swipeleft = e.event.special.swipeleft || {setup: function () { 1378 e(this).bind("swipe", e.noop) 1379 }}, e.event.special.swiperight = e.event.special.swiperight || e.event.special.swipeleft 1380})(jQuery); 1381$(document).ready(function () { 1382 /* 1383 * Simple image gallery. Uses default settings 1384 */ 1385 1386 $('.fancybox').fancybox({ 1387 helpers: { 1388 titleShow: false, 1389 title: null, 1390 overlay: { 1391 locked: false 1392 } 1393 } 1394 }); 1395 1396 $(".fancybox-ajax").fancybox({type: 'ajax'}); 1397 1398 /*$(".fancybox-ajax-nocontrol").fancybox({ 1399 type: 'ajax', 1400 closeBtn : true, 1401 arrows : false 1402 });*/ 1403 1404 $("body").on('click', '.fancybox-ajax-nocontrol', function (e) { 1405 e.preventDefault(); 1406 $.fancybox.open({ 1407 href: $(this).attr('href'), 1408 type: 'ajax', 1409 closeBtn : true, 1410 arrows : false, 1411 helpers: { 1412 title: null, 1413 overlay: { 1414 locked: false 1415 } 1416 } 1417 }); 1418 }); 1419 1420 $(".fancybox-fullscreen") 1421 .attr('rel', 'gallery') 1422 .fancybox({ 1423 padding : 0, 1424 margin : 0, 1425 nextEffect : 'fade', 1426 prevEffect : 'fade', 1427 wrapCSS : 'fancybox-fullscreen', 1428 //autoPlay : true, 1429 afterLoad : function () { 1430 $.extend(this, { 1431 aspectRatio : false, 1432 type : 'html', 1433 width : '100%', 1434 height : '100%', 1435 content : '<div class="fancybox-image" style="background-color: #000; text-align: center; height:100%; width:100%;"><img style="display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; margin: 0 auto;" src="' + this.href + '" /></div>' 1436 }); 1437 } 1438 }); 1439 1440 $("body").on('click', '.fancybox-iframe', function (e) { 1441 e.preventDefault(); 1442 $.fancybox.open({ 1443 href: $(this).attr('href'), 1444 type: 'iframe', 1445 helpers: { 1446 overlay: {
1447 locked: false 1448 } 1449 }, 1450 1451 }); 1452 }); 1453 1454 $('.fancybox_nobtns').fancybox({ 1455 arrows : false 1456 }); 1457 1458 /* 1459 * Different effects 1460 */ 1461 1462 // Change title type, overlay closing speed 1463 $(".fancybox-effects-a").fancybox({ 1464 helpers: { 1465 title: { 1466 type: 'outside' 1467 }, 1468 overlay: { 1469 speedOut: 0 1470 } 1471 } 1472 }); 1473 1474 // Disable opening and closing animations, change title type 1475 $(".fancybox-effects-b").fancybox({ 1476 openEffect: 'none', 1477 closeEffect: 'none', 1478 1479 helpers: { 1480 title: { 1481 type: 'over' 1482 } 1483 } 1484 }); 1485 1486 // Set custom style, close if clicked, change title type and overlay color 1487 $(".fancybox-effects-c").fancybox({ 1488 wrapCSS: 'fancybox-custom', 1489 closeClick: true, 1490 1491 openEffect: 'none', 1492 1493 helpers: { 1494 title: { 1495 type: 'inside' 1496 }, 1497 overlay: { 1498 css: { 1499 'background': 'rgba(238,238,238,0.85)' 1500 } 1501 } 1502 } 1503 }); 1504 1505 // Remove padding, set opening and closing animations, close if clicked and disable overlay 1506 $(".fancybox-effects-d").fancybox({ 1507 padding: 0, 1508 1509 openEffect: 'elastic', 1510 openSpeed: 150, 1511 1512 closeEffect: 'elastic', 1513 closeSpeed: 150, 1514 1515 closeClick: true, 1516 1517 helpers: { 1518 overlay: null 1519 } 1520 }); 1521 1522 /* 1523 * Button helper. Disable animations, hide close button, change title type and content 1524 */ 1525 1526 $('.fancybox-buttons').fancybox({ 1527 openEffect: 'elastic', 1528 openSpeed: 150, 1529 1530 closeEffect: 'elastic', 1531 closeSpeed: 150, 1532 1533 prevEffect: 'fade', 1534 nextEffect: 'fade', 1535 1536 closeBtn: false, 1537 1538 helpers: { 1539 title: { 1540 type: 'inside' 1541 }, 1542 buttons: {} 1543 }, 1544 1545 afterLoad: function () { 1546 this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 1547 } 1548 }); 1549 1550 1551 /* 1552 * Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked 1553 */ 1554 1555 $('.fancybox-thumbs').fancybox({ 1556 prevEffect: 'none', 1557 nextEffect: 'none', 1558 1559 closeBtn: false, 1560 arrows: false, 1561 nextClick: true, 1562 1563 helpers: { 1564 thumbs: { 1565 width: 50, 1566 height: 50 1567 } 1568 } 1569 }); 1570 1571 /* 1572 * Media helper. Group items, disable animations, hide arrows, enable media and button helpers. 1573 */ 1574 $('.fancybox-media') 1575 .attr('rel', 'media-gallery') 1576 .fancybox({ 1577 openEffect: 'none', 1578 closeEffect: 'none', 1579 prevEffect: 'none', 1580 nextEffect: 'none', 1581 1582 arrows: false, 1583 helpers: { 1584 media: {}, 1585 buttons: {} 1586 } 1587 }); 1588 1589 /* 1590 * Open manually 1591 */ 1592 1593 $("#fancybox-manual-a").click(function () { 1594 $.fancybox.open('1_b.jpg'); 1595 }); 1596 1597 $("#fancybox-manual-b").click(function () { 1598 $.fancybox.open({ 1599 href: 'iframe.html', 1600 type: 'iframe', 1601 padding: 5 1602 }); 1603 }); 1604 1605 $("#fancybox-manual-c").click(function () { 1606 $.fancybox.open([ 1607 { 1608 href: '1_b.jpg', 1609 title: 'My title' 1610 }, 1611 { 1612 href: '2_b.jpg', 1613 title: '2nd title' 1614 }, 1615 { 1616 href: '3_b.jpg' 1617 } 1618 ], { 1619 helpers: { 1620 thumbs: { 1621 width: 75, 1622 height: 50 1623 } 1624 } 1625 }); 1626 }); 1627 1628 1629}); 1630 1631/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 1632 * Licensed under the MIT License (LICENSE.txt). 1633 * 1634 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 1635 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 1636 * Thanks to: Seamus Leahy for adding deltaX and deltaY 1637 * 1638 * Version: 3.0.6 1639 * 1640 * Requires: 1.2.2+ 1641 */ 1642(function (d) { 1643 function e(a) { 1644 var b = a || window.event, c = [].slice.call(arguments, 1), f = 0, e = 0, g = 0, a = d.event.fix(b); 1645 a.type = "mousewheel"; 1646 b.wheelDelta && (f = b.wheelDelta / 120); 1647 b.detail && (f = -b.detail / 3); 1648 g = f; 1649 b.axis !== void 0 && b.axis === b.HORIZONTAL_AXIS && (g = 0, e = -1 * f); 1650 b.wheelDeltaY !== void 0 && (g = b.wheelDeltaY / 120); 1651 b.wheelDeltaX !== void 0 && (e = -1 * b.wheelDeltaX / 120); 1652 c.unshift(a, f, e, g); 1653 return(d.event.dispatch || d.event.handle).apply(this, c) 1654 } 1655 1656 var c = ["DOMMouseScroll", "mousewheel"]; 1657 if (d.event.fixHooks)for (var h = c.length; h;)d.event.fixHooks[c[--h]] = 1658 d.event.mouseHooks; 1659 d.event.special.mousewheel = {setup: function () { 1660 if (this.addEventListener)for (var a = c.length; a;)this.addEventListener(c[--a], e, false); else this.onmousewheel = e 1661 }, teardown: function () { 1662 if (this.removeEventListener)for (var a = c.length; a;)this.removeEventListener(c[--a], e, false); else this.onmousewheel = null 1663 }}; 1664 d.fn.extend({mousewheel: function (a) { 1665 return a ? this.bind("mousewheel", a) : this.trigger("mousewheel") 1666 }, unmousewheel: function (a) { 1667 return this.unbind("mousewheel", a) 1668 }}
vendor: 5,031 bytes, lines 1668-1709
1668) 1669})(jQuery); 1670 1671/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 1672(function (r, G, f, v) { 1673 var J = f("html"), n = f(r), p = f(G), b = f.fancybox = function () { 1674 b.open.apply(this, arguments) 1675 }, I = navigator.userAgent.match(/msie/i), B = null, s = G.createTouch !== v, t = function (a) { 1676 return a && a.hasOwnProperty && a instanceof f 1677 }, q = function (a) { 1678 return a && "string" === f.type(a) 1679 }, E = function (a) { 1680 return q(a) && 0 < a.indexOf("%") 1681 }, l = function (a, d) { 1682 var e = parseInt(a, 10) || 0; 1683 d && E(a) && (e *= b.getViewport()[d] / 100); 1684 return Math.ceil(e) 1685 }, w = function (a, b) { 1686 return l(a, b) + "px" 1687 }; 1688 f.extend(b, {version: "2.1.5", defaults: {padding: 15, margin: 20, 1689 width: 800, height: 600, minWidth: 100, minHeight: 100, maxWidth: 9999, maxHeight: 9999, pixelRatio: 1, autoSize: !0, autoHeight: !1, autoWidth: !1, autoResize: !0, autoCenter: !s, fitToView: !0, aspectRatio: !1, topRatio: 0.5, leftRatio: 0.5, scrolling: "auto", wrapCSS: "", arrows: !0, closeBtn: !0, closeClick: !1, nextClick: !1, mouseWheel: !0, autoPlay: !1, playSpeed: 3E3, preload: 3, modal: !1, loop: !0, ajax: {dataType: "html", headers: {"X-fancyBox": !0}}, iframe: {scrolling: "auto", preload: !0}, swf: {wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always"}, 1690 keys: {next: {13: "left", 34: "up", 39: "left", 40: "up"}, prev: {8: "right", 33: "down", 37: "right", 38: "down"}, close: [27], play: [32], toggle: [70]}, direction: {next: "left", prev: "right"}, scrollOutside: !0, index: 0, type: null, href: null, content: null, title: null, tpl: {wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', image: '<img class="fancybox-image" src="{href}" alt="" />', iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + 1691 (I ? ' allowtransparency="true"' : "") + "></iframe>", error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'}, openEffect: "fade", openSpeed: 250, openEasing: "swing", openOpacity: !0, 1692 openMethod: "zoomIn", closeEffect: "fade", closeSpeed: 250, closeEasing: "swing", closeOpacity: !0, closeMethod: "zoomOut", nextEffect: "elastic", nextSpeed: 250, nextEasing: "swing", nextMethod: "changeIn", prevEffect: "elastic", prevSpeed: 250, prevEasing: "swing", prevMethod: "changeOut", helpers: {overlay: !0, title: !0}, onCancel: f.noop, beforeLoad: f.noop, afterLoad: f.noop, beforeShow: f.noop, afterShow: f.noop, beforeChange: f.noop, beforeClose: f.noop, afterClose: f.noop}, group: {}, opts: {}, previous: null, coming: null, current: null, isActive: !1, 1693 isOpen: !1, isOpened: !1, wrap: null, skin: null, outer: null, inner: null, player: {timer: null, isActive: !1}, ajaxLoad: null, imgPreload: null, transitions: {}, helpers: {}, open: function (a, d) { 1694 if (a && (f.isPlainObject(d) || (d = {}), !1 !== b.close(!0)))return f.isArray(a) || (a = t(a) ? f(a).get() : [a]), f.each(a, function (e, c) { 1695 var k = {}, g, h, j, m, l; 1696 "object" === f.type(c) && (c.nodeType && (c = f(c)), t(c) ? (k = {href: c.data("fancybox-href") || c.attr("href"), title: c.data("fancybox-title") || c.attr("title"), isDom: !0, element: c}, f.metadata && f.extend(!0, k, 1697 c.metadata())) : k = c); 1698 g = d.href || k.href || (q(c) ? c : null); 1699 h = d.title !== v ? d.title : k.title || ""; 1700 m = (j = d.content || k.content) ? "html" : d.type || k.type; 1701 !m && k.isDom && (m = c.data("fancybox-type"), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null)); 1702 q(g) && (m || (b.isImage(g) ? m = "image" : b.isSWF(g) ? m = "swf" : "#" === g.charAt(0) ? m = "inline" : q(c) && (m = "html", j = c)), "ajax" === m && (l = g.split(/\s+/, 2), g = l.shift(), l = l.shift())); 1703 j || ("inline" === m ? g ? j = f(q(g) ? g.replace(/.*(?=#[^\s]+$)/, "") : g) : k.isDom && (j = c) : "html" === m ? j = g : !m && (!g && 1704 k.isDom) && (m = "inline", j = c)); 1705 f.extend(k, {href: g, type: m, content: j, title: h, selector: l}); 1706 a[e] = k 1707 }), b.opts = f.extend(!0, {}, b.defaults, d), d.keys !== v && (b.opts.keys = d.keys ? f.extend({}, b.defaults.keys, d.keys) : !1), b.group = a, b._start(b.opts.index) 1708 }, cancel: function () { 1709 var a = b.coming;
1710 a && !1 !== b.trigger("onCancel") && (b.hideLoading(), b.ajaxLoad && b.ajaxLoad.abort(), b.ajaxLoad = null, b.imgPreload && (b.imgPreload.onload = b.imgPreload.onerror = null), a.wrap && a.wrap.stop(!0, !0).trigger("onReset").remove(), b.coming = null, b.current || 1711 b._afterZoomOut(a)) 1712 }, close: function (a) { 1713 b.cancel(); 1714 !1 !== b.trigger("beforeClose") && (b.unbindEvents(), b.isActive && (!b.isOpen || !0 === a ? (f(".fancybox-wrap").stop(!0).trigger("onReset").remove(), b._afterZoomOut()) : (b.isOpen = b.isOpened = !1, b.isClosing = !0, f(".fancybox-item, .fancybox-nav").remove(), b.wrap.stop(!0, !0).removeClass("fancybox-opened"), b.transitions[b.current.closeMethod]()))) 1715 }, play: function (a) { 1716 var d = function () { 1717 clearTimeout(b.player.timer) 1718 }, e = function () { 1719 d(); 1720 b.current && b.player.isActive && (b.player.timer = 1721 setTimeout(b.next, b.current.playSpeed)) 1722 }, c = function () { 1723 d(); 1724 p.unbind(".player"); 1725 b.player.isActive = !1; 1726 b.trigger("onPlayEnd") 1727 }; 1728 if (!0 === a || !b.player.isActive && !1 !== a) { 1729 if (b.current && (b.current.loop || b.current.index < b.group.length - 1))b.player.isActive = !0, p.bind({"onCancel.player beforeClose.player": c, "onUpdate.player": e, "beforeLoad.player": d}), e(), b.trigger("onPlayStart") 1730 } else c() 1731 }, next: function (a) { 1732 var d = b.current; 1733 d && (q(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next")) 1734 }, prev: function (a) { 1735 var d = b.current; 1736 d && (q(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev")) 1737 }, jumpto: function (a, d, e) { 1738 var c = b.current; 1739 c && (a = l(a), b.direction = d || c.direction[a >= c.index ? "next" : "prev"], b.router = e || "jumpto", c.loop && (0 > a && (a = c.group.length + a % c.group.length), a %= c.group.length), c.group[a] !== v && (b.cancel(), b._start(a))) 1740 }, reposition: function (a, d) { 1741 var e = b.current, c = e ? e.wrap : null, k; 1742 c && (k = b._getPosition(d), a && "scroll" === a.type ? (delete k.position, c.stop(!0, !0).animate(k, 200)) : (c.css(k), e.pos = f.extend({}, e.dim, k))) 1743 }, update: function (a) { 1744 var d = 1745 a && a.type, e = !d || "orientationchange" === d; 1746 e && (clearTimeout(B), B = null); 1747 b.isOpen && !B && (B = setTimeout(function () { 1748 var c = b.current; 1749 c && !b.isClosing && (b.wrap.removeClass("fancybox-tmp"), (e || "load" === d || "resize" === d && c.autoResize) && b._setDimension(), "scroll" === d && c.canShrink || b.reposition(a), b.trigger("onUpdate"), B = null) 1750 }, e && !s ? 0 : 300)) 1751 }, toggle: function (a) { 1752 b.isOpen && (b.current.fitToView = "boolean" === f.type(a) ? a : !b.current.fitToView, s && (b.wrap.removeAttr("style").addClass("fancybox-tmp"), b.trigger("onUpdate")), 1753 b.update()) 1754 }, hideLoading: function () { 1755 p.unbind(".loading"); 1756 f("#fancybox-loading").remove() 1757 }, showLoading: function () { 1758 var a, d; 1759 b.hideLoading(); 1760 a = f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body"); 1761 p.bind("keydown.loading", function (a) { 1762 if (27 === (a.which || a.keyCode))a.preventDefault(), b.cancel() 1763 }); 1764 b.defaults.fixed || (d = b.getViewport(), a.css({position: "absolute", top: 0.5 * d.h + d.y, left: 0.5 * d.w + d.x})) 1765 }, getViewport: function () { 1766 var a = b.current && b.current.locked || !1, d = {x: n.scrollLeft(), 1767 y: n.scrollTop()}; 1768 a ? (d.w = a[0].clientWidth, d.h = a[0].clientHeight) : (d.w = s && r.innerWidth ? r.innerWidth : n.width(), d.h = s && r.innerHeight ? r.innerHeight : n.height()); 1769 return d 1770 }, unbindEvents: function () { 1771 b.wrap && t(b.wrap) && b.wrap.unbind(".fb"); 1772 p.unbind(".fb"); 1773 n.unbind(".fb") 1774 }, bindEvents: function () { 1775 var a = b.current, d; 1776 a && (n.bind("orientationchange.fb" + (s ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), b.update), (d = a.keys) && p.bind("keydown.fb", function (e) { 1777 var c = e.which || e.keyCode, k = e.target || e.srcElement; 1778 if (27 === c && b.coming)return!1; 1779 !e.ctrlKey && (!e.altKey && !e.shiftKey && !e.metaKey && (!k || !k.type && !f(k).is("[contenteditable]"))) && f.each(d, function (d, k) { 1780 if (1 < a.group.length && k[c] !== v)return b[d](k[c]), e.preventDefault(), !1; 1781 if (-1 < f.inArray(c, k))return b[d](), e.preventDefault(), !1 1782 }) 1783 }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function (d, c, k, g) { 1784 for (var h = f(d.target || null), j = !1; h.length && !j && !h.is(".fancybox-skin") && !h.is(".fancybox-wrap");)j = h[0] && !(h[0].style.overflow && "hidden" === h[0].style.overflow) && 1785 (h[0].clientWidth && h[0].scrollWidth > h[0].clientWidth || h[0].clientHeight && h[0].scrollHeight >
vendor: 16,285 bytes, lines 1785-2032
1785 h[0].clientHeight), h = f(h).parent(); 1786 if (0 !== c && !j && 1 < b.group.length && !a.canShrink) { 1787 if (0 < g || 0 < k)b.prev(0 < g ? "down" : "left"); else if (0 > g || 0 > k)b.next(0 > g ? "up" : "right"); 1788 d.preventDefault() 1789 } 1790 })) 1791 }, trigger: function (a, d) { 1792 var e, c = d || b.coming || b.current; 1793 if (c) { 1794 f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1))); 1795 if (!1 === e)return!1; 1796 c.helpers && f.each(c.helpers, function (d, e) { 1797 if (e && b.helpers[d] && f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 1798 {}, b.helpers[d].defaults, e), c) 1799 }); 1800 p.trigger(a) 1801 } 1802 }, isImage: function (a) { 1803 return q(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i) 1804 }, isSWF: function (a) { 1805 return q(a) && a.match(/\.(swf)((\?|#).*)?$/i) 1806 }, _start: function (a) { 1807 var d = {}, e, c; 1808 a = l(a); 1809 e = b.group[a] || null; 1810 if (!e)return!1; 1811 d = f.extend(!0, {}, b.opts, e); 1812 e = d.margin; 1813 c = d.padding; 1814 "number" === f.type(e) && (d.margin = [e, e, e, e]); 1815 "number" === f.type(c) && (d.padding = [c, c, c, c]); 1816 d.modal && f.extend(!0, d, {closeBtn: !1, closeClick: !1, nextClick: !1, arrows: !1, 1817 mouseWheel: !1, keys: null, helpers: {overlay: {closeClick: !1}}}); 1818 d.autoSize && (d.autoWidth = d.autoHeight = !0); 1819 "auto" === d.width && (d.autoWidth = !0); 1820 "auto" === d.height && (d.autoHeight = !0); 1821 d.group = b.group; 1822 d.index = a; 1823 b.coming = d; 1824 if (!1 === b.trigger("beforeLoad"))b.coming = null; else { 1825 c = d.type; 1826 e = d.href; 1827 if (!c)return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1; 1828 b.isActive = !0; 1829 if ("image" === c || "swf" === c)d.autoHeight = d.autoWidth = !1, d.scrolling = "visible"; 1830 "image" === c && (d.aspectRatio = !0); 1831 "iframe" === c && s && (d.scrolling = "scroll"); 1832 d.wrap = f(d.tpl.wrap).addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS).appendTo(d.parent || "body"); 1833 f.extend(d, {skin: f(".fancybox-skin", d.wrap), outer: f(".fancybox-outer", d.wrap), inner: f(".fancybox-inner", d.wrap)}); 1834 f.each(["Top", "Right", "Bottom", "Left"], function (a, b) { 1835 d.skin.css("padding" + b, w(d.padding[a])) 1836 }); 1837 b.trigger("onReady"); 1838 if ("inline" === c || "html" === c) { 1839 if (!d.content || !d.content.length)return b._error("content") 1840 } else if (!e)return b._error("href"); 1841 "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad() 1842 } 1843 }, _error: function (a) { 1844 f.extend(b.coming, {type: "html", autoWidth: !0, autoHeight: !0, minWidth: 0, minHeight: 0, scrolling: "no", hasError: a, content: b.coming.tpl.error}); 1845 b._afterLoad() 1846 }, _loadImage: function () { 1847 var a = b.imgPreload = new Image; 1848 a.onload = function () { 1849 this.onload = this.onerror = null; 1850 b.coming.width = this.width / b.opts.pixelRatio; 1851 b.coming.height = this.height / b.opts.pixelRatio; 1852 b._afterLoad() 1853 }; 1854 a.onerror = function () { 1855 this.onload = 1856 this.onerror = null; 1857 b._error("image") 1858 }; 1859 a.src = b.coming.href; 1860 !0 !== a.complete && b.showLoading() 1861 }, _loadAjax: function () { 1862 var a = b.coming; 1863 b.showLoading(); 1864 b.ajaxLoad = f.ajax(f.extend({}, a.ajax, {url: a.href, error: function (a, e) { 1865 b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading() 1866 }, success: function (d, e) { 1867 "success" === e && (a.content = d, b._afterLoad()) 1868 }})) 1869 }, _loadIframe: function () { 1870 var a = b.coming, d = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", s ? "auto" : a.iframe.scrolling).attr("src", a.href); 1871 f(a.wrap).bind("onReset", function () { 1872 try { 1873 f(this).find("iframe").hide().attr("src", "//about:blank").end().empty() 1874 } catch (a) { 1875 } 1876 }); 1877 a.iframe.preload && (b.showLoading(), d.one("load", function () { 1878 f(this).data("ready", 1); 1879 s || f(this).bind("load.fb", b.update); 1880 f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(); 1881 b._afterLoad() 1882 })); 1883 a.content = d.appendTo(a.inner); 1884 a.iframe.preload || b._afterLoad() 1885 }, _preloadImages: function () { 1886 var a = b.group, d = b.current, e = a.length, c = d.preload ? Math.min(d.preload, 1887 e - 1) : 0, f, g; 1888 for (g = 1; g <= c; g += 1)f = a[(d.index + g) % e], "image" === f.type && f.href && ((new Image).src = f.href) 1889 }, _afterLoad: function () { 1890 var a = b.coming, d = b.current, e, c, k, g, h; 1891 b.hideLoading(); 1892 if (a && !1 !== b.isActive)if (!1 === b.trigger("afterLoad", a, d))a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null; else { 1893 d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 1894 b.unbindEvents(); 1895 e = a.content; 1896 c = a.type; 1897 k = a.scrolling; 1898 f.extend(b, {wrap: a.wrap, skin: a.skin, 1899 outer: a.outer, inner: a.inner, current: a, previous: d}); 1900 g = a.href; 1901 switch (c) { 1902 case "inline": 1903 case "ajax": 1904 case "html": 1905 a.selector ? e = f("<div>").html(e).find(a.selector) : t(e) && (e.data("fancybox-placeholder") || e.data("fancybox-placeholder", f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()), e = e.show().detach(), a.wrap.bind("onReset", function () { 1906 f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1) 1907 })); 1908 break; 1909 case "image": 1910 e = a.tpl.image.replace("{href}", 1911 g); 1912 break; 1913 case "swf": 1914 e = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + g + '"></param>', h = "", f.each(a.swf, function (a, b) { 1915 e += '<param name="' + a + '" value="' + b + '"></param>'; 1916 h += " " + a + '="' + b + '"' 1917 }), e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>" 1918 } 1919 (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e); 1920 b.trigger("beforeShow"); 1921 a.inner.css("overflow", "yes" === k ? "scroll" : 1922 "no" === k ? "hidden" : k); 1923 b._setDimension(); 1924 b.reposition(); 1925 b.isOpen = !1; 1926 b.coming = null; 1927 b.bindEvents(); 1928 if (b.isOpened) { 1929 if (d.prevMethod)b.transitions[d.prevMethod]() 1930 } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove(); 1931 b.transitions[b.isOpened ? a.nextMethod : a.openMethod](); 1932 b._preloadImages() 1933 } 1934 }, _setDimension: function () { 1935 var a = b.getViewport(), d = 0, e = !1, c = !1, e = b.wrap, k = b.skin, g = b.inner, h = b.current, c = h.width, j = h.height, m = h.minWidth, u = h.minHeight, n = h.maxWidth, p = h.maxHeight, s = h.scrolling, q = h.scrollOutside ? 1936 h.scrollbarWidth : 0, x = h.margin, y = l(x[1] + x[3]), r = l(x[0] + x[2]), v, z, t, C, A, F, B, D, H; 1937 e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp"); 1938 x = l(k.outerWidth(!0) - k.width()); 1939 v = l(k.outerHeight(!0) - k.height()); 1940 z = y + x; 1941 t = r + v; 1942 C = E(c) ? (a.w - z) * l(c) / 100 : c; 1943 A = E(j) ? (a.h - t) * l(j) / 100 : j; 1944 if ("iframe" === h.type) { 1945 if (H = h.content, h.autoHeight && 1 === H.data("ready"))try { 1946 H[0].contentWindow.document.location && (g.width(C).height(9999), F = H.contents().find("body"), q && F.css("overflow-x", "hidden"), A = F.outerHeight(!0)) 1947 } catch (G) { 1948 } 1949 } else if (h.autoWidth || 1950 h.autoHeight)g.addClass("fancybox-tmp"), h.autoWidth || g.width(C), h.autoHeight || g.height(A), h.autoWidth && (C = g.width()), h.autoHeight && (A = g.height()), g.removeClass("fancybox-tmp"); 1951 c = l(C); 1952 j = l(A); 1953 D = C / A; 1954 m = l(E(m) ? l(m, "w") - z : m); 1955 n = l(E(n) ? l(n, "w") - z : n); 1956 u = l(E(u) ? l(u, "h") - t : u); 1957 p = l(E(p) ? l(p, "h") - t : p); 1958 F = n; 1959 B = p; 1960 h.fitToView && (n = Math.min(a.w - z, n), p = Math.min(a.h - t, p)); 1961 z = a.w - y; 1962 r = a.h - r; 1963 h.aspectRatio ? (c > n && (c = n, j = l(c / D)), j > p && (j = p, c = l(j * D)), c < m && (c = m, j = l(c / D)), j < u && (j = u, c = l(j * D))) : (c = Math.max(m, Math.min(c, n)), h.autoHeight && 1964 "iframe" !== h.type && (g.width(c), j = g.height()), j = Math.max(u, Math.min(j, p))); 1965 if (h.fitToView)if (g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(), h.aspectRatio)for (; (a > z || y > r) && (c > m && j > u) && !(19 < d++);)j = Math.max(u, Math.min(p, j - 10)), c = l(j * D), c < m && (c = m, j = l(c / D)), c > n && (c = n, j = l(c / D)), g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(); else c = Math.max(m, Math.min(c, c - (a - z))), j = Math.max(u, Math.min(j, j - (y - r))); 1966 q && ("auto" === s && j < A && c + x + q < z) && (c += q); 1967 g.width(c).height(j); 1968 e.width(c + x); 1969 a = e.width(); 1970 y = e.height(); 1971 e = (a > z || y > r) && c > m && j > u; 1972 c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A); 1973 f.extend(h, {dim: {width: w(a), height: w(y)}, origWidth: C, origHeight: A, canShrink: e, canExpand: c, wPadding: x, hPadding: v, wrapSpace: y - k.outerHeight(!0), skinSpace: k.height() - j}); 1974 !H && (h.autoHeight && j > u && j < p && !c) && g.height("auto") 1975 }, _getPosition: function (a) { 1976 var d = b.current, e = b.getViewport(), c = d.margin, f = b.wrap.width() + c[1] + c[3], g = b.wrap.height() + c[0] + c[2], c = {position: "absolute", top: c[0], left: c[3]}; 1977 d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x); 1978 c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio)); 1979 c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio)); 1980 return c 1981 }, _afterZoomIn: function () { 1982 var a = b.current; 1983 a && (b.isOpen = b.isOpened = !0, b.wrap.css("overflow", "visible").addClass("fancybox-opened"), b.update(), (a.closeClick || a.nextClick && 1 < b.group.length) && b.inner.css("cursor", "pointer").bind("click.fb", function (d) { 1984 !f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(), 1985 b[a.closeClick ? "close" : "next"]()) 1986 }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) { 1987 a.preventDefault(); 1988 b.close() 1989 }), a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).bind("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).bind("click.fb", b.next)), b.trigger("afterShow"), !a.loop && a.index === a.group.length - 1 ? b.play(!1) : b.opts.autoPlay && !b.player.isActive && (b.opts.autoPlay = !1, b.play())) 1990 }, _afterZoomOut: function (a) { 1991 a = 1992 a || b.current; 1993 f(".fancybox-wrap").trigger("onReset").remove(); 1994 f.extend(b, {group: {}, opts: {}, router: !1, current: null, isActive: !1, isOpened: !1, isOpen: !1, isClosing: !1, wrap: null, skin: null, outer: null, inner: null}); 1995 b.trigger("afterClose", a) 1996 }}); 1997 b.transitions = {getOrigPosition: function () { 1998 var a = b.current, d = a.element, e = a.orig, c = {}, f = 50, g = 50, h = a.hPadding, j = a.wPadding, m = b.getViewport(); 1999 !e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d)); 2000 t(e) ? (c = e.offset(), e.is("img") && (f = e.outerWidth(), g = e.outerHeight())) : 2001 (c.top = m.y + (m.h - g) * a.topRatio, c.left = m.x + (m.w - f) * a.leftRatio); 2002 if ("fixed" === b.wrap.css("position") || a.locked)c.top -= m.y, c.left -= m.x; 2003 return c = {top: w(c.top - h * a.topRatio), left: w(c.left - j * a.leftRatio), width: w(f + j), height: w(g + h)} 2004 }, step: function (a, d) { 2005 var e, c, f = d.prop; 2006 c = b.current; 2007 var g = c.wrapSpace, h = c.skinSpace; 2008 if ("width" === f || "height" === f)e = d.end === d.start ? 1 : (a - d.start) / (d.end - d.start), b.isClosing && (e = 1 - e), c = "width" === f ? c.wPadding : c.hPadding, c = a - c, b.skin[f](l("width" === f ? c : c - g * e)), b.inner[f](l("width" === 2009 f ? c : c - g * e - h * e)) 2010 }, zoomIn: function () { 2011 var a = b.current, d = a.pos, e = a.openEffect, c = "elastic" === e, k = f.extend({opacity: 1}, d); 2012 delete k.position; 2013 c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1); 2014 b.wrap.css(d).animate(k, {duration: "none" === e ? 0 : a.openSpeed, easing: a.openEasing, step: c ? this.step : null, complete: b._afterZoomIn}) 2015 }, zoomOut: function () { 2016 var a = b.current, d = a.closeEffect, e = "elastic" === d, c = {opacity: 0.1}; 2017 e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1)); 2018 b.wrap.animate(c, 2019 {duration: "none" === d ? 0 : a.closeSpeed, easing: a.closeEasing, step: e ? this.step : null, complete: b._afterZoomOut}) 2020 }, changeIn: function () { 2021 var a = b.current, d = a.nextEffect, e = a.pos, c = {opacity: 1}, f = b.direction, g; 2022 e.opacity = 0.1; 2023 "elastic" === d && (g = "down" === f || "up" === f ? "top" : "left", "down" === f || "right" === f ? (e[g] = w(l(e[g]) - 200), c[g] = "+=200px") : (e[g] = w(l(e[g]) + 200), c[g] = "-=200px")); 2024 "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, {duration: a.nextSpeed, easing: a.nextEasing, complete: b._afterZoomIn}) 2025 }, changeOut: function () { 2026 var a = 2027 b.previous, d = a.prevEffect, e = {opacity: 0.1}, c = b.direction; 2028 "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px"); 2029 a.wrap.animate(e, {duration: "none" === d ? 0 : a.prevSpeed, easing: a.prevEasing, complete: function () { 2030 f(this).trigger("onReset").remove() 2031 }}) 2032 }};
2033 b.helpers.overlay = {defaults: {closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0}, overlay: null, fixed: !1, el: f("html"), create: function (a) { 2034 a = f.extend({}, this.defaults, a); 2035 this.overlay && this.close(); 2036 this.overlay = 2037 f('<div class="fancybox-overlay"></div>').appendTo(b.coming ? b.coming.parent : a.parent); 2038 this.fixed = !1; 2039 a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0) 2040 }, open: function (a) { 2041 var d = this; 2042 a = f.extend({}, this.defaults, a); 2043 this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a); 2044 this.fixed || (n.bind("resize.overlay", f.proxy(this.update, this)), this.update()); 2045 a.closeClick && this.overlay.bind("click.overlay", function (a) { 2046 if (f(a.target).hasClass("fancybox-overlay"))return b.isActive ? 2047 b.close() : d.close(), !1 2048 }); 2049 this.overlay.css(a.css).show() 2050 }, close: function () { 2051 var a, b; 2052 n.unbind("resize.overlay"); 2053 this.el.hasClass("fancybox-lock") && (f(".fancybox-margin").removeClass("fancybox-margin"), a = n.scrollTop(), b = n.scrollLeft(), this.el.removeClass("fancybox-lock"), n.scrollTop(a).scrollLeft(b)); 2054 f(".fancybox-overlay").remove().hide(); 2055 f.extend(this, {overlay: null, fixed: !1}) 2056 }, update: function () { 2057 var a = "100%", b; 2058 this.overlay.width(a).height("100%"); 2059 I ? (b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth), 2060 p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width()); 2061 this.overlay.width(a).height(p.height()) 2062 }, onReady: function (a, b) { 2063 var e = this.overlay; 2064 f(".fancybox-overlay").stop(!0, !0); 2065 e || this.create(a); 2066 a.locked && (this.fixed && b.fixed) && (e || (this.margin = p.height() > n.height() ? f("html").css("margin-right").replace("px", "") : !1), b.locked = this.overlay.append(b.wrap), b.fixed = !1); 2067 !0 === a.showEarly && this.beforeShow.apply(this, arguments) 2068 }, beforeShow: function (a, b) { 2069 var e, c; 2070 b.locked && (!1 !== this.margin && (f("*").filter(function () { 2071 return"fixed" === 2072 f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap") 2073 }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), e = n.scrollTop(), c = n.scrollLeft(), this.el.addClass("fancybox-lock"), n.scrollTop(e).scrollLeft(c)); 2074 this.open(a) 2075 }, onUpdate: function () { 2076 this.fixed || this.update() 2077 }, afterClose: function (a) { 2078 this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this)) 2079 }}; 2080 b.helpers.title = {defaults: {type: "float", position: "bottom"}, beforeShow: function (a) { 2081 var d = 2082 b.current, e = d.title, c = a.type; 2083 f.isFunction(e) && (e = e.call(d.element, d)); 2084 if (q(e) && "" !== f.trim(e)) { 2085 d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>"); 2086 switch (c) { 2087 case "inside": 2088 c = b.skin; 2089 break; 2090 case "outside": 2091 c = b.wrap; 2092 break; 2093 case "over": 2094 c = b.inner; 2095 break; 2096 default: 2097 c = b.skin, d.appendTo("body"), I && d.width(d.width()), d.wrapInner('<span class="child"></span>'), b.current.margin[2] += Math.abs(l(d.css("margin-bottom"))) 2098 } 2099 d["top" === a.position ? "prependTo" : "appendTo"](c) 2100 } 2101 }}; 2102 f.fn.fancybox = function (a) { 2103 var d, 2104 e = f(this), c = this.selector || "", k = function (g) { 2105 var h = f(this).blur(), j = d, k, l; 2106 !g.ctrlKey && (!g.altKey && !g.shiftKey && !g.metaKey) && !h.is(".fancybox-wrap") && (k = a.groupAttr || "data-fancybox-group", l = h.attr(k), l || (k = "rel", l = h.get(0)[k]), l && ("" !== l && "nofollow" !== l) && (h = c.length ? f(c) : e, h = h.filter("[" + k + '="' + l + '"]'), j = h.index(this)), a.index = j, !1 !== b.open(h, a) && g.preventDefault()) 2107 }; 2108 a = a || {}; 2109 d = a.index || 0; 2110 !c || !1 === a.live ? e.unbind("click.fb-start").bind("click.fb-start", k) : p.undelegate(c, "click.fb-start").delegate(c + 2111 ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", k); 2112 this.filter("[data-fancybox-start=1]").trigger("click"); 2113 return this 2114 }; 2115 p.ready(function () { 2116 var a, d; 2117 f.scrollbarWidth === v && (f.scrollbarWidth = function () { 2118 var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"), b = a.children(), b = b.innerWidth() - b.height(99).innerWidth(); 2119 a.remove(); 2120 return b 2121 }); 2122 if (f.support.fixedPosition === v) { 2123 a = f.support; 2124 d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body"); 2125 var e = 20 === 2126 d[0].offsetTop || 15 === d[0].offsetTop; 2127 d.remove(); 2128 a.fixedPosition = e 2129 } 2130 f.extend(b.defaults, {scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body")}); 2131 a = f(r).width(); 2132 J.addClass("fancybox-lock-test"); 2133 d = f(r).width(); 2134 J.removeClass("fancybox-lock-test"); 2135 f("<style type='text/css'>.fancybox-margin{margin-right:" + (d - a) + "px;}</style>").appendTo("head") 2136 }) 2137})(window, document, jQuery); 2138 2139/*! 2140 * Buttons helper for fancyBox 2141 * version: 1.0.5 (Mon, 15 Oct 2012) 2142 * @requires fancyBox v2.0 or later 2143 * 2144 * Usage: 2145 * $(".fancybox").fancybox({ 2146 * helpers : { 2147 * buttons: { 2148 * position : 'top' 2149 * } 2150 * } 2151 * }); 2152 * 2153 */ 2154(function ($) { 2155 //Shortcut for fancyBox object 2156 var F = $.fancybox; 2157 2158 //Add helper object 2159 F.helpers.buttons = { 2160 defaults: { 2161 skipSingle: false, // disables if gallery contains single image 2162 position: 'top', // 'top' or 'bottom' 2163 tpl: '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>' 2164 }, 2165 2166 list: null, 2167 buttons: null, 2168 2169 beforeLoad: function (opts, obj) { 2170 //Remove self if gallery do not have at least two items 2171 2172 if (opts.skipSingle && obj.group.length < 2) { 2173 obj.helpers.buttons = false;
2174 obj.closeBtn = true; 2175 2176 return; 2177 } 2178 2179 //Increase top margin to give space for buttons 2180 obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 2181 }, 2182 2183 onPlayStart: function () { 2184 if (this.buttons) { 2185 this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 2186 } 2187 }, 2188 2189 onPlayEnd: function () { 2190 if (this.buttons) { 2191 this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 2192 } 2193 }, 2194 2195 afterShow: function (opts, obj) { 2196 var buttons = this.buttons; 2197 2198 if (!buttons) { 2199 this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 2200 2201 buttons = { 2202 prev: this.list.find('.btnPrev').click(F.prev), 2203 next: this.list.find('.btnNext').click(F.next), 2204 play: this.list.find('.btnPlay').click(F.play), 2205 toggle: this.list.find('.btnToggle').click(F.toggle), 2206 close: this.list.find('.btnClose').click(F.close) 2207 } 2208 } 2209 2210 //Prev 2211 if (obj.index > 0 || obj.loop) { 2212 buttons.prev.removeClass('btnDisabled'); 2213 } else { 2214 buttons.prev.addClass('btnDisabled'); 2215 } 2216 2217 //Next / Play 2218 if (obj.loop || obj.index < obj.group.length - 1) { 2219 buttons.next.removeClass('btnDisabled'); 2220 buttons.play.removeClass('btnDisabled'); 2221 2222 } else { 2223 buttons.next.addClass('btnDisabled'); 2224 buttons.play.addClass('btnDisabled'); 2225 } 2226 2227 this.buttons = buttons; 2228 2229 this.onUpdate(opts, obj); 2230 }, 2231 2232 onUpdate: function (opts, obj) { 2233 var toggle; 2234 2235 if (!this.buttons) { 2236 return; 2237 } 2238 2239 toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 2240 2241 //Size toggle button 2242 if (obj.canShrink) { 2243 toggle.addClass('btnToggleOn'); 2244 2245 } else if (!obj.canExpand) { 2246 toggle.addClass('btnDisabled'); 2247 } 2248 }, 2249 2250 beforeClose: function () { 2251 if (this.list) { 2252 this.list.remove(); 2253 } 2254 2255 this.list = null; 2256 this.buttons = null; 2257 } 2258 }; 2259 2260}(jQuery)); 2261 2262 2263/*! 2264 * Thumbnail helper for fancyBox 2265 * version: 1.0.7 (Mon, 01 Oct 2012) 2266 * @requires fancyBox v2.0 or later 2267 * 2268 * Usage: 2269 * $(".fancybox").fancybox({ 2270 * helpers : { 2271 * thumbs: { 2272 * width : 50, 2273 * height : 50 2274 * } 2275 * } 2276 * }); 2277 * 2278 */ 2279(function ($) { 2280 //Shortcut for fancyBox object 2281 var F = $.fancybox; 2282 2283 //Add helper object 2284 F.helpers.thumbs = { 2285 defaults: { 2286 width: 50, // thumbnail width 2287 height: 50, // thumbnail height 2288 position: 'bottom', // 'top' or 'bottom' 2289 source: function (item) { // function to obtain the URL of the thumbnail image 2290 var href; 2291 2292 if (item.element) { 2293 href = $(item.element).find('img').attr('src'); 2294 } 2295 2296 if (!href && item.type === 'image' && item.href) { 2297 href = item.href; 2298 } 2299 2300 return href; 2301 } 2302 }, 2303 2304 wrap: null, 2305 list: null, 2306 width: 0, 2307 2308 init: function (opts, obj) { 2309 var that = this, 2310 list, 2311 thumbWidth = opts.width, 2312 thumbHeight = opts.height, 2313 thumbSource = opts.source; 2314 2315 //Build list structure 2316 list = ''; 2317 2318 for (var n = 0; n < obj.group.length; n++) { 2319 list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>'; 2320 } 2321 2322 this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body'); 2323 this.list = $('<ul>
vendor: 4,357 bytes, lines 2323-2471
2323' + list + '</ul>').appendTo(this.wrap); 2324 2325 //Load each thumbnail 2326 $.each(obj.group, function (i) { 2327 var href = thumbSource(obj.group[ i ]); 2328 2329 if (!href) { 2330 return; 2331 } 2332 2333 $("<img />").load(function () { 2334 var width = this.width, 2335 height = this.height, 2336 widthRatio, heightRatio, parent; 2337 2338 if (!that.list || !width || !height) { 2339 return; 2340 } 2341 2342 //Calculate thumbnail width/height and center it 2343 widthRatio = width / thumbWidth; 2344 heightRatio = height / thumbHeight; 2345 2346 parent = that.list.children().eq(i).find('a'); 2347 2348 if (widthRatio >= 1 && heightRatio >= 1) { 2349 if (widthRatio > heightRatio) { 2350 width = Math.floor(width / heightRatio); 2351 height = thumbHeight; 2352 2353 } else { 2354 width = thumbWidth; 2355 height = Math.floor(height / widthRatio); 2356 } 2357 } 2358 2359 $(this).css({ 2360 width: width, 2361 height: height, 2362 top: Math.floor(thumbHeight / 2 - height / 2), 2363 left: Math.floor(thumbWidth / 2 - width / 2) 2364 }); 2365 2366 parent.width(thumbWidth).height(thumbHeight); 2367 2368 $(this).hide().appendTo(parent).fadeIn(300); 2369 2370 }).attr('src', href); 2371 }); 2372 2373 //Set initial width 2374 this.width = this.list.children().eq(0).outerWidth(true); 2375 2376 this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 2377 }, 2378 2379 beforeLoad: function (opts, obj) { 2380 //Remove self if gallery do not have at least two items 2381 if (obj.group.length < 2) { 2382 obj.helpers.thumbs = false; 2383 2384 return; 2385 } 2386 2387 //Increase bottom margin to give space for thumbs 2388 obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 2389 }, 2390 2391 afterShow: function (opts, obj) { 2392 //Check if exists and create or update list 2393 if (this.list) { 2394 this.onUpdate(opts, obj); 2395 2396 } else { 2397 this.init(opts, obj); 2398 } 2399 2400 //Set active element 2401 this.list.children().removeClass('active').eq(obj.index).addClass('active'); 2402 }, 2403 2404 //Center list 2405 onUpdate: function (opts, obj) { 2406 if (this.list) { 2407 this.list.stop(true).animate({ 2408 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 2409 }, 150); 2410 } 2411 }, 2412 2413 beforeClose: function () { 2414 if (this.wrap) { 2415 this.wrap.remove(); 2416 } 2417 2418 this.wrap = null; 2419 this.list = null; 2420 this.width = 0; 2421 } 2422 } 2423 2424}(jQuery)); 2425 2426 2427/*! 2428 * Media helper for fancyBox 2429 * version: 1.0.6 (Fri, 14 Jun 2013) 2430 * @requires fancyBox v2.0 or later 2431 * 2432 * Usage: 2433 * $(".fancybox").fancybox({ 2434 * helpers : { 2435 * media: true 2436 * } 2437 * }); 2438 * 2439 * Set custom URL parameters: 2440 * $(".fancybox").fancybox({ 2441 * helpers : { 2442 * media: { 2443 * youtube : { 2444 * params : { 2445 * autoplay : 0 2446 * } 2447 * } 2448 * } 2449 * } 2450 * }); 2451 * 2452 * Or: 2453 * $(".fancybox").fancybox({, 2454 * helpers : { 2455 * media: true 2456 * }, 2457 * youtube : { 2458 * autoplay: 0 2459 * } 2460 * }); 2461 * 2462 * Supports: 2463 * 2464 * Youtube 2465 * http://www.youtube.com/watch?v=opj24KnzrWo 2466 * http://www.youtube.com/embed/opj24KnzrWo 2467 * http://youtu.be/opj24KnzrWo 2468 * http://www.youtube-nocookie.com/embed/opj24KnzrWo 2469 * Vimeo 2470 * http://vimeo.com/40648169 2471 * http://vimeo.com/channels/staffpicks/38843628
vendor: 5,381 bytes, lines 2472-2620
2472 * http://vimeo.com/groups/surrealism/videos/36516384 2473 * http://player.vimeo.com/video/45074303 2474 * Metacafe 2475 * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 2476 * http://www.metacafe.com/watch/7635964/ 2477 * Dailymotion 2478 * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 2479 * Twitvid 2480 * http://twitvid.com/QY7MD 2481 * Twitpic 2482 * http://twitpic.com/7p93st 2483 * Instagram 2484 * http://instagr.am/p/IejkuUGxQn/ 2485 * http://instagram.com/p/IejkuUGxQn/ 2486 * Google maps 2487 * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 2488 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 2489 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 2490 */ 2491(function ($) { 2492 "use strict"; 2493 2494 //Shortcut for fancyBox object 2495 var F = $.fancybox, 2496 format = function (url, rez, params) { 2497 params = params || ''; 2498 2499 if ($.type(params) === "object") { 2500 params = $.param(params, true); 2501 } 2502 2503 $.each(rez, function (key, value) { 2504 url = url.replace('$' + key, value || ''); 2505 }); 2506 2507 if (params.length) { 2508 url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 2509 } 2510 2511 return url; 2512 }; 2513 2514 //Add helper object 2515 F.helpers.media = { 2516 defaults: { 2517 youtube: { 2518 matcher: /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 2519 params: { 2520 autoplay: 1, 2521 autohide: 1, 2522 fs: 1, 2523 rel: 0, 2524 hd: 1, 2525 wmode: 'opaque', 2526 enablejsapi: 1 2527 }, 2528 type: 'iframe', 2529 url: '//www.youtube.com/embed/$3' 2530 }, 2531 vimeo: { 2532 matcher: /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 2533 params: { 2534 autoplay: 1, 2535 hd: 1, 2536 show_title: 1, 2537 show_byline: 1, 2538 show_portrait: 0, 2539 fullscreen: 1 2540 }, 2541 type: 'iframe', 2542 url: '//player.vimeo.com/video/$1' 2543 }, 2544 metacafe: { 2545 matcher: /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 2546 params: { 2547 autoPlay: 'yes' 2548 }, 2549 type: 'swf', 2550 url: function (rez, params, obj) { 2551 obj.swf.flashVars = 'playerVars=' + $.param(params, true); 2552 2553 return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 2554 } 2555 }, 2556 dailymotion: { 2557 matcher: /dailymotion.com\/video\/(.*)\/?(.*)/, 2558 params: { 2559 additionalInfos: 0, 2560 autoStart: 1 2561 }, 2562 type: 'swf', 2563 url: '//www.dailymotion.com/swf/video/$1' 2564 }, 2565 twitvid: { 2566 matcher: /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 2567 params: { 2568 autoplay: 0 2569 }, 2570 type: 'iframe', 2571 url: '//www.twitvid.com/embed.php?guid=$1' 2572 }, 2573 twitpic: { 2574 matcher: /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 2575 type: 'image', 2576 url: '//twitpic.com/show/full/$1/' 2577 }, 2578 instagram: { 2579 matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 2580 type: 'image', 2581 url: '//$1/p/$2/media/?size=l' 2582 }, 2583 google_maps: { 2584 matcher: /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 2585 type: 'iframe', 2586 url: function (rez) { 2587 return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 2588 } 2589 } 2590 }, 2591 2592 beforeLoad: function (opts, obj) { 2593 var url = obj.href || '', 2594 type = false, 2595 what, 2596 item, 2597 rez, 2598 params; 2599 2600 for (what in opts) { 2601 if (opts.hasOwnProperty(what)) { 2602 item = opts[ what ]; 2603 rez = url.match(item.matcher); 2604 2605 if (rez) { 2606 type = item.type; 2607 params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 2608 2609 url = $.type(item.url) === "function" ? item.url.call(this, rez, params, obj) : format(item.url, rez, params); 2610 2611 break; 2612 } 2613 } 2614 } 2615 2616 if (type) { 2617 obj.href = url; 2618 obj.type = type; 2619 2620 obj.autoHeight = false;
2621 } 2622 } 2623 }; 2624 2625}(jQuery)); 2626/*! jQuery UI - v1.10.4 - 2020-11-05 2627* http://jqueryui.com 2628* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.datepicker.js, jquery.ui.menu.js 2629* Copyright jQuery Foundation and other contributors; Licensed MIT */ 2630 2631!function(a,u){var t,e,n=0,i=/^ui-id-\d+$/;function s(t,e){var n,i,s=t.nodeName.toLowerCase();return"area"===s?(i=(n=t.parentNode).name,!(!t.href||!i||"map"!==n.nodeName.toLowerCase())&&(!!(i=a("img[usemap=#"+i+"]")[0])&&r(i))):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||e)&&r(t)}function r(t){return a.expr.filters.visible(t)&&!a(t).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({focus:(t=a.fn.focus,function(e,n){return"number"==typeof e?this.each(function(){var t=this;setTimeout(function(){a(t).focus(),n&&n.call(t)},e)}):t.apply(this,arguments)}),scrollParent:function(){var t=(a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))})).eq(0);return/fixed/.test(this.css("position"))||!t.length?a(document):t},zIndex:function(t){if(t!==u)return this.css("zIndex",t);if(this.length)for(var e,n,i=a(this[0]);i.length&&i[0]!==document;){if(("absolute"===(e=i.css("position"))||"relative"===e||"fixed"===e)&&(n=parseInt(i.css("zIndex"),10),!isNaN(n)&&0!==n))return n;i=i.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){i.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(e){return function(t){return!!a.data(t,e)}}):function(t,e,n){return!!a.data(t,n[3])},focusable:function(t){return s(t,!isNaN(a.attr(t,"tabindex")))},tabbable:function(t){var e=a.attr(t,"tabindex"),n=isNaN(e);return(n||0<=e)&&s(t,!n)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(t,n){var s="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),r={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function o(t,e,n,i){return a.each(s,function(){e-=parseFloat(a.css(t,"padding"+this))||0,n&&(e-=parseFloat(a.css(t,"border"+this+"Width"))||0),i&&(e-=parseFloat(a.css(t,"margin"+this))||0)}),e}a.fn["inner"+n]=function(t){return t===u?r["inner"+n].call(this):this.each(function(){a(this).css(i,o(this,t)+"px")})},a.fn["outer"+n]=function(t,e){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){a(this).css(i,o(this,t,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=(e=a.fn.removeData,function(t){return arguments.length?e.call(this,a.camelCase(t)):e.call(this)})),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.support.selectstart="onselectstart"in document.createElement("div"),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(t,e,n){var i,s=a.ui[t].prototype;for(i in n)s.plugins[i]=s.plugins[i]||[],s.plugins[i].push([e,n[i]])},call:function(t,e,n){var i,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(i=0;i<s.length;i++)t.options[s[i][0]]&&s[i][1].apply(t.element,n)}},hasScroll:function(t,e){if("hidden"===a(t).css("overflow"))return!1;var n=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;return 0<t[n]||(t[n]=1,e=0<t[n],t[n]=0,e)}})}(jQuery);!function(d,r){var i=0,u=Array.prototype.slice,n=d.cleanData;d.cleanData=function(t){for(var e,i=0;null!=(e=t[i]);i++)try{d(e).triggerHandler("remove")}catch(t){}n(t)},d.widget=function(t,i,e){var n,s,o,a,r={},u=t.split(".")[0];t=t.split(".")[1],n=u+"-"+t,e||(e=i,i=d.Widget),d.expr[":"][n.toLowerCase()]=function(t){return!!d.data(t,n)},d[u]=d[u]||{},s=d[u][t],o=d[u][t]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},d.extend(o,s,{version:e.version,_proto:d.extend({},e),_childConstructors:[]}),(a=new i).options=d.widget.extend({},a.options),d.each(e,function(e,n){function s(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}d.isFunction(n)?r[e]=function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=o,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}:r[e]=n}),o.prototype=d.widget.extend(a,{widgetEventPrefix:s&&a.widgetEventPrefix||t},r,{constructor:o,namespace:u,widgetName:t,widgetFullName:n}),s?(d.each(s._childConstructors,function(t,e){var i=e.prototype;d.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete s._childConstructors):i._childConstructors.push(o),d.widget.bridge(t,o)}
2631,d.widget.extend=function(t){for(var e,i,n=u.call(arguments,1),s=0,o=n.length;s<o;s++)for(e in n[s])i=n[s][e],n[s].hasOwnProperty(e)&&i!==r&&(d.isPlainObject(i)?t[e]=d.isPlainObject(t[e])?d.widget.extend({},t[e],i):d.widget.extend({},i):t[e]=i);return t},d.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;d.fn[o]=function(i){var t="string"==typeof i,n=u.call(arguments,1),s=this;return i=!t&&n.length?d.widget.extend.apply(null,[i].concat(n)):i,t?this.each(function(){var t,e=d.data(this,a);return e?d.isFunction(e[i])&&"_"!==i.charAt(0)?(t=e[i].apply(e,n))!==e&&t!==r?(s=t&&t.jquery?s.pushStack(t.get()):t,!1):void 0:d.error("no such method '"+i+"' for "+o+" widget instance"):d.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var t=d.data(this,a);t?t.option(i||{})._init():d.data(this,a,new e(i,this))}),s}},d.Widget=function(){},d.Widget._childConstructors=[],d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,e){e=d(e||this.defaultElement||this)[0],this.element=d(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=d.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=d(),this.hoverable=d(),this.focusable=d(),e!==this&&(d.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=d(e.style?e.ownerDocument:e.document||e),this.window=d(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:d.noop,_getCreateEventData:d.noop,_create:d.noop,_init:d.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(d.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:d.noop,widget:function(){return this.element},option:function(t,e){var i,n,s,o=t;if(0===arguments.length)return d.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(n=o[t]=d.widget.extend({},this.options[t]),s=0;s<i.length-1;s++)n[i[s]]=n[i[s]]||{},n=n[i[s]];if(t=i.pop(),1===arguments.length)return n[t]===r?null:n[t];n[t]=e}else{if(1===arguments.length)return this.options[t]===r?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(s,o,t){var a,r=this;"boolean"!=typeof s&&(t=o,o=s,s=!1),t?(o=a=d(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),d.each(t,function(t,e){function i(){if(s||!0!==r.options.disabled&&!d(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||d.guid++);var n=t.match(/^(\w+)\s*(.*)$/),t=n[1]+r.eventNamespace,n=n[2];n?a.delegate(n,t,i):o.bind(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){d(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){d(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){d(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){d(t.currentTarget).removeClass("ui-state-focus")}})}
vendor: 7,370 bytes, line 2631
2631,_trigger:function(t,e,i){var n,s,o=this.options[t];if(i=i||{},(e=d.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],s=e.originalEvent)for(n in s)n in e||(e[n]=s[n]);return this.element.trigger(e,i),!(d.isFunction(o)&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},d.each({show:"fadeIn",hide:"fadeOut"},function(o,a){d.Widget.prototype["_"+o]=function(e,t,i){"string"==typeof t&&(t={effect:t});var n,s=t?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})&&(t={duration:t}),n=!d.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&d.effects&&d.effects.effect[s]?e[o](t):s!==o&&e[s]?e[s](t.duration,t.easing,i):e.queue(function(t){d(this)[o](),i&&i.call(e[0]),t()})}})}(jQuery);!function(i){var u=!1;i(document).mouseup(function(){u=!1}),i.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(!0===i.data(e.target,t.widgetName+".preventClickEvent"))return i.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&i(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!u){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,s=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&i(e.target).closest(this.options.cancel).length;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===i.data(e.target,this.widgetName+".preventClickEvent")&&i.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},i(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),u=!0)):!0}},_mouseMove:function(e){return i.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return i(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&i.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery);!function(H){H.ui=H.ui||{};var o,x=Math.max,T=Math.abs,L=Math.round,l=/left|center|right/,n=/top|center|bottom/,s=/[\+\-]\d+(\.[\d]+)?%?/,f=/^\w+/,h=/%$/,e=H.fn.position;function P(t,i,e){return[parseFloat(t[0])*(h.test(t[0])?i/100:1),parseFloat(t[1])*(h.test(t[1])?e/100:1)]}function D(t,i){return parseInt(H.css(t,i),10)||0}H.position={scrollbarWidth:function(){if(void 0!==o)return o;var t,i=H("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),e=i.children()[0];return H("body").append(i),t=e.offsetWidth,i.css("overflow","scroll"),t===(e=e.offsetWidth)&&(e=i[0].clientWidth),i.remove(),o=t-e},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),e=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth;return{width:"scroll"===e||"auto"===e&&t.height<t.element[0].scrollHeight?H.position.scrollbarWidth():0,height:i?H.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=H(t||window),t=H.isWindow(i[0]);return{element:i,isWindow:t,isDocument:!!i[0]&&9===i[0].nodeType,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:t?i.width():i.outerWidth(),height:t?i.height():i.outerHeight()}}},H.fn.position=function(c){if(!c||!c.of)return e.apply(this,arguments);c=H.extend({},c);var a,d,g,m,u,t,w=H(c.of),W=H.position.getWithinInfo(c.within),v=H.position.getScrollInfo(W),y=(c.collision||"flip").split(" "),b={},i=9===(t=(i=w)[0]).nodeType?{width:i.width(),height:i.height(),offset:{top:0,left:0}}:H.isWindow(t)?{width:i.width(),height:i.height(),offset:{top:i.scrollTop(),left:i.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:i.outerWidth(),height:i.outerHeight(),offset:i.offset()};return w[0].preventDefault&&(c.at="left top"),d=i.width,g=i.height,m=i.offset,u=H.extend({},m),H.each(["my","at"],function(){var t,i,e=(c[this]||"").split(" ");1===e.length&&(e=l.test(e[0])?e.concat(["center"]):n.test(e[0])?["center"].concat(e):["center","center"]),e[0]=l.test(e[0])?e[0]:"center",e[1]=n.test(e[1])?e[1]:"center",t=s.exec(e[0]),i=s.exec(e[1]),b[this]=[t?t[0]:0,i?i[0]:0],c[this]=[f.exec(e[0])[0],f.exec(e[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===c.at[0]?u.left+=d:"center"===c.at[0]&&(u.left+=d/2),"bottom"===c.at[1]?u.top+=g:"center"===c.at[1]&&(u.top+=g/2),a=P(b.at,d,g),u.left+=a[0],u.top+=a[1],this.each(function(){var e,t,s=H(this),f=s.outerWidth(),h=s.outerHeight(),i=D(this,"marginLeft"),o=D(this,"marginTop"),l=f+i+D(this,"marginRight")+v.width,n=h+o+D(this,"marginBottom")+v.height,r=H.extend({},u),p=P(b.my,s.outerWidth(),s.outerHeight());"right"===c.my[0]?r.left-=f:"center"===c.my[0]&&(r.left-=f/2),"bottom"===c.my[1]?r.top-=h:"center"===c.my[1]&&(r.top-=h/2),r.left+=p[0],r.top+=p[1],H.support.offsetFractions||(r.left=L(r.left),r.top=L(r.top)),e={marginLeft:i,marginTop:o},H.each(["left","top"],function(t,i){H.ui.position[y[t]]&&H.ui.position[y[t]][i](r,{targetWidth:d,targetHeight:g,elemWidth:f,elemHeight:h,collisionPosition:e,collisionWidth:l,collisionHeight:n,offset:[a[0]+p[0],a[1]+p[1]],my:c.my,at:c.at,within:W,elem:s})}),c.using&&(t=function(t){var i=m.left-r.left,e=i+d-f,o=m.top-r.top,l=o+g-h,n={target:{element:w,left:m.left,top:m.top,width:d,height:g},element:{element:s,left:r.left,top:r.top,width:f,height:h},horizontal:e<0?"left":0<i?"right":"center",vertical:l<0?"top":0<o?"bottom":"middle"};d<f&&T(i+e)<d&&(n.horizontal="center"),g<h&&T(o+l)<g&&(n.vertical="middle"),x(T(i),T(e))>x(T(o),T(l))?n.important="horizontal":n.important="vertical",c.using.call(this,t,n)}),s.offset(H.extend(r,{using:t}))})},H.ui.position={fit:{left:function(t,i){var e=i.within,o=e.isWindow?e.scrollLeft:e.offset.left,l=e.width,n=t.left-i.collisionPosition.marginLeft,s=o-n,f=n+i.collisionWidth-l-
2631o;i.collisionWidth>l?0<s&&f<=0?(e=t.left+s+i.collisionWidth-l-o,t.left+=s-e):t.left=!(0<f&&s<=0)&&f<s?o+l-i.collisionWidth:o:0<s?t.left+=s:0<f?t.left-=f:t.left=x(t.left-n,t.left)},top:function(t,i){var e=i.within,o=e.isWindow?e.scrollTop:e.offset.top,l=i.within.height,n=t.top-i.collisionPosition.marginTop,s=o-n,f=n+i.collisionHeight-l-o;i.collisionHeight>l?0<s&&f<=0?(e=t.top+s+i.collisionHeight-l-o,t.top+=s-e):t.top=!(0<f&&s<=0)&&f<s?o+l-i.collisionHeight:o:0<s?t.top+=s:0<f?t.top-=f:t.top=x(t.top-n,t.top)}},flip:{left:function(t,i){var e=i.within,o=e.offset.left+e.scrollLeft,l=e.width,n=e.isWindow?e.scrollLeft:e.offset.left,s=t.left-i.collisionPosition.marginLeft,f=s-n,h=s+i.collisionWidth-l-n,r="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,e="left"===i.at[0]?i.targetWidth:"right"===i.at[0]?-i.targetWidth:0,s=-2*i.offset[0];f<0?((o=t.left+r+e+s+i.collisionWidth-l-o)<0||o<T(f))&&(t.left+=r+e+s):0<h&&(0<(n=t.left-i.collisionPosition.marginLeft+r+e+s-n)||T(n)<h)&&(t.left+=r+e+s)},top:function(t,i){var e=i.within,o=e.offset.top+e.scrollTop,l=e.height,n=e.isWindow?e.scrollTop:e.offset.top,s=t.top-i.collisionPosition.marginTop,f=s-n,h=s+i.collisionHeight-l-n,r="top"===i.my[1]?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,e="top"===i.at[1]?i.targetHeight:"bottom"===i.at[1]?-i.targetHeight:0,s=-2*i.offset[1];f<0?(o=t.top+r+e+s+i.collisionHeight-l-o,t.top+r+e+s>f&&(o<0||o<T(f))&&(t.top+=r+e+s)):0<h&&(n=t.top-i.collisionPosition.marginTop+r+e+s-n,t.top+r+e+s>h&&(0<n||T(n)<h)&&(t.top+=r+e+s))}},flipfit:{left:function(){H.ui.position.flip.left.apply(this,arguments),H.ui.position.fit.left.apply(this,arguments)},top:function(){H.ui.position.flip.top.apply(this,arguments),H.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i=document.getElementsByTagName("body")[0],e=document.createElement("div"),o=document.createElement(i?"div":"body"),l={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(t in i&&H.extend(l,{position:"absolute",left:"-1000px",top:"-1000px"}),l)o.style[t]=l[t];o.appendChild(e),(i=i||document.documentElement).insertBefore(o,i.firstChild),e.style.cssText="position: absolute; left: 10.7432222px;",e=H(e).offset().left,H.support.offsetFractions=10<e&&e<11,o.innerHTML="",i.removeChild(o)}()}(jQuery);!function(h){var s=0,l={},u={};l.height=l.paddingTop=l.paddingBottom=l.borderTopWidth=l.borderBottomWidth="hide",u.height=u.paddingTop=u.paddingBottom=u.borderTopWidth=u.borderBottomWidth="show",h.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=h(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():h(),content:this.active.length?this.active.next():h()}},_createIcons:function(){var e=this.options.icons;e&&(h("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id
vendor: 7,833 bytes, line 2631
2631)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)):this._activate(t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=h.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(h(e.target).attr("tabIndex",-1),h(s).attr("tabIndex",0),s.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===h.ui.keyCode.UP&&e.ctrlKey&&h(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=h()):!1===e.active?this._activate(0):this.active.length&&!h.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=h()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent(),n=this.accordionId="ui-accordion-"+(this.element.attr("id")||++s);this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var t=h(this),i=t.attr("id"),a=t.next(),s=a.attr("id");i||(i=n+"-header-"+e,t.attr("id",i)),s||(s=n+"-panel-"+e,a.attr("id",s)),t.attr("aria-controls",s),a.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=h(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=h(this).outerHeight(!0)}),this.headers.next().each(function(){h(this).height(Math.max(0,i-h(this).innerHeight()+h(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){i=Math.max(i,h(this).css("height","").height())}).height(i))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:h.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):h()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&h.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=h(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,r=n?h():a.next(),o=i.next(),r={oldHeader:i,oldPanel:o,newHeader:n?h():a,newPanel:r};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,r)||(t.active=!n&&this.headers.index(a),this.active=s?h():a,this._toggle(r),i.removeClass("ui-accordion-header-active ui-state-active"),t.icons&&i.children(".ui-accordion-header-icon").removeClass(t.icons.activeHeader).addClass(t.icons.header),s||(a.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),t.icons&&a.children(".ui-accordion-header-icon").removeClass(t.icons.header).addClass(t.icons.activeHeader),a.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr("aria-selected","false"),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===h(this).attr("tabIndex")}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,i,t){var a,s,n,r=this,o=0,h=e.length&&(!i.length||e.index()<i.index()),c=this.options.animate||{},d=h&&c.down||c,h=function(){r._toggleComplete(t)};return"number"==typeof d&&(n=d),"string"==typeof d&&(s=d),s=s||d.easing||c.easing,n=n||d.duration||c.duration,i.length?e.length?(a=e.show().outerHeight(),i.animate(l,{duration:n,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(u,{duration:n,easing:s,complete:h,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?o+=t.now:"content"!==r.options.heightStyle&&(t.now=Math.round(a-i.outerHeight()-o),o=0)}})):i.animate(l,n,s,h):e.animate(u,n,s,h)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})}(jQuery);!function(o){o.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var i,s,n,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,e="input"===e;this.isMultiLine=t||!e&&this.element.prop("isContentEditable"),this.valueMethod=this.element[t||e?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:i=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:i=!0,this._move("nextPage",e);break;case t.UP:i=!0,this._keyEvent("previous",e);break;case t.DOWN:i=!0,this._keyEvent("next",e);break;case t.ENTER:case t.NUMPAD_ENTER:this.menu.active&&(i=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(e),e.preventDefault());break;default:s=!0,this._searchTimeout(e)}}},keypress:function(e){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!s){var t=o.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(n)return n=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 6,752 bytes, line 2631
2631)},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=o("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];o(e.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(e){e.target===t.element[0]||e.target===i||o.contains(i,e.target)||t.close()})})},menufocus:function(e,t){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){o(e.target).trigger(e.originalEvent)});t=t.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:t})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(t.value):this.liveRegion.text(t.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=o("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return(e=(e=e&&(e.jquery||e.nodeType?o(e):this.document.find(e).eq(0)))||this.element.closest(".ui-front")).length||(e=this.document[0].body),e},_initSource:function(){var i,s,n=this;o.isArray(this.options.source)?(i=this.options.source,this.source=function(e,t){t(o.ui.autocomplete.filter(i,e.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(e,t){n.xhr&&n.xhr.abort(),n.xhr=o.ajax({url:s,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return o.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e=e&&this._normalize(e),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:o.map(e,function(e){return"string"==typeof e?{label:e,value:e}:o.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(o.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,e){var s=this;o.each(e,function(e,t){s._renderItemData(i,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return o("<li>").append(o("<a>").text(t.label)).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())}}),o.extend(o.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var i=new RegExp(o.ui.autocomplete.escapeRegex(t),"i");return o.grep(e,function(e){return i.test(e.label||e.value||e)})}}),o.widget("ui.autocomplete",o.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(jQuery);!function(M,c){M.extend(M.ui,{datepicker:{version:"1.10.4"}});var s,d="datepicker";function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2631ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},M.extend(this._defaults,this.regional[""]),this.dpDiv=a(M("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(t,"mouseout",function(){M(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&M(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&M(this).removeClass("ui-datepicker-next-hover")}).delegate(t,"mouseover",function(){M.datepicker._isDisabledDatepicker((s.inline?e.parent():s.input)[0])||(M(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),M(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&M(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&M(this).addClass("ui-datepicker-next-hover"))})}function o(e,t){for(var a in M.extend(e,t),t)null==t[a]&&(e[a]=t[a]);return e}M.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var a,i=e.nodeName.toLowerCase(),s="div"===i||"span"===i;e.id||(this.uuid+=1,e.id="dp"+this.uuid),(a=this._newInst(M(e),s)).settings=M.extend({},t||{}),"input"===i?this._connectDatepicker(e,a):s&&this._inlineDatepicker(e,a)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?a(M("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var a=M(e);t.append=M([]),t.trigger=M([]),a.hasClass(this.markerClassName)||(this._attachments(a,t),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(t),M.data(e,d,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var a,i=this._get(t,"appendText"),s=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=M("<span class='"+this._appendClass+"'>"+i+"</span>"),e[s?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(a=this._get(t,"showOn"))&&"both"!==a||e.focus(this._showDatepicker),"button"!==a&&"both"!==a||(i=this._get(t,"buttonText"),a=this._get(t,"buttonImage"),t.trigger=M(this._get(t,"buttonImageOnly")?M("<img/>").addClass(this._triggerClass).attr({src:a,alt:i,title:i}):M("<button type='button'></button>").addClass(this._triggerClass).html(a?M("<img/>").attr({src:a,alt:i,title:i}):i)),e[s?"before":"after"](t.trigger),t.trigger.click(function(){return M.datepicker._datepickerShowing&&M.datepicker._lastInput===e[0]?M.datepicker._hideDatepicker():(M.datepicker._datepickerShowing&&M.datepicker._lastInput!==e[0]&&M.datepicker._hideDatepicker(),M.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){var t,a,i,s,n,r;this._get(e,"autoSize")&&!e.inline&&(n=new Date(2009,11,20),(r=this._get(e,"dateFormat")).match(/[DM]/)&&(t=function(e){for(s=i=a=0;s<e.length;s++)e[s].length>a&&(a=e[s].length,i=s);return i},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length))},_inlineDatepicker:function(e,t){var a=M(e);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(t.dpDiv),M.data(e,d,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,a,i,s){var n,r=this._dialogInst;return r||(this.uuid+=1,n="dp"+this.uuid,this._dialogInput=M("<input type='text' id='"+n+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),M("body").append(this._dialogInput),(r=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},M.data(this._dialogInput[0],d,r)),o(r.settings,i||{}),t=t&&t.constructor===Date?this._formatDate(r,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(n=document.documentElement.clientWidth,i=document.documentElement.clientHeight,t=document.documentElement.scrollLeft||document.body.scrollLeft,s=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[n/2-100+t,i/2-150+s]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),M.blockUI&&M.blockUI(this.dpDiv),M.data(this._dialogInput[0],d,r),this},_destroyDatepicker:function(e){var t,a=M(e),i=M.data(e,d);a.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),M.removeData(e,d),"input"===t?(i.append.remove(),i.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("
2631keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var e,a=M(t),i=M.data(t,d);a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((a=a.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=M.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,a=M(t),i=M.data(t,d);a.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((a=a.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=M.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return M.data(e,d)}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,a){var i,s,n,r,d=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?M.extend({},M.datepicker._defaults):d?"all"===t?M.extend({},d.settings):this._get(d,t):null;i=t||{},"string"==typeof t&&((i={})[t]=a),d&&(this._curInst===d&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),n=this._getMinMaxDate(d,"min"),r=this._getMinMaxDate(d,"max"),o(d.settings,i),null!==n&&i.dateFormat!==c&&i.minDate===c&&(d.settings.minDate=this._formatDate(d,n)),null!==r&&i.dateFormat!==c&&i.maxDate===c&&(d.settings.maxDate=this._formatDate(d,r)),"disabled"in i&&(i.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(M(e),d),this._autoSize(d),this._setDate(d,s),this._updateAlternate(d),this._updateDatepicker(d))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){e=this._getInst(e);e&&this._updateDatepicker(e)},_setDateDatepicker:function(e,t){e=this._getInst(e);e&&(this._setDate(e,t),this._updateDatepicker(e),this._updateAlternate(e))},_getDateDatepicker:function(e,t){e=this._getInst(e);return e&&!e.inline&&this._setDateFromField(e,t),e?this._getDate(e):null},_doKeyDown:function(e){var t,a,i=M.datepicker._getInst(e.target),s=!0,n=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,M.datepicker._datepickerShowing)switch(e.keyCode){case 9:M.datepicker._hideDatepicker(),s=!1;break;case 13:return(a=M("td."+M.datepicker._dayOverClass+":not(."+M.datepicker._currentClass+")",i.dpDiv))[0]&&M.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,a[0]),(t=M.datepicker._get(i,"onSelect"))?(a=M.datepicker._formatDate(i),t.apply(i.input?i.input[0]:null,[a,i])):M.datepicker._hideDatepicker(),!1;case 27:M.datepicker._hideDatepicker();break;case 33:M.datepicker._adjustDate(e.target,e.ctrlKey?-M.datepicker._get(i,"stepBigMonths"):-M.datepicker._get(i,"stepMonths"),"M");break;case 34:M.datepicker._adjustDate(e.target,e.ctrlKey?+M.datepicker._get(i,"stepBigMonths"):+M.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&M.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&M.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&M.datepicker._adjustDate(e.target,n?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&M.datepicker._adjustDate(e.target,e.ctrlKey?-M.datepicker._get(i,"stepBigMonths"):-M.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&M.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&M.datepicker._adjustDate(e.target,n?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&M.datepicker._adjustDate(e.target,e.ctrlKey?+M.datepicker._get(i,"stepBigMonths"):+M.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&M.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?M.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,a=M.datepicker._getInst(e.target);if(M.datepicker._get(a,"constrainInput"))return t=M.datepicker._possibleChars(M.datepicker._get(a,"dateFormat")),a=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||a<" "||!t||-1<t.indexOf(a)},_doKeyUp:function(e){var t=M.datepicker._getInst(e.target);if(t.input.val()!==t.lastVal)try{M.datepicker.parseDate(M.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,M.datepicker._getFormatConfig(t))&&(M.datepicker._setDateFromField(t),M.datepicker._updateAlternate(t),M.datepicker._updateDatepicker(t))}catch(e){}return!0},_showDatepicker:function(e){var t,a,i,s;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=M("input",e.parentNode)[0]),M.datepicker._isDisabledDatepicker(e)||M.datepicker._lastInput===e||(s=M.datepicker._getInst(e),M.datepicker._curInst&&M.datepicker._curInst!==s&&(M.datepicker._curInst.dpDiv.stop(!0,!0),s&&M.datepicker._datepickerShowing&&M.datepicker._hideDatepicker(M.datepicker._curInst.input[0])),!1!==(a=(i=M.datepicker._get(s,"beforeShow"))?i.apply(e,[e,s]):{})&&(o(s.settings,a),s.lastVal=null,M.datepicker._lastInput=e,M.datepicker._setDateFromField(s),M.datepicker._inDialog&&(e.value=""),M.datepicker._pos||(M.datepicker._pos=M.datepicker._findPos(e),M.datepicker._pos[1]+=e.offsetHeight),t=!1,M(e).parents().each(function(){return!(t|="fixed"===M(this).css("position"))}),i={left:M.datepicker._pos[0],top:M.datepicker._pos[1]},M.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),M.datepicker._updateDatepicker(s),i=M.datepicker._checkOffset(s,i,t),s.dpDiv.css({position:M.datepicker._inDialog&&M.blockUI?"static":t?"fixed":"absolute",display:"none",left:i.left+"px",to
vendor: 4,979 bytes, line 2631
2631p:i.top+"px"}),s.inline||(a=M.datepicker._get(s,"showAnim"),i=M.datepicker._get(s,"duration"),s.dpDiv.zIndex(M(e).zIndex()+1),M.datepicker._datepickerShowing=!0,M.effects&&M.effects.effect[a]?s.dpDiv.show(a,M.datepicker._get(s,"showOptions"),i):s.dpDiv[a||"show"](a?i:null),M.datepicker._shouldFocusInput(s)&&s.input.focus(),M.datepicker._curInst=s)))},_updateDatepicker:function(e){this.maxRows=4,(s=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var t,a=this._getNumberOfMonths(e),i=a[1];e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<i&&e.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"),e.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===M.datepicker._curInst&&M.datepicker._datepickerShowing&&M.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,a){var i=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),n=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,d=document.documentElement.clientWidth+(a?0:M(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:M(document).scrollTop());return t.left-=this._get(e,"isRTL")?i-n:0,t.left-=a&&t.left===e.input.offset().left?M(document).scrollLeft():0,t.top-=a&&t.top===e.input.offset().top+r?M(document).scrollTop():0,t.left-=Math.min(t.left,t.left+i>d&&i<d?Math.abs(t.left+i-d):0),t.top-=Math.min(t.top,t.top+s>c&&s<c?Math.abs(s+r):0),t},_findPos:function(e){for(var t=this._getInst(e),a=this._get(t,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||M.expr.filters.hidden(e));)e=e[a?"previousSibling":"nextSibling"];return[(t=M(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,a,i=this._curInst;!i||e&&i!==M.data(e,d)||this._datepickerShowing&&(t=this._get(i,"showAnim"),a=this._get(i,"duration"),e=function(){M.datepicker._tidyDialog(i)},M.effects&&(M.effects.effect[t]||M.effects[t])?i.dpDiv.hide(t,M.datepicker._get(i,"showOptions"),a,e):i.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?a:null,e),t||e(),this._datepickerShowing=!1,(e=this._get(i,"onClose"))&&e.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),M.blockUI&&(M.unblockUI(),M("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){var t;M.datepicker._curInst&&(t=M(e.target),e=M.datepicker._getInst(t[0]),(t[0].id===M.datepicker._mainDivId||0!==t.parents("#"+M.datepicker._mainDivId).length||t.hasClass(M.datepicker.markerClassName)||t.closest("."+M.datepicker._triggerClass).length||!M.datepicker._datepickerShowing||M.datepicker._inDialog&&M.blockUI)&&(!t.hasClass(M.datepicker.markerClassName)||M.datepicker._curInst===e)||M.datepicker._hideDatepicker())},_adjustDate:function(e,t,a){var i=M(e),e=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(e,t+("M"===a?this._get(e,"showCurrentAtPos"):0),a),this._updateDatepicker(e))},_gotoToday:function(e){var t=M(e),a=this._getInst(t[0]);this._get(a,"gotoCurrent")&&a.currentDay?(a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear):(e=new Date,a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear()),this._notifyChange(a),this._adjustDate(t)},_selectMonthYear:function(e,t,a){var i=M(e),e=this._getInst(i[0]);e["selected"+("M"===a?"Month":"Year")]=e["draw"+("M"===a?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(i)},_selectDay:function(e,t,a,i){var s=M(e);M(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||((s=this._getInst(s[0])).selectedDay=s.currentDay=M("a",i).html(),s.selectedMonth=s.currentMonth=t,s.selectedYear=s.currentYear=a,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){e=M(e);this._selectDate(e,"")},_selectDate:function(e,t){var a=M(e),e=this._getInst(a[0]);t=null!=t?t:this._formatDate(e),e.input&&e.input.val(t),this._updateAlternate(e),(a=this._get(e,"onSelect"))?a.apply(e.input?e.input[0]:null,[t,e]):e.input&&e.input.trigger("change"),e.inline?this._updateDatepicker(e):(this._hideDatepicker(),this._lastInput=e.input[0],"object"!=typeof e.input[0]&&e.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t,a,i,s=this._get(e,"altField");
vendor: 10,886 bytes, line 2631
2631s&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),a=this._getDate(e),i=this.formatDate(t,a,this._getFormatConfig(e)),M(s).each(function(){M(this).val(i)}))},noWeekends:function(e){e=e.getDay();return[0<e&&e<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),e=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((e-t)/864e5)/7)+1},parseDate:function(t,s,e){if(null==t||null==s)throw"Invalid arguments";if(""===(s="object"==typeof s?s.toString():s+""))return null;function n(e){return(e=v+1<t.length&&t.charAt(v+1)===e)&&v++,e}function a(e){var t=n(e),e=new RegExp("^\\d{1,"+("@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2)+"}");if(!(e=s.substring(l).match(e)))throw"Missing number at position "+l;return l+=e[0].length,parseInt(e[0],10)}function i(e,t,a){var i=-1,t=M.map(n(e)?a:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(M.each(t,function(e,t){var a=t[1];if(s.substr(l,a.length).toLowerCase()===a.toLowerCase())return i=t[0],l+=a.length,!1}),-1!==i)return i+1;throw"Unknown name at position "+l}function r(){if(s.charAt(l)!==t.charAt(v))throw"Unexpected literal at position "+l;l++}for(var d,c,o,l=0,h=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,p=(e?e.dayNames:null)||this._defaults.dayNames,g=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,_=(e?e.monthNames:null)||this._defaults.monthNames,f=-1,k=-1,D=-1,m=-1,y=!1,v=0;v<t.length;v++)if(y)"'"!==t.charAt(v)||n("'")?r():y=!1;else switch(t.charAt(v)){case"d":D=a("d");break;case"D":i("D",u,p);break;case"o":m=a("o");break;case"m":k=a("m");break;case"M":k=i("M",g,_);break;case"y":f=a("y");break;case"@":f=(o=new Date(a("@"))).getFullYear(),k=o.getMonth()+1,D=o.getDate();break;case"!":f=(o=new Date((a("!")-this._ticksTo1970)/1e4)).getFullYear(),k=o.getMonth()+1,D=o.getDate();break;case"'":n("'")?r():y=!0;break;default:r()}if(l<s.length&&(c=s.substr(l),!/^\s+/.test(c)))throw"Extra/unparsed characters found in date: "+c;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=h?0:-100)),-1<m)for(k=1,D=m;;){if(D<=(d=this._getDaysInMonth(f,k-1)))break;k++,D-=d}if((o=this._daylightSavingAdjust(new Date(f,k-1,D))).getFullYear()!==f||o.getMonth()+1!==k||o.getDate()!==D)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";function s(e){return(e=r+1<t.length&&t.charAt(r+1)===e)&&r++,e}function i(e,t,a){var i=""+t;if(s(e))for(;i.length<a;)i="0"+i;return i}function n(e,t,a,i){return(s(e)?i:a)[t]}var r,d=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,c=(a?a.dayNames:null)||this._defaults.dayNames,o=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,l=(a?a.monthNames:null)||this._defaults.monthNames,h="",u=!1;if(e)for(r=0;r<t.length;r++)if(u)"'"!==t.charAt(r)||s("'")?h+=t.charAt(r):u=!1;else switch(t.charAt(r)){case"d":h+=i("d",e.getDate(),2);break;case"D":h+=n("D",e.getDay(),d,c);break;case"o":h+=i("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=i("m",e.getMonth()+1,2);break;case"M":h+=n("M",e.getMonth(),o,l);break;case"y":h+=s("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":s("'")?h+="'":u=!0;break;default:h+=t.charAt(r)}return h},_possibleChars:function(t){function e(e){return(e=s+1<t.length&&t.charAt(s+1)===e)&&s++,e}for(var a="",i=!1,s=0;s<t.length;s++)if(i)"'"!==t.charAt(s)||e("'")?a+=t.charAt(s):i=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":a+="0123456789";break;case"D":case"M":return null;case"'":e("'")?a+="'":i=!0;break;default:a+=t.charAt(s)}return a},_get:function(e,t){return(e.settings[t]!==c?e.settings:this._defaults)[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),i=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(a,i,r)||s}catch(e){i=t?"":i}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=i?n.getDate():0,e.currentMonth=i?n.getMonth():0,e.currentYear=i?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(d,e,t){var a,i,e=null==e||""===e?t:"string"==typeof e?function(e){try{return M.datepicker.parseDate(M.datepicker._get(d,"dateFormat"),e,M.datepicker._getFormatConfig(d))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?M.datepicker._getDate(d):null)||new Date,a=t.getFullYear(),i=t.getMonth(),s=t.getDate(),n=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,r=n.exec(e);r;){switch(r[2]||"d"){case"d":case"D":s+=parseInt(r[1],10);break;case"w":case"W":s+=7*parseInt(r[1],10);break;case"m":case"M":i+=parseInt(r[1],10),s=Math.min(s,M.datepicker._getDaysInMonth(a,i));break;case"y":case"Y":a+=parseInt(r[1],10),s=Math.min(s,M.datepicker._getDaysInMonth(a,i))}r=n.exec(e)}return new Date(a,i,s)}(e):"number"==typeof e?isNaN(e)?t:(a=e,(i=new Date).setDate(i.getDate()+a),i):new Date(e.getTime());return(e=e&&"Invalid Date"===e.toString()?t:e)&&(e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0)),this._daylightSavingAdjust(e)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var i=!t,s=e.selectedMonth,n=e.selectedYear,t=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=t.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=t.getMonth(),e.drawYear=e.selectedYear=e.currentYear=t.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(i?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),a="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){M.datepicker._adjustDate(a,-t,"M")},next:function(){M.datepicker._adjustDate(a,+t,"M")},hide:function(){M.datepicker._hideDatepicker()},today:function(){M.datepicker._gotoToday(a)},selectDay:function(){return M.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return M.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return M.datepicker._selectMonthYear(a,this,"Y"),!1}};M(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,i,s,n,r,d,c,o,l,h,u,p,g,_,f,k,D,m,y,v,M,b,w,C,I,x,Y,S,F,N,T=new Date,A=this._daylightSavingAdjust(new Date(T.getFullYear(),T.getMonth(),T.getDate())),K=this._get(e,"isRTL"),j=this._get(e,"showButtonPanel"),O=this._get(e,"hideIfNoPrevNext"),R=this._get(e,"navigationAsDateFormat"),L=this._getNumberOfMonths(e),W=this._get(e,"showCurrentAtPos"),T=this._get(e,"stepMonths"),E=1!==L[0]||1!==L[1],H=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),P=this._getMinMaxDate(e,"min"),z=this._getMinMaxDate(e,"max"),U=e.drawMonth-W,B=e.drawYear;if(U<0&&(U+=12,B--),z)for(t=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth()-L[0]*L[1]+1,z.getDate())),t=P&&t<P?P:t;this._daylightSavingAdjust(new Date(B,U,1))>t;)--U<0&&(U=11,B--);for(e.drawMonth=U,e.drawYear=B,W=this._get(e,"prevText"),W=R?this.formatDate(W,this._daylightSavingAdjust(new Date(B,U-T,1)),this._getFormatConfig(e)):W,a=this._canAdjustMonth(e,-1,B,U)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+W+"'><span class='ui-icon ui-icon-circle-triangle-"+(K?"e":"w")+"'>"+W+"</span></a>":O?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+W+"'><span class='ui-icon ui-icon-circle-triangle-"+(K?"e":"w")+"'>"+W+"</span></a>",W=this._get(e,"nextText"),W=R?this.formatDate(W,this._daylightSavingAdjust(new Date(B,U+T,1)),this._getFormatConfig(e)):W,i=this._canAdjustMonth(e,1,B,U)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+W+"'><span class='ui-icon ui-icon-circle-triangle-"+(K?"w":"e")+"'>"+W+"</span></a>":O?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+W+"'><span class='ui-icon ui-icon-circle-triangle-"+(K?"w":"e")+"'>"+W+"</span></a>",O=this._get(e,"currentText"),W=this._get(e,"gotoCurrent")&&e.currentDay?H:A,O=R?this.formatDate(O,W,this._getFormatConfig(e)):O,R=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",R=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(K?R:"")+(this._isInRange(e,W)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+O+"</button>":"")+(K?"":R)+"</div>":"",s=parseInt(this._get(e,"firstDay"),10),s=isNaN(s)?0:s,n=this._get(e,"showWeek"),r=this._get(e,"dayNames"),d=this._get(e,"dayNamesMin"),c=this._get(e,"monthNames"),o=this._get(e,"monthNamesShort"),l=this._get(e,"beforeShowDay"),h=this._get(e,"showOtherMonths"),u=this._get(e,"selectOtherMonths"),p=this._getDefaultDate(e),g="",f=0;f<L[0];f++){for(k="",this.maxRows=4,D=0;D<L[1];D++){if(m=this._daylightSavingAdjust(new Date(B,U,e.selectedDay)),b=" ui-corner-all",y="",E){if(y+="<div class='ui-datepicker-group",1<L[1])switch(D){case 0:y+=" ui-datepicker-group-first",b=" ui-corner-"+(K?"right":"left");break;case L[1]-1:y+=" ui-datepicker-group-last",b=" ui-corner-"+(K?"left":"right");break;default:y+=" ui-datepicker-group-middle",b=""}y+="'>"}for(y+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+b+"'>"+(/all|left/.test(b)&&0===f?K?i:a:"")+(/all|right/.test(b)&&0===f?K?a:i:"")+this._generateMonthYearHeader(e,U,B,P,z,0<f||0<D,c,o)+"</div><table class='ui-datepicker-calendar'><thead><tr>",v=n?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",_=0;_<7;_++)v+="<th"+(5<=(_+s+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+r[M=(_+s)%7]+"'>"+d[M]+"</span></th>";
vendor: 5,547 bytes, line 2631
2631for(y+=v+"</tr></thead><tbody>",w=this._getDaysInMonth(B,U),B===e.selectedYear&&U===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,w)),b=(this._getFirstDayOfMonth(B,U)-s+7)%7,w=Math.ceil((b+w)/7),C=E&&this.maxRows>w?this.maxRows:w,this.maxRows=C,I=this._daylightSavingAdjust(new Date(B,U,1-b)),x=0;x<C;x++){for(y+="<tr>",Y=n?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(I)+"</td>":"",_=0;_<7;_++)S=l?l.apply(e.input?e.input[0]:null,[I]):[!0,""],N=(F=I.getMonth()!==U)&&!u||!S[0]||P&&I<P||z&&z<I,Y+="<td class='"+(5<=(_+s+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(I.getTime()===m.getTime()&&U===e.selectedMonth&&e._keyEvent||p.getTime()===I.getTime()&&p.getTime()===m.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!h?"":" "+S[1]+(I.getTime()===H.getTime()?" "+this._currentClass:"")+(I.getTime()===A.getTime()?" ui-datepicker-today":""))+"'"+(F&&!h||!S[2]?"":" title='"+S[2].replace(/'/g,"'")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(F&&!h?" ":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===A.getTime()?" ui-state-highlight":"")+(I.getTime()===H.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);y+=Y+"</tr>"}11<++U&&(U=0,B++),k+=y+="</tbody></table>"+(E?"</div>"+(0<L[0]&&D===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}g+=k}return g+=R,e._keyEvent=!1,g},_generateMonthYearHeader:function(e,t,a,i,s,n,r,d){var c,o,l,h,u,p,g,_=this._get(e,"changeMonth"),f=this._get(e,"changeYear"),k=this._get(e,"showMonthAfterYear"),D="<div class='ui-datepicker-title'>",m="";if(n||!_)m+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(c=i&&i.getFullYear()===a,o=s&&s.getFullYear()===a,m+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",l=0;l<12;l++)(!c||l>=i.getMonth())&&(!o||l<=s.getMonth())&&(m+="<option value='"+l+"'"+(l===t?" selected='selected'":"")+">"+d[l]+"</option>");m+="</select>"}if(k||(D+=m+(!n&&_&&f?"":" ")),!e.yearshtml)if(e.yearshtml="",n||!f)D+="<span class='ui-datepicker-year'>"+a+"</span>";else{for(h=this._get(e,"yearRange").split(":"),u=(new Date).getFullYear(),p=(r=function(e){e=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?u+parseInt(e,10):parseInt(e,10);return isNaN(e)?u:e})(h[0]),g=Math.max(p,r(h[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=s?Math.min(g,s.getFullYear()):g,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)e.yearshtml+="<option value='"+p+"'"+(p===a?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",D+=e.yearshtml,e.yearshtml=null}return D+=this._get(e,"yearSuffix"),k&&(D+=(!n&&_&&f?"":" ")+m),D+="</div>"},_adjustInstDate:function(e,t,a){var i=e.drawYear+("Y"===a?t:0),s=e.drawMonth+("M"===a?t:0),t=Math.min(e.selectedDay,this._getDaysInMonth(i,s))+("D"===a?t:0),t=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(i,s,t)));e.selectedDay=t.getDate(),e.drawMonth=e.selectedMonth=t.getMonth(),e.drawYear=e.selectedYear=t.getFullYear(),"M"!==a&&"Y"!==a||this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),e=this._getMinMaxDate(e,"max"),t=a&&t<a?a:t;return e&&e<t?e:t},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){e=this._get(e,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,i){var s=this._getNumberOfMonths(e),s=this._daylightSavingAdjust(new Date(a,i+(t<0?t:s[0]*s[1]),1));return t<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(e,s)},_isInRange:function(e,t){var a=this._getMinMaxDate(e,"min"),i=this._getMinMaxDate(e,"max"),s=null,n=null,r=this._get(e,"yearRange");return r&&(e=r.split(":"),r=(new Date).getFullYear(),s=parseInt(e[0],10),n=parseInt(e[1],10),e[0].match(/[+\-].*/)&&(s+=r),e[1].match(/[+\-].*/)&&(n+=r)),(!a||t.getTime()>=a.getTime())&&(!i||t.getTime()<=i.getTime())&&(!s||t.getFullYear()>=s)&&(!n||t.getFullYear()<=n)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,i){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);t=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(i,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),t,this._getFormatConfig(e))}}),M.fn.datepicker=function(e){if(!this.length)return this;M.datepicker.initialized||(M(document).mousedown(M.datepicker._checkExternalClick),M.datepicker.initialized=!0),0===M("#"+M.datepicker._mainDivId).length&&M("body").append(M.datepicker.dpDiv);
vendor: 8,002 bytes, line 2631
2631var t=Array.prototype.slice.call(arguments,1);return"string"==typeof e&&("isDisabled"===e||"getDate"===e||"widget"===e)||"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?M.datepicker["_"+e+"Datepicker"].apply(M.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?M.datepicker["_"+e+"Datepicker"].apply(M.datepicker,[this].concat(t)):M.datepicker._attachDatepicker(this,e)})},M.datepicker=new e,M.datepicker.initialized=!1,M.datepicker.uuid=(new Date).getTime(),M.datepicker.version="1.10.4"}(jQuery);!function(r){r.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,r.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(e){var t=r(e.target).closest(".ui-menu-item");!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&r(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var t=r(e.currentTarget);t.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,t)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(e){this._delay(function(){r.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){r(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=r(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var t,i,s,n,a=!0;function u(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}switch(e.keyCode){case r.ui.keyCode.PAGE_UP:this.previousPage(e);break;case r.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case r.ui.keyCode.HOME:this._move("first","first",e);break;case r.ui.keyCode.END:this._move("last","last",e);break;case r.ui.keyCode.UP:this.previous(e);break;case r.ui.keyCode.DOWN:this.next(e);break;case r.ui.keyCode.LEFT:this.collapse(e);break;case r.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case r.ui.keyCode.ENTER:case r.ui.keyCode.SPACE:this._activate(e);break;case r.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,t=this.previousFilter||"",i=String.fromCharCode(e.keyCode),s=!1,clearTimeout(this.filterTimer),i===t?s=!0:i=t+i,n=new RegExp("^"+u(i),"i"),t=this.activeMenu.children(".ui-menu-item").filter(function(){return n.test(r(this).children("a").text())}),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),n=new RegExp("^"+u(i),"i"),t=this.activeMenu.children(".ui-menu-item").filter(function(){return n.test(r(this).children("a").text())})),t.length?(this.focus(e,t),1<t.length?(this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}a&&e.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var s=this.options.icons.submenu,e=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),e.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=r(this),t=e.prev("a"),i=r("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),(e=e.add(this.element)).children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=r(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!r.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,s;this._hasScroll()&&(i=parseFloat(r.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(r.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),e=e.height(),t<0?this.activeMenu.scrollTop(i+t):s<t+e&&this.activeMenu.scrollTop(i+t-s+e))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=r.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var e=i?this.element:r(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this.activeMenu=e},this.delay)},_close:function(e){(e=e||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
2631se").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,s)},nextPage:function(e){var t,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=r(this)).offset().top-i-s<0}),this.focus(e,t)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=r(this)).offset().top-i+s}),this.focus(e,t)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||r(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)}})}(jQuery);
vendor: 54,780 bytes, lines 2632-2647
2632/* 2633 * jQuery carouFredSel 6.2.1 2634 * Demo's and documentation: 2635 * caroufredsel.dev7studios.com 2636 * 2637 * Copyright (c) 2013 Fred Heusschen 2638 * www.frebsite.nl 2639 * 2640 * Dual licensed under the MIT and GPL licenses. 2641 * http://en.wikipedia.org/wiki/MIT_License 2642 * http://en.wikipedia.org/wiki/GNU_General_Public_License 2643 */ 2644 2645 2646(function($){function sc_setScroll(a,b,c){return"transition"==c.transition&&"swing"==b&&(b="ease"),{anims:[],duration:a,orgDuration:a,easing:b,startTime:getTime()}}function sc_startScroll(a,b){for(var c=0,d=a.anims.length;d>c;c++){var e=a.anims[c];e&&e[0][b.transition](e[1],a.duration,a.easing,e[2])}}function sc_stopScroll(a,b){is_boolean(b)||(b=!0),is_object(a.pre)&&sc_stopScroll(a.pre,b);for(var c=0,d=a.anims.length;d>c;c++){var e=a.anims[c];e[0].stop(!0),b&&(e[0].css(e[1]),is_function(e[2])&&e[2]())}is_object(a.post)&&sc_stopScroll(a.post,b)}function sc_afterScroll(a,b,c){switch(b&&b.remove(),c.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":a.css("opacity",1),a.css("filter","")}}function sc_fireCallbacks(a,b,c,d,e){if(b[c]&&b[c].call(a,d),e[c].length)for(var f=0,g=e[c].length;g>f;f++)e[c][f].call(a,d);return[]}function sc_fireQueue(a,b,c){return b.length&&(a.trigger(cf_e(b[0][0],c),b[0][1]),b.shift()),b}function sc_hideHiddenItems(a){a.each(function(){var a=$(this);a.data("_cfs_isHidden",a.is(":hidden")).hide()})}function sc_showHiddenItems(a){a&&a.each(function(){var a=$(this);a.data("_cfs_isHidden")||a.show()})}function sc_clearTimers(a){return a.auto&&clearTimeout(a.auto),a.progress&&clearInterval(a.progress),a}function sc_mapCallbackArguments(a,b,c,d,e,f,g){return{width:g.width,height:g.height,items:{old:a,skipped:b,visible:c},scroll:{items:d,direction:e,duration:f}}}function sc_getDuration(a,b,c,d){var e=a.duration;return"none"==a.fx?0:("auto"==e?e=b.scroll.duration/b.scroll.items*c:10>e&&(e=d/e),1>e?0:("fade"==a.fx&&(e/=2),Math.round(e)))}function nv_showNavi(a,b,c){var d=is_number(a.items.minimum)?a.items.minimum:a.items.visible+1;if("show"==b||"hide"==b)var e=b;else if(d>b){debug(c,"Not enough items ("+b+" total, "+d+" needed): Hiding navigation.");var e="hide"}else var e="show";var f="show"==e?"removeClass":"addClass",g=cf_c("hidden",c);a.auto.button&&a.auto.button[e]()[f](g),a.prev.button&&a.prev.button[e]()[f](g),a.next.button&&a.next.button[e]()[f](g),a.pagination.container&&a.pagination.container[e]()[f](g)}function nv_enableNavi(a,b,c){if(!a.circular&&!a.infinite){var d="removeClass"==b||"addClass"==b?b:!1,e=cf_c("disabled",c);if(a.auto.button&&d&&a.auto.button[d](e),a.prev.button){var f=d||0==b?"addClass":"removeClass";a.prev.button[f](e)}if(a.next.button){var f=d||b==a.items.visible?"addClass":"removeClass";a.next.button[f](e)}}}function go_getObject(a,b){return is_function(b)?b=b.call(a):is_undefined(b)&&(b={}),b}function go_getItemsObject(a,b){return b=go_getObject(a,b),is_number(b)?b={visible:b}:"variable"==b?b={visible:b,width:b,height:b}:is_object(b)||(b={}),b}function go_getScrollObject(a,b){return b=go_getObject(a,b),is_number(b)?b=50>=b?{items:b}:{duration:b}:is_string(b)?b={easing:b}:is_object(b)||(b={}),b}function go_getNaviObject(a,b){if(b=go_getObject(a,b),is_string(b)){var c=cf_getKeyCode(b);b=-1==c?$(b):c}return b}function go_getAutoObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_boolean(b)?b={play:b}:is_number(b)&&(b={timeoutDuration:b}),b.progress&&(is_string(b.progress)||is_jquery(b.progress))&&(b.progress={bar:b.progress}),b}function go_complementAutoObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_boolean(b.play)||(b.play=!0),is_number(b.delay)||(b.delay=0),is_undefined(b.pauseOnEvent)&&(b.pauseOnEvent=!0),is_boolean(b.pauseOnResize)||(b.pauseOnResize=!0),is_number(b.timeoutDuration)||(b.timeoutDuration=10>b.duration?2500:5*b.duration),b.progress&&(is_function(b.progress.bar)&&(b.progress.bar=b.progress.bar.call(a)),is_string(b.progress.bar)&&(b.progress.bar=$(b.progress.bar)),b.progress.bar?(is_function(b.progress.updater)||(b.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(b.progress.interval)||(b.progress.interval=50)):b.progress=!1),b}function go_getPrevNextObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_number(b)&&(b={key:b}),b}function go_complementPrevNextObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_string(b.key)&&(b.key=cf_getKeyCode(b.key)),b}function go_getPaginationObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={container:b}:is_boolean(b)&&(b={keys:b}),b}function go_complementPaginationObject(a,b){return is_function(b.container)&&(b.container=b.container.call(a)),is_string(b.container)&&(b.container=$(b.container)),is_number(b.items)||(b.items=!1),is_boolean(b.keys)||(b.keys=!1),is_function(b.anchorBuilder)||is_false(b.anchorBuilder)||(b.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(b.deviation)||(b.deviation=0),b}function go_getSwipeObject(a,b){return is_function(b)&&(b=b.call(a)),is_undefined(b)&&(b={onTouch:!1}),is_true(b)?b={onTouch:b}:is_number(b)&&(b={items:b}),b}function go_complementSwipeObject(a,b){return is_boolean(b.onTouch)||(b.onTouch=!0),is_boolean(b.onMouse)||(b.onMouse=!1),is_object(b.options)||(b.options={}),is_boolean(b.options.triggerOnTouchEnd)||(b.options.triggerOnTouchEnd=!1),b}function go_getMousewheelObject(a,b){return is_function(b)&&(b=b.call(a)),is_true(b)?b={}:is_number(b)?b={items:b}:is_undefined(b)&&(b=!1),b}function go_complementMousewheelObject(a,b){return b}function gn_getItemIndex(a,b,c,d,e){if(is_string(a)&&(a=$(a,e)),is_object(a)&&(a=$(a,e)),is_jquery(a)?(a=e.children().index(a),is_boolean(c)||(c=!1)):is_boolean(c)||(c=!0),is_number(a)||(a=0),is_number(b)||(b=0),c&&(a+=d.first),a+=b,d.total>0){for(;a>=d.total;)a-=d.total;for(;0>a;)a+=d.total}return a}function gn_getVisibleItemsPrev(a,b,c){for(var d=0,e=0,f=c;f>=0;f--){var g=a.eq(f);if(d+=g.is(":visible")?g[b.d.outerWidth](!0):0,d>b.maxDimension)return e;0==f&&(f=a.length),e++}}function gn_getVisibleItemsPrevFilter(a,b,c){return gn_getItemsPrevFilter(a,b.items.filter,b.items.visibleConf.org,c)}function gn_getScrollItemsPrevFilter(a,b,c,d){return gn_getItemsPrevFilter(a,b.items.filter,d,c)}function gn_getItemsPrevFilter(a,b,c,d){for(var e=0,f=0,g=d,h=a.length;g>=0;g--){if(f++,f==h)return f;var i=a.eq(g);if(i.is(b)&&(e++,e==c))return f;0==g&&(g=h)}}function gn_getVisibleOrg(a,b){return b.items.visibleConf.org||a.children().slice(0,b.items.visible).filter(b.items.filter).length}function gn_getVisibleItemsNext(a,b,c){for(var d=0,e=0,f=c,g=a.length-1;g>=f;f++){var h=a.eq(f);if(d+=h.is(":visible")?h[b.d.outerWidth](!0):0,d>b.maxDimension)return e;if(e++,e==g+1)return e;f==g&&(f=-1)}}function gn_getVisibleItemsNextTestCircular(a,b,c,d){var e=gn_getVisibleItemsNext(a,b,c);return b.circular||c+e>d&&(e=d-c),e}function gn_getVisibleItemsNextFilter(a,b,c){return gn_getItemsNextFilter(a,b.items.filter,b.items.visibleConf.org,c,b.circular)}function gn_getScrollItemsNextFilter(a,b,c,d){return gn_getItemsNextFilter(a,b.items.filter,d+1,c,b.circular)-1}function gn_getItemsNextFilter(a,b,c,d){for(var f=0,g=0,h=d,i=a.length-1;i>=h;h++){if(g++,g>=i)return g;var j=a.eq(h);if(j.is(b)&&(f++,f==c))return g;h==i&&(h=-1)}}function gi_getCurrentItems(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsPrev(a,b,c){return a.slice(c,b.items.visibleConf.old+c)}function gi_getNewItemsPrev(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsNext(a,b){return a.slice(0,b.items.visibleConf.old)}function gi_getNewItemsNext(a,b,c){return a.slice(c,b.items.visible+c)}function sz_storeMargin(a,b,c){b.usePadding&&(is_string(c)||(c="_cfs_origCssMargin"),a.each(function(){var a=$(this),d=parseInt(a.css(b.d.marginRight),10);is_number(d)||(d=0),a.data(c,d)}))}function sz_resetMargin(a,b,c){if(b.usePadding){var d=is_boolean(c)?c:!1;is_number(c)||(c=0),sz_storeMargin(a,b,"_cfs_tempCssMargin"),a.each(function(){var a=$(this);a.css(b.d.marginRight,d?a.data("_cfs_tempCssMargin"):c+a.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(a){a.each(function(){var a=$(this);a.data("_cfs_origCss",a.attr("style")||"")})}function sz_restoreOrigCss(a){a.each(function(){var a=$(this);a.attr("style",a.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(a,b){var d=(a.items.visible,a.items[a.d.width]),e=a[a.d.height],f=is_percentage(e);b.each(function(){var b=$(this),c=d-ms_getPaddingBorderMargin(b,a,"Width");b[a.d.width](c),f&&b[a.d.height](ms_getPercentage(c,e))})}function sz_setSizes(a,b){var c=a.parent(),d=a.children(),e=gi_getCurrentItems(d,b),f=cf_mapWrapperSizes(ms_getSizes(e,b,!0),b,!1);if(c.css(f),b.usePadding){var g=b.padding,h=g[b.d[1]];b.align&&0>h&&(h=0);var i=e.last();i.css(b.d.marginRight,i.data("_cfs_origCssMargin")+h),a.css(b.d.top,g[b.d[0]]),a.css(b.d.left,g[b.d[3]])}return a.css(b.d.width,f[b.d.width]+2*ms_getTotalSize(d,b,"width")),a.css(b.d.height,ms_getLargestSize(d,b,"height")),f}function ms_getSizes(a,b,c){return[ms_getTotalSize(a,b,"width",c),ms_getLargestSize(a,b,"height",c)]}function ms_getLargestSize(a,b,c,d){return is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d?b[b.d[c]]:is_number(b.items[b.d[c]])?b.items[b.d[c]]:(c=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(a,b,c))}function ms_getTrueLargestSize(a,b,c){for(var d=0,e=0,f=a.length;f>e;e++){var g=a.eq(e),h=g.is(":visible")?g[b.d[c]](!0):0;h>d&&(d=h)}return d}function ms_getTotalSize(a,b,c,d){if(is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d)return b[b.d[c]];if(is_number(b.items[b.d[c]]))return b.items[b.d[c]]*a.length;for(var e=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",f=0,g=0,h=a.length;h>g;g++){var i=a.eq(g);f+=i.is(":visible")?i[b.d[e]](!0):0}return f}function ms_getParentSize(a,b,c){var d=a.is(":visible");d&&a.hide();var e=a.parent()[b.d[c]]();return d&&a.show(),e}function ms_getMaxDimension(a,b){return is_number(a[a.d.width])?a[a.d.width]:b}function ms_hasVariableSizes(a,b,c){for(var d=!1,e=!1,f=0,g=a.length;g>f;f++){var h=a.eq(f),i=h.is(":visible")?h[b.d[c]](!0):0;d===!1?d=i:d!=i&&(e=!0),0==d&&(e=!0)}return e}function ms_getPaddingBorderMargin(a,b,c){return a[b.d["outer"+c]](!0)-a[b.d[c.toLowerCase()]]()}function ms_getPercentage(a,b){if(is_percentage(b)){if(b=parseInt(b.slice(0,-1),10),!is_number(b))return a;a*=b/100}return a}function cf_e(a,b,c,d,e){return is_boolean(c)||(c=!0),is_boolean(d)||(d=!0),is_boolean(e)||(e=!1),c&&(a=b.events.prefix+a),d&&(a=a+"."+b.events.namespace),d&&e&&(a+=b.serialNumber),a}function cf_c(a,b){return is_string(b.classnames[a])?b.classnames[a]:a}function cf_mapWrapperSizes(a,b,c){is_boolean(c)||(c=!0);var d=b.usePadding&&c?b.padding:[0,0,0,0],e={};return e[b.d.width]=a[0]+d[1]+d[3],e[b.d.height]=a[1]+d[0]+d[2],e}function cf_sortParams(a,b){for(var c=[],d=0,e=a.length;e>d;d++)for(var f=0,g=b.length;g>f;f++)if(b[f].indexOf(typeof a[d])>-1&&is_undefined(c[f])){c[f]=a[d];break}return c}function cf_getPadding(a){if(is_undefined(a))return[0,0,0,0];if(is_number(a))return[a,a,a,a];if(is_string(a)&&(a=a.split("px").join("").split("em").join("").split(" ")),!is_array(a))return[0,0,0,0];for(var b=0;4>b;b++)a[b]=parseInt(a[b],10);switch(a.length){case 0:return[0,0,0,0];case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];default:return[a[0],a[1],a[2],a[3]]}}function cf_getAlignPadding(a,b){var c=is_number(b[b.d.width])?Math.ceil(b[b.d.width]-ms_getTotalSize(a,b,"width")):0;switch(b.align){case"left":return[0,c];case"right":return[c,0];case"center":default:return[Math.ceil(c/2),Math.floor(c/2)]}}function cf_getDimensions(a){for(var b=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],c=b[0].length,d="right"==a.direction||"left"==a.direction?0:1,e={},f=0;c>f;f++)e[b[0][f]]=b[d][f];return e}function cf_getAdjust(a,b,c,d){var e=a;if(is_function(c))e=c.call(d,e);else if(is_string(c)){var f=c.split("+"),g=c.split("-");if(g.length>f.length)var h=!0,i=g[0],j=g[1];else var h=!1,i=f[0],j=f[1];switch(i){case"even":e=1==a%2?a-1:a;break;case"odd":e=0==a%2?a-1:a;break;default:e=a}j=parseInt(j,10),is_number(j)&&(h&&(j=-j),e+=j)}return(!is_number(e)||1>e)&&(e=1),e}function cf_getItemsAdjust(a,b,c,d){return cf_getItemAdjustMinMax(cf_getAdjust(a,b,c,d),b.items.visibleConf)}function cf_getItemAdjustMinMax(a,b){return is_number(b.min)&&b.min>a&&(a=b.min),is_number(b.max)&&a>b.max&&(a=b.max),1>a&&(a=1),a}function cf_getSynchArr(a){is_array(a)||(a=[[a]]),is_array(a[0])||(a=[a]);for(var b=0,c=a.length;c>b;b++)is_string(a[b][0])&&(a[b][0]=$(a[b][0])),is_boolean(a[b][1])||(a[b][1]=!0),is_boolean(a[b][2])||(a[b][2]=!0),is_number(a[b][3])||(a[b][3]=0);return a}function cf_getKeyCode(a){return"right"==a?39:"left"==a?37:"up"==a?38:"down"==a?40:-1}function cf_setCookie(a,b,c){if(a){var d=b.triggerHandler(cf_e("currentPosition",c));$.fn.carouFredSel.cookie.set(a,d)}}function cf_getCookie(a){var b=$.fn.carouFredSel.cookie.get(a);return""==b?0:b}function in_mapCss(a,b){for(var c={},d=0,e=b.length;e>d;d++)c[b[d]]=a.css(b[d]);return c}function in_complementItems(a,b,c,d){return is_object(a.visibleConf)||(a.visibleConf={}),is_object(a.sizesConf)||(a.sizesConf={}),0==a.start&&is_number(d)&&(a.start=d),is_object(a.visible)?(a.visibleConf.min=a.visible.min,a.visibleConf.max=a.visible.max,a.visible=!1):is_string(a.visible)?("variable"==a.visible?a.visibleConf.variable=!0:a.visibleConf.adjust=a.visible,a.visible=!1):is_function(a.visible)&&(a.visibleConf.adjust=a.visible,a.visible=!1),is_string(a.filter)||(a.filter=c.filter(":hidden").length>0?":visible":"*"),a[b.d.width]||(b.responsive?(debug(!0,"Set a "+b.d.width+" for the items!"),a[b.d.width]=ms_getTrueLargestSize(c,b,"outerWidth")):a[b.d.width]=ms_hasVariableSizes(c,b,"outerWidth")?"variable":c[b.d.outerWidth](!0)),a[b.d.height]||(a[b.d.height]=ms_hasVariableSizes(c,b,"outerHeight")?"variable":c[b.d.outerHeight](!0)),a.sizesConf.width=a.width,a.sizesConf.height=a.height,a}function in_complementVisibleItems(a,b){return"variable"==a.items[a.d.width]&&(a.items.visibleConf.variable=!0),a.items.visibleConf.variable||(is_number(a[a.d.width])?a.items.visible=Math.floor(a[a.d.width]/a.items[a.d.width]):(a.items.visible=Math.floor(b/a.items[a.d.width]),a[a.d.width]=a.items.visible*a.items[a.d.width],a.items.visibleConf.adjust||(a.align=!1)),("Infinity"==a.items.visible||1>a.items.visible)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),a.items.visibleConf.variable=!0)),a}function in_complementPrimarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerWidth")),a}function in_complementSecondarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerHeight")),a||(a=b.items[b.d.height]),a}function in_getAlignPadding(a,b){var c=cf_getAlignPadding(gi_getCurrentItems(b,a),a);return a.padding[a.d[1]]=c[1],a.padding[a.d[3]]=c[0],a}function in_getResponsiveValues(a,b){var d=cf_getItemAdjustMinMax(Math.ceil(a[a.d.width]/a.items[a.d.width]),a.items.visibleConf);d>b.length&&(d=b.length);var e=Math.floor(a[a.d.width]/d);return a.items.visible=d,a.items[a.d.width]=e,a[a.d.width]=d*e,a}function bt_pauseOnHoverConfig(a){if(is_string(a))var b=a.indexOf("immediate")>-1?!0:!1,c=a.indexOf("resume")>-1?!0:!1;else var b=c=!1;return[b,c]}function bt_mousesheelNumber(a){return is_number(a)?a:null}function is_null(a){return null===a}function is_undefined(a){return is_null(a)||a===void 0||""===a||"undefined"===a}function is_array(a){return a instanceof Array}function is_jquery(a){return a instanceof jQuery}function is_object(a){return(a instanceof Object||"object"==typeof a)&&!is_null(a)&&!is_jquery(a)&&!is_array(a)&&!is_function(a)}function is_number(a){return(a instanceof Number||"number"==typeof a)&&!isNaN(a)}function is_string(a){return(a instanceof String||"string"==typeof a)&&!is_undefined(a)&&!is_true(a)&&!is_false(a)}function is_function(a){return a instanceof Function||"function"==typeof a}function is_boolean(a){return a instanceof Boolean||"boolean"==typeof a||is_true(a)||is_false(a)}function is_true(a){return a===!0||"true"===a}function is_false(a){return a===!1||"false"===a}function is_percentage(a){return is_string(a)&&"%"==a.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(a,b){debug(!0,a+" is DEPRECATED, support for it will be removed. Use "+b+" instead.")}function debug(a,b){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(a)){var c=" ("+a.selector+")";a=a.debug}else var c="";if(!a)return!1;b=is_string(b)?"carouFredSel"+c+": "+b:["carouFredSel"+c+":",b],window.console.log(b)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(a,b,c){a=go_getObject($tt0,a),a.items=go_getItemsObject($tt0,a.items),a.scroll=go_getScrollObject($tt0,a.scroll),a.auto=go_getAutoObject($tt0,a.auto),a.prev=go_getPrevNextObject($tt0,a.prev),a.next=go_getPrevNextObject($tt0,a.next),a.pagination=go_getPaginationObject($tt0,a.pagination),a.swipe=go_getSwipeObject($tt0,a.swipe),a.mousewheel=go_getMousewheelObject($tt0,a.mousewheel),b&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,a)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,a),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var d=$cfs.children(),e=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,e),opts.items=in_complementItems(opts.items,opts,d,c),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,d),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,d),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(e,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,e)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(d,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(d,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,d,e);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,d),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var a=$cfs.children(),b=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),c="relative";switch(b.position){case"absolute":case"fixed":c=b.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(b),$wrp.css({overflow:"hidden",position:c}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",b.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(a,opts),sz_storeOrigCss(a),opts.responsive&&sz_setResponsiveSizes(opts,a)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(a,b){return a.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),b)),!0}),$cfs.bind(cf_e("finish",conf),function(a){return a.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(a,b,c){if(a.stopPropagation(),tmrs=sc_clearTimers(tmrs),b&&crsl.isScrolling){scrl.isStopped=!0;var d=getTime()-scrl.startTime;scrl.duration-=d,scrl.pre&&(scrl.pre.duration-=d),scrl.post&&(scrl.post.duration-=d),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||c&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var e=opts.auto.timeoutDuration-tmrs.timePassed,f=100-Math.ceil(100*e/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,f,e)}return!0}),$cfs.bind(cf_e("play",conf),function(a,b,c,d){a.stopPropagation(),tmrs=sc_clearTimers(tmrs);var e=[b,c,d],f=["string","number","boolean"],g=cf_sortParams(e,f);if(b=g[0],c=g[1],d=g[2],"prev"!=b&&"next"!=b&&(b=crsl.direction),is_number(c)||(c=0),is_boolean(d)||(d=!1),d&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return a.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var h=opts.auto.timeoutDuration+c;return dur2=h-tmrs.timePassed,perc=100-Math.ceil(100*dur2/h),opts.auto.progress&&(tmrs.progress=setInterval(function(){var a=getTime()-tmrs.startTime+tmrs.timePassed,b=Math.ceil(100*a/h);opts.auto.progress.updater.call(opts.auto.progress.bar[0],b)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),b):$cfs.trigger(cf_e(b,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(a){return a.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(a,b,c,d,e){if(a.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return a.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var f=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(f>itms.total)return a.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+f+" needed): Not scrolling.");var g=[b,c,d,e],h=["object","number/string","function","boolean"],i=cf_sortParams(g,h);b=i[0],c=i[1],d=i[2],e=i[3];var j=a.type.slice(conf.events.prefix.length);if(is_object(b)||(b={}),is_function(d)&&(b.onAfter=d),is_boolean(e)&&(b.queue=e),b=$.extend(!0,{},opts[j],b),b.conditions&&!b.conditions.call($tt0,j))return a.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(c)){if("*"!=opts.items.filter)c="visible";else for(var k=[c,b.items,opts[j].items],i=0,l=k.length;l>i;i++)if(is_number(k[i])||"page"==k[i]||"visible"==k[i]){c=k[i];break}switch(c){case"page":return a.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(j+"Page",conf),[b,d]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(c=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]]),a.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(b.duration>0&&crsl.isScrolling)return b.queue&&("last"==b.queue&&(queu=[]),("first"!=b.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]])),a.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+j,conf),[b,c]),opts.synchronise)for(var m=opts.synchronise,n=[b,c],o=0,l=m.length;l>o;o++){var p=j;m[o][2]||(p="prev"==p?"next":"prev"),m[o][1]||(n[0]=m[o][0].triggerHandler("_cfs_triggerEvent",["configuration",p])),n[1]=c+m[o][3],m[o][0].trigger("_cfs_triggerEvent",["slide_"+p,n])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if(opts.items.visibleConf.variable)c=gn_getVisibleItemsPrev(d,opts,itms.total-1);else if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsPrevFilter(d,opts,itms.total-1,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}if(opts.circular||itms.total-c<itms.first&&(c=itms.total-itms.first),opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){var f=cf_getItemsAdjust(gn_getVisibleItemsNext(d,opts,itms.total-c),opts,opts.items.visibleConf.adjust,$tt0);f>=opts.items.visible+c&&itms.total>c&&(c++,f=cf_getItemsAdjust(gn_getVisibleItemsNext(d,opts,itms.total-c),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=f}else if("*"!=opts.items.filter){var f=gn_getVisibleItemsNextFilter(d,opts,itms.total-c);opts.items.visible=cf_getItemsAdjust(f,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(d,opts,!0),0==c)return a.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+c+" items backward."),itms.first+=c;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&b.onEnd&&b.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-c,itms.total).prependTo($cfs),itms.total<opts.items.visible+c&&$cfs.children().slice(0,opts.items.visible+c-itms.total).clone(!0).appendTo($cfs);var d=$cfs.children(),g=gi_getOldItemsPrev(d,opts,c),h=gi_getNewItemsPrev(d,opts),i=d.eq(c-1),j=g.last(),k=h.last();sz_resetMargin(d,opts);var l=0,m=0;if(opts.align){var n=cf_getAlignPadding(h,opts);l=n[0],m=n[1]}var o=0>l?opts.padding[opts.d[3]]:0,p=!1,q=$();if(c>opts.items.visible&&(q=d.slice(opts.items.visibleConf.old,c),"directscroll"==b.fx)){var r=opts.items[opts.d.width];p=q,i=k,sc_hideHiddenItems(p),opts.items[opts.d.width]="variable"}var s=!1,t=ms_getTotalSize(d.slice(0,c),opts,"width"),u=cf_mapWrapperSizes(ms_getSizes(h,opts,!0),opts,!opts.usePadding),v=0,w={},x={},y={},z={},A={},B={},C={},D=sc_getDuration(b,opts,c,t);switch(b.fx){case"cover":case"cover-fade":v=ms_getTotalSize(d.slice(0,opts.items.visible),opts,"width")}p&&(opts.items[opts.d.width]=r),sz_resetMargin(d,opts,!0),m>=0&&sz_resetMargin(j,opts,opts.padding[opts.d[1]]),l>=0&&sz_resetMargin(i,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=m,opts.padding[opts.d[3]]=l),B[opts.d.left]=-(t-o),C[opts.d.left]=-(v-o),x[opts.d.left]=u[opts.d.width];var E=function(){},F=function(){},G=function(){},H=function(){},I=function(){},J=function(){},K=function(){},L=function(){},M=function(){},N=function(){},O=function(){};switch(b.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":s=$cfs.clone(!0).appendTo($wrp)}switch(b.fx){case"crossfade":case"uncover":case"uncover-fade":s.children().slice(0,c).remove(),s.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":s.children().slice(opts.items.visible).remove(),s.css(C)}if($cfs.css(B),scrl=sc_setScroll(D,b.easing,conf),w[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(E=function(){$wrp.css(u)},F=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){switch(k.not(i).length&&(y[opts.d.marginRight]=i.data("_cfs_origCssMargin"),0>l?i.css(y):(K=function(){i.css(y)},L=function(){scrl.anims.push([i,y])})),b.fx){case"cover":case"cover-fade":s.children().eq(c-1).css(y)}k.not(j).length&&(z[opts.d.marginRight]=j.data("_cfs_origCssMargin"),G=function(){j.css(z)},H=function(){scrl.anims.push([j,z])}),m>=0&&(A[opts.d.marginRight]=k.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],I=function(){k.css(A)},J=function(){scrl.anims.push([k,A])})}O=function(){$cfs.css(w)};var P=opts.items.visible+c-itms.total;N=function(){if(P>0&&($cfs.children().slice(itms.total).remove(),g=$($cfs.children().slice(itms.total-(opts.items.visible-P)).get().concat($cfs.children().slice(0,P).get()))),sc_showHiddenItems(p),opts.usePadding){var a=$cfs.children().eq(opts.items.visible+c-1);a.css(opts.d.marginRight,a.data("_cfs_origCssMargin"))}};var Q=sc_mapCallbackArguments(g,q,h,c,"prev",D,u);switch(M=function(){sc_afterScroll($cfs,s,b),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,b,"onAfter",Q,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,b,"onBefore",Q,clbk),b.fx){case"none":$cfs.css(w),E(),G(),I(),K(),O(),N(),M();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){E(),G(),I(),K(),O(),N(),scrl=sc_setScroll(D,b.easing,conf),scrl.anims.push([$cfs,{opacity:1},M]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([s,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},M]),F(),G(),I(),K(),O(),N();break;case"cover":scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"uncover":scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;default:scrl.anims.push([$cfs,w,function(){N(),M()}]),F(),H(),J(),L()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,u]),!0 2647}),$cfs.bind(cf_e("slide_next",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsNextFilter(d,opts,0,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}var f=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var g=gn_getVisibleItemsNext(d,opts,c),e=gn_getVisibleItemsPrev(d,opts,f-1);else var g=opts.items.visible,e=opts.items.visible;c+g>f&&(c=f-e)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var g=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(d,opts,c,f),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-c>=g&&itms.total>c;)c++,g=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(d,opts,c,f),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=g}else if("*"!=opts.items.filter){var g=gn_getVisibleItemsNextFilter(d,opts,c);opts.items.visible=cf_getItemsAdjust(g,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(d,opts,!0),0==c)return a.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+c+" items forward."),itms.first-=c;0>itms.first;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&b.onEnd&&b.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.total<opts.items.visible+c&&$cfs.children().slice(0,opts.items.visible+c-itms.total).clone(!0).appendTo($cfs);var d=$cfs.children(),h=gi_getOldItemsNext(d,opts),i=gi_getNewItemsNext(d,opts,c),j=d.eq(c-1),k=h.last(),l=i.last();sz_resetMargin(d,opts);var m=0,n=0;if(opts.align){var o=cf_getAlignPadding(i,opts);m=o[0],n=o[1]}var p=!1,q=$();if(c>opts.items.visibleConf.old&&(q=d.slice(opts.items.visibleConf.old,c),"directscroll"==b.fx)){var r=opts.items[opts.d.width];p=q,j=k,sc_hideHiddenItems(p),opts.items[opts.d.width]="variable"}var s=!1,t=ms_getTotalSize(d.slice(0,c),opts,"width"),u=cf_mapWrapperSizes(ms_getSizes(i,opts,!0),opts,!opts.usePadding),v=0,w={},x={},y={},z={},A={},B=sc_getDuration(b,opts,c,t);switch(b.fx){case"uncover":case"uncover-fade":v=ms_getTotalSize(d.slice(0,opts.items.visibleConf.old),opts,"width")}p&&(opts.items[opts.d.width]=r),opts.align&&0>opts.padding[opts.d[1]]&&(opts.padding[opts.d[1]]=0),sz_resetMargin(d,opts,!0),sz_resetMargin(k,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=n,opts.padding[opts.d[3]]=m),A[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var C=function(){},D=function(){},E=function(){},F=function(){},G=function(){},H=function(){},I=function(){},J=function(){},K=function(){};switch(b.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":s=$cfs.clone(!0).appendTo($wrp),s.children().slice(opts.items.visibleConf.old).remove()}switch(b.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),s.css("zIndex",0)}if(scrl=sc_setScroll(B,b.easing,conf),w[opts.d.left]=-t,x[opts.d.left]=-v,0>m&&(w[opts.d.left]+=m),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(C=function(){$wrp.css(u)},D=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){var L=l.data("_cfs_origCssMargin");n>=0&&(L+=opts.padding[opts.d[1]]),l.css(opts.d.marginRight,L),j.not(k).length&&(z[opts.d.marginRight]=k.data("_cfs_origCssMargin")),E=function(){k.css(z)},F=function(){scrl.anims.push([k,z])};var M=j.data("_cfs_origCssMargin");m>0&&(M+=opts.padding[opts.d[3]]),y[opts.d.marginRight]=M,G=function(){j.css(y)},H=function(){scrl.anims.push([j,y])}}K=function(){$cfs.css(A)};var N=opts.items.visible+c-itms.total;J=function(){N>0&&$cfs.children().slice(itms.total).remove();var a=$cfs.children().slice(0,c).appendTo($cfs).last();if(N>0&&(i=gi_getCurrentItems(d,opts)),sc_showHiddenItems(p),opts.usePadding){if(itms.total<opts.items.visible+c){var b=$cfs.children().eq(opts.items.visible-1);b.css(opts.d.marginRight,b.data("_cfs_origCssMargin")+opts.padding[opts.d[1]])}a.css(opts.d.marginRight,a.data("_cfs_origCssMargin"))}};var O=sc_mapCallbackArguments(h,q,i,c,"next",B,u);switch(I=function(){$cfs.css("zIndex",$cfs.data("_cfs_origCssZindex")),sc_afterScroll($cfs,s,b),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,b,"onAfter",O,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,b,"onBefore",O,clbk),b.fx){case"none":$cfs.css(w),C(),E(),G(),K(),J(),I();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){C(),E(),G(),K(),J(),scrl=sc_setScroll(B,b.easing,conf),scrl.anims.push([$cfs,{opacity:1},I]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([s,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},I]),D(),E(),G(),K(),J();break;case"cover":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([$cfs,A,I]),D(),E(),G(),J();break;case"cover-fade":$cfs.css(opts.d.left,$wrp[opts.d.width]()),scrl.anims.push([s,{opacity:0}]),scrl.anims.push([$cfs,A,I]),D(),E(),G(),J();break;case"uncover":scrl.anims.push([s,x,I]),D(),E(),G(),K(),J();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([s,x,I]),D(),E(),G(),K(),J();break;default:scrl.anims.push([$cfs,w,function(){K(),J(),I()}]),D(),F(),H()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,u]),!0}),$cfs.bind(cf_e("slideTo",conf),function(a,b,c,d,e,f,g){a.stopPropagation();var h=[b,c,d,e,f,g],i=["string/number/object","number","boolean","object","string","function"],j=cf_sortParams(h,i);return e=j[3],f=j[4],g=j[5],b=gn_getItemIndex(j[0],j[1],j[2],itms,$cfs),0==b?!1:(is_object(e)||(e=!1),"prev"!=f&&"next"!=f&&(f=opts.circular?itms.total/2>=b?"next":"prev":0==itms.first||itms.first>b?"next":"prev"),"prev"==f&&(b=itms.total-b),$cfs.trigger(cf_e(f,conf),[e,b,g]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d-1,b,"prev",c])}),$cfs.bind(cf_e("nextPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d+1,b,"next",c])}),$cfs.bind(cf_e("slideToPage",conf),function(a,b,c,d,e){a.stopPropagation(),is_number(b)||(b=$cfs.triggerHandler(cf_e("currentPage",conf)));var f=opts.pagination.items||opts.items.visible,g=Math.ceil(itms.total/f)-1;return 0>b&&(b=g),b>g&&(b=0),$cfs.triggerHandler(cf_e("slideTo",conf),[b*f,0,!0,c,d,e])}),$cfs.bind(cf_e("jumpToStart",conf),function(a,b){if(a.stopPropagation(),b=b?gn_getItemIndex(b,0,!0,itms,$cfs):0,b+=itms.first,0!=b){if(itms.total>0)for(;b>itms.total;)b-=itms.total;$cfs.prepend($cfs.children().slice(b,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(a,b){if(a.stopPropagation(),b)b=cf_getSynchArr(b);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");b=opts.synchronise}for(var c=$cfs.triggerHandler(cf_e("currentPosition",conf)),d=!0,e=0,f=b.length;f>e;e++)b[e][0].triggerHandler(cf_e("slideTo",conf),[c,b[e][3],!0])||(d=!1);return d}),$cfs.bind(cf_e("queue",conf),function(a,b,c){return a.stopPropagation(),is_function(b)?b.call($tt0,queu):is_array(b)?queu=b:is_undefined(b)||queu.push([b,c]),queu}),$cfs.bind(cf_e("insertItem",conf),function(a,b,c,d,e){a.stopPropagation();var f=[b,c,d,e],g=["string/object","string/number/object","boolean","number"],h=cf_sortParams(f,g);if(b=h[0],c=h[1],d=h[2],e=h[3],is_object(b)&&!is_jquery(b)?b=$(b):is_string(b)&&(b=$(b)),!is_jquery(b)||0==b.length)return debug(conf,"Not a valid object.");is_undefined(c)&&(c="end"),sz_storeMargin(b,opts),sz_storeOrigCss(b);var i=c,j="before";"end"==c?d?(0==itms.first?(c=itms.total-1,j="after"):(c=itms.first,itms.first+=b.length),0>c&&(c=0)):(c=itms.total-1,j="after"):c=gn_getItemIndex(c,e,d,itms,$cfs);var k=$cfs.children().eq(c);return k.length?k[j](b):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(b)),"end"==i||d||itms.first>c&&(itms.first+=b.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(a,b,c,d){a.stopPropagation();var e=[b,c,d],f=["string/number/object","boolean","number"],g=cf_sortParams(e,f);if(b=g[0],c=g[1],d=g[2],b instanceof $&&b.length>1)return i=$(),b.each(function(){var e=$cfs.trigger(cf_e("removeItem",conf),[$(this),c,d]);e&&(i=i.add(e))}),i;if(is_undefined(b)||"end"==b)i=$cfs.children().last();else{b=gn_getItemIndex(b,d,c,itms,$cfs);var i=$cfs.children().eq(b);i.length&&itms.first>b&&(itms.first-=i.length)}return i&&i.length&&(i.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),i}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(a,b){a.stopPropagation();var c=a.type.slice(conf.events.prefix.length);return is_array(b)&&(clbk[c]=b),is_function(b)&&clbk[c].push(b),clbk[c]}),$cfs.bind(cf_e("currentPosition",conf),function(a,b){if(a.stopPropagation(),0==itms.first)var c=0;else var c=itms.total-itms.first;return is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("currentPage",conf),function(a,b){a.stopPropagation();var e,c=opts.pagination.items||opts.items.visible,d=Math.ceil(itms.total/c-1);return e=0==itms.first?0:itms.first<itms.total%c?0:itms.first!=c||opts.circular?Math.round((itms.total-itms.first)/c):d,0>e&&(e=0),e>d&&(e=d),is_function(b)&&b.call($tt0,e),e}),$cfs.bind(cf_e("currentVisible",conf),function(a,b){a.stopPropagation();var c=gi_getCurrentItems($cfs.children(),opts);return is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("slice",conf),function(a,b,c,d){if(a.stopPropagation(),0==itms.total)return!1;var e=[b,c,d],f=["number","number","function"],g=cf_sortParams(e,f);if(b=is_number(g[0])?g[0]:0,c=is_number(g[1])?g[1]:itms.total,d=g[2],b+=itms.first,c+=itms.first,items.total>0){for(;b>itms.total;)b-=itms.total;for(;c>itms.total;)c-=itms.total;for(;0>b;)b+=itms.total;for(;0>c;)c+=itms.total}var i,h=$cfs.children();return i=c>b?h.slice(b,c):$(h.slice(b,itms.total).get().concat(h.slice(0,c).get())),is_function(d)&&d.call($tt0,i),i}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(a,b){a.stopPropagation();var c=a.type.slice(conf.events.prefix.length),d=crsl[c];return is_function(b)&&b.call($tt0,d),d}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(a,b,c){return a.stopPropagation(),is_undefined(b)?b=$("body"):is_string(b)&&(b=$(b)),is_jquery(b)&&0!=b.length?(is_string(c)||(c="a.caroufredsel"),b.find(c).each(function(){var a=this.hash||"";a.length>0&&-1!=$cfs.children().index($(a))&&$(this).unbind("click").click(function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),a)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(a,b){if(a.stopPropagation(),opts.pagination.container){var d=opts.pagination.items||opts.items.visible,e=Math.ceil(itms.total/d);b&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var a=0;e>a;a++){var b=$cfs.children().eq(gn_getItemIndex(a*d,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(b[0],a+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(a){$(this).bind(opts.pagination.event,function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[a*d,-opts.pagination.deviation,!0,opts.pagination])})})}));var f=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return f>=e&&(f=0),0>f&&(f=e-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(f).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var b=opts.items.visible,c=$cfs.children(),d=ms_getParentSize($wrp,opts,"width");if(itms.total=c.length,crsl.primarySizePercentage?(opts.maxDimension=d,opts[opts.d.width]=ms_getPercentage(d,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,d),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,c,d),b=opts.items.visible,sz_setResponsiveSizes(opts,c)):opts.items.visibleConf.variable?b=gn_getVisibleItemsNext(c,opts,0):"*"!=opts.items.filter&&(b=gn_getVisibleItemsNextFilter(c,opts,0)),!opts.circular&&0!=itms.first&&b>itms.first){if(opts.items.visibleConf.variable)var e=gn_getVisibleItemsPrev(c,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var e=gn_getVisibleItemsPrevFilter(c,opts,itms.first)-itms.first;else var e=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+e+" items backward."),$cfs.trigger(cf_e("prev",conf),e)}opts.items.visible=cf_getItemsAdjust(b,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,c);var f=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,f]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),f}),$cfs.bind(cf_e("destroy",conf),function(a,b){return a.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),b&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(a,b,c){return a.stopPropagation(),$cfs.triggerHandler(cf_e(b,conf),c)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(a){a.preventDefault();var b=!1,c=null;crsl.isPaused?b="play":opts.auto.pauseOnEvent&&(b="pause",c=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),b&&$cfs.trigger(cf_e(b,conf),c)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b==opts.next.key&&(a.preventDefault(),$cfs.trigger(cf_e("next",conf))),b==opts.prev.key&&(a.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b>=49&&58>b&&(b=(b-49)*opts.items.visible,itms.total>=b&&(a.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[b,0,!0,opts.pagination])))}),$.fn.swipe){var b="ontouchstart"in window;if(b&&opts.swipe.onTouch||!b&&opts.swipe.onMouse){var c=$.extend(!0,{},opts.prev,opts.swipe),d=$.extend(!0,{},opts.next,opts.swipe),e=function(){$cfs.trigger(cf_e("prev",conf),[c])},f=function(){$cfs.trigger(cf_e("next",conf),[d])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=f,opts.swipe.options.swipeDown=e;break;default:opts.swipe.options.swipeLeft=f,opts.swipe.options.swipeRight=e}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var g=$.extend(!0,{},opts.prev,opts.mousewheel),h=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(a,b){a.preventDefault(),b>0?$cfs.trigger(cf_e("prev",conf),[g]):$cfs.trigger(cf_e("next",conf),[h])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var i=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},j=$(window),k=null;if($.debounce&&"debounce"==conf.onWindowResize)k=$.debounce(200,i);else if($.throttle&&"throttle"==conf.onWindowResize)k=$.throttle(300,i);else{var l=0,m=0;k=function(){var a=j.width(),b=j.height();(a!=l||b!=m)&&(i(),l=a,m=b)}}j.bind(cf_e("resize",conf,!1,!0,!0),k)}},FN._unbind_buttons=function(){var b=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(b),opts.auto.button&&opts.auto.button.unbind(b),opts.prev.button&&opts.prev.button.unbind(b),opts.next.button&&opts.next.button.unbind(b),opts.pagination.container&&(opts.pagination.container.unbind(b),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,1>s.length)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(a){return'<a href="#"><span>'+a+"</span></a>"},$.fn.carouFredSel.progressbarUpdater=function(a){$(this).css("width",a+"%")},$.fn.carouFredSel.cookie={get:function(a){a+="=";for(var b=document.cookie.split(";"),c=0,d=b.length;d>c;c++){for(var e=b[c];" "==e.charAt(0);)e=e.slice(1);if(0==e.indexOf(a))return e.slice(a.length)}return 0},set:function(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+1e3*60*60*24*c),d="; expires="+e.toGMTString()}document.cookie=a+"="+b+d+"; path=/"},remove:function(a){$.fn.carouFredSel.cookie.set(a,"",-1)}},$.extend($.easing,{quadratic:function(a){var b=a*a;return a*(-b*a+4*b-6*a+4)},cubic:function(a){return a*(4*a*a-9*a+6)},elastic:function(a){var b=a*a;return a*(33*b*b-106*b*a+126*b-67*a+15)}}))})(jQuery);
vendor: 2,676 bytes, lines 2647-2648
2647 2648!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,l){function a(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,a){var h=l.data(a,i);if(!h)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var u=h[e];if(!u||"_"==e.charAt(0))return void s(r+" is not a valid method");var c=u.apply(h,n);o=void 0===o?c:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=l.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),l.data(n,i,o))})}l=l||e||t.jQuery,l&&(r.prototype.option||(r.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return a(this,t,e)}return h(this,t),this},n(l))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},e.allOff=e.removeAllListeners=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["de
2648sandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var r=i.toDashed(o),s="data-"+r,l=document.querySelectorAll("["+s+"]"),a=document.querySelectorAll(".js-"+r),h=i.makeArray(l).concat(i.makeArray(a)),u=s+"-options",c=t.jQuery;h.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(u);try{i=r&&JSON.parse(r)}catch(l){return void(n&&n.error("Error parsing "+s+" on "+t.className+": "+l))}var a=new e(t,i);c&&c.data(t,o,a)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/core",["ev-emitter/ev-emitter","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("fizzy-ui-utils")):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){var s=i.getQueryElement(t);if(!s)return void console.error("Bad element for InfiniteScroll: "+(s||t));if(t=s,t.infiniteScrollGUID){var l=r[t.infiniteScrollGUID];return l.option(e),l}this.element=t,this.options=i.extend({},n.defaults),this.option(e),o&&(this.$element=o(this.element)),this.create()}var o=t.jQuery,r={};n.defaults={},n.create={},n.destroy={};var s=n.prototype;i.extend(s,e.prototype);var l=0;s.create=function(){var t=this.guid=++l;this.element.infiniteScrollGUID=t,r[t]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),this.getPath||console.error("Disabling InfiniteScroll"),this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(var e in n.create)n.create[e].call(this)},s.option=function(t){i.extend(this.options,t)},s.callOnInit=function(){var t=this.options.onInit;t&&t.call(this,this)},s.dispatchEvent=function(t,e,i){this.log(t,i);var n=e?[e].concat(i):i;if(this.emitEvent(t,n),o&&this.$element){t+=".infiniteScroll";var r=t;if(e){var s=o.Event(e);s.type=t,r=s}this.$element.trigger(r,i)}};var a={initialized:function(t){return"on "+t},request:function(t){return"URL: "+t},load:function(t,e){return(t.title||"")+". URL: "+e},error:function(t,e){return t+". URL: "+e},append:function(t,e,i){return i.length+" items. URL: "+e},last:function(t,e){return"URL: "+e},history:function(t,e){return"URL: "+e},pageIndex:function(t,e){return"current page determined to be: "+t+" from "+e}};s.log=function(t,e){if(this.options.debug){var i="[InfiniteScroll] "+t,n=a[t];n&&(i+=". "+n.apply(this,e)),console.log(i)}},s.updateMeasurements=function(){this.windowHeight=t.innerHeight;var e=this.element.getBoundingClientRect();this.top=e.top+t.pageYOffset},s.updateScroller=function(){var e=this.options.elementScroll;if(!e)return void(this.scroller=t);if(this.scroller=e===!0?this.element:i.getQueryElement(e),!this.scroller)throw"Unable to find elementScroll: "+e},s.updateGetPath=function(){var t=this.options.path;if(!t)return void console.error("InfiniteScroll path option required. Set as: "+t);var e=typeof t;if("function"==e)return void(this.getPath=t);var i="string"==e&&t.match("{{#}}");return i?void this.updateGetPathTemplate(t):void this.updateGetPathSelector(t)},s.updateGetPathTemplate=function(t){this.getPath=function(){var e=this.pageIndex+1;return t.replace("{{#}}",e)}.bind(this);var e=t.replace("{{#}}","(\\d\\d?\\d?)"),i=new RegExp(e),n=location.href.match(i);n&&(this.pageIndex=parseInt(n[1],10),this.log("pageIndex",this.pageIndex,"template string"))};var h=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/];return s.updateGetPathSelector=function(t){var e=document.querySelector(t);if(!e)return void console.error("Bad InfiniteScroll path option. Next link not found: "+t);for(var i,n,o=e.getAttribute("href"),r=0;o&&r<h.length;r++){n=h[r];var s=o.match(n);if(s){i=s.slice(1);break}}return i?(this.isPathSelector=!0,this.getPath=function(){var t=this.pageIndex+1;return i[0]+t+i[2]}.bind(this),this.pageIndex=parseInt(i[1],10)-1,void this.log("pageIndex",[this.pageIndex,"next link"])):void console.error("InfiniteScroll unable to parse next link href: "+o)},s.updateGetAbsolutePath=function(){var t=this.getPath(),e=t.match(/^http/)||t.match(/^\//);if(e)return void(this.getAbsolutePath=this.getPath);var i=location.pathname,n=i.substring(0,i.lastIndexOf("/"));this.getAbsolutePath=function(){return n+"/"+this.getPath()}},n.create.hideNav=function(){var t=i.getQueryElement(this.options.hideNav);t&&(t.style.display="none",this.nav=t)},n.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},s.destroy=function(){this.allOff();for(var t in n.destroy)n.destroy[t].call(this);delete this.element.infiniteScrollGUID,delete r[this.guid]},n.throttle=function(t,e){e=e||200;var i,n;return function(){var o=+new Date,r=arguments,s=function(){i=o,t.apply(this,r)}.bind(this);i&&o<i+e?(clearTimeout(n),n=setTimeout(s,e)):s()}},n.data=function(t){t=i.getQueryElement(t);var e=t&&t.infiniteScrollGUID;return e&&r[e]},n.setJQuery=function(t){o=t},i.htmlInit(n,"infinite-scroll"),o&&o.bridget&&o.bridget("infiniteScroll",n),n}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/page-load",["./core"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core")):e(t,t.InfiniteScroll)}(window,function(t,e){function i(t){for(var e=document.createDocumentFragment(),i=0;t&&i<t.length;i++)e.appendChild(t[i]);return e}function n(t){for(var e=t.querySelectorAll("script"),i=0;i<e.length;i++){var n=e[i],r=document.createElement("script");o(n,r),n.parentNode.replaceChild(r,n)}}function o(t,e){for(var i=t.attributes,n=0;n<i.length;n++){var o=i[n];e.setAttribute(o.name,o.value)}}function r(t,e,i,n){var o=new XMLHttpRequest;o.open("GET",t),o.responseType=e||"",o.onload=function(){if(200==o.status)i(o.response);else{var t=new Error(o.statusText);n(t)}},o.onerror=function(){var e=new Error("Network error requesting "+t);n(e)},o.send()}var s=e.prototype;return e.defaults.loadOnScroll=!0,e.defaults.checkLastPage=!0,e.defaults.responseType="document",e.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},s.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()},s.loadNextPage=function(){if(!this.isLoading&&this.canLoad){var t=this.getAbsolutePath();this.isLoading=!0;var e=function(e){this.onPageLoad(e,t)}.bind(this),i=function(e){this.onPageError(e,t)}.bind(this);r(t,this.options.responseType,e,i),this.dispatchEvent("request",null,[t])}},s.onPageLoad=function(t,e){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[t,e]),this.appendNextPage(t,e),t},s.appendNextPage=function(t,e){var n=this.options.append,o="document"==this.options.responseType;if(o&&n){var r=t.querySelectorAll(n),s=i(r),l=function(){this.appendItems(r,s),this.isLoading=!1,this.dispatchEvent("append",null,[t,e,r]),this.checkLastPage(t,e)}.bind(this);this.options.outlayer?this.appendOutlayerItems(s,l):l()}},s.appendItems=function(t,e){t&&t.length&&(e=e||i(t),n(e),this.element.appendChild(e))},s.appendOutlayerItems=function(i,n){var o=e.imagesLoaded||t.imagesLoaded;return o?void o(i,n):(console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),void(this.isLoading=!1))}
vendor: 13,709 bytes, lines 2648-2655
2648,s.onAppendOutlayer=function(t,e,i){this.options.outlayer.appended(i)},s.checkLastPage=function(t,e){var i=this.options.checkLastPage;if(i){var n=this.options.path;if("function"==typeof n){var o=this.getPath();if(!o)return void this.lastPageReached(t,e)}var r;if("string"==typeof i?r=i:this.isPathSelector&&(r=n),r&&t.querySelector){var s=t.querySelector(r);s||this.lastPageReached(t,e)}}},s.lastPageReached=function(t,e){this.canLoad=!1,this.dispatchEvent("last",null,[t,e])},s.onPageError=function(t,e){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[t,e]),t},e.create.prefill=function(){if(this.options.prefill){var t=this.options.append;if(!t)return void console.error("append option required for prefill. Set as :"+t);this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.prefill()}},s.prefill=function(){var t=this.getPrefillDistance();this.isPrefilling=t>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.off("append",this.prefill)},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/scroll-watch",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;return e.defaults.scrollThreshold=400,e.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);var t=this.options.scrollThreshold,e=t||0===t;e&&this.enableScrollWatch()},e.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.pageScrollHandler),t[i]("resize",this.resizeHandler)},n.onPageScroll=e.throttle(function(){var t=this.getBottomDistance();t<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){return this.options.elementScroll?this.getElementBottomDistance():this.getWindowBottomDistance()},n.getWindowBottomDistance=function(){var e=this.top+this.element.clientHeight,i=t.pageYOffset+this.windowHeight;return e-i},n.getElementBottomDistance=function(){var t=this.scroller.scrollHeight,e=this.scroller.scrollTop+this.scroller.clientHeight;return t-e},n.onResize=function(){this.updateMeasurements()},i.debounceMethod(e,"onResize",150),e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/history",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){var n=e.prototype;e.defaults.history="replace";var o=document.createElement("a");return e.create.history=function(){if(this.options.history){o.href=this.getAbsolutePath();var t=o.origin||o.protocol+"//"+o.host,e=t==location.origin;return e?void(this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()):void console.error("[InfiniteScroll] cannot set history with different origin: "+o.origin+" on "+location.origin+" . History behavior disabled.")}},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPageIndex=0,this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.beforeunloadHandler=this.onBeforeunload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(e){var i=e?"addEventListener":"removeEventListener";this.scroller[i]("scroll",this.scrollHistoryHandler),t[i]("beforeunload",this.beforeunloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},e.destroy.history=function(){var t=this.options.history&&this.options.append;t&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(t,e,i){var n=i[0],r=this.getElementScrollY(n);o.href=e,this.scrollPages.push({top:r,path:o.href,title:t.title})},n.getElementScrollY=function(t){return this.options.elementScroll?this.getElementElementScrollY(t):this.getElementWindowScrollY(t)},n.getElementWindowScrollY=function(e){var i=e.getBoundingClientRect();return i.top+t.pageYOffset},n.getElementElementScrollY=function(t){return t.offsetTop-this.top},n.onScrollHistory=function(){for(var t,e,i=this.getScrollViewY(),n=0;n<this.scrollPages.length;n++){var o=this.scrollPages[n];if(o.top>=i)break;t=n,e=o}t!=this.scrollPageIndex&&(this.scrollPageIndex=t,this.setHistory(e.title,e.path))},i.debounceMethod(e,"onScrollHistory",150),n.getScrollViewY=function(){return this.options.elementScroll?this.scroller.scrollTop+this.scroller.clientHeight/2:t.pageYOffset+this.windowHeight/2},n.setHistory=function(t,e){var i=this.options.history,n=i&&history[i+"State"];n&&(history[i+"State"](null,t,e),this.options.historyTitle&&(document.title=t),this.dispatchEvent("history",null,[t,e]))},n.onBeforeunload=function(){var e=this.scrollPageIndex;if(0!==e){var i=this.scrollPages[e],n=t.pageYOffset-i.top+this.top;scrollTo(0,n)}},n.onPageLoadHistory=function(t,e){this.setHistory(t.title,e)},e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/button",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t,e){this.element=t,this.infScroll=e,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),e.on("request",this.disable.bind(this)),e.on("load",this.enable.bind(this)),e.on("error",this.hide.bind(this)),e.on("last",this.hide.bind(this))}return e.create.button=function(){var t=i.getQueryElement(this.options.button);if(t)return void(this.button=new n(t,this))},e.destroy.button=function(){this.button&&this.button.destory()},n.prototype.onClick=function(t){t.preventDefault(),this.infScroll.loadNextPage()},n.prototype.enable=function(){this.element.removeAttribute("disabled")},n.prototype.disable=function(){this.element.disabled="disabled"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.destroy=function(){this.element.removeEventListener(this.clickHandler)},e.Button=n,e}),function(t,e){"function"==typeof define&&define.amd?define("infinite-scroll/js/status",["./core","fizzy-ui-utils/utils"],function(i,n){return e(t,i,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("./core"),require("fizzy-ui-utils")):e(t,t.InfiniteScroll,t.fizzyUIUtils)}(window,function(t,e,i){function n(t){r(t,"none")}function o(t){r(t,"block")}function r(t,e){t&&(t.style.display=e)}var s=e.prototype;return e.create.status=function(){var t=i.getQueryElement(this.options.status);if(t){this.statusElement=t,this.statusEventElements={request:t.querySelector(".infinite-scroll-request"),error:t.querySelector(".infinite-scroll-error"),last:t.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus);var e=this.options.append?"append":"load";this.on(e,this.hideAllStatus)}},s.showRequestStatus=function(){this.showStatus("request")},s.showErrorStatus=function(){this.showStatus("error")},s.showLastStatus=function(){this.showStatus("last")},s.showStatus=function(t){o(this.statusElement),this.hideStatusEventElements();var e=this.statusEventElements[t];o(e)},s.hideAllStatus=function(){n(this.statusElement),this.hideStatusEventElements()},s.hideStatusEventElements=function(){for(var t in this.statusEventElements){var e=this.statusEventElements[t];n(e)}},e}),function(t,e){"function"==typeof define&&define.amd?define(["infinite-scroll/js/core","infinite-scroll/js/page-load","infinite-scroll/js/scroll-watch","infinite-scroll/js/history","infinite-scroll/js/button","infinite-scroll/js/status"],e):"object"==typeof module&&module.exports&&(module.exports=e(require("./core"),require("./page-load"),require("./scroll-watch"),require("./history"),require("./button"),require("./status")))}(window,function(t){return t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=n(t),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var l=t.jQuery,a=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&h[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var h={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},o.prototype.check=function(){function t(t,i,n){setTimeout(function(){e.progress(t,i,n)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(l=e,l.fn.imagesLoaded=function(t,e){var i=new o(this,t,e);return i.jqDeferred.promise(l(this))})},o.makeJQueryPlugin(),o}); 2649/*! 2650 * Isotope PACKAGED v2.1.1 2651 * Filter & sort magical layouts 2652 * http://isotope.metafizzy.co 2653 */ 2654 2655(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1
2655),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):"object"==typeof exports?i(require("jquery")):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||o()}function o(){e.isReady=!0;for(var t=0,i=s.length;i>t;t++){var o=s[t];o()}}function n(n){return"complete"===r.readyState?o():(n.bind(r,"DOMContentLoaded",i),n.bind(r,"readystatechange",i),n.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],n):"object"==typeof exports?module.exports=n(require("eventie")):t.docReady=n(t.eventie)}(window),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1
2655);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function n(i){function n(){if(!d){d=!0;var o=t.getComputedStyle;if(p=function(){var t=o?function(t){return o(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||r("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See http://bit.ly/getsizebug1"),i}}(),h=i("boxSizing")){var n=document.createElement("div");n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style[h]="border-box";var s=document.body||document.documentElement;s.appendChild(n);var a=p(n);f=200===e(a.width),s.removeChild(n)}}}function a(t){if(n(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var i=p(t);if("none"===i.display)return o();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var a=r.isBorderBox=!(!h||!i[h]||"border-box"!==i[h]),d=0,l=s.length;l>d;d++){var c=s[d],y=i[c];y=u(t,y);var m=parseFloat(y);r[c]=isNaN(m)?0:m}var g=r.paddingLeft+r.paddingRight,v=r.paddingTop+r.paddingBottom,_=r.marginLeft+r.marginRight,I=r.marginTop+r.marginBottom,L=r.borderLeftWidth+r.borderRightWidth,z=r.borderTopWidth+r.borderBottomWidth,b=a&&f,x=e(i.width);x!==!1&&(r.width=x+(b?0:g+L));var S=e(i.height);return S!==!1&&(r.height=S+(b?0:v+z)),r.innerWidth=r.width-(g+L),r.innerHeight=r.height-(v+z),r.outerWidth=r.width+_,r.outerHeight=r.height+I,r}}function u(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var o=e.style,n=o.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),o.left=i,i=o.pixelLeft,o.left=n,s&&(r.left=s),i}var p,h,f,d=!1;return a}var r="undefined"==typeof console?i:function(t){console.error(t)},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("desandro-get-style-property")):t.getSize=n(t.getStyleProperty)}(window),function(t){function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){i(t);for(var o=t.parentNode.querySelectorAll(e),n=0,r=o.length;r>n;n++)if(o[n]===t)return!0;return!1}function n(t,o){return i(t),e(t,o)}var r,s=function(){if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,o=e.length;o>i;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),u=e(a,"div");r=u?e:n}else r=o;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};
2655e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];
2655if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.
2655concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete v[n],delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):"object"==typeof exports?module.exports=s(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;
2655return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):"object"==typeof exports?module.exports=i(require("../layout-mode"),require("masonry-layout")):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];
2655if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e 2656},d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){function e(){o.reveal(i.needReveal),o.hide(i.needHide)}this.option(t),this._getIsInstant();var i=this._filter(this.items);this.filteredItems=i.matches;var o=this;this._isInstant?this._noTransition(e):e(),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],r=this._getFilterTest(e),s=0,a=t.length;a>s;s++){var u=t[s];if(!u.isIgnored){var p=r(u);
2656p&&i.push(u),p&&u.isHidden?o.push(u):p||u.isHidden||n.push(u)}}return{matches:i,needReveal:o,needHide:n}},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){var e;t?(t=o(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},d.prototype._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e).matches;for(i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):"object"==typeof exports?module.exports=r(require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window); 2657/*! 2658 * jScrollPane - v2.0.19 - 2013-11-16 2659 * http://jscrollpane.kelvinluck.com/ 2660 * 2661 * Copyright (c) 2013 Kelvin Luck 2662 * Dual licensed under the MIT or GPL licenses. 2663 */ 2664!function(a,b,c){a.fn.jScrollPane=function(d){function e(d,e){function f(b){var e,h,j,l,m,n,q=!1,r=!1;if(P=b,Q===c)m=d.scrollTop(),n=d.scrollLeft(),d.css({overflow:"hidden",padding:0}),R=d.innerWidth()+tb,S=d.innerHeight(),d.width(R),Q=a('<div class="jspPane" />').css("padding",sb).append(d.children()),T=a('<div class="jspContainer" />').css({width:R+"px",height:S+"px"}).append(Q).appendTo(d);else{if(d.css("width",""),q=P.stickToBottom&&C(),r=P.stickToRight&&D(),l=d.innerWidth()+tb!=R||d.outerHeight()!=S,l&&(R=d.innerWidth()+tb,S=d.innerHeight(),T.css({width:R+"px",height:S+"px"})),!l&&ub==U&&Q.outerHeight()==V)return d.width(R),void 0;ub=U,Q.css("width",""),d.width(R),T.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Q.css("overflow","auto"),U=b.contentWidth?b.contentWidth:Q[0].scrollWidth,
2664V=Q[0].scrollHeight,Q.css("overflow",""),W=U/R,X=V/S,Y=X>1,Z=W>1,Z||Y?(d.addClass("jspScrollable"),e=P.maintainPosition&&(ab||db),e&&(h=A(),j=B()),g(),i(),k(),e&&(y(r?U-R:h,!1),x(q?V-S:j,!1)),H(),E(),N(),P.enableKeyboardNavigation&&J(),P.clickOnTrack&&o(),L(),P.hijackInternalLinks&&M()):(d.removeClass("jspScrollable"),Q.css({top:0,left:0,width:T.width()-tb}),F(),I(),K(),p()),P.autoReinitialise&&!rb?rb=setInterval(function(){f(P)},P.autoReinitialiseDelay):!P.autoReinitialise&&rb&&clearInterval(rb),m&&d.scrollTop(0)&&x(m,!1),n&&d.scrollLeft(0)&&y(n,!1),d.trigger("jsp-initialised",[Z||Y])}function g(){Y&&(T.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),eb=T.find(">.jspVerticalBar"),fb=eb.find(">.jspTrack"),$=fb.find(">.jspDrag"),P.showArrows&&(jb=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",m(0,-1)).bind("click.jsp",G),kb=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",m(0,1)).bind("click.jsp",G),P.arrowScrollOnHover&&(jb.bind("mouseover.jsp",m(0,-1,jb)),kb.bind("mouseover.jsp",m(0,1,kb))),l(fb,P.verticalArrowPositions,jb,kb)),hb=S,T.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){hb-=a(this).outerHeight()}),$.hover(function(){$.addClass("jspHover")},function(){$.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),$.addClass("jspActive");var c=b.pageY-$.position().top;return a("html").bind("mousemove.jsp",function(a){r(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),h())}function h(){fb.height(hb+"px"),ab=0,gb=P.verticalGutter+fb.outerWidth(),Q.width(R-gb-tb);try{0===eb.position().left&&Q.css("margin-left",gb+"px")}catch(a){}}function i(){Z&&(T.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />'))),lb=T.find(">.jspHorizontalBar"),mb=lb.find(">.jspTrack"),bb=mb.find(">.jspDrag"),P.showArrows&&(pb=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",m(-1,0)).bind("click.jsp",G),qb=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",m(1,0)).bind("click.jsp",G),P.arrowScrollOnHover&&(pb.bind("mouseover.jsp",m(-1,0,pb)),qb.bind("mouseover.jsp",m(1,0,qb))),l(mb,P.horizontalArrowPositions,pb,qb)),bb.hover(function(){bb.addClass("jspHover")},function(){bb.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),bb.addClass("jspActive");var c=b.pageX-bb.position().left;return a("html").bind("mousemove.jsp",function(a){t(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),nb=T.innerWidth(),j())}function j(){T.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){nb-=a(this).outerWidth()}),mb.width(nb+"px"),db=0}function k(){if(Z&&Y){var b=mb.outerHeight(),c=fb.outerWidth();hb-=b,a(lb).find(">.jspCap:visible,>.jspArrow").each(function(){nb+=a(this).outerWidth()}),nb-=c,S-=c,R-=b,mb.parent().append(a('<div class="jspCorner" />').css("width",b+"px")),h(),j()}Z&&Q.width(T.outerWidth()-tb+"px"),V=Q.outerHeight(),X=V/S,Z&&(ob=Math.ceil(1/W*nb),ob>P.horizontalDragMaxWidth?ob=P.horizontalDragMaxWidth:ob<P.horizontalDragMinWidth&&(ob=P.horizontalDragMinWidth),bb.width(ob+"px"),cb=nb-ob,u(db)),Y&&(ib=Math.ceil(1/X*hb),ib>P.verticalDragMaxHeight?ib=P.verticalDragMaxHeight:ib<P.verticalDragMinHeight&&(ib=P.verticalDragMinHeight),$.height(ib+"px"),_=hb-ib,s(ab))}function l(a,b,c,d){var e,f="before",g="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split"),b==f?g=b:b==g&&(f=b,e=c,c=d,d=e),a[f](c)[g](d)}function m(a,b,c){return function(){return n(a,b,this,c),this.blur(),!1}}function n(b,c,d,e){d=a(d).addClass("jspActive");var f,g,h=!0,i=function(){0!==b&&vb.scrollByX(b*P.arrowButtonSpeed),0!==c&&vb.scrollByY(c*P.arrowButtonSpeed),g=setTimeout(i,h?P.initialDelay:P.arrowRepeatFreq),h=!1};
2664i(),f=e?"mouseout.jsp":"mouseup.jsp",e=e||a("html"),e.bind(f,function(){d.removeClass("jspActive"),g&&clearTimeout(g),g=null,e.unbind(f)})}function o(){p(),Y&&fb.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d,e=a(this),f=e.offset(),g=b.pageY-f.top-ab,h=!0,i=function(){var a=e.offset(),c=b.pageY-a.top-ib/2,f=S*P.scrollPagePercent,k=_*f/(V-S);if(0>g)ab-k>c?vb.scrollByY(-f):r(c);else{if(!(g>0))return j(),void 0;c>ab+k?vb.scrollByY(f):r(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}}),Z&&mb.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d,e=a(this),f=e.offset(),g=b.pageX-f.left-db,h=!0,i=function(){var a=e.offset(),c=b.pageX-a.left-ob/2,f=R*P.scrollPagePercent,k=cb*f/(U-R);if(0>g)db-k>c?vb.scrollByX(-f):t(c);else{if(!(g>0))return j(),void 0;c>db+k?vb.scrollByX(f):t(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}})}function p(){mb&&mb.unbind("mousedown.jsp"),fb&&fb.unbind("mousedown.jsp")}function q(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),$&&$.removeClass("jspActive"),bb&&bb.removeClass("jspActive")}function r(a,b){Y&&(0>a?a=0:a>_&&(a=_),b===c&&(b=P.animateScroll),b?vb.animate($,"top",a,s):($.css("top",a),s(a)))}function s(a){a===c&&(a=$.position().top),T.scrollTop(0),ab=a;var b=0===ab,e=ab==_,f=a/_,g=-f*(V-S);(wb!=b||yb!=e)&&(wb=b,yb=e,d.trigger("jsp-arrow-change",[wb,yb,xb,zb])),v(b,e),Q.css("top",g),d.trigger("jsp-scroll-y",[-g,b,e]).trigger("scroll")}function t(a,b){Z&&(0>a?a=0:a>cb&&(a=cb),b===c&&(b=P.animateScroll),b?vb.animate(bb,"left",a,u):(bb.css("left",a),u(a)))}function u(a){a===c&&(a=bb.position().left),T.scrollTop(0),db=a;var b=0===db,e=db==cb,f=a/cb,g=-f*(U-R);(xb!=b||zb!=e)&&(xb=b,zb=e,d.trigger("jsp-arrow-change",[wb,yb,xb,zb])),w(b,e),Q.css("left",g),d.trigger("jsp-scroll-x",[-g,b,e]).trigger("scroll")}function v(a,b){P.showArrows&&(jb[a?"addClass":"removeClass"]("jspDisabled"),kb[b?"addClass":"removeClass"]("jspDisabled"))}function w(a,b){P.showArrows&&(pb[a?"addClass":"removeClass"]("jspDisabled"),qb[b?"addClass":"removeClass"]("jspDisabled"))}function x(a,b){var c=a/(V-S);r(c*_,b)}function y(a,b){var c=a/(U-R);t(c*cb,b)}function z(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),T.scrollTop(0),T.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=B(),j=h+S,h>n||c?l=n-P.horizontalGutter:n+f>j&&(l=n-S+f+P.horizontalGutter),isNaN(l)||x(l,d),i=A(),k=i+R,i>o||c?m=o-P.horizontalGutter:o+g>k&&(m=o-R+g+P.horizontalGutter),isNaN(m)||y(m,d)}function A(){return-Q.position().left}function B(){return-Q.position().top}function C(){var a=V-S;return a>20&&a-B()<10}function D(){var a=U-R;return a>20&&a-A()<10}function E(){T.unbind(Bb).bind(Bb,function(a,b,c,d){var e=db,f=ab,g=a.deltaFactor||P.mouseWheelSpeed;return vb.scrollBy(c*g,-d*g,!1),e==db&&f==ab})}function F(){T.unbind(Bb)}function G(){return!1}function H(){Q.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){z(a.target,!1)})}function I(){Q.find(":input,a").unbind("focus.jsp")}function J(){function b(){var a=db,b=ab;switch(c){case 40:vb.scrollByY(P.keyboardSpeed,!1);break;case 38:vb.scrollByY(-P.keyboardSpeed,!1);break;case 34:case 32:vb.scrollByY(S*P.scrollPagePercent,!1);break;case 33:vb.scrollByY(-S*P.scrollPagePercent,!1);break;case 39:vb.scrollByX(P.keyboardSpeed,!1);break;case 37:vb.scrollByX(-P.keyboardSpeed,!1)}return e=a!=db||b!=ab}var c,e,f=[];Z&&f.push(lb[0]),Y&&f.push(eb[0]),Q.focus(function(){d.focus()}),d.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(d){if(d.target===this||f.length&&a(d.target).closest(f).length){var g=db,h=ab;switch(d.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:c=d.keyCode,b();break;case 35:x(V-S),c=null;break;case 36:x(0),c=null}return e=d.keyCode==c&&g!=db||h!=ab,!e}}).bind("keypress.jsp",function(a){return a.keyCode==c&&b(),!e}),P.hideFocus?(d.css("outline","none"),"hideFocus"in T[0]&&d.attr("hideFocus",!0)):(d.css("outline",""),"hideFocus"in T[0]&&d.attr("hideFocus",!1))}function K(){d.attr("tabindex","-1").removeAttr("tabindex").unbind("
2664keydown.jsp keypress.jsp")}function L(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&Q.find(d)&&(0===T.scrollTop()?c=setInterval(function(){T.scrollTop()>0&&(z(b,!0),a(document).scrollTop(T.position().top),clearInterval(c))},50):(z(b,!0),a(document).scrollTop(T.position().top)))}}function M(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate("a[href*=#]","click",function(c){var d,e,f,g,h,i,j=this.href.substr(0,this.href.indexOf("#")),k=location.href;if(-1!==location.href.indexOf("#")&&(k=location.href.substr(0,location.href.indexOf("#"))),j===k){d=escape(this.href.substr(this.href.indexOf("#")+1));try{e=a("#"+d+', a[name="'+d+'"]')}catch(l){return}e.length&&(f=e.closest(".jspScrollable"),g=f.data("jsp"),g.scrollToElement(e,!0),f[0].scrollIntoView&&(h=a(b).scrollTop(),i=e.offset().top,(h>i||i>h+a(b).height())&&f[0].scrollIntoView()),c.preventDefault())}}))}function N(){var a,b,c,d,e,f=!1;T.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=A(),b=B(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=db,j=ab;return vb.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==db&&j==ab}}).bind("touchend.jsp",function(){f=!1}).bind("click.jsp-touchclick",function(){return e?(e=!1,!1):void 0})}function O(){var a=B(),b=A();d.removeClass("jspScrollable").unbind(".jsp"),d.replaceWith(Ab.append(Q.children())),Ab.scrollTop(a),Ab.scrollLeft(b),rb&&clearInterval(rb)}var P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb=this,wb=!0,xb=!0,yb=!1,zb=!1,Ab=d.clone(!1,!1).empty(),Bb=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===d.css("box-sizing")?(sb=0,tb=0):(sb=d.css("paddingTop")+" "+d.css("paddingRight")+" "+d.css("paddingBottom")+" "+d.css("paddingLeft"),tb=(parseInt(d.css("paddingLeft"),10)||0)+(parseInt(d.css("paddingRight"),10)||0)),a.extend(vb,{reinitialise:function(b){b=a.extend({},P,b),f(b)},scrollToElement:function(a,b,c){z(a,b,c)},scrollTo:function(a,b,c){y(a,c),x(b,c)},scrollToX:function(a,b){y(a,b)},scrollToY:function(a,b){x(a,b)},scrollToPercentX:function(a,b){y(a*(U-R),b)},scrollToPercentY:function(a,b){x(a*(V-S),b)},scrollBy:function(a,b,c){vb.scrollByX(a,c),vb.scrollByY(b,c)},scrollByX:function(a,b){var c=A()+Math[0>a?"floor":"ceil"](a),d=c/(U-R);t(d*cb,b)},scrollByY:function(a,b){var c=B()+Math[0>a?"floor":"ceil"](a),d=c/(V-S);r(d*_,b)},positionDragX:function(a,b){t(a,b)},positionDragY:function(a,b){r(a,b)},animate:function(a,b,c,d){var e={};e[b]=c,a.animate(e,{duration:P.animateDuration,easing:P.animateEase,queue:!1,step:d})},getContentPositionX:function(){return A()},getContentPositionY:function(){return B()},getContentWidth:function(){return U},getContentHeight:function(){return V},getPercentScrolledX:function(){return A()/(U-R)},getPercentScrolledY:function(){return B()/(V-S)},getIsScrollableH:function(){return Z},getIsScrollableV:function(){return Y},getContentPane:function(){return Q},scrollToBottom:function(a){r(_,a)},hijackInternalLinks:a.noop,destroy:function(){O()}}),f(e)}return d=a.extend({},a.fn.jScrollPane.defaults,d),a.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){d[this]=d[this]||d.speed}),this.each(function(){var b=a(this),c=b.data("jsp");c?c.reinitialise(d):(a("script",b).filter('[type="text/javascript"],:not([type])').remove(),c=new e(b,d),b.data("jsp",c))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}}(jQuery,this); 2665/* == jquery mousewheel plugin == Version: 3.1.13, License: MIT License (MIT) */ 2666!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1
vendor: 43,671 bytes, lines 2666-2670
2666),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); 2667/* == malihu jquery custom scrollbar plugin == Version: 3.1.3, License: MIT License (MIT) */ 2668!function(e){"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&N(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(V(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&V(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(V(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&V(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),X.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=q.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=Y.call(this,c[0],"y"),c[1]=Y.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=oe()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",V(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",V(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&N(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){{o.data(a)}X.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),X.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),K(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),K(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir="+n.langDir+" /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=ee(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[14]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[15]+"' oncontextmenu='return false;' "+r+" />","<a href='#' class='"+d[16]+"' oncontextmenu='return false;' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(N(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),V(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),V(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),R.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}L.call(this),P.call(this),i.advanced.autoScrollOnFocus&&z.call(this),i.scrollButtons.enable&&H.call(this),i.keyboard.enable&&U.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!W()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),K(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),K(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),K(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=W()&&t.target.ownerDocument!==top.document?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e){var t=m.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}}function o(e,t,o,a){if(m[0].idleTimer=u.scrollInertia<233?250:0,n.attr("id")===h[1])var i="x",r=(n[0].offsetLeft-t+a)*d.scrollRatio.x;else var i="y",r=(n[0].offsetTop-e+o)*d.scrollRatio.y;V(l,r.toString(),{dir:i,drag:!0})}var n,i,r,l=e(this),d=l.data(a),u=d.opt,f=a+"_"+d.idx,h=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],m=e("#mCSB_"+d.idx+"_container"),p=e("#"+h[0]+",#"+h[1]),g=u.advanced.releaseDraggableSelectors?p.add(e(u.advanced.releaseDraggableSelectors)):p,v=u.advanced.extraDraggableSelectors?e(!W()||top.document).add(e(u.advanced.extraDraggableSelectors)):e(!W()||top.document);p.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(o){if(o.stopImmediatePropagation(),o.preventDefault(),Z(o)){c=!0,s&&(document.onselectstart=function(){return!1}),t(!1),N(l),n=e(this);var a=n.offset(),d=O(o)[0]-a.top,f=O(o)[1]-a.left,h=n.height()+a.top,m=n.width()+a.left;h>d&&d>0&&m>f&&f>0&&(i=d,r=f),C(n,"active",u.autoExpandScrollbar)}}).bind("touchmove."+f,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=n.offset(),a=O(e)[0]-t.top,l=O(e)[1]-t.left;o(i,r,a,l)}),e(document).add(v).bind("mousemove."+f+" pointermove."+f+" MSPointerMove."+f,function(e){if(n){var t=n.offset(),a=O(e)[0]-t.top,l=O(e)[1]-t.left;if(i===a&&r===l)return;o(i,r,a,l)}}).add(g).bind("mouseup."+f+" touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(e){n&&(C(n,"active",u.autoExpandScrollbar),n=null),c=!1,s&&(document.onselectstart=null),t(!0)})},D=function(){function o(e){if(!$(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if($(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=G();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),R.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],A,n,"y","all",!0),B.overflowed[1]&&s(w[1],A,n,"x",L,!0)}}function i(e){if(!$(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),N(y),p=G();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],R=[]}function r(e){if($(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=G();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],R[R.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&V(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],R=[],A=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).load(function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,F(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(e){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(e){t||(i&&(i=0,n("off",null)),c=!1)})},R=function(){function t(t,a){if(N(o),!A(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v=t.deltaX||t.deltaY||a;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<2&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),V(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).load(function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},W=function(e){var t=null;if(e){try{var o=e.contentDocument||e.contentWindow.document;t=o.body.innerHTML}catch(a){}return null!==t}try{var o=top.document;t=o.body.innerHTML}catch(a){}return null!==t},A=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},L=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(e){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){N(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-.9*u*l.width()}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-.9*u*l.height()}V(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},z=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(o){var a=e(document.activeElement),i=r.find(".mCustomScrollBox").length,s=0;a.is(n.advanced.autoScrollOnFocus)&&(N(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=i?(s+17)*i:0,t[0]._focusTimeout=setTimeout(function(){var e=[te(a)[0],te(a)[1]],o=[r[0].offsetTop,r[0].offsetLeft],i=[o[0]+e[0]>=0&&o[0]+e[0]<l.height()-a.outerHeight(!1),o[1]+e[1]>=0&&o[0]+e[1]<l.width()-a.outerWidth(!1)],c="yx"!==n.axis||i[0]||i[1]?"all":"none";"x"===n.axis||i[0]||V(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s}),"y"===n.axis||i[1]||V(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s})},t[0]._focusTimer))})},P=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(t){(0!==i.scrollTop()||0!==i.scrollLeft())&&e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,F(t,e,o)}if(a.preventDefault(),Z(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},U=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||F(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){N(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-.9*f*d.width();else var h="y",m=Math.abs(c[0].offsetTop)-.9*f*d.height();V(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;V(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).load(function(){W(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},F=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*d[1]*n:s[0]+f.dir[1]*d[0]*n,v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=e?!0:!1;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),V(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),K(f,"step"),N(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type?!0:!1,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],N(t),ee(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},q=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},Y=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1):l.outerHeight(!1),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?te(m)[1]:te(m)[0];case"string":case"number":if(ee(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&ee(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?te(m)[1]:te(m)[0]}return e(t).length?"x"===o?te(e(t))[1]:te(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},X=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange); 2669 2670return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void K(f[0],"autoUpdate")):void o()},j=function(e,t,o){return Math.round(e/t)*t-o},N=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){J.call(this)})},V=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?q.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?q.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,(0!==m.scrollTop()||0!==m.scrollLeft())&&(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=j(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),Q(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),(s.tweenRunning||!(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0]))&&Q(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},Q=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=G()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=G(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},G=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},J=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},K=function(e,t){try{delete e[t]}catch(o){e[t]=null}},Z=function(e){return!(e.which&&1!==e.which)},$=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},ee=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},te=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},oe=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1
2670)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).load(function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+te(n)[0]>=0&&a[0]+te(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+te(n)[1]>=0&&a[1]+te(n)[1]<o.width()-n.outerWidth(!1)},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})}); 2671/* 2672== malihu jquery custom scrollbar plugin == 2673Version: 3.1.3 2674Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller 2675Author: malihu 2676Author URI: http://manos.malihu.gr 2677License: MIT License (MIT) 2678*/ 2679 2680/* 2681Copyright Manos Malihutsakis (email: [email protected]) 2682 2683Permission is hereby granted, free of charge, to any person obtaining a copy 2684of this software and associated documentation files (the "Software"), to deal 2685in the Software without restriction, including without limitation the rights 2686to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 2687copies of the Software, and to permit persons to whom the Software is 2688furnished to do so, subject to the following conditions: 2689 2690The above copyright notice and this permission notice shall be included in 2691all copies or substantial portions of the Software. 2692 2693THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2694IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2695FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2696AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2697LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2698OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 2699THE SOFTWARE. 2700*/ 2701 2702/* 2703The code below is fairly long, fully commented and should be normally used in development. 2704For production, use either the minified jquery.mCustomScrollbar.min.js script or 2705the production-ready jquery.mCustomScrollbar.concat.min.js which contains the plugin 2706and dependencies (minified). 2707*/ 2708 2709(function(factory){ 2710 if(typeof module!=="undefined" && module.exports){ 2711 module.exports=factory; 2712 }else{ 2713 factory(jQuery,window,document); 2714 } 2715}(function($){ 2716(function(init){ 2717 var _rjs=typeof define==="function" && define.amd, /* RequireJS */ 2718 _njs=typeof module !== "undefined" && module.exports, /* NodeJS */ 2719 _dlp=("https:"==document.location.protocol) ? "https:" : "http:", /* location protocol */ 2720 _url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"; 2721 if(!_rjs){ 2722 if(_njs){ 2723 require("jquery-mousewheel")($); 2724 }else{ 2725 /* load jquery-mousewheel plugin (via CDN) if it's not present or not loaded via RequireJS 2726 (works when mCustomScrollbar fn is called on window load) */ 2727 $.event.special.mousewheel || $("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E")); 2728 } 2729 } 2730 init(); 2731}(function(){ 2732 2733 /* 2734 ---------------------------------------- 2735 PLUGIN NAMESPACE, PREFIX, DEFAULT SELECTOR(S) 2736 ---------------------------------------- 2737 */ 2738 2739 var pluginNS="
vendor: 26,808 bytes, lines 2739-3533
2739", 2740 pluginPfx="mCS", 2741 defaultSelector=".mCustomScrollbar", 2742 2743 2744 2745 2746 2747 /* 2748 ---------------------------------------- 2749 DEFAULT OPTIONS 2750 ---------------------------------------- 2751 */ 2752 2753 defaults={ 2754 /* 2755 set element/content width/height programmatically 2756 values: boolean, pixels, percentage 2757 option default 2758 ------------------------------------- 2759 setWidth false 2760 setHeight false 2761 */ 2762 /* 2763 set the initial css top property of content 2764 values: string (e.g. "-100px", "10%" etc.) 2765 */ 2766 setTop:0, 2767 /* 2768 set the initial css left property of content 2769 values: string (e.g. "-100px", "10%" etc.) 2770 */ 2771 setLeft:0, 2772 /* 2773 scrollbar axis (vertical and/or horizontal scrollbars) 2774 values (string): "y", "x", "yx" 2775 */ 2776 axis:"y", 2777 /* 2778 position of scrollbar relative to content 2779 values (string): "inside", "outside" ("outside" requires elements with position:relative) 2780 */ 2781 scrollbarPosition:"inside", 2782 /* 2783 scrolling inertia 2784 values: integer (milliseconds) 2785 */ 2786 scrollInertia:950, 2787 /* 2788 auto-adjust scrollbar dragger length 2789 values: boolean 2790 */ 2791 autoDraggerLength:true, 2792 /* 2793 auto-hide scrollbar when idle 2794 values: boolean 2795 option default 2796 ------------------------------------- 2797 autoHideScrollbar false 2798 */ 2799 /* 2800 auto-expands scrollbar on mouse-over and dragging 2801 values: boolean 2802 option default 2803 ------------------------------------- 2804 autoExpandScrollbar false 2805 */ 2806 /* 2807 always show scrollbar, even when there's nothing to scroll 2808 values: integer (0=disable, 1=always show dragger rail and buttons, 2=always show dragger rail, dragger and buttons), boolean 2809 */ 2810 alwaysShowScrollbar:0, 2811 /* 2812 scrolling always snaps to a multiple of this number in pixels 2813 values: integer, array ([y,x]) 2814 option default 2815 ------------------------------------- 2816 snapAmount null 2817 */ 2818 /* 2819 when snapping, snap with this number in pixels as an offset 2820 values: integer 2821 */ 2822 snapOffset:0, 2823 /* 2824 mouse-wheel scrolling 2825 */ 2826 mouseWheel:{ 2827 /* 2828 enable mouse-wheel scrolling 2829 values: boolean 2830 */ 2831 enable:true, 2832 /* 2833 scrolling amount in pixels 2834 values: "auto", integer 2835 */ 2836 scrollAmount:"auto", 2837 /* 2838 mouse-wheel scrolling axis 2839 the default scrolling direction when both vertical and horizontal scrollbars are present 2840 values (string): "y", "x" 2841 */ 2842 axis:"y", 2843 /* 2844 prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached 2845 values: boolean 2846 option default 2847 ------------------------------------- 2848 preventDefault null 2849 */ 2850 /* 2851 the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. 2852 values: "auto", integer 2853 "auto" uses the default OS/browser value 2854 */ 2855 deltaFactor:"auto", 2856 /* 2857 normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) 2858 values: boolean 2859 option default 2860 ------------------------------------- 2861 normalizeDelta null 2862 */ 2863 /* 2864 invert mouse-wheel scrolling direction 2865 values: boolean 2866 option default 2867 ------------------------------------- 2868 invert null 2869 */ 2870 /* 2871 the tags that disable mouse-wheel when cursor is over them 2872 */ 2873 disableOver:["select","option","keygen","datalist","textarea"] 2874 }, 2875 /* 2876 scrollbar buttons 2877 */ 2878 scrollButtons:{ 2879 /* 2880 enable scrollbar buttons 2881 values: boolean 2882 option default 2883 ------------------------------------- 2884 enable null 2885 */ 2886 /* 2887 scrollbar buttons scrolling type 2888 values (string): "stepless", "stepped" 2889 */ 2890 scrollType:"stepless", 2891 /* 2892 scrolling amount in pixels 2893 values: "auto", integer 2894 */ 2895 scrollAmount:"auto" 2896 /* 2897 tabindex of the scrollbar buttons 2898 values: false, integer 2899 option default 2900 ------------------------------------- 2901 tabindex null 2902 */ 2903 }, 2904 /* 2905 keyboard scrolling 2906 */ 2907 keyboard:{ 2908 /* 2909 enable scrolling via keyboard 2910 values: boolean 2911 */ 2912 enable:true, 2913 /* 2914 keyboard scrolling type 2915 values (string): "stepless", "stepped" 2916 */ 2917 scrollType:"stepless", 2918 /* 2919 scrolling amount in pixels 2920 values: "auto", integer 2921 */ 2922 scrollAmount:"auto" 2923 }, 2924 /* 2925 enable content touch-swipe scrolling 2926 values: boolean, integer, string (number) 2927 integer values define the axis-specific minimum amount required for scrolling momentum 2928 */ 2929 contentTouchScroll:25, 2930 /* 2931 enable/disable document (default) touch-swipe scrolling 2932 */ 2933 documentTouchScroll:true, 2934 /* 2935 advanced option parameters 2936 */ 2937 advanced:{ 2938 /* 2939 auto-expand content horizontally (for "x" or "yx" axis) 2940 values: boolean, integer (the value 2 forces the non scrollHeight/scrollWidth method, the value 3 forces the scrollHeight/scrollWidth method) 2941 option default 2942 ------------------------------------- 2943 autoExpandHorizontalScroll null 2944 */ 2945 /* 2946 auto-scroll to elements with focus 2947 */ 2948 autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", 2949 /* 2950 auto-update scrollbars on content, element or viewport resize 2951 should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. 2952 values: boolean 2953 */ 2954 updateOnContentResize:true, 2955 /* 2956 auto-update scrollbars each time each image inside the element is fully loaded 2957 values: "auto", boolean 2958 */ 2959 updateOnImageLoad:"auto", 2960 /* 2961 auto-update scrollbars based on the amount and size changes of specific selectors 2962 useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size 2963 values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) 2964 a value of true (boolean) will auto-update scrollbars each time any element is changed 2965 option default 2966 ------------------------------------- 2967 updateOnSelectorChange null 2968 */ 2969 /* 2970 extra selectors that'll allow scrollbar dragging upon mousemove/up, pointermove/up, touchend etc. (e.g. "selector-1, selector-2") 2971 option default 2972 ------------------------------------- 2973 extraDraggableSelectors null 2974 */ 2975 /* 2976 extra selectors that'll release scrollbar dragging upon mouseup, pointerup, touchend etc. (e.g. "selector-1, selector-2") 2977 option default 2978 ------------------------------------- 2979 releaseDraggableSelectors null 2980 */ 2981 /* 2982 auto-update timeout 2983 values: integer (milliseconds) 2984 */ 2985 autoUpdateTimeout:60 2986 }, 2987 /* 2988 scrollbar theme 2989 values: string (see CSS/plugin URI for a list of ready-to-use themes) 2990 */ 2991 theme:"light", 2992 /* 2993 user defined callback functions 2994 */ 2995 callbacks:{ 2996 /* 2997 Available callbacks: 2998 callback default 2999 ------------------------------------- 3000 onCreate null 3001 onInit null 3002 onScrollStart null 3003 onScroll null 3004 onTotalScroll null 3005 onTotalScrollBack null 3006 whileScrolling null 3007 onOverflowY null 3008 onOverflowX null 3009 onOverflowYNone null 3010 onOverflowXNone null 3011 onImageLoad null 3012 onSelectorChange null 3013 onBeforeUpdate null 3014 onUpdate null 3015 */ 3016 onTotalScrollOffset:0, 3017 onTotalScrollBackOffset:0, 3018 alwaysTriggerOffsets:true 3019 } 3020 /* 3021 add scrollbar(s) on all elements matching the current selector, now and in the future 3022 values: boolean, string 3023 string values: "on" (enable), "once" (disable after first invocation), "off" (disable) 3024 liveSelector values: string (selector) 3025 option default 3026 ------------------------------------- 3027 live false 3028 liveSelector null 3029 */ 3030 }, 3031 3032 3033 3034 3035 3036 /* 3037 ---------------------------------------- 3038 VARS, CONSTANTS 3039 ---------------------------------------- 3040 */ 3041 3042 totalInstances=0, /* plugin instances amount */ 3043 liveTimers={}, /* live option timers */ 3044 oldIE=(window.attachEvent && !window.addEventListener) ? 1 : 0, /* detect IE < 9 */ 3045 touchActive=false,touchable, /* global touch vars (for touch and pointer events) */ 3046 /* general plugin classes */ 3047 classes=[ 3048 "mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar", 3049 "mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer", 3050 "mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight" 3051 ], 3052 3053 3054 3055 3056 3057 /* 3058 ---------------------------------------- 3059 METHODS 3060 ---------------------------------------- 3061 */ 3062 3063 methods={ 3064 3065 /* 3066 plugin initialization method 3067 creates the scrollbar(s), plugin data object and options 3068 ---------------------------------------- 3069 */ 3070 3071 init:function(options){ 3072 3073 var options=$.extend(true,{},defaults,options), 3074 selector=_selector.call(this); /* validate selector */ 3075 3076 /* 3077 if live option is enabled, monitor for elements matching the current selector and 3078 apply scrollbar(s) when found (now and in the future) 3079 */ 3080 if(options.live){ 3081 var liveSelector=options.liveSelector || this.selector || defaultSelector, /* live selector(s) */ 3082 $liveSelector=$(liveSelector); /* live selector(s) as jquery object */ 3083 if(options.live==="off"){ 3084 /* 3085 disable live if requested 3086 usage: $(selector).mCustomScrollbar({live:"off"}); 3087 */ 3088 removeLiveTimers(liveSelector); 3089 return; 3090 } 3091 liveTimers[liveSelector]=setTimeout(function(){ 3092 /* call mCustomScrollbar fn on live selector(s) every half-second */ 3093 $liveSelector.mCustomScrollbar(options); 3094 if(options.live==="once" && $liveSelector.length){ 3095 /* disable live after first invocation */ 3096 removeLiveTimers(liveSelector); 3097 } 3098 },500); 3099 }else{ 3100 removeLiveTimers(liveSelector); 3101 } 3102 3103 /* options backward compatibility (for versions < 3.0.0) and normalization */ 3104 options.setWidth=(options.set_width) ? options.set_width : options.setWidth; 3105 options.setHeight=(options.set_height) ? options.set_height : options.setHeight; 3106 options.axis=(options.horizontalScroll) ? "x" : _findAxis(options.axis); 3107 options.scrollInertia=options.scrollInertia>0 && options.scrollInertia<17 ? 17 : options.scrollInertia; 3108 if(typeof options.mouseWheel!=="object" && options.mouseWheel==true){ /* old school mouseWheel option (non-object) */ 3109 options.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false} 3110 } 3111 options.mouseWheel.scrollAmount=!options.mouseWheelPixels ? options.mouseWheel.scrollAmount : options.mouseWheelPixels; 3112 options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta ? options.mouseWheel.normalizeDelta : options.advanced.normalizeMouseWheelDelta; 3113 options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType); 3114 3115 _theme(options); /* theme-specific options */ 3116 3117 /* plugin constructor */ 3118 return $(selector).each(function(){ 3119 3120 var $this=$(this); 3121 3122 if(!$this.data(pluginPfx)){ /* prevent multiple instantiations */ 3123 3124 /* store options and create objects in jquery data */ 3125 $this.data(pluginPfx,{ 3126 idx:++totalInstances, /* instance index */ 3127 opt:options, /* options */ 3128 scrollRatio:{y:null,x:null}, /* scrollbar to content ratio */ 3129 overflowed:null, /* overflowed axis */ 3130 contentReset:{y:null,x:null}, /* object to check when content resets */ 3131 bindEvents:false, /* object to check if events are bound */ 3132 tweenRunning:false, /* object to check if tween is running */ 3133 sequential:{}, /* sequential scrolling object */ 3134 langDir:$this.css("direction"), /* detect/store direction (ltr or rtl) */ 3135 cbOffsets:null, /* object to check whether callback offsets always trigger */ 3136 /* 3137 object to check how scrolling events where last triggered 3138 "internal" (default - triggered by this script), "external" (triggered by other scripts, e.g. via scrollTo method) 3139 usage: object.data("mCS").trigger 3140 */ 3141 trigger:null, 3142 /* 3143 object to check for changes in elements in order to call the update method automatically 3144 */ 3145 poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}} 3146 }); 3147 3148 var d=$this.data(pluginPfx),o=d.opt, 3149 /* HTML data attributes */ 3150 htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme"); 3151 3152 if(htmlDataAxis){o.axis=htmlDataAxis;} /* usage example: data-mcs-axis="y" */ 3153 if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos;} /* usage example: data-mcs-scrollbar-position="outside" */ 3154 if(htmlDataTheme){ /* usage example: data-mcs-theme="minimal" */ 3155 o.theme=htmlDataTheme; 3156 _theme(o); /* theme-specific options */ 3157 } 3158 3159 _pluginMarkup.call(this); /* add plugin markup */ 3160 3161 if(d && o.callbacks.onCreate && typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this);} /* callbacks: onCreate */ 3162 3163 $("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]); /* flag loaded images */ 3164 3165 methods.update.call(null,$this); /* call the update method */ 3166 3167 } 3168 3169 }); 3170 3171 }, 3172 /* ---------------------------------------- */ 3173 3174 3175 3176 /* 3177 plugin update method 3178 updates content and scrollbar(s) values, events and status 3179 ---------------------------------------- 3180 usage: $(selector).mCustomScrollbar("update"); 3181 */ 3182 3183 update:function(el,cb){ 3184 3185 var selector=el || _selector.call(this); /* validate selector */ 3186 3187 return $(selector).each(function(){ 3188 3189 var $this=$(this); 3190 3191 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 3192 3193 var d=$this.data(pluginPfx),o=d.opt, 3194 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3195 mCustomScrollBox=$("#mCSB_"+d.idx), 3196 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 3197 3198 if(!mCSB_container.length){return;} 3199 3200 if(d.tweenRunning){_stop($this);} /* stop any running tweens while updating */ 3201 3202 if(cb && d && o.callbacks.onBeforeUpdate && typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this);} /* callbacks: onBeforeUpdate */ 3203 3204 /* if element was disabled or destroyed, remove class(es) */ 3205 if($this.hasClass(classes[3])){$this.removeClass(classes[3]);} 3206 if($this.hasClass(classes[4])){$this.removeClass(classes[4]);} 3207 3208 /* css flexbox fix, detect/set max-height */ 3209 mCustomScrollBox.css("max-height","none"); 3210 if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height());} 3211 3212 _expandContentHorizontally.call(this); /* expand content horizontally */ 3213 3214 if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ 3215 mCSB_container.css("width",_contentWidth(mCSB_container)); 3216 } 3217 3218 d.overflowed=_overflowed.call(this); /* determine if scrolling is required */ 3219 3220 _scrollbarVisibility.call(this); /* show/hide scrollbar(s) */ 3221 3222 /* auto-adjust scrollbar dragger length analogous to content */ 3223 if(o.autoDraggerLength){_setDraggerLength.call(this);} 3224 3225 _scrollRatio.call(this); /* calculate and store scrollbar to content ratio */ 3226 3227 _bindEvents.call(this); /* bind scrollbar events */ 3228 3229 /* reset scrolling position and/or events */ 3230 var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)]; 3231 if(o.axis!=="x"){ /* y/yx axis */ 3232 if(!d.overflowed[0]){ /* y scrolling is not required */ 3233 _resetContentPosition.call(this); /* reset content position */ 3234 if(o.axis==="y"){ 3235 _unbindEvents.call(this); 3236 }else if(o.axis==="yx" && d.overflowed[1]){ 3237 _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); 3238 } 3239 }else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){ 3240 _resetContentPosition.call(this); /* reset content position */ 3241 }else{ /* y scrolling is required */ 3242 _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); 3243 d.contentReset.y=null; 3244 } 3245 } 3246 if(o.axis!=="y"){ /* x/yx axis */ 3247 if(!d.overflowed[1]){ /* x scrolling is not required */ 3248 _resetContentPosition.call(this); /* reset content position */ 3249 if(o.axis==="x"){ 3250 _unbindEvents.call(this); 3251 }else if(o.axis==="yx" && d.overflowed[0]){ 3252 _scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"}); 3253 } 3254 }else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){ 3255 _resetContentPosition.call(this); /* reset content position */ 3256 }else{ /* x scrolling is required */ 3257 _scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"}); 3258 d.contentReset.x=null; 3259 } 3260 } 3261 3262 /* callbacks: onImageLoad, onSelectorChange, onUpdate */ 3263 if(cb && d){ 3264 if(cb===2 && o.callbacks.onImageLoad && typeof o.callbacks.onImageLoad==="function"){ 3265 o.callbacks.onImageLoad.call(this); 3266 }else if(cb===3 && o.callbacks.onSelectorChange && typeof o.callbacks.onSelectorChange==="function"){ 3267 o.callbacks.onSelectorChange.call(this); 3268 }else if(o.callbacks.onUpdate && typeof o.callbacks.onUpdate==="function"){ 3269 o.callbacks.onUpdate.call(this); 3270 } 3271 } 3272 3273 _autoUpdate.call(this); /* initialize automatic updating (for dynamic content, fluid layouts etc.) */ 3274 3275 } 3276 3277 }); 3278 3279 }, 3280 /* ---------------------------------------- */ 3281 3282 3283 3284 /* 3285 plugin scrollTo method 3286 triggers a scrolling event to a specific value 3287 ---------------------------------------- 3288 usage: $(selector).mCustomScrollbar("scrollTo",value,options); 3289 */ 3290 3291 scrollTo:function(val,options){ 3292 3293 /* prevent silly things like $(selector).mCustomScrollbar("scrollTo",undefined); */ 3294 if(typeof val=="undefined" || val==null){return;} 3295 3296 var selector=_selector.call(this); /* validate selector */ 3297 3298 return $(selector).each(function(){ 3299 3300 var $this=$(this); 3301 3302 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 3303 3304 var d=$this.data(pluginPfx),o=d.opt, 3305 /* method default options */ 3306 methodDefaults={ 3307 trigger:"external", /* method is by default triggered externally (e.g. from other scripts) */ 3308 scrollInertia:o.scrollInertia, /* scrolling inertia (animation duration) */ 3309 scrollEasing:"mcsEaseInOut", /* animation easing */ 3310 moveDragger:false, /* move dragger instead of content */ 3311 timeout:60, /* scroll-to delay */ 3312 callbacks:true, /* enable/disable callbacks */ 3313 onStart:true, 3314 onUpdate:true, 3315 onComplete:true 3316 }, 3317 methodOptions=$.extend(true,{},methodDefaults,options), 3318 to=_arr.call(this,val),dur=methodOptions.scrollInertia>0 && methodOptions.scrollInertia<17 ? 17 : methodOptions.scrollInertia; 3319 3320 /* translate yx values to actual scroll-to positions */ 3321 to[0]=_to.call(this,to[0],"y"); 3322 to[1]=_to.call(this,to[1],"x"); 3323 3324 /* 3325 check if scroll-to value moves the dragger instead of content. 3326 Only pixel values apply on dragger (e.g. 100, "100px", "-=100" etc.) 3327 */ 3328 if(methodOptions.moveDragger){ 3329 to[0]*=d.scrollRatio.y; 3330 to[1]*=d.scrollRatio.x; 3331 } 3332 3333 methodOptions.dur=_isTabHidden() ? 0 : dur; //skip animations if browser tab is hidden 3334 3335 setTimeout(function(){ 3336 /* do the scrolling */ 3337 if(to[0]!==null && typeof to[0]!=="undefined" && o.axis!=="x" && d.overflowed[0]){ /* scroll y */ 3338 methodOptions.dir="y"; 3339 methodOptions.overwrite="all"; 3340 _scrollTo($this,to[0].toString(),methodOptions); 3341 } 3342 if(to[1]!==null && typeof to[1]!=="undefined" && o.axis!=="y" && d.overflowed[1]){ /* scroll x */ 3343 methodOptions.dir="x"; 3344 methodOptions.overwrite="none"; 3345 _scrollTo($this,to[1].toString(),methodOptions); 3346 } 3347 },methodOptions.timeout); 3348 3349 } 3350 3351 }); 3352 3353 }, 3354 /* ---------------------------------------- */ 3355 3356 3357 3358 /* 3359 plugin stop method 3360 stops scrolling animation 3361 ---------------------------------------- 3362 usage: $(selector).mCustomScrollbar("stop"); 3363 */ 3364 stop:function(){ 3365 3366 var selector=_selector.call(this); /* validate selector */ 3367 3368 return $(selector).each(function(){ 3369 3370 var $this=$(this); 3371 3372 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 3373 3374 _stop($this); 3375 3376 } 3377 3378 }); 3379 3380 }, 3381 /* ---------------------------------------- */ 3382 3383 3384 3385 /* 3386 plugin disable method 3387 temporarily disables the scrollbar(s) 3388 ---------------------------------------- 3389 usage: $(selector).mCustomScrollbar("disable",reset); 3390 reset (boolean): resets content position to 0 3391 */ 3392 disable:function(r){ 3393 3394 var selector=_selector.call(this); /* validate selector */ 3395 3396 return $(selector).each(function(){ 3397 3398 var $this=$(this); 3399 3400 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 3401 3402 var d=$this.data(pluginPfx); 3403 3404 _autoUpdate.call(this,"remove"); /* remove automatic updating */ 3405 3406 _unbindEvents.call(this); /* unbind events */ 3407 3408 if(r){_resetContentPosition.call(this);} /* reset content position */ 3409 3410 _scrollbarVisibility.call(this,true); /* show/hide scrollbar(s) */ 3411 3412 $this.addClass(classes[3]); /* add disable class */ 3413 3414 } 3415 3416 }); 3417 3418 }, 3419 /* ---------------------------------------- */ 3420 3421 3422 3423 /* 3424 plugin destroy method 3425 completely removes the scrollbar(s) and returns the element to its original state 3426 ---------------------------------------- 3427 usage: $(selector).mCustomScrollbar("destroy"); 3428 */ 3429 destroy:function(){ 3430 3431 var selector=_selector.call(this); /* validate selector */ 3432 3433 return $(selector).each(function(){ 3434 3435 var $this=$(this); 3436 3437 if($this.data(pluginPfx)){ /* check if plugin has initialized */ 3438 3439 var d=$this.data(pluginPfx),o=d.opt, 3440 mCustomScrollBox=$("#mCSB_"+d.idx), 3441 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3442 scrollbar=$(".mCSB_"+d.idx+"_scrollbar"); 3443 3444 if(o.live){removeLiveTimers(o.liveSelector || $(selector).selector);} /* remove live timers */ 3445 3446 _autoUpdate.call(this,"remove"); /* remove automatic updating */ 3447 3448 _unbindEvents.call(this); /* unbind events */ 3449 3450 _resetContentPosition.call(this); /* reset content position */ 3451 3452 $this.removeData(pluginPfx); /* remove plugin data object */ 3453 3454 _delete(this,"mcs"); /* delete callbacks object */ 3455 3456 /* remove plugin markup */ 3457 scrollbar.remove(); /* remove scrollbar(s) first (those can be either inside or outside plugin's inner wrapper) */ 3458 mCSB_container.find("img."+classes[2]).removeClass(classes[2]); /* remove loaded images flag */ 3459 mCustomScrollBox.replaceWith(mCSB_container.contents()); /* replace plugin's inner wrapper with the original content */ 3460 /* remove plugin classes from the element and add destroy class */ 3461 $this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4]); 3462 3463 } 3464 3465 }); 3466 3467 } 3468 /* ---------------------------------------- */ 3469 3470 }, 3471 3472 3473 3474 3475 3476 /* 3477 ---------------------------------------- 3478 FUNCTIONS 3479 ---------------------------------------- 3480 */ 3481 3482 /* validates selector (if selector is invalid or undefined uses the default one) */ 3483 _selector=function(){ 3484 return (typeof $(this)!=="object" || $(this).length<1) ? defaultSelector : this; 3485 }, 3486 /* -------------------- */ 3487 3488 3489 /* changes options according to theme */ 3490 _theme=function(obj){ 3491 var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"], 3492 nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"], 3493 disabledScrollButtonsThemes=["minimal","minimal-dark"], 3494 enabledAutoHideScrollbarThemes=["minimal","minimal-dark"], 3495 scrollbarPositionOutsideThemes=["minimal","minimal-dark"]; 3496 obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes) > -1 ? false : obj.autoDraggerLength; 3497 obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes) > -1 ? false : obj.autoExpandScrollbar; 3498 obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes) > -1 ? false : obj.scrollButtons.enable; 3499 obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes) > -1 ? true : obj.autoHideScrollbar; 3500 obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes) > -1 ? "outside" : obj.scrollbarPosition; 3501 }, 3502 /* -------------------- */ 3503 3504 3505 /* live option timers removal */ 3506 removeLiveTimers=function(selector){ 3507 if(liveTimers[selector]){ 3508 clearTimeout(liveTimers[selector]); 3509 _delete(liveTimers,selector); 3510 } 3511 }, 3512 /* -------------------- */ 3513 3514 3515 /* normalizes axis option to valid values: "y", "x", "yx" */ 3516 _findAxis=function(val){ 3517 return (val==="yx" || val==="xy" || val==="auto") ? "yx" : (val==="x" || val==="horizontal") ? "x" : "y"; 3518 }, 3519 /* -------------------- */ 3520 3521 3522 /* normalizes scrollButtons.scrollType option to valid values: "stepless", "stepped" */ 3523 _findScrollButtonsType=function(val){ 3524 return (val==="stepped" || val==="pixels" || val==="step" || val==="click") ? "stepped" : "stepless"; 3525 }, 3526 /* -------------------- */ 3527 3528 3529 /* generates plugin markup */ 3530 _pluginMarkup=function(){ 3531 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3532 expandClass=o.autoExpandScrollbar ? " "+classes[1]+"_expand" : "", 3533 scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'
3533 oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"], 3534 wrapperClass=o.axis==="yx" ? "mCSB_vertical_horizontal" : o.axis==="x" ? "mCSB_horizontal" : "mCSB_vertical", 3535 scrollbars=o.axis==="yx" ? scrollbar[0]+scrollbar[1] : o.axis==="x" ? scrollbar[1] : scrollbar[0], 3536 contentWrapper=o.axis==="yx" ? "<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />" : "", 3537 autoHideClass=o.autoHideScrollbar ? " "+classes[6] : "", 3538 scrollbarDirClass=(o.axis!=="x" && d.langDir==="rtl") ? " "+classes[7] : ""; 3539 if(o.setWidth){$this.css("width",o.setWidth);} /* set element width */ 3540 if(o.setHeight){$this.css("height",o.setHeight);} /* set element height */ 3541 o.setLeft=(o.axis!=="y" && d.langDir==="rtl") ? "989999px" : o.setLeft; /* adjust left position for rtl direction */ 3542 $this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='m
vendor: 9,917 bytes, lines 3542-3768
3542CSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir="+d.langDir+" /></div>"); 3543 var mCustomScrollBox=$("#mCSB_"+d.idx), 3544 mCSB_container=$("#mCSB_"+d.idx+"_container"); 3545 if(o.axis!=="y" && !o.advanced.autoExpandHorizontalScroll){ 3546 mCSB_container.css("width",_contentWidth(mCSB_container)); 3547 } 3548 if(o.scrollbarPosition==="outside"){ 3549 if($this.css("position")==="static"){ /* requires elements with non-static position */ 3550 $this.css("position","relative"); 3551 } 3552 $this.css("overflow","visible"); 3553 mCustomScrollBox.addClass("mCSB_outside").after(scrollbars); 3554 }else{ 3555 mCustomScrollBox.addClass("mCSB_inside").append(scrollbars); 3556 mCSB_container.wrap(contentWrapper); 3557 } 3558 _scrollButtons.call(this); /* add scrollbar buttons */ 3559 /* minimum dragger length */ 3560 var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 3561 mCSB_dragger[0].css("min-height",mCSB_dragger[0].height()); 3562 mCSB_dragger[1].css("min-width",mCSB_dragger[1].width()); 3563 }, 3564 /* -------------------- */ 3565 3566 3567 /* calculates content width */ 3568 _contentWidth=function(el){ 3569 var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(true);}).get())],w=el.parent().width(); 3570 return val[0]>w ? val[0] : val[1]>w ? val[1] : "100%"; 3571 }, 3572 /* -------------------- */ 3573 3574 3575 /* expands content horizontally */ 3576 _expandContentHorizontally=function(){ 3577 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3578 mCSB_container=$("#mCSB_"+d.idx+"_container"); 3579 if(o.advanced.autoExpandHorizontalScroll && o.axis!=="y"){ 3580 /* calculate scrollWidth */ 3581 mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"}); 3582 var w=Math.ceil(mCSB_container[0].scrollWidth); 3583 if(o.advanced.autoExpandHorizontalScroll===3 || (o.advanced.autoExpandHorizontalScroll!==2 && w>mCSB_container.parent().width())){ 3584 mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"}); 3585 }else{ 3586 /* 3587 wrap content with an infinite width div and set its position to absolute and width to auto. 3588 Setting width to auto before calculating the actual width is important! 3589 We must let the browser set the width as browser zoom values are impossible to calculate. 3590 */ 3591 mCSB_container.css({"overflow-x":"inherit","position":"absolute"}) 3592 .wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />") 3593 .css({ /* set actual width, original position and un-wrap */ 3594 /* 3595 get the exact width (with decimals) and then round-up. 3596 Using jquery outerWidth() will round the width value which will mess up with inner elements that have non-integer width 3597 */ 3598 "width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)), 3599 "min-width":"100%", 3600 "position":"relative" 3601 }).unwrap(); 3602 } 3603 } 3604 }, 3605 /* -------------------- */ 3606 3607 3608 /* adds scrollbar buttons */ 3609 _scrollButtons=function(){ 3610 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3611 mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"), 3612 tabindex=!_isNumeric(o.scrollButtons.tabindex) ? "" : "tabindex='"+o.scrollButtons.tabindex+"'", 3613 btnHTML=[ 3614 "<a href='#' class='"+classes[13]+"' oncontextmenu='return false;' "+tabindex+" />", 3615 "<a href='#' class='"+classes[14]+"' oncontextmenu='return false;' "+tabindex+" />", 3616 "<a href='#' class='"+classes[15]+"' oncontextmenu='return false;' "+tabindex+" />", 3617 "<a href='#' class='"+classes[16]+"' oncontextmenu='return false;' "+tabindex+" />" 3618 ], 3619 btn=[(o.axis==="x" ? btnHTML[2] : btnHTML[0]),(o.axis==="x" ? btnHTML[3] : btnHTML[1]),btnHTML[2],btnHTML[3]]; 3620 if(o.scrollButtons.enable){ 3621 mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3]); 3622 } 3623 }, 3624 /* -------------------- */ 3625 3626 3627 /* auto-adjusts scrollbar dragger length */ 3628 _setDraggerLength=function(){ 3629 var $this=$(this),d=$this.data(pluginPfx), 3630 mCustomScrollBox=$("#mCSB_"+d.idx), 3631 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3632 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 3633 ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(false),mCustomScrollBox.width()/mCSB_container.outerWidth(false)], 3634 l=[ 3635 parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()), 3636 parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width()) 3637 ], 3638 h=oldIE && (l[1]<l[0]) ? l[0] : l[1],w=oldIE && (l[3]<l[2]) ? l[2] : l[3]; 3639 mCSB_dragger[0].css({ 3640 "height":h,"max-height":(mCSB_dragger[0].parent().height()-10) 3641 }).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"}); 3642 mCSB_dragger[1].css({ 3643 "width":w,"max-width":(mCSB_dragger[1].parent().width()-10) 3644 }); 3645 }, 3646 /* -------------------- */ 3647 3648 3649 /* calculates scrollbar to content ratio */ 3650 _scrollRatio=function(){ 3651 var $this=$(this),d=$this.data(pluginPfx), 3652 mCustomScrollBox=$("#mCSB_"+d.idx), 3653 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3654 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 3655 scrollAmount=[mCSB_container.outerHeight(false)-mCustomScrollBox.height(),mCSB_container.outerWidth(false)-mCustomScrollBox.width()], 3656 ratio=[ 3657 scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()), 3658 scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width()) 3659 ]; 3660 d.scrollRatio={y:ratio[0],x:ratio[1]}; 3661 }, 3662 /* -------------------- */ 3663 3664 3665 /* toggles scrolling classes */ 3666 _onDragClasses=function(el,action,xpnd){ 3667 var expandClass=xpnd ? classes[0]+"_expanded" : "", 3668 scrollbar=el.closest(".mCSB_scrollTools"); 3669 if(action==="active"){ 3670 el.toggleClass(classes[0]+" "+expandClass); scrollbar.toggleClass(classes[1]); 3671 el[0]._draggable=el[0]._draggable ? 0 : 1; 3672 }else{ 3673 if(!el[0]._draggable){ 3674 if(action==="hide"){ 3675 el.removeClass(classes[0]); scrollbar.removeClass(classes[1]); 3676 }else{ 3677 el.addClass(classes[0]); scrollbar.addClass(classes[1]); 3678 } 3679 } 3680 } 3681 }, 3682 /* -------------------- */ 3683 3684 3685 /* checks if content overflows its container to determine if scrolling is required */ 3686 _overflowed=function(){ 3687 var $this=$(this),d=$this.data(pluginPfx), 3688 mCustomScrollBox=$("#mCSB_"+d.idx), 3689 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3690 contentHeight=d.overflowed==null ? mCSB_container.height() : mCSB_container.outerHeight(false), 3691 contentWidth=d.overflowed==null ? mCSB_container.width() : mCSB_container.outerWidth(false), 3692 h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth; 3693 if(h>contentHeight){contentHeight=h;} 3694 if(w>contentWidth){contentWidth=w;} 3695 return [contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]; 3696 }, 3697 /* -------------------- */ 3698 3699 3700 /* resets content position to 0 */ 3701 _resetContentPosition=function(){ 3702 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3703 mCustomScrollBox=$("#mCSB_"+d.idx), 3704 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3705 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")]; 3706 _stop($this); /* stop any current scrolling before resetting */ 3707 if((o.axis!=="x" && !d.overflowed[0]) || (o.axis==="y" && d.overflowed[0])){ /* reset y */ 3708 mCSB_dragger[0].add(mCSB_container).css("top",0); 3709 _scrollTo($this,"_resetY"); 3710 } 3711 if((o.axis!=="y" && !d.overflowed[1]) || (o.axis==="x" && d.overflowed[1])){ /* reset x */ 3712 var cx=dx=0; 3713 if(d.langDir==="rtl"){ /* adjust left position for rtl direction */ 3714 cx=mCustomScrollBox.width()-mCSB_container.outerWidth(false); 3715 dx=Math.abs(cx/d.scrollRatio.x); 3716 } 3717 mCSB_container.css("left",cx); 3718 mCSB_dragger[1].css("left",dx); 3719 _scrollTo($this,"_resetX"); 3720 } 3721 }, 3722 /* -------------------- */ 3723 3724 3725 /* binds scrollbar events */ 3726 _bindEvents=function(){ 3727 var $this=$(this),d=$this.data(pluginPfx),o=d.opt; 3728 if(!d.bindEvents){ /* check if events are already bound */ 3729 _draggable.call(this); 3730 if(o.contentTouchScroll){_contentDraggable.call(this);} 3731 _selectable.call(this); 3732 if(o.mouseWheel.enable){ /* bind mousewheel fn when plugin is available */ 3733 function _mwt(){ 3734 mousewheelTimeout=setTimeout(function(){ 3735 if(!$.event.special.mousewheel){ 3736 _mwt(); 3737 }else{ 3738 clearTimeout(mousewheelTimeout); 3739 _mousewheel.call($this[0]); 3740 } 3741 },100); 3742 } 3743 var mousewheelTimeout; 3744 _mwt(); 3745 } 3746 _draggerRail.call(this); 3747 _wrapperScroll.call(this); 3748 if(o.advanced.autoScrollOnFocus){_focus.call(this);} 3749 if(o.scrollButtons.enable){_buttons.call(this);} 3750 if(o.keyboard.enable){_keyboard.call(this);} 3751 d.bindEvents=true; 3752 } 3753 }, 3754 /* -------------------- */ 3755 3756 3757 /* unbinds scrollbar events */ 3758 _unbindEvents=function(){ 3759 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3760 namespace=pluginPfx+"_"+d.idx, 3761 sb=".mCSB_"+d.idx+"_scrollbar", 3762 sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"), 3763 mCSB_container=$("#mCSB_"+d.idx+"_container"); 3764 if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors));} 3765 if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));} 3766 if(d.bindEvents){ /* check if events are bound */ 3767 /* unbind namespaced events from document/selectors */ 3768 $(document).add($(!_canAccessIFrame() || top.document
vendor: 2,283 bytes, lines 3768-3830
3768)).unbind("."+namespace); 3769 sel.each(function(){ 3770 $(this).unbind("."+namespace); 3771 }); 3772 /* clear and delete timeouts/objects */ 3773 clearTimeout($this[0]._focusTimeout); _delete($this[0],"_focusTimeout"); 3774 clearTimeout(d.sequential.step); _delete(d.sequential,"step"); 3775 clearTimeout(mCSB_container[0].onCompleteTimeout); _delete(mCSB_container[0],"onCompleteTimeout"); 3776 d.bindEvents=false; 3777 } 3778 }, 3779 /* -------------------- */ 3780 3781 3782 /* toggles scrollbar visibility */ 3783 _scrollbarVisibility=function(disabled){ 3784 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3785 contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"), 3786 content=contentWrapper.length ? contentWrapper : $("#mCSB_"+d.idx+"_container"), 3787 scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")], 3788 mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")]; 3789 if(o.axis!=="x"){ 3790 if(d.overflowed[0] && !disabled){ 3791 scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block"); 3792 content.removeClass(classes[8]+" "+classes[10]); 3793 }else{ 3794 if(o.alwaysShowScrollbar){ 3795 if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none");} 3796 content.removeClass(classes[10]); 3797 }else{ 3798 scrollbar[0].css("display","none"); 3799 content.addClass(classes[10]); 3800 } 3801 content.addClass(classes[8]); 3802 } 3803 } 3804 if(o.axis!=="y"){ 3805 if(d.overflowed[1] && !disabled){ 3806 scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block"); 3807 content.removeClass(classes[9]+" "+classes[11]); 3808 }else{ 3809 if(o.alwaysShowScrollbar){ 3810 if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none");} 3811 content.removeClass(classes[11]); 3812 }else{ 3813 scrollbar[1].css("display","none"); 3814 content.addClass(classes[11]); 3815 } 3816 content.addClass(classes[9]); 3817 } 3818 } 3819 if(!d.overflowed[0] && !d.overflowed[1]){ 3820 $this.addClass(classes[5]); 3821 }else{ 3822 $this.removeClass(classes[5]); 3823 } 3824 }, 3825 /* -------------------- */ 3826 3827 3828 /* returns input coordinates of pointer, touch and mouse events (relative to document) */ 3829 _coordinates=function(e){ 3830 var t=e.type,o=e.target.ownerDocument!==document
vendor: 28,345 bytes, lines 3830-4526
3830? [$(frameElement).offset().top,$(frameElement).offset().left] : null, 3831 io=_canAccessIFrame() && e.target.ownerDocument!==top.document ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0]; 3832 switch(t){ 3833 case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp": 3834 return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false]; 3835 break; 3836 case "touchstart": case "touchmove": case "touchend": 3837 var touch=e.originalEvent.touches[0] || e.originalEvent.changedTouches[0], 3838 touches=e.originalEvent.touches.length || e.originalEvent.changedTouches.length; 3839 return e.target.ownerDocument!==document ? [touch.screenY,touch.screenX,touches>1] : [touch.pageY,touch.pageX,touches>1]; 3840 break; 3841 default: 3842 return o ? [e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],false] : [e.pageY,e.pageX,false]; 3843 } 3844 }, 3845 /* -------------------- */ 3846 3847 3848 /* 3849 SCROLLBAR DRAG EVENTS 3850 scrolls content via scrollbar dragging 3851 */ 3852 _draggable=function(){ 3853 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3854 namespace=pluginPfx+"_"+d.idx, 3855 draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"], 3856 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3857 mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]), 3858 draggable,dragY,dragX, 3859 rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger, 3860 eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document); 3861 mCSB_dragger.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ 3862 e.stopImmediatePropagation(); 3863 e.preventDefault(); 3864 if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ 3865 touchActive=true; 3866 if(oldIE){document.onselectstart=function(){return false;}} /* disable text selection for IE < 9 */ 3867 _iframe(false); /* enable scrollbar dragging over iframes by disabling their events */ 3868 _stop($this); 3869 draggable=$(this); 3870 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, 3871 h=draggable.height()+offset.top,w=draggable.width()+offset.left; 3872 if(y<h && y>0 && x<w && x>0){ 3873 dragY=y; 3874 dragX=x; 3875 } 3876 _onDragClasses(draggable,"active",o.autoExpandScrollbar); 3877 }).bind("touchmove."+namespace,function(e){ 3878 e.stopImmediatePropagation(); 3879 e.preventDefault(); 3880 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 3881 _drag(dragY,dragX,y,x); 3882 }); 3883 $(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){ 3884 if(draggable){ 3885 var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 3886 if(dragY===y && dragX===x){return;} /* has it really moved? */ 3887 _drag(dragY,dragX,y,x); 3888 } 3889 }).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ 3890 if(draggable){ 3891 _onDragClasses(draggable,"active",o.autoExpandScrollbar); 3892 draggable=null; 3893 } 3894 touchActive=false; 3895 if(oldIE){document.onselectstart=null;} /* enable text selection for IE < 9 */ 3896 _iframe(true); /* enable iframes events */ 3897 }); 3898 function _iframe(evt){ 3899 var el=mCSB_container.find("iframe"); 3900 if(!el.length){return;} /* check if content contains iframes */ 3901 var val=!evt ? "none" : "auto"; 3902 el.css("pointer-events",val); /* for IE11, iframe's display property should not be "block" */ 3903 } 3904 function _drag(dragY,dragX,y,x){ 3905 mCSB_container[0].idleTimer=o.scrollInertia<233 ? 250 : 0; 3906 if(draggable.attr("id")===draggerId[1]){ 3907 var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x; 3908 }else{ 3909 var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y; 3910 } 3911 _scrollTo($this,to.toString(),{dir:dir,drag:true}); 3912 } 3913 }, 3914 /* -------------------- */ 3915 3916 3917 /* 3918 TOUCH SWIPE EVENTS 3919 scrolls content via touch swipe 3920 Emulates the native touch-swipe scrolling with momentum found in iOS, Android and WP devices 3921 */ 3922 _contentDraggable=function(){ 3923 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 3924 namespace=pluginPfx+"_"+d.idx, 3925 mCustomScrollBox=$("#mCSB_"+d.idx), 3926 mCSB_container=$("#mCSB_"+d.idx+"_container"), 3927 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 3928 draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount, 3929 durA=0,durB,overwrite=o.axis==="yx" ? "none" : "all",touchIntent=[],touchDrag,docDrag, 3930 iframe=mCSB_container.find("iframe"), 3931 events=[ 3932 "touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace, //start 3933 "touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace, //move 3934 "touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace //end 3935 ], 3936 touchAction=document.body.style.touchAction!==undefined; 3937 mCSB_container.bind(events[0],function(e){ 3938 _onTouchstart(e); 3939 }).bind(events[1],function(e){ 3940 _onTouchmove(e); 3941 }); 3942 mCustomScrollBox.bind(events[0],function(e){ 3943 _onTouchstart2(e); 3944 }).bind(events[2],function(e){ 3945 _onTouchend(e); 3946 }); 3947 if(iframe.length){ 3948 iframe.each(function(){ 3949 $(this).load(function(){ 3950 /* bind events on accessible iframes */ 3951 if(_canAccessIFrame(this)){ 3952 $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ 3953 _onTouchstart(e); 3954 _onTouchstart2(e); 3955 }).bind(events[1],function(e){ 3956 _onTouchmove(e); 3957 }).bind(events[2],function(e){ 3958 _onTouchend(e); 3959 }); 3960 } 3961 }); 3962 }); 3963 } 3964 function _onTouchstart(e){ 3965 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} 3966 touchable=1; touchDrag=0; docDrag=0; draggable=1; 3967 $this.removeClass("mCS_touch_action"); 3968 var offset=mCSB_container.offset(); 3969 dragY=_coordinates(e)[0]-offset.top; 3970 dragX=_coordinates(e)[1]-offset.left; 3971 touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]; 3972 } 3973 function _onTouchmove(e){ 3974 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} 3975 if(!o.documentTouchScroll){e.preventDefault();} 3976 e.stopImmediatePropagation(); 3977 if(docDrag && !touchDrag){return;} 3978 if(draggable){ 3979 runningTime=_getTime(); 3980 var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left, 3981 easing="mcsLinearOut"; 3982 touchMoveY.push(y); 3983 touchMoveX.push(x); 3984 touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]); touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]); 3985 if(d.overflowed[0]){ 3986 var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), 3987 prevent=((dragY-y)>0 && (y-dragY)>-(limit*d.scrollRatio.y) && (touchIntent[3]*2<touchIntent[2] || o.axis==="yx")); 3988 } 3989 if(d.overflowed[1]){ 3990 var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), 3991 preventX=((dragX-x)>0 && (x-dragX)>-(limitX*d.scrollRatio.x) && (touchIntent[2]*2<touchIntent[3] || o.axis==="yx")); 3992 } 3993 if(prevent || preventX){ /* prevent native document scrolling */ 3994 if(!touchAction){e.preventDefault();} 3995 touchDrag=1; 3996 }else{ 3997 docDrag=1; 3998 $this.addClass("mCS_touch_action"); 3999 } 4000 if(touchAction){e.preventDefault();} 4001 amount=o.axis==="yx" ? [(dragY-y),(dragX-x)] : o.axis==="x" ? [null,(dragX-x)] : [(dragY-y),null]; 4002 mCSB_container[0].idleTimer=250; 4003 if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",true);} 4004 if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,true);} 4005 } 4006 } 4007 function _onTouchstart2(e){ 4008 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){touchable=0; return;} 4009 touchable=1; 4010 e.stopImmediatePropagation(); 4011 _stop($this); 4012 startTime=_getTime(); 4013 var offset=mCustomScrollBox.offset(); 4014 touchStartY=_coordinates(e)[0]-offset.top; 4015 touchStartX=_coordinates(e)[1]-offset.left; 4016 touchMoveY=[]; touchMoveX=[]; 4017 } 4018 function _onTouchend(e){ 4019 if(!_pointerTouch(e) || touchActive || _coordinates(e)[2]){return;} 4020 draggable=0; 4021 e.stopImmediatePropagation(); 4022 touchDrag=0; docDrag=0; 4023 endTime=_getTime(); 4024 var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left; 4025 if((endTime-runningTime)>30){return;} 4026 speed=1000/(endTime-startTime); 4027 var easing="mcsEaseOut",slow=speed<2.5, 4028 diff=slow ? [touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]] : [0,0]; 4029 distance=slow ? [(y-diff[0]),(x-diff[1])] : [y-touchStartY,x-touchStartX]; 4030 var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])]; 4031 speed=slow ? [Math.abs(distance[0]/4),Math.abs(distance[1]/4)] : [speed,speed]; 4032 var a=[ 4033 Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])), 4034 Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1])) 4035 ]; 4036 amount=o.axis==="yx" ? [a[0],a[1]] : o.axis==="x" ? [null,a[1]] : [a[0],null]; 4037 durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia]; 4038 var md=parseInt(o.contentTouchScroll) || 0; /* absolute minimum distance required */ 4039 amount[0]=absDistance[0]>md ? amount[0] : 0; 4040 amount[1]=absDistance[1]>md ? amount[1] : 0; 4041 if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,false);} 4042 if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,false);} 4043 } 4044 function _m(ds,s){ 4045 var r=[s*1.5,s*2,s/1.5,s/2]; 4046 if(ds>90){ 4047 return s>4 ? r[0] : r[3]; 4048 }else if(ds>60){ 4049 return s>3 ? r[3] : r[2]; 4050 }else if(ds>30){ 4051 return s>8 ? r[1] : s>6 ? r[0] : s>4 ? s : r[2]; 4052 }else{ 4053 return s>8 ? s : r[3]; 4054 } 4055 } 4056 function _drag(amount,dur,easing,dir,overwrite,drag){ 4057 if(!amount){return;} 4058 _scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag}); 4059 } 4060 }, 4061 /* -------------------- */ 4062 4063 4064 /* 4065 SELECT TEXT EVENTS 4066 scrolls content when text is selected 4067 */ 4068 _selectable=function(){ 4069 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 4070 namespace=pluginPfx+"_"+d.idx, 4071 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4072 wrapper=mCSB_container.parent(), 4073 action; 4074 mCSB_container.bind("mousedown."+namespace,function(e){ 4075 if(touchable){return;} 4076 if(!action){action=1; touchActive=true;} 4077 }).add(document).bind("mousemove."+namespace,function(e){ 4078 if(!touchable && action && _sel()){ 4079 var offset=mCSB_container.offset(), 4080 y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft; 4081 if(y>0 && y<wrapper.height() && x>0 && x<wrapper.width()){ 4082 if(seq.step){_seq("off",null,"stepped");} 4083 }else{ 4084 if(o.axis!=="x" && d.overflowed[0]){ 4085 if(y<0){ 4086 _seq("on",38); 4087 }else if(y>wrapper.height()){ 4088 _seq("on",40); 4089 } 4090 } 4091 if(o.axis!=="y" && d.overflowed[1]){ 4092 if(x<0){ 4093 _seq("on",37); 4094 }else if(x>wrapper.width()){ 4095 _seq("on",39); 4096 } 4097 } 4098 } 4099 } 4100 }).bind("mouseup."+namespace+" dragend."+namespace,function(e){ 4101 if(touchable){return;} 4102 if(action){action=0; _seq("off",null);} 4103 touchActive=false; 4104 }); 4105 function _sel(){ 4106 return window.getSelection ? window.getSelection().toString() : 4107 document.selection && document.selection.type!="Control" ? document.selection.createRange().text : 0; 4108 } 4109 function _seq(a,c,s){ 4110 seq.type=s && action ? "stepped" : "stepless"; 4111 seq.scrollAmount=10; 4112 _sequentialScroll($this,a,c,"mcsLinearOut",s ? 60 : null); 4113 } 4114 }, 4115 /* -------------------- */ 4116 4117 4118 /* 4119 MOUSE WHEEL EVENT 4120 scrolls content via mouse-wheel 4121 via mouse-wheel plugin (https://github.com/brandonaaron/jquery-mousewheel) 4122 */ 4123 _mousewheel=function(){ 4124 if(!$(this).data(pluginPfx)){return;} /* Check if the scrollbar is ready to use mousewheel events (issue: #185) */ 4125 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 4126 namespace=pluginPfx+"_"+d.idx, 4127 mCustomScrollBox=$("#mCSB_"+d.idx), 4128 mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")], 4129 iframe=$("#mCSB_"+d.idx+"_container").find("iframe"); 4130 if(iframe.length){ 4131 iframe.each(function(){ 4132 $(this).load(function(){ 4133 /* bind events on accessible iframes */ 4134 if(_canAccessIFrame(this)){ 4135 $(this.contentDocument || this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){ 4136 _onMousewheel(e,delta); 4137 }); 4138 } 4139 }); 4140 }); 4141 } 4142 mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){ 4143 _onMousewheel(e,delta); 4144 }); 4145 function _onMousewheel(e,delta){ 4146 _stop($this); 4147 if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */ 4148 var deltaFactor=o.mouseWheel.deltaFactor!=="auto" ? parseInt(o.mouseWheel.deltaFactor) : (oldIE && e.deltaFactor<100) ? 100 : e.deltaFactor || 100, 4149 dur=o.scrollInertia; 4150 if(o.axis==="x" || o.mouseWheel.axis==="x"){ 4151 var dir="x", 4152 px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)], 4153 amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.width() ? mCustomScrollBox.width()*0.9 : px[0], 4154 contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft), 4155 draggerPos=mCSB_dragger[1][0].offsetLeft, 4156 limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(), 4157 dlt=e.deltaX || e.deltaY || delta; 4158 }else{ 4159 var dir="y", 4160 px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)], 4161 amount=o.mouseWheel.scrollAmount!=="auto" ? px[1] : px[0]>=mCustomScrollBox.height() ? mCustomScrollBox.height()*0.9 : px[0], 4162 contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop), 4163 draggerPos=mCSB_dragger[0][0].offsetTop, 4164 limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(), 4165 dlt=e.deltaY || delta; 4166 } 4167 if((dir==="y" && !d.overflowed[0]) || (dir==="x" && !d.overflowed[1])){return;} 4168 if(o.mouseWheel.invert || e.webkitDirectionInvertedFromDevice){dlt=-dlt;} 4169 if(o.mouseWheel.normalizeDelta){dlt=dlt<0 ? -1 : 1;} 4170 if((dlt>0 && draggerPos!==0) || (dlt<0 && draggerPos!==limit) || o.mouseWheel.preventDefault){ 4171 e.stopImmediatePropagation(); 4172 e.preventDefault(); 4173 } 4174 if(e.deltaFactor<2 && !o.mouseWheel.normalizeDelta){ 4175 //very low deltaFactor values mean some kind of delta acceleration (e.g. osx trackpad), so adjusting scrolling accordingly 4176 amount=e.deltaFactor; dur=17; 4177 } 4178 _scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur}); 4179 } 4180 }, 4181 /* -------------------- */ 4182 4183 4184 /* checks if iframe can be accessed */ 4185 _canAccessIFrame=function(iframe){ 4186 var html=null; 4187 if(!iframe){ 4188 try{ 4189 var doc=top.document; 4190 html=doc.body.innerHTML; 4191 }catch(err){/* do nothing */} 4192 return(html!==null); 4193 }else{ 4194 try{ 4195 var doc=iframe.contentDocument || iframe.contentWindow.document; 4196 html=doc.body.innerHTML; 4197 }catch(err){/* do nothing */} 4198 return(html!==null); 4199 } 4200 }, 4201 /* -------------------- */ 4202 4203 4204 /* disables mouse-wheel when hovering specific elements like select, datalist etc. */ 4205 _disableMousewheel=function(el,target){ 4206 var tag=target.nodeName.toLowerCase(), 4207 tags=el.data(pluginPfx).opt.mouseWheel.disableOver, 4208 /* elements that require focus */ 4209 focusTags=["select","textarea"]; 4210 return $.inArray(tag,tags) > -1 && !($.inArray(tag,focusTags) > -1 && !$(target).is(":focus")); 4211 }, 4212 /* -------------------- */ 4213 4214 4215 /* 4216 DRAGGER RAIL CLICK EVENT 4217 scrolls content via dragger rail 4218 */ 4219 _draggerRail=function(){ 4220 var $this=$(this),d=$this.data(pluginPfx), 4221 namespace=pluginPfx+"_"+d.idx, 4222 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4223 wrapper=mCSB_container.parent(), 4224 mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]), 4225 clickable; 4226 mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){ 4227 touchActive=true; 4228 if(!$(e.target).hasClass("mCSB_dragger")){clickable=1;} 4229 }).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){ 4230 touchActive=false; 4231 }).bind("click."+namespace,function(e){ 4232 if(!clickable){return;} 4233 clickable=0; 4234 if($(e.target).hasClass(classes[12]) || $(e.target).hasClass("mCSB_draggerRail")){ 4235 _stop($this); 4236 var el=$(this),mCSB_dragger=el.find(".mCSB_dragger"); 4237 if(el.parent(".mCSB_scrollTools_horizontal").length>0){ 4238 if(!d.overflowed[1]){return;} 4239 var dir="x", 4240 clickDir=e.pageX>mCSB_dragger.offset().left ? -1 : 1, 4241 to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9)); 4242 }else{ 4243 if(!d.overflowed[0]){return;} 4244 var dir="y", 4245 clickDir=e.pageY>mCSB_dragger.offset().top ? -1 : 1, 4246 to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9)); 4247 } 4248 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 4249 } 4250 }); 4251 }, 4252 /* -------------------- */ 4253 4254 4255 /* 4256 FOCUS EVENT 4257 scrolls content via element focus (e.g. clicking an input, pressing TAB key etc.) 4258 */ 4259 _focus=function(){ 4260 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 4261 namespace=pluginPfx+"_"+d.idx, 4262 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4263 wrapper=mCSB_container.parent(); 4264 mCSB_container.bind("focusin."+namespace,function(e){ 4265 var el=$(document.activeElement), 4266 nested=mCSB_container.find(".mCustomScrollBox").length, 4267 dur=0; 4268 if(!el.is(o.advanced.autoScrollOnFocus)){return;} 4269 _stop($this); 4270 clearTimeout($this[0]._focusTimeout); 4271 $this[0]._focusTimer=nested ? (dur+17)*nested : 0; 4272 $this[0]._focusTimeout=setTimeout(function(){ 4273 var to=[_childPos(el)[0],_childPos(el)[1]], 4274 contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], 4275 isVisible=[ 4276 (contentPos[0]+to[0]>=0 && contentPos[0]+to[0]<wrapper.height()-el.outerHeight(false)), 4277 (contentPos[1]+to[1]>=0 && contentPos[0]+to[1]<wrapper.width()-el.outerWidth(false)) 4278 ], 4279 overwrite=(o.axis==="yx" && !isVisible[0] && !isVisible[1]) ? "none" : "all"; 4280 if(o.axis!=="x" && !isVisible[0]){ 4281 _scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur}); 4282 } 4283 if(o.axis!=="y" && !isVisible[1]){ 4284 _scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur}); 4285 } 4286 },$this[0]._focusTimer); 4287 }); 4288 }, 4289 /* -------------------- */ 4290 4291 4292 /* sets content wrapper scrollTop/scrollLeft always to 0 */ 4293 _wrapperScroll=function(){ 4294 var $this=$(this),d=$this.data(pluginPfx), 4295 namespace=pluginPfx+"_"+d.idx, 4296 wrapper=$("#mCSB_"+d.idx+"_container").parent(); 4297 wrapper.bind("scroll."+namespace,function(e){ 4298 if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ 4299 $(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden"); /* hide scrollbar(s) */ 4300 } 4301 }); 4302 }, 4303 /* -------------------- */ 4304 4305 4306 /* 4307 BUTTONS EVENTS 4308 scrolls content via up, down, left and right buttons 4309 */ 4310 _buttons=function(){ 4311 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 4312 namespace=pluginPfx+"_"+d.idx, 4313 sel=".mCSB_"+d.idx+"_scrollbar", 4314 btn=$(sel+">a"); 4315 btn.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){ 4316 e.preventDefault(); 4317 if(!_mouseBtnLeft(e)){return;} /* left mouse button only */ 4318 var btnClass=$(this).attr("class"); 4319 seq.type=o.scrollButtons.scrollType; 4320 switch(e.type){ 4321 case "mousedown": case "touchstart": case "pointerdown": case "MSPointerDown": 4322 if(seq.type==="stepped"){return;} 4323 touchActive=true; 4324 d.tweenRunning=false; 4325 _seq("on",btnClass); 4326 break; 4327 case "mouseup": case "touchend": case "pointerup": case "MSPointerUp": 4328 case "mouseout": case "pointerout": case "MSPointerOut": 4329 if(seq.type==="stepped"){return;} 4330 touchActive=false; 4331 if(seq.dir){_seq("off",btnClass);} 4332 break; 4333 case "click": 4334 if(seq.type!=="stepped" || d.tweenRunning){return;} 4335 _seq("on",btnClass); 4336 break; 4337 } 4338 function _seq(a,c){ 4339 seq.scrollAmount=o.scrollButtons.scrollAmount; 4340 _sequentialScroll($this,a,c); 4341 } 4342 }); 4343 }, 4344 /* -------------------- */ 4345 4346 4347 /* 4348 KEYBOARD EVENTS 4349 scrolls content via keyboard 4350 Keys: up arrow, down arrow, left arrow, right arrow, PgUp, PgDn, Home, End 4351 */ 4352 _keyboard=function(){ 4353 var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential, 4354 namespace=pluginPfx+"_"+d.idx, 4355 mCustomScrollBox=$("#mCSB_"+d.idx), 4356 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4357 wrapper=mCSB_container.parent(), 4358 editables="input,textarea,select,datalist,keygen,[contenteditable='true']", 4359 iframe=mCSB_container.find("iframe"), 4360 events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace]; 4361 if(iframe.length){ 4362 iframe.each(function(){ 4363 $(this).load(function(){ 4364 /* bind events on accessible iframes */ 4365 if(_canAccessIFrame(this)){ 4366 $(this.contentDocument || this.contentWindow.document).bind(events[0],function(e){ 4367 _onKeyboard(e); 4368 }); 4369 } 4370 }); 4371 }); 4372 } 4373 mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){ 4374 _onKeyboard(e); 4375 }); 4376 function _onKeyboard(e){ 4377 switch(e.type){ 4378 case "blur": 4379 if(d.tweenRunning && seq.dir){_seq("off",null);} 4380 break; 4381 case "keydown": case "keyup": 4382 var code=e.keyCode ? e.keyCode : e.which,action="on"; 4383 if((o.axis!=="x" && (code===38 || code===40)) || (o.axis!=="y" && (code===37 || code===39))){ 4384 /* up (38), down (40), left (37), right (39) arrows */ 4385 if(((code===38 || code===40) && !d.overflowed[0]) || ((code===37 || code===39) && !d.overflowed[1])){return;} 4386 if(e.type==="keyup"){action="off";} 4387 if(!$(document.activeElement).is(editables)){ 4388 e.preventDefault(); 4389 e.stopImmediatePropagation(); 4390 _seq(action,code); 4391 } 4392 }else if(code===33 || code===34){ 4393 /* PgUp (33), PgDn (34) */ 4394 if(d.overflowed[0] || d.overflowed[1]){ 4395 e.preventDefault(); 4396 e.stopImmediatePropagation(); 4397 } 4398 if(e.type==="keyup"){ 4399 _stop($this); 4400 var keyboardDir=code===34 ? -1 : 1; 4401 if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ 4402 var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9)); 4403 }else{ 4404 var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9)); 4405 } 4406 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 4407 } 4408 }else if(code===35 || code===36){ 4409 /* End (35), Home (36) */ 4410 if(!$(document.activeElement).is(editables)){ 4411 if(d.overflowed[0] || d.overflowed[1]){ 4412 e.preventDefault(); 4413 e.stopImmediatePropagation(); 4414 } 4415 if(e.type==="keyup"){ 4416 if(o.axis==="x" || (o.axis==="yx" && d.overflowed[1] && !d.overflowed[0])){ 4417 var dir="x",to=code===35 ? Math.abs(wrapper.width()-mCSB_container.outerWidth(false)) : 0; 4418 }else{ 4419 var dir="y",to=code===35 ? Math.abs(wrapper.height()-mCSB_container.outerHeight(false)) : 0; 4420 } 4421 _scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"}); 4422 } 4423 } 4424 } 4425 break; 4426 } 4427 function _seq(a,c){ 4428 seq.type=o.keyboard.scrollType; 4429 seq.scrollAmount=o.keyboard.scrollAmount; 4430 if(seq.type==="stepped" && d.tweenRunning){return;} 4431 _sequentialScroll($this,a,c); 4432 } 4433 } 4434 }, 4435 /* -------------------- */ 4436 4437 4438 /* scrolls content sequentially (used when scrolling via buttons, keyboard arrows etc.) */ 4439 _sequentialScroll=function(el,action,trigger,e,s){ 4440 var d=el.data(pluginPfx),o=d.opt,seq=d.sequential, 4441 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4442 once=seq.type==="stepped" ? true : false, 4443 steplessSpeed=o.scrollInertia < 26 ? 26 : o.scrollInertia, /* 26/1.5=17 */ 4444 steppedSpeed=o.scrollInertia < 1 ? 17 : o.scrollInertia; 4445 switch(action){ 4446 case "on": 4447 seq.dir=[ 4448 (trigger===classes[16] || trigger===classes[15] || trigger===39 || trigger===37 ? "x" : "y"), 4449 (trigger===classes[13] || trigger===classes[15] || trigger===38 || trigger===37 ? -1 : 1) 4450 ]; 4451 _stop(el); 4452 if(_isNumeric(trigger) && seq.type==="stepped"){return;} 4453 _on(once); 4454 break; 4455 case "off": 4456 _off(); 4457 if(once || (d.tweenRunning && seq.dir)){ 4458 _on(true); 4459 } 4460 break; 4461 } 4462 4463 /* starts sequence */ 4464 function _on(once){ 4465 if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : seq.dir[0]==="x" ? o.snapAmount[1] : o.snapAmount[0];} /* scrolling snapping */ 4466 var c=seq.type!=="stepped", /* continuous scrolling */ 4467 t=s ? s : !once ? 1000/60 : c ? steplessSpeed/1.5 : steppedSpeed, /* timer */ 4468 m=!once ? 2.5 : c ? 7.5 : 40, /* multiplier */ 4469 contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)], 4470 ratio=[d.scrollRatio.y>10 ? 10 : d.scrollRatio.y,d.scrollRatio.x>10 ? 10 : d.scrollRatio.x], 4471 amount=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*(ratio[1]*m)) : contentPos[0]+(seq.dir[1]*(ratio[0]*m)), 4472 px=seq.dir[0]==="x" ? contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)) : contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)), 4473 to=seq.scrollAmount!=="auto" ? px : amount, 4474 easing=e ? e : !once ? "mcsLinear" : c ? "mcsLinearOut" : "mcsEaseInOut", 4475 onComplete=!once ? false : true; 4476 if(once && t<17){ 4477 to=seq.dir[0]==="x" ? contentPos[1] : contentPos[0]; 4478 } 4479 _scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete}); 4480 if(once){ 4481 seq.dir=false; 4482 return; 4483 } 4484 clearTimeout(seq.step); 4485 seq.step=setTimeout(function(){ 4486 _on(); 4487 },t); 4488 } 4489 /* stops sequence */ 4490 function _off(){ 4491 clearTimeout(seq.step); 4492 _delete(seq,"step"); 4493 _stop(el); 4494 } 4495 }, 4496 /* -------------------- */ 4497 4498 4499 /* returns a yx array from value */ 4500 _arr=function(val){ 4501 var o=$(this).data(pluginPfx).opt,vals=[]; 4502 if(typeof val==="function"){val=val();} /* check if the value is a single anonymous function */ 4503 /* check if value is object or array, its length and create an array with yx values */ 4504 if(!(val instanceof Array)){ /* object value (e.g. {y:"100",x:"100"}, 100 etc.) */ 4505 vals[0]=val.y ? val.y : val.x || o.axis==="x" ? null : val; 4506 vals[1]=val.x ? val.x : val.y || o.axis==="y" ? null : val; 4507 }else{ /* array value (e.g. [100,100]) */ 4508 vals=val.length>1 ? [val[0],val[1]] : o.axis==="x" ? [null,val[0]] : [val[0],null]; 4509 } 4510 /* check if array values are anonymous functions */ 4511 if(typeof vals[0]==="function"){vals[0]=vals[0]();} 4512 if(typeof vals[1]==="function"){vals[1]=vals[1]();} 4513 return vals; 4514 }, 4515 /* -------------------- */ 4516 4517 4518 /* translates values (e.g. "top", 100, "100px", "#id") to actual scroll-to positions */ 4519 _to=function(val,dir){ 4520 if(val==null || typeof val=="undefined"){return;} 4521 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 4522 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4523 wrapper=mCSB_container.parent(), 4524 t=typeof val; 4525 if(!dir){dir=o.axis==="x" ? "x" : "y";} 4526 var contentLength=dir==="x" ? mCSB_container.outerWidth(false) : mCSB_container.outerHeight(false
vendor: 18,880 bytes, lines 4526-5070
4526), 4527 contentPos=dir==="x" ? mCSB_container[0].offsetLeft : mCSB_container[0].offsetTop, 4528 cssProp=dir==="x" ? "left" : "top"; 4529 switch(t){ 4530 case "function": /* this currently is not used. Consider removing it */ 4531 return val(); 4532 break; 4533 case "object": /* js/jquery object */ 4534 var obj=val.jquery ? val : $(val); 4535 if(!obj.length){return;} 4536 return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; 4537 break; 4538 case "string": case "number": 4539 if(_isNumeric(val)){ /* numeric value */ 4540 return Math.abs(val); 4541 }else if(val.indexOf("%")!==-1){ /* percentage value */ 4542 return Math.abs(contentLength*parseInt(val)/100); 4543 }else if(val.indexOf("-=")!==-1){ /* decrease value */ 4544 return Math.abs(contentPos-parseInt(val.split("-=")[1])); 4545 }else if(val.indexOf("+=")!==-1){ /* inrease value */ 4546 var p=(contentPos+parseInt(val.split("+=")[1])); 4547 return p>=0 ? 0 : Math.abs(p); 4548 }else if(val.indexOf("px")!==-1 && _isNumeric(val.split("px")[0])){ /* pixels string value (e.g. "100px") */ 4549 return Math.abs(val.split("px")[0]); 4550 }else{ 4551 if(val==="top" || val==="left"){ /* special strings */ 4552 return 0; 4553 }else if(val==="bottom"){ 4554 return Math.abs(wrapper.height()-mCSB_container.outerHeight(false)); 4555 }else if(val==="right"){ 4556 return Math.abs(wrapper.width()-mCSB_container.outerWidth(false)); 4557 }else if(val==="first" || val==="last"){ 4558 var obj=mCSB_container.find(":"+val); 4559 return dir==="x" ? _childPos(obj)[1] : _childPos(obj)[0]; 4560 }else{ 4561 if($(val).length){ /* jquery selector */ 4562 return dir==="x" ? _childPos($(val))[1] : _childPos($(val))[0]; 4563 }else{ /* other values (e.g. "100em") */ 4564 mCSB_container.css(cssProp,val); 4565 methods.update.call(null,$this[0]); 4566 return; 4567 } 4568 } 4569 } 4570 break; 4571 } 4572 }, 4573 /* -------------------- */ 4574 4575 4576 /* calls the update method automatically */ 4577 _autoUpdate=function(rem){ 4578 var $this=$(this),d=$this.data(pluginPfx),o=d.opt, 4579 mCSB_container=$("#mCSB_"+d.idx+"_container"); 4580 if(rem){ 4581 /* 4582 removes autoUpdate timer 4583 usage: _autoUpdate.call(this,"remove"); 4584 */ 4585 clearTimeout(mCSB_container[0].autoUpdate); 4586 _delete(mCSB_container[0],"autoUpdate"); 4587 return; 4588 } 4589 upd(); 4590 function upd(){ 4591 clearTimeout(mCSB_container[0].autoUpdate); 4592 if($this.parents("html").length===0){ 4593 /* check element in dom tree */ 4594 $this=null; 4595 return; 4596 } 4597 mCSB_container[0].autoUpdate=setTimeout(function(){ 4598 /* update on specific selector(s) length and size change */ 4599 if(o.advanced.updateOnSelectorChange){ 4600 d.poll.change.n=sizesSum(); 4601 if(d.poll.change.n!==d.poll.change.o){ 4602 d.poll.change.o=d.poll.change.n; 4603 doUpd(3); 4604 return; 4605 } 4606 } 4607 /* update on main element and scrollbar size changes */ 4608 if(o.advanced.updateOnContentResize){ 4609 d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth; 4610 if(d.poll.size.n!==d.poll.size.o){ 4611 d.poll.size.o=d.poll.size.n; 4612 doUpd(1); 4613 return; 4614 } 4615 } 4616 /* update on image load */ 4617 if(o.advanced.updateOnImageLoad){ 4618 if(!(o.advanced.updateOnImageLoad==="auto" && o.axis==="y")){ //by default, it doesn't run on vertical content 4619 d.poll.img.n=mCSB_container.find("img").length; 4620 if(d.poll.img.n!==d.poll.img.o){ 4621 d.poll.img.o=d.poll.img.n; 4622 mCSB_container.find("img").each(function(){ 4623 imgLoader(this); 4624 }); 4625 return; 4626 } 4627 } 4628 } 4629 if(o.advanced.updateOnSelectorChange || o.advanced.updateOnContentResize || o.advanced.updateOnImageLoad){upd();} 4630 },o.advanced.autoUpdateTimeout); 4631 } 4632 /* a tiny image loader */ 4633 function imgLoader(el){ 4634 if($(el).hasClass(classes[2])){doUpd(); return;} 4635 var img=new Image(); 4636 function createDelegate(contextObject,delegateMethod){ 4637 return function(){return delegateMethod.apply(contextObject,arguments);} 4638 } 4639 function imgOnLoad(){ 4640 this.onload=null; 4641 $(el).addClass(classes[2]); 4642 doUpd(2); 4643 } 4644 img.onload=createDelegate(img,imgOnLoad); 4645 img.src=el.src; 4646 } 4647 /* returns the total height and width sum of all elements matching the selector */ 4648 function sizesSum(){ 4649 if(o.advanced.updateOnSelectorChange===true){o.advanced.updateOnSelectorChange="*";} 4650 var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange); 4651 if(o.advanced.updateOnSelectorChange && sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth;});} 4652 return total; 4653 } 4654 /* calls the update method */ 4655 function doUpd(cb){ 4656 clearTimeout(mCSB_container[0].autoUpdate); 4657 methods.update.call(null,$this[0],cb); 4658 } 4659 }, 4660 /* -------------------- */ 4661 4662 4663 /* snaps scrolling to a multiple of a pixels number */ 4664 _snapAmount=function(to,amount,offset){ 4665 return (Math.round(to/amount)*amount-offset); 4666 }, 4667 /* -------------------- */ 4668 4669 4670 /* stops content and scrollbar animations */ 4671 _stop=function(el){ 4672 var d=el.data(pluginPfx), 4673 sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal"); 4674 sel.each(function(){ 4675 _stopTween.call(this); 4676 }); 4677 }, 4678 /* -------------------- */ 4679 4680 4681 /* 4682 ANIMATES CONTENT 4683 This is where the actual scrolling happens 4684 */ 4685 _scrollTo=function(el,to,options){ 4686 var d=el.data(pluginPfx),o=d.opt, 4687 defaults={ 4688 trigger:"internal", 4689 dir:"y", 4690 scrollEasing:"mcsEaseOut", 4691 drag:false, 4692 dur:o.scrollInertia, 4693 overwrite:"all", 4694 callbacks:true, 4695 onStart:true, 4696 onUpdate:true, 4697 onComplete:true 4698 }, 4699 options=$.extend(defaults,options), 4700 dur=[options.dur,(options.drag ? 0 : options.dur)], 4701 mCustomScrollBox=$("#mCSB_"+d.idx), 4702 mCSB_container=$("#mCSB_"+d.idx+"_container"), 4703 wrapper=mCSB_container.parent(), 4704 totalScrollOffsets=o.callbacks.onTotalScrollOffset ? _arr.call(el,o.callbacks.onTotalScrollOffset) : [0,0], 4705 totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset ? _arr.call(el,o.callbacks.onTotalScrollBackOffset) : [0,0]; 4706 d.trigger=options.trigger; 4707 if(wrapper.scrollTop()!==0 || wrapper.scrollLeft()!==0){ /* always reset scrollTop/Left */ 4708 $(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible"); 4709 wrapper.scrollTop(0).scrollLeft(0); 4710 } 4711 if(to==="_resetY" && !d.contentReset.y){ 4712 /* callbacks: onOverflowYNone */ 4713 if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0]);} 4714 d.contentReset.y=1; 4715 } 4716 if(to==="_resetX" && !d.contentReset.x){ 4717 /* callbacks: onOverflowXNone */ 4718 if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0]);} 4719 d.contentReset.x=1; 4720 } 4721 if(to==="_resetY" || to==="_resetX"){return;} 4722 if((d.contentReset.y || !el[0].mcs) && d.overflowed[0]){ 4723 /* callbacks: onOverflowY */ 4724 if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0]);} 4725 d.contentReset.x=null; 4726 } 4727 if((d.contentReset.x || !el[0].mcs) && d.overflowed[1]){ 4728 /* callbacks: onOverflowX */ 4729 if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0]);} 4730 d.contentReset.x=null; 4731 } 4732 if(o.snapAmount){ /* scrolling snapping */ 4733 var snapAmount=!(o.snapAmount instanceof Array) ? o.snapAmount : options.dir==="x" ? o.snapAmount[1] : o.snapAmount[0]; 4734 to=_snapAmount(to,snapAmount,o.snapOffset); 4735 } 4736 switch(options.dir){ 4737 case "x": 4738 var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"), 4739 property="left", 4740 contentPos=mCSB_container[0].offsetLeft, 4741 limit=[ 4742 mCustomScrollBox.width()-mCSB_container.outerWidth(false), 4743 mCSB_dragger.parent().width()-mCSB_dragger.width() 4744 ], 4745 scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.x)], 4746 tso=totalScrollOffsets[1], 4747 tsbo=totalScrollBackOffsets[1], 4748 totalScrollOffset=tso>0 ? tso/d.scrollRatio.x : 0, 4749 totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.x : 0; 4750 break; 4751 case "y": 4752 var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"), 4753 property="top", 4754 contentPos=mCSB_container[0].offsetTop, 4755 limit=[ 4756 mCustomScrollBox.height()-mCSB_container.outerHeight(false), 4757 mCSB_dragger.parent().height()-mCSB_dragger.height() 4758 ], 4759 scrollTo=[to,to===0 ? 0 : (to/d.scrollRatio.y)], 4760 tso=totalScrollOffsets[0], 4761 tsbo=totalScrollBackOffsets[0], 4762 totalScrollOffset=tso>0 ? tso/d.scrollRatio.y : 0, 4763 totalScrollBackOffset=tsbo>0 ? tsbo/d.scrollRatio.y : 0; 4764 break; 4765 } 4766 if(scrollTo[1]<0 || (scrollTo[0]===0 && scrollTo[1]===0)){ 4767 scrollTo=[0,0]; 4768 }else if(scrollTo[1]>=limit[1]){ 4769 scrollTo=[limit[0],limit[1]]; 4770 }else{ 4771 scrollTo[0]=-scrollTo[0]; 4772 } 4773 if(!el[0].mcs){ 4774 _mcs(); /* init mcs object (once) to make it available before callbacks */ 4775 if(_cb("onInit")){o.callbacks.onInit.call(el[0]);} /* callbacks: onInit */ 4776 } 4777 clearTimeout(mCSB_container[0].onCompleteTimeout); 4778 _tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing); 4779 if(!d.tweenRunning && ((contentPos===0 && scrollTo[0]>=0) || (contentPos===limit[0] && scrollTo[0]<=limit[0]))){return;} 4780 _tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{ 4781 onStart:function(){ 4782 if(options.callbacks && options.onStart && !d.tweenRunning){ 4783 /* callbacks: onScrollStart */ 4784 if(_cb("onScrollStart")){_mcs(); o.callbacks.onScrollStart.call(el[0]);} 4785 d.tweenRunning=true; 4786 _onDragClasses(mCSB_dragger); 4787 d.cbOffsets=_cbOffsets(); 4788 } 4789 },onUpdate:function(){ 4790 if(options.callbacks && options.onUpdate){ 4791 /* callbacks: whileScrolling */ 4792 if(_cb("whileScrolling")){_mcs(); o.callbacks.whileScrolling.call(el[0]);} 4793 } 4794 },onComplete:function(){ 4795 if(options.callbacks && options.onComplete){ 4796 if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout);} 4797 var t=mCSB_container[0].idleTimer || 0; 4798 mCSB_container[0].onCompleteTimeout=setTimeout(function(){ 4799 /* callbacks: onScroll, onTotalScroll, onTotalScrollBack */ 4800 if(_cb("onScroll")){_mcs(); o.callbacks.onScroll.call(el[0]);} 4801 if(_cb("onTotalScroll") && scrollTo[1]>=limit[1]-totalScrollOffset && d.cbOffsets[0]){_mcs(); o.callbacks.onTotalScroll.call(el[0]);} 4802 if(_cb("onTotalScrollBack") && scrollTo[1]<=totalScrollBackOffset && d.cbOffsets[1]){_mcs(); o.callbacks.onTotalScrollBack.call(el[0]);} 4803 d.tweenRunning=false; 4804 mCSB_container[0].idleTimer=0; 4805 _onDragClasses(mCSB_dragger,"hide"); 4806 },t); 4807 } 4808 } 4809 }); 4810 /* checks if callback function exists */ 4811 function _cb(cb){ 4812 return d && o.callbacks[cb] && typeof o.callbacks[cb]==="function"; 4813 } 4814 /* checks whether callback offsets always trigger */ 4815 function _cbOffsets(){ 4816 return [o.callbacks.alwaysTriggerOffsets || contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets || contentPos<=-tsbo]; 4817 } 4818 /* 4819 populates object with useful values for the user 4820 values: 4821 content: this.mcs.content 4822 content top position: this.mcs.top 4823 content left position: this.mcs.left 4824 dragger top position: this.mcs.draggerTop 4825 dragger left position: this.mcs.draggerLeft 4826 scrolling y percentage: this.mcs.topPct 4827 scrolling x percentage: this.mcs.leftPct 4828 scrolling direction: this.mcs.direction 4829 */ 4830 function _mcs(){ 4831 var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft], /* content position */ 4832 dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft], /* dragger position */ 4833 cl=[mCSB_container.outerHeight(false),mCSB_container.outerWidth(false)], /* content length */ 4834 pl=[mCustomScrollBox.height(),mCustomScrollBox.width()]; /* content parent length */ 4835 el[0].mcs={ 4836 content:mCSB_container, /* original content wrapper as jquery object */ 4837 top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1], 4838 topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])), 4839 direction:options.dir 4840 }; 4841 /* 4842 this refers to the original element containing the scrollbar(s) 4843 usage: this.mcs.top, this.mcs.leftPct etc. 4844 */ 4845 } 4846 }, 4847 /* -------------------- */ 4848 4849 4850 /* 4851 CUSTOM JAVASCRIPT ANIMATION TWEEN 4852 Lighter and faster than jquery animate() and css transitions 4853 Animates top/left properties and includes easings 4854 */ 4855 _tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){ 4856 if(!el._mTween){el._mTween={top:{},left:{}};} 4857 var callbacks=callbacks || {}, 4858 onStart=callbacks.onStart || function(){},onUpdate=callbacks.onUpdate || function(){},onComplete=callbacks.onComplete || function(){}, 4859 startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop]; 4860 if(prop==="left"){from=el.offsetLeft;} 4861 var diff=to-from; 4862 tobj.stop=0; 4863 if(overwrite!=="none"){_cancelTween();} 4864 _startTween(); 4865 function _step(){ 4866 if(tobj.stop){return;} 4867 if(!progress){onStart.call();} 4868 progress=_getTime()-startTime; 4869 _tween(); 4870 if(progress>=tobj.time){ 4871 tobj.time=(progress>tobj.time) ? progress+_delay-(progress-tobj.time) : progress+_delay-1; 4872 if(tobj.time<progress+1){tobj.time=progress+1;} 4873 } 4874 if(tobj.time<duration){tobj.id=_request(_step);}else{onComplete.call();} 4875 } 4876 function _tween(){ 4877 if(duration>0){ 4878 tobj.currVal=_ease(tobj.time,from,diff,duration,easing); 4879 elStyle[prop]=Math.round(tobj.currVal)+"px"; 4880 }else{ 4881 elStyle[prop]=to+"px"; 4882 } 4883 onUpdate.call(); 4884 } 4885 function _startTween(){ 4886 _delay=1000/60; 4887 tobj.time=progress+_delay; 4888 _request=(!window.requestAnimationFrame) ? function(f){_tween(); return setTimeout(f,0.01);} : window.requestAnimationFrame; 4889 tobj.id=_request(_step); 4890 } 4891 function _cancelTween(){ 4892 if(tobj.id==null){return;} 4893 if(!window.requestAnimationFrame){clearTimeout(tobj.id); 4894 }else{window.cancelAnimationFrame(tobj.id);} 4895 tobj.id=null; 4896 } 4897 function _ease(t,b,c,d,type){ 4898 switch(type){ 4899 case "linear": case "mcsLinear": 4900 return c*t/d + b; 4901 break; 4902 case "mcsLinearOut": 4903 t/=d; t--; return c * Math.sqrt(1 - t*t) + b; 4904 break; 4905 case "easeInOutSmooth": 4906 t/=d/2; 4907 if(t<1) return c/2*t*t + b; 4908 t--; 4909 return -c/2 * (t*(t-2) - 1) + b; 4910 break; 4911 case "easeInOutStrong": 4912 t/=d/2; 4913 if(t<1) return c/2 * Math.pow( 2, 10 * (t - 1) ) + b; 4914 t--; 4915 return c/2 * ( -Math.pow( 2, -10 * t) + 2 ) + b; 4916 break; 4917 case "easeInOut": case "mcsEaseInOut": 4918 t/=d/2; 4919 if(t<1) return c/2*t*t*t + b; 4920 t-=2; 4921 return c/2*(t*t*t + 2) + b; 4922 break; 4923 case "easeOutSmooth": 4924 t/=d; t--; 4925 return -c * (t*t*t*t - 1) + b; 4926 break; 4927 case "easeOutStrong": 4928 return c * ( -Math.pow( 2, -10 * t/d ) + 1 ) + b; 4929 break; 4930 case "easeOut": case "mcsEaseOut": default: 4931 var ts=(t/=d)*t,tc=ts*t; 4932 return b+c*(0.499999999999997*tc*ts + -2.5*ts*ts + 5.5*tc + -6.5*ts + 4*t); 4933 } 4934 } 4935 }, 4936 /* -------------------- */ 4937 4938 4939 /* returns current time */ 4940 _getTime=function(){ 4941 if(window.performance && window.performance.now){ 4942 return window.performance.now(); 4943 }else{ 4944 if(window.performance && window.performance.webkitNow){ 4945 return window.performance.webkitNow(); 4946 }else{ 4947 if(Date.now){return Date.now();}else{return new Date().getTime();} 4948 } 4949 } 4950 }, 4951 /* -------------------- */ 4952 4953 4954 /* stops a tween */ 4955 _stopTween=function(){ 4956 var el=this; 4957 if(!el._mTween){el._mTween={top:{},left:{}};} 4958 var props=["top","left"]; 4959 for(var i=0; i<props.length; i++){ 4960 var prop=props[i]; 4961 if(el._mTween[prop].id){ 4962 if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id); 4963 }else{window.cancelAnimationFrame(el._mTween[prop].id);} 4964 el._mTween[prop].id=null; 4965 el._mTween[prop].stop=1; 4966 } 4967 } 4968 }, 4969 /* -------------------- */ 4970 4971 4972 /* deletes a property (avoiding the exception thrown by IE) */ 4973 _delete=function(c,m){ 4974 try{delete c[m];}catch(e){c[m]=null;} 4975 }, 4976 /* -------------------- */ 4977 4978 4979 /* detects left mouse button */ 4980 _mouseBtnLeft=function(e){ 4981 return !(e.which && e.which!==1); 4982 }, 4983 /* -------------------- */ 4984 4985 4986 /* detects if pointer type event is touch */ 4987 _pointerTouch=function(e){ 4988 var t=e.originalEvent.pointerType; 4989 return !(t && t!=="touch" && t!==2); 4990 }, 4991 /* -------------------- */ 4992 4993 4994 /* checks if value is numeric */ 4995 _isNumeric=function(val){ 4996 return !isNaN(parseFloat(val)) && isFinite(val); 4997 }, 4998 /* -------------------- */ 4999 5000 5001 /* returns element position according to content */ 5002 _childPos=function(el){ 5003 var p=el.parents(".mCSB_container"); 5004 return [el.offset().top-p.offset().top,el.offset().left-p.offset().left]; 5005 }, 5006 /* -------------------- */ 5007 5008 5009 /* checks if browser tab is hidden/inactive via Page Visibility API */ 5010 _isTabHidden=function(){ 5011 var prop=_getHiddenProp(); 5012 if(!prop) return false; 5013 return document[prop]; 5014 function _getHiddenProp(){ 5015 var pfx=["webkit","moz","ms","o"]; 5016 if("hidden" in document) return "hidden"; //natively supported 5017 for(var i=0; i<pfx.length; i++){ //prefixed 5018 if((pfx[i]+"Hidden") in document) 5019 return pfx[i]+"Hidden"; 5020 } 5021 return null; //not supported 5022 } 5023 }; 5024 /* -------------------- */ 5025 5026 5027 5028 5029 5030 /* 5031 ---------------------------------------- 5032 PLUGIN SETUP 5033 ---------------------------------------- 5034 */ 5035 5036 /* plugin constructor functions */ 5037 $.fn[pluginNS]=function(method){ /* usage: $(selector).mCustomScrollbar(); */ 5038 if(methods[method]){ 5039 return methods[method].apply(this,Array.prototype.slice.call(arguments,1)); 5040 }else if(typeof method==="object" || !method){ 5041 return methods.init.apply(this,arguments); 5042 }else{ 5043 $.error("Method "+method+" does not exist"); 5044 } 5045 }; 5046 $[pluginNS]=function(method){ /* usage: $.mCustomScrollbar(); */ 5047 if(methods[method]){ 5048 return methods[method].apply(this,Array.prototype.slice.call(arguments,1)); 5049 }else if(typeof method==="object" || !method){ 5050 return methods.init.apply(this,arguments); 5051 }else{ 5052 $.error("Method "+method+" does not exist"); 5053 } 5054 }; 5055 5056 /* 5057 allow setting plugin default options. 5058 usage: $.mCustomScrollbar.defaults.scrollInertia=500; 5059 to apply any changed default options on default selectors (below), use inside document ready fn 5060 e.g.: $(document).ready(function(){ $.mCustomScrollbar.defaults.scrollInertia=500; }); 5061 */ 5062 $[pluginNS].defaults=defaults; 5063 5064 /* 5065 add window object (window.mCustomScrollbar) 5066 usage: if(window.mCustomScrollbar){console.log("custom scrollbar plugin loaded");} 5067 */ 5068 window[pluginNS]=true; 5069 5070 $(window).
5070load(function(){ 5071 5072 $(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */ 5073 5074 /* extend jQuery expressions */ 5075 $.extend($.expr[":"],{ 5076 /* checks if element is within scrollable viewport */ 5077 mcsInView:$.expr[":"].mcsInView || function(el){ 5078 var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos; 5079 if(!content.length){return;} 5080 wrapper=content.parent(); 5081 cPos=[content[0].offsetTop,content[0].offsetLeft]; 5082 return cPos[0]+_childPos($el)[0]>=0 && cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(false) && 5083 cPos[1]+_childPos($el)[1]>=0 && cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(false); 5084 }, 5085 /* checks if element is overflowed having visible scrollbar(s) */ 5086 mcsOverflow:$.expr[":"].mcsOverflow || function(el){ 5087 var d=$(el).data(pluginPfx); 5088 if(!d){return;} 5089 return d.overflowed[0] || d.overflowed[1]; 5090 } 5091 }); 5092 5093 }); 5094 5095}))})); 5096/** 5097 * jQuery.marquee - scrolling text like old marquee element 5098 * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin 5099 */ 5100;(function(e){e.fn.marquee=function(t){return this.each(function(){var n=e.extend({},e.fn.marquee.defaults,t),r=e(this),i,s,o,u,a,f=3,l="animation-play-state",c=false,h=function(e,t,n){var r=["webkit","moz","MS","o",""];for(var i=0;i<r.length;i++){if(!r[i])t=t.toLowerCase();e.addEventListener(r[i]+t,n,false)}},p=function(e){var t=[];for(var n in e){if(e.hasOwnProperty(n)){t.push(n+":"+e[n])}}t.push();return"{"+t.join(",")+"}"},d=function(){r.timer=setTimeout(M,n.delayBeforeStart)},v={pause:function(){if(c&&n.allowCss3Support){i.css(l,"paused")}else{if(e.fn.pause){i.pause()}}r.data("runningStatus","paused");r.trigger("paused")},resume:function(){if(c&&n.allowCss3Support){i.css(l,"running")}else{if(e.fn.resume){i.resume()}}r.data("runningStatus","resumed");r.trigger("resumed")},toggle:function(){v[r.data("runningStatus")=="resumed"?"pause":"resume"]()},destroy:function(){clearTimeout(r.timer);r.find("*").andSelf().unbind();r.html(r.find(".js-marquee:first").html())}};if(typeof t==="string"){if(e.isFunction(v[t])){if(!i){i=r.find(".js-marquee-wrapper")}if(r.data("css3AnimationIsSupported")===true){c=true}v[t]()}return}var m={},g;e.each(n,function(e,t){g=r.attr("data-"+e);if(typeof g!=="undefined"){switch(g){case"true":g=true;break;case"false":g=false;break}n[e]=g}});n.duration=n.speed||n.duration;u=n.direction=="up"||n.direction=="down";n.gap=n.duplicated?n.gap:0;r.wrapInner('<div class="js-marquee"></div>');var y=r.find(".js-marquee").css({"margin-right":n.gap,"float":"left"});if(n.duplicated){y.clone(true).appendTo(r)}r.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');i=r.find(".js-marquee-wrapper");if(u){var b=r.height();i.removeAttr("style");r.height(b);r.find(".js-marquee").css({"float":"none","margin-bottom":n.gap,"margin-right":0});if(n.duplicated)r.find(".js-marquee:last").css({"margin-bottom":0});var w=r.find(".js-marquee:first").height()+n.gap;n.duration=(parseInt(w,10)+parseInt(b,10))/parseInt(b,10)*n.duration}else{a=r.find(".js-marquee:first").width()+n.gap;s=r.width();n.duration=(parseInt(a,10)+parseInt(s,10))/parseInt(s,10)*n.duration}if(n.duplicated){n.duration=n.duration/2}if(n.allowCss3Support){var E=document.body||document.createElement("div"),S="marqueeAnimation-"+Math.floor(Math.random()*1e7),x="Webkit Moz O ms Khtml".split(" "),T="animation",N="",C="";if(E.style.animation){C="@keyframes "+S+" ";c=true}if(c===false){for(var k=0;k<x.length;k++){if(E.style[x[k]+"AnimationName"]!==undefined){var L="-"+x[k].toLowerCase()+"-";T=L+T;l=L+l;C="@"+L+"keyframes "+S+" ";c=true;break}}}if(c){N=S+" "+n.duration/1e3+"s "+n.delayBeforeStart/1e3+"s infinite "+n.css3easing;r.data("css3AnimationIsSupported",true)}}var A=function(){i.css("margin-top",n.direction=="up"?b+"px":"-"+w+"px")},O=function(){i.css("margin-left",n.direction=="left"?s+"px":"-"+a+"px")};if(n.duplicated){if(u){i.css("margin-top",n.direction=="up"?b:"-"+(w*2-n.gap)+"px")}else{i.css("margin-left",n.direction=="left"?s+"px":"-"+(a*2-n.gap)+"px")}f=1}else{if(u){A()}else{O()}}var M=function(){if(n.duplicated){if(f===1){n._originalDuration=n.duration;if(u){n.duration=n.direction=="up"?n.duration+b/(w/n.duration):n.duration*2}else{n.duration=n.direction=="left"?n.duration+s/(a/n.duration):n.duration*2}if(N){N=S+" "+n.duration/1e3+"s "+n.delayBeforeStart/1e3+"s "+n.css3easing}f++}else if(f===2){n.duration=n._originalDuration;if(N){S=S+"0";C=e.trim(C)+"0 ";N=S+" "+n.duration/1e3+"s 0s infinite "+n.css3easing}f++}}if(u){if(n.duplicated){if(f>2){i.css("margin-top",n.direction=="up"?0:"-"+w+"px")}o={"margin-top":n.direction=="up"?"-"+w+"px":0}}else{A();o={"margin-top":n.direction=="up"?"-"+i.height()+"px":b+"px"}}}else{if(n.duplicated){if(f>2){i.css("margin-left",n.direction=="left"?0:"-"+a+"px")}o={"margin-left":n.direction=="left"?"-"+a+"px":0}}else{O();o={"margin-left":n.direction=="left"?"-"+a+"px":s+"px"}}}r.trigger("beforeStarting");if(c){i.css(T,N);var t=C+" { 100% "+p(o)+"}",l=e("style");if(l.length!==0){l.filter(":last").append(t)}else{e("head").append("<style>"+t+"</style>")}h(i[0],"AnimationIteration",function(){r.trigger("finished")});h(i[0],"AnimationEnd",function(){M();r.trigger("finished")})}else{i.animate(o,n.duration,n.easing,function(){r.trigger("finished");
5100if(n.pauseOnCycle){d()}else{M()}})}r.data("runningStatus","resumed")};r.bind("pause",v.pause);r.bind("resume",v.resume);if(n.pauseOnHover){r.bind("mouseenter mouseleave",v.toggle)}if(c&&n.allowCss3Support){M()}else{d()}})};e.fn.marquee.defaults={allowCss3Support:true,css3easing:"linear",easing:"linear",delayBeforeStart:1e3,direction:"left",duplicated:false,duration:5e3,gap:20,pauseOnCycle:false,pauseOnHover:false}})(jQuery); 5101 5102/*! 5103 * Masonry PACKAGED v3.1.4 5104 * Cascading grid layout library 5105 * http://masonry.desandro.com 5106 * MIT License 5107 * by David DeSandro 5108 */ 5109 5110(function (t) { 5111 function e() { 5112 } 5113 5114 function i(t) { 5115 function i(e) { 5116 e.prototype.option || (e.prototype.option = function (e) { 5117 t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) 5118 }) 5119 } 5120 5121 function o(e, i) { 5122 t.fn[e] = function (o) { 5123 if ("string" == typeof o) { 5124 for (var s = n.call(arguments, 1), a = 0, h = this.length; h > a; a++) { 5125 var p = this[a], u = t.data(p, e); 5126 if (u)if (t.isFunction(u[o]) && "_" !== o.charAt(0)) { 5127 var f = u[o].apply(u, s); 5128 if (void 0 !== f)return f 5129 } else r("no such method '" + o + "' for " + e + " instance"); else r("cannot call methods on " + e + " prior to initialization; " + "attempted to call '" + o + "'") 5130 } 5131 return this 5132 } 5133 return this.each(function () { 5134 var n = t.data(this, e); 5135 n ? (n.option(o), n._init()) : (n = new i(this, o), t.data(this, e, n)) 5136 }) 5137 } 5138 } 5139 5140 if (t) { 5141 var r = "undefined" == typeof console ? e : function (t) { 5142 console.error(t) 5143 }; 5144 return t.bridget = function (t, e) { 5145 i(e), o(t, e) 5146 }, t.bridget 5147 } 5148 } 5149 5150 var n = Array.prototype.slice; 5151 "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], i) : i(t.jQuery) 5152})(window), function (t) { 5153 function e(e) { 5154 var i = t.event; 5155 return i.target = i.target || i.srcElement || e, i 5156 } 5157 5158 var i = document.documentElement, n = function () { 5159 }; 5160 i.addEventListener ? n = function (t, e, i) { 5161 t.addEventListener(e, i, !1) 5162 } : i.attachEvent && (n = function (t, i, n) { 5163 t[i + n] = n.handleEvent ? function () { 5164 var i = e(t); 5165 n.handleEvent.call(n, i) 5166 } : function () { 5167 var i = e(t); 5168 n.call(t, i) 5169 }, t.attachEvent("on" + i, t[i + n]) 5170 }); 5171 var o = function () { 5172 }; 5173 i.removeEventListener ? o = function (t, e, i) { 5174 t.removeEventListener(e, i, !1) 5175 } : i.detachEvent && (o = function (t, e, i) { 5176 t.detachEvent("on" + e, t[e + i]); 5177 try { 5178 delete t[e + i] 5179 } catch (n) { 5180 t[e + i] = void 0 5181 } 5182 }); 5183 var r = {bind: n, unbind: o}; 5184 "function" == typeof define && define.amd ? define("eventie/eventie", r) : "object" == typeof exports ? module.exports = r : t.eventie = r 5185}(this), function (t) { 5186 function e(t) { 5187 "function" == typeof t && (e.isReady ? t() : r.push(t)) 5188 } 5189 5190 function i(t) { 5191 var i = "readystatechange" === t.type && "complete" !== o.readyState; 5192 if (!e.isReady && !i) { 5193 e.isReady = !0; 5194 for (var n = 0, s = r.length; s > n; n++) { 5195 var a = r[n]; 5196 a() 5197 } 5198 } 5199 } 5200 5201 function n(n) { 5202 return n.bind(o, "DOMContentLoaded", i), n.bind(o, "readystatechange", i), n.bind(t, "load", i), e 5203 } 5204 5205 var o = t.document, r = []; 5206 e.isReady = !1, "function" == typeof define && define.amd ? (e.isReady = "function" == typeof requirejs, define("doc-ready/doc-ready", ["eventie/eventie"], n)) : t.docReady = n(t.eventie) 5207}(this), function () { 5208 function t() { 5209 } 5210 5211 function e(t, e) { 5212 for (var i = t.length; i--;)if (t[i].listener === e)return i; 5213 return-1 5214 } 5215 5216 function i(t) { 5217 return function () { 5218 return this[t].apply(this, arguments) 5219 } 5220 } 5221 5222 var n = t.prototype, o = this, r = o.EventEmitter; 5223 n.getListeners = function (t) { 5224 var e, i, n = this._getEvents(); 5225 if (t instanceof RegExp) { 5226 e = {}; 5227 for (i in n)n.hasOwnProperty(i) && t.test(i) && (e[i] = n[i]) 5228 } else e = n[t] || (n[t] = []); 5229 return e 5230 }, n.flattenListeners = function (t) { 5231 var e, i = []; 5232 for (e = 0; t.length > e; e += 1)i.push(t[e].listener); 5233 return i 5234 }, n.getListenersAsObject = function (t) { 5235 var e, i = this.getListeners(t); 5236 return i instanceof Array && (e = {}, e[t] = i), e || i 5237 }, n.addListener = function (t, i) { 5238 var n, o = this.getListenersAsObject(t), r = "object" == typeof i; 5239 for (n in o)o.hasOwnProperty(n) && -1 === e(o[n], i) && o[n].push(r ? i : {listener: i, once: !1}); 5240 return this 5241 }, n.on = i("addListener"), n.addOnceListener = function (t, e) { 5242 return this.addListener(t, {listener: e, once: !0}) 5243 }, n.once = i("addOnceListener"), n.defineEvent = function (t) { 5244 return this.getListeners(t), this 5245 }, n.defineEvents = function (t) { 5246 for (var e = 0; t.length > e; e += 1)this.defineEvent(t[e]); 5247 return this 5248 }, n.removeListener = function (t, i) { 5249 var n, o, r = this.getListenersAsObject(t); 5250 for (o in r)r.hasOwnProperty(o) && (n = e(r[o], i), -1 !== n && r[o].splice(n, 1)); 5251 return this 5252 }, n.off = i("removeListener"), n.addListeners = function (t, e) { 5253 return this.manipulateListeners(!1, t, e) 5254 }, n.removeListeners = function (t, e) { 5255 return this.manipulateListeners(!0, t, e) 5256 }, n.manipulateListeners = function (t, e, i) { 5257 var n, o, r = t ? this.removeListener : this.addListener, s = t ? this.removeListeners : this.addListeners; 5258 if ("object" != typeof e || e instanceof RegExp)for (n = i.length; n--;)r.call(this, e, i[n]); else for (n in e)e.hasOwnProperty(n) && (o = e[n]) && ("function" == typeof o ? r.call(this, n, o) : s.call(this, n, o)); 5259 return this 5260 }, n.removeEvent = function (t) { 5261 var e, i = typeof t, n = this._getEvents(); 5262 if ("string" === i)delete n[t]; else if (t instanceof RegExp)for (e in n)n.hasOwnProperty(e) && t.test(e) && delete n[e]; else delete this._events; 5263 return this 5264 }, n.removeAllListeners = i("removeEvent"), n.emitEvent = function (t, e) { 5265 var i, n, o, r, s = this.getListenersAsObject(t); 5266 for (o in s)if (s.hasOwnProperty(o))for (n = s[o].length; n--;)i = s[o][n], i.once === !0 && this.removeListener(t, i.listener), r = i.listener.apply(this, e || []), r === this._getOnceReturnValue() && this.removeListener(t, i.listener); 5267 return this 5268 }, n.trigger = i("emitEvent"), n.emit = function (t) { 5269 var e = Array.prototype.slice.call(arguments, 1); 5270 return this.emitEvent(t, e) 5271 }, n.setOnceReturnValue = function (t) { 5272 return this._onceReturnValue = t, this 5273 }, n._getOnceReturnValue = function () { 5274 return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 5275 }, n._getEvents = function () { 5276 return this._events || (this._events = {}) 5277 }, t.noConflict = function () { 5278 return o.EventEmitter = r, t 5279 }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () { 5280 return t 5281 }) : "object" == typeof module && module.exports ? module.exports = t : this.EventEmitter = t 5282}.call(this), function (t) { 5283 function e(t) { 5284 if (t) { 5285 if ("string" == typeof n[t])return t; 5286 t = t.charAt(0).toUpperCase() + t.slice(1); 5287 for (var e, o = 0, r = i.length; r > o; o++)if (e = i[o] + t, "string" == typeof n[e])return e 5288 } 5289 } 5290 5291 var i = "Webkit Moz ms Ms O".split(" "), n = document.documentElement.style; 5292 "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function () { 5293 return e 5294 }) : "object" == typeof exports ? module.exports = e : t.getStyleProperty = e 5295}(window), function (t) { 5296 function e(t) { 5297 var e = parseFloat(t), i = -1 === t.indexOf("%") && !isNaN(e); 5298 return i && e 5299 } 5300 5301 function i() { 5302 for (var t = {width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0}, e = 0, i = s.length; i > e; e++) { 5303 var n = s[e]; 5304 t[n] = 0 5305 } 5306 return t 5307 } 5308 5309 function n(t) { 5310 function n(t) { 5311 if ("string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { 5312 var n = r(t); 5313 if ("none" === n.display)return i(); 5314 var o = {}; 5315 o.width = t.offsetWidth, o.height = t.offsetHeight; 5316 for (var u = o.isBorderBox = !(!p || !n[p] || "border-box" !== n[p]), f = 0, c = s.length; c > f; f++) { 5317 var d = s[f], l = n[d]; 5318 l = a(t, l); 5319 var m = parseFloat(l); 5320 o[d] = isNaN(m) ? 0 : m 5321 } 5322 var y = o.paddingLeft + o.paddingRight, g = o.paddingTop + o.paddingBottom, v = o.marginLeft + o.marginRight, b = o.marginTop + o.marginBottom, _ = o.borderLeftWidth + o.borderRightWidth, E = o.borderTopWidth + o.borderBottomWidth, L = u && h, x = e(n.width); 5323 x !== !1 && (o.width = x + (L ? 0 : y + _)); 5324 var z = e(n.height); 5325 return z !== !1 && (o.height = z + (L ? 0 : g + E)), o.innerWidth = o.width - (y + _), o.innerHeight = o.height - (g + E), o.outerWidth = o.width + v, o.outerHeight = o.height + b, o 5326 } 5327 } 5328 5329 function a(t, e) { 5330 if (o || -1 === e.indexOf("%"))return e; 5331 var i = t.style, n = i.left, r = t.runtimeStyle, s = r && r.left; 5332 return s && (r.left = t.currentStyle.left), i.left = e, e = i.pixelLeft, i.left = n, s && (r.left = s), e 5333 } 5334 5335 var h, p = t("boxSizing"); 5336 return function () { 5337 if (p) { 5338 var t = document.createElement("div"); 5339 t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style[p] = "border-box"; 5340 var i = document.body || document.documentElement; 5341 i.appendChild(t); 5342 var n = r(t); 5343 h = 200 === e(n.width), i.removeChild(t) 5344 } 5345 }(), n 5346 } 5347 5348 var o = t.getComputedStyle, r = o ? function (t) { 5349 return o(t, null) 5350 } : function (t) { 5351 return t.currentStyle 5352 }, s = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; 5353 "function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], n) : "object" == typeof exports ? module.exports = n(require("get-style-property")) : t.getSize = n(t.getStyleProperty) 5354}(window), function (t, e) { 5355 function i(t, e) { 5356 return t[a](e) 5357 } 5358 5359 function n(t) { 5360 if (!t.parentNode) { 5361 var e = document.createDocumentFragment(); 5362 e.appendChild(t) 5363 } 5364 } 5365 5366 function o(t, e) { 5367 n(t); 5368 for (var i = t.parentNode.querySelectorAll(e), o = 0, r = i.length; r > o; o++)if (i[o] === t)return!0; 5369 return!1 5370 } 5371 5372 function r(t, e) { 5373 return n(t), i(t, e) 5374 } 5375 5376 var s, a = function () { 5377 if (e.matchesSelector)return"matchesSelector"; 5378 for (var t = ["webkit", "moz", "ms", "o"], i = 0, n = t.length; n > i; i++) { 5379 var o = t[i], r = o + "MatchesSelector"; 5380 if (e[r])return r 5381 } 5382 }(); 5383 if (a) { 5384 var h = document.createElement("div"), p = i(h, "div"); 5385 s = p ? i : r 5386 } else s = o; 5387 "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function () { 5388 return s 5389 }) : window.matchesSelector = s 5390}(this, Element.prototype), function (t) { 5391 function e(t, e) { 5392 for (var i in e)t[i] = e[i]; 5393 return t 5394 } 5395 5396 function i(t) { 5397 for (var e in t)return!1; 5398 return e = null, !0 5399 } 5400 5401 function n(t) { 5402 return t.replace(/([A-Z])/g, function (t) { 5403 return"-" + t.toLowerCase() 5404 }) 5405 } 5406 5407 function o(t, o, r) { 5408 function a(t, e) { 5409 t && (this.element = t, this.layout = e, this.position = {x: 0, y: 0}, this._create()) 5410 } 5411 5412 var h = r("transition"), p = r("transform"), u = h && p, f = !!r
5412("perspective"), c = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend"}[h], d = ["transform", "transition", "transitionDuration", "transitionProperty"], l = function () { 5413 for (var t = {}, e = 0, i = d.length; i > e; e++) { 5414 var n = d[e], o = r(n); 5415 o && o !== n && (t[n] = o) 5416 } 5417 return t 5418 }(); 5419 e(a.prototype, t.prototype), a.prototype._create = function () { 5420 this._transn = {ingProperties: {}, clean: {}, onEnd: {}}, this.css({position: "absolute"}) 5421 }, a.prototype.handleEvent = function (t) { 5422 var e = "on" + t.type; 5423 this[e] && this[e](t) 5424 }, a.prototype.getSize = function () { 5425 this.size = o(this.element) 5426 }, a.prototype.css = function (t) { 5427 var e = this.element.style; 5428 for (var i in t) { 5429 var n = l[i] || i; 5430 e[n] = t[i] 5431 } 5432 }, a.prototype.getPosition = function () { 5433 var t = s(this.element), e = this.layout.options, i = e.isOriginLeft, n = e.isOriginTop, o = parseInt(t[i ? "left" : "right"], 10), r = parseInt(t[n ? "top" : "bottom"], 10); 5434 o = isNaN(o) ? 0 : o, r = isNaN(r) ? 0 : r; 5435 var a = this.layout.size; 5436 o -= i ? a.paddingLeft : a.paddingRight, r -= n ? a.paddingTop : a.paddingBottom, this.position.x = o, this.position.y = r 5437 }, a.prototype.layoutPosition = function () { 5438 var t = this.layout.size, e = this.layout.options, i = {}; 5439 e.isOriginLeft ? (i.left = this.position.x + t.paddingLeft + "px", i.right = "") : (i.right = this.position.x + t.paddingRight + "px", i.left = ""), e.isOriginTop ? (i.top = this.position.y + t.paddingTop + "px", i.bottom = "") : (i.bottom = this.position.y + t.paddingBottom + "px", i.top = ""), this.css(i), this.emitEvent("layout", [this]) 5440 }; 5441 var m = f ? function (t, e) { 5442 return"translate3d(" + t + "px, " + e + "px, 0)" 5443 } : function (t, e) { 5444 return"translate(" + t + "px, " + e + "px)" 5445 }; 5446 a.prototype._transitionTo = function (t, e) { 5447 this.getPosition(); 5448 var i = this.position.x, n = this.position.y, o = parseInt(t, 10), r = parseInt(e, 10), s = o === this.position.x && r === this.position.y; 5449 if (this.setPosition(t, e), s && !this.isTransitioning)return this.layoutPosition(), void 0; 5450 var a = t - i, h = e - n, p = {}, u = this.layout.options; 5451 a = u.isOriginLeft ? a : -a, h = u.isOriginTop ? h : -h, p.transform = m(a, h), this.transition({to: p, onTransitionEnd: {transform: this.layoutPosition}, isCleaning: !0}) 5452 }, a.prototype.goTo = function (t, e) { 5453 this.setPosition(t, e), this.layoutPosition() 5454 }, a.prototype.moveTo = u ? a.prototype._transitionTo : a.prototype.goTo, a.prototype.setPosition = function (t, e) { 5455 this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) 5456 }, a.prototype._nonTransition = function (t) { 5457 this.css(t.to), t.isCleaning && this._removeStyles(t.to); 5458 for (var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this) 5459 }, a.prototype._transition = function (t) { 5460 if (!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t), void 0; 5461 var e = this._transn; 5462 for (var i in t.onTransitionEnd)e.onEnd[i] = t.onTransitionEnd[i]; 5463 for (i in t.to)e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); 5464 if (t.from) { 5465 this.css(t.from); 5466 var n = this.element.offsetHeight; 5467 n = null 5468 } 5469 this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 5470 }; 5471 var y = p && n(p) + ",opacity"; 5472 a.prototype.enableTransition = function () { 5473 this.isTransitioning || (this.css({transitionProperty: y, transitionDuration: this.layout.options.transitionDuration}), this.element.addEventListener(c, this, !1)) 5474 }, a.prototype.transition = a.prototype[h ? "_transition" : "_nonTransition"], a.prototype.onwebkitTransitionEnd = function (t) { 5475 this.ontransitionend(t) 5476 }, a.prototype.onotransitionend = function (t) { 5477 this.ontransitionend(t) 5478 }; 5479 var g = {"-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform"}; 5480 a.prototype.ontransitionend = function (t) { 5481 if (t.target === this.element) { 5482 var e = this._transn, n = g[t.propertyName] || t.propertyName; 5483 if (delete e.ingProperties[n], i(e.ingProperties) && this.disableTransition(), n in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[n]), n in e.onEnd) { 5484 var o = e.onEnd[n]; 5485 o.call(this), delete e.onEnd[n] 5486 } 5487 this.emitEvent("transitionEnd", [this]) 5488 } 5489 }, a.prototype.disableTransition = function () { 5490 this.removeTransitionStyles(), this.element.removeEventListener(c, this, !1), this.isTransitioning = !1 5491 }, a.prototype._removeStyles = function (t) { 5492 var e = {}; 5493 for (var i in t)e[i] = ""; 5494 this.css(e) 5495 }; 5496 var v = {transitionProperty: "", transitionDuration: ""}; 5497 return a.prototype.removeTransitionStyles = function () { 5498 this.css(v) 5499 }, a.prototype.removeElem = function () { 5500 this.element.parentNode.removeChild(this.element), this.emitEvent("remove", [this]) 5501 }, a.prototype.remove = function () { 5502 if (!h || !parseFloat(this.layout.options.transitionDuration))return this.removeElem(), void 0; 5503 var t = this; 5504 this.on("transitionEnd", function () { 5505 return t.removeElem(), !0 5506 }), this.hide() 5507 }, a.prototype.reveal = function () { 5508 delete this.isHidden, this.css({display: ""}); 5509 var t = this.layout.options; 5510 this.transition({from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0}) 5511 }, a.prototype.hide = function () { 5512 this.isHidden = !0, this.css({display: ""}); 5513 var t = this.layout.options; 5514 this.transition({from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: {opacity: function () { 5515 this.isHidden && this.css({display: "none"}) 5516 }}}) 5517 }, a.prototype.destroy = function () { 5518 this.css({position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: ""}) 5519 }, a 5520 } 5521 5522 var r = document.defaultView, s = r && r.getComputedStyle ? function (t) { 5523 return r.getComputedStyle(t, null) 5524 } : function (t) { 5525 return t.currentStyle 5526 }; 5527 "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property"], o) : (t.Outlayer = {}, t.Outlayer.Item = o(t.EventEmitter, t.getSize, t.getStyleProperty)) 5528}(window), function (t) { 5529 function e(t, e) { 5530 for (var i in e)t[i] = e[i]; 5531 return t 5532 } 5533 5534 function i(t) { 5535 return"[object Array]" === f.call(t) 5536 } 5537 5538 function n(t) { 5539 var e = []; 5540 if (i(t))e = t; else if (t && "number" == typeof t.length)for (var n = 0, o = t.length; o > n; n++)e.push(t[n]); else e.push(t); 5541 return e 5542 } 5543 5544 function o(t, e) { 5545 var i = d(e, t); 5546 -1 !== i && e.splice(i, 1) 5547 } 5548 5549 function r(t) { 5550 return t.replace(/(.)([A-Z])/g,function (t, e, i) { 5551 return e + "-" + i 5552 }).toLowerCase() 5553 } 5554 5555 function s(i, s, f, d, l, m) { 5556 function y(t, i) { 5557 if ("string" == typeof t && (t = a.querySelector(t)), !t || !c(t))return h && h.error("Bad " + this.constructor.namespace + " element: " + t), void 0; 5558 this.element = t, this.options = e({}, this.options), this.option(i); 5559 var n = ++v; 5560 this.element.outlayerGUID = n, b[n] = this, this._create(), this.options.isInitLayout && this.layout() 5561 } 5562 5563 function g(t, i) { 5564 t.prototype[i] = e({}, y.prototype[i]) 5565 } 5566 5567 var v = 0, b = {}; 5568 return y.namespace = "outlayer", y.Item = m, y.prototype.options = {containerStyle: {position: "relative"}, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, transitionDuration: "0.4s", hiddenStyle: {opacity: 0, transform: "scale(0.001)"}, visibleStyle: {opacity: 1, transform: "scale(1)"}}, e(y.prototype, f.prototype), y.prototype.option = function (t) { 5569 e(this.options, t) 5570 }, y.prototype._create = function () { 5571 this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() 5572 }, y.prototype.reloadItems = function () { 5573 this.items = this._itemize(this.element.children) 5574 }, y.prototype._itemize = function (t) { 5575 for (var e = this._filterFindItemElements(t), i = this.constructor.Item, n = [], o = 0, r = e.length; r > o; o++) { 5576 var s = e[o], a = new i(s, this); 5577 n.push(a) 5578 } 5579 return n 5580 }, y.prototype._filterFindItemElements = function (t) { 5581 t = n(t); 5582 for (var e = this.options.itemSelector, i = [], o = 0, r = t.length; r > o; o++) { 5583 var s = t[o]; 5584 if (c(s))if (e) { 5585 l(s, e) && i.push(s); 5586 for (var a = s.querySelectorAll(e), h = 0, p = a.length; p > h; h++)i.push(a[h]) 5587 } else i.push(s) 5588 } 5589 return i 5590 }, y.prototype.getItemElements = function () { 5591 for (var t = [], e = 0, i = this.items.length; i > e; e++)t.push(this.items[e].element); 5592 return t 5593 }, y.prototype.layout = function () { 5594 this._resetLayout(), this._manageStamps(); 5595 var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; 5596 this.layoutItems(this.items, t), this._isLayoutInited = !0 5597 }, y.prototype._init = y.prototype.layout, y.prototype._resetLayout = function () {
5598 this.getSize() 5599 }, y.prototype.getSize = function () { 5600 this.size = d(this.element) 5601 }, y.prototype._getMeasurement = function (t, e) { 5602 var i, n = this.options[t]; 5603 n ? ("string" == typeof n ? i = this.element.querySelector(n) : c(n) && (i = n), this[t] = i ? d(i)[e] : n) : this[t] = 0 5604 }, y.prototype.layoutItems = function (t, e) { 5605 t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() 5606 }, y.prototype._getItemsForLayout = function (t) { 5607 for (var e = [], i = 0, n = t.length; n > i; i++) { 5608 var o = t[i]; 5609 o.isIgnored || e.push(o) 5610 } 5611 return e 5612 }, y.prototype._layoutItems = function (t, e) { 5613 function i() { 5614 n.emitEvent("layoutComplete", [n, t]) 5615 } 5616 5617 var n = this; 5618 if (!t || !t.length)return i(), void 0; 5619 this._itemsOn(t, "layout", i); 5620 for (var o = [], r = 0, s = t.length; s > r; r++) { 5621 var a = t[r], h = this._getItemLayoutPosition(a); 5622 h.item = a, h.isInstant = e || a.isLayoutInstant, o.push(h) 5623 } 5624 this._processLayoutQueue(o) 5625 }, y.prototype._getItemLayoutPosition = function () { 5626 return{x: 0, y: 0} 5627 }, y.prototype._processLayoutQueue = function (t) { 5628 for (var e = 0, i = t.length; i > e; e++) { 5629 var n = t[e]; 5630 this._positionItem(n.item, n.x, n.y, n.isInstant) 5631 } 5632 }, y.prototype._positionItem = function (t, e, i, n) { 5633 n ? t.goTo(e, i) : t.moveTo(e, i) 5634 }, y.prototype._postLayout = function () { 5635 var t = this._getContainerSize(); 5636 t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) 5637 }, y.prototype._getContainerSize = u, y.prototype._setContainerMeasure = function (t, e) { 5638 if (void 0 !== t) { 5639 var i = this.size; 5640 i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" 5641 } 5642 }, y.prototype._itemsOn = function (t, e, i) { 5643 function n() { 5644 return o++, o === r && i.call(s), !0 5645 } 5646 5647 for (var o = 0, r = t.length, s = this, a = 0, h = t.length; h > a; a++) { 5648 var p = t[a]; 5649 p.on(e, n) 5650 } 5651 }, y.prototype.ignore = function (t) { 5652 var e = this.getItem(t); 5653 e && (e.isIgnored = !0) 5654 }, y.prototype.unignore = function (t) { 5655 var e = this.getItem(t); 5656 e && delete e.isIgnored 5657 }, y.prototype.stamp = function (t) { 5658 if (t = this._find(t)) { 5659 this.stamps = this.stamps.concat(t); 5660 for (var e = 0, i = t.length; i > e; e++) { 5661 var n = t[e]; 5662 this.ignore(n) 5663 } 5664 } 5665 }, y.prototype.unstamp = function (t) { 5666 if (t = this._find(t))for (var e = 0, i = t.length; i > e; e++) { 5667 var n = t[e]; 5668 o(n, this.stamps), this.unignore(n) 5669 } 5670 }, y.prototype._find = function (t) { 5671 return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = n(t)) : void 0 5672 }, y.prototype._manageStamps = function () { 5673 if (this.stamps && this.stamps.length) { 5674 this._getBoundingRect(); 5675 for (var t = 0, e = this.stamps.length; e > t; t++) { 5676 var i = this.stamps[t]; 5677 this._manageStamp(i) 5678 } 5679 } 5680 }, y.prototype._getBoundingRect = function () { 5681 var t = this.element.getBoundingClientRect(), e = this.size; 5682 this._boundingRect = {left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth)} 5683 }, y.prototype._manageStamp = u, y.prototype._getElementOffset = function (t) { 5684 var e = t.getBoundingClientRect(), i = this._boundingRect, n = d(t), o = {left: e.left - i.left - n.marginLeft, top: e.top - i.top - n.marginTop, right: i.right - e.right - n.marginRight, bottom: i.bottom - e.bottom - n.marginBottom}; 5685 return o 5686 }, y.prototype.handleEvent = function (t) { 5687 var e = "on" + t.type; 5688 this[e] && this[e](t) 5689 }, y.prototype.bindResize = function () { 5690 this.isResizeBound || (i.bind(t, "resize", this), this.isResizeBound = !0) 5691 }, y.prototype.unbindResize = function () { 5692 i.unbind(t, "resize", this), this.isResizeBound = !1 5693 }, y.prototype.onresize = function () { 5694 function t() { 5695 e.resize(), delete e.resizeTimeout 5696 } 5697 5698 this.resizeTimeout && clearTimeout(this.resizeTimeout); 5699 var e = this; 5700 this.resizeTimeout = setTimeout(t, 100) 5701 }, y.prototype.resize = function () { 5702 var t = d(this.element), e = this.size && t; 5703 e && t.innerWidth === this.size.innerWidth || this.layout() 5704 }, y.prototype.addItems = function (t) { 5705 var e = this._itemize(t); 5706 return e.length && (this.items = this.items.concat(e)), e 5707 }, y.prototype.appended = function (t) { 5708 var e = this.addItems(t); 5709 e.length && (this.layoutItems(e, !0), this.reveal(e)) 5710 }, y.prototype.prepended = function (t) { 5711 var e = this._itemize(t); 5712 if (e.length) { 5713 var i = this.items.slice(0); 5714 this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) 5715 } 5716 }, y.prototype.reveal = function (t) { 5717 var e = t && t.length; 5718 if (e)for (var i = 0; e > i; i++) { 5719 var n = t[i]; 5720 n.reveal() 5721 } 5722 }, y.prototype.hide = function (t) { 5723 var e = t && t.length; 5724 if (e)for (var i = 0; e > i; i++) { 5725 var n = t[i]; 5726 n.hide() 5727 } 5728 }, y.prototype.getItem = function (t) { 5729 for (var e = 0, i = this.items.length; i > e; e++) { 5730 var n = this.items[e]; 5731 if (n.element === t)return n 5732 } 5733 }, y.prototype.getItems = function (t) { 5734 if (t && t.length) { 5735 for (var e = [], i = 0, n = t.length; n > i; i++) { 5736 var o = t[i], r = this.getItem(o); 5737 r && e.push(r) 5738 } 5739 return e 5740 } 5741 }, y.prototype.remove = function (t) { 5742 t = n(t); 5743 var e = this.getItems(t); 5744 if (e && e.length) { 5745 this._itemsOn(e, "remove", function () { 5746 this.emitEvent("removeComplete", [this, e]) 5747 }); 5748 for (var i = 0, r = e.length; r > i; i++) { 5749 var s = e[i]; 5750 s.remove(), o(s, this.items) 5751 } 5752 } 5753 }, y.prototype.destroy = function () { 5754 var t = this.element.style; 5755 t.height = "", t.position = "", t.width = ""; 5756 for (var e = 0, i = this.items.length; i > e; e++) { 5757 var n = this.items[e]; 5758 n.destroy() 5759 } 5760 this.unbindResize(), delete this.element.outlayerGUID, p && p.removeData(this.element, this.constructor.namespace) 5761 }, y.data = function (t) { 5762 var e = t && t.outlayerGUID; 5763 return e && b[e] 5764 }, y.create = function (t, i) { 5765 function n() { 5766 y.apply(this, arguments) 5767 } 5768 5769 return Object.create ? n.prototype = Object.create(y.prototype) : e(n.prototype, y.prototype), n.prototype.constructor = n, g(n, "options"), e(n.prototype.options, i), n.namespace = t, n.data = y.data, n.Item = function () { 5770 m.apply(this, arguments) 5771 }, n.Item.prototype = new m, s(function () { 5772 for (var e = r(t), i = a.querySelectorAll(".js-" + e), o = "data-" + e + "-options", s = 0, u = i.length; u > s; s++) { 5773 var f, c = i[s], d = c.getAttribute(o); 5774 try { 5775 f = d && JSON.parse(d) 5776 } catch (l) { 5777 h && h.error("Error parsing " + o + " on " + c.nodeName.toLowerCase() + (c.id ? "#" + c.id : "") + ": " + l); 5778 continue 5779 } 5780 var m = new n(c, f); 5781 p && p.data(c, t, m) 5782 } 5783 }), p && p.bridget && p.bridget(t, n), n 5784 }, y.Item = m, y 5785 } 5786 5787 var a = t.document, h = t.console, p = t.jQuery, u = function () { 5788 }, f = Object.prototype.toString, c = "object" == typeof HTMLElement ? function (t) { 5789 return t instanceof HTMLElement 5790 } : function (t) { 5791 return t && "object" == typeof t && 1 === t.nodeType && "string" == typeof t.nodeName 5792 }, d = Array.prototype.indexOf ? function (t, e) { 5793 return t.indexOf(e) 5794 } : function (t, e) { 5795 for (var i = 0, n = t.length; n > i; i++)if (t[i] === e)return i; 5796 return-1 5797 }; 5798 "function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "doc-ready/doc-ready", "eventEmitter/EventEmitter", "get-size/get-size", "matches-selector/matches-selector", "./item"], s) : t.Outlayer = s(t.eventie, t.docReady, t.EventEmitter, t.getSize, t.matchesSelector, t.Outlayer.Item) 5799}(window), function (t) { 5800 function e(t, e) { 5801 var n = t.create("masonry"); 5802 return n.prototype._resetLayout = function () {
5803 this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); 5804 var t = this.cols; 5805 for (this.colYs = []; t--;)this.colYs.push(0); 5806 this.maxY = 0 5807 }, n.prototype.measureColumns = function () { 5808 if (this.getContainerWidth(), !this.columnWidth) { 5809 var t = this.items[0], i = t && t.element; 5810 this.columnWidth = i && e(i).outerWidth || this.containerWidth 5811 } 5812 this.columnWidth += this.gutter, this.cols = Math.floor((this.containerWidth + this.gutter) / this.columnWidth), this.cols = Math.max(this.cols, 1) 5813 }, n.prototype.getContainerWidth = function () { 5814 var t = this.options.isFitWidth ? this.element.parentNode : this.element, i = e(t); 5815 this.containerWidth = i && i.innerWidth 5816 }, n.prototype._getItemLayoutPosition = function (t) { 5817 t.getSize(); 5818 var e = t.size.outerWidth % this.columnWidth, n = e && 1 > e ? "round" : "ceil", o = Math[n](t.size.outerWidth / this.columnWidth); 5819 o = Math.min(o, this.cols); 5820 for (var r = this._getColGroup(o), s = Math.min.apply(Math, r), a = i(r, s), h = {x: this.columnWidth * a, y: s}, p = s + t.size.outerHeight, u = this.cols + 1 - r.length, f = 0; u > f; f++)this.colYs[a + f] = p; 5821 return h 5822 }, n.prototype._getColGroup = function (t) { 5823 if (2 > t)return this.colYs; 5824 for (var e = [], i = this.cols + 1 - t, n = 0; i > n; n++) { 5825 var o = this.colYs.slice(n, n + t); 5826 e[n] = Math.max.apply(Math, o) 5827 } 5828 return e 5829 }, n.prototype._manageStamp = function (t) { 5830 var i = e(t), n = this._getElementOffset(t), o = this.options.isOriginLeft ? n.left : n.right, r = o + i.outerWidth, s = Math.floor(o / this.columnWidth); 5831 s = Math.max(0, s); 5832 var a = Math.floor(r / this.columnWidth); 5833 a -= r % this.columnWidth ? 0 : 1, a = Math.min(this.cols - 1, a); 5834 for (var h = (this.options.isOriginTop ? n.top : n.bottom) + i.outerHeight, p = s; a >= p; p++)this.colYs[p] = Math.max(h, this.colYs[p]) 5835 }, n.prototype._getContainerSize = function () { 5836 this.maxY = Math.max.apply(Math, this.colYs); 5837 var t = {height: this.maxY}; 5838 return this.options.isFitWidth && (t.width = this._getContainerFitWidth()), t 5839 }, n.prototype._getContainerFitWidth = function () { 5840 for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];)t++; 5841 return(this.cols - t) * this.columnWidth - this.gutter 5842 }, n.prototype.resize = function () { 5843 var t = this.containerWidth; 5844 this.getContainerWidth(), t !== this.containerWidth && this.layout() 5845 }, n 5846 } 5847 5848 var i = Array.prototype.indexOf ? function (t, e) { 5849 return t.indexOf(e) 5850 } : function (t, e) { 5851 for (var i = 0, n = t.length; n > i; i++) { 5852 var o = t[i]; 5853 if (o === e)return i 5854 } 5855 return-1 5856 }; 5857 "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size"], e) : t.Masonry = e(t.Outlayer, t.getSize) 5858}(window); 5859/* Modernizr 2.7.1 (Custom Build) | MIT & BSD 5860 * Build: http://modernizr.com/download/#-flexbox-flexboxlegacy-opacity-cssanimations-csstransitions-shiv-cssclasses-testprop-testallprops-prefixes-domprefixes-load 5861 */ 5862; 5863window.Modernizr = function (a, b, c) { 5864 function y(a) { 5865 j.cssText = a 5866 } 5867 5868 function z(a, b) { 5869 return y(m.join(a + ";") + (b || "")) 5870 } 5871 5872 function A(a, b) { 5873 return typeof a === b 5874 } 5875 5876 function B(a, b) { 5877 return!!~("" + a).indexOf(b) 5878 } 5879 5880 function C(a, b) { 5881 for (var d in a) { 5882 var e = a[d]; 5883 if (!B(e, "-") && j[e] !== c)return b == "pfx" ? e : !0 5884 } 5885 return!1 5886 } 5887 5888 function D(a, b, d) { 5889 for (var e in a) { 5890 var f = b[a[e]]; 5891 if (f !== c)return d === !1 ? a[e] : A(f, "function") ? f.bind(d || b) : f 5892 } 5893 return!1 5894 } 5895 5896 function E(a, b, c) { 5897 var d = a.charAt(0).toUpperCase() + a.slice(1), e = (a + " " + o.join(d + " ") + d).split(" "); 5898 return A(b, "string") || A(b, "undefined") ? C(e, b) : (e = (a + " " + p.join(d + " ") + d).split(" "), D(e, b, c)) 5899 } 5900 5901 var d = "2.7.1", e = {}, f = !0, g = b.documentElement, h = "modernizr", i = b.createElement(h), j = i.style, k, l = {}.toString, m = " -webkit- -moz- -o- -ms- ".split(" "), n = "Webkit Moz O ms", o = n.split(" "), p = n.toLowerCase().split(" "), q = {}, r = {}, s = {}, t = [], u = t.slice, v, w = {}.hasOwnProperty, x; 5902 !A(w, "undefined") && !A(w.call, "undefined") ? x = function (a, b) { 5903 return w.call(a, b) 5904 } : x = function (a, b) { 5905 return b in a && A(a.constructor.prototype[b], "undefined") 5906 }, Function.prototype.bind || (Function.prototype.bind = function (b) { 5907 var c = this; 5908 if (typeof c != "function")throw new TypeError; 5909 var d = u.call(arguments, 1), e = function () { 5910 if (this instanceof e) { 5911 var a = function () { 5912 }; 5913 a.prototype = c.prototype; 5914 var f = new a, g = c.apply(f, d.concat(u.call(arguments))); 5915 return Object(g) === g ? g : f 5916 } 5917 return c.apply(b, d.concat(u.call(arguments))) 5918 }; 5919 return e 5920 }), q.flexbox = function () { 5921 return E("flexWrap") 5922 }, q.flexboxlegacy = function () { 5923 return E("boxDirection") 5924 }, q.opacity = function () {
vendor: 4,282 bytes, lines 5925-6003
5925 return z("opacity:.55"), /^0.55$/.test(j.opacity) 5926 }, q.cssanimations = function () { 5927 return E("animationName") 5928 }, q.csstransitions = function () { 5929 return E("transition") 5930 }; 5931 for (var F in q)x(q, F) && (v = F.toLowerCase(), e[v] = q[F](), t.push((e[v] ? "" : "no-") + v)); 5932 return e.addTest = function (a, b) { 5933 if (typeof a == "object")for (var d in a)x(a, d) && e.addTest(d, a[d]); else { 5934 a = a.toLowerCase(); 5935 if (e[a] !== c)return e; 5936 b = typeof b == "function" ? b() : b, typeof f != "undefined" && f && (g.className += " " + (b ? "" : "no-") + a), e[a] = b 5937 } 5938 return e 5939 }, y(""), i = k = null, function (a, b) { 5940 function l(a, b) { 5941 var c = a.createElement("p"), d = a.getElementsByTagName("head")[0] || a.documentElement; 5942 return c.innerHTML = "x<style>" + b + "</style>", d.insertBefore(c.lastChild, d.firstChild) 5943 } 5944 5945 function m() { 5946 var a = s.elements; 5947 return typeof a == "string" ? a.split(" ") : a 5948 } 5949 5950 function n(a) { 5951 var b = j[a[h]]; 5952 return b || (b = {}, i++, a[h] = i, j[i] = b), b 5953 } 5954 5955 function o(a, c, d) { 5956 c || (c = b); 5957 if (k)return c.createElement(a); 5958 d || (d = n(c)); 5959 var g; 5960 return d.cache[a] ? g = d.cache[a].cloneNode() : f.test(a) ? g = (d.cache[a] = d.createElem(a)).cloneNode() : g = d.createElem(a), g.canHaveChildren && !e.test(a) && !g.tagUrn ? d.frag.appendChild(g) : g 5961 } 5962 5963 function p(a, c) { 5964 a || (a = b); 5965 if (k)return a.createDocumentFragment(); 5966 c = c || n(a); 5967 var d = c.frag.cloneNode(), e = 0, f = m(), g = f.length; 5968 for (; e < g; e++)d.createElement(f[e]); 5969 return d 5970 } 5971 5972 function q(a, b) { 5973 b.cache || (b.cache = {}, b.createElem = a.createElement, b.createFrag = a.createDocumentFragment, b.frag = b.createFrag()), a.createElement = function (c) { 5974 return s.shivMethods ? o(c, a, b) : b.createElem(c) 5975 }, a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function (a) { 5976 return b.createElem(a), b.frag.createElement(a), 'c("' + a + '")' 5977 }) + ");return n}")(s, b.frag) 5978 } 5979 5980 function r(a) { 5981 a || (a = b); 5982 var c = n(a); 5983 return s.shivCSS && !g && !c.hasCSS && (c.hasCSS = !!l(a, "article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")), k || q(a, c), a 5984 } 5985 5986 var c = "3.7.0", d = a.html5 || {}, e = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, f = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, g, h = "_html5shiv", i = 0, j = {}, k; 5987 (function () { 5988 try { 5989 var a = b.createElement("a"); 5990 a.innerHTML = "<xyz></xyz>", g = "hidden"in a, k = a.childNodes.length == 1 || function () { 5991 b.createElement("a"); 5992 var a = b.createDocumentFragment(); 5993 return typeof a.cloneNode == "undefined" || typeof a.createDocumentFragment == "undefined" || typeof a.createElement == "undefined" 5994 }() 5995 } catch (c) { 5996 g = !0, k = !0 5997 } 5998 })(); 5999 var s = {elements: d.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video", version: c, shivCSS: d.shivCSS !== !1, supportsUnknownElements: k, shivMethods: d.shivMethods !== !1, type: "default", shivDocument: r, createElement: o, createDocumentFragment: p}; 6000 a.html5 = s, r(b) 6001 }(this, b), e._version = d, e._prefixes = m, e._domPrefixes = p, e._cssomPrefixes = o, e.testProp = function (a) { 6002 return C([a]) 6003 }, e.testAllProps = E, g.className = g.className.replace(/(^|\s)no-js(\s|$)/, "$1$2") + (f ? " js " + t.j
vendor: 6,642 bytes, lines 6003-6124
6003oin(" ") : ""), e 6004}(this, this.document), function (a, b, c) { 6005 function d(a) { 6006 return"[object Function]" == o.call(a) 6007 } 6008 6009 function e(a) { 6010 return"string" == typeof a 6011 } 6012 6013 function f() { 6014 } 6015 6016 function g(a) { 6017 return!a || "loaded" == a || "complete" == a || "uninitialized" == a 6018 } 6019 6020 function h() { 6021 var a = p.shift(); 6022 q = 1, a ? a.t ? m(function () { 6023 ("c" == a.t ? B.injectCss : B.injectJs)(a.s, 0, a.a, a.x, a.e, 1) 6024 }, 0) : (a(), h()) : q = 0 6025 } 6026 6027 function i(a, c, d, e, f, i, j) { 6028 function k(b) { 6029 if (!o && g(l.readyState) && (u.r = o = 1, !q && h(), l.onload = l.onreadystatechange = null, b)) { 6030 "img" != a && m(function () { 6031 t.removeChild(l) 6032 }, 50); 6033 for (var d in y[c])y[c].hasOwnProperty(d) && y[c][d].onload() 6034 } 6035 } 6036 6037 var j = j || B.errorTimeout, l = b.createElement(a), o = 0, r = 0, u = {t: d, s: c, e: f, a: i, x: j}; 6038 1 === y[c] && (r = 1, y[c] = []), "object" == a ? l.data = c : (l.src = c, l.type = a), l.width = l.height = "0", l.onerror = l.onload = l.onreadystatechange = function () { 6039 k.call(this, r) 6040 }, p.splice(e, 0, u), "img" != a && (r || 2 === y[c] ? (t.insertBefore(l, s ? null : n), m(k, j)) : y[c].push(l)) 6041 } 6042 6043 function j(a, b, c, d, f) { 6044 return q = 0, b = b || "j", e(a) ? i("c" == b ? v : u, a, b, this.i++, c, d, f) : (p.splice(this.i++, 0, a), 1 == p.length && h()), this 6045 } 6046 6047 function k() { 6048 var a = B; 6049 return a.loader = {load: j, i: 0}, a 6050 } 6051 6052 var l = b.documentElement, m = a.setTimeout, n = b.getElementsByTagName("script")[0], o = {}.toString, p = [], q = 0, r = "MozAppearance"in l.style, s = r && !!b.createRange().compareNode, t = s ? l : n.parentNode, l = a.opera && "[object Opera]" == o.call(a.opera), l = !!b.attachEvent && !l, u = r ? "object" : l ? "script" : "img", v = l ? "script" : u, w = Array.isArray || function (a) { 6053 return"[object Array]" == o.call(a) 6054 }, x = [], y = {}, z = {timeout: function (a, b) { 6055 return b.length && (a.timeout = b[0]), a 6056 }}, A, B; 6057 B = function (a) { 6058 function b(a) { 6059 var a = a.split("!"), b = x.length, c = a.pop(), d = a.length, c = {url: c, origUrl: c, prefixes: a}, e, f, g; 6060 for (f = 0; f < d; f++)g = a[f].split("="), (e = z[g.shift()]) && (c = e(c, g)); 6061 for (f = 0; f < b; f++)c = x[f](c); 6062 return c 6063 } 6064 6065 function g(a, e, f, g, h) { 6066 var i = b(a), j = i.autoCallback; 6067 i.url.split(".").pop().split("?").shift(), i.bypass || (e && (e = d(e) ? e : e[a] || e[g] || e[a.split("/").pop().split("?")[0]]), i.instead ? i.instead(a, e, f, g, h) : (y[i.url] ? i.noexec = !0 : y[i.url] = 1, f.load(i.url, i.forceCSS || !i.forceJS && "css" == i.url.split(".").pop().split("?").shift() ? "c" : c, i.noexec, i.attrs, i.timeout), (d(e) || d(j)) && f.load(function () { 6068 k(), e && e(i.origUrl, h, g), j && j(i.origUrl, h, g), y[i.url] = 2 6069 }))) 6070 } 6071 6072 function h(a, b) { 6073 function c(a, c) { 6074 if (a) { 6075 if (e(a))c || (j = function () { 6076 var a = [].slice.call(arguments); 6077 k.apply(this, a), l() 6078 }), g(a, j, b, 0, h); else if (Object(a) === a)for (n in m = function () { 6079 var b = 0, c; 6080 for (c in a)a.hasOwnProperty(c) && b++; 6081 return b 6082 }(), a)a.hasOwnProperty(n) && (!c && !--m && (d(j) ? j = function () { 6083 var a = [].slice.call(arguments); 6084 k.apply(this, a), l() 6085 } : j[n] = function (a) { 6086 return function () { 6087 var b = [].slice.call(arguments); 6088 a && a.apply(this, b), l() 6089 } 6090 }(k[n])), g(a[n], j, b, n, h)) 6091 } else!c && l() 6092 } 6093 6094 var h = !!a.test, i = a.load || a.both, j = a.callback || f, k = j, l = a.complete || f, m, n; 6095 c(h ? a.yep : a.nope, !!i), i && c(i) 6096 } 6097 6098 var i, j, l = this.yepnope.loader; 6099 if (e(a))g(a, 0, l, 0); else if (w(a))for (i = 0; i < a.length; i++)j = a[i], e(j) ? g(j, 0, l, 0) : w(j) ? B(j) : Object(j) === j && h(j, l); else Object(a) === a && h(a, l) 6100 }, B.addPrefix = function (a, b) { 6101 z[a] = b 6102 }, B.addFilter = function (a) { 6103 x.push(a) 6104 }, B.errorTimeout = 1e4, null == b.readyState && b.addEventListener && (b.readyState = "loading", b.addEventListener("DOMContentLoaded", A = function () { 6105 b.removeEventListener("DOMContentLoaded", A, 0), b.readyState = "complete" 6106 }, 0)), a.yepnope = k(), a.yepnope.executeStack = h, a.yepnope.injectJs = function (a, c, d, e, i, j) { 6107 var k = b.createElement("script"), l, o, e = e || B.errorTimeout; 6108 k.src = a; 6109 for (o in d)k.setAttribute(o, d[o]); 6110 c = j ? h : c || f, k.onreadystatechange = k.onload = function () { 6111 !l && g(k.readyState) && (l = 1, c(), k.onload = k.onreadystatechange = null) 6112 }, m(function () { 6113 l || (l = 1, c(1)) 6114 }, e), i ? k.onload() : n.parentNode.insertBefore(k, n) 6115 }, a.yepnope.injectCss = function (a, c, d, e, g, i) { 6116 var e = b.createElement("link"), j, c = i ? h : c || f; 6117 e.href = a, e.rel = "stylesheet", e.type = "text/css"; 6118 for (j in d)e.setAttribute(j, d[j]); 6119 g || (n.parentNode.insertBefore(e, n), m(c, 0)) 6120 } 6121}(this, document), Modernizr.load = function () { 6122 yepnope.apply(window, [].slice.call(arguments, 0)) 6123}; 6124!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}
6124function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>
6124d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translated"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))}
6124,e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translated","translated"]),this.animate(this.coordinates(a)),this.release(["translated","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1
6124)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":
6124a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":
6124a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translated.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay() 6125},this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)}
6125,this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-control
6125s"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":
6125a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document); 6126/** Created by Jamie Lomas on 20/10/2015. **/ 6127 6128(function ($) { 6129 $.fn.extend({ 6130 pixellipsis: function () { 6131 6132 return this.each(function () { 6133 6134 var ths = $(this); 6135 6136 addMarkup(ths); 6137 6138 setTimeout(function (){ 6139 if ($('.elip_inner', ths).height() > ths.innerHeight()) { 6140 6141 shortenText(ths); 6142 6143 trimWords(ths); 6144 6145 addDots(ths); 6146 6147 } 6148 }, 500); 6149 6150 $(window).resize(function () { 6151 6152 afterResize(function () { 6153 6154 $('.elip_inner', ths).html(ths.data('origtext')); 6155 6156 if ($('.elip_inner', ths).height() > ths.innerHeight()) { 6157 6158 shortenText(ths); 6159 6160 trimWords(ths); 6161 6162 addDots(ths); 6163 6164 } 6165 }, 500); 6166 6167 }); 6168 6169 var afterResize = (function () { 6170 6171 var timer = 0; 6172 6173 return function (callback, ms) { 6174 6175 clearTimeout(timer); 6176 6177 timer = setTimeout(callback, ms); 6178 6179 }; 6180 6181 })(); 6182 6183 }); 6184 6185 function addDots(ths) { 6186 6187 if ($('.elip_inner', ths).height() > ths.innerHeight()) { 6188 6189 $('.elip_inner', ths).text(function (i, text) { 6190 6191 return text.slice(0, -1).trim(); 6192 6193 }); 6194 6195 addDots(ths); 6196 6197 }else{ 6198 6199 $('.elip_inner', ths).text(function (i, text) { 6200 6201 return text.slice(0, -2).trim(); 6202 6203 }); 6204 6205 $('.elip_inner', ths).append('...'); 6206 6207 } 6208 6209 } 6210 6211 6212 function trimWords(ths) { 6213 6214 if ($('.elip_inner', ths).height() > ths.innerHeight()) { 6215 6216 $('.elip_inner', ths).text(function (i, text) { 6217 6218 lastword = text.split(" ").pop(); 6219 6220 return text.substring(0, text.lastIndexOf(" ")); 6221 6222 }); 6223 6224 trimWords(ths); 6225 6226 } else { 6227 6228 $('.elip_inner', ths).append(" " +lastword); 6229 6230 } 6231 6232 } 6233 6234 function shortenText(ths) { 6235 6236 var text = ths.attr('data-origtext'), words = text.split(" "), ths_ht = ths.innerHeight(), get_line_height = ths.css('line-height'); 6237 6238 if(get_line_height == 'normal') 6239 ths.css('line-height','1.4') 6240 6241 6242 line_height = parseFloat(ths.css('line-height'), 10); 6243 6244 var line_amount = ths_ht/line_height; 6245 6246 $('.elip_inner', ths).html(''); 6247 6248 for (var i = 0; i < words.length; i++) { 6249 6250 if ($('.elip_inner', ths).height() < line_height*2) { 6251 6252 $('.elip_inner', ths).append(words[i]+ " "); 6253 6254 } 6255 } 6256 6257 var line_count = ($('.elip_inner', ths).text().length*line_amount); 6258 6259 $('.elip_inner', ths).text(jQuery.trim(text).substring(0, line_count).trim(this)); 6260 6261 } 6262 6263 function addMarkup(ths) { 6264 6265 if ($('.elip_inner', ths).length < 1) { 6266 6267 //var orig_text = ths.html(); 6268 var orig_text = ths.html(ths.html()).text(); 6269 6270 ths.attr('data-origtext', orig_text); 6271 6272 } 6273 6274 if ($('.elip_inner', ths).length > 0) { 6275 6276 $('.elip_inner', ths).html(ths.attr('data-origtext')); 6277 6278 } else { 6279 6280 ths.wrapInner('<span style="display: block; min-height: 1px" class="elip_inner"></span>'); 6281 6282 } 6283 6284 } 6285 6286 } 6287 }); 6288})(jQuery); 6289function scroll_sections(){ 6290 var scroll_sections_wrapper_id = 'scrolltosections'; 6291 var scroll_sections_class = 'section'; 6292 var scroll_sections_nav_class = 'section_nav'; 6293 6294 var ths = $('#'+scroll_sections_wrapper_id+''); 6295 var nav = $('.'+scroll_sections_nav_class+''); 6296 6297 if (ths.children('.'+scroll_sections_nav_class+'').length < 1) { 6298 //ths.prepend('<nav class="'+scroll_sections_nav_class+' hide-md"><ul></ul></nav>'); 6299 $("#showhide_side_panel_wrap").prepend('<nav class="'+scroll_sections_nav_class+' hide-md"><ul></ul></nav>'); 6300 } 6301 6302 $('.' + scroll_sections_class + '').each(function () { 6303 $('.' + scroll_sections_nav_class + ' ul').append('<li class="section_link"><a href="#" title="' + $(this).attr('title') + '" ><span class="title">' + $(this).attr('title') + '</span><span class="arrow"></span><span class="icon"></span></a></li>'); 6304 });
6305 6306 $('.' + scroll_sections_nav_class + ' ul').append('<li class="scrolltonext"><a title="Next Section" href="#"><span>Next Section</span> <i class="fa fa-angle-down"></i></a></li>'); 6307 $('.' + scroll_sections_nav_class + ' ul').prepend('<li class="scrolltoprev"><a title="Previous Section" href="#"><span>Previous Section</span> <i class="fa fa-angle-up"></i></a></li>'); 6308 6309 6310 $('.' + scroll_sections_nav_class + ' ul li.section_link a').on("click", function (e) { 6311 e.preventDefault(); 6312 if ($(this).text() == 'Home') { 6313 $("html, body").stop().animate({scrollTop: 0}, 1300); 6314 } else { 6315 var section_offset = 115; 6316 $('html,body').stop().animate({ 6317 scrollTop: $('.' + scroll_sections_class + '[title="' + $(this).text() + '"]', ths).offset().top - section_offset 6318 }, 1300); 6319 } 6320 6321 }); 6322 6323 $(window).scroll(function () { 6324 var section_offset = 155; 6325 if ($('#home_announcement_wrapper').length > 0) {section_offset = 205;} 6326 $('.'+scroll_sections_class+'').each(function(){ 6327 if ($(window).scrollTop() + section_offset >= $(this).offset().top) { 6328 $('.'+scroll_sections_nav_class+' ul li a').removeClass('active'); 6329 $('.'+scroll_sections_nav_class+' ul li a[title="'+$(this).attr('title')+'"]').addClass('active'); 6330 } 6331 }); 6332 6333 //Hide Show nav when outside of sections 6334 if ($(window).scrollTop() <= ths.offset().top || $(window).scrollTop() + section_offset >= ths.offset().top + ths.height()) { 6335 $('.' + scroll_sections_nav_class + ' ul').fadeOut(); 6336 $('.' + scroll_sections_nav_class + ' ul').fadeOut(); 6337 }else{ 6338 $('.' + scroll_sections_nav_class + ' ul').fadeIn(); 6339 $('.' + scroll_sections_nav_class + ' ul').fadeIn(); 6340 } 6341 6342 6343 //Hide show prev button when on first section 6344 if ($(window).scrollTop() + section_offset <= $(ths).find(".section").first().offset().top + $(ths).find(".section").first().height()) { 6345 $('.' + scroll_sections_nav_class + ' ul li.scrolltoprev').fadeOut(); 6346 }else{ 6347 $('.' + scroll_sections_nav_class + ' ul li.scrolltoprev').fadeIn(); 6348 } 6349 6350 //Hide show next button when on last section 6351 if ($(window).scrollTop() + section_offset >= $(ths).find(".section").last().offset().top) { 6352 $('.' + scroll_sections_nav_class + ' ul li.scrolltonext').fadeOut(); 6353 }else{ 6354 $('.' + scroll_sections_nav_class + ' ul li.scrolltonext').fadeIn(); 6355 } 6356 6357 }); 6358 6359 $('.' + scroll_sections_nav_class + ' ul li.scrolltonext a').on('click', function(e){ 6360 e.preventDefault(); 6361 var active = '.' + scroll_sections_nav_class + ' ul li a.active'; 6362 if($(active).length > 0){ 6363 if($(active).parent('li').next().length > 0){ 6364 $(active).parent('li').next().find('a').click(); 6365 } 6366 } 6367 }); 6368 6369 $('.' + scroll_sections_nav_class + ' ul li.scrolltoprev a').on('click', function(e){ 6370 e.preventDefault(); 6371 var active = '.' + scroll_sections_nav_class + ' ul li a.active'; 6372 if($(active).length > 0){ 6373 if($(active).parent('li').prev().length > 0){ 6374 $(active).parent('li').prev().find('a').click(); 6375 } 6376 } 6377 }); 6378 6379 $(window).scroll(); 6380 6381}; 6382(function ($) { 6383 $.extend({tablesorter: new 6384 function () { 6385 var parsers = [], widgets = []; 6386 this.defaults = {cssHeader: "header", cssAsc: "headerSortUp", cssDesc: "headerSortDown", cssChildRow: "expand-child", sortInitialOrder: "asc", sortMultiSortKey: "shiftKey", sortForce: null, sortAppend: null, sortLocaleCompare: true, textExtraction: "simple", parsers: {}, widgets: [], widgetZebra: {css: ["even", "odd"]}, headers: {}, widthFixed: false, cancelSelection: true, sortList: [], headerList: [], dateFormat: "us", decimal: '/\.|\,/g', onRenderHeader: null, selectorHeaders: 'thead th', debug: false}; 6387 function benchmark(s, d) {
vendor: 27,823 bytes, lines 6388-6987
6388 log(s + "," + (new Date().getTime() - d.getTime()) + "ms"); 6389 } 6390 6391 this.benchmark = benchmark; 6392 function log(s) { 6393 if (typeof console != "undefined" && typeof console.debug != "undefined") { 6394 console.log(s); 6395 } else { 6396 alert(s); 6397 } 6398 } 6399 6400 function buildParserCache(table, $headers) { 6401 if (table.config.debug) { 6402 var parsersDebug = ""; 6403 } 6404 if (table.tBodies.length == 0)return; 6405 var rows = table.tBodies[0].rows; 6406 if (rows[0]) { 6407 var list = [], cells = rows[0].cells, l = cells.length; 6408 for (var i = 0; i < l; i++) { 6409 var p = false; 6410 if ($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)) { 6411 p = getParserById($($headers[i]).metadata().sorter); 6412 } else if ((table.config.headers[i] && table.config.headers[i].sorter)) { 6413 p = getParserById(table.config.headers[i].sorter); 6414 } 6415 if (!p) { 6416 p = detectParserForColumn(table, rows, -1, i); 6417 } 6418 if (table.config.debug) { 6419 parsersDebug += "column:" + i + " parser:" + p.id + "\n"; 6420 } 6421 list.push(p); 6422 } 6423 } 6424 if (table.config.debug) { 6425 log(parsersDebug); 6426 } 6427 return list; 6428 }; 6429 function detectParserForColumn(table, rows, rowIndex, cellIndex) { 6430 var l = parsers.length, node = false, nodeValue = false, keepLooking = true; 6431 while (nodeValue == '' && keepLooking) { 6432 rowIndex++; 6433 if (rows[rowIndex]) { 6434 node = getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex); 6435 nodeValue = trimAndGetNodeText(table.config, node); 6436 if (table.config.debug) { 6437 log('Checking if value was empty on row:' + rowIndex); 6438 } 6439 } else { 6440 keepLooking = false; 6441 } 6442 } 6443 for (var i = 1; i < l; i++) { 6444 if (parsers[i].is(nodeValue, table, node)) { 6445 return parsers[i]; 6446 } 6447 } 6448 return parsers[0]; 6449 } 6450 6451 function getNodeFromRowAndCellIndex(rows, rowIndex, cellIndex) { 6452 return rows[rowIndex].cells[cellIndex]; 6453 } 6454 6455 function trimAndGetNodeText(config, node) { 6456 return $.trim(getElementText(config, node)); 6457 } 6458 6459 function getParserById(name) { 6460 var l = parsers.length; 6461 for (var i = 0; i < l; i++) { 6462 if (parsers[i].id.toLowerCase() == name.toLowerCase()) { 6463 return parsers[i]; 6464 } 6465 } 6466 return false; 6467 } 6468 6469 function buildCache(table) { 6470 if (table.config.debug) { 6471 var cacheTime = new Date(); 6472 } 6473 var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0, totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0, parsers = table.config.parsers, cache = {row: [], normalized: []}; 6474 for (var i = 0; i < totalRows; ++i) { 6475 var c = $(table.tBodies[0].rows[i]), cols = []; 6476 if (c.hasClass(table.config.cssChildRow)) { 6477 cache.row[cache.row.length - 1] = cache.row[cache.row.length - 1].add(c); 6478 continue; 6479 } 6480 cache.row.push(c); 6481 for (var j = 0; j < totalCells; ++j) { 6482 cols.push(parsers[j].format(getElementText(table.config, c[0].cells[j]), table, c[0].cells[j])); 6483 } 6484 cols.push(cache.normalized.length); 6485 cache.normalized.push(cols); 6486 cols = null; 6487 } 6488 ; 6489 if (table.config.debug) { 6490 benchmark("Building cache for " + totalRows + " rows:", cacheTime); 6491 } 6492 return cache; 6493 }; 6494 function getElementText(config, node) { 6495 var text = ""; 6496 if (!node)return""; 6497 if (!config.supportsTextContent)config.supportsTextContent = node.textContent || false; 6498 if (config.textExtraction == "simple") { 6499 if (config.supportsTextContent) { 6500 text = node.textContent; 6501 } else { 6502 if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { 6503 text = node.childNodes[0].innerHTML; 6504 } else { 6505 text = node.innerHTML; 6506 } 6507 } 6508 } else { 6509 if (typeof(config.textExtraction) == "function") { 6510 text = config.textExtraction(node); 6511 } else { 6512 text = $(node).text(); 6513 } 6514 } 6515 return text; 6516 } 6517 6518 function appendToTable(table, cache) { 6519 if (table.config.debug) { 6520 var appendTime = new Date() 6521 } 6522 var c = cache, r = c.row, n = c.normalized, totalRows = n.length, checkCell = (n[0].length - 1), tableBody = $(table.tBodies[0]), rows = []; 6523 for (var i = 0; i < totalRows; i++) { 6524 var pos = n[i][checkCell]; 6525 rows.push(r[pos]); 6526 if (!table.config.appender) { 6527 var l = r[pos].length; 6528 for (var j = 0; j < l; j++) { 6529 tableBody[0].appendChild(r[pos][j]); 6530 } 6531 } 6532 } 6533 if (table.config.appender) { 6534 table.config.appender(table, rows); 6535 } 6536 rows = null; 6537 if (table.config.debug) { 6538 benchmark("Rebuilt table:", appendTime); 6539 } 6540 applyWidget(table); 6541 setTimeout(function () { 6542 $(table).trigger("sortEnd"); 6543 }, 0); 6544 }; 6545 function buildHeaders(table) { 6546 if (table.config.debug) { 6547 var time = new Date(); 6548 } 6549 var meta = ($.metadata) ? true : false; 6550 var header_index = computeTableHeaderCellIndexes(table); 6551 $tableHeaders = $(table.config.selectorHeaders, table).each(function (index) { 6552 this.column = header_index[this.parentNode.rowIndex + "-" + this.cellIndex]; 6553 this.order = formatSortingOrder(table.config.sortInitialOrder); 6554 this.count = this.order; 6555 if (checkHeaderMetadata(this) || checkHeaderOptions(table, index))this.sortDisabled = true; 6556 if (checkHeaderOptionsSortingLocked(table, index))this.order = this.lockedOrder = checkHeaderOptionsSortingLocked(table, index); 6557 if (!this.sortDisabled) { 6558 var $th = $(this).addClass(table.config.cssHeader); 6559 if (table.config.onRenderHeader)table.config.onRenderHeader.apply($th); 6560 } 6561 table.config.headerList[index] = this; 6562 }); 6563 if (table.config.debug) { 6564 benchmark("Built headers:", time); 6565 log($tableHeaders); 6566 } 6567 return $tableHeaders; 6568 }; 6569 function computeTableHeaderCellIndexes(t) { 6570 var matrix = []; 6571 var lookup = {}; 6572 var thead = t.getElementsByTagName('THEAD')[0]; 6573 var trs = thead.getElementsByTagName('TR'); 6574 for (var i = 0; i < trs.length; i++) { 6575 var cells = trs[i].cells; 6576 for (var j = 0; j < cells.length; j++) { 6577 var c = cells[j]; 6578 var rowIndex = c.parentNode.rowIndex; 6579 var cellId = rowIndex + "-" + c.cellIndex; 6580 var rowSpan = c.rowSpan || 1; 6581 var colSpan = c.colSpan || 1 6582 var firstAvailCol; 6583 if (typeof(matrix[rowIndex]) == "undefined") { 6584 matrix[rowIndex] = []; 6585 } 6586 for (var k = 0; k < matrix[rowIndex].length + 1; k++) { 6587 if (typeof(matrix[rowIndex][k]) == "undefined") { 6588 firstAvailCol = k; 6589 break; 6590 } 6591 } 6592 lookup[cellId] = firstAvailCol; 6593 for (var k = rowIndex; k < rowIndex + rowSpan; k++) { 6594 if (typeof(matrix[k]) == "undefined") { 6595 matrix[k] = []; 6596 } 6597 var matrixrow = matrix[k]; 6598 for (var l = firstAvailCol; l < firstAvailCol + colSpan; l++) { 6599 matrixrow[l] = "x"; 6600 } 6601 } 6602 } 6603 } 6604 return lookup; 6605 } 6606 6607 function checkCellColSpan(table, rows, row) { 6608 var arr = [], r = table.tHead.rows, c = r[row].cells; 6609 for (var i = 0; i < c.length; i++) { 6610 var cell = c[i]; 6611 if (cell.colSpan > 1) { 6612 arr = arr.concat(checkCellColSpan(table, headerArr, row++)); 6613 } else { 6614 if (table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row + 1])) { 6615 arr.push(cell); 6616 } 6617 } 6618 } 6619 return arr; 6620 }; 6621 function checkHeaderMetadata(cell) { 6622 if (($.metadata) && ($(cell).metadata().sorter === false)) { 6623 return true; 6624 } 6625 ; 6626 return false; 6627 } 6628 6629 function checkHeaderOptions(table, i) { 6630 if ((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { 6631 return true; 6632 } 6633 ; 6634 return false; 6635 } 6636 6637 function checkHeaderOptionsSortingLocked(table, i) { 6638 if ((table.config.headers[i]) && (table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder; 6639 return false; 6640 } 6641 6642 function applyWidget(table) { 6643 var c = table.config.widgets; 6644 var l = c.length; 6645 for (var i = 0; i < l; i++) { 6646 getWidgetById(c[i]).format(table); 6647 } 6648 } 6649 6650 function getWidgetById(name) { 6651 var l = widgets.length; 6652 for (var i = 0; i < l; i++) { 6653 if (widgets[i].id.toLowerCase() == name.toLowerCase()) { 6654 return widgets[i]; 6655 } 6656 } 6657 }; 6658 function formatSortingOrder(v) { 6659 if (typeof(v) != "Number") { 6660 return(v.toLowerCase() == "desc") ? 1 : 0; 6661 } else { 6662 return(v == 1) ? 1 : 0; 6663 } 6664 } 6665 6666 function isValueInArray(v, a) { 6667 var l = a.length; 6668 for (var i = 0; i < l; i++) { 6669 if (a[i][0] == v) { 6670 return true; 6671 } 6672 } 6673 return false; 6674 } 6675 6676 function setHeadersCss(table, $headers, list, css) { 6677 $headers.removeClass(css[0]).removeClass(css[1]); 6678 var h = []; 6679 $headers.each(function (offset) { 6680 if (!this.sortDisabled) { 6681 h[this.column] = $(this); 6682 } 6683 }); 6684 var l = list.length; 6685 for (var i = 0; i < l; i++) { 6686 h[list[i][0]].addClass(css[list[i][1]]); 6687 } 6688 } 6689 6690 function fixColumnWidth(table, $headers) { 6691 var c = table.config; 6692 if (c.widthFixed) { 6693 var colgroup = $('<colgroup>'); 6694 $("tr:first td", table.tBodies[0]).each(function () { 6695 colgroup.append($('<col>').css('width', $(this).width())); 6696 }); 6697 $(table).prepend(colgroup); 6698 } 6699 ; 6700 } 6701 6702 function updateHeaderSortCount(table, sortList) { 6703 var c = table.config, l = sortList.length; 6704 for (var i = 0; i < l; i++) { 6705 var s = sortList[i], o = c.headerList[s[0]]; 6706 o.count = s[1]; 6707 o.count++; 6708 } 6709 } 6710 6711 function multisort(table, sortList, cache) { 6712 if (table.config.debug) { 6713 var sortTime = new Date(); 6714 } 6715 var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length; 6716 for (var i = 0; i < l; i++) { 6717 var c = sortList[i][0]; 6718 var order = sortList[i][1]; 6719 var s = (table.config.parsers[c].type == "text") ? ((order == 0) ? makeSortFunction("text", "asc", c) : makeSortFunction("text", "desc", c)) : ((order == 0) ? makeSortFunction("numeric", "asc", c) : makeSortFunction("numeric", "desc", c)); 6720 var e = "e" + i; 6721 dynamicExp += "var " + e + " = " + s; 6722 dynamicExp += "if(" + e + ") { return " + e + "; } "; 6723 dynamicExp += "else { "; 6724 } 6725 var orgOrderCol = cache.normalized[0].length - 1; 6726 dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];"; 6727 for (var i = 0; i < l; i++) { 6728 dynamicExp += "}; "; 6729 } 6730 dynamicExp += "return 0; "; 6731 dynamicExp += "}; "; 6732 if (table.config.debug) { 6733 benchmark("Evaling expression:" + dynamicExp, new Date()); 6734 } 6735 eval(dynamicExp); 6736 cache.normalized.sort(sortWrapper); 6737 if (table.config.debug) { 6738 benchmark("Sorting on " + sortList.toString() + " and dir " + order + " time:", sortTime); 6739 } 6740 return cache; 6741 }; 6742 function makeSortFunction(type, direction, index) { 6743 var a = "a[" + index + "]", b = "b[" + index + "]"; 6744 if (type == 'text' && direction == 'asc') { 6745 return"(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + a + " < " + b + ") ? -1 : 1 )));"; 6746 } else if (type == 'text' && direction == 'desc') { 6747 return"(" + a + " == " + b + " ? 0 : (" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : (" + b + " < " + a + ") ? -1 : 1 )));"; 6748 } else if (type == 'numeric' && direction == 'asc') { 6749 return"(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + a + " - " + b + "));"; 6750 } else if (type == 'numeric' && direction == 'desc') { 6751 return"(" + a + " === null && " + b + " === null) ? 0 :(" + a + " === null ? Number.POSITIVE_INFINITY : (" + b + " === null ? Number.NEGATIVE_INFINITY : " + b + " - " + a + "));"; 6752 } 6753 }; 6754 function makeSortText(i) { 6755 return"((a[" + i + "] < b[" + i + "]) ? -1 : ((a[" + i + "] > b[" + i + "]) ? 1 : 0));"; 6756 }; 6757 function makeSortTextDesc(i) { 6758 return"((b[" + i + "] < a[" + i + "]) ? -1 : ((b[" + i + "] > a[" + i + "]) ? 1 : 0));"; 6759 }; 6760 function makeSortNumeric(i) { 6761 return"a[" + i + "]-b[" + i + "];"; 6762 }; 6763 function makeSortNumericDesc(i) { 6764 return"b[" + i + "]-a[" + i + "];"; 6765 }; 6766 function sortText(a, b) { 6767 if (table.config.sortLocaleCompare)return a.localeCompare(b); 6768 return((a < b) ? -1 : ((a > b) ? 1 : 0)); 6769 }; 6770 function sortTextDesc(a, b) { 6771 if (table.config.sortLocaleCompare)return b.localeCompare(a); 6772 return((b < a) ? -1 : ((b > a) ? 1 : 0)); 6773 }; 6774 function sortNumeric(a, b) { 6775 return a - b; 6776 }; 6777 function sortNumericDesc(a, b) { 6778 return b - a; 6779 }; 6780 function getCachedSortType(parsers, i) { 6781 return parsers[i].type; 6782 }; 6783 this.construct = function (settings) { 6784 return this.each(function () { 6785 if (!this.tHead || !this.tBodies)return; 6786 var $this, $document, $headers, cache, config, shiftDown = 0, sortOrder; 6787 this.config = {}; 6788 config = $.extend(this.config, $.tablesorter.defaults, settings); 6789 $this = $(this); 6790 $.data(this, "tablesorter", config); 6791 $headers = buildHeaders(this); 6792 this.config.parsers = buildParserCache(this, $headers); 6793 cache = buildCache(this); 6794 var sortCSS = [config.cssDesc, config.cssAsc]; 6795 fixColumnWidth(this); 6796 $headers.click(function (e) { 6797 var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0; 6798 if (!this.sortDisabled && totalRows > 0) { 6799 $this.trigger("sortStart"); 6800 var $cell = $(this); 6801 var i = this.column; 6802 this.order = this.count++ % 2; 6803 if (this.lockedOrder)this.order = this.lockedOrder; 6804 if (!e[config.sortMultiSortKey]) { 6805 config.sortList = []; 6806 if (config.sortForce != null) { 6807 var a = config.sortForce; 6808 for (var j = 0; j < a.length; j++) { 6809 if (a[j][0] != i) { 6810 config.sortList.push(a[j]); 6811 } 6812 } 6813 } 6814 config.sortList.push([i, this.order]); 6815 } else { 6816 if (isValueInArray(i, config.sortList)) { 6817 for (var j = 0; j < config.sortList.length; j++) { 6818 var s = config.sortList[j], o = config.headerList[s[0]]; 6819 if (s[0] == i) { 6820 o.count = s[1]; 6821 o.count++; 6822 s[1] = o.count % 2; 6823 } 6824 } 6825 } else { 6826 config.sortList.push([i, this.order]); 6827 } 6828 } 6829 ; 6830 setTimeout(function () { 6831 setHeadersCss($this[0], $headers, config.sortList, sortCSS); 6832 appendToTable($this[0], multisort($this[0], config.sortList, cache)); 6833 }, 1); 6834 return false; 6835 } 6836 }).mousedown(function () { 6837 if (config.cancelSelection) { 6838 this.onselectstart = function () { 6839 return false 6840 }; 6841 return false; 6842 } 6843 }); 6844 $this.bind("update",function () { 6845 var me = this; 6846 setTimeout(function () { 6847 me.config.parsers = buildParserCache(me, $headers); 6848 cache = buildCache(me); 6849 }, 1); 6850 }).bind("updateCell",function (e, cell) { 6851 var config = this.config; 6852 var pos = [(cell.parentNode.rowIndex - 1), cell.cellIndex]; 6853 cache.normalized[pos[0]][pos[1]] = config.parsers[pos[1]].format(getElementText(config, cell), cell); 6854 }).bind("sorton",function (e, list) { 6855 $(this).trigger("sortStart"); 6856 config.sortList = list; 6857 var sortList = config.sortList; 6858 updateHeaderSortCount(this, sortList); 6859 setHeadersCss(this, $headers, sortList, sortCSS); 6860 appendToTable(this, multisort(this, sortList, cache)); 6861 }).bind("appendCache",function () { 6862 appendToTable(this, cache); 6863 }).bind("applyWidgetId",function (e, id) { 6864 getWidgetById(id).format(this); 6865 }).bind("applyWidgets", function () { 6866 applyWidget(this); 6867 }); 6868 if ($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) { 6869 config.sortList = $(this).metadata().sortlist; 6870 } 6871 if (config.sortList.length > 0) { 6872 $this.trigger("sorton", [config.sortList]); 6873 } 6874 applyWidget(this); 6875 }); 6876 }; 6877 this.addParser = function (parser) { 6878 var l = parsers.length, a = true; 6879 for (var i = 0; i < l; i++) { 6880 if (parsers[i].id.toLowerCase() == parser.id.toLowerCase()) { 6881 a = false; 6882 } 6883 } 6884 if (a) { 6885 parsers.push(parser); 6886 } 6887 ; 6888 }; 6889 this.addWidget = function (widget) { 6890 widgets.push(widget); 6891 }; 6892 this.formatFloat = function (s) { 6893 var i = parseFloat(s); 6894 return(isNaN(i)) ? 0 : i; 6895 }; 6896 this.formatInt = function (s) { 6897 var i = parseInt(s); 6898 return(isNaN(i)) ? 0 : i; 6899 }; 6900 this.isDigit = function (s, config) { 6901 return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g, ''))); 6902 }; 6903 this.clearTableBody = function (table) { 6904 if ($.browser.msie) { 6905 function empty() { 6906 while (this.firstChild)this.removeChild(this.firstChild); 6907 } 6908 6909 empty.apply(table.tBodies[0]); 6910 } else { 6911 table.tBodies[0].innerHTML = ""; 6912 } 6913 }; 6914 }}); 6915 $.fn.extend({tablesorter: $.tablesorter.construct}); 6916 var ts = $.tablesorter; 6917 ts.addParser({id: "text", is: function (s) { 6918 return true; 6919 }, format: function (s) { 6920 return $.trim(s.toLocaleLowerCase()); 6921 }, type: "text"}); 6922 ts.addParser({id: "digit", is: function (s, table) { 6923 var c = table.config; 6924 return $.tablesorter.isDigit(s, c); 6925 }, format: function (s) { 6926 return $.tablesorter.formatFloat(s); 6927 }, type: "numeric"}); 6928 ts.addParser({id: "currency", is: function (s) { 6929 return/^[£$â¬?.]/.test(s); 6930 }, format: function (s) { 6931 return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$â¬]/g), "")); 6932 }, type: "numeric"}); 6933 ts.addParser({id: "ipAddress", is: function (s) { 6934 return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s); 6935 }, format: function (s) { 6936 var a = s.split("."), r = "", l = a.length; 6937 for (var i = 0; i < l; i++) { 6938 var item = a[i]; 6939 if (item.length == 2) { 6940 r += "0" + item; 6941 } else { 6942 r += item; 6943 } 6944 } 6945 return $.tablesorter.formatFloat(r); 6946 }, type: "numeric"}); 6947 ts.addParser({id: "url", is: function (s) { 6948 return/^(https?|ftp|file):\/\/$/.test(s); 6949 }, format: function (s) { 6950 return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//), '')); 6951 }, type: "text"}); 6952 ts.addParser({id: "isoDate", is: function (s) { 6953 return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s); 6954 }, format: function (s) { 6955 return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g), "/")).getTime() : "0"); 6956 }, type: "numeric"}); 6957 ts.addParser({id: "percent", is: function (s) { 6958 return/\%$/.test($.trim(s)); 6959 }, format: function (s) { 6960 return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g), "")); 6961 }, type: "numeric"}); 6962 ts.addParser({id: "usLongDate", is: function (s) { 6963 return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/)); 6964 }, format: function (s) { 6965 return $.tablesorter.formatFloat(new Date(s).getTime()); 6966 }, type: "numeric"}); 6967 ts.addParser({id: "shortDate", is: function (s) { 6968 return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s); 6969 }, format: function (s, table) { 6970 var c = table.config; 6971 s = s.replace(/\-/g, "/"); 6972 if (c.dateFormat == "us") { 6973 s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2"); 6974 } else if (c.dateFormat == "uk") { 6975 s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1"); 6976 } else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") { 6977 s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3"); 6978 } 6979 return $.tablesorter.formatFloat(new Date(s).getTime()); 6980 }, type: "numeric"}); 6981 ts.addParser({id: "time", is: function (s) { 6982 return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s); 6983 }, format: function (s) { 6984 return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime()); 6985 }, type: "numeric"}); 6986 ts.addParser({id: "metadata", is: function (s) { 6987 return false;
6988 }, format: function (s, table, cell) { 6989 var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName; 6990 return $(cell).metadata()[p]; 6991 }, type: "numeric"}); 6992 ts.addWidget({id: "zebra", format: function (table) { 6993 if (table.config.debug) { 6994 var time = new Date(); 6995 } 6996 var $tr, row = -1, odd; 6997 $("tr:visible", table.tBodies[0]).each(function (i) { 6998 $tr = $(this); 6999 if (!$tr.hasClass(table.config.cssChildRow))row++; 7000 odd = (row % 2 == 0); 7001 $tr.removeClass(table.config.widgetZebra.css[odd ? 0 : 1]).addClass(table.config.widgetZebra.css[odd ? 1 : 0]) 7002 }); 7003 if (table.config.debug) { 7004 $.tablesorter.benchmark("Applying Zebra widget", time); 7005 } 7006 }}); 7007})(jQuery); 7008$(function(){ 7009 7010 //Vars 7011 var ticker = $("#home_announcement_list"); 7012 var speed = 15; 7013 7014 if(ticker.length > 0){ 7015 //Add Classes, wrap elements and add style 7016 ticker.addClass("jticker").css({'overflow':'hidden','white-space':'nowrap'}); 7017 ticker.wrapInner("<div class='jticker_item' style='display: inline-block; vertical-align: middle;' />"); 7018 ticker.wrapInner("<div class='jticker_inner' />"); 7019 $(".jticker_item", ticker).children().css({'display':'inline-block','vertical-align':'middle'}); 7020 7021 //Clone items for the loop 7022 $(".jticker_item", ticker).clone().appendTo("#home_announcement_list .jticker_inner", ticker); 7023 ticker.find(".jticker_item:last").hide(); 7024 7025 //Pause and Resume Animation on hover 7026 ticker.hover(function() { 7027 ticker.find(".jticker_inner").stop(); 7028 }, function() { 7029 jtickerAnimation(ticker, speed); 7030 }); 7031 7032 $(window).on('load resize',function(){ 7033 jtickerAnimation(ticker, speed); 7034 }); 7035 } 7036 7037 //Do animation and restack item order for loop 7038 function jtickerAnimation(ticker, speed) { 7039 ticker.find(".jticker_inner").stop(); 7040 7041 var ths_width = ticker.width(); 7042 //Get widths for animation 7043 var current_item_width = ticker.find(".jticker_item:first").width(); 7044 //Get current position for resume duration calculation. 7045 var current_item_poss = ticker.find(".jticker_inner").css('margin-left').replace(/[^-\d\.]/g, '').replace(/-/g, ''); 7046 //Create duration calculation. 7047 var duration = current_item_width - parseInt(current_item_poss); 7048 7049 if(current_item_width > ths_width){ 7050 ticker.find(".jticker_item:last").show(); 7051 $(".jticker_item", ticker).children().removeClass('single_item'); 7052 7053 //Do animation 7054 ticker.find(".jticker_inner").css({"margin-left":"-"+current_item_poss+"px"}); 7055 ticker.find(".jticker_inner").animate({ 7056 "margin-left":"-"+current_item_width+"px" 7057 }, duration*speed, 'linear', function() { 7058 7059 $(".jticker_item:first", ticker).clone().appendTo(ticker.find(".jticker_inner")); 7060 $(".jticker_item:first", ticker).remove(); 7061 ticker.find(".jticker_inner").css({'margin-left':'0'}); 7062 7063 jtickerAnimation(ticker, speed); 7064 7065 }); 7066 }else{ 7067 7068 $(".jticker_item", ticker).each(function(){ 7069 if($(this).children().length == 1){ 7070 $(this).children().addClass("single_item"); 7071 } 7072 }); 7073 7074 ticker.find(".jticker_inner").css({'margin-left':'0'}); 7075 ticker.find(".jticker_inner").stop(true, true); 7076 ticker.find(".jticker_item:last").hide(); 7077 7078 7079 } 7080 } 7081 7082 //Vars 7083 var notices_ticker = $("#home_announcements_mobile_list"); 7084 var notices_speed = 15; 7085 7086 if(notices_ticker.length > 0){ 7087 //Add Classes, wrap elements and add style 7088 notices_ticker.addClass("jticker").css({'overflow':'hidden','white-space':'nowrap'}); 7089 notices_ticker.wrapInner("<div class='jticker_item' style='display: inline-block; vertical-align: middle;' />"); 7090 notices_ticker.wrapInner("<div class='jticker_inner' />"); 7091 $(".jticker_item", notices_ticker).children().css({'display':'inline-block','vertical-align':'middle'}); 7092 7093 //Clone items for the loop 7094 $(".jticker_item", notices_ticker).clone().appendTo("#home_announcements_mobile_list .jticker_inner", notices_ticker); 7095 notices_ticker.find(".jticker_item:last").hide(); 7096 7097 //Pause and Resume Animation on hover 7098 notices_ticker.hover(function() { 7099 notices_ticker.find(".jticker_inner").stop(); 7100 }, function() { 7101 jtickerAnimation(notices_ticker, notices_speed); 7102 }); 7103 7104 $(window).on('load resize',function(){ 7105 jtickerAnimation(notices_ticker, notices_speed); 7106 }); 7107 } 7108 7109}); 7110 7111/* Created by Jamie Lomas on 23/01/14. */ 7112(function ($) { 7113 $.fn.extend({ 7114 ultiNav: function (options) { 7115 7116 var defaults = { 7117 overflowNav: true, 7118 mobileNav: true, 7119 mobilewidth: 661, 7120 overflowClass: "overflow_nav", 7121 showHideIcon: "fa-bars", 7122 arrowDownIcon: "fa-chevron-down", 7123 arrowUpIcon: "fa-chevron-up", 7124 moreNavIcon: "fa-ellipsis-v" 7125 }; 7126 7127 var options = $.extend(defaults, options); 7128 7129 return this.each(function () { 7130 var nav = $(this); 7131 var mobilewidth = options.mobilewidth; 7132 var overflowClass = options.overflowClass; 7133 var showHideIcon = options.showHideIcon; 7134 var arrowDownIcon = options.arrowDownIcon; 7135 var arrowUpIcon = options.arrowUpIcon; 7136 var moreNavIcon = options.moreNavIcon; 7137 var overflowNav = options.overflowNav; 7138 var mobileNav = options.mobileNav; 7139 7140 mobileison = false; 7141 i = 0; 7142 pos = 0; 7143 7144 if (overflowNav == true && mobileNav == false) { 7145 mobilewidth = 0; 7146 } 7147 7148 $('> li, > li ul li', nav).each(function () { 7149 i++ 7150 $(this).addClass('ultiNav ultiNav_' + i); 7151 pos = $(this).outerWidth(true) + pos; 7152 $(this).attr('data-pos', pos); 7153 if ($('> ul', $(this)).length > 0) { 7154 $('> a', this).append('<span class="ultiNavArrow closed"><i class="fa ' + arrowDownIcon + '"></i></span>').addClass('hasarrow'); 7155 } 7156 }); 7157 7158 $(function () { 7159 overflowNavType(nav, overflowClass, mobilewidth); 7160 }); 7161 7162 $(window).resize(function () { 7163 overflowNavType(nav, overflowClass, mobilewidth); 7164 }); 7165 7166 $('> li a', nav).on('click', 'span.ultiNavArrow', function (e) { 7167 7168 e.preventDefault(); 7169 var thsArrow = $(this); 7170 7171 thsArrow.parent().parent().find('> ul').stop().slideToggle("slow", function () { 7172 if (thsArrow.hasClass('closed')) { 7173 thsArrow.removeClass('closed').addClass('open'); 7174 $('i', thsArrow).removeClass(arrowDownIcon).addClass(arrowUpIcon); 7175 } else { 7176 thsArrow.addClass('closed').removeClass('open'); 7177 $('i', thsArrow).removeClass(arrowUpIcon).addClass(arrowDownIcon); 7178 } 7179 }); 7180 7181 $('> li ul', nav).not(thsArrow.parent().parent().find('> ul')).not(thsArrow.parent().parent().parent()).stop().slideUp("slow", function () { 7182 $(this).parent().find('> a span.ultiNavArrow').not(thsArrow).addClass('closed').removeClass('open'); 7183 $(this).parent().find('> a span.ultiNavArrow i').not(thsArrow).removeClass(arrowUpIcon).addClass(arrowDownIcon); 7184 }); 7185 7186 }); 7187 7188 nav.parent().on('click', 'a.showHide', function (e) { 7189 7190 e.preventDefault(); 7191 showHide = $(this); 7192 7193 nav.stop().slideToggle("slow", function () { 7194 if (showHide.hasClass('closed')) { 7195 showHide.removeClass('closed').addClass('open'); 7196 } else { 7197 showHide.addClass('closed').removeClass('open'); 7198 } 7199 }); 7200 7201 }); 7202 7203 function overflowNavType(nav, overflowClass, mobilewidth) { 7204 7205 if ($(window).width() < mobilewidth && mobileison == false && mobileNav == true) { 7206 ultiMobileNav(nav, overflowClass); 7207 mobileison = true; 7208 } 7209 7210 if ($(window).width() > mobilewidth && overflowNav == true) { 7211 ultiAddOverflow(nav, overflowClass); 7212 ultiOverflowItems(nav, overflowClass); 7213 ultiOverflowShowHide(); 7214 mobileison = false; 7215 } 7216 7217 if ($(window).width() > mobilewidth) { 7218 mobileison = false; 7219 } 7220 7221 if (mobileison == false) { 7222 ultiCleanMobile(nav); 7223 } 7224 7225 } 7226 7227 function ultiMobileNav(nav, overflowClass) { 7228 7229 $(' > li.' + overflowClass + '', nav).remove(); 7230 $('> li ul', nav).hide(); 7231 7232 nav.addClass('ultiNavMobile').hide().find('> li').show(); 7233 7234 var showHide = nav.parent().find('a.showHide'); 7235 7236 if (showHide.length == 0) { 7237 nav.parent().prepend('<a href="#" class="showHide closed"><span>Menu</span><i class="fa ' + showHideIcon + '"></i></a>'); 7238 } 7239 7240 } 7241 7242 function ultiCleanMobile(nav) { 7243 7244 nav.find('.ultiNavArrow').addClass('closed').removeClass('open'); 7245 nav.find('.ultiNavArrow i').removeClass(arrowUpIcon).addClass(arrowDownIcon); 7246 nav.show().removeClass('ultiNavMobile').parent().find('a.showHide').remove(); 7247 //$('> li ul', nav).show(); 7248 $('> li ul', nav).css('display', ''); 7249 7250 } 7251 7252 function ultiAddOverflow(nav, overflowClass) { 7253 7254 var overflow = $(' > li.' + overflowClass + ' ul', nav); 7255 7256 if (overflow.length == 0) { 7257 var navhtml = nav.html(); 7258 nav.prepend('<li class="' + overflowClass + '"><a href="#"><i class="fa ' + moreNavIcon + '"></i><span>More</span></a><ul>' + navhtml + '</ul></li>'); 7259 $('> li.ultiNav', overflow).hide(); 7260 } 7261 7262 } 7263 7264 function ultiOverflowItems(nav, overflowClass) { 7265 7266 var navwth = nav.parent().parent().width(); 7267 var lastpos = $(' > li.ultiNav', nav).last().attr('data-pos'); 7268 show = false; 7269 7270 if(lastpos >= navwth){ 7271 7272 var overflow = $(' > li.' + overflowClass + ' ul', nav); 7273 i = 0; 7274 7275 $(' > li.ultiNav', nav).each(function () { 7276 i++ 7277 var pos = parseInt($(this).attr('data-pos')); 7278 var docwth = nav.parent().parent().width() - $(' > li.' + overflowClass + ' > a', nav).outerWidth(true) -10; 7279 7280 if (docwth <= pos) { 7281 $(this).hide(); 7282 $('> li.ultiNav_' + i + '', overflow).show(); 7283 show = true; 7284 } else { 7285 $('> li.ultiNav_' + i + '', overflow).hide(); 7286 $(this).show(); 7287 show = false; 7288 } 7289 }); 7290 7291 }else { 7292 $(' > li.ultiNav', nav).show(); 7293 } 7294 7295 } 7296 7297 function ultiOverflowShowHide() { 7298 7299 if (show == false) { 7300 $(' > li.' + overflowClass + '', nav).hide(); 7301 } else { 7302 $(' > li.' + overflowClass + '', nav).show(); 7303 } 7304 7305 } 7306 7307 }); 7308 } 7309 });
7310})(jQuery); 7311equalheight = function(container){ 7312 7313 var currentTallest = 0, 7314 currentRowStart = 0, 7315 rowDivs = new Array(), 7316 $el, 7317 topPosition = 0; 7318 $(container).each(function() { 7319 7320 $el = $(this); 7321 $($el).height("auto") 7322 topPostion = $el.position().top; 7323 7324 if (currentRowStart != topPostion) { 7325 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 7326 rowDivs[currentDiv].height(currentTallest); 7327 } 7328 rowDivs.length = 0; // empty the array 7329 currentRowStart = topPostion; 7330 currentTallest = $el.height(); 7331 rowDivs.push($el); 7332 } else { 7333 rowDivs.push($el); 7334 currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); 7335 } 7336 for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { 7337 rowDivs[currentDiv].height(currentTallest); 7338 } 7339 }); 7340} 7341 7342var reactCMS = { 7343 7344 home_events: function() { 7345 siteLoad.responsive_cycle_resize(true); 7346 $('#home_events_list_wrapper').on("click", ".home_event_trigger", function(e) { 7347 7348 e.preventDefault(); 7349 7350 var ecid = $(this).data('ecid'); 7351 7352 $.ajax({
7353 url: "/inc/modules/event/ajax.php", 7354 global: false, 7355 type: "POST", 7356 dataType: "html", 7357 data: "act=home_cal&ecid=" + ecid, 7358 success: function (msg) { 7359 $('#home_events_list_wrapper').html(msg); 7360 } 7361 }); 7362 }); 7363 }, 7364 7365 load_form : function(success, act, module, idname, id) { 7366 $.ajax({ 7367 url: '/inc/modules/' + module + '/ajax.php', 7368 global: false, 7369 type: 'GET', 7370 dataType: 'html', 7371 data: 'act=' + act + '&' + idname + '=' + id, 7372 success: function(response) { 7373 $('#' + success).html(response); 7374 } 7375 }); 7376 }, 7377 7378 gMapDirections: function (idName, options) { 7379 var element = $(idName); 7380 element.on("submit", function (e) { 7381 var postCode = element.find("input[name=" + options.postcode + "]").val(); 7382 var latLon = element.find("input[name=" + options.latlon + "]").val(); 7383 window.open('http://maps.google.co.uk/maps?f=d&hl=en&saddr=' + postCode + '&daddr=' + latLon + '&ie=UTF8&om=1'); 7384 e.preventDefault(); 7385 }); 7386 }, 7387 7388 cycle: function (idName, options) { 7389 var defaults = { 7390 fx: "fade", 7391 speed: 800, 7392 timeout: 8000 7393 } 7394 var options = $.extend(defaults, options); 7395 $(idName).cycle(options); 7396 }, 7397 7398 documentWindow: function (width, height) { 7399 7400 $('a[rel="document_window"]').click(function (a) { 7401 a.preventDefault(); 7402 7403 var pageUrl = $(this).attr('href'); 7404 7405 var winl = (screen.width - width) / 2; 7406 var wint = (screen.height - height) / 2; 7407 7408 winprops = 'height=' + height + ',width=' + width + ',top=' + wint + ',left=' + winl + ',scrollbars=no' 7409 win = window.open(pageUrl, 'document_download', winprops); 7410 7411 if (parseInt(navigator.appVersion) >= 4) { 7412 win.window.focus(); 7413 } 7414 }) 7415 7416 }, 7417 7418 event_module: function () { 7419 var now = new Date(); 7420 now.setDate(now.getDate() - 1); 7421 7422 var d = new Date(); 7423 var curr_date = ("0" + d.getDate()).slice(-2); 7424 var curr_month = ("0" + (d.getMonth() + 1)).slice(-2); //Months are zero based 7425 var curr_year = d.getFullYear(); 7426 var full_date = curr_date + '/' + curr_month + '/' + curr_year; 7427 7428 7429 $('.widget').DatePicker({ 7430 format: 'd/m/Y', 7431 date: [full_date], 7432 starts: 1, 7433 position: 'r', 7434 onRender: function (date) { 7435 return { 7436 disabled: (date.valueOf() <= now.valueOf()) 7437 } 7438 }, 7439 onBeforeShow: function () { 7440 $('#inputDate').DatePickerSetDate($('#inputDate').val(), true); 7441 }, 7442 onChange: function (formated, dates) { 7443 $('#inputDate').val(formated); 7444 $('.widget').DatePickerHide(); 7445 7446 $.ajax({
7447 url: "/inc/modules/event/ajax.php", 7448 global: false, 7449 type: "POST", 7450 dataType: "html", 7451 data: "act=date&date=" + $("#inputDate").val() + "&act=catlist&catlist=" + $("#catlist").val(), 7452 success: function (msg) { 7453 $('#eventlist').html(msg); 7454 } 7455 }) 7456 } 7457 }); 7458 7459 $('#catlist').change(function () { 7460 $.ajax({ 7461 url: "/inc/modules/event/ajax_event.php", 7462 global: false, 7463 type: "POST", 7464 dataType: "html", 7465 data: "act=catlist&catlist=" + $("#catlist").val() + "&act=date&date=" + $("#inputDate").val(), 7466 success: function (msg) { 7467 $('#eventlist').html(msg); 7468 } 7469 }); 7470 }); 7471 7472 $('#dateReset').click(function () { 7473 var d = new Date(); 7474 var curr_date = ("0" + d.getDate()).slice(-2); 7475 var curr_month = ("0" + (d.getMonth() + 1)).slice(-2); //Months are zero based 7476 var curr_year = d.getFullYear(); 7477 var full_date = curr_date + '/' + curr_month + '/' + curr_year; 7478 7479 $('#inputDate').val(full_date); 7480 $('#catlist').val(0); 7481 $.ajax({
7482 url: "/inc/modules/event/ajax_event.php", 7483 global: false, 7484 type: "POST", 7485 dataType: "html", 7486 data: "act=catlist&catlist=" + $("#catlist").val() + "&act=date&date=" + $("#inputDate").val(), 7487 success: function (msg) { 7488 $('#eventlist').html(msg); 7489 } 7490 }); 7491 return false; 7492 }); 7493 }, 7494 7495 event_module_adv: function () { 7496 7497 $('a.event_view_list').click(function (event) { 7498 event.preventDefault(); 7499 $.ajax({ 7500 url: "/inc/modules/event/ajax.php", 7501 global: false, 7502 type: "GET", 7503 dataType: "html", 7504 data: "act=event_view_list&ecid=" + $('.event_cat_select').val() + "&month=" + $("#current_month").val() + "&year=" + $("#current_year").val(), 7505 success: function (msg) { 7506 $('#event_ajax_load').removeClass('loading').html(msg); 7507 } 7508 }); 7509 }); 7510 7511 $('a.event_view_grid').click(function (event) { 7512 event.preventDefault(); 7513 $.ajax({
7514 url: "/inc/modules/event/ajax.php", 7515 global: false, 7516 type: "GET", 7517 dataType: "html", 7518 data: "act=refresh_module&ecid=" + $('.event_cat_select').val() + "&month=" + $("#current_month").val() + "&year=" + $("#current_year").val(), 7519 success: function (msg) { 7520 $('#event_ajax_load').removeClass('loading').html(msg); 7521 } 7522 }); 7523 }); 7524 7525 $('.event_cat_select').change(function () { 7526 field_id = $(this).attr('id'); 7527 7528 if (field_id == 'event_cat_list' || field_id == 'event_cat_list_xs' ) { 7529 $.ajax({ 7530 url: "/inc/modules/event/ajax.php", 7531 global: false, 7532 type: "GET", 7533 dataType: "html", 7534 data: "act=" + $('#event_act').val() + "&ecid=" + $('#' + field_id).val() + "&month=" + $("#current_month").val() + "&year=" + $("#current_year").val(), 7535 success: function (msg) { 7536 $('#event_ajax_load').removeClass('loading').html(msg); 7537 } 7538 }); 7539 } else { 7540 $.ajax({
7541 url: "/inc/modules/event/ajax.php", 7542 global: false, 7543 type: "GET", 7544 dataType: "html", 7545 data: "act=event_view_list&ecid=" + $('#' + field_id).val() + "&month=" + $("#current_month").val() + "&year=" + $("#current_year").val(), 7546 success: function (msg) { 7547 $('#event_ajax_load').removeClass('loading').html(msg); 7548 } 7549 }); 7550 } 7551 }); 7552 7553 $('a.event_trigger').click(function (event) { 7554 event.preventDefault(); 7555 $.ajax({ 7556 url: "/inc/modules/event/ajax.php", 7557 global: false, 7558 type: "GET", 7559 dataType: "html", 7560 data: "act=" + $('#event_act').val() + "&ecid=" + $('.event_cat_select').val() + "&" + $(this).attr('rel'), 7561 success: function (msg) { 7562 $('#event_ajax_load').removeClass('loading').html(msg); 7563 } 7564 }); 7565 }); 7566 7567 $('a#event_view_all').click(function (event) { 7568 event.preventDefault(); 7569 $.ajax({
7570 url: "/inc/modules/event/ajax.php", 7571 global: false, 7572 type: "GET", 7573 dataType: "html", 7574 data: "act=" + $('#event_act').val() + "&ecid=" + $('.event_cat_select').val() + "&" + $(this).attr('rel'), 7575 success: function (msg) { 7576 $('#event_ajax_load').removeClass('loading').html(msg); 7577 } 7578 }); 7579 }); 7580 7581 }, 7582 7583 showSendToFriend: function (success, eventId) { 7584 7585 $.ajax({ 7586 url: "/inc/modules/event/ajax.php", 7587 global: false, 7588 type: 'GET', 7589 dataType: 'html', 7590 data: 'act=friend&eid=' + eventId, 7591 success: function (response) { 7592 $('#' + success).html(response); 7593 } 7594 }); 7595 7596 }, 7597 7598 useful_links: function (idName) { 7599 $(idName).accordion({ 7600 autoHeight: false, 7601 collapsible: true, 7602 active: false, 7603 heightStyle: 'content' 7604 }); 7605 }, 7606 7607 headerImageChange: function (idName) { 7608 $(window).on("resize",function () { 7609 ImageChange(); 7610 }).resize(); 7611 7612 function ImageChange() { 7613 $("." + idName + "_image img").each(function () { 7614 var window_width = $('.container').width(); 7615 var img_standard = $(this).attr("data-image"); 7616 var img_mobile = $(this).attr("data-mobile"); 7617 if (window_width < 720) { 7618 // console.log(window_width); 7619 $(this).attr("src", img_mobile); 7620 } else { 7621 $(this).attr("src", img_standard); 7622 } 7623 }); 7624 } 7625 }, 7626 7627 iDevice : function() { 7628 return ( 7629 //Detect iPhone 7630 (navigator.platform.indexOf("iPhone") != -1) || 7631 //Detect iPad 7632 (navigator.platform.indexOf("iPad") != -1) || 7633 //Detect iPod 7634 (navigator.platform.indexOf("iPod") != -1) 7635 ); 7636 }, 7637 7638 init_search : function() { 7639 7640 $('form#search_form #kw').val($("#fullsearch_kw").val()); 7641 7642 $('#search_categories_list a').live('click', function(e) { 7643 e.preventDefault(); 7644 smid = $(this).data('smid'); 7645 search_term = $(this).data('searchterm'); 7646 7647 $('#search_categories_list li').removeClass('selected'); 7648 $(this).parent().addClass('selected'); 7649 7650 kw = search_term; 7651 kw = kw.replace('+', '~'); 7652 kw = encodeURIComponent(encodeURIComponent(kw)); 7653 7654 $.ajax({
7655 url: "/inc/ajax/search.php", 7656 global: false, 7657 type: "GET", 7658 dataType: "html", 7659 data: "mode=full&smid=" + smid + "&decode=true&kw=" + kw, 7660 success: function (msg) { 7661 $('#search_results_ajax').html(msg); 7662 } 7663 }); 7664 }); 7665 7666 $('#fullsearch_kw').keydown(function(event){ 7667 if (reactCMS.allowed_search_char(event)) 7668 return true; 7669 7670 return false; 7671 }); 7672 7673 $('#fullsearch_kw').keyup(function(event){ 7674 if(event.keyCode == 13){ 7675 $('#full_search_button').click(); 7676 } 7677 }); 7678 7679 $('#full_search_button').live('click', function() { 7680 $('form#search_form #kw').val($("#fullsearch_kw").val()); 7681 $('form#search_form').submit(); 7682 }); 7683 }, 7684 7685 allowed_search_char : function(event) { 7686 if (event.altKey == false && event.ctrlKey == false) { 7687 if ((event.keyCode == 8) || 7688 (event.keyCode == 46) || 7689 (event.keyCode == 13) || 7690 (event.keyCode == 32) || 7691 (event.keyCode == 173) || 7692 (event.keyCode == 61 && event.shiftKey == true) || 7693 (event.keyCode >= 106 && event.keyCode <= 109) || 7694 (event.keyCode >= 37 && event.keyCode <= 40) || 7695 (event.keyCode == 56 && event.shiftKey == true) || 7696 (event.keyCode >= 48 && event.keyCode <= 57 && event.shiftKey == false) || 7697 (event.keyCode >= 65 && event.keyCode <= 90) || 7698 (event.keyCode >= 96 && event.keyCode <= 105)) 7699 return true; 7700 return false; 7701 } else if (event.ctrlKey == true) { 7702 if ((event.keyCode == 65) || 7703 (event.keyCode == 89) || 7704 (event.keyCode == 86) || 7705 (event.keyCode == 67) || 7706 (event.keyCode == 90)) 7707 return true; 7708 7709 return false; 7710 } 7711 return false; 7712 }, 7713 7714 staffvacancy_list : function() { 7715 $('.cat_button > a').click(function () { 7716 if(!$(this).hasClass('open')) { 7717 $('.cat_button a.open').siblings('.vacancy_list').slideUp(); 7718 $('.cat_button a.open i').removeClass('fa-angle-up').addClass('fa-angle-down'); 7719 $('.cat_button a.open').removeClass('open'); 7720 $(this).siblings('.vacancy_list').slideDown(); 7721 $(this).addClass('open'); 7722 $('i', this).removeClass('fa-angle-down').addClass('fa-angle-up'); 7723 } else if ($(this).hasClass('open')) { 7724 $('.cat_button a.open').siblings('.vacancy_list').slideUp(); 7725 $('.cat_button a.open i').removeClass('fa-angle-up').addClass('fa-angle-down'); 7726 $('.cat_button a.open').removeClass('open'); 7727 } 7728 }); 7729 $('.cat_button > a').first().trigger('click'); 7730 }, 7731 7732 blog_archive_nav : function () { 7733 $('ul#blog_cat ul').hide(); 7734 $('ul#blog_cat li.sel > ul').show().parent('li').addClass('open'); 7735 $('ul#blog_cat > li.open > a i').removeClass('fa-angle-right').addClass('fa-angle-down'); 7736 7737 $('ul#blog_cat li.sub > a').click(function(event) { 7738 event.preventDefault(); 7739 7740 $('ul#blog_cat > li a').not(this).parent('li').removeClass('open').children('ul').slideUp(300); 7741 $('ul#blog_cat > li > a i').removeClass('fa-angle-down').addClass('fa-angle-right'); 7742 7743 $(this).parent('li').toggleClass('open'); 7744 $('ul#blog_cat > li.open > a i').removeClass('fa-angle-right').addClass('fa-angle-down'); 7745 $(this).parent('li').children('ul').slideToggle(350); 7746 }); 7747 } 7748 7749} 7750 7751$.fn.setAllToMaxHeight = function(){ 7752 return this.outerHeight( Math.max.apply(this, $.map( this , function(e){ return $(e).outerHeight() }) ) ); 7753} 7754 7755/* Default sitewide scripts */ 7756var siteLoad = { 7757 7758 load: function () { 7759 7760 //siteLoad.pulsateIcon(); 7761 siteLoad.mainFunctions(); 7762 siteLoad.sideNav(); 7763 siteLoad.twitter_wall(); 7764 7765 $(window).load(function(){ 7766 siteLoad.sidePanel(); 7767 }); 7768 7769 siteLoad.tableStyle(); 7770 //siteLoad.searchAutoComplete('#kw'); 7771 /*siteLoad.searchAutoComplete('#kw_nav');*/
7772 siteLoad.defaultText('#kw', 'Search Site'); 7773 siteLoad.defaultText('#kw_nav', 'Search Site'); 7774 siteLoad.bookmark('.jqbookmark'); 7775 siteLoad.ellipsis(); 7776 7777 if ($('#top_nav_outerwrap').length>0) { 7778 $(window).load(function(){ 7779 siteLoad.ultiNav(); 7780 siteLoad.topnav_hover(); 7781 }); 7782 siteLoad.mainnav_split(); 7783 siteLoad.stickyNav(); 7784 siteLoad.topnav_hover(); 7785 siteLoad.topnavBorder(); 7786 7787 $(window).resize(function(){ 7788 siteLoad.mainnav_split(); 7789 siteLoad.topnav_hover(); 7790 }); 7791 } 7792 7793 7794 //siteLoad.responsive_cycle(); 7795 siteLoad.sitemapSplit(); 7796 //siteLoad.stickyNav(); 7797 siteLoad.backToTop(); 7798 7799 //siteLoad.topnav_hover(); 7800 //siteLoad.topnavBorder(); 7801 //siteLoad.autoMegaNav(); 7802 //siteLoad.leftNavArrows(); 7803 //siteLoad.leftNavAccordion 7804 7805 /* siteLoad.mainnav_split(); 7806 $(window).resize(function(){ 7807 siteLoad.mainnav_split(); 7808 });*/ 7809 7810 }, 7811 7812 ellipsis: function () { 7813 $('.ellipsis').pixellipsis(); 7814 $(window).load(function(){ 7815 $('.ellipsis').pixellipsis(); 7816 }); 7817 }, 7818 7819 twitter_wall : function () { 7820 if ($('#twitter_wall_wrapper').length > 0) { 7821 7822 $('#twitter_wall_wrapper .content_wrap').mCustomScrollbar({ 7823 mouseWheel: {scrollAmount: 200}, 7824 7825 }); 7826 7827 function load_twitter_images() { 7828 if (!$('#twitter_wall_content_wrap').hasClass('images_loaded')) { 7829 $('#twitter_wall_content_wrap img').each( function() { 7830 $(this).attr('src', $(this).data('img-url')); 7831 }); 7832 imagesLoaded( document.querySelector('#twitter_wall_content_wrap'), function( instance ) { 7833 $('#twitter_wall_content_wrap').addClass('images_loaded'); 7834 $('#twitter_wall_content_shroud').fadeOut(); 7835 }); 7836 } 7837 } 7838 7839 7840 $('.twitter_wall.arrow_right, #twitter_wall_close').click(function () { 7841 if (!$('#twitter_wall_wrapper').hasClass('open')) { 7842 $('#twitter_wall_wrapper, #showhide_side_panel_wrap .twitter_wall').addClass('open'); 7843 $('body').css({'overflow': 'hidden'}); 7844 $('#shroud').fadeIn(); 7845 load_twitter_images(); 7846 } else { 7847 $('#twitter_wall_wrapper, #showhide_side_panel_wrap .twitter_wall').removeClass('open'); 7848 $('body').css({'overflow': 'auto'}); 7849 $('#shroud').fadeOut(); 7850 } 7851 if($('#showhide_side_panel').hasClass('active')){ 7852 $('#showhide_side_panel').click(); 7853 } 7854 }); 7855 7856 $('#shroud').click(function () { 7857 $('#twitter_wall_wrapper, #showhide_side_panel_wrap .twitter_wall').removeClass('open'); 7858 $('body').css({'overflow': 'auto'}); 7859 $('#shroud').fadeOut(); 7860 }); 7861 7862 } 7863 7864 }, 7865 7866 pulsateIcon : function() { 7867 var icon = $('#header_btns .icon_btn'); 7868 function runFade() { 7869 icon.animate({opacity:'1'}, 1000); 7870 icon.animate({opacity:'0.3'}, 1000, runFade); 7871 } 7872 runFade(); 7873 }, 7874 7875 7876 sideNav : function() { 7877 if ($('#main_nav.sidenav').length>0) { 7878 7879 $('#main_nav > ul li.sub:not(.sel) ul').slideUp(); 7880 7881 $('#main_nav > ul li.sub').each(function () { 7882 if ($(this).find('> ul').length > 0) { 7883 if ($(this).find('> ul li.sel').length > 0) { 7884 $(this).addClass('has_sub open'); 7885 } 7886 else { 7887 $(this).addClass('has_sub closed'); 7888 } 7889 } 7890 }); 7891 7892 $('#main_nav > ul li.sub > a').each(function () { 7893 $(this).append( '<span class="sub_icon"></span>' ); 7894 }); 7895 7896 $('#main_nav > ul li.sub.open > a > span.sub_icon').each(function () { 7897 $(this).addClass('rotate'); 7898 }); 7899 7900 7901 $('#main_nav > ul > li.has_sub > a').on('click', function(e){
7902 e.preventDefault(); 7903 ths = $(this); 7904 if(ths.parent().hasClass('closed')){ 7905 7906 $('#main_nav ul li.open').find('span.sub_icon').removeClass('rotate'); 7907 7908 $('#main_nav ul li.open > ul').slideUp(function() { 7909 $('#main_nav').jScrollPane(); 7910 $('#main_nav ul li.open').removeClass('no_border'); 7911 $('#main_nav ul li.open').removeClass('open').addClass('closed'); 7912 }); 7913 7914 ths.parent().removeClass('closed').addClass('open'); 7915 7916 7917 $('#main_nav ul li.open').addClass('no_border'); 7918 7919 ths.find('span.sub_icon').addClass('rotate'); 7920 ths.parent().find('ul').stop().slideDown(function() { 7921 $('#main_nav').jScrollPane(); 7922 ths.parent().removeClass('closed no_border').addClass('open'); 7923 7924 }); 7925 7926 7927 7928 }else{ 7929 ths.find('span.sub_icon').removeClass('rotate'); 7930 ths.parent().removeClass('no_border'); 7931 ths.parent().find('ul').stop().slideUp(function() { 7932 ths.parent().addClass('closed').removeClass('open'); 7933 $('#main_nav').jScrollPane(); 7934 }); 7935 } 7936 }); 7937 7938 function scroll_height() { 7939 var win_ht = $(window).height(); 7940 var intro_ht = $('#main_nav_top').outerHeight(); 7941 var panel_ht = win_ht - intro_ht - 20; 7942 $('#main_nav').height(panel_ht); 7943 $('#main_nav').jScrollPane(); 7944 } 7945 function openCloseMenu() { 7946 7947 $('#search_trigger').click(function(e) { 7948 e.preventDefault(); 7949 $('#header_menu_button').click(); 7950 $('#kw_nav').focus(); 7951 }) 7952 7953 $('#header_menu_button').click(function () { 7954 $('#main_nav').jScrollPane(); 7955 if(!$('#main_nav_wrap').hasClass('active')) { 7956 $('#main_nav_wrap').addClass('active'); 7957 var menuWidth = $('#main_nav_wrap').outerWidth(); 7958 $('#main_nav_wrap').animate({'margin-left' : '-'+menuWidth+'px'}); 7959 $('#shroud').fadeIn(); 7960 $('body, html').css({'overflow':'hidden'}); 7961 $('body').animate({'left':'-150px'}); 7962 $('header').animate({'left':'-150px'}); 7963 } 7964 }); 7965 $('#shroud, #main_nav_close a').click(function () { 7966 $('#main_nav').jScrollPane(); 7967 if($('#main_nav_wrap').hasClass('active')) { 7968 $('#main_nav_wrap').removeClass('active'); 7969 var menuWidth = $('#main_nav_wrap').outerWidth(); 7970 $('#main_nav_wrap').animate({'margin-left' : '0px'}); 7971 $('#shroud').fadeOut(); 7972 $('body, html').css({'overflow':'auto'}); 7973 $('body').animate({'left':'0px'}); 7974 $('header').animate({'left':'0px'}); 7975 } 7976 }); 7977 } 7978 7979 7980 openCloseMenu(); 7981 7982 scroll_height(); 7983 $(window).resize(function(){ 7984 scroll_height(); 7985 }); 7986 } 7987 }, 7988 7989 mainFunctions: function () { 7990 7991 7992 7993 7994 7995 $('#page_heading_backstretch').backstretch("/images/backgrounds/page_heading_bg.jpg"); 7996 $('#academies_backstretch').backstretch("/images/backgrounds/home_academies_bg.png"); 7997 7998 $('#page_bot_up_anchor a').click(function () { 7999 $("html, body").stop().animate({scrollTop:0}, 800); 8000 }); 8001 8002 8003 //STOP SITES ACCESSING THE SITE VIA AN IFRAME 8004 if (top != self) { 8005 $('body').html('<h1 style="margin-top: 40px">This site cannot be accessed via an iframe.</h1><p style="font-size: 14px">If you are seeing this message, please contact <a style="text-decoration: underline;" href="http://www.cleverbox.co.uk">Cleverbox</a> for instructions on setting your site live.</p>'); 8006 } 8007 8008 $("body").on('click', 'a[rel*=external]', function (e) { 8009 window.open(this.href); 8010 return false; 8011 }); 8012 8013 $('.pager a').click(function (e) { 8014 e.preventDefault(); 8015 }) 8016 8017 $('.gallery_link[href$="#"]').click(function (e) { 8018 e.preventDefault(); 8019 $(this).parent('#sidegallery_wrap').find('li.cycle-slide-active a').click(); 8020 }); 8021 8022 $('#search_open, #search_close').click(function (e) { 8023 e.preventDefault(); 8024 if ($('#search').hasClass('open')) { 8025 $('header').animate({marginTop: "0"}, 500); 8026 $('#search').animate({top: "-50px"}, 500).removeClass('open'); 8027 } else { 8028 $('header').animate({marginTop: "50px"}, 500); 8029 $('#search').animate({top: "0"}, 500).addClass('open'); 8030 $('#kw').focus(); 8031 } 8032 }); 8033 8034 $('#search_form').submit(function() { siteLoad.searchSubmit('#kw'); return false; }); 8035 $('#search_go').click(function() { siteLoad.searchSubmit('#kw'); return false; }); 8036 8037 8038 $('#search_form_nav').submit(function() { siteLoad.searchSubmit('#kw_nav'); return false; }); 8039 $('#search_go_nav').click(function() { 8040 if ($('#kw_nav').val() != 'Search Site') { 8041 siteLoad.searchSubmit('#kw_nav'); 8042 return false; 8043 } 8044 }); 8045 8046 $('form#search_form #kw, form#search_form_nav #kw').keydown(function(event){ 8047 if (reactCMS.allowed_search_char(event)) 8048 return true; 8049 8050 return false; 8051 }); 8052 8053 $('#full_search_button').live('click', function() { 8054 $('form#search_form_nav #kw_nav').val($("#fullsearch_kw").val()); 8055 $('form#search_form_nav').submit(); 8056 }); 8057 8058 }, 8059 8060 topnav_hover : function() { 8061 $('#main_nav ul > li.sub').each(function() { 8062 var $menuItem = $(this), 8063 $submenu = $('> ul', $menuItem); 8064
8065 var menuItemPos = $menuItem.position(); 8066 8067 $submenu.css({ 8068 left: menuItemPos.left 8069 }); 8070 }); 8071 }, 8072 8073 sidePanel : function(){ 8074 $('#side_panel_wrap').stop().animate({'right':'0'}); 8075 8076 function scroll_height(){ 8077 var win_ht = $(window).height(); 8078 var intro_ht = $('#side_panel_intro').outerHeight(); 8079 var panel_ht = win_ht-intro_ht-20; 8080 $('#side_panel_lists').height(panel_ht); 8081 $('#side_panel_lists').jScrollPane(); 8082 } 8083 8084 function sidePanelShowHide(){ 8085 var sidePanelWidth = $('#side_panel').width(); 8086 //$('#shroud').hide(); 8087 $('#side_panel').css({'margin-right':'-'+sidePanelWidth+'px'}); 8088 8089 $('#side_panel_wrap').on('click','#showhide_side_panel', function(e){ 8090 e.preventDefault(); 8091 if(!$('#showhide_side_panel').hasClass('active')){ 8092 $('#showhide_side_panel').addClass('active'); 8093 $('#shroud').fadeIn(); 8094 $('#side_panel').stop().animate({'margin-right':'0'}); 8095 $('body').css({'overflow':'hidden'}); 8096 }else{ 8097 var sidePanelWidth = $('#side_panel').width(); 8098 $('#showhide_side_panel').removeClass('active'); 8099 $('#side_panel').stop().animate({'margin-right':'-'+sidePanelWidth+'px'}); 8100 $('#shroud').fadeOut(); 8101 $('body').css({'overflow':'auto'}); 8102 } 8103 }); 8104 8105 $('#shroud').on('click',function(){ 8106 var sidePanelWidth = $('#side_panel').width(); 8107 $('#showhide_side_panel').removeClass('active'); 8108 $('#side_panel').stop().animate({'margin-right':'-'+sidePanelWidth+'px'}); 8109 $('#shroud').fadeOut(); 8110 $('body').css({'overflow':'auto'}); 8111 }); 8112 } 8113 8114 $(function(){ 8115 scroll_height(); 8116 sidePanelShowHide(); 8117 }); 8118 8119 $(window).resize(function(){ 8120 scroll_height(); 8121 }); 8122 }, 8123 8124 backToTop: function () { 8125 $(".totop").on("click", function(e){ 8126 $("html, body").animate({ scrollTop: 0 }, 3000); 8127 e.preventDefault(); 8128 }); 8129 }, 8130 8131 stickyNav: function () { 8132 var sticky_navigation_offset_top = $('#top_nav_wrap').offset().top; 8133 var sticky_navigation = function(){ 8134 var scroll_top = $(window).scrollTop(); // our current vertical position from the top 8135 if (scroll_top > sticky_navigation_offset_top && $(window).width() > 990) { 8136 $('#top_nav_wrap').css({ 'position': 'fixed', 'top':0, 'left':0 }); 8137 } else { 8138 $('#top_nav_wrap').css({ 'position': 'relative' }); 8139 } 8140 }; 8141 8142 sticky_navigation(); 8143 8144 $(window).on('scroll resize', function() { 8145 sticky_navigation(); 8146 }); 8147 }, 8148 8149 /*mainFunctions: function () { 8150 8151 //STOP SITES ACCESSING THE SITE VIA AN IFRAME 8152 if (top != self) { 8153 $('body').html('<h1 style="margin-top: 40px">This site cannot be accessed via an iframe.</h1><p style="font-size: 14px">If you are seeing this message, please contact <a style="text-decoration: underline;" href="http://www.cleverbox.co.uk">Cleverbox</a> for instructions on setting your site live.</p>'); 8154 } 8155 8156 $("body").on('click', 'a[rel~="external"]', function () { 8157 window.open(this.href); 8158 return false; 8159 }); 8160 8161 $('.pager a').click(function (e) { 8162 e.preventDefault(); 8163 }) 8164 8165 $('.gallery_link[href$="#"]').click(function (e) { 8166 e.preventDefault(); 8167 $(this).parent('#sidegallery_wrap').find('li.cycle-slide-active a').click(); 8168 }); 8169 8170 $('#search_form').submit(function() { siteLoad.searchSubmit('#kw'); return false; }); 8171 $('#search_go').click(function() { siteLoad.searchSubmit('#kw'); return false; }); 8172 8173 $('form#search_form #kw').keydown(function(event){ 8174 if (reactCMS.allowed_search_char(event)) 8175 return true; 8176 8177 return false; 8178 }); 8179 8180 //IF YOU HAVE A SLIDE OUT SEARCH BOX, COMMENT OUT THE 'search_go' LINE ABOVE AND UNCOMMENT THE CODE BELOW: 8181 *//* 8182 $('#search_form input').focus(function() { $(this).addClass("focused");}); 8183 $('#search_form input').focusout(function() { 8184 $(this).removeClass("focused"); 8185 if(!$('#search_form input').hasClass('focused')) { 8186 $('#icon_search').stop().animate({ 8187 width: 32
8188 }); 8189 } 8190 }); 8191 8192 if (reactCMS.iDevice() == true) { 8193 $('#search_go').live('click', function(e){ 8194 e.preventDefault(); 8195 if ($('#icon_search').width() > 32) { 8196 $('#icon_search').stop().animate({ 8197 width: 32 8198 }); 8199 } else { 8200 $('#icon_search').stop().animate({ 8201 width: 217 8202 }); 8203 } 8204 8205 }); 8206 } else { 8207 $('#icon_search').hover(function(){ 8208 $(this).stop().animate({ 8209 width: 217 8210 }); 8211 }, function(){ 8212 if(!$('#search_form input').hasClass('focused')) { 8213 $('#icon_search').stop().animate({ 8214 width: 32 8215 }); 8216 } 8217 } 8218 ); 8219 $('#search_go').click(function() { siteLoad.searchSubmit('#kw'); return false; }); 8220 }*//* 8221 8222 },*/ 8223 8224 sitemapSplit : function(){ 8225 var $bigList = $('#sitemap'), group; 8226 while((group = $bigList.find('> li:lt(3)').remove()).length){ 8227 $('<ul class="sitemap"/>').append(group).appendTo('#middlecol'); 8228 } 8229 $bigList.remove(); 8230 }, 8231 8232 mainnav_split : function() { 8233 8234 if($(window).width() > 747){ 8235 8236 $('#main_nav ul > li.sub > ul').each(function(){ 8237 if($(this).children().length > 8){ 8238 8239 $(this).addClass("wide"); 8240 8241 var num_cols = 2, 8242 container = $(this), 8243 listItem = '> li', 8244 listClass = 'sub-list'; 8245 container.each(function() { 8246 var items_per_col = new Array(), 8247 items = $(this).find(listItem), 8248 min_items_per_col = Math.floor(items.length / num_cols), 8249 difference = items.length - (min_items_per_col * num_cols); 8250 for (var i = 0; i < num_cols; i++) { 8251 if (i < difference) { 8252 items_per_col[i] = min_items_per_col + 1; 8253 } else { 8254 items_per_col[i] = min_items_per_col; 8255 } 8256 } 8257 for (var i = 0; i < num_cols; i++) { 8258 $(this).append($('<div></div>').addClass(listClass).addClass(listClass+'-'+i)); 8259 for (var j = 0; j < items_per_col[i]; j++) { 8260 var pointer = 0; 8261 for (var k = 0; k < i; k++) { 8262 pointer += items_per_col[k];
8263 } 8264 $(this).find('.' + listClass).last().append(items[j + pointer]); 8265 } 8266 } 8267 }); 8268 } 8269 }); 8270 8271 }else{ 8272 8273 $('#main_nav ul > li.sub > ul').each(function(){ 8274 if($(this).hasClass("wide")){ 8275 $(this).removeClass("wide"); 8276 $('> div > li', this).unwrap(); 8277 } 8278 }); 8279 8280 } 8281 }, 8282 8283 ultiNav: function () { 8284 8285 if($('body').hasClass('fixed_width')){ 8286 $mobileNav = false; 8287 }else{ 8288 $mobileNav = true; 8289 } 8290 8291 $('#main_nav > ul').ultiNav({ 8292 // Default Options 8293 overflowNav: false, 8294 mobileNav: $mobileNav, 8295 mobilewidth: 990, 8296 overflowClass: "overflow_nav", 8297 showHideIcon: "fa-bars", 8298 arrowDownIcon: "fa-chevron-down", 8299 arrowUpIcon: "fa-chevron-up", 8300 moreNavIcon: "fa-ellipsis-h" 8301 }); 8302 8303 showHidePoss(); 8304 8305 $(window).resize(function(){ 8306 showHidePoss(); 8307 }); 8308 8309 function showHidePoss(){ 8310 var mar = 15; 8311 if($(window).width() > 770){ 8312 mar = 15; 8313 }else{ 8314 mar = 0; 8315 } 8316 var rt = ($(window).width() - ($("header .container").offset().left + $("header .container").outerWidth()) +mar); 8317 $("#main_nav a.showHide").css({"margin-right": rt}); 8318 } 8319 8320 }, 8321 8322 8323 8324 responsive_cycle : function() { 8325 $('body').append('<div id="responsive_query_check"><!-- Responsive Query Check --></div>'); 8326 cursize = 'lg'; 8327 8328 siteLoad.responsive_cycle_resize(); 8329 siteLoad.cycle_resize_elements(); 8330 8331 $(window).load(function(){ 8332 $('ul.cycle-slideshow').each(function() { 8333 $(this).find('li.cycle-sentinel a').removeClass('fancybox'); 8334 }); 8335 8336 siteLoad.responsive_cycle_resize(); 8337 siteLoad.cycle_resize_elements(); 8338 }); 8339 8340 $(window).resize(function() { 8341 siteLoad.responsive_cycle_resize(); 8342 siteLoad.cycle_resize_elements(); 8343 }); 8344 }, 8345 8346 cycle_resize_elements : function() { 8347 $('.cycle-slideshow').each(function(){ 8348 if (typeof $(this).data('cycle-resize-element') !== 'undefined'){ 8349 var element = $(this).data('cycle-resize-element'); 8350 $(element, this).css({'height':'auto'}).setAllToMaxHeight(); 8351 } 8352 }); 8353 $('.owl-carousel').each(function(){ 8354 //var element = $(this).data('owl-item'); 8355 $('a', this).css({'height':'auto'}).setAllToMaxHeight(); 8356 }); 8357 }, 8358 8359 responsive_cycle_resize : function () { 8360 cursize = ''; 8361 8362 if (typeof cycle_width === 'undefined') { 8363 cycle_width = 0; 8364 } 8365 8366 var width = $('#responsive_query_check').width(); 8367 var size = 'lg'; 8368 8369 if (cycle_width != width) { 8370 8371 switch (width) { 8372 case 1200: 8373 size = 'lg'; 8374 default_visible = 3; 8375 break; 8376 case 990: 8377 size = 'md'; 8378 default_visible = 2; 8379 break; 8380 case 767: 8381 size = 'sm'; 8382 default_visible = 1; 8383 break; 8384 case 320: 8385 size = 'xs'; 8386 default_visible = 1; 8387 break; 8388 case 250: 8389 size = 'xxs'; 8390 default_visible = 1; 8391 break; 8392 } 8393 8394 if ( size != cursize ) { 8395 $(".cycle-slideshow[data-cycle-carousel-breakpoints='true']").each(function() { 8396 8397 if ($(this).data('cycle.opts').slideCount >= $(this).data("cycle-visible-" + size)) { 8398 var visible = $(this).data("cycle-visible-" + size); 8399 } else { 8400 var visible = default_visible; 8401 //var visible = $(this).data('cycle.opts').slideCount; 8402 } 8403
8404 $(this).attr("data-cycle-carousel-visible", visible); 8405 $('.cycle-sentinel', this).remove(); 8406 $(this).cycle('reinit'); 8407 8408 }); 8409 cursize = size; 8410 } 8411 cycle_width = width; 8412 8413 } 8414 }, 8415 8416 leftNavAccordion: function () { 8417 $('ul#leftnav ul').hide(); 8418 $('ul#leftnav li.sel > ul').show(); 8419 8420 $('ul#leftnav li.sub > a').click(function (event) { 8421 event.preventDefault(); 8422 8423 $('ul#leftnav li a').not(this).parent('li').removeClass('sel').children('ul').slideUp(300); 8424 8425 $(this).parent('li').toggleClass('sel'); 8426 $(this).parent('li').children('ul').slideToggle(350); 8427 }); 8428 }, 8429 8430 tableStyle: function () { 8431 8432 $(window).resize(function() { 8433 $('table.default_table').each(function () { 8434 var currentTable = $(this); 8435 var arrow = currentTable.parent().find('.swipe_arrow'); 8436 8437 if (currentTable.width() > currentTable.parent().width()) { 8438 if (!arrow.hasClass('removed')) { 8439 arrow.show(); 8440 } 8441 } else { 8442 if (!arrow.hasClass('removed')) { 8443 arrow.hide(); 8444 } 8445 } 8446 }); 8447 }); 8448 8449 $('table:not(.content_table)').each(function () { 8450 var currentTable = $(this); 8451 var className = $(currentTable).attr('class'); 8452 8453 var parentClass = $(currentTable).parent().attr('class'); 8454 if ((className == '' || className == 'MsoNormalTable' || typeof className == 'undefined') && parentClass != 'datepickerContainer') { 8455 8456 $(currentTable).addClass('default_table table'); 8457 $(currentTable).wrap('<div class="table-responsive"></div>'); 8458 8459 if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){ 8460 $(currentTable).parent().append('<div class="swipe_arrow"><!--swipe arrow--></div>'); 8461 } 8462 8463 $(currentTable).parent().find('.swipe_arrow').hide(); 8464 8465 if (currentTable.width() > currentTable.parent().width()) { 8466 $(currentTable).parent().find('.swipe_arrow').show(); 8467 $(currentTable).parent().addClass('scroll_table'); 8468 } 8469 $(currentTable).parent().scroll(function() { 8470 arrow = $(this).find('.swipe_arrow'); 8471 if (!arrow.hasClass('removed')) { 8472 arrow.addClass('removed').fadeOut(); 8473 } 8474 }); 8475 8476 var rowCount = $(currentTable).find('tr').length; 8477 if (rowCount == 1) { 8478 $(currentTable).find('td').addClass('single_row'); 8479 } else { 8480 $(currentTable).find('tr:even').addClass('row_even'); 8481 } 8482 } 8483 }); 8484 8485 }, 8486 8487 topnavBorder: function () { 8488 if ($.browser.msie && $.browser.version.substr(0, 1) == 6) { 8489 //do nothing 8490 } else { 8491 //removes border on span tag on previous li to selected li 8492 $('#main_nav ul > li.sel').next('li').addClass('no-border'); 8493 8494 //removes border on span tag on previous li to hovered li 8495 $('#main_nav ul > li:not(.sel)').hover(function () { 8496 $(this).next('li').addClass('no-border'); 8497 }, function () { 8498 $(this).next('li').removeClass('no-border'); 8499 }) 8500 } 8501 }, 8502 8503 initAddThis: function () { 8504 if (typeof addthis != "undefined") { addthis.init(); } 8505 }, 8506 8507 searchAutoComplete: function (element) { 8508 8509 $(element).autocomplete('/inc/ajax/search.php', { 8510 width: 180, 8511 minChars: 3, 8512 selectFirst: false, 8513 matchContains: true 8514 }); 8515 $(element).autocomplete().result(function (event, data, formatted) { 8516 if (data) { 8517 document.location = data[1]; 8518 } 8519 }); 8520 8521 }, 8522 8523 defaultText: function (element, default_text) { 8524 $(element).focus(function () { 8525 if ($(element).val() == default_text) $(element).val(''); 8526 }); 8527 $(element).blur(function () { 8528 if ($(element).val() == '') $(element).val(default_text); 8529 }); 8530 }, 8531 8532 bookmark: function (className) { 8533 8534 $(className).click(function (event) { 8535 var isFirefox = typeof InstallTrigger !== 'undefined'; 8536 8537 if (!isFirefox) { 8538 event.preventDefault(); 8539 var url = this.href; 8540 var title = this.title; 8541 8542 // Mozilla Firefox Bookmark 8543 if ('sidebar' in window && 'addPanel' in window.sidebar) {
8544 window.sidebar.addPanel(location.href,document.title,""); 8545 } else if( /*@cc_on!@*/false) { // IE Favorite 8546 window.external.AddFavorite(location.href,document.title); 8547 } else { // webkit - safari/chrome 8548 alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != - 1 ? 'Command/Cmd' : 'CTRL') + ' + D to bookmark this page.'); 8549 } 8550 } 8551 }); 8552 8553 }, 8554 8555 searchSubmit: function (idName) { 8556 kw = encodeURIComponent(encodeURIComponent($(idName).val())); 8557 if (kw.length > 2) { 8558 document.location = '/search/' + kw; 8559 } 8560 }, 8561 8562 autoMegaNav: function () { 8563 8564 8565 /* Top Nav Js */ 8566 $('div.dropdown').each(function () { 8567 var content = $('div.dropdown_content', this); 8568 if (content.length < 1) { 8569 $(this).addClass('no_content'); 8570 } 8571 }); 8572 $('#header_links li, #topnav li').hover(function () { 8573 ht = $('div.dropdown', this).height(); 8574 if ($(this).hasClass('last') || $(this).hasClass('second-last') || $(this).hasClass('thrid-last')) { 8575 //$('div.dropdown',this).css({'left':'auto','right':'0px','height':0}).stop().animate({'height': ht}); 8576 $('div.dropdown', this).css({'left': 'auto', 'right': '0px'}); 8577 } else { 8578 //$('div.dropdown',this).css({'left':'0px','height':'0px'}).stop().animate({'height': ht}); 8579 $('div.dropdown', this).css({'left': '0px'}); 8580 } 8581 }, function () { 8582 $('div.dropdown', this).css({'left': '-99999999px'}); 8583 }); 8584 8585 /* Split Main nav dropdown in two */ 8586 /* Written by Jamie Lomas - Taken from Sheffield High School */ 8587 $('#topnav li ul').wrap('<div class="dropdown" />'); 8588 $('#topnav li div.dropdown ul').each(function () { 8589 $items = $('li', this); 8590 if ($items.length > 5) { 8591 $items.slice(0, ($items.length + 1) / 2).wrapAll('<ul />'); 8592 $items.slice(($items.length + 1) / 2).wrapAll('<ul />'); 8593 } else { 8594 $items.wrapAll('<ul />'); 8595 $(this).parents(".dropdown").width(210); 8596 } 8597 var html = $(this).html(); 8598 $(this).replaceWith(html); 8599 }); 8600 8601 /* Add Class to third and second to last */ 8602 var navcnt = $('#topnav > li').length - 1; 8603 var navcnt2 = $('#topnav > li').length - 2; 8604 $('#topnav > li:nth-child(' + navcnt + ')').addClass('second-last'); 8605 $('#topnav > li:nth-child(' + navcnt2 + ')').addClass('thrid-last'); 8606 }, 8607 8608 leftNavArrows: function () { 8609 8610 $('#leftnav > li:not(.sel) a').css({backgroundPosition: "224px 10px"}).hover(function () { 8611 $(this).stop().animate({ backgroundPosition: '202px 10px', color: "#7aa722" }, 500); 8612 }, function () { 8613 $(this).stop().animate({ backgroundPosition: '230px 10px', color: "#000" }, 1000); 8614 }); 8615 8616 } 8617 8618} 8619 8620$(document).ready(siteLoad.load); 8621 8622$.tablesorter.addParser({ 8623 id: 'filesize', 8624 is: function (s) { 8625 return s.match(new RegExp(/[0-9]+(\.[0-9]+)?(KB|B|GB|MB|TB)$/i)); 8626 }, 8627 format: function (s) { 8628 var suf = s.match(new RegExp(/(KB|B|GB|MB|TB)/i))[1]; 8629 var num = parseFloat(s.match(new RegExp(/^[0-9]+(\.[0-9]+)?/))[0]); 8630 switch (suf) { 8631 case 'B': 8632 return num; 8633 case 'KB': 8634 return num * 1024; 8635 case 'MB': 8636 return num * 1024 * 1024; 8637 case 'GB': 8638 return num * 1024 * 1024 * 1024; 8639 case 'TB': 8640 return num * 1024 * 1024 * 1024 * 1024; 8641 } 8642 }, 8643 type: 'numeric' 8644}); 8645 8646var lMonthNames = {}; 8647lMonthNames["Jan "] = "01"; 8648lMonthNames["Feb "] = "02"; 8649lMonthNames["Mar "] = "03"; 8650lMonthNames["Apr "] = "04"; 8651lMonthNames["May "] = "05"; 8652lMonthNames["Jun "] = "06"; 8653lMonthNames["Jul "] = "07"; 8654lMonthNames["Aug "] = "08"; 8655lMonthNames["Sep "] = "09"; 8656lMonthNames["Oct "] = "10"; 8657lMonthNames["Nov "] = "11"; 8658lMonthNames["Dec "] = "12"; 8659 8660$.tablesorter.addParser({ 8661 id: 'dayMonthYear', 8662 is: function (s) { 8663 return false; 8664 }, 8665 format: function (s) { 8666 if (s.length > 0) { 8667 var date = s.match(/^(\d{1,2}[sndrth]{2} )?(\w{3} )?(\d{4})$/); 8668 8669 var d = '01'; 8670 if (date[1]) { 8671 d = '' + parseInt(String(date[1])); 8672 if (d.length == 1) { 8673 d = "0" + d; 8674 } 8675 } 8676 8677 var m = '01'; 8678 if (date[2]) { 8679 m = lMonthNames[date[2]]; 8680 } 8681 var y = date[3]; 8682 return '' + y + m + d; 8683 } else { 8684 return ''; 8685 } 8686 }, 8687 type: 'numeric' 8688});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.