﻿function DateAdd(a, b, c) { switch (a) { case "d": b.setDate(b.getDate() + c); break; case "m": b.setMonth(b.getMonth() + c); break; case "y": b.setYear(b.getFullYear() + c); break; case "h": b.setHours(b.getHours() + c); break; case "n": b.setMinutes(b.getMinutes() + c); break; case "s": b.setSeconds(b.getSeconds() + c) } return b } function parseDate(a) { var b = arguments.length == 2 ? arguments[1] : !1; generalFormats = ["y-M-d", "MMM d, y", "MMM d,y", "y-MMM-d", "d-MMM-y", "MMM d"], monthFirst = ["M/d/y", "M-d-y", "M.d.y", "MMM-d", "M/d", "M-d"], dateFirst = ["d/M/y", "d-M-y", "d.M.y", "d-MMM", "d/M", "d-M"], b = ["generalFormats", b ? "dateFirst" : "monthFirst", b ? "monthFirst" : "dateFirst"]; for (var c = null, d = 0; d < b.length; d++) for (var e = window[b[d]], f = 0; f < e.length; f++) { c = getDateFromFormat(a, e[f]); if (c != 0) return new Date(c) } return null } function getDateFromFormat(a, b) { a += "", b += ""; var c = 0, d = 0, e = "", f = "", g, h, i = new Date, j = i.getYear(), k = i.getMonth() + 1, l = 1, m = i.getHours(), n = i.getMinutes(); i = i.getSeconds(); for (var o = ""; d < b.length; ) { e = b.charAt(d); for (f = ""; b.charAt(d) == e && d < b.length; ) f += b.charAt(d++); if (f == "yyyy" || f == "yy" || f == "y") { f == "yyyy" && (h = g = 4), f == "yy" && (h = g = 2), f == "y" && (g = 2, h = 4), j = _getInt(a, c, g, h); if (j == null) return 0; c += j.length, j.length == 2 && (j = j > 70 ? 1900 + (j - 0) : 2e3 + (j - 0)) } else if (f == "MMM" || f == "NNN") { for (e = k = 0; e < MONTH_NAMES.length; e++) { var p = MONTH_NAMES[e]; if (a.substring(c, c + p.length).toLowerCase() == p.toLowerCase()) if (f == "MMM" || f == "NNN" && e > 11) { k = e + 1, k > 12 && (k -= 12), c += p.length; break } } if (k < 1 || k > 12) return 0 } else if (f == "EE" || f == "E") for (e = 0; e < DAY_NAMES.length; e++) { f = DAY_NAMES[e]; if (a.substring(c, c + f.length).toLowerCase() == f.toLowerCase()) { c += f.length; break } } else if (f == "MM" || f == "M") { k = _getInt(a, c, f.length, 2); if (k == null || k < 1 || k > 12) return 0; c += k.length } else if (f == "dd" || f == "d") { l = _getInt(a, c, f.length, 2); if (l == null || l < 1 || l > 31) return 0; c += l.length } else if (f == "hh" || f == "h") { m = _getInt(a, c, f.length, 2); if (m == null || m < 1 || m > 12) return 0; c += m.length } else if (f == "HH" || f == "H") { m = _getInt(a, c, f.length, 2); if (m == null || m < 0 || m > 23) return 0; c += m.length } else if (f == "KK" || f == "K") { m = _getInt(a, c, f.length, 2); if (m == null || m < 0 || m > 11) return 0; c += m.length } else if (f == "kk" || f == "k") { m = _getInt(a, c, f.length, 2); if (m == null || m < 1 || m > 24) return 0; c += m.length, m-- } else if (f == "mm" || f == "m") { n = _getInt(a, c, f.length, 2); if (n == null || n < 0 || n > 59) return 0; c += n.length } else if (f == "ss" || f == "s") { i = _getInt(a, c, f.length, 2); if (i == null || i < 0 || i > 59) return 0; c += i.length } else if (f == "a") { if (a.substring(c, c + 2).toLowerCase() == "am") o = "AM"; else if (a.substring(c, c + 2).toLowerCase() == "pm") o = "PM"; else return 0; c += 2 } else { if (a.substring(c, c + f.length) != f) return 0; c += f.length } } if (c != a.length) return 0; if (k == 2) if (j % 4 == 0 && j % 100 != 0 || j % 400 == 0) { if (l > 29) return 0 } else if (l > 28) return 0; if (k == 4 || k == 6 || k == 9 || k == 11) if (l > 30) return 0; m < 12 && o == "PM" ? m = m - 0 + 12 : m > 11 && o == "AM" && (m -= 12); return (new Date(j, k - 1, l, m, n, i)).getTime() } function _getInt(a, b, c, d) { for (d = d; d >= c; d--) { var e = a.substring(b, b + d); if (e.length < c) break; if (_isInteger(e)) return e } return null } function _isInteger(a) { for (var b = 0; b < a.length; b++) if ("1234567890".indexOf(a.charAt(b)) == -1) return !1; return !0 } function formatDate(a, b) { b += ""; var c = "", d = 0, e = "", f = ""; e = a.getYear() + "", f = a.getMonth() + 1; var g = a.getDate(), h = a.getDay(), i = a.getHours(), j = a.getMinutes(), k = a.getSeconds(), l = {}; e.length < 4 && (e = "" + (e - 0 + 1900)), l.y = "" + e, l.yyyy = e, l.yy = e.substring(2, 4), l.M = f, l.MM = LZ(f), l.MMM = MONTH_NAMES[f - 1], l.NNN = MONTH_NAMES[f + 11], l.d = g, l.dd = LZ(g), l.E = DAY_NAMES[h + 7], l.EE = DAY_NAMES[h], l.H = i, l.HH = LZ(i), l.h = i == 0 ? 12 : i > 12 ? i - 12 : i, l.hh = LZ(l.h), l.K = i > 11 ? i - 12 : i, l.k = i + 1, l.KK = LZ(l.K), l.kk = LZ(l.k), l.a = i > 11 ? "PM" : "AM", l.m = j, l.mm = LZ(j), l.s = k; for (l.ss = LZ(k); d < b.length; ) { e = b.charAt(d); for (f = ""; b.charAt(d) == e && d < b.length; ) f += b.charAt(d++); c += l[f] != null ? l[f] : f } return c } function compareDates(a, b, c, d) { a = getDateFromFormat(a, b), c = getDateFromFormat(c, d); if (a == 0 || c == 0) return -1; if (a > c) return 1; return 0 } function isDate(a, b) { if (getDateFromFormat(a, b) == 0) return !1; return !0 } function LZ(a) { return (a < 0 || a > 9 ? "" : "0") + a } var MONTH_NAMES = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], DAY_NAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; (function(a) { function b(b, d, e) { var f = this, g = b.add(this), h = b.find(e.tabs), i = d.jquery ? d : b.children(d), j; h.length || (h = b.children()), i.length || (i = b.parent().find(d)), i.length || (i = a(d)), a.extend(this, { click: function(b, d) { var i = h.eq(b); typeof b == "string" && b.replace("#", "") && (i = h.filter("[href*=" + b.replace("#", "") + "]"), b = Math.max(h.index(i), 0)); if (e.rotate) { var k = h.length - 1; if (b < 0) return f.click(k, d); if (b > k) return f.click(0, d) } if (!i.length) { if (j >= 0) return f; b = e.initialIndex, i = h.eq(b) } if (b === j) return f; d = d || a.Event(), d.type = "onBeforeClick", g.trigger(d, [b]); if (!d.isDefaultPrevented()) { c[e.effect].call(f, b, function() { d.type = "onClick", g.trigger(d, [b]) }), j = b, h.removeClass(e.current), i.addClass(e.current); return f } }, getConf: function() { return e }, getTabs: function() { return h }, getPanes: function() { return i }, getCurrentPane: function() { return i.eq(j) }, getCurrentTab: function() { return h.eq(j) }, getIndex: function() { return j }, next: function() { return f.click(j + 1) }, prev: function() { return f.click(j - 1) }, destroy: function() { h.unbind(e.event).removeClass(e.current), i.find("a[href^=#]").unbind("click.T"); return f } }), a.each("onBeforeClick,onClick".split(","), function(b, c) { a.isFunction(e[c]) && a(f).bind(c, e[c]), f[c] = function(b) { b && a(f).bind(c, b); return f } }), e.history && a.fn.history && (a.tools.history.init(h), e.event = "history"), h.each(function(b) { a(this).bind(e.event, function(a) { f.click(b, a); return a.preventDefault() }) }), i.find("a[href^=#]").bind("click.T", function(b) { f.click(a(this).attr("href"), b) }), location.hash && e.tabs == "a" && b.find("[href=" + location.hash + "]").length ? f.click(location.hash) : (e.initialIndex === 0 || e.initialIndex > 0) && f.click(e.initialIndex) } a.tools = a.tools || { version: "1.2.5" }, a.tools.tabs = { conf: { tabs: "a", current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", rotate: !1, history: !1 }, addEffect: function(a, b) { c[a] = b } }; var c = { "default": function(a, b) { this.getPanes().hide().eq(a).show(), b.call() }, fade: function(a, b) { var c = this.getConf(), d = c.fadeOutSpeed, e = this.getPanes(); d ? e.fadeOut(d) : e.hide(), e.eq(a).fadeIn(c.fadeInSpeed, b) }, slide: function(a, b) { this.getPanes().slideUp(200), this.getPanes().eq(a).slideDown(400, b) }, ajax: function(a, b) { this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"), b) } }, d; a.tools.tabs.addEffect("horizontal", function(b, c) { d || (d = this.getPanes().eq(0).width()), this.getCurrentPane().animate({ width: 0 }, function() { a(this).hide() }), this.getPanes().eq(b).animate({ width: d }, function() { a(this).show(), c.call() }) }), a.fn.tabs = function(c, d) { var e = this.data("tabs"); e && (e.destroy(), this.removeData("tabs")), a.isFunction(d) && (d = { onBeforeClick: d }), d = a.extend({}, a.tools.tabs.conf, d), this.each(function() { e = new b(a(this), c, d), a(this).data("tabs", e) }); return d.api ? e : this } })(jQuery), function(a) { function c(c, e) { var g = this, h = c.add(g), i, j = 0, k = 0, l = c.attr("title"), m = c.attr("data-tooltip"), n = d[e.effect], q, r = c.is(":input"), s = r && c.is(":checkbox, :radio, select, :button, :submit"), t = c.attr("type"), u = e.events[t] || e.events[r ? s ? "widget" : "input" : "def"]; if (!n) throw 'Nonexistent effect "' + e.effect + '"'; u = u.split(/,\s*/); if (u.length != 2) throw "Tooltip: bad events configuration for " + t; c.bind(u[0], function(a) { clearTimeout(j), e.predelay ? k = setTimeout(function() { g.show(a) }, e.predelay) : g.show(a) }).bind(u[1], function(a) { clearTimeout(k), e.delay ? j = setTimeout(function() { g.hide(a) }, e.delay) : g.hide(a) }), l && e.cancelDefault && (c.removeAttr("title"), c.data("title", l)), a.extend(g, { show: function(d) { if (!i) { m ? i = a(m) : e.tip ? i = a(e.tip).eq(0) : l ? i = a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(l) : (i = c.next(), i.length || (i = c.parent().next())); if (!i.length) throw "Cannot find tooltip for " + c } if (g.isShown()) return g; i.stop(!0, !0); var o = b(c, i, e); e.tip && i.html(c.data("title")), d = d || a.Event(), d.type = "onBeforeShow", h.trigger(d, [o]); if (d.isDefaultPrevented()) return g; o = b(c, i, e), i.css({ position: "absolute", top: o.top, left: o.left }), q = !0, n[0].call(g, function() { d.type = "onShow", q = "full", h.trigger(d) }), o = e.events.tooltip.split(/,\s*/), i.data("__set") || (i.bind(o[0], function() { clearTimeout(j), clearTimeout(k) }), o[1] && !c.is("input:not(:checkbox, :radio), textarea") && i.bind(o[1], function(a) { a.relatedTarget != c[0] && c.trigger(u[1].split(" ")[0]) }), i.data("__set", !0)); return g }, hide: function(b) { if (!i || !g.isShown()) return g; b = b || a.Event(), b.type = "onBeforeHide", h.trigger(b); if (!b.isDefaultPrevented()) { q = !1, d[e.effect][1].call(g, function() { b.type = "onHide", h.trigger(b) }); return g } }, isShown: function(a) { return a ? q == "full" : q }, getConf: function() { return e }, getTip: function() { return i }, getTrigger: function() { return c } }), a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(b, c) { a.isFunction(e[c]) && a(g).bind(c, e[c]), g[c] = function(b) { b && a(g).bind(c, b); return g } }) } function b(b, c, d) { var e = d.relative ? b.position().top : b.offset().top, g = d.relative ? b.position().left : b.offset().left, h = d.position[0]; e -= c.outerHeight() - d.offset[0], g += b.outerWidth() + d.offset[1], /iPad/i.test(navigator.userAgent) && (e -= a(window).scrollTop()); var i = c.outerHeight() + b.outerHeight(); h == "center" && (e += i / 2), h == "bottom" && (e += i), h = d.position[1], b = c.outerWidth() + b.outerWidth(), h == "center" && (g -= b / 2), h == "left" && (g -= b); return { top: e, left: g} } a.tools = a.tools || { version: "1.2.5" }, a.tools.tooltip = { conf: { effect: "toggle", fadeOutSpeed: "fast", predelay: 0, delay: 30, opacity: 1, tip: 0, position: ["top", "center"], offset: [0, 0], relative: !1, cancelDefault: !0, events: { def: "mouseenter,mouseleave", input: "focus,blur", widget: "focus mouseenter,blur mouseleave", tooltip: "mouseenter,mouseleave" }, layout: "<div/>", tipClass: "tooltip" }, addEffect: function(a, b, c) { d[a] = [b, c] } }; var d = { toggle: [function(a) { var b = this.getConf(), c = this.getTip(); b = b.opacity, b < 1 && c.css({ opacity: b }), c.show(), a.call() }, function(a) { this.getTip().hide(), a.call() } ], fade: [function(a) { var b = this.getConf(); this.getTip().fadeTo(b.fadeInSpeed, b.opacity, a) }, function(a) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, a) } ] }; a.fn.tooltip = function(b) { var d = this.data("tooltip"); if (d) return d; b = a.extend(!0, {}, a.tools.tooltip.conf, b), typeof b.position == "string" && (b.position = b.position.split(/,?\s/)), this.each(function() { d = new c(a(this), b), a(this).data("tooltip", d) }); return b.api ? d : this } } (jQuery), function(a) { var b = a.tools.tooltip; a.extend(b.conf, { direction: "up", bounce: !1, slideOffset: 10, slideInSpeed: 200, slideOutSpeed: 200, slideFade: !a.browser.msie }); var c = { up: ["-", "top"], down: ["+", "top"], left: ["-", "left"], right: ["+", "left"] }; b.addEffect("slide", function(a) { var b = this.getConf(), d = this.getTip(), f = b.slideFade ? { opacity: b.opacity} : {}, g = c[b.direction] || c.up; f[g[1]] = g[0] + "=" + b.slideOffset, b.slideFade && d.css({ opacity: 0 }), d.show().animate(f, b.slideInSpeed, a) }, function(b) { var f = this.getConf(), g = f.slideOffset, h = f.slideFade ? { opacity: 0} : {}, i = c[f.direction] || c.up, j = "" + i[0]; f.bounce && (j = j == "+" ? "-" : "+"), h[i[1]] = j + "=" + g, this.getTip().animate(h, f.slideOutSpeed, function() { a(this).hide(), b.call() }) }) } (jQuery), function(a) { function c(a) { for (var b = a.length; b--; ) if (a[b]) return !1; return !0 } function b(b) { var c = a(window), d = c.width() + c.scrollLeft(), e = c.height() + c.scrollTop(); return [b.offset().top <= c.scrollTop(), d <= b.offset().left + b.width(), e <= b.offset().top + b.height(), c.scrollLeft() >= b.offset().left] } var d = a.tools.tooltip; d.dynamic = { conf: { classNames: "top right bottom left"} }, a.fn.dynamic = function(e) { typeof e == "number" && (e = { speed: e }), e = a.extend({}, d.dynamic.conf, e); var f = e.classNames.split(/\s/), h; this.each(function() { var d = a(this).tooltip().onBeforeShow(function(d, i) { d = this.getTip(); var l = this.getConf(); h || (h = [l.position[0], l.position[1], l.offset[0], l.offset[1], a.extend({}, l)]), a.extend(l, h[4]), l.position = [h[0], h[1]], l.offset = [h[2], h[3]], d.css({ visibility: "hidden", position: "absolute", top: i.top, left: i.left }).show(), i = b(d); if (!c(i)) { i[2] && (a.extend(l, e.top), l.position[0] = "top", d.addClass(f[0])), i[3] && (a.extend(l, e.right), l.position[1] = "right", d.addClass(f[1])), i[0] && (a.extend(l, e.bottom), l.position[0] = "bottom", d.addClass(f[2])), i[1] && (a.extend(l, e.left), l.position[1] = "left", d.addClass(f[3])); if (i[0] || i[2]) l.offset[0] *= -1; if (i[1] || i[3]) l.offset[1] *= -1 } d.css({ visibility: "visible" }).hide() }); d.onBeforeShow(function() { var a = this.getConf(); this.getTip(), setTimeout(function() { a.position = [h[0], h[1]], a.offset = [h[2], h[3]] }, 0) }), d.onHide(function() { var a = this.getTip(); a.removeClass(e.classNames) }), ret = d }); return e.api ? ret : this } } (jQuery), function(a) { function c(c, f) { var g = this, h = c.add(g), i = c.children(), j = 0, l = f.vertical; d || (d = g), i.length > 1 && (i = a(f.items, c)), a.extend(g, { getConf: function() { return f }, getIndex: function() { return j }, getSize: function() { return g.getItems().size() }, getNaviButtons: function() { return o.add(q) }, getRoot: function() { return c }, getItemWrap: function() { return i }, getItems: function() { return i.children(f.item).not("." + f.clonedClass) }, move: function(a, b) { return g.seekTo(j + a, b) }, next: function(a) { return g.move(1, a) }, prev: function(a) { return g.move(-1, a) }, begin: function(a) { return g.seekTo(0, a) }, end: function(a) { return g.seekTo(g.getSize() - 1, a) }, focus: function() { return d = g }, addItem: function(b) { b = a(b), f.circular ? (i.children("." + f.clonedClass + ":last").before(b), i.children("." + f.clonedClass + ":first").replaceWith(b.clone().addClass(f.clonedClass))) : i.append(b), h.trigger("onAddItem", [b]); return g }, seekTo: function(b, c, m) { b.jquery || (b *= 1); if (f.circular && b === 0 && j == -1 && c !== 0) return g; if (!f.circular && b < 0 || b > g.getSize() || b < -1) return g; var n = b; b.jquery ? b = g.getItems().index(b) : n = g.getItems().eq(b); var o = a.Event("onBeforeSeek"); if (!m) { h.trigger(o, [b, c]); if (o.isDefaultPrevented() || !n.length) return g } n = l ? { top: -n.position().top} : { left: -n.position().left }, j = b, d = g, c === undefined && (c = f.speed), i.animate(n, c, f.easing, m || function() { h.trigger("onSeek", [b]) }); return g } }), a.each(["onBeforeSeek", "onSeek", "onAddItem"], function(b, c) { a.isFunction(f[c]) && a(g).bind(c, f[c]), g[c] = function(b) { b && a(g).bind(c, b); return g } }); if (f.circular) { var m = g.getItems().slice(-1).clone().prependTo(i), n = g.getItems().eq(1).clone().appendTo(i); m.add(n).addClass(f.clonedClass), g.onBeforeSeek(function(a, b, c) { if (!a.isDefaultPrevented()) { if (b == -1) { g.seekTo(m, c, function() { g.end(0) }); return a.preventDefault() } b == g.getSize() && g.seekTo(n, c, function() { g.begin(0) }) } }), g.seekTo(0, 0, function() { }) } var o = b(c, f.prev).click(function() { g.prev() }), q = b(c, f.next).click(function() { g.next() }); !f.circular && g.getSize() > 1 && (g.onBeforeSeek(function(a, b) { setTimeout(function() { a.isDefaultPrevented() || (o.toggleClass(f.disabledClass, b <= 0), q.toggleClass(f.disabledClass, b >= g.getSize() - 1)) }, 1) }), f.initialIndex || o.addClass(f.disabledClass)), f.mousewheel && a.fn.mousewheel && c.mousewheel(function(a, b) { if (f.mousewheel) { g.move(b < 0 ? 1 : -1, f.wheelSpeed || 50); return !1 } }); if (f.touch) { var r = {}; i[0].ontouchstart = function(a) { a = a.touches[0], r.x = a.clientX, r.y = a.clientY }, i[0].ontouchmove = function(a) { if (a.touches.length == 1 && !i.is(":animated")) { var b = a.touches[0], c = r.x - b.clientX; b = r.y - b.clientY, g[l && b > 0 || !l && c > 0 ? "next" : "prev"](), a.preventDefault() } } } f.keyboard && a(document).bind("keydown.scrollable", function(b) { if (!(!f.keyboard || b.altKey || b.ctrlKey || a(b.target).is(":input"))) if (f.keyboard == "static" || d == g) { var c = b.keyCode; if (l && (c == 38 || c == 40)) { g.move(c == 38 ? -1 : 1); return b.preventDefault() } if (!l && (c == 37 || c == 39)) { g.move(c == 37 ? -1 : 1); return b.preventDefault() } } }), f.initialIndex && g.seekTo(f.initialIndex, 0, function() { }) } function b(b, c) { var d = a(c); return d.length < 2 ? d : b.parent().find(c) } a.tools = a.tools || { version: "1.2.5" }, a.tools.scrollable = { conf: { activeClass: "active", circular: !1, clonedClass: "cloned", disabledClass: "disabled", easing: "swing", initialIndex: 0, item: null, items: ".items", keyboard: !0, mousewheel: !1, next: ".next", prev: ".prev", speed: 400, vertical: !1, touch: !0, wheelSpeed: 0} }; var d; a.fn.scrollable = function(b) { var d = this.data("scrollable"); if (d) return d; b = a.extend({}, a.tools.scrollable.conf, b), this.each(function() { d = new c(a(this), b), a(this).data("scrollable", d) }); return b.api ? d : this } } (jQuery), function(a) { function b(b, c) { var e = a(c); return e.length < 2 ? e : b.parent().find(c) } var c = a.tools.scrollable; c.navigator = { conf: { navi: ".navi", naviItem: null, activeClass: "active", indexed: !1, idPrefix: null, history: !1} }, a.fn.navigator = function(e) { typeof e == "string" && (e = { navi: e }), e = a.extend({}, c.navigator.conf, e); var f; this.each(function() { function j(a, b) { a = h().eq(b.replace("#", "")), a.length || (a = h().filter("[href=" + b + "]")), a.click() } function i(b) { var f = a("<" + (e.naviItem || "a") + "/>").click(function(e) { c(a(this), b, e) }).attr("href", "#" + b); b === 0 && f.addClass(n), e.indexed && f.text(b + 1), e.idPrefix && f.attr("id", e.idPrefix + b); return f.appendTo(l) } function h() { return l.find(e.naviItem || "> *") } function c(a, b, c) { k.seekTo(b); if (o) location.hash && (location.hash = a.attr("href").replace("#", "")); else return c.preventDefault() } var k = a(this).data("scrollable"), l = e.navi.jquery ? e.navi : b(k.getRoot(), e.navi), m = k.getNaviButtons(), n = e.activeClass, o = e.history && a.fn.history; k && (f = k), k.getNaviButtons = function() { return m.add(l) }, h().length ? h().each(function(b) { a(this).click(function(e) { c(a(this), b, e) }) }) : a.each(k.getItems(), function(a) { i(a) }), k.onBeforeSeek(function(a, b) { setTimeout(function() { if (!a.isDefaultPrevented()) { var c = h().eq(b); !a.isDefaultPrevented() && c.length && h().removeClass(n).eq(b).addClass(n) } }, 1) }), k.onAddItem(function(a, b) { b = i(k.getItems().index(b)), o && b.history(j) }), o && h().history(j) }); return e.api ? f : this } } (jQuery), function(a) { function b(b, e) { var f = this, g = b.add(f), h = a(window), i, j, k, l = a.tools.expose && (e.mask || e.expose), m = Math.random().toString().slice(10); l && (typeof l == "string" && (l = { color: l }), l.closeOnClick = l.closeOnEsc = !1); var n = e.target || b.attr("rel"); j = n ? a(n) : b; if (!j.length) throw "Could not find Overlay: " + n; b && b.index(j) == -1 && b.click(function(a) { f.load(a); return a.preventDefault() }), a.extend(f, { load: function(b) { if (f.isOpened()) return f; var i = d[e.effect]; if (!i) throw 'Overlay: cannot find effect : "' + e.effect + '"'; e.oneInstance && a.each(c, function() { this.close(b) }), b = b || a.Event(), b.type = "onBeforeLoad", g.trigger(b); if (b.isDefaultPrevented()) return f; k = !0, l && a(j).expose(l); var n = e.top, p = e.left, r = j.outerWidth({ margin: !0 }), t = j.outerHeight({ margin: !0 }); typeof n == "string" && (n = n == "center" ? Math.max((h.height() - t) / 2, 0) : parseInt(n, 10) / 100 * h.height()), p == "center" && (p = Math.max((h.width() - r) / 2, 0)), i[0].call(f, { top: n, left: p }, function() { k && (b.type = "onLoad", g.trigger(b)) }), l && e.closeOnClick && a.mask.getMask().one("click", f.close), e.closeOnClick && a(document).bind("click." + m, function(b) { a(b.target).parents(j).length || f.close(b) }), e.closeOnEsc && a(document).bind("keydown." + m, function(a) { a.keyCode == 27 && f.close(a) }); return f }, close: function(b) { if (!f.isOpened()) return f; b = b || a.Event(), b.type = "onBeforeClose", g.trigger(b); if (!b.isDefaultPrevented()) { k = !1, d[e.effect][1].call(f, function() { b.type = "onClose", g.trigger(b) }), a(document).unbind("click." + m).unbind("keydown." + m), l && a.mask.close(); return f } }, getOverlay: function() { return j }, getTrigger: function() { return b }, getClosers: function() { return i }, isOpened: function() { return k }, getConf: function() { return e } }), a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(b, c) { a.isFunction(e[c]) && a(f).bind(c, e[c]), f[c] = function(b) { b && a(f).bind(c, b); return f } }), i = j.find(e.close || ".close"), !i.length && !e.close && (i = a('<a class="close"></a>'), j.prepend(i)), i.click(function(a) { f.close(a) }), e.load && f.load() } a.tools = a.tools || { version: "1.2.5" }, a.tools.overlay = { addEffect: function(a, b, c) { d[a] = [b, c] }, conf: { close: null, closeOnClick: !0, closeOnEsc: !0, closeSpeed: "fast", effect: "default", fixed: !a.browser.msie || a.browser.version > 6, left: "center", load: !1, mask: null, oneInstance: !0, speed: "normal", target: null, top: "10%"} }; var c = [], d = {}; a.tools.overlay.addEffect("default", function(b, c) { var d = this.getConf(), e = a(window); d.fixed || (b.top += e.scrollTop(), b.left += e.scrollLeft()), b.position = d.fixed ? "fixed" : "absolute", this.getOverlay().css(b).fadeIn(d.speed, c) }, function(a) { this.getOverlay().fadeOut(this.getConf().closeSpeed, a) }), a.fn.overlay = function(d) { var e = this.data("overlay"); if (e) return e; a.isFunction(d) && (d = { onBeforeLoad: d }), d = a.extend(!0, {}, a.tools.overlay.conf, d), this.each(function() { e = new b(a(this), d), c.push(e), a(this).data("overlay", e) }); return d.api ? e : this } } (jQuery), function(a) { function f(c) { var e = this.getOverlay().hide(), f = this.getConf(), g = this.getTrigger(); e = e.data("img"); var i = { top: f.start.top, left: f.start.left, width: 0 }; g && a.extend(i, b(g)), f.fixed && e.css({ position: "absolute" }).animate({ top: "+=" + d.scrollTop(), left: "+=" + d.scrollLeft() }, 0), e.animate(i, f.closeSpeed, c) } function e(c, e) { var f = this.getOverlay(), g = this.getConf(), i = this.getTrigger(), j = this, l = f.outerWidth({ margin: !0 }), m = f.data("img"), n = g.fixed ? "fixed" : "absolute"; if (!m) { m = f.css("backgroundImage"); if (!m) throw "background-image CSS property not set for overlay"; m = m.slice(m.indexOf("(") + 1, m.indexOf(")")).replace(/\"/g, ""), f.css("backgroundImage", "none"), m = a('<img src="' + m + '"/>'), m.css({ border: 0, display: "none" }).width(l), a("body").append(m), f.data("img", m) } var o = g.start.top || Math.round(d.height() / 2), p = g.start.left || Math.round(d.width() / 2); i && (i = b(i), o = i.top, p = i.left), g.fixed ? (o -= d.scrollTop(), p -= d.scrollLeft()) : (c.top += d.scrollTop(), c.left += d.scrollLeft()), m.css({ position: "absolute", top: o, left: p, width: 0, zIndex: g.zIndex }).show(), c.position = n, f.css(c), m.animate({ top: f.css("top"), left: f.css("left"), width: l }, g.speed, function() { f.css("zIndex", g.zIndex + 1).fadeIn(g.fadeInSpeed, function() { j.isOpened() && !a(this).index(f) ? e.call() : f.hide() }) }).css("position", n) } function b(a) { var b = a.offset(); return { top: b.top + a.height() / 2, left: b.left + a.width() / 2} } var c = a.tools.overlay, d = a(window); a.extend(c.conf, { start: { top: null, left: null }, fadeInSpeed: "fast", zIndex: 9999 }), c.addEffect("apple", e, f) } (jQuery), function(a) { function h(b, c, d) { var e = b.parentNode, f = b.style, g = (e.offsetWidth - b.offsetWidth) / 2 - (parseInt(a.css(e, "borderLeftWidth")) || 0); b = (e.offsetHeight - b.offsetHeight) / 2 - (parseInt(a.css(e, "borderTopWidth")) || 0), c && (f.left = g > 0 ? g + "px" : "0"), d && (f.top = b > 0 ? b + "px" : "0") } function g(a) { n && (a = n[a === !0 ? n.length - 1 : 0]) && a.focus() } function f(b) { if (b.keyCode && b.keyCode == 9 && m && b.data.constrainTabKey) { var c = n, d = b.shiftKey && b.target == c[0]; if (!b.shiftKey && b.target == c[c.length - 1] || d) { setTimeout(function() { g(d) }, 10); return !1 } } if (a(b.target).parents("div.blockMsg").length > 0) return !0; return a(b.target).parents().children().filter("div.blockUI").length == 0 } function e(b, c, d) { var e = c == window; c = a(c); if (!!b || !(e && !m || !e && !c.data("blockUI.isBlocked"))) e || c.data("blockUI.isBlocked", b), !d.bindEvents || b && !d.showOverlay || (b ? a(document).bind("mousedown mouseup keydown keypress", d, f) : a(document).unbind("mousedown mouseup keydown keypress", f)) } function d(b, c, d, e) { b.each(function() { this.parentNode && this.parentNode.removeChild(this) }), c && c.el && (c.el.style.display = c.display, c.el.style.position = c.position, c.parent && c.parent.appendChild(c.el), a(e).removeData("blockUI.history")), typeof d.onUnblock == "function" && d.onUnblock(e, d) } function c(b, c) { var f = b == window, g = a(b), h = g.data("blockUI.history"), i = g.data("blockUI.timeout"); i && (clearTimeout(i), g.removeData("blockUI.timeout")), c = a.extend({}, a.blockUI.defaults, c || {}), e(0, b, c); var j; j = f ? a("body").children().filter(".blockUI").add("body > .blockUI") : a(".blockUI", b), f && (m = n = null), c.fadeOut ? (j.fadeOut(c.fadeOut), setTimeout(function() { d(j, h, c, b) }, c.fadeOut)) : d(j, h, c, b) } function b(b, d) { var f = b == window, j = d && d.message !== undefined ? d.message : undefined; d = a.extend({}, a.blockUI.defaults, d || {}), d.overlayCSS = a.extend({}, a.blockUI.defaults.overlayCSS, d.overlayCSS || {}); var p = a.extend({}, a.blockUI.defaults.css, d.css || {}), q = a.extend({}, a.blockUI.defaults.themedCSS, d.themedCSS || {}); j = j === undefined ? d.message : j, f && m && c(window, { fadeOut: 0 }); if (j && typeof j != "string" && (j.parentNode || j.jquery)) { var s = j.jquery ? j[0] : j, t = {}; a(b).data("blockUI.history", t), t.el = s, t.parent = s.parentNode, t.display = s.style.display, t.position = s.style.position, t.parent && t.parent.removeChild(s) } t = d.baseZ; var w = a.browser.msie || d.forceIframe ? a('<iframe class="blockUI" style="z-index:' + t++ + ';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="' + d.iframeSrc + '"></iframe>') : a('<div class="blockUI" style="display:none"></div>'); s = a('<div class="blockUI blockOverlay" style="z-index:' + t++ + ';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'), t = d.theme && f ? a('<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:' + t + ';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">' + (d.title || "&nbsp;") + '</div><div class="ui-widget-content ui-dialog-content"></div></div>') : f ? a('<div class="blockUI blockMsg blockPage" style="z-index:' + t + ';display:none;position:fixed"></div>') : a('<div class="blockUI blockMsg blockElement" style="z-index:' + t + ';display:none;position:absolute"></div>'), j && (d.theme ? (t.css(q), t.addClass("ui-widget-content")) : t.css(p)), (!d.applyPlatformOpacityRules || !a.browser.mozilla || !/Linux/.test(navigator.platform)) && s.css(d.overlayCSS), s.css("position", f ? "fixed" : "absolute"), (a.browser.msie || d.forceIframe) && w.css("opacity", 0), p = [w, s, t]; var x = f ? a("body") : a(b); a.each(p, function() { this.appendTo(x) }), d.theme && d.draggable && a.fn.draggable && t.draggable({ handle: ".ui-dialog-titlebar", cancel: "li" }), p = k && (!a.boxModel || a("object,embed", f ? null : b).length > 0); if (l || p) { f && d.allowBodyStretch && a.boxModel && a("html,body").css("height", "100%"); if ((l || !a.boxModel) && !f) { p = parseInt(a.css(b, "borderTopWidth")) || 0, q = parseInt(a.css(b, "borderLeftWidth")) || 0; var y = p ? "(0 - " + p + ")" : 0, A = q ? "(0 - " + q + ")" : 0 } a.each([w, s, t], function(a, b) { var c = b[0].style; c.position = "absolute"; if (a < 2) f ? c.setExpression("height", "Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:" + d.quirksmodeOffsetHack + ') + "px"') : c.setExpression("height", 'this.parentNode.offsetHeight + "px"'), f ? c.setExpression("width", 'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') : c.setExpression("width", 'this.parentNode.offsetWidth + "px"'), A && c.setExpression("left", A), y && c.setExpression("top", y); else if (d.centerY) f && c.setExpression("top", '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'), c.marginTop = 0; else if (!d.centerY && f) { var e = "((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + " + (d.css && d.css.top ? parseInt(d.css.top) : 0) + ') + "px"'; c.setExpression("top", e) } }) } j && (d.theme ? t.find(".ui-widget-content").append(j) : t.append(j), (j.jquery || j.nodeType) && a(j).show()), (a.browser.msie || d.forceIframe) && d.showOverlay && w.show(), d.fadeIn ? (p = d.onBlock ? d.onBlock : i, w = d.showOverlay && !j ? p : i, p = j ? p : i, d.showOverlay && s._fadeIn(d.fadeIn, w), j && t._fadeIn(d.fadeIn, p)) : (d.showOverlay && s.show(), j && t.show(), d.onBlock && d.onBlock()), e(1, b, d), f ? (m = t[0], n = a(":input:enabled:visible", m), d.focusInput && setTimeout(g, 20)) : h(t[0], d.centerX, d.centerY), d.timeout && (j = setTimeout(function() { f ? a.unblockUI(d) : a(b).unblock(d) }, d.timeout), a(b).data("blockUI.timeout", j)) } if (/1\.(0|1|2)\.(0|1|2)/.test(a.fn.jquery) || /^1.1/.test(a.fn.jquery)) alert("blockUI requires jQuery v1.2.3 or later!  You are using v" + a.fn.jquery); else { a.fn._fadeIn = a.fn.fadeIn; var i = function() { }, j = document.documentMode || 0, k = a.browser.msie && (a.browser.version < 8 && !j || j < 8), l = a.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !j; a.blockUI = function(a) { b(window, a) }, a.unblockUI = function(a) { c(window, a) }, a.growlUI = function(b, c, d, e) { var f = a('<div class="growlUI"></div>'); b && f.append("<h1>" + b + "</h1>"), c && f.append("<h2>" + c + "</h2>"), d == undefined && (d = 3e3), a.blockUI({ message: f, fadeIn: 700, fadeOut: 1e3, centerY: !1, timeout: d, showOverlay: !1, onUnblock: e, css: a.blockUI.defaults.growlCSS }) }, a.fn.block = function(c) { return this.unblock({ fadeOut: 0 }).each(function() { a.css(this, "position") == "static" && (this.style.position = "relative"), a.browser.msie && (this.style.zoom = 1), b(this, c) }) }, a.fn.unblock = function(a) { return this.each(function() { c(this, a) }) }, a.blockUI.version = 2.31, a.blockUI.defaults = { message: "<h1>Please wait...</h1>", title: null, draggable: !0, theme: !1, css: { padding: 0, margin: 0, width: "30%", top: "40%", left: "35%", textAlign: "center", color: "#000", border: "3px solid #aaa", backgroundColor: "#fff", cursor: "wait" }, themedCSS: { width: "30%", top: "40%", left: "35%" }, overlayCSS: { backgroundColor: "#000", opacity: .6, cursor: "wait" }, growlCSS: { width: "350px", top: "10px", left: "", right: "10px", border: "none", padding: "5px", opacity: .6, cursor: "default", color: "#fff", backgroundColor: "#000", "-webkit-border-radius": "10px", "-moz-border-radius": "10px" }, iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank", forceIframe: !1, baseZ: 1e3, centerX: !0, centerY: !0, allowBodyStretch: !0, bindEvents: !0, constrainTabKey: !0, fadeIn: 200, fadeOut: 400, timeout: 0, showOverlay: !0, focusInput: !0, applyPlatformOpacityRules: !0, onBlock: null, onUnblock: null, quirksmodeOffsetHack: 4 }; var m = null, n = [] } } (jQuery); var Hashtable = function() { function q(d, e) { var f = this, j = [], k = {}, l = typeof d == a ? d : c, m = typeof e == a ? e : null; this.put = function(a, b) { g(a), h(b); var c = l(a), d, e, f = null; d = p(k, c), d ? (e = d.getEntryForKey(a), e ? (f = e[1], e[1] = b) : d.addEntry(a, b)) : (d = new i(c, a, b, m), j[j.length] = d, k[c] = d); return f }, this.get = function(a) { g(a); var b = l(a), c = p(k, b); if (c) { var d = c.getEntryForKey(a); if (d) return d[1] } return null }, this.containsKey = function(a) { g(a); var b = l(a), c = p(k, b); return c ? c.containsKey(a) : !1 }, this.containsValue = function(a) { h(a); var b = j.length; while (b--) if (j[b].containsValue(a)) return !0; return !1 }, this.clear = function() { j.length = 0, k = {} }, this.isEmpty = function() { return !j.length }; var n = function(a) { return function() { var b = [], c = j.length; while (c--) j[c][a](b); return b } }; this.keys = n("keys"), this.values = n("values"), this.entries = n("getEntries"), this.remove = function(a) { g(a); var c = l(a), d, e = null, f = p(k, c); f && (e = f.removeEntryForKey(a), e !== null && (f.entries.length || (d = o(j, c), b(j, d), delete k[c]))); return e }, this.size = function() { var a = 0, b = j.length; while (b--) a += j[b].entries.length; return a }, this.each = function(a) { var b = f.entries(), c = b.length, d; while (c--) d = b[c], a(d[0], d[1]) }, this.putAll = function(b, c) { var d = b.entries(), e, g, h, i, j = d.length, k = typeof c == a; while (j--) e = d[j], g = e[0], h = e[1], k && (i = f.get(g)) && (h = c(g, i, h)), f.put(g, h) }, this.clone = function() { var a = new q(d, e); a.putAll(f); return a } } function p(a, b) { var c = a[b]; return c && c instanceof i ? c : null } function o(a, b) { var c = a.length, d; while (c--) { d = a[c]; if (b === d[0]) return c } return null } function n(a) { return function(b) { var c = b.length; for (var d = 0, e = this.entries.length; d < e; ++d) b[c + d] = this.entries[d][a] } } function m(a) { return function(b) { var c = this.entries.length, d, e = this.getEqualityFunction(b); while (c--) { d = this.entries[c]; if (e(b, d[0])) switch (a) { case j: return !0; case k: return d; case l: return [c, d[1]] } } return !1 } } function i(a, b, c, d) { this[0] = a, this.entries = [], this.addEntry(b, c), d !== null && (this.getEqualityFunction = function() { return d }) } function f(a) { return function(b) { if (b === null) throw new Error("null is not a valid " + a); if (typeof b == "undefined") throw new Error(a + " must not be undefined") } } function e(b, c) { return typeof c.equals == a ? c.equals(b) : b === c } function d(a, b) { return a.equals(b) } function c(b) { var d; if (typeof b == "string") return b; if (typeof b.hashCode == a) { d = b.hashCode(); return typeof d == "string" ? d : c(d) } if (typeof b.toString == a) return b.toString(); try { return String(b) } catch (e) { return Object.prototype.toString.call(b) } } var a = "function", b = typeof Array.prototype.splice == a ? function(a, b) { a.splice(b, 1) } : function(a, b) { var c, d, e; if (b === a.length - 1) a.length = b; else { c = a.slice(b + 1), a.length = b; for (d = 0, e = c.length; d < e; ++d) a[b + d] = c[d] } }, g = f("key"), h = f("value"), j = 0, k = 1, l = 2; i.prototype = { getEqualityFunction: function(b) { return typeof b.equals == a ? d : e }, getEntryForKey: m(k), getEntryAndIndexForKey: m(l), removeEntryForKey: function(a) { var c = this.getEntryAndIndexForKey(a); if (c) { b(this.entries, c[0]); return c[1] } return null }, addEntry: function(a, b) { this.entries[this.entries.length] = [a, b] }, keys: n(0), values: n(1), getEntries: function(a) { var b = a.length; for (var c = 0, d = this.entries.length; c < d; ++c) a[b + c] = this.entries[c].slice(0) }, containsKey: m(j), containsValue: function(a) { var b = this.entries.length; while (b--) if (a === this.entries[b][1]) return !0; return !1 } }; return q } (); (function() { var a = !1, b = /xyz/.test(function() { xyz }) ? /\b_super\b/ : /.*/; this.Class = function() { }, Class.extend = function(c) { function g() { !a && this.init && this.init.apply(this, arguments) } var d = this.prototype; a = !0; var e = new this; a = !1; for (var f in c) e[f] = typeof c[f] == "function" && typeof d[f] == "function" && b.test(c[f]) ? function(a, b) { return function() { var c = this._super; this._super = d[a]; var e = b.apply(this, arguments); this._super = c; return e } } (f, c[f]) : c[f]; g.prototype = e, g.constructor = g, g.extend = arguments.callee; return g } })(), document.createElement("canvas").getContext || function() { function v(a) { this.code = this[a], this.message = a + ": DOM Exception " + this.code } function u(a, b) { if (!a || a.nodeType != 1 || a.tagName != "IMG") throw new v("TYPE_MISMATCH_ERR"); if (a.readyState != "complete") throw new v("INVALID_STATE_ERR"); switch (b) { case "repeat": case null: case "": this.repetition_ = "repeat"; break; case "repeat-x": case "repeat-y": case "no-repeat": this.repetition_ = b; break; default: throw new v("SYNTAX_ERR") } this.src_ = a.src, this.width_ = a.width, this.height_ = a.height } function t(a) { this.type_ = a, this.r1_ = this.y1_ = this.x1_ = this.r0_ = this.y0_ = this.x0_ = 0, this.colors_ = [] } function s(a, b, c) { isFinite(b[0][0]) && isFinite(b[0][1]) && isFinite(b[1][0]) && isFinite(b[1][1]) && isFinite(b[2][0]) && isFinite(b[2][1]) && (a.m_ = b, c && (a.lineScale_ = B(A(b[0][0] * b[1][1] - b[0][1] * b[1][0])))) } function r(a, b, c) { a = a.m_; return { x: C * (b * a[0][0] + c * a[1][0] + a[2][0]) - D, y: C * (b * a[0][1] + c * a[1][1] + a[2][1]) - D} } function q(a, b, c, d) { var e = a.fillStyle, f = a.arcScaleX_, g = a.arcScaleY_, h = d.x - c.x, i = d.y - c.y; if (e instanceof t) { var j = 0; d = { x: 0, y: 0 }; var k = 0, l = 1; if (e.type_ == "gradient") { j = e.x1_ / f, c = e.y1_ / g; var n = r(a, e.x0_ / f, e.y0_ / g); j = r(a, j, c), j = Math.atan2(j.x - n.x, j.y - n.y) * 180 / Math.PI, j < 0 && (j += 360), j < 1e-6 && (j = 0) } else n = r(a, e.x0_, e.y0_), d = { x: (n.x - c.x) / h, y: (n.y - c.y) / i }, h /= f * C, i /= g * C, l = w.max(h, i), k = 2 * e.r0_ / l, l = 2 * e.r1_ / l - k; f = e.colors_, f.sort(function(a, b) { return a.offset - b.offset }), g = f.length, n = f[0].color, c = f[g - 1].color, h = f[0].alpha * a.globalAlpha, a = f[g - 1].alpha * a.globalAlpha, i = []; for (var o = 0; o < g; o++) { var p = f[o]; i.push(p.offset * l + k + " " + p.color) } b.push('<g_vml_:fill type="', e.type_, '"', ' method="none" focus="100%"', ' color="', n, '"', ' color2="', c, '"', ' colors="', i.join(","), '"', ' opacity="', a, '"', ' g_o_:opacity2="', h, '"', ' angle="', j, '"', ' focusposition="', d.x, ",", d.y, '" />') } else e instanceof u ? h && i && b.push("<g_vml_:fill", ' position="', -c.x / h * f * f, ",", -c.y / i * g * g, '"', ' type="tile"', ' src="', e.src_, '" />') : (e = m(a.fillStyle), b.push('<g_vml_:fill color="', e.color, '" opacity="', e.alpha * a.globalAlpha, '" />')) } function p(a, b) { var c = m(a.strokeStyle), d = c.color; c = c.alpha * a.globalAlpha; var e = a.lineScale_ * a.lineWidth; e < 1 && (c *= e), b.push("<g_vml_:stroke", ' opacity="', c, '"', ' joinstyle="', a.lineJoin, '"', ' miterlimit="', a.miterLimit, '"', ' endcap="', N[a.lineCap] || "square", '"', ' weight="', e, 'px"', ' color="', d, '" />') } function o(a, b, c, d) { a.currentPath_.push({ type: "bezierCurveTo", cp1x: b.x, cp1y: b.y, cp2x: c.x, cp2y: c.y, x: d.x, y: d.y }), a.currentX_ = d.x, a.currentY_ = d.y } function n(a) { this.m_ = g(), this.mStack_ = [], this.aStack_ = [], this.currentPath_ = [], this.fillStyle = this.strokeStyle = "#000", this.lineWidth = 1, this.lineJoin = "miter", this.lineCap = "butt", this.miterLimit = C * 1, this.globalAlpha = 1, this.font = "10px sans-serif", this.textAlign = "left", this.textBaseline = "alphabetic", this.canvas = a; var b = "width:" + a.clientWidth + "px;height:" + a.clientHeight + "px;overflow:hidden;position:absolute", c = a.ownerDocument.createElement("div"); c.style.cssText = b, a.appendChild(c), b = c.cloneNode(!1), b.style.backgroundColor = "red", b.style.filter = "alpha(opacity=0)", a.appendChild(b), this.element_ = c, this.lineScale_ = this.arcScaleY_ = this.arcScaleX_ = 1 } function m(a) { if (a in K) return K[a]; var b, c = 1; a = String(a); if (a.charAt(0) == "#") b = a; else if (/^rgb/.test(a)) { c = j(a), b = "#"; for (var d, e = 0; e < 3; e++) d = c[e].indexOf("%") != -1 ? Math.floor(parseFloat(c[e]) / 100 * 255) : +c[e], b += G[k(d, 0, 255)]; c = +c[3] } else if (/^hsl/.test(a)) { e = c = j(a), b = parseFloat(e[0]) / 360 % 360, b < 0 && b++, d = k(parseFloat(e[1]) / 100, 0, 1), e = k(parseFloat(e[2]) / 100, 0, 1); if (d == 0) d = e = b = e; else { var f = e < .5 ? e * (1 + d) : e + d - e * d, g = 2 * e - f; d = l(g, f, b + 1 / 3), e = l(g, f, b), b = l(g, f, b - 1 / 3) } b = "#" + G[Math.floor(d * 255)] + G[Math.floor(e * 255)] + G[Math.floor(b * 255)], c = c[3] } else b = J[a] || a; return K[a] = { color: b, alpha: c} } function l(a, b, c) { c < 0 && c++, c > 1 && c--; return 6 * c < 1 ? a + (b - a) * 6 * c : 2 * c < 1 ? b : 3 * c < 2 ? a + (b - a) * (2 / 3 - c) * 6 : a } function k(a, b, c) { return Math.min(c, Math.max(b, a)) } function j(a) { var b = a.indexOf("(", 3), c = a.indexOf(")", b + 1); b = a.substring(b + 1, c).split(","); if (b.length != 4 || a.charAt(3) != "a") b[3] = 1; return b } function i(a, b) { b.fillStyle = a.fillStyle, b.lineCap = a.lineCap, b.lineJoin = a.lineJoin, b.lineWidth = a.lineWidth, b.miterLimit = a.miterLimit, b.shadowBlur = a.shadowBlur, b.shadowColor = a.shadowColor, b.shadowOffsetX = a.shadowOffsetX, b.shadowOffsetY = a.shadowOffsetY, b.strokeStyle = a.strokeStyle, b.globalAlpha = a.globalAlpha, b.font = a.font, b.textAlign = a.textAlign, b.textBaseline = a.textBaseline, b.arcScaleX_ = a.arcScaleX_, b.arcScaleY_ = a.arcScaleY_, b.lineScale_ = a.lineScale_ } function h(a, b) { for (var c = g(), d = 0; d < 3; d++) for (var e = 0; e < 3; e++) { for (var f = 0, h = 0; h < 3; h++) f += a[d][h] * b[h][e]; c[d][e] = f } return c } function g() { return [[1, 0, 0], [0, 1, 0], [0, 0, 1]] } function f(a) { a = a.srcElement, a.firstChild && (a.firstChild.style.width = a.clientWidth + "px", a.firstChild.style.height = a.clientHeight + "px") } function e(a) { var b = a.srcElement; switch (a.propertyName) { case "width": b.getContext().clearRect(), b.style.width = b.attributes.width.nodeValue + "px", b.firstChild.style.width = b.clientWidth + "px"; break; case "height": b.getContext().clearRect(), b.style.height = b.attributes.height.nodeValue + "px", b.firstChild.style.height = b.clientHeight + "px" } } function d(a) { a.namespaces.g_vml_ || a.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml", "#default#VML"), a.namespaces.g_o_ || a.namespaces.add("g_o_", "urn:schemas-microsoft-com:office:office", "#default#VML"), a.styleSheets.ex_canvas_ || (a = a.createStyleSheet(), a.owningElement.id = "ex_canvas_", a.cssText = "canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}") } function c(a) { return String(a).replace(/&/g, "&amp;").replace(/"/g, "&quot;") } function b(a, b) { var c = E.call(arguments, 2); return function() { return a.apply(b, c.concat(E.call(arguments))) } } function a() { return this.context_ || (this.context_ = new n(this)) } var w = Math, x = w.round, y = w.sin, z = w.cos, A = w.abs, B = w.sqrt, C = 10, D = C / 2; navigator.userAgent.match(/MSIE ([\d.]+)?/); var E = Array.prototype.slice; d(document); var F = { init: function(a) { a = a || document, a.createElement("canvas"), a.attachEvent("onreadystatechange", b(this.init_, this, a)) }, init_: function(a) { a = a.getElementsByTagName("canvas"); for (var b = 0; b < a.length; b++) this.initElement(a[b]) }, initElement: function(b) { if (!b.getContext) { b.getContext = a, d(b.ownerDocument), b.innerHTML = "", b.attachEvent("onpropertychange", e), b.attachEvent("onresize", f); var c = b.attributes; c.width && c.width.specified ? b.style.width = c.width.nodeValue + "px" : b.width = b.clientWidth, c.height && c.height.specified ? b.style.height = c.height.nodeValue + "px" : b.height = b.clientHeight } return b } }; F.init(); for (var G = [], H = 0; H < 16; H++) for (var I = 0; I < 16; I++) G[H * 16 + I] = H.toString(16) + I.toString(16); var J = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000000", blanchedalmond: "#FFEBCD", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#00FFFF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgreen: "#006400", darkgrey: "#A9A9A9", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", grey: "#808080", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgreen: "#90EE90", lightgrey: "#D3D3D3", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#FF00FF", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", oldlace: "#FDF5E6", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", whitesmoke: "#F5F5F5", yellowgreen: "#9ACD32" }, K = {}, L = { style: "normal", variant: "normal", weight: "normal", size: 10, family: "sans-serif" }, M = {}, N = { butt: "flat", round: "round" }; H = n.prototype, H.clearRect = function() { this.textMeasureEl_ && (this.textMeasureEl_.removeNode(!0), this.textMeasureEl_ = null), this.element_.innerHTML = "" }, H.beginPath = function() { this.currentPath_ = [] }, H.moveTo = function(a, b) { var c = r(this, a, b); this.currentPath_.push({ type: "moveTo", x: c.x, y: c.y }), this.currentX_ = c.x, this.currentY_ = c.y }, H.lineTo = function(a, b) { var c = r(this, a, b); this.currentPath_.push({ type: "lineTo", x: c.x, y: c.y }), this.currentX_ = c.x, this.currentY_ = c.y }, H.bezierCurveTo = function(a, b, c, d, e, f) { e = r(this, e, f), a = r(this, a, b), c = r(this, c, d), o(this, a, c, e) }, H.quadraticCurveTo = function(a, b, c, d) { a = r(this, a, b), c = r(this, c, d), d = { x: this.currentX_ + 2 / 3 * (a.x - this.currentX_), y: this.currentY_ + 2 / 3 * (a.y - this.currentY_) }, o(this, d, { x: d.x + (c.x - this.currentX_) / 3, y: d.y + (c.y - this.currentY_) / 3 }, c) }, H.arc = function(a, b, c, d, e, f) { c *= C; var g = f ? "at" : "wa", h = a + z(d) * c - D, i = b + y(d) * c - D; d = a + z(e) * c - D, e = b + y(e) * c - D, h == d && !f && (h += .125), a = r(this, a, b), h = r(this, h, i), d = r(this, d, e), this.currentPath_.push({ type: g, x: a.x, y: a.y, radius: c, xStart: h.x, yStart: h.y, xEnd: d.x, yEnd: d.y }) }, H.rect = function(a, b, c, d) { this.moveTo(a, b), this.lineTo(a + c, b), this.lineTo(a + c, b + d), this.lineTo(a, b + d), this.closePath() }, H.strokeRect = function(a, b, c, d) { var e = this.currentPath_; this.beginPath(), this.moveTo(a, b), this.lineTo(a + c, b), this.lineTo(a + c, b + d), this.lineTo(a, b + d), this.closePath(), this.stroke(), this.currentPath_ = e }, H.fillRect = function(a, b, c, d) { var e = this.currentPath_; this.beginPath(), this.moveTo(a, b), this.lineTo(a + c, b), this.lineTo(a + c, b + d), this.lineTo(a, b + d), this.closePath(), this.fill(), this.currentPath_ = e }, H.createLinearGradient = function(a, b, c, d) { var e = new t("gradient"); e.x0_ = a, e.y0_ = b, e.x1_ = c, e.y1_ = d; return e }, H.createRadialGradient = function(a, b, c, d, e, f) { var g = new t("gradientradial"); g.x0_ = a, g.y0_ = b, g.r0_ = c, g.x1_ = d, g.y1_ = e, g.r1_ = f; return g }, H.drawImage = function(a) { var b, c, d, e, f, g, h, i; d = a.runtimeStyle.width, e = a.runtimeStyle.height, a.runtimeStyle.width = "auto", a.runtimeStyle.height = "auto"; var j = a.width, k = a.height; a.runtimeStyle.width = d, a.runtimeStyle.height = e; if (arguments.length == 3) b = arguments[1], c = arguments[2], f = g = 0, h = d = j, i = e = k; else if (arguments.length == 5) b = arguments[1], c = arguments[2], d = arguments[3], e = arguments[4], f = g = 0, h = j, i = k; else if (arguments.length == 9) f = arguments[1], g = arguments[2], h = arguments[3], i = arguments[4], b = arguments[5], c = arguments[6], d = arguments[7], e = arguments[8]; else throw Error("Invalid number of arguments"); var l = r(this, b, c), m = []; m.push(" <g_vml_:group", ' coordsize="', C * 10, ",", C * 10, '"', ' coordorigin="0,0"', ' style="width:', 10, "px;height:", 10, "px;position:absolute;"); if (this.m_[0][0] != 1 || this.m_[0][1] || this.m_[1][1] != 1 || this.m_[1][0]) { var n = []; n.push("M11=", this.m_[0][0], ",", "M12=", this.m_[1][0], ",", "M21=", this.m_[0][1], ",", "M22=", this.m_[1][1], ",", "Dx=", x(l.x / C), ",", "Dy=", x(l.y / C), ""); var o = r(this, b + d, c), p = r(this, b, c + e); b = r(this, b + d, c + e), l.x = w.max(l.x, o.x, p.x, b.x), l.y = w.max(l.y, o.y, p.y, b.y), m.push("padding:0 ", x(l.x / C), "px ", x(l.y / C), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", n.join(""), ", sizingmethod='clip');") } else m.push("top:", x(l.y / C), "px;left:", x(l.x / C), "px;"); m.push(' ">', '<g_vml_:image src="', a.src, '"', ' style="width:', C * d, "px;", " height:", C * e, 'px"', ' cropleft="', f / j, '"', ' croptop="', g / k, '"', ' cropright="', (j - f - h) / j, '"', ' cropbottom="', (k - g - i) / k, '"', " />", "</g_vml_:group>"), this.element_.insertAdjacentHTML("BeforeEnd", m.join("")) }, H.stroke = function(a) { var b = []; b.push("<g_vml_:shape", ' filled="', !!a, '"', ' style="position:absolute;width:', 10, "px;height:", 10, 'px;"', ' coordorigin="0,0"', ' coordsize="', C * 10, ",", C * 10, '"', ' stroked="', !a, '"', ' path="'); for (var c = { x: null, y: null }, d = { x: null, y: null }, e = 0; e < this.currentPath_.length; e++) { var f = this.currentPath_[e]; switch (f.type) { case "moveTo": b.push(" m ", x(f.x), ",", x(f.y)); break; case "lineTo": b.push(" l ", x(f.x), ",", x(f.y)); break; case "close": b.push(" x "), f = null; break; case "bezierCurveTo": b.push(" c ", x(f.cp1x), ",", x(f.cp1y), ",", x(f.cp2x), ",", x(f.cp2y), ",", x(f.x), ",", x(f.y)); break; case "at": case "wa": b.push(" ", f.type, " ", x(f.x - this.arcScaleX_ * f.radius), ",", x(f.y - this.arcScaleY_ * f.radius), " ", x(f.x + this.arcScaleX_ * f.radius), ",", x(f.y + this.arcScaleY_ * f.radius), " ", x(f.xStart), ",", x(f.yStart), " ", x(f.xEnd), ",", x(f.yEnd)) } if (f) { if (c.x == null || f.x < c.x) c.x = f.x; if (d.x == null || f.x > d.x) d.x = f.x; if (c.y == null || f.y < c.y) c.y = f.y; if (d.y == null || f.y > d.y) d.y = f.y } } b.push(' ">'), a ? q(this, b, c, d) : p(this, b), b.push("</g_vml_:shape>"), this.element_.insertAdjacentHTML("beforeEnd", b.join("")) }, H.fill = function() { this.stroke(!0) }, H.closePath = function() { this.currentPath_.push({ type: "close" }) }, H.save = function() { var a = {}; i(this, a), this.aStack_.push(a), this.mStack_.push(this.m_), this.m_ = h(g(), this.m_) }, H.restore = function() { this.aStack_.length && (i(this.aStack_.pop(), this), this.m_ = this.mStack_.pop()) }, H.translate = function(a, b) { s(this, h([[1, 0, 0], [0, 1, 0], [a, b, 1]], this.m_), !1) }, H.rotate = function(a) { var b = z(a); a = y(a), s(this, h([[b, a, 0], [-a, b, 0], [0, 0, 1]], this.m_), !1) }, H.scale = function(a, b) { this.arcScaleX_ *= a, this.arcScaleY_ *= b, s(this, h([[a, 0, 0], [0, b, 0], [0, 0, 1]], this.m_), !0) }, H.transform = function(a, b, c, d, e, f) { s(this, h([[a, b, 0], [c, d, 0], [e, f, 1]], this.m_), !0) }, H.setTransform = function(a, b, c, d, e, f) { s(this, [[a, b, 0], [c, d, 0], [e, f, 1]], !0) }, H.drawText_ = function(a, b, d, e, f) { var g = this.m_; e = 0; var h = 1e3, i = { x: 0, y: 0 }, j = [], k; k = this.font; if (M[k]) k = M[k]; else { var l = document.createElement("div").style; try { l.font = k } catch (m) { } k = M[k] = { style: l.fontStyle || L.style, variant: l.fontVariant || L.variant, weight: l.fontWeight || L.weight, size: l.fontSize || L.size, family: l.fontFamily || L.family} } l = k; var n = this.element_; k = {}; for (var o in l) k[o] = l[o]; o = parseFloat(n.currentStyle.fontSize), n = parseFloat(l.size), k.size = typeof l.size == "number" ? l.size : l.size.indexOf("px") != -1 ? n : l.size.indexOf("em") != -1 ? o * n : l.size.indexOf("%") != -1 ? o / 100 * n : l.size.indexOf("pt") != -1 ? n / .75 : o, k.size *= .981, o = k.style + " " + k.variant + " " + k.weight + " " + k.size + "px " + k.family, n = this.element_.currentStyle, l = this.textAlign.toLowerCase(); switch (l) { case "left": case "center": case "right": break; case "end": l = n.direction == "ltr" ? "right" : "left"; break; case "start": l = n.direction == "rtl" ? "right" : "left"; break; default: l = "left" } switch (this.textBaseline) { case "hanging": case "top": i.y = k.size / 1.75; break; case "middle": break; default: case null: case "alphabetic": case "ideographic": case "bottom": i.y = -k.size / 2.25 } switch (l) { case "right": e = 1e3, h = .05; break; case "center": e = h = 500 } b = r(this, b + i.x, d + i.y), j.push('<g_vml_:line from="', -e, ' 0" to="', h, ' 0.05" ', ' coordsize="100 100" coordorigin="0 0"', ' filled="', !f, '" stroked="', !!f, '" style="position:absolute;width:1px;height:1px;">'), f ? p(this, j) : q(this, j, { x: -e, y: 0 }, { x: h, y: k.size }), f = g[0][0].toFixed(3) + "," + g[1][0].toFixed(3) + "," + g[0][1].toFixed(3) + "," + g[1][1].toFixed(3) + ",0,0", b = x(b.x / C) + "," + x(b.y / C), j.push('<g_vml_:skew on="t" matrix="', f, '" ', ' offset="', b, '" origin="', e, ' 0" />', '<g_vml_:path textpathok="true" />', '<g_vml_:textpath on="true" string="', c(a), '" style="v-text-align:', l, ";font:", c(o), '" /></g_vml_:line>'), this.element_.insertAdjacentHTML("beforeEnd", j.join("")) }, H.fillText = function(a, b, c, d) { this.drawText_(a, b, c, d, !1) }, H.strokeText = function(a, b, c, d) { this.drawText_(a, b, c, d, !0) }, H.measureText = function(a) { this.textMeasureEl_ || (this.element_.insertAdjacentHTML("beforeEnd", '<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'), this.textMeasureEl_ = this.element_.lastChild); var b = this.element_.ownerDocument; this.textMeasureEl_.innerHTML = "", this.textMeasureEl_.style.font = this.font, this.textMeasureEl_.appendChild(b.createTextNode(a)); return { width: this.textMeasureEl_.offsetWidth} }, H.clip = function() { }, H.arcTo = function() { }, H.createPattern = function(a, b) { return new u(a, b) }, t.prototype.addColorStop = function(a, b) { b = m(b), this.colors_.push({ offset: a, color: b.color, alpha: b.alpha }) }, H = v.prototype = Error(), H.INDEX_SIZE_ERR = 1, H.DOMSTRING_SIZE_ERR = 2, H.HIERARCHY_REQUEST_ERR = 3, H.WRONG_DOCUMENT_ERR = 4, H.INVALID_CHARACTER_ERR = 5, H.NO_DATA_ALLOWED_ERR = 6, H.NO_MODIFICATION_ALLOWED_ERR = 7, H.NOT_FOUND_ERR = 8, H.NOT_SUPPORTED_ERR = 9, H.INUSE_ATTRIBUTE_ERR = 10, H.INVALID_STATE_ERR = 11, H.SYNTAX_ERR = 12, H.INVALID_MODIFICATION_ERR = 13, H.NAMESPACE_ERR = 14, H.INVALID_ACCESS_ERR = 15, H.VALIDATION_ERR = 16, H.TYPE_MISMATCH_ERR = 17, G_vmlCanvasManager = F, CanvasRenderingContext2D = n, CanvasGradient = t, CanvasPattern = u, DOMException = v } (), function(a) { a.fn.hoverIntent = function(b, c) { var d = { sensitivity: 7, interval: 100, timeout: 0 }; d = a.extend(d, c ? { over: b, out: c} : b); var f, g, h, i, j = function(a) { f = a.pageX, g = a.pageY }, k = function(b, c) { c.hoverIntent_t = clearTimeout(c.hoverIntent_t); if (Math.abs(h - f) + Math.abs(i - g) < d.sensitivity) { a(c).unbind("mousemove", j), c.hoverIntent_s = 1; return d.over.apply(c, [b]) } h = f, i = g, c.hoverIntent_t = setTimeout(function() { k(b, c) }, d.interval) }, l = function(b) { for (var c = (b.type == "mouseover" ? b.fromElement : b.toElement) || b.relatedTarget; c && c != this; ) try { c = c.parentNode } catch (f) { c = this } if (c == this) return !1; var g = jQuery.extend({}, b), l = this; l.hoverIntent_t && (l.hoverIntent_t = clearTimeout(l.hoverIntent_t)), b.type == "mouseover" ? (h = g.pageX, i = g.pageY, a(l).bind("mousemove", j), l.hoverIntent_s != 1 && (l.hoverIntent_t = setTimeout(function() { k(g, l) }, d.interval))) : (a(l).unbind("mousemove", j), l.hoverIntent_s == 1 && (l.hoverIntent_t = setTimeout(function() { l.hoverIntent_t = clearTimeout(l.hoverIntent_t), l.hoverIntent_s = 0, d.out.apply(l, [g]) }, d.timeout))) }; return this.mouseover(l).mouseout(l) } } (jQuery), function(a) { function b(a) { return a && a.constructor === Number ? a + "px" : a } a.fn.bgiframe = a.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(c) { c = a.extend({ top: "auto", left: "auto", width: "auto", height: "auto", opacity: !0, src: "javascript:false;" }, c); var d = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="' + c.src + '"style="display:block;position:absolute;z-index:-1;' + (c.opacity !== !1 ? "filter:Alpha(Opacity='0');" : "") + "top:" + (c.top == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')" : b(c.top)) + ";left:" + (c.left == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')" : b(c.left)) + ";width:" + (c.width == "auto" ? "expression(this.parentNode.offsetWidth+'px')" : b(c.width)) + ";height:" + (c.height == "auto" ? "expression(this.parentNode.offsetHeight+'px')" : b(c.height)) + ';"/>'; return this.each(function() { a(this).children("iframe.bgiframe").length === 0 && this.insertBefore(document.createElement(d), this.firstChild) }) } : function() { return this }, a.fn.bgIframe = a.fn.bgiframe } (jQuery), function() { jQuery.color = {}, jQuery.color.make = function(a, b, c, d) { var e = {}; e.r = a || 0, e.g = b || 0, e.b = c || 0, e.a = d != null ? d : 1, e.add = function(a, b) { for (var c = 0; c < a.length; ++c) e[a.charAt(c)] += b; return e.normalize() }, e.scale = function(a, b) { for (var c = 0; c < a.length; ++c) e[a.charAt(c)] *= b; return e.normalize() }, e.toString = function() { return e.a < 1 ? "rgba(" + [e.r, e.g, e.b, e.a].join(",") + ")" : "rgb(" + [e.r, e.g, e.b].join(",") + ")" }, e.normalize = function() { function a(a, b, c) { return b < a ? a : b > c ? c : b } e.r = a(0, parseInt(e.r), 255), e.g = a(0, parseInt(e.g), 255), e.b = a(0, parseInt(e.b), 255), e.a = a(0, e.a, 1); return e }, e.clone = function() { return jQuery.color.make(e.r, e.b, e.g, e.a) }; return e.normalize() }, jQuery.color.extract = function(a, b) { var c; do { c = a.css(b).toLowerCase(); if (c != "" && c != "transparent") break; a = a.parent() } while (!jQuery.nodeName(a.get(0), "body")); c == "rgba(0, 0, 0, 0)" && (c = "transparent"); return jQuery.color.parse(c) }, jQuery.color.parse = function(b) { var c, d = jQuery.color.make; if (c = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b)) return d(parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10)); if (c = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(b)) return d(parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10), parseFloat(c[4])); if (c = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b)) return d(parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55); if (c = /rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(b)) return d(parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55, parseFloat(c[4])); if (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b)) return d(parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16)); if (c = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b)) return d(parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16)); var e = jQuery.trim(b).toLowerCase(); if (e == "transparent") return d(255, 255, 255, 0); c = a[e]; return d(c[0], c[1], c[2]) }; var a = { aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0]} } (), function(a) { function c(a, b) { return b * Math.floor(a / b) } function b(b, d, e, f) { function J(b, c, d, e) { if (typeof b == "string") return b; c = P.createLinearGradient(0, d, 0, c), d = 0; for (var f = b.colors.length; d < f; ++d) { var g = b.colors[d]; typeof g != "string" && (g = a.color.parse(e).scale("rgb", g.brightness), g.a *= g.opacity, g = g.toString()), c.addColorStop(d / (f - 1), g) } return c } function I(b, c) { Q.lineWidth = b.bars.lineWidth, Q.strokeStyle = a.color.parse(b.color).scale("a", .5).toString(); var d = a.color.parse(b.color).scale("a", .5).toString(), e = b.bars.align == "left" ? 0 : -b.bars.barWidth / 2; v(c[0], c[1], c[2] || 0, e, e + b.bars.barWidth, 0, function() { return d }, b.xaxis, b.yaxis, Q, b.bars.horizontal) } function H(a, b) { for (var c = 0; c < $.length; ++c) { var d = $[c]; if (d.series == a && d.point[0] == b[0] && d.point[1] == b[1]) return c } return -1 } function G(a, b) { a == null && b == null && ($ = [], D()), typeof a == "number" && (a = K[a]), typeof b == "number" && (b = a.data[b]); var c = H(a, b); c != -1 && ($.splice(c, 1), D()) } function F(a, b, c) { typeof a == "number" && (a = K[a]), typeof b == "number" && (b = a.data[b]); var d = H(a, b); d == -1 ? ($.push({ series: a, point: b, auto: c }), D()) : c || ($[d].auto = !1) } function E() { _ = null, Q.save(), Q.clearRect(0, 0, T, U), Q.translate(S.left, S.top); var b, c; for (b = 0; b < $.length; ++b) { c = $[b]; if (c.series.bars.show) I(c.series, c.point); else { var d = c.series, e = c.point; c = e[0], e = e[1]; var f = d.xaxis, h = d.yaxis; if (!(c < f.min || c > f.max || e < h.min || e > h.max)) { var i = d.points.radius + d.points.lineWidth / 2; Q.lineWidth = i, Q.strokeStyle = a.color.parse(d.color).scale("a", .5).toString(), d = 1.5 * i, Q.beginPath(), Q.arc(f.p2c(c), h.p2c(e), d, 0, 2 * Math.PI, !1), Q.stroke() } } } Q.restore(), g(Y.drawOverlay, [Q]) } function D() { _ || (_ = setTimeout(E, 30)) } function C(a, c, d) { var e = O.offset(), f = { pageX: c.pageX, pageY: c.pageY }, g = c.pageX - e.left - S.left; c = c.pageY - e.top - S.top, R.xaxis.used && (f.x = R.xaxis.c2p(g)), R.yaxis.used && (f.y = R.yaxis.c2p(c)), R.x2axis.used && (f.x2 = R.x2axis.c2p(g)), R.y2axis.used && (f.y2 = R.y2axis.c2p(c)); var h = L.grid.mouseActiveRadius, i = h * h + 1, j = null, k, l; for (k = 0; k < K.length; ++k) if (d(K[k])) { var m = K[k], n = m.xaxis, o = m.yaxis, p = m.datapoints.points, q = m.datapoints.pointsize, r = n.c2p(g), s = o.c2p(c), t = h / n.scale, u = h / o.scale; if (m.lines.show || m.points.show) for (l = 0; l < p.length; l += q) { var v = p[l], w = p[l + 1]; v != null && (v - r > t || v - r < -t || w - s > u || w - s < -u || (v = Math.abs(n.p2c(v) - g), w = Math.abs(o.p2c(w) - c), w = v * v + w * w, w <= i && (i = w, j = [k, l / q]))) } if (m.bars.show && !j) { n = m.bars.align == "left" ? 0 : -m.bars.barWidth / 2, m = n + m.bars.barWidth; for (l = 0; l < p.length; l += q) v = p[l], w = p[l + 1], o = p[l + 2], v != null && (K[k].bars.horizontal ? r <= Math.max(o, v) && r >= Math.min(o, v) && s >= w + n && s <= w + m : r >= v + n && r <= v + m && s >= Math.min(o, w) && s <= Math.max(o, w)) && (j = [k, l / q]) } } j ? (k = j[0], l = j[1], q = K[k].datapoints.pointsize, d = { datapoint: K[k].datapoints.points.slice(l * q, (l + 1) * q), dataIndex: l, series: K[k], seriesIndex: k }) : d = null, d && (d.pageX = parseInt(d.series.xaxis.p2c(d.datapoint[0]) + e.left + S.left), d.pageY = parseInt(d.series.yaxis.p2c(d.datapoint[1]) + e.top + S.top)); if (L.grid.autoHighlight) { for (e = 0; e < $.length; ++e) g = $[e], g.auto == a && (!d || g.series != d.series || g.point != d.datapoint) && G(g.series, g.point); d && F(d.series, d.datapoint, a) } b.trigger(a, [f, d]) } function B(a) { C("plotclick", a, function(a) { return a.clickable != !1 }) } function A(a) { L.grid.hoverable && C("plothover", a, function(a) { return a.hoverable != !1 }) } function z() { b.find(".legend").remove(); if (L.legend.show) { var c = [], d = !1, e = L.legend.labelFormatter, f, g; for (i = 0; i < K.length; ++i) { f = K[i]; if (g = f.label) i % L.legend.noColumns == 0 && (d && c.push("</tr>"), c.push("<tr>"), d = !0), e && (g = e(g, f)), c.push('<td class="legendColorBox"><div style="border:1px solid ' + L.legend.labelBoxBorderColor + ';padding:1px"><div style="width:4px;height:0;border:5px solid ' + f.color + ';overflow:hidden"></div></div></td><td class="legendLabel">' + g + "</td>") } d && c.push("</tr>"), c.length != 0 && (d = '<table style="font-size:smaller;color:' + L.grid.color + '">' + c.join("") + "</table>", L.legend.container != null ? a(L.legend.container).html(d) : (c = "", e = L.legend.position, f = L.legend.margin, f[0] == null && (f = [f, f]), e.charAt(0) == "n" ? c += "top:" + (f[1] + S.top) + "px;" : e.charAt(0) == "s" && (c += "bottom:" + (f[1] + S.bottom) + "px;"), e.charAt(1) == "e" ? c += "right:" + (f[0] + S.right) + "px;" : e.charAt(1) == "w" && (c += "left:" + (f[0] + S.left) + "px;"), d = a('<div class="legend">' + d.replace('style="', 'style="position:absolute;' + c + ";") + "</div>").appendTo(b), L.legend.backgroundOpacity != 0 && (e = L.legend.backgroundColor, e == null && (e = (e = L.grid.backgroundColor) && typeof e == "string" ? a.color.parse(e) : a.color.extract(d, "background-color"), e.a = 1, e = e.toString()), f = d.children(), a('<div style="position:absolute;width:' + f.width() + "px;height:" + f.height() + "px;" + c + "background-color:" + e + ';"> </div>').prependTo(d).css("opacity", L.legend.backgroundOpacity)))) } } function y(b, c, d, e) { var f = b.fill; if (!f) return null; if (b.fillColor) return J(b.fillColor, d, e, c); b = a.color.parse(c), b.a = typeof f == "number" ? f : .4, b.normalize(); return b.toString() } function w(a) { P.save(), P.translate(S.left, S.top), P.lineWidth = a.bars.lineWidth, P.strokeStyle = a.color; var b = a.bars.align == "left" ? 0 : -a.bars.barWidth / 2; (function(b, c, d, e, f, g, h) { var i = b.points; b = b.pointsize; for (var j = 0; j < i.length; j += b) i[j] != null && v(i[j], i[j + 1], i[j + 2], c, d, e, f, g, h, P, a.bars.horizontal) })(a.datapoints, b, b + a.bars.barWidth, 0, a.bars.fill ? function(b, c) { return y(a.bars, a.color, b, c) } : null, a.xaxis, a.yaxis), P.restore() } function v(a, b, c, d, e, f, g, h, i, j, k) { var l, m, n, o; k ? (o = m = n = !0, l = !1, k = c, a = a, c = b + d, e = b + e, a < k && (b = a, a = k, k = b, l = !0, m = !1)) : (l = m = n = !0, o = !1, k = a + d, a = a + e, e = c, c = b, c < e && (b = c, c = e, e = b, o = !0, n = !1)); if (!(a < h.min || k > h.max || c < i.min || e > i.max)) { k < h.min && (k = h.min, l = !1), a > h.max && (a = h.max, m = !1), e < i.min && (e = i.min, o = !1), c > i.max && (c = i.max, n = !1), k = h.p2c(k), e = i.p2c(e), a = h.p2c(a), c = i.p2c(c), g && (j.beginPath(), j.moveTo(k, e), j.lineTo(k, c), j.lineTo(a, c), j.lineTo(a, e), j.fillStyle = g(e, c), j.fill()); if (l || m || n || o) j.beginPath(), j.moveTo(k, e + f), l ? j.lineTo(k, c + f) : j.moveTo(k, c + f), n ? j.lineTo(a, c + f) : j.moveTo(a, c + f), m ? j.lineTo(a, e + f) : j.moveTo(a, e + f), o ? j.lineTo(k, e + f) : j.moveTo(k, e + f), j.stroke() } } function u(a) { function b(a, b, c, d, e, f, g) { var h = a.points; a = a.pointsize; for (var i = 0; i < h.length; i += a) { var j = h[i], k = h[i + 1]; j == null || j < f.min || j > f.max || k < g.min || k > g.max || (P.beginPath(), P.arc(f.p2c(j), g.p2c(k) + d, b, 0, e, !1), c && (P.fillStyle = c, P.fill()), P.stroke()) } } P.save(), P.translate(S.left, S.top); var c = a.lines.lineWidth, d = a.shadowSize, e = a.points.radius; c > 0 && d > 0 && (d = d / 2, P.lineWidth = d, P.strokeStyle = "rgba(0,0,0,0.1)", b(a.datapoints, e, null, d + d / 2, Math.PI, a.xaxis, a.yaxis), P.strokeStyle = "rgba(0,0,0,0.2)", b(a.datapoints, e, null, d / 2, Math.PI, a.xaxis, a.yaxis)), P.lineWidth = c, P.strokeStyle = a.color, b(a.datapoints, e, y(a.points, a.color), 0, 2 * Math.PI, a.xaxis, a.yaxis), P.restore() } function t(a) { function c(a, b, c) { var d = a.points; a = a.pointsize; var e = Math.min(Math.max(0, c.min), c.max), f; f = 0; for (var g = !1, h = a; h < d.length; h += a) { var i = d[h - a], j = d[h - a + 1], k = d[h], l = d[h + 1]; if (g && i != null && k == null) P.lineTo(b.p2c(f), c.p2c(e)), P.fill(), g = !1; else if (i != null && k != null) { if (i <= k && i < b.min) { if (k < b.min) continue; j = (b.min - i) / (k - i) * (l - j) + j, i = b.min } else if (k <= i && k < b.min) { if (i < b.min) continue; l = (b.min - i) / (k - i) * (l - j) + j, k = b.min } if (i >= k && i > b.max) { if (k > b.max) continue; j = (b.max - i) / (k - i) * (l - j) + j, i = b.max } else if (k >= i && k > b.max) { if (i > b.max) continue; l = (b.max - i) / (k - i) * (l - j) + j, k = b.max } g || (P.beginPath(), P.moveTo(b.p2c(i), c.p2c(e)), g = !0); if (j < c.max || l < c.max) if (j > c.min || l > c.min) { var m = i, n = k; j > l || j >= c.min || l < c.min ? l <= j && l < c.min && j >= c.min && (k = (c.min - j) / (l - j) * (k - i) + i, l = c.min) : (i = (c.min - j) / (l - j) * (k - i) + i, j = c.min), j < l || j <= c.max || l > c.max ? l >= j && l > c.max && j <= c.max && (k = (c.max - j) / (l - j) * (k - i) + i, l = c.max) : (i = (c.max - j) / (l - j) * (k - i) + i, j = c.max), i != m && (f = j <= c.min ? c.min : c.max, P.lineTo(b.p2c(m), c.p2c(f)), P.lineTo(b.p2c(i), c.p2c(f))), P.lineTo(b.p2c(i), c.p2c(j)), P.lineTo(b.p2c(k), c.p2c(l)), k != n && (f = l <= c.min ? c.min : c.max, P.lineTo(b.p2c(k), c.p2c(f)), P.lineTo(b.p2c(n), c.p2c(f))), f = Math.max(k, n) } else P.lineTo(b.p2c(i), c.p2c(c.min)), P.lineTo(b.p2c(k), c.p2c(c.min)), f = k; else P.lineTo(b.p2c(i), c.p2c(c.max)), P.lineTo(b.p2c(k), c.p2c(c.max)), f = k } } g && (P.lineTo(b.p2c(f), c.p2c(e)), P.fill()) } function b(a, b, c, d, e) { var f = a.points; a = a.pointsize; var g = null, h = null; P.beginPath(); for (var i = a; i < f.length; i += a) { var j = f[i - a], k = f[i - a + 1], l = f[i], m = f[i + 1]; if (j != null && l != null) { if (k <= m && k < e.min) { if (m < e.min) continue; j = (e.min - k) / (m - k) * (l - j) + j, k = e.min } else if (m <= k && m < e.min) { if (k < e.min) continue; l = (e.min - k) / (m - k) * (l - j) + j, m = e.min } if (k >= m && k > e.max) { if (m > e.max) continue; j = (e.max - k) / (m - k) * (l - j) + j, k = e.max } else if (m >= k && m > e.max) { if (k > e.max) continue; l = (e.max - k) / (m - k) * (l - j) + j, m = e.max } if (j <= l && j < d.min) { if (l < d.min) continue; k = (d.min - j) / (l - j) * (m - k) + k, j = d.min } else if (l <= j && l < d.min) { if (j < d.min) continue; m = (d.min - j) / (l - j) * (m - k) + k, l = d.min } if (j >= l && j > d.max) { if (l > d.max) continue; k = (d.max - j) / (l - j) * (m - k) + k, j = d.max } else if (l >= j && l > d.max) { if (j > d.max) continue; m = (d.max - j) / (l - j) * (m - k) + k, l = d.max } (j != g || k != h) && P.moveTo(d.p2c(j) + b, e.p2c(k) + c), g = l, h = m, P.lineTo(d.p2c(l) + b, e.p2c(m) + c) } } P.stroke() } P.save(), P.translate(S.left, S.top), P.lineJoin = "round"; var d = a.lines.lineWidth, e = a.shadowSize; if (d > 0 && e > 0) { P.lineWidth = e, P.strokeStyle = "rgba(0,0,0,0.1)"; var f = Math.PI / 18; b(a.datapoints, Math.sin(f) * (d / 2 + e / 2), Math.cos(f) * (d / 2 + e / 2), a.xaxis, a.yaxis), P.lineWidth = e / 2, b(a.datapoints, Math.sin(f) * (d / 2 + e / 4), Math.cos(f) * (d / 2 + e / 4), a.xaxis, a.yaxis) } P.lineWidth = d, P.strokeStyle = a.color; if (e = y(a.lines, a.color, 0, X)) P.fillStyle = e, c(a.datapoints, a.xaxis, a.yaxis); d > 0 && b(a.datapoints, 0, 0, a.xaxis, a.yaxis), P.restore() } function s() { function a(a, b) { for (var d = 0; d < a.ticks.length; ++d) { var e = a.ticks[d]; !e.label || e.v < a.min || e.v > a.max || c.push(b(e, a)) } } b.find(".tickLabels").remove(); var c = ['<div class="tickLabels" style="font-size:smaller;color:' + L.grid.color + '">'], d = L.grid.labelMargin + L.grid.borderWidth; a(R.xaxis, function(a, b) { return '<div style="position:absolute;top:' + (S.top + X + d) + "px;left:" + Math.round(S.left + b.p2c(a.v) - b.labelWidth / 2) + "px;width:" + b.labelWidth + 'px;text-align:center" class="tickLabel">' + a.label + "</div>" }), a(R.yaxis, function(a, b) { return '<div style="position:absolute;top:' + Math.round(S.top + b.p2c(a.v) - b.labelHeight / 2) + "px;right:" + (S.right + W + d) + "px;width:" + b.labelWidth + 'px;text-align:right" class="tickLabel">' + a.label + "</div>" }), a(R.x2axis, function(a, b) { return '<div style="position:absolute;bottom:' + (S.bottom + X + d) + "px;left:" + Math.round(S.left + b.p2c(a.v) - b.labelWidth / 2) + "px;width:" + b.labelWidth + 'px;text-align:center" class="tickLabel">' + a.label + "</div>" }), a(R.y2axis, function(a, b) { return '<div style="position:absolute;top:' + Math.round(S.top + b.p2c(a.v) - b.labelHeight / 2) + "px;left:" + (S.left + W + d) + "px;width:" + b.labelWidth + 'px;text-align:left" class="tickLabel">' + a.label + "</div>" }), c.push("</div>"), b.append(c.join("")) } function r() { var b; P.save(), P.translate(S.left, S.top), L.grid.backgroundColor && (P.fillStyle = J(L.grid.backgroundColor, X, 0, "rgba(255, 255, 255, 0)"), P.fillRect(0, 0, W, X)); var c = L.grid.markings; if (c) { a.isFunction(c) && (c = c({ xmin: R.xaxis.min, xmax: R.xaxis.max, ymin: R.yaxis.min, ymax: R.yaxis.max, xaxis: R.xaxis, yaxis: R.yaxis, x2axis: R.x2axis, y2axis: R.y2axis })); for (b = 0; b < c.length; ++b) { var d = c[b], e = q(d, "x"), f = q(d, "y"); e.from == null && (e.from = e.axis.min), e.to == null && (e.to = e.axis.max), f.from == null && (f.from = f.axis.min), f.to == null && (f.to = f.axis.max); if (!(e.to < e.axis.min || e.from > e.axis.max || f.to < f.axis.min || f.from > f.axis.max)) { e.from = Math.max(e.from, e.axis.min), e.to = Math.min(e.to, e.axis.max), f.from = Math.max(f.from, f.axis.min), f.to = Math.min(f.to, f.axis.max); if (e.from != e.to || f.from != f.to) e.from = e.axis.p2c(e.from), e.to = e.axis.p2c(e.to), f.from = f.axis.p2c(f.from), f.to = f.axis.p2c(f.to), e.from == e.to || f.from == f.to ? (P.beginPath(), P.strokeStyle = d.color || L.grid.markingsColor, P.lineWidth = d.lineWidth || L.grid.markingsLineWidth, P.moveTo(e.from, f.from), P.lineTo(e.to, f.to), P.stroke()) : (P.fillStyle = d.color || L.grid.markingsColor, P.fillRect(e.from, f.to, e.to - e.from, f.from - f.to)) } } } P.lineWidth = 1, P.strokeStyle = L.grid.tickColor, P.beginPath(), d = R.xaxis; for (b = 0; b < d.ticks.length; ++b) c = d.ticks[b].v, c > d.min && c < R.xaxis.max && (P.moveTo(Math.floor(d.p2c(c)) + P.lineWidth / 2, 0), P.lineTo(Math.floor(d.p2c(c)) + P.lineWidth / 2, X)); d = R.yaxis; for (b = 0; b < d.ticks.length; ++b) c = d.ticks[b].v, c > d.min && c < d.max && (P.moveTo(0, Math.floor(d.p2c(c)) + P.lineWidth / 2), P.lineTo(W, Math.floor(d.p2c(c)) + P.lineWidth / 2)); d = R.x2axis; for (b = 0; b < d.ticks.length; ++b) c = d.ticks[b].v, c > d.min && c < d.max && (P.moveTo(Math.floor(d.p2c(c)) + P.lineWidth / 2, -5), P.lineTo(Math.floor(d.p2c(c)) + P.lineWidth / 2, 5)); d = R.y2axis; for (b = 0; b < d.ticks.length; ++b) c = d.ticks[b].v, c > d.min && c < d.max && (P.moveTo(W - 5, Math.floor(d.p2c(c)) + P.lineWidth / 2), P.lineTo(W + 5, Math.floor(d.p2c(c)) + P.lineWidth / 2)); P.stroke(), L.grid.borderWidth && (b = L.grid.borderWidth, P.lineWidth = b, P.strokeStyle = L.grid.borderColor, P.strokeRect(-b / 2, -b / 2, W + b, X + b)), P.restore() } function q(a, b) { var c = b + "axis", d = b + "2axis", e, f; a[c] ? (e = R[c], f = a[c].from, c = a[c].to) : a[d] ? (e = R[d], f = a[d].from, c = a[d].to) : (e = R[c], f = a[b + "1"], c = a[b + "2"]); if (f != null && c != null && f > c) return { from: c, to: f, axis: e }; return { from: f, to: c, axis: e} } function p() { P.clearRect(0, 0, T, U); var a = L.grid; a.show && !a.aboveData && r(); for (var b = 0; b < K.length; ++b) { var c = K[b]; c.lines.show && t(c), c.bars.show && w(c), c.points.show && u(c) } g(Y.draw, [P]), a.show && a.aboveData && r() } function o(b, c) { b.ticks = []; if (b.used) { if (c.ticks == null) b.ticks = b.tickGenerator(b); else if (typeof c.ticks == "number") c.ticks > 0 && (b.ticks = b.tickGenerator(b)); else if (c.ticks) { var d = c.ticks; a.isFunction(d) && (d = d({ min: b.min, max: b.max })); var e, f; for (e = 0; e < d.length; ++e) { var g = null, h = d[e]; typeof h == "object" ? (f = h[0], h.length > 1 && (g = h[1])) : f = h, g == null && (g = b.tickFormatter(f, b)), b.ticks[e] = { v: f, label: g} } } c.autoscaleMargin != null && b.ticks.length > 0 && (c.min == null && (b.min = Math.min(b.min, b.ticks[0].v)), c.max == null && b.ticks.length > 1 && (b.max = Math.max(b.max, b.ticks[b.ticks.length - 1].v))) } } function n(b, d) { var e = (b.max - b.min) / (typeof d.ticks == "number" && d.ticks > 0 ? d.ticks : b == R.xaxis || b == R.x2axis ? .3 * Math.sqrt(T) : .3 * Math.sqrt(U)), f, g, h; if (d.mode == "time") { var i = { second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, month: 2592e6, year: 525949.2 * 60 * 1e3 }; h = [[1, "second"], [2, "second"], [5, "second"], [10, "second"], [30, "second"], [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"], [30, "minute"], [1, "hour"], [2, "hour"], [4, "hour"], [8, "hour"], [12, "hour"], [1, "day"], [2, "day"], [3, "day"], [.25, "month"], [.5, "month"], [1, "month"], [2, "month"], [3, "month"], [6, "month"], [1, "year"]], f = 0, d.minTickSize != null && (f = typeof d.tickSize == "number" ? d.tickSize : d.minTickSize[0] * i[d.minTickSize[1]]); for (g = 0; g < h.length - 1; ++g) if (e < (h[g][0] * i[h[g][1]] + h[g + 1][0] * i[h[g + 1][1]]) / 2 && h[g][0] * i[h[g][1]] >= f) break; f = h[g][0], g = h[g][1], g == "year" && (h = Math.pow(10, Math.floor(Math.log(e / i.year) / Math.LN10)), e = e / i.year / h, f = e < 1.5 ? 1 : e < 3 ? 2 : e < 7.5 ? 5 : 10, f *= h), d.tickSize && (f = d.tickSize[0], g = d.tickSize[1]), e = function(a) { var b = [], d = a.tickSize[0], e = a.tickSize[1], f = new Date(a.min), g = d * i[e]; e == "second" && f.setUTCSeconds(c(f.getUTCSeconds(), d)), e == "minute" && f.setUTCMinutes(c(f.getUTCMinutes(), d)), e == "hour" && f.setUTCHours(c(f.getUTCHours(), d)), e == "month" && f.setUTCMonth(c(f.getUTCMonth(), d)), e == "year" && f.setUTCFullYear(c(f.getUTCFullYear(), d)), f.setUTCMilliseconds(0), g >= i.minute && f.setUTCSeconds(0), g >= i.hour && f.setUTCMinutes(0), g >= i.day && f.setUTCHours(0), g >= i.day * 4 && f.setUTCDate(1), g >= i.year && f.setUTCMonth(0); var h = 0, j = Number.NaN, k; do { k = j, j = f.getTime(), b.push({ v: j, label: a.tickFormatter(j, a) }); if (e == "month") if (d < 1) { f.setUTCDate(1); var l = f.getTime(); f.setUTCMonth(f.getUTCMonth() + 1); var m = f.getTime(); f.setTime(j + h * i.hour + (m - l) * d), h = f.getUTCHours(), f.setUTCHours(0) } else f.setUTCMonth(f.getUTCMonth() + d); else e == "year" ? f.setUTCFullYear(f.getUTCFullYear() + d) : f.setTime(j + g) } while (j < a.max && j != k); return b }, h = function(b, c) { var e = new Date(b); if (d.timeformat != null) return a.plot.formatDate(e, d.timeformat, d.monthNames); var f = c.tickSize[0] * i[c.tickSize[1]], g = c.max - c.min, h = d.twelveHourClock ? " %p" : ""; fmt = f < i.minute ? "%h:%M:%S" + h : f < i.day ? g < 2 * i.day ? "%h:%M" + h : "%b %d %h:%M" + h : f < i.month ? "%b %d" : f < i.year ? g < i.year ? "%b" : "%b %y" : "%y"; return a.plot.formatDate(e, fmt, d.monthNames) } } else { var j = d.tickDecimals, k = -Math.floor(Math.log(e) / Math.LN10); j != null && k > j && (k = j), h = Math.pow(10, -k), e = e / h, e < 1.5 ? f = 1 : e < 3 ? (f = 2, e > 2.25 && (j == null || k + 1 <= j) && (f = 2.5, ++k)) : f = e < 7.5 ? 5 : 10, f *= h, d.minTickSize != null && f < d.minTickSize && (f = d.minTickSize), d.tickSize != null && (f = d.tickSize), b.tickDecimals = Math.max(0, j != null ? j : k), e = function(a) { var b = [], d = c(a.min, a.tickSize), e = 0, f = Number.NaN, g; do g = f, f = d + e * a.tickSize, b.push({ v: f, label: a.tickFormatter(f, a) }), ++e; while (f < a.max && f != g); return b }, h = function(a, b) { return a.toFixed(b.tickDecimals) } } b.tickSize = g ? [f, g] : f, b.tickGenerator = e, b.tickFormatter = a.isFunction(d.tickFormatter) ? function(a, b) { return "" + d.tickFormatter(a, b) } : h } function m(a, b) { var c = +(b.min != null ? b.min : a.datamin), d = +(b.max != null ? b.max : a.datamax), e = d - c; if (e == 0) { e = d == 0 ? 1 : .01, b.min == null && (c -= e); if (b.max == null || b.min != null) d += e } else { var f = b.autoscaleMargin; f != null && (b.min == null && (c -= e * f, c < 0 && a.datamin != null && a.datamin >= 0 && (c = 0)), b.max == null && (d += e * f, d > 0 && a.datamax != null && a.datamax <= 0 && (d = 0))) } a.min = c, a.max = d } function l() { function e() { var a = L.grid.borderWidth; for (i = 0; i < K.length; ++i) a = Math.max(a, 2 * (K[i].points.radius + K[i].points.lineWidth / 2)); S.left = S.right = S.top = S.bottom = a; var b = L.grid.labelMargin + L.grid.borderWidth; R.xaxis.labelHeight > 0 && (S.bottom = Math.max(a, R.xaxis.labelHeight + b)), R.yaxis.labelWidth > 0 && (S.left = Math.max(a, R.yaxis.labelWidth + b)), R.x2axis.labelHeight > 0 && (S.top = Math.max(a, R.x2axis.labelHeight + b)), R.y2axis.labelWidth > 0 && (S.right = Math.max(a, R.y2axis.labelWidth + b)), W = T - S.left - S.right, X = U - S.bottom - S.top } function d(c, d) { var e, f = [], g; c.labelWidth = d.labelWidth, c.labelHeight = d.labelHeight; if (c == R.xaxis || c == R.x2axis) { c.labelWidth == null && (c.labelWidth = T / (c.ticks.length > 0 ? c.ticks.length : 1)); if (c.labelHeight == null) { f = []; for (e = 0; e < c.ticks.length; ++e) (g = c.ticks[e].label) && f.push('<div class="tickLabel" style="float:left;width:' + c.labelWidth + 'px">' + g + "</div>"); f.length > 0 && (e = a('<div style="position:absolute;top:-10000px;width:10000px;font-size:smaller">' + f.join("") + '<div style="clear:left"></div></div>').appendTo(b), c.labelHeight = e.height(), e.remove()) } } else if (c.labelWidth == null || c.labelHeight == null) { for (e = 0; e < c.ticks.length; ++e) (g = c.ticks[e].label) && f.push('<div class="tickLabel">' + g + "</div>"); f.length > 0 && (e = a('<div style="position:absolute;top:-10000px;font-size:smaller">' + f.join("") + "</div>").appendTo(b), c.labelWidth == null && (c.labelWidth = e.width()), c.labelHeight == null && (c.labelHeight = e.find("div").height()), e.remove()) } c.labelWidth == null && (c.labelWidth = 0), c.labelHeight == null && (c.labelHeight = 0) } function c(a, b) { function c(a) { return a } var d, e, f = b.transform || c, g = b.inverseTransform; a == R.xaxis || a == R.x2axis ? (d = a.scale = W / (f(a.max) - f(a.min)), e = f(a.min), a.p2c = f == c ? function(a) { return (a - e) * d } : function(a) { return (f(a) - e) * d }, a.c2p = g ? function(a) { return g(e + a / d) } : function(a) { return e + a / d }) : (d = a.scale = X / (f(a.max) - f(a.min)), e = f(a.max), a.p2c = f == c ? function(a) { return (e - a) * d } : function(a) { return (e - f(a)) * d }, a.c2p = g ? function(a) { return g(e - a / d) } : function(a) { return e - a / d }) } for (var f in R) m(R[f], L[f]); if (L.grid.show) { for (f in R) n(R[f], L[f]), o(R[f], L[f]), d(R[f], L[f]); e() } else S.left = S.right = S.top = S.bottom = 0, W = T, X = U; for (f in R) c(R[f], L[f]); L.grid.show && s(), z() } function k() { function a(a, b, c) { b < a.datamin && (a.datamin = b), c > a.datamax && (a.datamax = c) } var b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, d, e, f, h, i, j, k, l, m, n, o; for (l in R) R[l].datamin = b, R[l].datamax = c, R[l].used = !1; for (d = 0; d < K.length; ++d) i = K[d], i.datapoints = { points: [] }, g(Y.processRawData, [i, i.data, i.datapoints]); for (d = 0; d < K.length; ++d) { i = K[d]; var p = i.data, q = i.datapoints.format; q || (q = [], q.push({ x: !0, number: !0, required: !0 }), q.push({ y: !0, number: !0, required: !0 }), i.bars.show && q.push({ y: !0, number: !0, required: !1, defaultValue: 0 }), i.datapoints.format = q); if (i.datapoints.pointsize == null) { i.datapoints.pointsize == null && (i.datapoints.pointsize = q.length), k = i.datapoints.pointsize, j = i.datapoints.points, insertSteps = i.lines.show && i.lines.steps, i.xaxis.used = i.yaxis.used = !0; for (e = f = 0; e < p.length; ++e, f += k) { o = p[e]; var r = o == null; if (!r) for (h = 0; h < k; ++h) { m = o[h]; if (n = q[h]) n.number && m != null && (m = +m, isNaN(m) && (m = null)), m == null && (n.required && (r = !0), n.defaultValue != null && (m = n.defaultValue)); j[f + h] = m } if (r) for (h = 0; h < k; ++h) m = j[f + h], m != null && (n = q[h], n.x && a(i.xaxis, m, m), n.y && a(i.yaxis, m, m)), j[f + h] = null; else if (insertSteps && f > 0 && j[f - k] != null && j[f - k] != j[f] && j[f - k + 1] != j[f + 1]) { for (h = 0; h < k; ++h) j[f + k + h] = j[f + h]; j[f + 1] = j[f - k + 1], f += k } } } } for (d = 0; d < K.length; ++d) i = K[d], g(Y.processDatapoints, [i, i.datapoints]); for (d = 0; d < K.length; ++d) { i = K[d], j = i.datapoints.points, k = i.datapoints.pointsize, o = f = b, r = p = c; for (e = 0; e < j.length; e += k) if (j[e] != null) for (h = 0; h < k; ++h) { m = j[e + h]; if (n = q[h]) n.x && (m < f && (f = m), m > p && (p = m)), n.y && (m < o && (o = m), m > r && (r = m)) } i.bars.show && (e = i.bars.align == "left" ? 0 : -i.bars.barWidth / 2, i.bars.horizontal ? (o += e, r += e + i.bars.barWidth) : (f += e, p += e + i.bars.barWidth)), a(i.xaxis, f, p), a(i.yaxis, o, r) } for (l in R) R[l].datamin == b && (R[l].datamin = null), R[l].datamax == c && (R[l].datamax = null) } function j(a, b) { var c = a[b]; if (!c || c == 1) return R[b]; if (typeof c == "number") return R[b.charAt(0) + c + b.slice(1)]; return c } function h(b) { for (var c = [], d = 0; d < b.length; ++d) { var e = a.extend(!0, {}, L.series); b[d].data ? (e.data = b[d].data, delete b[d].data, a.extend(!0, e, b[d]), b[d].data = e.data) : e.data = b[d], c.push(e) } K = c, c = K.length, d = [], e = []; for (b = 0; b < K.length; ++b) { var f = K[b].color; f != null && (--c, typeof f == "number" ? e.push(f) : d.push(a.color.parse(K[b].color))) } for (b = 0; b < e.length; ++b) c = Math.max(c, e[b] + 1); d = []; for (b = e = 0; d.length < c; ) f = L.colors.length == b ? a.color.make(100, 100, 100) : a.color.parse(L.colors[b]), f.scale("rgb", 1 + (e % 2 == 1 ? -1 : 1) * Math.ceil(e / 2) * .2), d.push(f), ++b, b >= L.colors.length && (b = 0, ++e); for (b = c = 0; b < K.length; ++b) { e = K[b], e.color == null ? (e.color = d[c].toString(), ++c) : typeof e.color == "number" && (e.color = d[e.color].toString()); if (e.lines.show == null) { var g; f = !0; for (g in e) if (e[g].show) { f = !1; break } f && (e.lines.show = !0) } e.xaxis = j(e, "xaxis"), e.yaxis = j(e, "yaxis") } k() } function g(a, b) { b = [Z].concat(b); for (var c = 0; c < a.length; ++c) a[c].apply(this, b) } var K = [], L = { colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"], legend: { show: !0, noColumns: 1, labelFormatter: null, labelBoxBorderColor: "#ccc", container: null, position: "ne", margin: 5, backgroundColor: null, backgroundOpacity: .85 }, xaxis: { mode: null, transform: null, inverseTransform: null, min: null, max: null, autoscaleMargin: null, ticks: null, tickFormatter: null, labelWidth: null, labelHeight: null, tickDecimals: null, tickSize: null, minTickSize: null, monthNames: null, timeformat: null, twelveHourClock: !1 }, yaxis: { autoscaleMargin: .02 }, x2axis: { autoscaleMargin: null }, y2axis: { autoscaleMargin: .02 }, series: { points: { show: !1, radius: 3, lineWidth: 2, fill: !0, fillColor: "#ffffff" }, lines: { lineWidth: 2, fill: !1, fillColor: null, steps: !1 }, bars: { show: !1, lineWidth: 2, barWidth: 1, fill: !0, fillColor: null, align: "left", horizontal: !1 }, shadowSize: 3 }, grid: { show: !0, aboveData: !1, color: "#545454", backgroundColor: null, tickColor: "rgba(0,0,0,0.15)", labelMargin: 5, borderWidth: 2, borderColor: null, markings: null, markingsColor: "#f4f4f4", markingsLineWidth: 2, clickable: !1, hoverable: !1, autoHighlight: !0, mouseActiveRadius: 10 }, hooks: {} }, M = null, N = null, O = null, P = null, Q = null, R = { xaxis: {}, yaxis: {}, x2axis: {}, y2axis: {} }, S = { left: 0, right: 0, top: 0, bottom: 0 }, T = 0, U = 0, W = 0, X = 0, Y = { processOptions: [], processRawData: [], processDatapoints: [], draw: [], bindEvents: [], drawOverlay: [] }, Z = this; Z.setData = h, Z.setupGrid = l, Z.draw = p, Z.getPlaceholder = function() { return b }, Z.getCanvas = function() { return M }, Z.getPlotOffset = function() { return S }, Z.width = function() { return W }, Z.height = function() { return X }, Z.offset = function() { var a = O.offset(); a.left += S.left, a.top += S.top; return a }, Z.getData = function() { return K }, Z.getAxes = function() { return R }, Z.getOptions = function() { return L }, Z.highlight = F, Z.unhighlight = G, Z.triggerRedrawOverlay = D, Z.pointOffset = function(a) { return { left: parseInt(j(a, "xaxis").p2c(+a.x) + S.left), top: parseInt(j(a, "yaxis").p2c(+a.y) + S.top)} }, Z.hooks = Y, function() { for (var b = 0; b < f.length; ++b) { var c = f[b]; c.init(Z), c.options && a.extend(!0, L, c.options) } } (Z), function(b) { a.extend(!0, L, b), L.grid.borderColor == null && (L.grid.borderColor = L.grid.color), L.xaxis.noTicks && L.xaxis.ticks == null && (L.xaxis.ticks = L.xaxis.noTicks), L.yaxis.noTicks && L.yaxis.ticks == null && (L.yaxis.ticks = L.yaxis.noTicks), L.grid.coloredAreas && (L.grid.markings = L.grid.coloredAreas), L.grid.coloredAreasColor && (L.grid.markingsColor = L.grid.coloredAreasColor), L.lines && a.extend(!0, L.series.lines, L.lines), L.points && a.extend(!0, L.series.points, L.points), L.bars && a.extend(!0, L.series.bars, L.bars), L.shadowSize && (L.series.shadowSize = L.shadowSize); for (var c in Y) L.hooks[c] && L.hooks[c].length && (Y[c] = Y[c].concat(L.hooks[c])); g(Y.processOptions, [L]) } (e), function() { function c(b, c) { var d = document.createElement("canvas"); d.width = b, d.height = c, a.browser.msie && parseInt(a.browser.version) < 9 && (d = window.G_vmlCanvasManager.initElement(d)); return d } T = b.width(), U = b.height(), b.html(""), b.css("position") == "static" && b.css("position", "relative"); if (T <= 0 || U <= 0) throw "Invalid dimensions for plot, width = " + T + ", height = " + U; a.browser.msie && parseInt(a.browser.version) < 9 && window.G_vmlCanvasManager.init_(document), M = a(c(T, U)).appendTo(b).get(0), P = M.getContext("2d"), N = a(c(T, U)).css({ position: "absolute", left: 0, top: 0 }).appendTo(b).get(0), Q = N.getContext("2d"), Q.stroke() } (), h(d), l(), p(), O = a([N, M]), L.grid.hoverable && O.mousemove(A), L.grid.clickable && O.click(B), g(Y.bindEvents, [O]); var $ = [], _ = null } a.plot = function(c, d, e) { return new b(a(c), d, e, a.plot.plugins) }, a.plot.plugins = [], a.plot.formatDate = function(a, b, c) { var d = function(a) { a = "" + a; return a.length == 1 ? "0" + a : a }, e = [], f = !1, g = a.getUTCHours(), h = g < 12; c == null && (c = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]), b.search(/%p|%P/) != -1 && (g > 12 ? g -= 12 : g == 0 && (g = 12)); for (var i = 0; i < b.length; ++i) { var j = b.charAt(i); if (f) { switch (j) { case "h": j = "" + g; break; case "H": j = d(g); break; case "M": j = d(a.getUTCMinutes()); break; case "S": j = d(a.getUTCSeconds()); break; case "d": j = "" + a.getUTCDate(); break; case "m": j = "" + (a.getUTCMonth() + 1); break; case "y": j = "" + a.getUTCFullYear(); break; case "b": j = "" + c[a.getUTCMonth()]; break; case "p": j = h ? "am" : "pm"; break; case "P": j = h ? "AM" : "PM" } e.push(j), f = !1 } else j == "%" ? f = !0 : e.push(j) } return e.join("") } } (jQuery)
