var jsmart = {}; if (jsmart.autoComputeCallback = function () { }, !jQuery) throw new Error("nsmart requires jQuery"); +function (a, b, c, d) { "use strict"; function g(d, g) { var h = d, i = this; return b(a).on("scroll", function () { i.each(function () { var a = b(this), c = a.data("smart.animation"); c && c.animate() }) }), e.$Device().$Touchable && b(c).on("ps-scroll-y", function () { i.each(function () { var a = b(this), c = a.data("smart.animation"); c && c.animate() }) }), this.each(function () { var j, k, l, a = h, c = "string" == typeof a && a, d = this, e = b(d), i = e.attr("pvid"); return "undefined" != typeof i && "" !== i && (j = b("#smv_" + i), j.hasClass("animated") && "1" !== j.attr("smexecuted")) ? !0 : (null == a && (k = e.attr("smanim"), "undefined" != typeof k && (a = b.parseJSON(k))), l = e.data("smart.animation"), l ? c ? (l.options = b.extend({}, f.DEFAULTS, b.parseJSON(e.attr("smanim"))), l.ac = l.options, "undefined" == typeof g ? l[a]() : l[a](g)) : (l.options = b.extend({}, f.DEFAULTS, l.options), l.ac = l.options, l.queue[0] = l.ac.animationName + l.ac.direction || "", l.animate()) : "object" == typeof a ? (e.data("smart.animation", l = new f(this, a)), l.animate()) : (a = {}, e.data("smart.animation", l = new f(this, a)), l.animate()), void 0) }) } var e = a.smartH$ = new function () { function v() { if (!k) { k = { $Touchable: "ontouchstart" in a || "createTouch" in c }; var b; (q.pointerEnabled || (b = q.msPointerEnabled)) && (k.$TouchActionAttr = b ? "msTouchAction" : "touchAction") } return k } function w(b) { var d, e, k, o, q, t, v; return l || (l = -1, "Microsoft Internet Explorer" == r && a.attachEvent && a.ActiveXObject ? (d = s.indexOf("MSIE"), l = f, n = u(s.substring(d + 5, s.indexOf(";", d))), m = c.documentMode || n) : "Netscape" == r && a.addEventListener ? (e = s.indexOf("Firefox"), k = s.indexOf("Safari"), o = s.indexOf("Chrome"), q = s.indexOf("AppleWebKit"), e >= 0 ? (l = g, m = u(s.substring(e + 8))) : k >= 0 ? (t = s.substring(0, k).lastIndexOf("/"), l = o >= 0 ? i : h, m = u(s.substring(t + 1, k))) : (v = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(s), v && (l = f, m = n = u(v[1]))), q >= 0 && (p = u(s.substring(q + 12)))) : (v = /(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(s), v && (l = j, m = u(v[2])))), b == l } function x() { return w(f) } function y() { return x() && (6 > m || "BackCompat" == c.compatMode) } function z() { return w(g) } function A() { return w(h) } function B() { return w(i) } function C() { return w(j) } function D() { return A() && p > 534 && 535 > p } function E() { return w(), p > 537 || m > 42 || l == f && m >= 11 } function F() { return x() && 10 > m } function G(a) { var b, c; return function (e) { if (!b) { b = !0; var f = a.substr(0, 1).toUpperCase() + a.substr(1); L([a].concat(["WebKit", "ms", "Moz", "O", "webkit"]), function (b, g) { var h = a; return g && (h = b + f), e.style[h] != d ? c = h : void 0 }) } return c } } function H(a) { var b; return function (c) { return b = b || G(a)(c) || a } } function J(a) { return {}.toString.call(a) } function L(a, b) { var c, d; if ("[object Array]" == J(a)) { for (c = 0; c < a.length; c++)if (d = b(a[c], c, a)) return d } else for (c in a) if (d = b(a[c], c, a)) return d } var k, K, b = this, f = 1, g = 2, h = 3, i = 4, j = 5, l = 0, m = 0, n = 0, p = 0, q = navigator, r = q.appName, s = q.userAgent, u = (c.documentElement, parseFloat); H("transform"), K = {}, L(["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object"], function (a) { K["[object " + a + "]"] = a.toLowerCase() }), b.$Device = v, b.$IsBrowserIE = x, b.$IsBrowserIeQuirks = y, b.$IsBrowserFireFox = z, b.$IsBrowserSafari = A, b.$IsBrowserChrome = B, b.$IsBrowserOpera = C, b.$IsBrowserBadTransform = D, b.$IsBrowser3dSafe = E, b.$IsBrowserIe10Earlier = F, b.$BrowserVersion = function () { return m }, b.$BrowserEngineVersion = function () { return n || m }, b.$WebKitVersion = function () { return w(), p } }, f = function (a, c) { this.$element = b(a), this.options = b.extend({}, f.DEFAULTS, c), this.initTop = this.$element.position().top, this.initLeft = this.$element.position().left, this.prefixes = ["", "-moz-", "-o-animation-", "-webkit-"], this.queue = [], this.ac = c, this.queue[0] = this.ac.animationName + this.ac.direction || "", this.st = null }; f.version = "1.0", f.DEFAULTS = { container: a, threshold: 0 }, f.prototype = { belowthefold: function (c, e) { var f, g; return e.container === d || e.container === a ? (g = b(a), f = (a.innerHeight ? a.innerHeight : g.height()) + g.scrollTop()) : f = b(e.container).offset().top + b(e.container).height(), f <= c.offset().top - e.threshold }, rightoffold: function (c, e) { return !1 }, abovethetop: function (c, e) { var f; return f = e.container === d || e.container === a ? b(a).scrollTop() : b(e.container).offset().top, f >= c.offset().top + e.threshold + c.height() }, leftofbegin: function (c, e) { var f; return f = e.container === d || e.container === a ? b(a).scrollLeft() : b(e.container).offset().left, f >= c.offset().left + e.threshold + c.width() }, initQ: function () { 0 === this.queue.length && (this.queue[0] = this.ac.animationName + this.ac.direction || "") }, play: function () { this.addDoneAtt(), this.initQ(); var a = e.$Device(); !a.$Touchable && e.$IsBrowserIE() && e.$IsBrowserIe10Earlier() < 10 ? this.playIE() : this.playNoraml() }, replay: function () { this.removeDoneAtt(), this.play() }, prev: function (a) { this.cleanse(), this.$element.css({ opacity: 0 }), "undefined" == typeof a ? (this.ac = b.parseJSON(this.$element.attr("smanim")), this.queue[0] = this.ac.animationName + this.ac.direction || "", this.$element.attr("prevHisAni", this.queue[0]), this.play()) : (this.addDoneAtt(), this.palyWithData(a)) }, stop: function () { null !== this.st && clearTimeout(this.st); var a = this.ac.animationName + this.ac.direction || ""; this.$element.removeClass(a).css({ opacity: 0 }).stop(!0, !0) }, playIE: function () { this.isAmInFix(this.queue[0]) ? this[this.queue[0]]() : this.playNoraml() }, playNoraml: function () { var a, b; if (0 != this.queue.length) { for (a = this.prefixes.length; a--;)this.$element.css(this.prefixes[a] + "animation-duration", this.options.duration + "s"), this.$element.css(this.prefixes[a] + "animation-delay", this.options.delay + "s"), this.$element.css(this.prefixes[a] + "animation-iteration-count", this.options.infinite); this.$element.addClass(this.queue[0]), b = this, this.end("AnimationEnd", function () { b.$element.css({ opacity: 1 }), b.$element.hasClass(b.queue[0]) && (b.options.keep || 0 == b.queue.length || "infinite" === b.options.infinite || b.cleanse(), b.queue.shift(), b.queue.length ? b.animate() : b.execChildAnim(b.$element)) }) } }, palyWithData: function (a) { var d, b = this.prefixes.length, c = a.animationName + a.direction; for (this.$element.attr("prevHisAni", c); b--;)this.$element.css(this.prefixes[b] + "animation-duration", a.duration + "s"), this.$element.css(this.prefixes[b] + "animation-delay", a.delay + "s"), this.$element.css(this.prefixes[b] + "animation-iteration-count", a.infinite); this.$element.addClass(a.animationName + a.direction), d = this, this.end("AnimationEnd", function () { d.$element.css({ opacity: 1 }), d.cleanAnim(c), d.execChildAnim(d.$element) }) }, addDoneAtt: function () { this.$element.attr("sm-finished", !0) }, removeDoneAtt: function () { this.$element.removeAttr("sm-finished") }, fadeIn: function () { var a = this; this.st = setTimeout(function () { a.$element.animate({ opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInLeft: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("left")); a.$element.animate({ left: b - a.$element.width() }).animate({ left: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInLeftBig: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("left")); a.$element.animate({ left: 0 - a.$element.width() }).animate({ left: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInRight: function () { var c = this; this.st = setTimeout(function () { var d = parseInt(c.$element.css("left")), e = d + c.$element.width(), f = b(a).width(); e > f && (e = f - c.$element.width()), c.$element.animate({ left: e }).animate({ left: d, opacity: 1 }, 1e3 * (c.ac.duration || 0), function () { c.execChildAnim(c.$element) }) }, 1e3 * (c.ac.delay || 0)) }, fadeInRightBig: function () { var c = this; this.st = setTimeout(function () { var d = parseInt(c.$element.css("left")), e = d + c.$element.width(), f = b(a).width(); e > f && (e = f - c.$element.width()), c.$element.animate({ right: 0 - c.$element.width() }).animate({ left: d, opacity: 1 }, 1e3 * (c.ac.duration || 0), function () { c.execChildAnim(c.$element) }) }, 1e3 * (c.ac.delay || 0)) }, fadeInDown: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ top: b - a.$element.height() }).animate({ top: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInDownBig: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ top: 0 - a.$element.height() }).animate({ top: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInUp: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ top: b + a.$element.height() }).animate({ top: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, fadeInUpBig: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ bottom: 0 - a.$element.height() }).animate({ top: b, opacity: 1 }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, slideInLeft: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("left")); a.$element.animate({ left: b - a.$element.width() }).animate({ opacity: 1 }).animate({ left: b }, 1e3 * (a.ac.duration || 0) + 300, function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, slideInRight: function () { var c = this; this.st = setTimeout(function () { var d = parseInt(c.$element.css("left")), e = d + c.$element.width(), f = b(a).width(); e > f && (e = f - c.$element.width()), c.$element.animate({ left: e }).animate({ opacity: 1 }).animate({ left: d }, 1e3 * (c.ac.duration || 0), function () { c.execChildAnim(c.$element) }) }, 1e3 * (c.ac.delay || 0)) }, slideInDown: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ top: b - a.$element.height() }).animate({ opacity: 1 }).animate({ top: b }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, slideInUp: function () { var a = this; this.st = setTimeout(function () { var b = parseInt(a.$element.css("top")); a.$element.animate({ top: b + a.$element.height() }).animate({ opacity: 1 }).animate({ top: b }, 1e3 * (a.ac.duration || 0), function () { a.execChildAnim(a.$element) }) }, 1e3 * (a.ac.delay || 0)) }, isAmInFix: function (a) { var b = !1; switch (a) { case "fadeIn": case "fadeInLeft": case "fadeInLeftBig": case "fadeInRight": case "fadeInRightBig": case "fadeInRightBig": case "fadeInDown": case "fadeInDownBig": case "fadeInUp": case "fadeInUpBig": case "slideInLeft": case "slideInRight": case "slideInDown": case "slideInUp": b = !0 }return b }, animate: function () { var a = this.$element.attr("sm-finished"); this.abovethetop(this.$element, this.options) || this.leftofbegin(this.$element, this.options) || "undefined" != typeof a || this.belowthefold(this.$element, this.options) || this.rightoffold(this.$element, this.options) || "undefined" != typeof this.$element.attr("sm-finished") || this.play() }, cleanse: function () { var a = this.$element.attr("prevHisAni"); "undefined" != typeof a && "" !== a && this.$element.removeClass("hisAni"), this.cleanAnim(this.queue[0]) }, cleanAnim: function (a) { this.$element.removeClass(a); for (var b = this.prefixes.length; b--;)this.$element.css(this.prefixes[b] + "animation-duration", ""), this.$element.css(this.prefixes[b] + "animation-delay", ""), this.$element.css(this.prefixes[b] + "animation-iteration-count", "") }, end: function (a, b) { var c = this, d = a.toLowerCase() + " webkit" + a + " o" + a + " MS" + a; this.$element.bind(d, function () { "function" == typeof b && b(), c.$element.unbind(d) }) }, execChildAnim: function (a) { a.attr("smexecuted", "1"), "True" === a.attr("iscontainer") && a.find(".animated").smanimate() } }, b.fn.smanimate = g, b.fn.smanimate.Constructor = f }("undefined" == typeof window ? this : window, jQuery, document), +function (a) { "use strict"; function c(c, d) { function e(b, c) { var d = b, f = d.position().top + c, g = d.attr("pvid"); return "undefined" != typeof g && "" !== g ? e(a("#smv_" + g), f) : f } var f = c, g = this.sort(function (b, c) { return e(a(b), 0) - e(a(c), 0) }); return g.each(function () { var i, c = f, e = "string" == typeof c && c, g = this, h = a(g); 0 !== h.height() && (i = h.data("smart.remcopute"), i ? e ? "undefined" == typeof d ? i[c]() : d.length > 1 ? i[c].apply(i, d) : i[c](d) : i.recomputeH() : "object" == typeof c ? (h.data("smart.remcopute", i = new b(this, c)), i.recomputeH()) : "string" == typeof c ? (h.data("smart.remcopute", i = new b(this, c)), "undefined" == typeof d ? i[c]() : d.length > 1 ? i[c].apply(i, d) : i[c](d)) : (c = {}, h.data("smart.remcopute", i = new b(this, c)), i.recomputeH())) }) } var b = function (b, c) { var d, e, f, g; this.$element = a(b), this.options = a.extend({}, c), this.initW = parseInt(this.$element.css("width")), this.initH = parseInt(this.$element.css("min-height")), d = this.$element.position(), e = d.left, f = e + this.$element.width(), g = d.top, this.$element.attr("hisH", this.initH), this.$element.attr("origH", this.initH), this.$mainView = a("#smv_Main"), this.$area1View = a("#smv_Area1"), this.$relationEles = this.$element.siblings().filter(function () { var b = a(this), c = b.width(), d = b.position(), h = d.left, i = d.left + c, j = d.top; return j > g && !b.hasClass("smartFixed") && (h >= e && f >= h || i >= e && f >= i || e >= h && i >= e || f >= h && i >= f) }) }; b.prototype = { recomputeH: function () { var b, a = this.$element.height(); 0 !== a && (b = parseInt(this.$element.attr("hisH")), a > b && (this.recomputeHTo(a, b), this.$element.attr("hisH", a))) }, recomputeTo: function (a, b) { var c = 0; c = "undefined" != typeof b ? b : this.$element.height(), this.recomputeHTo(a, c), this.$element.height(a).attr("hisH", a) }, recomputeHTo: function (b, c) { var f, g, h, i, d = b, e = d - c; 0 !== e && (f = this.innerRecompute(this.$element, this.$relationEles, e, !0), g = this.$element.attr("pvid"), "undefined" != typeof g && "" !== g && (this.rejustClostParentH(g, this.$element, f), h = a("#smv_" + g), this.recomputeView(h, f)), i = this.$element.attr("tareaid"), "" === i ? this.rejustMainAreaH(f) : this.rejustAreaH(i, f), "function" == typeof jsmart.autoComputeCallback && jsmart.autoComputeCallback()) }, recomputeView: function (b, c) { var f, g, h, i, d = b.height(), e = d; "1" === c.dirct ? c.maxH > e && (f = this.getRelationViews(b), g = this.innerRecompute(b, f, c.expandH), b.addClass("expandFlag"), h = b.attr("pvid"), "undefined" != typeof h && "" !== h && (this.rejustClostParentH(h, b, g), i = a("#smv_" + h), this.recomputeView(i, g))) : (f = this.getRelationViews(b), g = this.innerRecompute(b, f, c.expandH), b.addClass("expandFlag"), h = b.attr("pvid"), "undefined" != typeof h && "" !== h && (this.rejustClostParentH(h, b, g), i = a("#smv_" + h), this.recomputeView(i, g))) }, innerRecompute: function (b, c, d, e) { var h, f = 0, g = b.height(); return 0 !== d && (e || b.height(g + d), c.each(function () { var g, b = a(this), c = b.height(), e = b.position().top + c + d; e > f && (f = e), g = b.position().top + d, b.css({ top: g }) })), 0 == f && (f = b.position().top + g + d), h = {}, h.dirct = d >= 0 ? "1" : "0", h.maxH = f, h.expandH = d, h }, getRelationViews: function (b) { var c = b.position(), d = c.top, e = c.left, f = c.left + b.width(); return b.siblings().filter(function () { var b = a(this), c = b.width(), g = b.position(), h = g.left, i = g.left + c, j = g.top; return j > d && !b.hasClass("smartFixed") && (h >= e && f >= h || i >= e && f >= i || e >= h && i >= e || f >= h && i >= f) }) }, rejustClostParentH: function (a, b, c) { var d = b.parent(), e = d.attr("id"); e !== "smv_" + a && d.hasClass("smAreaC") && !d.hasClass("expandFlag") ? d.addClass("expandFlag").height(d.height() + c.expandH) : d.height(d.height() + c.expandH) }, rejustAreaH: function (b, c) { var d, e, f, h; "Area1" !== b && (d = a("#smv_" + b), "1" === c.dirct ? (e = d.height(), d.height(e + c.expandH), d.hasClass("expandFlag") || d.attr("hisH", e).addClass("expandFlag")) : (h = parseInt(d.css("min-height")), d.hasClass("expandFlag") ? (f = d.height() + c.expandH, f = h > f ? h : f, d.height(f)) : (f = d.height() + c.expandH, f = h > f ? h : f, d.height(f).attr("hisH", f).addClass("expandFlag")))) }, rejustMainAreaH: function (a) { var b, c, d, e; "1" === a.dirct ? (b = this.$mainView.height(), this.$mainView.height(b + a.expandH), 1 == this.$area1View.length && (c = this.$area1View.height(), this.$area1View.height(c + a.expandH)), this.$mainView.hasClass("expandFlag") || (this.$mainView.attr("hisH", b).addClass("expandFlag"), 1 == this.$area1View.length && this.$area1View.attr("hisH", c).addClass("expandFlag"))) : (e = parseInt(this.$mainView.css("min-height")), this.$mainView.hasClass("expandFlag") ? (d = this.$mainView.height() + a.expandH, d = e > d ? e : d, this.$mainView.height(d), 1 == this.$area1View.length && (c = this.$area1View.height() + a.expandH, c = e > c ? e : c, this.$area1View.height(c))) : (d = this.$mainView.height() + a.expandH, d = e > d ? e : d, this.$mainView.height(d).attr("hisH", d).addClass("expandFlag"), 1 == this.$area1View.length && (c = this.$area1View.height() + a.expandH, this.$area1View.height(c).attr("hisH", c)))) } }, a.fn.smrecompute = c, a.fn.smrecompute.Constructor = b }(jQuery);