Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function test_sms_live() {
  2.     var e = '<div id="sms_live_tmp_item" class="sms_feed_user" title="@baev" style="margin-left: -60px;"><a href="/baev"><img src="http://moscow.sprashivai.net/10,f4804642a58d4f_2.jpg" width="100%" height="100%"></a></div>';
  3.     $("#sms_live_users").prepend(e), $("#sms_live_tmp_item").velocity({
  4.         marginLeft: "0"
  5.     }, {
  6.         duration: 200,
  7.         delay: 0,
  8.         easing: "easeInSine",
  9.         complete: function() {
  10.             $("#sms_live_tmp_item").removeAttr("id")
  11.         }
  12.     })
  13. }
  14.  
  15. function hide_lk(e) {
  16.         $("#lks_" + e).css("bottom", "25px"), $("#lks_" + e).css("opacity", "0"), $("#lks_" + e).css("visibility", "hidden")
  17.     }! function(e) {
  18.         "function" == typeof define && define.amd ? define(["jquery"], e) : e("object" == typeof exports ? require("jquery") : window.jQuery || window.Zepto)
  19.     }(function(e) {
  20.         var t, i, o, n, s, r, a, l = "Close",
  21.             c = "BeforeClose",
  22.             u = "AfterClose",
  23.             p = "BeforeAppend",
  24.             d = "MarkupParse",
  25.             _ = "Open",
  26.             h = "Change",
  27.             f = "mfp",
  28.             m = "." + f,
  29.             g = "mfp-ready",
  30.             v = "mfp-removing",
  31.             $ = "mfp-prevent-close",
  32.             y = function() {},
  33.             b = !!window.jQuery,
  34.             w = e(window),
  35.             k = function(e, i) {
  36.                 t.ev.on(f + e + m, i)
  37.             },
  38.             x = function(t, i, o, n) {
  39.                 var s = document.createElement("div");
  40.                 return s.className = "mfp-" + t, o && (s.innerHTML = o), n ? i && i.appendChild(s) : (s = e(s), i && s.appendTo(i)), s
  41.             },
  42.             S = function(i, o) {
  43.                 t.ev.triggerHandler(f + i, o), t.st.callbacks && (i = i.charAt(0).toLowerCase() + i.slice(1), t.st.callbacks[i] && t.st.callbacks[i].apply(t, e.isArray(o) ? o : [o]))
  44.             },
  45.             C = function(i) {
  46.                 return i === a && t.currTemplate.closeBtn || (t.currTemplate.closeBtn = e(t.st.closeMarkup.replace("%title%", t.st.tClose)), a = i), t.currTemplate.closeBtn
  47.             },
  48.             T = function() {
  49.                 e.magnificPopup.instance || (t = new y, t.init(), e.magnificPopup.instance = t)
  50.             },
  51.             P = function() {
  52.                 var e = document.createElement("p").style,
  53.                     t = ["ms", "O", "Moz", "Webkit"];
  54.                 if (void 0 !== e.transition) return !0;
  55.                 for (; t.length;)
  56.                     if (t.pop() + "Transition" in e) return !0;
  57.                 return !1
  58.             };
  59.         y.prototype = {
  60.             constructor: y,
  61.             init: function() {
  62.                 var i = navigator.appVersion;
  63.                 t.isIE7 = -1 !== i.indexOf("MSIE 7."), t.isIE8 = -1 !== i.indexOf("MSIE 8."), t.isLowIE = t.isIE7 || t.isIE8, t.isAndroid = /android/gi.test(i), t.isIOS = /iphone|ipad|ipod/gi.test(i), t.supportsTransition = P(), t.probablyMobile = t.isAndroid || t.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent), n = e(document), t.popupsCache = {}
  64.             },
  65.             open: function(i) {
  66.                 o || (o = e(document.body));
  67.                 var s;
  68.                 if (i.isObj === !1) {
  69.                     t.items = i.items.toArray(), t.index = 0;
  70.                     var a, l = i.items;
  71.                     for (s = 0; s < l.length; s++)
  72.                         if (a = l[s], a.parsed && (a = a.el[0]), a === i.el[0]) {
  73.                             t.index = s;
  74.                             break
  75.                         }
  76.                 } else t.items = e.isArray(i.items) ? i.items : [i.items], t.index = i.index || 0;
  77.                 if (t.isOpen) return void t.updateItemHTML();
  78.                 t.types = [], r = "", t.ev = i.mainEl && i.mainEl.length ? i.mainEl.eq(0) : n, i.key ? (t.popupsCache[i.key] || (t.popupsCache[i.key] = {}), t.currTemplate = t.popupsCache[i.key]) : t.currTemplate = {}, t.st = e.extend(!0, {}, e.magnificPopup.defaults, i), t.fixedContentPos = "auto" === t.st.fixedContentPos ? !t.probablyMobile : t.st.fixedContentPos, t.st.modal && (t.st.closeOnContentClick = !1, t.st.closeOnBgClick = !1, t.st.showCloseBtn = !1, t.st.enableEscapeKey = !1), t.bgOverlay || (t.bgOverlay = x("bg").on("click" + m, function() {
  79.                     t.close()
  80.                 }), t.wrap = x("wrap").attr("tabindex", -1).on("click" + m, function(e) {
  81.                     t._checkIfClose(e.target) && t.close()
  82.                 }), t.container = x("container", t.wrap)), t.contentContainer = x("content"), t.st.preloader && (t.preloader = x("preloader", t.container, t.st.tLoading));
  83.                 var c = e.magnificPopup.modules;
  84.                 for (s = 0; s < c.length; s++) {
  85.                     var u = c[s];
  86.                     u = u.charAt(0).toUpperCase() + u.slice(1), t["init" + u].call(t)
  87.                 }
  88.                 S("BeforeOpen"), t.st.showCloseBtn && (t.st.closeBtnInside ? (k(d, function(e, t, i, o) {
  89.                     i.close_replaceWith = C(o.type)
  90.                 }), r += " mfp-close-btn-in") : t.wrap.append(C())), t.st.alignTop && (r += " mfp-align-top"), t.wrap.css(t.fixedContentPos ? {
  91.                     overflow: t.st.overflowY,
  92.                     overflowX: "hidden",
  93.                     overflowY: t.st.overflowY
  94.                 } : {
  95.                     top: w.scrollTop(),
  96.                     position: "absolute"
  97.                 }), (t.st.fixedBgPos === !1 || "auto" === t.st.fixedBgPos && !t.fixedContentPos) && t.bgOverlay.css({
  98.                     height: n.height(),
  99.                     position: "absolute"
  100.                 }), t.st.enableEscapeKey && n.on("keyup" + m, function(e) {
  101.                     27 === e.keyCode && t.close()
  102.                 }), w.on("resize" + m, function() {
  103.                     t.updateSize()
  104.                 }), t.st.closeOnContentClick || (r += " mfp-auto-cursor"), r && t.wrap.addClass(r);
  105.                 var p = t.wH = w.height(),
  106.                     h = {};
  107.                 if (t.fixedContentPos && t._hasScrollBar(p)) {
  108.                     var f = t._getScrollbarSize();
  109.                     f && (h.marginRight = f)
  110.                 }
  111.                 t.fixedContentPos && (t.isIE7 ? e("body, html").css("overflow", "hidden") : h.overflow = "hidden");
  112.                 var v = t.st.mainClass;
  113.                 return t.isIE7 && (v += " mfp-ie7"), v && t._addClassToMFP(v), t.updateItemHTML(), S("BuildControls"), e("html").css(h), t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo || o), t._lastFocusedEl = document.activeElement, setTimeout(function() {
  114.                     t.content ? (t._addClassToMFP(g), t._setFocus()) : t.bgOverlay.addClass(g), n.on("focusin" + m, t._onFocusIn)
  115.                 }, 16), t.isOpen = !0, t.updateSize(p), S(_), i
  116.             },
  117.             close: function() {
  118.                 t.isOpen && (S(c), t.isOpen = !1, t.st.removalDelay && !t.isLowIE && t.supportsTransition ? (t._addClassToMFP(v), setTimeout(function() {
  119.                     t._close()
  120.                 }, t.st.removalDelay)) : t._close())
  121.             },
  122.             _close: function() {
  123.                 S(l);
  124.                 var i = v + " " + g + " ";
  125.                 if (t.bgOverlay.detach(), t.wrap.detach(), t.container.empty(), t.st.mainClass && (i += t.st.mainClass + " "), t._removeClassFromMFP(i), t.fixedContentPos) {
  126.                     var o = {
  127.                         marginRight: ""
  128.                     };
  129.                     t.isIE7 ? e("body, html").css("overflow", "") : o.overflow = "", e("html").css(o)
  130.                 }
  131.                 n.off("keyup" + m + " focusin" + m), t.ev.off(m), t.wrap.attr("class", "mfp-wrap").removeAttr("style"), t.bgOverlay.attr("class", "mfp-bg"), t.container.attr("class", "mfp-container"), !t.st.showCloseBtn || t.st.closeBtnInside && t.currTemplate[t.currItem.type] !== !0 || t.currTemplate.closeBtn && t.currTemplate.closeBtn.detach(), t._lastFocusedEl && e(t._lastFocusedEl).focus(), t.currItem = null, t.content = null, t.currTemplate = null, t.prevHeight = 0, S(u)
  132.             },
  133.             updateSize: function(e) {
  134.                 if (t.isIOS) {
  135.                     var i = document.documentElement.clientWidth / window.innerWidth,
  136.                         o = window.innerHeight * i;
  137.                     t.wrap.css("height", o), t.wH = o
  138.                 } else t.wH = e || w.height();
  139.                 t.fixedContentPos || t.wrap.css("height", t.wH), S("Resize")
  140.             },
  141.             updateItemHTML: function() {
  142.                 var i = t.items[t.index];
  143.                 t.contentContainer.detach(), t.content && t.content.detach(), i.parsed || (i = t.parseEl(t.index));
  144.                 var o = i.type;
  145.                 if (S("BeforeChange", [t.currItem ? t.currItem.type : "", o]), t.currItem = i, !t.currTemplate[o]) {
  146.                     var n = t.st[o] ? t.st[o].markup : !1;
  147.                     S("FirstMarkupParse", n), t.currTemplate[o] = n ? e(n) : !0
  148.                 }
  149.                 s && s !== i.type && t.container.removeClass("mfp-" + s + "-holder");
  150.                 var r = t["get" + o.charAt(0).toUpperCase() + o.slice(1)](i, t.currTemplate[o]);
  151.                 t.appendContent(r, o), i.preloaded = !0, S(h, i), s = i.type, t.container.prepend(t.contentContainer), S("AfterChange")
  152.             },
  153.             appendContent: function(e, i) {
  154.                 t.content = e, e ? t.st.showCloseBtn && t.st.closeBtnInside && t.currTemplate[i] === !0 ? t.content.find(".mfp-close").length || t.content.append(C()) : t.content = e : t.content = "", S(p), t.container.addClass("mfp-" + i + "-holder"), t.contentContainer.append(t.content)
  155.             },
  156.             parseEl: function(i) {
  157.                 var o, n = t.items[i];
  158.                 if (n.tagName ? n = {
  159.                         el: e(n)
  160.                     } : (o = n.type, n = {
  161.                         data: n,
  162.                         src: n.src
  163.                     }), n.el) {
  164.                     for (var s = t.types, r = 0; r < s.length; r++)
  165.                         if (n.el.hasClass("mfp-" + s[r])) {
  166.                             o = s[r];
  167.                             break
  168.                         }
  169.                     n.src = n.el.attr("data-mfp-src"), n.src || (n.src = n.el.attr("href"))
  170.                 }
  171.                 return n.type = o || t.st.type || "inline", n.index = i, n.parsed = !0, t.items[i] = n, S("ElementParse", n), t.items[i]
  172.             },
  173.             addGroup: function(e, i) {
  174.                 var o = function(o) {
  175.                     o.mfpEl = this, t._openClick(o, e, i)
  176.                 };
  177.                 i || (i = {});
  178.                 var n = "click.magnificPopup";
  179.                 i.mainEl = e, i.items ? (i.isObj = !0, e.off(n).on(n, o)) : (i.isObj = !1, i.delegate ? e.off(n).on(n, i.delegate, o) : (i.items = e, e.off(n).on(n, o)))
  180.             },
  181.             _openClick: function(i, o, n) {
  182.                 var s = void 0 !== n.midClick ? n.midClick : e.magnificPopup.defaults.midClick;
  183.                 if (s || 2 !== i.which && !i.ctrlKey && !i.metaKey) {
  184.                     var r = void 0 !== n.disableOn ? n.disableOn : e.magnificPopup.defaults.disableOn;
  185.                     if (r)
  186.                         if (e.isFunction(r)) {
  187.                             if (!r.call(t)) return !0
  188.                         } else if (w.width() < r) return !0;
  189.                     i.type && (i.preventDefault(), t.isOpen && i.stopPropagation()), n.el = e(i.mfpEl), n.delegate && (n.items = o.find(n.delegate)), t.open(n)
  190.                 }
  191.             },
  192.             updateStatus: function(e, o) {
  193.                 if (t.preloader) {
  194.                     i !== e && t.container.removeClass("mfp-s-" + i), o || "loading" !== e || (o = t.st.tLoading);
  195.                     var n = {
  196.                         status: e,
  197.                         text: o
  198.                     };
  199.                     S("UpdateStatus", n), e = n.status, o = n.text, t.preloader.html(o), t.preloader.find("a").on("click", function(e) {
  200.                         e.stopImmediatePropagation()
  201.                     }), t.container.addClass("mfp-s-" + e), i = e
  202.                 }
  203.             },
  204.             _checkIfClose: function(i) {
  205.                 if (!e(i).hasClass($)) {
  206.                     var o = t.st.closeOnContentClick,
  207.                         n = t.st.closeOnBgClick;
  208.                     if (o && n) return !0;
  209.                     if (!t.content || e(i).hasClass("mfp-close") || t.preloader && i === t.preloader[0]) return !0;
  210.                     if (i === t.content[0] || e.contains(t.content[0], i)) {
  211.                         if (o) return !0
  212.                     } else if (n && e.contains(document, i)) return !0;
  213.                     return !1
  214.                 }
  215.             },
  216.             _addClassToMFP: function(e) {
  217.                 t.bgOverlay.addClass(e), t.wrap.addClass(e)
  218.             },
  219.             _removeClassFromMFP: function(e) {
  220.                 this.bgOverlay.removeClass(e), t.wrap.removeClass(e)
  221.             },
  222.             _hasScrollBar: function(e) {
  223.                 return (t.isIE7 ? n.height() : document.body.scrollHeight) > (e || w.height())
  224.             },
  225.             _setFocus: function() {
  226.                 (t.st.focus ? t.content.find(t.st.focus).eq(0) : t.wrap).focus()
  227.             },
  228.             _onFocusIn: function(i) {
  229.                 return i.target === t.wrap[0] || e.contains(t.wrap[0], i.target) ? void 0 : (t._setFocus(), !1)
  230.             },
  231.             _parseMarkup: function(t, i, o) {
  232.                 var n;
  233.                 o.data && (i = e.extend(o.data, i)), S(d, [t, i, o]), e.each(i, function(e, i) {
  234.                     if (void 0 === i || i === !1) return !0;
  235.                     if (n = e.split("_"), n.length > 1) {
  236.                         var o = t.find(m + "-" + n[0]);
  237.                         if (o.length > 0) {
  238.                             var s = n[1];
  239.                             "replaceWith" === s ? o[0] !== i[0] && o.replaceWith(i) : "img" === s ? o.is("img") ? o.attr("src", i) : o.replaceWith('<img src="' + i + '" class="' + o.attr("class") + '" />') : o.attr(n[1], i)
  240.                         }
  241.                     } else t.find(m + "-" + e).html(i)
  242.                 })
  243.             },
  244.             _getScrollbarSize: function() {
  245.                 if (void 0 === t.scrollbarSize) {
  246.                     var e = document.createElement("div");
  247.                     e.style.cssText = "width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;", document.body.appendChild(e), t.scrollbarSize = e.offsetWidth - e.clientWidth, document.body.removeChild(e)
  248.                 }
  249.                 return t.scrollbarSize
  250.             }
  251.         }, e.magnificPopup = {
  252.             instance: null,
  253.             proto: y.prototype,
  254.             modules: [],
  255.             open: function(t, i) {
  256.                 return T(), t = t ? e.extend(!0, {}, t) : {}, t.isObj = !0, t.index = i || 0, this.instance.open(t)
  257.             },
  258.             close: function() {
  259.                 return e.magnificPopup.instance && e.magnificPopup.instance.close()
  260.             },
  261.             registerModule: function(t, i) {
  262.                 i.options && (e.magnificPopup.defaults[t] = i.options), e.extend(this.proto, i.proto), this.modules.push(t)
  263.             },
  264.             defaults: {
  265.                 disableOn: 0,
  266.                 key: null,
  267.                 midClick: !1,
  268.                 mainClass: "",
  269.                 preloader: !0,
  270.                 focus: "",
  271.                 closeOnContentClick: !1,
  272.                 closeOnBgClick: !0,
  273.                 closeBtnInside: !0,
  274.                 showCloseBtn: !0,
  275.                 enableEscapeKey: !0,
  276.                 modal: !1,
  277.                 alignTop: !1,
  278.                 removalDelay: 0,
  279.                 prependTo: null,
  280.                 fixedContentPos: "auto",
  281.                 fixedBgPos: "auto",
  282.                 overflowY: "auto",
  283.                 closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
  284.                 tClose: "Close (Esc)",
  285.                 tLoading: "Loading..."
  286.             }
  287.         }, e.fn.magnificPopup = function(i) {
  288.             T();
  289.             var o = e(this);
  290.             if ("string" == typeof i)
  291.                 if ("open" === i) {
  292.                     var n, s = b ? o.data("magnificPopup") : o[0].magnificPopup,
  293.                         r = parseInt(arguments[1], 10) || 0;
  294.                     s.items ? n = s.items[r] : (n = o, s.delegate && (n = n.find(s.delegate)), n = n.eq(r)), t._openClick({
  295.                         mfpEl: n
  296.                     }, o, s)
  297.                 } else t.isOpen && t[i].apply(t, Array.prototype.slice.call(arguments, 1));
  298.             else i = e.extend(!0, {}, i), b ? o.data("magnificPopup", i) : o[0].magnificPopup = i, t.addGroup(o, i);
  299.             return o
  300.         };
  301.         var A, q, O, R = "inline",
  302.             j = function() {
  303.                 O && (q.after(O.addClass(A)).detach(), O = null)
  304.             };
  305.         e.magnificPopup.registerModule(R, {
  306.             options: {
  307.                 hiddenClass: "hide",
  308.                 markup: "",
  309.                 tNotFound: "Content not found"
  310.             },
  311.             proto: {
  312.                 initInline: function() {
  313.                     t.types.push(R), k(l + "." + R, function() {
  314.                         j()
  315.                     })
  316.                 },
  317.                 getInline: function(i, o) {
  318.                     if (j(), i.src) {
  319.                         var n = t.st.inline,
  320.                             s = e(i.src);
  321.                         if (s.length) {
  322.                             var r = s[0].parentNode;
  323.                             r && r.tagName && (q || (A = n.hiddenClass, q = x(A), A = "mfp-" + A), O = s.after(q).detach().removeClass(A)), t.updateStatus("ready")
  324.                         } else t.updateStatus("error", n.tNotFound), s = e("<div>");
  325.                         return i.inlineElement = s, s
  326.                     }
  327.                     return t.updateStatus("ready"), t._parseMarkup(o, {}, i), o
  328.                 }
  329.             }
  330.         });
  331.         var I, F = "ajax",
  332.             E = function() {
  333.                 I && o.removeClass(I)
  334.             },
  335.             M = function() {
  336.                 E(), t.req && t.req.abort()
  337.             };
  338.         e.magnificPopup.registerModule(F, {
  339.             options: {
  340.                 settings: null,
  341.                 cursor: "mfp-ajax-cur",
  342.                 tError: '<a href="%url%">The content</a> could not be loaded.'
  343.             },
  344.             proto: {
  345.                 initAjax: function() {
  346.                     t.types.push(F), I = t.st.ajax.cursor, k(l + "." + F, M), k("BeforeChange." + F, M)
  347.                 },
  348.                 getAjax: function(i) {
  349.                     I && o.addClass(I), t.updateStatus("loading");
  350.                     var n = e.extend({
  351.                         url: i.src,
  352.                         success: function(o, n, s) {
  353.                             var r = {
  354.                                 data: o,
  355.                                 xhr: s
  356.                             };
  357.                             S("ParseAjax", r), t.appendContent(e(r.data), F), i.finished = !0, E(), t._setFocus(), setTimeout(function() {
  358.                                 t.wrap.addClass(g)
  359.                             }, 16), t.updateStatus("ready"), S("AjaxContentAdded")
  360.                         },
  361.                         error: function() {
  362.                             E(), i.finished = i.loadError = !0, t.updateStatus("error", t.st.ajax.tError.replace("%url%", i.src))
  363.                         }
  364.                     }, t.st.ajax.settings);
  365.                     return t.req = e.ajax(n), ""
  366.                 }
  367.             }
  368.         });
  369.         var z, N = function(i) {
  370.             if (i.data && void 0 !== i.data.title) return i.data.title;
  371.             var o = t.st.image.titleSrc;
  372.             if (o) {
  373.                 if (e.isFunction(o)) return o.call(t, i);
  374.                 if (i.el) return i.el.attr(o) || ""
  375.             }
  376.             return ""
  377.         };
  378.         e.magnificPopup.registerModule("image", {
  379.             options: {
  380.                 markup: '<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',
  381.                 cursor: "mfp-zoom-out-cur",
  382.                 titleSrc: "title",
  383.                 verticalFit: !0,
  384.                 tError: '<a href="%url%">The image</a> could not be loaded.'
  385.             },
  386.             proto: {
  387.                 initImage: function() {
  388.                     var e = t.st.image,
  389.                         i = ".image";
  390.                     t.types.push("image"), k(_ + i, function() {
  391.                         "image" === t.currItem.type && e.cursor && o.addClass(e.cursor)
  392.                     }), k(l + i, function() {
  393.                         e.cursor && o.removeClass(e.cursor), w.off("resize" + m)
  394.                     }), k("Resize" + i, t.resizeImage), t.isLowIE && k("AfterChange", t.resizeImage)
  395.                 },
  396.                 resizeImage: function() {
  397.                     var e = t.currItem;
  398.                     if (e && e.img && t.st.image.verticalFit) {
  399.                         var i = 0;
  400.                         t.isLowIE && (i = parseInt(e.img.css("padding-top"), 10) + parseInt(e.img.css("padding-bottom"), 10)), e.img.css("max-height", t.wH - i)
  401.                     }
  402.                 },
  403.                 _onImageHasSize: function(e) {
  404.                     e.img && (e.hasSize = !0, z && clearInterval(z), e.isCheckingImgSize = !1, S("ImageHasSize", e), e.imgHidden && (t.content && t.content.removeClass("mfp-loading"), e.imgHidden = !1))
  405.                 },
  406.                 findImageSize: function(e) {
  407.                     var i = 0,
  408.                         o = e.img[0],
  409.                         n = function(s) {
  410.                             z && clearInterval(z), z = setInterval(function() {
  411.                                 return o.naturalWidth > 0 ? void t._onImageHasSize(e) : (i > 200 && clearInterval(z), i++, void(3 === i ? n(10) : 40 === i ? n(50) : 100 === i && n(500)))
  412.                             }, s)
  413.                         };
  414.                     n(1)
  415.                 },
  416.                 getImage: function(i, o) {
  417.                     var n = 0,
  418.                         s = function() {
  419.                             i && (i.img[0].complete ? (i.img.off(".mfploader"), i === t.currItem && (t._onImageHasSize(i), t.updateStatus("ready")), i.hasSize = !0, i.loaded = !0, S("ImageLoadComplete")) : (n++, 200 > n ? setTimeout(s, 100) : r()))
  420.                         },
  421.                         r = function() {
  422.                             i && (i.img.off(".mfploader"), i === t.currItem && (t._onImageHasSize(i), t.updateStatus("error", a.tError.replace("%url%", i.src))), i.hasSize = !0, i.loaded = !0, i.loadError = !0)
  423.                         },
  424.                         a = t.st.image,
  425.                         l = o.find(".mfp-img");
  426.                     if (l.length) {
  427.                         var c = document.createElement("img");
  428.                         c.className = "mfp-img", i.el && i.el.find("img").length && (c.alt = i.el.find("img").attr("alt")), i.img = e(c).on("load.mfploader", s).on("error.mfploader", r), c.src = i.src, l.is("img") && (i.img = i.img.clone()), c = i.img[0], c.naturalWidth > 0 ? i.hasSize = !0 : c.width || (i.hasSize = !1)
  429.                     }
  430.                     return t._parseMarkup(o, {
  431.                         title: N(i),
  432.                         img_replaceWith: i.img
  433.                     }, i), t.resizeImage(), i.hasSize ? (z && clearInterval(z), i.loadError ? (o.addClass("mfp-loading"), t.updateStatus("error", a.tError.replace("%url%", i.src))) : (o.removeClass("mfp-loading"), t.updateStatus("ready")), o) : (t.updateStatus("loading"), i.loading = !0, i.hasSize || (i.imgHidden = !0, o.addClass("mfp-loading"), t.findImageSize(i)), o)
  434.                 }
  435.             }
  436.         });
  437.         var V, L = function() {
  438.             return void 0 === V && (V = void 0 !== document.createElement("p").style.MozTransform), V
  439.         };
  440.         e.magnificPopup.registerModule("zoom", {
  441.             options: {
  442.                 enabled: !1,
  443.                 easing: "ease-in-out",
  444.                 duration: 300,
  445.                 opener: function(e) {
  446.                     return e.is("img") ? e : e.find("img")
  447.                 }
  448.             },
  449.             proto: {
  450.                 initZoom: function() {
  451.                     var e, i = t.st.zoom,
  452.                         o = ".zoom";
  453.                     if (i.enabled && t.supportsTransition) {
  454.                         var n, s, r = i.duration,
  455.                             a = function(e) {
  456.                                 var t = e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),
  457.                                     o = "all " + i.duration / 1e3 + "s " + i.easing,
  458.                                     n = {
  459.                                         position: "fixed",
  460.                                         zIndex: 9999,
  461.                                         left: 0,
  462.                                         top: 0,
  463.                                         "-webkit-backface-visibility": "hidden"
  464.                                     },
  465.                                     s = "transition";
  466.                                 return n["-webkit-" + s] = n["-moz-" + s] = n["-o-" + s] = n[s] = o, t.css(n), t
  467.                             },
  468.                             u = function() {
  469.                                 t.content.css("visibility", "visible")
  470.                             };
  471.                         k("BuildControls" + o, function() {
  472.                             if (t._allowZoom()) {
  473.                                 if (clearTimeout(n), t.content.css("visibility", "hidden"), e = t._getItemToZoom(), !e) return void u();
  474.                                 s = a(e), s.css(t._getOffset()), t.wrap.append(s), n = setTimeout(function() {
  475.                                     s.css(t._getOffset(!0)), n = setTimeout(function() {
  476.                                         u(), setTimeout(function() {
  477.                                             s.remove(), e = s = null, S("ZoomAnimationEnded")
  478.                                         }, 16)
  479.                                     }, r)
  480.                                 }, 16)
  481.                             }
  482.                         }), k(c + o, function() {
  483.                             if (t._allowZoom()) {
  484.                                 if (clearTimeout(n), t.st.removalDelay = r, !e) {
  485.                                     if (e = t._getItemToZoom(), !e) return;
  486.                                     s = a(e)
  487.                                 }
  488.                                 s.css(t._getOffset(!0)), t.wrap.append(s), t.content.css("visibility", "hidden"), setTimeout(function() {
  489.                                     s.css(t._getOffset())
  490.                                 }, 16)
  491.                             }
  492.                         }), k(l + o, function() {
  493.                             t._allowZoom() && (u(), s && s.remove(), e = null)
  494.                         })
  495.                     }
  496.                 },
  497.                 _allowZoom: function() {
  498.                     return "image" === t.currItem.type
  499.                 },
  500.                 _getItemToZoom: function() {
  501.                     return t.currItem.hasSize ? t.currItem.img : !1
  502.                 },
  503.                 _getOffset: function(i) {
  504.                     var o;
  505.                     o = i ? t.currItem.img : t.st.zoom.opener(t.currItem.el || t.currItem);
  506.                     var n = o.offset(),
  507.                         s = parseInt(o.css("padding-top"), 10),
  508.                         r = parseInt(o.css("padding-bottom"), 10);
  509.                     n.top -= e(window).scrollTop() - s;
  510.                     var a = {
  511.                         width: o.width(),
  512.                         height: (b ? o.innerHeight() : o[0].offsetHeight) - r - s
  513.                     };
  514.                     return L() ? a["-moz-transform"] = a.transform = "translate(" + n.left + "px," + n.top + "px)" : (a.left = n.left, a.top = n.top), a
  515.                 }
  516.             }
  517.         });
  518.         var H = "iframe",
  519.             D = "//about:blank",
  520.             B = function(e) {
  521.                 if (t.currTemplate[H]) {
  522.                     var i = t.currTemplate[H].find("iframe");
  523.                     i.length && (e || (i[0].src = D), t.isIE8 && i.css("display", e ? "block" : "none"))
  524.                 }
  525.             };
  526.         e.magnificPopup.registerModule(H, {
  527.             options: {
  528.                 markup: '<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',
  529.                 srcAction: "iframe_src",
  530.                 patterns: {
  531.                     youtube: {
  532.                         index: "youtube.com",
  533.                         id: "v=",
  534.                         src: "//www.youtube.com/embed/%id%?autoplay=1"
  535.                     },
  536.                     vimeo: {
  537.                         index: "vimeo.com/",
  538.                         id: "/",
  539.                         src: "//player.vimeo.com/video/%id%?autoplay=1"
  540.                     },
  541.                     gmaps: {
  542.                         index: "//maps.google.",
  543.                         src: "%id%&output=embed"
  544.                     }
  545.                 }
  546.             },
  547.             proto: {
  548.                 initIframe: function() {
  549.                     t.types.push(H), k("BeforeChange", function(e, t, i) {
  550.                         t !== i && (t === H ? B() : i === H && B(!0))
  551.                     }), k(l + "." + H, function() {
  552.                         B()
  553.                     })
  554.                 },
  555.                 getIframe: function(i, o) {
  556.                     var n = i.src,
  557.                         s = t.st.iframe;
  558.                     e.each(s.patterns, function() {
  559.                         return n.indexOf(this.index) > -1 ? (this.id && (n = "string" == typeof this.id ? n.substr(n.lastIndexOf(this.id) + this.id.length, n.length) : this.id.call(this, n)), n = this.src.replace("%id%", n), !1) : void 0
  560.                     });
  561.                     var r = {};
  562.                     return s.srcAction && (r[s.srcAction] = n), t._parseMarkup(o, r, i), t.updateStatus("ready"), o
  563.                 }
  564.             }
  565.         });
  566.         var W = function(e) {
  567.                 var i = t.items.length;
  568.                 return e > i - 1 ? e - i : 0 > e ? i + e : e
  569.             },
  570.             U = function(e, t, i) {
  571.                 return e.replace(/%curr%/gi, t + 1).replace(/%total%/gi, i)
  572.             };
  573.         e.magnificPopup.registerModule("gallery", {
  574.             options: {
  575.                 enabled: !1,
  576.                 arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
  577.                 preload: [0, 2],
  578.                 navigateByImgClick: !0,
  579.                 arrows: !0,
  580.                 tPrev: "Previous (Left arrow key)",
  581.                 tNext: "Next (Right arrow key)",
  582.                 tCounter: "%curr% of %total%"
  583.             },
  584.             proto: {
  585.                 initGallery: function() {
  586.                     var i = t.st.gallery,
  587.                         o = ".mfp-gallery",
  588.                         s = Boolean(e.fn.mfpFastClick);
  589.                     return t.direction = !0, i && i.enabled ? (r += " mfp-gallery", k(_ + o, function() {
  590.                         i.navigateByImgClick && t.wrap.on("click" + o, ".mfp-img", function() {
  591.                             return t.items.length > 1 ? (t.next(), !1) : void 0
  592.                         }), n.on("keydown" + o, function(e) {
  593.                             37 === e.keyCode ? t.prev() : 39 === e.keyCode && t.next()
  594.                         })
  595.                     }), k("UpdateStatus" + o, function(e, i) {
  596.                         i.text && (i.text = U(i.text, t.currItem.index, t.items.length))
  597.                     }), k(d + o, function(e, o, n, s) {
  598.                         var r = t.items.length;
  599.                         n.counter = r > 1 ? U(i.tCounter, s.index, r) : ""
  600.                     }), k("BuildControls" + o, function() {
  601.                         if (t.items.length > 1 && i.arrows && !t.arrowLeft) {
  602.                             var o = i.arrowMarkup,
  603.                                 n = t.arrowLeft = e(o.replace(/%title%/gi, i.tPrev).replace(/%dir%/gi, "left")).addClass($),
  604.                                 r = t.arrowRight = e(o.replace(/%title%/gi, i.tNext).replace(/%dir%/gi, "right")).addClass($),
  605.                                 a = s ? "mfpFastClick" : "click";
  606.                             n[a](function() {
  607.                                 t.prev()
  608.                             }), r[a](function() {
  609.                                 t.next()
  610.                             }), t.isIE7 && (x("b", n[0], !1, !0), x("a", n[0], !1, !0), x("b", r[0], !1, !0), x("a", r[0], !1, !0)), t.container.append(n.add(r))
  611.                         }
  612.                     }), k(h + o, function() {
  613.                         t._preloadTimeout && clearTimeout(t._preloadTimeout), t._preloadTimeout = setTimeout(function() {
  614.                             t.preloadNearbyImages(), t._preloadTimeout = null
  615.                         }, 16)
  616.                     }), void k(l + o, function() {
  617.                         n.off(o), t.wrap.off("click" + o), t.arrowLeft && s && t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(), t.arrowRight = t.arrowLeft = null
  618.                     })) : !1
  619.                 },
  620.                 next: function() {
  621.                     t.direction = !0, t.index = W(t.index + 1), t.updateItemHTML()
  622.                 },
  623.                 prev: function() {
  624.                     t.direction = !1, t.index = W(t.index - 1), t.updateItemHTML()
  625.                 },
  626.                 goTo: function(e) {
  627.                     t.direction = e >= t.index, t.index = e, t.updateItemHTML()
  628.                 },
  629.                 preloadNearbyImages: function() {
  630.                     var e, i = t.st.gallery.preload,
  631.                         o = Math.min(i[0], t.items.length),
  632.                         n = Math.min(i[1], t.items.length);
  633.                     for (e = 1; e <= (t.direction ? n : o); e++) t._preloadItem(t.index + e);
  634.                     for (e = 1; e <= (t.direction ? o : n); e++) t._preloadItem(t.index - e)
  635.                 },
  636.                 _preloadItem: function(i) {
  637.                     if (i = W(i), !t.items[i].preloaded) {
  638.                         var o = t.items[i];
  639.                         o.parsed || (o = t.parseEl(i)), S("LazyLoad", o), "image" === o.type && (o.img = e('<img class="mfp-img" />').on("load.mfploader", function() {
  640.                             o.hasSize = !0
  641.                         }).on("error.mfploader", function() {
  642.                             o.hasSize = !0, o.loadError = !0, S("LazyLoadError", o)
  643.                         }).attr("src", o.src)), o.preloaded = !0
  644.                     }
  645.                 }
  646.             }
  647.         });
  648.         var Q = "retina";
  649.         e.magnificPopup.registerModule(Q, {
  650.                 options: {
  651.                     replaceSrc: function(e) {
  652.                         return e.src.replace(/\.\w+$/, function(e) {
  653.                             return "@2x" + e
  654.                         })
  655.                     },
  656.                     ratio: 1
  657.                 },
  658.                 proto: {
  659.                     initRetina: function() {
  660.                         if (window.devicePixelRatio > 1) {
  661.                             var e = t.st.retina,
  662.                                 i = e.ratio;
  663.                             i = isNaN(i) ? i() : i, i > 1 && (k("ImageHasSize." + Q, function(e, t) {
  664.                                 t.img.css({
  665.                                     "max-width": t.img[0].naturalWidth / i,
  666.                                     width: "100%"
  667.                                 })
  668.                             }), k("ElementParse." + Q, function(t, o) {
  669.                                 o.src = e.replaceSrc(o, i)
  670.                             }))
  671.                         }
  672.                     }
  673.                 }
  674.             }),
  675.             function() {
  676.                 var t = 1e3,
  677.                     i = "ontouchstart" in window,
  678.                     o = function() {
  679.                         w.off("touchmove" + s + " touchend" + s)
  680.                     },
  681.                     n = "mfpFastClick",
  682.                     s = "." + n;
  683.                 e.fn.mfpFastClick = function(n) {
  684.                     return e(this).each(function() {
  685.                         var r, a = e(this);
  686.                         if (i) {
  687.                             var l, c, u, p, d, _;
  688.                             a.on("touchstart" + s, function(e) {
  689.                                 p = !1, _ = 1, d = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0], c = d.clientX, u = d.clientY, w.on("touchmove" + s, function(e) {
  690.                                     d = e.originalEvent ? e.originalEvent.touches : e.touches, _ = d.length, d = d[0], (Math.abs(d.clientX - c) > 10 || Math.abs(d.clientY - u) > 10) && (p = !0, o())
  691.                                 }).on("touchend" + s, function(e) {
  692.                                     o(), p || _ > 1 || (r = !0, e.preventDefault(), clearTimeout(l), l = setTimeout(function() {
  693.                                         r = !1
  694.                                     }, t), n())
  695.                                 })
  696.                             })
  697.                         }
  698.                         a.on("click" + s, function() {
  699.                             r || n()
  700.                         })
  701.                     })
  702.                 }, e.fn.destroyMfpFastClick = function() {
  703.                     e(this).off("touchstart" + s + " click" + s), i && w.off("touchmove" + s + " touchend" + s)
  704.                 }
  705.             }(), T()
  706.     }),
  707.     function(e, t, i) {
  708.         function o(t, i) {
  709.             this.bodyOverflowX, this.callbacks = {
  710.                 hide: [],
  711.                 show: []
  712.             }, this.checkInterval = null, this.Content, this.$el = e(t), this.$elProxy, this.elProxyPosition, this.enabled = !0, this.options = e.extend({}, l, i), this.mouseIsOverProxy = !1, this.namespace = "tooltipster-" + Math.round(1e5 * Math.random()), this.Status = "hidden", this.timerHide = null, this.timerShow = null, this.$tooltip, this.options.iconTheme = this.options.iconTheme.replace(".", ""), this.options.theme = this.options.theme.replace(".", ""), this._init()
  713.         }
  714.  
  715.         function n(t, i) {
  716.             var o = !0;
  717.             return e.each(t, function(e, n) {
  718.                 return "undefined" == typeof i[e] || t[e] !== i[e] ? (o = !1, !1) : void 0
  719.             }), o
  720.         }
  721.  
  722.         function s() {
  723.             return !u && c
  724.         }
  725.  
  726.         function r() {
  727.             var e = i.body || i.documentElement,
  728.                 t = e.style,
  729.                 o = "transition";
  730.             if ("string" == typeof t[o]) return !0;
  731.             v = ["Moz", "Webkit", "Khtml", "O", "ms"], o = o.charAt(0).toUpperCase() + o.substr(1);
  732.             for (var n = 0; n < v.length; n++)
  733.                 if ("string" == typeof t[v[n] + o]) return !0;
  734.             return !1
  735.         }
  736.         var a = "tooltipster",
  737.             l = {
  738.                 animation: "fade",
  739.                 arrow: !0,
  740.                 arrowColor: "",
  741.                 autoClose: !0,
  742.                 content: null,
  743.                 contentAsHTML: !1,
  744.                 contentCloning: !0,
  745.                 debug: !0,
  746.                 delay: 200,
  747.                 minWidth: 0,
  748.                 maxWidth: null,
  749.                 functionInit: function(e, t) {},
  750.                 functionBefore: function(e, t) {
  751.                     t()
  752.                 },
  753.                 functionReady: function(e, t) {},
  754.                 functionAfter: function(e) {},
  755.                 hideOnClick: !1,
  756.                 icon: "(?)",
  757.                 iconCloning: !0,
  758.                 iconDesktop: !1,
  759.                 iconTouch: !1,
  760.                 iconTheme: "tooltipster-icon",
  761.                 interactive: !1,
  762.                 interactiveTolerance: 350,
  763.                 multiple: !1,
  764.                 offsetX: 0,
  765.                 offsetY: 0,
  766.                 onlyOne: !1,
  767.                 position: "top",
  768.                 positionTracker: !1,
  769.                 positionTrackerCallback: function(e) {
  770.                     "hover" == this.option("trigger") && this.option("autoClose") && this.hide()
  771.                 },
  772.                 restoration: "current",
  773.                 speed: 350,
  774.                 timer: 0,
  775.                 theme: "tooltipster-default",
  776.                 touchDevices: !0,
  777.                 trigger: "hover",
  778.                 updateAnimation: !0
  779.             };
  780.         o.prototype = {
  781.             _init: function() {
  782.                 var t = this;
  783.                 if (i.querySelector) {
  784.                     var o = null;
  785.                     void 0 === t.$el.data("tooltipster-initialTitle") && (o = t.$el.attr("title"), void 0 === o && (o = null), t.$el.data("tooltipster-initialTitle", o)), t._content_set(null !== t.options.content ? t.options.content : o);
  786.                     var n = t.options.functionInit.call(t.$el, t.$el, t.Content);
  787.                     "undefined" != typeof n && t._content_set(n), t.$el.removeAttr("title").addClass("tooltipstered"), !c && t.options.iconDesktop || c && t.options.iconTouch ? ("string" == typeof t.options.icon ? (t.$elProxy = e('<span class="' + t.options.iconTheme + '"></span>'), t.$elProxy.text(t.options.icon)) : t.$elProxy = t.options.iconCloning ? t.options.icon.clone(!0) : t.options.icon, t.$elProxy.insertAfter(t.$el)) : t.$elProxy = t.$el, "hover" == t.options.trigger ? (t.$elProxy.on("mouseenter." + t.namespace, function() {
  788.                         (!s() || t.options.touchDevices) && (t.mouseIsOverProxy = !0, t._show())
  789.                     }).on("mouseleave." + t.namespace, function() {
  790.                         (!s() || t.options.touchDevices) && (t.mouseIsOverProxy = !1)
  791.                     }), c && t.options.touchDevices && t.$elProxy.on("touchstart." + t.namespace, function() {
  792.                         t._showNow()
  793.                     })) : "click" == t.options.trigger && t.$elProxy.on("click." + t.namespace, function() {
  794.                         (!s() || t.options.touchDevices) && t._show()
  795.                     })
  796.                 }
  797.             },
  798.             _show: function() {
  799.                 var e = this;
  800.                 "shown" != e.Status && "appearing" != e.Status && (e.options.delay ? e.timerShow = setTimeout(function() {
  801.                     ("click" == e.options.trigger || "hover" == e.options.trigger && e.mouseIsOverProxy) && e._showNow()
  802.                 }, e.options.delay) : e._showNow())
  803.             },
  804.             _showNow: function(i) {
  805.                 var o = this;
  806.                 o.options.functionBefore.call(o.$el, o.$el, function() {
  807.                     if (o.enabled && null !== o.Content) {
  808.                         i && o.callbacks.show.push(i), o.callbacks.hide = [], clearTimeout(o.timerShow), o.timerShow = null, clearTimeout(o.timerHide), o.timerHide = null, o.options.onlyOne && e(".tooltipstered").not(o.$el).each(function(t, i) {
  809.                             var o = e(i),
  810.                                 n = o.data("tooltipster-ns");
  811.                             e.each(n, function(e, t) {
  812.                                 var i = o.data(t),
  813.                                     n = i.status(),
  814.                                     s = i.option("autoClose");
  815.                                 "hidden" !== n && "disappearing" !== n && s && i.hide()
  816.                             })
  817.                         });
  818.                         var n = function() {
  819.                             o.Status = "shown", e.each(o.callbacks.show, function(e, t) {
  820.                                 t.call(o.$el)
  821.                             }), o.callbacks.show = []
  822.                         };
  823.                         if ("hidden" !== o.Status) {
  824.                             var s = 0;
  825.                             "disappearing" === o.Status ? (o.Status = "appearing", r() ? (o.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-" + o.options.animation + "-show"), o.options.speed > 0 && o.$tooltip.delay(o.options.speed), o.$tooltip.queue(n)) : o.$tooltip.stop().fadeIn(n)) : "shown" === o.Status && n()
  826.                         } else {
  827.                             o.Status = "appearing";
  828.                             var s = o.options.speed;
  829.                             o.bodyOverflowX = e("body").css("overflow-x"), e("body").css("overflow-x", "hidden");
  830.                             var a = "tooltipster-" + o.options.animation,
  831.                                 l = "-webkit-transition-duration: " + o.options.speed + "ms; -webkit-animation-duration: " + o.options.speed + "ms; -moz-transition-duration: " + o.options.speed + "ms; -moz-animation-duration: " + o.options.speed + "ms; -o-transition-duration: " + o.options.speed + "ms; -o-animation-duration: " + o.options.speed + "ms; -ms-transition-duration: " + o.options.speed + "ms; -ms-animation-duration: " + o.options.speed + "ms; transition-duration: " + o.options.speed + "ms; animation-duration: " + o.options.speed + "ms;",
  832.                                 u = o.options.minWidth ? "min-width:" + Math.round(o.options.minWidth) + "px;" : "",
  833.                                 p = o.options.maxWidth ? "max-width:" + Math.round(o.options.maxWidth) + "px;" : "",
  834.                                 d = o.options.interactive ? "pointer-events: auto;" : "";
  835.                             if (o.$tooltip = e('<div class="tooltipster-base ' + o.options.theme + '" style="' + u + " " + p + " " + d + " " + l + '"><div class="tooltipster-content"></div></div>'), r() && o.$tooltip.addClass(a), o._content_insert(), o.$tooltip.appendTo("body"), o.reposition(), o.options.functionReady.call(o.$el, o.$el, o.$tooltip), r() ? (o.$tooltip.addClass(a + "-show"), o.options.speed > 0 && o.$tooltip.delay(o.options.speed), o.$tooltip.queue(n)) : o.$tooltip.css("display", "none").fadeIn(o.options.speed, n), o._interval_set(), e(t).on("scroll." + o.namespace + " resize." + o.namespace, function() {
  836.                                     o.reposition()
  837.                                 }), o.options.autoClose)
  838.                                 if (e("body").off("." + o.namespace), "hover" == o.options.trigger) {
  839.                                     if (c && setTimeout(function() {
  840.                                             e("body").on("touchstart." + o.namespace, function() {
  841.                                                 o.hide()
  842.                                             })
  843.                                         }, 0), o.options.interactive) {
  844.                                         c && o.$tooltip.on("touchstart." + o.namespace, function(e) {
  845.                                             e.stopPropagation()
  846.                                         });
  847.                                         var _ = null;
  848.                                         o.$elProxy.add(o.$tooltip).on("mouseleave." + o.namespace + "-autoClose", function() {
  849.                                             clearTimeout(_), _ = setTimeout(function() {
  850.                                                 o.hide()
  851.                                             }, o.options.interactiveTolerance)
  852.                                         }).on("mouseenter." + o.namespace + "-autoClose", function() {
  853.                                             clearTimeout(_)
  854.                                         })
  855.                                     } else o.$elProxy.on("mouseleave." + o.namespace + "-autoClose", function() {
  856.                                         o.hide()
  857.                                     });
  858.                                     o.options.hideOnClick && o.$elProxy.on("click." + o.namespace + "-autoClose", function() {
  859.                                         o.hide()
  860.                                     })
  861.                                 } else "click" == o.options.trigger && (setTimeout(function() {
  862.                                     e("body").on("click." + o.namespace + " touchstart." + o.namespace, function() {
  863.                                         o.hide()
  864.                                     })
  865.                                 }, 0), o.options.interactive && o.$tooltip.on("click." + o.namespace + " touchstart." + o.namespace, function(e) {
  866.                                     e.stopPropagation()
  867.                                 }))
  868.                         }
  869.                         o.options.timer > 0 && (o.timerHide = setTimeout(function() {
  870.                             o.timerHide = null, o.hide()
  871.                         }, o.options.timer + s))
  872.                     }
  873.                 })
  874.             },
  875.             _interval_set: function() {
  876.                 var t = this;
  877.                 t.checkInterval = setInterval(function() {
  878.                     if (0 === e("body").find(t.$el).length || 0 === e("body").find(t.$elProxy).length || "hidden" == t.Status || 0 === e("body").find(t.$tooltip).length)("shown" == t.Status || "appearing" == t.Status) && t.hide(), t._interval_cancel();
  879.                     else if (t.options.positionTracker) {
  880.                         var i = t._repositionInfo(t.$elProxy),
  881.                             o = !1;
  882.                         n(i.dimension, t.elProxyPosition.dimension) && ("fixed" === t.$elProxy.css("position") ? n(i.position, t.elProxyPosition.position) && (o = !0) : n(i.offset, t.elProxyPosition.offset) && (o = !0)), o || (t.reposition(), t.options.positionTrackerCallback.call(t, t.$el))
  883.                     }
  884.                 }, 200)
  885.             },
  886.             _interval_cancel: function() {
  887.                 clearInterval(this.checkInterval), this.checkInterval = null
  888.             },
  889.             _content_set: function(e) {
  890.                 "object" == typeof e && null !== e && this.options.contentCloning && (e = e.clone(!0)), this.Content = e
  891.             },
  892.             _content_insert: function() {
  893.                 var e = this,
  894.                     t = this.$tooltip.find(".tooltipster-content");
  895.                 "string" != typeof e.Content || e.options.contentAsHTML ? t.empty().append(e.Content) : t.text(e.Content)
  896.             },
  897.             _update: function(e) {
  898.                 var t = this;
  899.                 t._content_set(e), null !== t.Content ? "hidden" !== t.Status && (t._content_insert(), t.reposition(), t.options.updateAnimation && (r() ? (t.$tooltip.css({
  900.                     width: "",
  901.                     "-webkit-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
  902.                     "-moz-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
  903.                     "-o-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
  904.                     "-ms-transition": "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
  905.                     transition: "all " + t.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms"
  906.                 }).addClass("tooltipster-content-changing"), setTimeout(function() {
  907.                     "hidden" != t.Status && (t.$tooltip.removeClass("tooltipster-content-changing"), setTimeout(function() {
  908.                         "hidden" !== t.Status && t.$tooltip.css({
  909.                             "-webkit-transition": t.options.speed + "ms",
  910.                             "-moz-transition": t.options.speed + "ms",
  911.                             "-o-transition": t.options.speed + "ms",
  912.                             "-ms-transition": t.options.speed + "ms",
  913.                             transition: t.options.speed + "ms"
  914.                         })
  915.                     }, t.options.speed))
  916.                 }, t.options.speed)) : t.$tooltip.fadeTo(t.options.speed, .5, function() {
  917.                     "hidden" != t.Status && t.$tooltip.fadeTo(t.options.speed, 1)
  918.                 }))) : t.hide()
  919.             },
  920.             _repositionInfo: function(e) {
  921.                 return {
  922.                     dimension: {
  923.                         height: e.outerHeight(!1),
  924.                         width: e.outerWidth(!1)
  925.                     },
  926.                     offset: e.offset(),
  927.                     position: {
  928.                         left: parseInt(e.css("left")),
  929.                         top: parseInt(e.css("top"))
  930.                     }
  931.                 }
  932.             },
  933.             hide: function(i) {
  934.                 var o = this;
  935.                 i && o.callbacks.hide.push(i), o.callbacks.show = [], clearTimeout(o.timerShow), o.timerShow = null, clearTimeout(o.timerHide), o.timerHide = null;
  936.                 var n = function() {
  937.                     e.each(o.callbacks.hide, function(e, t) {
  938.                         t.call(o.$el)
  939.                     }), o.callbacks.hide = []
  940.                 };
  941.                 if ("shown" == o.Status || "appearing" == o.Status) {
  942.                     o.Status = "disappearing";
  943.                     var s = function() {
  944.                         o.Status = "hidden", "object" == typeof o.Content && null !== o.Content && o.Content.detach(), o.$tooltip.remove(), o.$tooltip = null, e(t).off("." + o.namespace), e("body").off("." + o.namespace).css("overflow-x", o.bodyOverflowX), e("body").off("." + o.namespace), o.$elProxy.off("." + o.namespace + "-autoClose"), o.options.functionAfter.call(o.$el, o.$el), n()
  945.                     };
  946.                     r() ? (o.$tooltip.clearQueue().removeClass("tooltipster-" + o.options.animation + "-show").addClass("tooltipster-dying"), o.options.speed > 0 && o.$tooltip.delay(o.options.speed), o.$tooltip.queue(s)) : o.$tooltip.stop().fadeOut(o.options.speed, s)
  947.                 } else "hidden" == o.Status && n();
  948.                 return o
  949.             },
  950.             show: function(e) {
  951.                 return this._showNow(e), this
  952.             },
  953.             update: function(e) {
  954.                 return this.content(e)
  955.             },
  956.             content: function(e) {
  957.                 return "undefined" == typeof e ? this.Content : (this._update(e), this)
  958.             },
  959.             reposition: function() {
  960.                 function i() {
  961.                     var i = e(t).scrollLeft();
  962.                     0 > P - i && (s = P - i, P = i), P + l - i > r && (s = P - (r + i - l), P = r + i - l)
  963.                 }
  964.  
  965.                 function o(i, o) {
  966.                     a.offset.top - e(t).scrollTop() - c - O - 12 < 0 && o.indexOf("top") > -1 && (j = i), a.offset.top + a.dimension.height + c + 12 + O > e(t).scrollTop() + e(t).height() && o.indexOf("bottom") > -1 && (j = i, q = a.offset.top - c - O - 12)
  967.                 }
  968.                 var n = this;
  969.                 if (0 !== e("body").find(n.$tooltip).length) {
  970.                     n.$tooltip.css("width", ""), n.elProxyPosition = n._repositionInfo(n.$elProxy);
  971.                     var s = null,
  972.                         r = e(t).width(),
  973.                         a = n.elProxyPosition,
  974.                         l = n.$tooltip.outerWidth(!1),
  975.                         c = (n.$tooltip.innerWidth() + 1, n.$tooltip.outerHeight(!1));
  976.                     if (n.$elProxy.is("area")) {
  977.                         var u = n.$elProxy.attr("shape"),
  978.                             p = n.$elProxy.parent().attr("name"),
  979.                             d = e('img[usemap="#' + p + '"]'),
  980.                             _ = d.offset().left,
  981.                             h = d.offset().top,
  982.                             f = void 0 !== n.$elProxy.attr("coords") ? n.$elProxy.attr("coords").split(",") : void 0;
  983.                         if ("circle" == u) {
  984.                             var m = parseInt(f[0]),
  985.                                 g = parseInt(f[1]),
  986.                                 v = parseInt(f[2]);
  987.                             a.dimension.height = 2 * v, a.dimension.width = 2 * v, a.offset.top = h + g - v, a.offset.left = _ + m - v
  988.                         } else if ("rect" == u) {
  989.                             var m = parseInt(f[0]),
  990.                                 g = parseInt(f[1]),
  991.                                 $ = parseInt(f[2]),
  992.                                 y = parseInt(f[3]);
  993.                             a.dimension.height = y - g, a.dimension.width = $ - m, a.offset.top = h + g, a.offset.left = _ + m
  994.                         } else if ("poly" == u) {
  995.                             for (var b = 0, w = 0, k = 0, x = 0, S = "even", C = 0; C < f.length; C++) {
  996.                                 var T = parseInt(f[C]);
  997.                                 "even" == S ? (T > k && (k = T, 0 === C && (b = k)), b > T && (b = T), S = "odd") : (T > x && (x = T, 1 == C && (w = x)), w > T && (w = T), S = "even")
  998.                             }
  999.                             a.dimension.height = x - w, a.dimension.width = k - b, a.offset.top = h + w, a.offset.left = _ + b
  1000.                         } else a.dimension.height = d.outerHeight(!1), a.dimension.width = d.outerWidth(!1), a.offset.top = h, a.offset.left = _
  1001.                     }
  1002.                     var P = 0,
  1003.                         A = 0,
  1004.                         q = 0,
  1005.                         O = parseInt(n.options.offsetY),
  1006.                         R = parseInt(n.options.offsetX),
  1007.                         j = n.options.position;
  1008.                     if ("top" == j) {
  1009.                         var I = a.offset.left + l - (a.offset.left + a.dimension.width);
  1010.                         P = a.offset.left + R - I / 2, q = a.offset.top - c - O - 12, i(), o("bottom", "top")
  1011.                     }
  1012.                     if ("top-left" == j && (P = a.offset.left + R, q = a.offset.top - c - O - 12, i(), o("bottom-left", "top-left")), "top-right" == j && (P = a.offset.left + a.dimension.width + R - l, q = a.offset.top - c - O - 12, i(), o("bottom-right", "top-right")), "bottom" == j) {
  1013.                         var I = a.offset.left + l - (a.offset.left + a.dimension.width);
  1014.                         P = a.offset.left - I / 2 + R, q = a.offset.top + a.dimension.height + O + 12, i(), o("top", "bottom")
  1015.                     }
  1016.                     if ("bottom-left" == j && (P = a.offset.left + R, q = a.offset.top + a.dimension.height + O + 12, i(), o("top-left", "bottom-left")), "bottom-right" == j && (P = a.offset.left + a.dimension.width + R - l, q = a.offset.top + a.dimension.height + O + 12, i(), o("top-right", "bottom-right")), "left" == j) {
  1017.                         P = a.offset.left - R - l - 12, A = a.offset.left + R + a.dimension.width + 12;
  1018.                         var F = a.offset.top + c - (a.offset.top + a.dimension.height);
  1019.                         if (q = a.offset.top - F / 2 - O, 0 > P && A + l > r) {
  1020.                             var E = 2 * parseFloat(n.$tooltip.css("border-width")),
  1021.                                 M = l + P - E;
  1022.                             n.$tooltip.css("width", M + "px"), c = n.$tooltip.outerHeight(!1), P = a.offset.left - R - M - 12 - E, F = a.offset.top + c - (a.offset.top + a.dimension.height), q = a.offset.top - F / 2 - O
  1023.                         } else 0 > P && (P = a.offset.left + R + a.dimension.width + 12, s = "left")
  1024.                     }
  1025.                     if ("right" == j) {
  1026.                         P = a.offset.left + R + a.dimension.width + 12, A = a.offset.left - R - l - 12;
  1027.                         var F = a.offset.top + c - (a.offset.top + a.dimension.height);
  1028.                         if (q = a.offset.top - F / 2 - O, P + l > r && 0 > A) {
  1029.                             var E = 2 * parseFloat(n.$tooltip.css("border-width")),
  1030.                                 M = r - P - E;
  1031.                             n.$tooltip.css("width", M + "px"), c = n.$tooltip.outerHeight(!1), F = a.offset.top + c - (a.offset.top + a.dimension.height), q = a.offset.top - F / 2 - O
  1032.                         } else P + l > r && (P = a.offset.left - R - l - 12, s = "right")
  1033.                     }
  1034.                     if (n.options.arrow) {
  1035.                         var z = "tooltipster-arrow-" + j;
  1036.                         if (n.options.arrowColor.length < 1) var N = n.$tooltip.css("background-color");
  1037.                         else var N = n.options.arrowColor;
  1038.                         if (s ? "left" == s ? (z = "tooltipster-arrow-right", s = "") : "right" == s ? (z = "tooltipster-arrow-left", s = "") : s = "left:" + Math.round(s) + "px;" : s = "", "top" == j || "top-left" == j || "top-right" == j) var V = parseFloat(n.$tooltip.css("border-bottom-width")),
  1039.                             L = n.$tooltip.css("border-bottom-color");
  1040.                         else if ("bottom" == j || "bottom-left" == j || "bottom-right" == j) var V = parseFloat(n.$tooltip.css("border-top-width")),
  1041.                             L = n.$tooltip.css("border-top-color");
  1042.                         else if ("left" == j) var V = parseFloat(n.$tooltip.css("border-right-width")),
  1043.                             L = n.$tooltip.css("border-right-color");
  1044.                         else if ("right" == j) var V = parseFloat(n.$tooltip.css("border-left-width")),
  1045.                             L = n.$tooltip.css("border-left-color");
  1046.                         else var V = parseFloat(n.$tooltip.css("border-bottom-width")),
  1047.                             L = n.$tooltip.css("border-bottom-color");
  1048.                         V > 1 && V++;
  1049.                         var H = "";
  1050.                         if (0 !== V) {
  1051.                             var D = "",
  1052.                                 B = "border-color: " + L + ";"; - 1 !== z.indexOf("bottom") ? D = "margin-top: -" + Math.round(V) + "px;" : -1 !== z.indexOf("top") ? D = "margin-bottom: -" + Math.round(V) + "px;" : -1 !== z.indexOf("left") ? D = "margin-right: -" + Math.round(V) + "px;" : -1 !== z.indexOf("right") && (D = "margin-left: -" + Math.round(V) + "px;"), H = '<span class="tooltipster-arrow-border" style="' + D + " " + B + ';"></span>'
  1053.                         }
  1054.                         n.$tooltip.find(".tooltipster-arrow").remove();
  1055.                         var W = '<div class="' + z + ' tooltipster-arrow" style="' + s + '">' + H + '<span style="border-color:' + N + ';"></span></div>';
  1056.                         n.$tooltip.append(W)
  1057.                     }
  1058.                     n.$tooltip.css({
  1059.                         top: Math.round(q) + "px",
  1060.                         left: Math.round(P) + "px"
  1061.                     })
  1062.                 }
  1063.                 return n
  1064.             },
  1065.             enable: function() {
  1066.                 return this.enabled = !0, this
  1067.             },
  1068.             disable: function() {
  1069.                 return this.hide(), this.enabled = !1, this
  1070.             },
  1071.             destroy: function() {
  1072.                 var t = this;
  1073.                 t.hide(), t.$el[0] !== t.$elProxy[0] && t.$elProxy.remove(), t.$el.removeData(t.namespace).off("." + t.namespace);
  1074.                 var i = t.$el.data("tooltipster-ns");
  1075.                 if (1 === i.length) {
  1076.                     var o = null;
  1077.                     "previous" === t.options.restoration ? o = t.$el.data("tooltipster-initialTitle") : "current" === t.options.restoration && (o = "string" == typeof t.Content ? t.Content : e("<div></div>").append(t.Content).html()), o && t.$el.attr("title", o), t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")
  1078.                 } else i = e.grep(i, function(e, i) {
  1079.                     return e !== t.namespace
  1080.                 }), t.$el.data("tooltipster-ns", i);
  1081.                 return t
  1082.             },
  1083.             elementIcon: function() {
  1084.                 return this.$el[0] !== this.$elProxy[0] ? this.$elProxy[0] : void 0
  1085.             },
  1086.             elementTooltip: function() {
  1087.                 return this.$tooltip ? this.$tooltip[0] : void 0
  1088.             },
  1089.             option: function(e, t) {
  1090.                 return "undefined" == typeof t ? this.options[e] : (this.options[e] = t, this)
  1091.             },
  1092.             status: function() {
  1093.                 return this.Status
  1094.             }
  1095.         }, e.fn[a] = function() {
  1096.             var t = arguments;
  1097.             if (0 === this.length) {
  1098.                 if ("string" == typeof t[0]) {
  1099.                     var i = !0;
  1100.                     switch (t[0]) {
  1101.                         case "setDefaults":
  1102.                             e.extend(l, t[1]);
  1103.                             break;
  1104.                         default:
  1105.                             i = !1
  1106.                     }
  1107.                     return i ? !0 : this
  1108.                 }
  1109.                 return this
  1110.             }
  1111.             if ("string" == typeof t[0]) {
  1112.                 var n = "#*$~&";
  1113.                 return this.each(function() {
  1114.                     var i = e(this).data("tooltipster-ns"),
  1115.                         o = i ? e(this).data(i[0]) : null;
  1116.                     if (!o) throw new Error("You called Tooltipster's \"" + t[0] + '" method on an uninitialized element');
  1117.                     if ("function" != typeof o[t[0]]) throw new Error('Unknown method .tooltipster("' + t[0] + '")');
  1118.                     var s = o[t[0]](t[1], t[2]);
  1119.                     return s !== o ? (n = s, !1) : void 0
  1120.                 }), "#*$~&" !== n ? n : this
  1121.             }
  1122.             var s = [],
  1123.                 r = t[0] && "undefined" != typeof t[0].multiple,
  1124.                 a = r && t[0].multiple || !r && l.multiple,
  1125.                 c = t[0] && "undefined" != typeof t[0].debug,
  1126.                 u = c && t[0].debug || !c && l.debug;
  1127.             return this.each(function() {
  1128.                 var i = !1,
  1129.                     n = e(this).data("tooltipster-ns"),
  1130.                     r = null;
  1131.                 n ? a ? i = !0 : u && console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.') : i = !0, i && (r = new o(this, t[0]), n || (n = []), n.push(r.namespace), e(this).data("tooltipster-ns", n), e(this).data(r.namespace, r)), s.push(r)
  1132.             }), a ? s : this
  1133.         };
  1134.         var c = !!("ontouchstart" in t),
  1135.             u = !1;
  1136.         e("body").one("mousemove", function() {
  1137.             u = !0
  1138.         })
  1139.     }(jQuery, window, document), ! function(e) {
  1140.         "use strict";
  1141.         var t = "selectric",
  1142.             i = "Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive Above Scroll Group GroupLabel",
  1143.             o = ".sl",
  1144.             n = {
  1145.                 onChange: function(t) {
  1146.                     e(t).change()
  1147.                 },
  1148.                 maxHeight: 300,
  1149.                 keySearchTimeout: 500,
  1150.                 arrowButtonMarkup: '<b class="button">&#x25be;</b>',
  1151.                 disableOnMobile: !0,
  1152.                 openOnHover: !1,
  1153.                 hoverIntentTimeout: 500,
  1154.                 expandToItemText: !1,
  1155.                 responsive: !1,
  1156.                 preventWindowScroll: !0,
  1157.                 inheritOriginalWidth: !1,
  1158.                 allowWrap: !0,
  1159.                 customClass: {
  1160.                     prefix: t,
  1161.                     camelCase: !1,
  1162.                     overwrite: !0
  1163.                 },
  1164.                 optionsItemBuilder: "{text}",
  1165.                 labelBuilder: "{text}"
  1166.             },
  1167.             s = {
  1168.                 add: function(e, t, i) {
  1169.                     this[e] || (this[e] = {}), this[e][t] = i
  1170.                 },
  1171.                 remove: function(e, t) {
  1172.                     delete this[e][t]
  1173.                 }
  1174.             },
  1175.             r = {
  1176.                 replaceDiacritics: function(e) {
  1177.                     for (var t = "40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g, "\\3$&").split(" "), i = t.length; i--;) e = e.toLowerCase().replace(RegExp("[" + t[i] + "]", "g"), "aeiouncy".charAt(i));
  1178.                     return e
  1179.                 },
  1180.                 format: function(e) {
  1181.                     var t = arguments;
  1182.                     return ("" + e).replace(/{(\d+|(\w+))}/g, function(e, i, o) {
  1183.                         return o && t[1] ? t[1][o] : t[i]
  1184.                     })
  1185.                 },
  1186.                 nextEnabledItem: function(e, t) {
  1187.                     for (; e[t = (t + 1) % e.length].disabled;);
  1188.                     return t
  1189.                 },
  1190.                 previousEnabledItem: function(e, t) {
  1191.                     for (; e[t = (t > 0 ? t : e.length) - 1].disabled;);
  1192.                     return t
  1193.                 },
  1194.                 toDash: function(e) {
  1195.                     return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()
  1196.                 },
  1197.                 triggerCallback: function(i, o) {
  1198.                     var n = o.element,
  1199.                         a = o.options["on" + i];
  1200.                     e.isFunction(a) && a.call(n, n, o), s[i] && e.each(s[i], function() {
  1201.                         this.call(n, n, o)
  1202.                     }), e(n).trigger(t + "-" + r.toDash(i), o)
  1203.                 }
  1204.             },
  1205.             a = e(document),
  1206.             l = e(window),
  1207.             c = function(s, c) {
  1208.                 function u(t) {
  1209.                     if (E.options = e.extend(!0, {}, n, E.options, t), E.classes = {}, E.element = s, r.triggerCallback("BeforeInit", E), E.options.disableOnMobile && V) return void(E.disableOnMobile = !0);
  1210.                     y(!0);
  1211.                     var o = E.options.customClass,
  1212.                         a = i.split(" "),
  1213.                         l = M.width();
  1214.                     e.each(a, function(e, t) {
  1215.                         var i = o.prefix + t;
  1216.                         E.classes[t.toLowerCase()] = o.camelCase ? i : r.toDash(i)
  1217.                     }), b = e("<input/>", {
  1218.                         "class": E.classes.input,
  1219.                         readonly: V
  1220.                     }), w = e("<div/>", {
  1221.                         "class": E.classes.items,
  1222.                         tabindex: -1
  1223.                     }), k = e("<div/>", {
  1224.                         "class": E.classes.scroll
  1225.                     }), x = e("<div/>", {
  1226.                         "class": o.prefix,
  1227.                         html: E.options.arrowButtonMarkup
  1228.                     }), S = e('<p class="label"/>'), C = M.wrap("<div>").parent().append(x.prepend(S), w, b), I = {
  1229.                         open: f,
  1230.                         close: g,
  1231.                         destroy: y,
  1232.                         refresh: d,
  1233.                         init: u
  1234.                     }, M.on(I).wrap('<div class="' + E.classes.hideselect + '">'), e.extend(E, I), F = E.options.labelBuilder, E.options.inheritOriginalWidth && l > 0 && C.width(l), p()
  1235.                 }
  1236.  
  1237.                 function p() {
  1238.                     E.items = [];
  1239.                     var t = M.children(),
  1240.                         i = "<ul>",
  1241.                         n = t.filter(":selected").index(),
  1242.                         s = 0;
  1243.                     A = P = ~n ? n : 0, (j = t.length) && (t.each(function() {
  1244.                         function t() {
  1245.                             var t = e(this),
  1246.                                 o = t.html(),
  1247.                                 n = t.prop("disabled"),
  1248.                                 a = E.options.optionsItemBuilder;
  1249.                             E.items[s] = {
  1250.                                 element: t,
  1251.                                 value: t.val(),
  1252.                                 text: o,
  1253.                                 slug: r.replaceDiacritics(o),
  1254.                                 disabled: n
  1255.                             }, i += r.format('<li data-index="{1}" class="{2}">{3}</li>', s, e.trim([s == A ? "selected" : "", s == j - 1 ? "last" : "", n ? "disabled" : ""].join(" ")), e.isFunction(a) ? a(E.items[s], t, s) : r.format(a, E.items[s])), s++
  1256.                         }
  1257.                         var o = e(this);
  1258.                         if (o.is("optgroup")) {
  1259.                             var n = o.prop("disabled"),
  1260.                                 a = o.children();
  1261.                             i += r.format('<ul class="{1}"><li class="{2}">{3}</li>', e.trim([E.classes.group, n ? "disabled" : "", o.prop("class")].join(" ")), E.classes.grouplabel, o.prop("label")), n && a.prop("disabled", !0), a.each(t), i += "</ul>"
  1262.                         } else t.call(o)
  1263.                     }), w.append(k.html(i + "</ul>")), S.html(e.isFunction(F) ? F(E.items[A]) : r.format(F, E.items[A]))), x.add(M).add(C).add(b).off(o), C.prop("class", [E.classes.wrapper, E.options.customClass.overwrite ? M.prop("class").replace(/\S+/g, E.options.customClass.prefix + "-$&") : M.prop("class"), E.options.responsive ? E.classes.responsive : ""].join(" ")), M.prop("disabled") ? (C.addClass(E.classes.disabled), b.prop("disabled", !0)) : (N = !0, C.removeClass(E.classes.disabled).on("mouseenter" + o + " mouseleave" + o, function(t) {
  1264.                         e(this).toggleClass(E.classes.hover), E.options.openOnHover && (clearTimeout(E.closeTimer), "mouseleave" == t.type ? E.closeTimer = setTimeout(g, E.options.hoverIntentTimeout) : f())
  1265.                     }), x.on("click" + o, function(e) {
  1266.                         z ? g() : f(e)
  1267.                     }), b.prop({
  1268.                         tabindex: L,
  1269.                         disabled: !1
  1270.                     }).on("keypress" + o, _).on("keydown" + o, function(e) {
  1271.                         _(e), clearTimeout(E.resetStr), E.resetStr = setTimeout(function() {
  1272.                             b.val("")
  1273.                         }, E.options.keySearchTimeout);
  1274.                         var t = e.keyCode || e.which;
  1275.                         if (t > 36 && 41 > t) {
  1276.                             if (!E.options.allowWrap && (39 > t && 0 == P || t > 38 && P + 1 == E.items.length)) return;
  1277.                             v(r[(39 > t ? "previous" : "next") + "EnabledItem"](E.items, P))
  1278.                         }
  1279.                     }).on("focusin" + o, function(e) {
  1280.                         b.one("blur", function() {
  1281.                             b.blur()
  1282.                         }), z || f(e)
  1283.                     }).on("oninput" in b[0] ? "input" : "keyup", function() {
  1284.                         b.val().length && e.each(E.items, function(e, t) {
  1285.                             return RegExp("^" + b.val(), "i").test(t.slug) && !t.disabled ? (v(e), !1) : void 0
  1286.                         })
  1287.                     }), M.prop("tabindex", !1), T = e("li", w.removeAttr("style")).on({
  1288.                         mousedown: function(e) {
  1289.                             e.preventDefault(), e.stopPropagation()
  1290.                         },
  1291.                         click: function() {
  1292.                             return v(e(this).data("index"), !0), !1
  1293.                         }
  1294.                     }).filter("[data-index]")), r.triggerCallback("Init", E)
  1295.                 }
  1296.  
  1297.                 function d() {
  1298.                     r.triggerCallback("Refresh", E), p()
  1299.                 }
  1300.  
  1301.                 function _(e) {
  1302.                     var t = e.keyCode || e.which;
  1303.                     13 == t && e.preventDefault(), /^(9|13|27)$/.test(t) && (e.stopPropagation(), v(P, !0))
  1304.                 }
  1305.  
  1306.                 function h() {
  1307.                     var e = w.closest(":visible").children(":hidden").addClass(E.classes.tempshow),
  1308.                         t = E.options.maxHeight,
  1309.                         i = w.outerWidth(),
  1310.                         o = x.outerWidth() - (i - w.width());
  1311.                     !E.options.expandToItemText || o > i ? R = o : (w.css("overflow", "scroll"), C.width(9e4), R = w.width(), w.css("overflow", ""), C.width("")), w.width(R).height() > t && w.height(t), e.removeClass(E.classes.tempshow)
  1312.                 }
  1313.  
  1314.                 function f(i) {
  1315.                     r.triggerCallback("BeforeOpen", E), i && (i.preventDefault(), i.stopPropagation()), N && (h(), e("." + E.classes.hideselect, "." + E.classes.open).children()[t]("close"), z = !0, q = w.outerHeight(), O = w.height(), C.addClass(E.classes.open), b.val("").is(":focus") || b.focus(), a.on("click" + o, g).on("scroll" + o, m), m(), E.options.preventWindowScroll && a.on("mousewheel" + o + " DOMMouseScroll" + o, "." + E.classes.scroll, function(t) {
  1316.                         var i = t.originalEvent,
  1317.                             o = e(this).scrollTop(),
  1318.                             n = 0;
  1319.                         "detail" in i && (n = -1 * i.detail), "wheelDelta" in i && (n = i.wheelDelta), "wheelDeltaY" in i && (n = i.wheelDeltaY), "deltaY" in i && (n = -1 * i.deltaY), (o == this.scrollHeight - O && 0 > n || 0 == o && n > 0) && t.preventDefault()
  1320.                     }), $(P), r.triggerCallback("Open", E))
  1321.                 }
  1322.  
  1323.                 function m() {
  1324.                     C.toggleClass(E.classes.above, C.offset().top + C.outerHeight() + q > l.scrollTop() + l.height())
  1325.                 }
  1326.  
  1327.                 function g() {
  1328.                     if (r.triggerCallback("BeforeClose", E), A != P) {
  1329.                         r.triggerCallback("BeforeChange", E);
  1330.                         var t = E.items[P].text;
  1331.                         M.prop("selectedIndex", A = P).data("value", t), S.html(e.isFunction(F) ? F(E.items[P]) : r.format(F, E.items[P])), r.triggerCallback("Change", E)
  1332.                     }
  1333.                     a.off(o), C.removeClass(E.classes.open), z = !1, r.triggerCallback("Close", E)
  1334.                 }
  1335.  
  1336.                 function v(e, t) {
  1337.                     void 0 != e && (E.items[e].disabled || (T.removeClass("selected").eq(P = e).addClass("selected"), $(e), t && g()))
  1338.                 }
  1339.  
  1340.                 function $(e) {
  1341.                     var t = T.eq(e).outerHeight(),
  1342.                         i = T[e].offsetTop,
  1343.                         o = k.scrollTop(),
  1344.                         n = i + 2 * t;
  1345.                     k.scrollTop(n > o + q ? n - q : o > i - t ? i - t : o)
  1346.                 }
  1347.  
  1348.                 function y(e) {
  1349.                     N && (w.add(x).add(b).remove(), !e && M.removeData(t).removeData("value"), M.prop("tabindex", L).off(o).off(I).unwrap().unwrap(), N = !1)
  1350.                 }
  1351.                 var b, w, k, x, S, C, T, P, A, q, O, R, j, I, F, E = this,
  1352.                     M = e(s),
  1353.                     z = !1,
  1354.                     N = !1,
  1355.                     V = /android|ip(hone|od|ad)/i.test(navigator.userAgent),
  1356.                     L = M.prop("tabindex");
  1357.                 u(c)
  1358.             };
  1359.         e.fn[t] = function(i) {
  1360.             return this.each(function() {
  1361.                 var o = e.data(this, t);
  1362.                 o && !o.disableOnMobile ? "" + i === i && o[i] ? o[i]() : o.init(i) : e.data(this, t, new c(this, i))
  1363.             })
  1364.         }, e.fn[t].hooks = s
  1365.     }(jQuery),
  1366.     function(e) {
  1367.         e.caretTo = function(e, t) {
  1368.             if (e.createTextRange) {
  1369.                 var i = e.createTextRange();
  1370.                 i.move("character", t), i.select()
  1371.             } else null != e.selectionStart && (e.focus(), e.setSelectionRange(t, t))
  1372.         }, e.caretPos = function(e) {
  1373.             if ("selection" in document) {
  1374.                 var t = e.createTextRange();
  1375.                 try {
  1376.                     t.setEndPoint("EndToStart", document.selection.createRange())
  1377.                 } catch (i) {
  1378.                     return 0
  1379.                 }
  1380.                 return t.text.length
  1381.             }
  1382.             return null != e.selectionStart ? e.selectionStart : void 0
  1383.         }, e.fn.caret = function(t, i) {
  1384.             return "undefined" == typeof t ? e.caretPos(this.get(0)) : this.queue(function(o) {
  1385.                 if (isNaN(t)) {
  1386.                     var n = e(this).val().indexOf(t);
  1387.                     i === !0 ? n += t.length : "undefined" != typeof i && (n += i), e.caretTo(this, n)
  1388.                 } else e.caretTo(this, t);
  1389.                 o()
  1390.             })
  1391.         }, e.fn.caretToStart = function() {
  1392.             return this.caret(0)
  1393.         }, e.fn.caretToEnd = function() {
  1394.             return this.queue(function(t) {
  1395.                 e.caretTo(this, e(this).val().length), t()
  1396.             })
  1397.         }
  1398.     }(jQuery);
  1399. var AutoResizer = function(e, t) {
  1400.     function i() {
  1401.         window.setTimeout(function() {
  1402.             o.checkResize()
  1403.         }, 0)
  1404.     }
  1405.     var o = this;
  1406.     this.$textArea = $(e), this.minHeight = this.$textArea.height(), this.options = $.extend({}, $.fn.autoResizer.defaults, t), this.$shadowArea = $("<div></div>").css({
  1407.         position: "absolute",
  1408.         top: -1e4,
  1409.         left: -1e4,
  1410.         fontSize: this.$textArea.css("fontSize") || "inherit",
  1411.         fontFamily: this.$textArea.css("fontFamily") || "inherit",
  1412.         lineHeight: this.$textArea.css("lineHeight") || "inherit",
  1413.         resize: "none"
  1414.     }).appendTo(document.body);
  1415.     var n = this.$textArea.width() || $(window).width();
  1416.     this.$shadowArea.width(n), this.options.resizeOnChange && this.$textArea.change(i).keyup(i).keydown(i).focus(i), this.checkResize()
  1417. };
  1418. AutoResizer.prototype = {
  1419.         constructor: AutoResizer,
  1420.         checkResize: function() {
  1421.             if (0 !== this.$textArea.height()) {
  1422.                 if (0 === this.minHeight && (this.minHeight = this.$textArea.height()), 0 !== this.$textArea.width() && Math.abs(this.$shadowArea.width() - this.$textArea.width()) > 20 && this.$shadowArea.width(this.$textArea.width()), this.$textArea.height() > 400) return void this.$textArea.height(400);
  1423.                 var e = this.$textArea.val().replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, "&amp;").replace(/\n/g, "<br/>&nbsp;");
  1424.                 "" === $.trim(e) && (e = "a"), this.$shadowArea.html(e);
  1425.                 var t = Math.max(this.$shadowArea[0].offsetHeight + 10, this.minHeight);
  1426.                 this.prevHeight && t == this.prevHeight || (this.$textArea.css("height", t), this.prevHeight = t)
  1427.             }
  1428.         }
  1429.     }, $.fn.autoResizer = function(e) {
  1430.         return this.each(function() {
  1431.             var t = $(this),
  1432.                 i = t.data("autoresizer"),
  1433.                 o = "object" == typeof e && e;
  1434.             i || t.data("autoresizer", i = new AutoResizer(this, o)), "string" == typeof e ? i[e]() : i.checkResize()
  1435.         })
  1436.     }, $.fn.autoResizer.defaults = {
  1437.         resizeOnChange: !0
  1438.     }, $.fn.autoResizer.Constructor = AutoResizer,
  1439.     function() {
  1440.         var e, t, i, o, n, s, r, a, l, c, u, p, d, _, h, f, m, g, v, $, y, b, w, k, x, S, C, T, P, A, q, O, R = [].slice;
  1441.         m = '<span class="odometer-value"></span>', _ = '<span class="odometer-ribbon"><span class="odometer-ribbon-inner">' + m + "</span></span>", o = '<span class="odometer-digit"><span class="odometer-digit-spacer">8</span><span class="odometer-digit-inner">' + _ + "</span></span>", r = '<span class="odometer-formatting-mark"></span>', i = "(,ddd).dd", a = /^\(?([^)]*)\)?(?:(.)(d+))?$/, l = 30, s = 2e3, e = 20, c = 2, n = .5, u = 1e3 / l, t = 1e3 / e, h = "transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", x = document.createElement("div").style, f = null != x.transition || null != x.webkitTransition || null != x.mozTransition || null != x.oTransition, w = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame, p = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, v = function(e) {
  1442.             var t;
  1443.             return t = document.createElement("div"), t.innerHTML = e, t.children[0]
  1444.         }, b = function(e, t) {
  1445.             return e.className = e.className.replace(new RegExp("(^| )" + t.split(" ").join("|") + "( |$)", "gi"), " ")
  1446.         }, g = function(e, t) {
  1447.             return b(e, t), e.className += " " + t
  1448.         }, S = function(e, t) {
  1449.             var i;
  1450.             return null != document.createEvent ? (i = document.createEvent("HTMLEvents"), i.initEvent(t, !0, !0), e.dispatchEvent(i)) : void 0
  1451.         }, y = function() {
  1452.             var e, t;
  1453.             return null != (e = null != (t = window.performance) && "function" == typeof t.now ? t.now() : void 0) ? e : +new Date
  1454.         }, k = function(e, t) {
  1455.             return null == t && (t = 0), t ? (e *= Math.pow(10, t), e += .5, e = Math.floor(e), e /= Math.pow(10, t)) : Math.round(e)
  1456.         }, C = function(e) {
  1457.             return 0 > e ? Math.ceil(e) : Math.floor(e)
  1458.         }, $ = function(e) {
  1459.             return e - k(e)
  1460.         }, P = !1, (T = function() {
  1461.             var e, t, i, o, n;
  1462.             if (!P && null != window.jQuery) {
  1463.                 for (P = !0, o = ["html", "text"], n = [], t = 0, i = o.length; i > t; t++) e = o[t], n.push(function(e) {
  1464.                     var t;
  1465.                     return t = window.jQuery.fn[e], window.jQuery.fn[e] = function(e) {
  1466.                         var i;
  1467.                         return null == e || null == (null != (i = this[0]) ? i.odometer : void 0) ? t.apply(this, arguments) : this[0].odometer.update(e)
  1468.                     }
  1469.                 }(e));
  1470.                 return n
  1471.             }
  1472.         })(), setTimeout(T, 0), d = function() {
  1473.             function e(t) {
  1474.                 var i, o, n, r, a, l, p, d, _, h, f = this;
  1475.                 if (this.options = t, this.el = this.options.el, null != this.el.odometer) return this.el.odometer;
  1476.                 this.el.odometer = this, d = e.options;
  1477.                 for (o in d) r = d[o], null == this.options[o] && (this.options[o] = r);
  1478.                 null == (a = this.options).duration && (a.duration = s), this.MAX_VALUES = this.options.duration / u / c | 0, this.resetFormat(), this.value = this.cleanValue(null != (_ = this.options.value) ? _ : ""), this.renderInside(), this.render();
  1479.                 try {
  1480.                     for (h = ["innerHTML", "innerText", "textContent"], l = 0, p = h.length; p > l; l++) n = h[l], null != this.el[n] && ! function(e) {
  1481.                         return Object.defineProperty(f.el, e, {
  1482.                             get: function() {
  1483.                                 var t;
  1484.                                 return "innerHTML" === e ? f.inside.outerHTML : null != (t = f.inside.innerText) ? t : f.inside.textContent
  1485.                             },
  1486.                             set: function(e) {
  1487.                                 return f.update(e)
  1488.                             }
  1489.                         })
  1490.                     }(n)
  1491.                 } catch (m) {
  1492.                     i = m, this.watchForMutations()
  1493.                 }
  1494.             }
  1495.             return e.prototype.renderInside = function() {
  1496.                 return this.inside = document.createElement("div"), this.inside.className = "odometer-inside", this.el.innerHTML = "", this.el.appendChild(this.inside)
  1497.             }, e.prototype.watchForMutations = function() {
  1498.                 var e, t = this;
  1499.                 if (null != p) try {
  1500.                     return null == this.observer && (this.observer = new p(function() {
  1501.                         var e;
  1502.                         return e = t.el.innerText, t.renderInside(), t.render(t.value), t.update(e)
  1503.                     })), this.watchMutations = !0, this.startWatchingMutations()
  1504.                 } catch (i) {
  1505.                     e = i
  1506.                 }
  1507.             }, e.prototype.startWatchingMutations = function() {
  1508.                 return this.watchMutations ? this.observer.observe(this.el, {
  1509.                     childList: !0
  1510.                 }) : void 0
  1511.             }, e.prototype.stopWatchingMutations = function() {
  1512.                 var e;
  1513.                 return null != (e = this.observer) ? e.disconnect() : void 0
  1514.             }, e.prototype.cleanValue = function(e) {
  1515.                 var t;
  1516.                 return "string" == typeof e && (e = e.replace(null != (t = this.format.radix) ? t : ".", "<radix>"), e = e.replace(/[.,]/g, ""), e = e.replace("<radix>", "."), e = parseFloat(e, 10) || 0), k(e, this.format.precision)
  1517.             }, e.prototype.bindTransitionEnd = function() {
  1518.                 var e, t, i, o, n, s, r = this;
  1519.                 if (!this.transitionEndBound) {
  1520.                     for (this.transitionEndBound = !0, t = !1, n = h.split(" "), s = [], i = 0, o = n.length; o > i; i++) e = n[i], s.push(this.el.addEventListener(e, function() {
  1521.                         return t ? !0 : (t = !0, setTimeout(function() {
  1522.                             return r.render(), t = !1, S(r.el, "odometerdone")
  1523.                         }, 0), !0)
  1524.                     }, !1));
  1525.                     return s
  1526.                 }
  1527.             }, e.prototype.resetFormat = function() {
  1528.                 var e, t, o, n, s, r, l, c;
  1529.                 if (e = null != (l = this.options.format) ? l : i, e || (e = "d"), o = a.exec(e), !o) throw new Error("Odometer: Unparsable digit format");
  1530.                 return c = o.slice(1, 4), r = c[0], s = c[1], t = c[2], n = (null != t ? t.length : void 0) || 0, this.format = {
  1531.                     repeating: r,
  1532.                     radix: s,
  1533.                     precision: n
  1534.                 }
  1535.             }, e.prototype.render = function(e) {
  1536.                 var t, i, o, n, s, r, a, l, c, u, p, d;
  1537.                 for (null == e && (e = this.value), this.stopWatchingMutations(), this.resetFormat(), this.inside.innerHTML = "", r = this.options.theme, t = this.el.className.split(" "), s = [], l = 0, u = t.length; u > l; l++) i = t[l], i.length && ((n = /^odometer-theme-(.+)$/.exec(i)) ? r = n[1] : /^odometer(-|$)/.test(i) || s.push(i));
  1538.                 for (s.push("odometer"), f || s.push("odometer-no-transitions"), s.push(r ? "odometer-theme-" + r : "odometer-auto-theme"), this.el.className = s.join(" "), this.ribbons = {}, this.digits = [], a = !this.format.precision || !$(e) || !1, d = e.toString().split("").reverse(), c = 0, p = d.length; p > c; c++) o = d[c], "." === o && (a = !0), this.addDigit(o, a);
  1539.                 return this.startWatchingMutations()
  1540.             }, e.prototype.update = function(e) {
  1541.                 var t, i = this;
  1542.                 return e = this.cleanValue(e), (t = e - this.value) ? (b(this.el, "odometer-animating-up odometer-animating-down odometer-animating"), t > 0 ? g(this.el, "odometer-animating-up") : g(this.el, "odometer-animating-down"), this.stopWatchingMutations(), this.animate(e), this.startWatchingMutations(), setTimeout(function() {
  1543.                     return i.el.offsetHeight, g(i.el, "odometer-animating")
  1544.                 }, 0), this.value = e) : void 0
  1545.             }, e.prototype.renderDigit = function() {
  1546.                 return v(o)
  1547.             }, e.prototype.insertDigit = function(e, t) {
  1548.                 return null != t ? this.inside.insertBefore(e, t) : this.inside.children.length ? this.inside.insertBefore(e, this.inside.children[0]) : this.inside.appendChild(e)
  1549.             }, e.prototype.addSpacer = function(e, t, i) {
  1550.                 var o;
  1551.                 return o = v(r), o.innerHTML = e, i && g(o, i), this.insertDigit(o, t)
  1552.             }, e.prototype.addDigit = function(e, t) {
  1553.                 var i, o, n, s;
  1554.                 if (null == t && (t = !0), "-" === e) return this.addSpacer(e, null, "odometer-negation-mark");
  1555.                 if ("." === e) return this.addSpacer(null != (s = this.format.radix) ? s : ".", null, "odometer-radix-mark");
  1556.                 if (t)
  1557.                     for (n = !1;;) {
  1558.                         if (!this.format.repeating.length) {
  1559.                             if (n) throw new Error("Bad odometer format without digits");
  1560.                             this.resetFormat(), n = !0
  1561.                         }
  1562.                         if (i = this.format.repeating[this.format.repeating.length - 1], this.format.repeating = this.format.repeating.substring(0, this.format.repeating.length - 1), "d" === i) break;
  1563.                         this.addSpacer(i)
  1564.                     }
  1565.                 return o = this.renderDigit(), o.querySelector(".odometer-value").innerHTML = e, this.digits.push(o), this.insertDigit(o)
  1566.             }, e.prototype.animate = function(e) {
  1567.                 return f && "count" !== this.options.animation ? this.animateSlide(e) : this.animateCount(e)
  1568.             }, e.prototype.animateCount = function(e) {
  1569.                 var i, o, n, s, r, a = this;
  1570.                 return (o = +e - this.value) ? (s = n = y(), i = this.value, (r = function() {
  1571.                     var l, c, u;
  1572.                     return y() - s > a.options.duration ? (a.value = e, a.render(), void S(a.el, "odometerdone")) : (l = y() - n, l > t && (n = y(), u = l / a.options.duration, c = o * u, i += c, a.render(Math.round(i))), null != w ? w(r) : setTimeout(r, t))
  1573.                 })()) : void 0
  1574.             }, e.prototype.getDigitCount = function() {
  1575.                 var e, t, i, o, n, s;
  1576.                 for (o = 1 <= arguments.length ? R.call(arguments, 0) : [], e = n = 0, s = o.length; s > n; e = ++n) i = o[e], o[e] = Math.abs(i);
  1577.                 return t = Math.max.apply(Math, o), Math.ceil(Math.log(t + 1) / Math.log(10))
  1578.             }, e.prototype.getFractionalDigitCount = function() {
  1579.                 var e, t, i, o, n, s, r;
  1580.                 for (n = 1 <= arguments.length ? R.call(arguments, 0) : [], t = /^\-?\d*\.(\d*?)0*$/, e = s = 0, r = n.length; r > s; e = ++s) o = n[e], n[e] = o.toString(), i = t.exec(n[e]), n[e] = null == i ? 0 : i[1].length;
  1581.                 return Math.max.apply(Math, n)
  1582.             }, e.prototype.resetDigits = function() {
  1583.                 return this.digits = [], this.ribbons = [], this.inside.innerHTML = "", this.resetFormat()
  1584.             }, e.prototype.animateSlide = function(e) {
  1585.                 var t, i, o, s, r, a, l, c, u, p, d, _, h, f, m, v, $, y, b, w, k, x, S, T, P, A, q;
  1586.                 if (v = this.value, c = this.getFractionalDigitCount(v, e), c && (e *= Math.pow(10, c), v *= Math.pow(10, c)), o = e - v) {
  1587.                     for (this.bindTransitionEnd(), s = this.getDigitCount(v, e), r = [], t = 0, d = b = 0; s >= 0 ? s > b : b > s; d = s >= 0 ? ++b : --b) {
  1588.                         if ($ = C(v / Math.pow(10, s - d - 1)), l = C(e / Math.pow(10, s - d - 1)), a = l - $, Math.abs(a) > this.MAX_VALUES) {
  1589.                             for (p = [], _ = a / (this.MAX_VALUES + this.MAX_VALUES * t * n), i = $; a > 0 && l > i || 0 > a && i > l;) p.push(Math.round(i)), i += _;
  1590.                             p[p.length - 1] !== l && p.push(l), t++
  1591.                         } else p = function() {
  1592.                             q = [];
  1593.                             for (var e = $; l >= $ ? l >= e : e >= l; l >= $ ? e++ : e--) q.push(e);
  1594.                             return q
  1595.                         }.apply(this);
  1596.                         for (d = w = 0, x = p.length; x > w; d = ++w) u = p[d], p[d] = Math.abs(u % 10);
  1597.                         r.push(p)
  1598.                     }
  1599.                     for (this.resetDigits(), A = r.reverse(), d = k = 0, S = A.length; S > k; d = ++k)
  1600.                         for (p = A[d], this.digits[d] || this.addDigit(" ", d >= c), null == (y = this.ribbons)[d] && (y[d] = this.digits[d].querySelector(".odometer-ribbon-inner")), this.ribbons[d].innerHTML = "", 0 > o && (p = p.reverse()), h = P = 0, T = p.length; T > P; h = ++P) u = p[h], m = document.createElement("div"), m.className = "odometer-value", m.innerHTML = u, this.ribbons[d].appendChild(m), h === p.length - 1 && g(m, "odometer-last-value"), 0 === h && g(m, "odometer-first-value");
  1601.                     return 0 > $ && this.addDigit("-"), f = this.inside.querySelector(".odometer-radix-mark"), null != f && f.parent.removeChild(f), c ? this.addSpacer(this.format.radix, this.digits[c - 1], "odometer-radix-mark") : void 0
  1602.                 }
  1603.             }, e
  1604.         }(), d.options = null != (q = window.odometerOptions) ? q : {}, setTimeout(function() {
  1605.             var e, t, i, o, n;
  1606.             if (window.odometerOptions) {
  1607.                 o = window.odometerOptions, n = [];
  1608.                 for (e in o) t = o[e], n.push(null != (i = d.options)[e] ? (i = d.options)[e] : i[e] = t);
  1609.                 return n
  1610.             }
  1611.         }, 0), d.init = function() {
  1612.             var e, t, i, o, n, s;
  1613.             if (null != document.querySelectorAll) {
  1614.                 for (t = document.querySelectorAll(d.options.selector || ".odometer"), s = [], i = 0, o = t.length; o > i; i++) e = t[i], s.push(e.odometer = new d({
  1615.                     el: e,
  1616.                     value: null != (n = e.innerText) ? n : e.textContent
  1617.                 }));
  1618.                 return s
  1619.             }
  1620.         }, null != (null != (O = document.documentElement) ? O.doScroll : void 0) && null != document.createEventObject ? (A = document.onreadystatechange, document.onreadystatechange = function() {
  1621.             return "complete" === document.readyState && d.options.auto !== !1 && d.init(), null != A ? A.apply(this, arguments) : void 0
  1622.         }) : document.addEventListener("DOMContentLoaded", function() {
  1623.             return d.options.auto !== !1 ? d.init() : void 0
  1624.         }, !1), "function" == typeof define && define.amd ? define(["jquery"], function() {
  1625.             return d
  1626.         }) : typeof exports === !1 ? module.exports = d : window.Odometer = d
  1627.     }.call(this),
  1628.     function(e) {
  1629.         function t(e, t, n) {
  1630.             var s = e[0],
  1631.                 r = /er/.test(n) ? _indeterminate : /bl/.test(n) ? _ : p,
  1632.                 a = n == _update ? {
  1633.                     checked: s[p],
  1634.                     disabled: s[_],
  1635.                     indeterminate: "true" == e.attr(_indeterminate) || "false" == e.attr(_determinate)
  1636.                 } : s[r];
  1637.             if (/^(ch|di|in)/.test(n) && !a) i(e, r);
  1638.             else if (/^(un|en|de)/.test(n) && a) o(e, r);
  1639.             else if (n == _update)
  1640.                 for (var l in a) a[l] ? i(e, l, !0) : o(e, l, !0);
  1641.             else t && "toggle" != n || (t || e[_callback]("ifClicked"), a ? s[_type] !== u && o(e, r) : i(e, r))
  1642.         }
  1643.  
  1644.         function i(t, i, n) {
  1645.             var h = t[0],
  1646.                 f = t.parent(),
  1647.                 m = i == p,
  1648.                 g = i == _indeterminate,
  1649.                 v = i == _,
  1650.                 $ = g ? _determinate : m ? d : "enabled",
  1651.                 y = s(t, $ + r(h[_type])),
  1652.                 b = s(t, i + r(h[_type]));
  1653.             if (!0 !== h[i]) {
  1654.                 if (!n && i == p && h[_type] == u && h.name) {
  1655.                     var w = t.closest("form"),
  1656.                         k = 'input[name="' + h.name + '"]',
  1657.                         k = w.length ? w.find(k) : e(k);
  1658.                     k.each(function() {
  1659.                         this !== h && e(this).data(l) && o(e(this), i)
  1660.                     })
  1661.                 }
  1662.                 g ? (h[i] = !0, h[p] && o(t, p, "force")) : (n || (h[i] = !0), m && h[_indeterminate] && o(t, _indeterminate, !1)), a(t, m, i, n)
  1663.             }
  1664.             h[_] && s(t, _cursor, !0) && f.find("." + c).css(_cursor, "default"), f[_add](b || s(t, i) || ""), f.attr("role") && !g && f.attr("aria-" + (v ? _ : p), "true"), f[_remove](y || s(t, $) || "")
  1665.         }
  1666.  
  1667.         function o(e, t, i) {
  1668.             var o = e[0],
  1669.                 n = e.parent(),
  1670.                 l = t == p,
  1671.                 u = t == _indeterminate,
  1672.                 h = t == _,
  1673.                 f = u ? _determinate : l ? d : "enabled",
  1674.                 m = s(e, f + r(o[_type])),
  1675.                 g = s(e, t + r(o[_type]));
  1676.             !1 !== o[t] && ((u || !i || "force" == i) && (o[t] = !1), a(e, l, f, i)), !o[_] && s(e, _cursor, !0) && n.find("." + c).css(_cursor, "pointer"), n[_remove](g || s(e, t) || ""), n.attr("role") && !u && n.attr("aria-" + (h ? _ : p), "false"), n[_add](m || s(e, f) || "")
  1677.         }
  1678.  
  1679.         function n(t, i) {
  1680.             t.data(l) && (t.parent().html(t.attr("style", t.data(l).s || "")), i && t[_callback](i), t.off(".i").unwrap(), e(_label + '[for="' + t[0].id + '"]').add(t.closest(_label)).off(".i"))
  1681.         }
  1682.  
  1683.         function s(e, t, i) {
  1684.             return e.data(l) ? e.data(l).o[t + (i ? "" : "Class")] : void 0
  1685.         }
  1686.  
  1687.         function r(e) {
  1688.             return e.charAt(0).toUpperCase() + e.slice(1)
  1689.         }
  1690.  
  1691.         function a(e, t, i, o) {
  1692.             o || (t && e[_callback]("ifToggled"), e[_callback]("ifChanged")[_callback]("if" + r(i)))
  1693.         }
  1694.         var l = "iCheck",
  1695.             c = l + "-helper",
  1696.             u = "radio",
  1697.             p = "checked",
  1698.             d = "un" + p,
  1699.             _ = "disabled";
  1700.         _determinate = "determinate", _indeterminate = "in" + _determinate, _update = "update", _type = "type", _click = "click", _touch = "touchbegin.i touchend.i", _add = "addClass", _remove = "removeClass", _callback = "trigger", _label = "label", _cursor = "cursor", _mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent), e.fn[l] = function(s, r) {
  1701.             var a = 'input[type="checkbox"], input[type="' + u + '"]',
  1702.                 d = e(),
  1703.                 h = function(t) {
  1704.                     t.each(function() {
  1705.                         var t = e(this);
  1706.                         d = d.add(t.is(a) ? t : t.find(a))
  1707.                     })
  1708.                 };
  1709.             if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(s)) return s = s.toLowerCase(), h(this), d.each(function() {
  1710.                 var i = e(this);
  1711.                 "destroy" == s ? n(i, "ifDestroyed") : t(i, !0, s), e.isFunction(r) && r()
  1712.             });
  1713.             if ("object" != typeof s && s) return this;
  1714.             var f = e.extend({
  1715.                     checkedClass: p,
  1716.                     disabledClass: _,
  1717.                     indeterminateClass: _indeterminate,
  1718.                     labelHover: !0
  1719.                 }, s),
  1720.                 m = f.handle,
  1721.                 g = f.hoverClass || "hover",
  1722.                 v = f.focusClass || "focus",
  1723.                 $ = f.activeClass || "active",
  1724.                 y = !!f.labelHover,
  1725.                 b = f.labelHoverClass || "hover",
  1726.                 w = 0 | ("" + f.increaseArea).replace("%", "");
  1727.             return ("checkbox" == m || m == u) && (a = 'input[type="' + m + '"]'), -50 > w && (w = -50), h(this), d.each(function() {
  1728.                 var s = e(this);
  1729.                 n(s);
  1730.                 var r = this,
  1731.                     a = r.id,
  1732.                     d = -w + "%",
  1733.                     h = 100 + 2 * w + "%",
  1734.                     h = {
  1735.                         position: "absolute",
  1736.                         top: d,
  1737.                         left: d,
  1738.                         display: "block",
  1739.                         width: h,
  1740.                         height: h,
  1741.                         margin: 0,
  1742.                         padding: 0,
  1743.                         background: "#fff",
  1744.                         border: 0,
  1745.                         opacity: 0
  1746.                     },
  1747.                     d = _mobile ? {
  1748.                         position: "absolute",
  1749.                         visibility: "hidden"
  1750.                     } : w ? h : {
  1751.                         position: "absolute",
  1752.                         opacity: 0
  1753.                     },
  1754.                     m = "checkbox" == r[_type] ? f.checkboxClass || "icheckbox" : f.radioClass || "i" + u,
  1755.                     k = e(_label + '[for="' + a + '"]').add(s.closest(_label)),
  1756.                     x = !!f.aria,
  1757.                     S = l + "-" + Math.random().toString(36).substr(2, 6),
  1758.                     C = '<div class="' + m + '" ' + (x ? 'role="' + r[_type] + '" ' : "");
  1759.                 x && k.each(function() {
  1760.                     C += 'aria-labelledby="', this.id ? C += this.id : (this.id = S, C += S), C += '"'
  1761.                 }), C = s.wrap(C + "/>")[_callback]("ifCreated").parent().append(f.insert), h = e('<ins class="' + c + '"/>').css(h).appendTo(C), s.data(l, {
  1762.                     o: f,
  1763.                     s: s.attr("style")
  1764.                 }).css(d), f.inheritClass && C[_add](r.className || ""), f.inheritID && a && C.attr("id", l + "-" + a), "static" == C.css("position") && C.css("position", "relative"), t(s, !0, _update), k.length && k.on(_click + ".i mouseover.i mouseout.i " + _touch, function(i) {
  1765.                     var o = i[_type],
  1766.                         n = e(this);
  1767.                     if (!r[_]) {
  1768.                         if (o == _click) {
  1769.                             if (e(i.target).is("a")) return;
  1770.                             t(s, !1, !0)
  1771.                         } else y && (/ut|nd/.test(o) ? (C[_remove](g), n[_remove](b)) : (C[_add](g), n[_add](b)));
  1772.                         if (!_mobile) return !1;
  1773.                         i.stopPropagation()
  1774.                     }
  1775.                 }), s.on(_click + ".i focus.i blur.i keyup.i keydown.i keypress.i", function(e) {
  1776.                     var t = e[_type];
  1777.                     return e = e.keyCode, t == _click ? !1 : "keydown" == t && 32 == e ? (r[_type] == u && r[p] || (r[p] ? o(s, p) : i(s, p)), !1) : void("keyup" == t && r[_type] == u ? !r[p] && i(s, p) : /us|ur/.test(t) && C["blur" == t ? _remove : _add](v))
  1778.                 }), h.on(_click + " mousedown mouseup mouseover mouseout " + _touch, function(e) {
  1779.                     var i = e[_type],
  1780.                         o = /wn|up/.test(i) ? $ : g;
  1781.                     if (!r[_]) {
  1782.                         if (i == _click ? t(s, !1, !0) : (/wn|er|in/.test(i) ? C[_add](o) : C[_remove](o + " " + $), k.length && y && o == g && k[/ut|nd/.test(i) ? _remove : _add](b)), !_mobile) return !1;
  1783.                         e.stopPropagation()
  1784.                     }
  1785.                 })
  1786.             })
  1787.         }
  1788.     }(window.jQuery || window.Zepto), ! function(e) {
  1789.         function t(e) {
  1790.             var t = e.length,
  1791.                 o = i.type(e);
  1792.             return "function" === o || i.isWindow(e) ? !1 : 1 === e.nodeType && t ? !0 : "array" === o || 0 === t || "number" == typeof t && t > 0 && t - 1 in e
  1793.         }
  1794.         if (!e.jQuery) {
  1795.             var i = function(e, t) {
  1796.                 return new i.fn.init(e, t)
  1797.             };
  1798.             i.isWindow = function(e) {
  1799.                 return null != e && e == e.window
  1800.             }, i.type = function(e) {
  1801.                 return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? n[r.call(e)] || "object" : typeof e
  1802.             }, i.isArray = Array.isArray || function(e) {
  1803.                 return "array" === i.type(e)
  1804.             }, i.isPlainObject = function(e) {
  1805.                 var t;
  1806.                 if (!e || "object" !== i.type(e) || e.nodeType || i.isWindow(e)) return !1;
  1807.                 try {
  1808.                     if (e.constructor && !s.call(e, "constructor") && !s.call(e.constructor.prototype, "isPrototypeOf")) return !1
  1809.                 } catch (o) {
  1810.                     return !1
  1811.                 }
  1812.                 for (t in e);
  1813.                 return void 0 === t || s.call(e, t)
  1814.             }, i.each = function(e, i, o) {
  1815.                 var n, s = 0,
  1816.                     r = e.length,
  1817.                     a = t(e);
  1818.                 if (o) {
  1819.                     if (a)
  1820.                         for (; r > s && (n = i.apply(e[s], o), n !== !1); s++);
  1821.                     else
  1822.                         for (s in e)
  1823.                             if (n = i.apply(e[s], o), n === !1) break
  1824.                 } else if (a)
  1825.                     for (; r > s && (n = i.call(e[s], s, e[s]), n !== !1); s++);
  1826.                 else
  1827.                     for (s in e)
  1828.                         if (n = i.call(e[s], s, e[s]), n === !1) break; return e
  1829.             }, i.data = function(e, t, n) {
  1830.                 if (void 0 === n) {
  1831.                     var s = e[i.expando],
  1832.                         r = s && o[s];
  1833.                     if (void 0 === t) return r;
  1834.                     if (r && t in r) return r[t]
  1835.                 } else if (void 0 !== t) {
  1836.                     var s = e[i.expando] || (e[i.expando] = ++i.uuid);
  1837.                     return o[s] = o[s] || {}, o[s][t] = n, n
  1838.                 }
  1839.             }, i.removeData = function(e, t) {
  1840.                 var n = e[i.expando],
  1841.                     s = n && o[n];
  1842.                 s && i.each(t, function(e, t) {
  1843.                     delete s[t]
  1844.                 })
  1845.             }, i.extend = function() {
  1846.                 var e, t, o, n, s, r, a = arguments[0] || {},
  1847.                     l = 1,
  1848.                     c = arguments.length,
  1849.                     u = !1;
  1850.                 for ("boolean" == typeof a && (u = a, a = arguments[l] || {}, l++), "object" != typeof a && "function" !== i.type(a) && (a = {}), l === c && (a = this, l--); c > l; l++)
  1851.                     if (null != (s = arguments[l]))
  1852.                         for (n in s) e = a[n], o = s[n], a !== o && (u && o && (i.isPlainObject(o) || (t = i.isArray(o))) ? (t ? (t = !1,
  1853.                             r = e && i.isArray(e) ? e : []) : r = e && i.isPlainObject(e) ? e : {}, a[n] = i.extend(u, r, o)) : void 0 !== o && (a[n] = o));
  1854.                 return a
  1855.             }, i.queue = function(e, o, n) {
  1856.                 function s(e, i) {
  1857.                     var o = i || [];
  1858.                     return null != e && (t(Object(e)) ? ! function(e, t) {
  1859.                         for (var i = +t.length, o = 0, n = e.length; i > o;) e[n++] = t[o++];
  1860.                         if (i !== i)
  1861.                             for (; void 0 !== t[o];) e[n++] = t[o++];
  1862.                         return e.length = n, e
  1863.                     }(o, "string" == typeof e ? [e] : e) : [].push.call(o, e)), o
  1864.                 }
  1865.                 if (e) {
  1866.                     o = (o || "fx") + "queue";
  1867.                     var r = i.data(e, o);
  1868.                     return n ? (!r || i.isArray(n) ? r = i.data(e, o, s(n)) : r.push(n), r) : r || []
  1869.                 }
  1870.             }, i.dequeue = function(e, t) {
  1871.                 i.each(e.nodeType ? [e] : e, function(e, o) {
  1872.                     t = t || "fx";
  1873.                     var n = i.queue(o, t),
  1874.                         s = n.shift();
  1875.                     "inprogress" === s && (s = n.shift()), s && ("fx" === t && n.unshift("inprogress"), s.call(o, function() {
  1876.                         i.dequeue(o, t)
  1877.                     }))
  1878.                 })
  1879.             }, i.fn = i.prototype = {
  1880.                 init: function(e) {
  1881.                     if (e.nodeType) return this[0] = e, this;
  1882.                     throw new Error("Not a DOM node.")
  1883.                 },
  1884.                 offset: function() {
  1885.                     var t = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : {
  1886.                         top: 0,
  1887.                         left: 0
  1888.                     };
  1889.                     return {
  1890.                         top: t.top + (e.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0),
  1891.                         left: t.left + (e.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0)
  1892.                     }
  1893.                 },
  1894.                 position: function() {
  1895.                     function e() {
  1896.                         for (var e = this.offsetParent || document; e && "html" === !e.nodeType.toLowerCase && "static" === e.style.position;) e = e.offsetParent;
  1897.                         return e || document
  1898.                     }
  1899.                     var t = this[0],
  1900.                         e = e.apply(t),
  1901.                         o = this.offset(),
  1902.                         n = /^(?:body|html)$/i.test(e.nodeName) ? {
  1903.                             top: 0,
  1904.                             left: 0
  1905.                         } : i(e).offset();
  1906.                     return o.top -= parseFloat(t.style.marginTop) || 0, o.left -= parseFloat(t.style.marginLeft) || 0, e.style && (n.top += parseFloat(e.style.borderTopWidth) || 0, n.left += parseFloat(e.style.borderLeftWidth) || 0), {
  1907.                         top: o.top - n.top,
  1908.                         left: o.left - n.left
  1909.                     }
  1910.                 }
  1911.             };
  1912.             var o = {};
  1913.             i.expando = "velocity" + (new Date).getTime(), i.uuid = 0;
  1914.             for (var n = {}, s = n.hasOwnProperty, r = n.toString, a = "Boolean Number String Function Array Date RegExp Object Error".split(" "), l = 0; l < a.length; l++) n["[object " + a[l] + "]"] = a[l].toLowerCase();
  1915.             i.fn.init.prototype = i.fn, e.Velocity = {
  1916.                 Utilities: i
  1917.             }
  1918.         }
  1919.     }(window),
  1920.     function(e) {
  1921.         "object" == typeof module && "object" == typeof module.exports ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : e()
  1922.     }(function() {
  1923.         return function(e, t, i, o) {
  1924.             function n(e) {
  1925.                 for (var t = -1, i = e ? e.length : 0, o = []; ++t < i;) {
  1926.                     var n = e[t];
  1927.                     n && o.push(n)
  1928.                 }
  1929.                 return o
  1930.             }
  1931.  
  1932.             function s(e) {
  1933.                 return f.isWrapped(e) ? e = [].slice.call(e) : f.isNode(e) && (e = [e]), e
  1934.             }
  1935.  
  1936.             function r(e) {
  1937.                 var t = d.data(e, "velocity");
  1938.                 return null === t ? o : t
  1939.             }
  1940.  
  1941.             function a(e) {
  1942.                 return function(t) {
  1943.                     return Math.round(t * e) * (1 / e)
  1944.                 }
  1945.             }
  1946.  
  1947.             function l(e, i, o, n) {
  1948.                 function s(e, t) {
  1949.                     return 1 - 3 * t + 3 * e
  1950.                 }
  1951.  
  1952.                 function r(e, t) {
  1953.                     return 3 * t - 6 * e
  1954.                 }
  1955.  
  1956.                 function a(e) {
  1957.                     return 3 * e
  1958.                 }
  1959.  
  1960.                 function l(e, t, i) {
  1961.                     return ((s(t, i) * e + r(t, i)) * e + a(t)) * e
  1962.                 }
  1963.  
  1964.                 function c(e, t, i) {
  1965.                     return 3 * s(t, i) * e * e + 2 * r(t, i) * e + a(t)
  1966.                 }
  1967.  
  1968.                 function u(t, i) {
  1969.                     for (var n = 0; f > n; ++n) {
  1970.                         var s = c(i, e, o);
  1971.                         if (0 === s) return i;
  1972.                         var r = l(i, e, o) - t;
  1973.                         i -= r / s
  1974.                     }
  1975.                     return i
  1976.                 }
  1977.  
  1978.                 function p() {
  1979.                     for (var t = 0; $ > t; ++t) k[t] = l(t * y, e, o)
  1980.                 }
  1981.  
  1982.                 function d(t, i, n) {
  1983.                     var s, r, a = 0;
  1984.                     do r = i + (n - i) / 2, s = l(r, e, o) - t, s > 0 ? n = r : i = r; while (Math.abs(s) > g && ++a < v);
  1985.                     return r
  1986.                 }
  1987.  
  1988.                 function _(t) {
  1989.                     for (var i = 0, n = 1, s = $ - 1; n != s && k[n] <= t; ++n) i += y;
  1990.                     --n;
  1991.                     var r = (t - k[n]) / (k[n + 1] - k[n]),
  1992.                         a = i + r * y,
  1993.                         l = c(a, e, o);
  1994.                     return l >= m ? u(t, a) : 0 == l ? a : d(t, i, i + y)
  1995.                 }
  1996.  
  1997.                 function h() {
  1998.                     x = !0, (e != i || o != n) && p()
  1999.                 }
  2000.                 var f = 4,
  2001.                     m = .001,
  2002.                     g = 1e-7,
  2003.                     v = 10,
  2004.                     $ = 11,
  2005.                     y = 1 / ($ - 1),
  2006.                     b = "Float32Array" in t;
  2007.                 if (4 !== arguments.length) return !1;
  2008.                 for (var w = 0; 4 > w; ++w)
  2009.                     if ("number" != typeof arguments[w] || isNaN(arguments[w]) || !isFinite(arguments[w])) return !1;
  2010.                 e = Math.min(e, 1), o = Math.min(o, 1), e = Math.max(e, 0), o = Math.max(o, 0);
  2011.                 var k = b ? new Float32Array($) : new Array($),
  2012.                     x = !1,
  2013.                     S = function(t) {
  2014.                         return x || h(), e === i && o === n ? t : 0 === t ? 0 : 1 === t ? 1 : l(_(t), i, n)
  2015.                     };
  2016.                 S.getControlPoints = function() {
  2017.                     return [{
  2018.                         x: e,
  2019.                         y: i
  2020.                     }, {
  2021.                         x: o,
  2022.                         y: n
  2023.                     }]
  2024.                 };
  2025.                 var C = "generateBezier(" + [e, i, o, n] + ")";
  2026.                 return S.toString = function() {
  2027.                     return C
  2028.                 }, S
  2029.             }
  2030.  
  2031.             function c(e, t) {
  2032.                 var i = e;
  2033.                 return f.isString(e) ? $.Easings[e] || (i = !1) : i = f.isArray(e) && 1 === e.length ? a.apply(null, e) : f.isArray(e) && 2 === e.length ? y.apply(null, e.concat([t])) : f.isArray(e) && 4 === e.length ? l.apply(null, e) : !1, i === !1 && (i = $.Easings[$.defaults.easing] ? $.defaults.easing : v), i
  2034.             }
  2035.  
  2036.             function u(e) {
  2037.                 if (e) {
  2038.                     var t = (new Date).getTime(),
  2039.                         i = $.State.calls.length;
  2040.                     i > 1e4 && ($.State.calls = n($.State.calls));
  2041.                     for (var s = 0; i > s; s++)
  2042.                         if ($.State.calls[s]) {
  2043.                             var a = $.State.calls[s],
  2044.                                 l = a[0],
  2045.                                 c = a[2],
  2046.                                 _ = a[3],
  2047.                                 h = !!_,
  2048.                                 m = null;
  2049.                             _ || (_ = $.State.calls[s][3] = t - 16);
  2050.                             for (var g = Math.min((t - _) / c.duration, 1), v = 0, y = l.length; y > v; v++) {
  2051.                                 var w = l[v],
  2052.                                     x = w.element;
  2053.                                 if (r(x)) {
  2054.                                     var S = !1;
  2055.                                     if (c.display !== o && null !== c.display && "none" !== c.display) {
  2056.                                         if ("flex" === c.display) {
  2057.                                             var C = ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex"];
  2058.                                             d.each(C, function(e, t) {
  2059.                                                 b.setPropertyValue(x, "display", t)
  2060.                                             })
  2061.                                         }
  2062.                                         b.setPropertyValue(x, "display", c.display)
  2063.                                     }
  2064.                                     c.visibility !== o && "hidden" !== c.visibility && b.setPropertyValue(x, "visibility", c.visibility);
  2065.                                     for (var T in w)
  2066.                                         if ("element" !== T) {
  2067.                                             var P, A = w[T],
  2068.                                                 q = f.isString(A.easing) ? $.Easings[A.easing] : A.easing;
  2069.                                             if (1 === g) P = A.endValue;
  2070.                                             else {
  2071.                                                 var O = A.endValue - A.startValue;
  2072.                                                 if (P = A.startValue + O * q(g, c, O), !h && P === A.currentValue) continue
  2073.                                             }
  2074.                                             if (A.currentValue = P, "tween" === T) m = P;
  2075.                                             else {
  2076.                                                 if (b.Hooks.registered[T]) {
  2077.                                                     var R = b.Hooks.getRoot(T),
  2078.                                                         j = r(x).rootPropertyValueCache[R];
  2079.                                                     j && (A.rootPropertyValue = j)
  2080.                                                 }
  2081.                                                 var I = b.setPropertyValue(x, T, A.currentValue + (0 === parseFloat(P) ? "" : A.unitType), A.rootPropertyValue, A.scrollData);
  2082.                                                 b.Hooks.registered[T] && (r(x).rootPropertyValueCache[R] = b.Normalizations.registered[R] ? b.Normalizations.registered[R]("extract", null, I[1]) : I[1]), "transform" === I[0] && (S = !0)
  2083.                                             }
  2084.                                         }
  2085.                                     c.mobileHA && r(x).transformCache.translate3d === o && (r(x).transformCache.translate3d = "(0px, 0px, 0px)", S = !0), S && b.flushTransformCache(x)
  2086.                                 }
  2087.                             }
  2088.                             c.display !== o && "none" !== c.display && ($.State.calls[s][2].display = !1), c.visibility !== o && "hidden" !== c.visibility && ($.State.calls[s][2].visibility = !1), c.progress && c.progress.call(a[1], a[1], g, Math.max(0, _ + c.duration - t), _, m), 1 === g && p(s)
  2089.                         }
  2090.                 }
  2091.                 $.State.isTicking && k(u)
  2092.             }
  2093.  
  2094.             function p(e, t) {
  2095.                 if (!$.State.calls[e]) return !1;
  2096.                 for (var i = $.State.calls[e][0], n = $.State.calls[e][1], s = $.State.calls[e][2], a = $.State.calls[e][4], l = !1, c = 0, u = i.length; u > c; c++) {
  2097.                     var p = i[c].element;
  2098.                     if (t || s.loop || ("none" === s.display && b.setPropertyValue(p, "display", s.display), "hidden" === s.visibility && b.setPropertyValue(p, "visibility", s.visibility)), s.loop !== !0 && (d.queue(p)[1] === o || !/\.velocityQueueEntryFlag/i.test(d.queue(p)[1])) && r(p)) {
  2099.                         r(p).isAnimating = !1, r(p).rootPropertyValueCache = {};
  2100.                         var _ = !1;
  2101.                         d.each(b.Lists.transforms3D, function(e, t) {
  2102.                             var i = /^scale/.test(t) ? 1 : 0,
  2103.                                 n = r(p).transformCache[t];
  2104.                             r(p).transformCache[t] !== o && new RegExp("^\\(" + i + "[^.]").test(n) && (_ = !0, delete r(p).transformCache[t])
  2105.                         }), s.mobileHA && (_ = !0, delete r(p).transformCache.translate3d), _ && b.flushTransformCache(p), b.Values.removeClass(p, "velocity-animating")
  2106.                     }
  2107.                     if (!t && s.complete && !s.loop && c === u - 1) try {
  2108.                         s.complete.call(n, n)
  2109.                     } catch (h) {
  2110.                         setTimeout(function() {
  2111.                             throw h
  2112.                         }, 1)
  2113.                     }
  2114.                     a && s.loop !== !0 && a(n), r(p) && s.loop === !0 && !t && (d.each(r(p).tweensContainer, function(e, t) {
  2115.                         /^rotate/.test(e) && 360 === parseFloat(t.endValue) && (t.endValue = 0, t.startValue = 360), /^backgroundPosition/.test(e) && 100 === parseFloat(t.endValue) && "%" === t.unitType && (t.endValue = 0, t.startValue = 100)
  2116.                     }), $(p, "reverse", {
  2117.                         loop: !0,
  2118.                         delay: s.delay
  2119.                     })), s.queue !== !1 && d.dequeue(p, s.queue)
  2120.                 }
  2121.                 $.State.calls[e] = !1;
  2122.                 for (var f = 0, m = $.State.calls.length; m > f; f++)
  2123.                     if ($.State.calls[f] !== !1) {
  2124.                         l = !0;
  2125.                         break
  2126.                     }
  2127.                 l === !1 && ($.State.isTicking = !1, delete $.State.calls, $.State.calls = [])
  2128.             }
  2129.             var d, _ = function() {
  2130.                     if (i.documentMode) return i.documentMode;
  2131.                     for (var e = 7; e > 4; e--) {
  2132.                         var t = i.createElement("div");
  2133.                         if (t.innerHTML = "<!--[if IE " + e + "]><span></span><![endif]-->", t.getElementsByTagName("span").length) return t = null, e
  2134.                     }
  2135.                     return o
  2136.                 }(),
  2137.                 h = function() {
  2138.                     var e = 0;
  2139.                     return t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || function(t) {
  2140.                         var i, o = (new Date).getTime();
  2141.                         return i = Math.max(0, 16 - (o - e)), e = o + i, setTimeout(function() {
  2142.                             t(o + i)
  2143.                         }, i)
  2144.                     }
  2145.                 }(),
  2146.                 f = {
  2147.                     isString: function(e) {
  2148.                         return "string" == typeof e
  2149.                     },
  2150.                     isArray: Array.isArray || function(e) {
  2151.                         return "[object Array]" === Object.prototype.toString.call(e)
  2152.                     },
  2153.                     isFunction: function(e) {
  2154.                         return "[object Function]" === Object.prototype.toString.call(e)
  2155.                     },
  2156.                     isNode: function(e) {
  2157.                         return e && e.nodeType
  2158.                     },
  2159.                     isNodeList: function(e) {
  2160.                         return "object" == typeof e && /^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e)) && e.length !== o && (0 === e.length || "object" == typeof e[0] && e[0].nodeType > 0)
  2161.                     },
  2162.                     isWrapped: function(e) {
  2163.                         return e && (e.jquery || t.Zepto && t.Zepto.zepto.isZ(e))
  2164.                     },
  2165.                     isSVG: function(e) {
  2166.                         return t.SVGElement && e instanceof t.SVGElement
  2167.                     },
  2168.                     isEmptyObject: function(e) {
  2169.                         for (var t in e) return !1;
  2170.                         return !0
  2171.                     }
  2172.                 },
  2173.                 m = !1;
  2174.             if (e.fn && e.fn.jquery ? (d = e, m = !0) : d = t.Velocity.Utilities, 8 >= _ && !m) throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");
  2175.             if (7 >= _) return void(jQuery.fn.velocity = jQuery.fn.animate);
  2176.             var g = 400,
  2177.                 v = "swing",
  2178.                 $ = {
  2179.                     State: {
  2180.                         isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
  2181.                         isAndroid: /Android/i.test(navigator.userAgent),
  2182.                         isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent),
  2183.                         isChrome: t.chrome,
  2184.                         isFirefox: /Firefox/i.test(navigator.userAgent),
  2185.                         prefixElement: i.createElement("div"),
  2186.                         prefixMatches: {},
  2187.                         scrollAnchor: null,
  2188.                         scrollPropertyLeft: null,
  2189.                         scrollPropertyTop: null,
  2190.                         isTicking: !1,
  2191.                         calls: []
  2192.                     },
  2193.                     CSS: {},
  2194.                     Utilities: d,
  2195.                     Redirects: {},
  2196.                     Easings: {},
  2197.                     Promise: t.Promise,
  2198.                     defaults: {
  2199.                         queue: "",
  2200.                         duration: g,
  2201.                         easing: v,
  2202.                         begin: o,
  2203.                         complete: o,
  2204.                         progress: o,
  2205.                         display: o,
  2206.                         visibility: o,
  2207.                         loop: !1,
  2208.                         delay: !1,
  2209.                         mobileHA: !0,
  2210.                         _cacheValues: !0
  2211.                     },
  2212.                     init: function(e) {
  2213.                         d.data(e, "velocity", {
  2214.                             isSVG: f.isSVG(e),
  2215.                             isAnimating: !1,
  2216.                             computedStyle: null,
  2217.                             tweensContainer: null,
  2218.                             rootPropertyValueCache: {},
  2219.                             transformCache: {}
  2220.                         })
  2221.                     },
  2222.                     hook: null,
  2223.                     mock: !1,
  2224.                     version: {
  2225.                         major: 1,
  2226.                         minor: 2,
  2227.                         patch: 2
  2228.                     },
  2229.                     debug: !1
  2230.                 };
  2231.             t.pageYOffset !== o ? ($.State.scrollAnchor = t, $.State.scrollPropertyLeft = "pageXOffset", $.State.scrollPropertyTop = "pageYOffset") : ($.State.scrollAnchor = i.documentElement || i.body.parentNode || i.body, $.State.scrollPropertyLeft = "scrollLeft", $.State.scrollPropertyTop = "scrollTop");
  2232.             var y = function() {
  2233.                 function e(e) {
  2234.                     return -e.tension * e.x - e.friction * e.v
  2235.                 }
  2236.  
  2237.                 function t(t, i, o) {
  2238.                     var n = {
  2239.                         x: t.x + o.dx * i,
  2240.                         v: t.v + o.dv * i,
  2241.                         tension: t.tension,
  2242.                         friction: t.friction
  2243.                     };
  2244.                     return {
  2245.                         dx: n.v,
  2246.                         dv: e(n)
  2247.                     }
  2248.                 }
  2249.  
  2250.                 function i(i, o) {
  2251.                     var n = {
  2252.                             dx: i.v,
  2253.                             dv: e(i)
  2254.                         },
  2255.                         s = t(i, .5 * o, n),
  2256.                         r = t(i, .5 * o, s),
  2257.                         a = t(i, o, r),
  2258.                         l = 1 / 6 * (n.dx + 2 * (s.dx + r.dx) + a.dx),
  2259.                         c = 1 / 6 * (n.dv + 2 * (s.dv + r.dv) + a.dv);
  2260.                     return i.x = i.x + l * o, i.v = i.v + c * o, i
  2261.                 }
  2262.                 return function o(e, t, n) {
  2263.                     var s, r, a, l = {
  2264.                             x: -1,
  2265.                             v: 0,
  2266.                             tension: null,
  2267.                             friction: null
  2268.                         },
  2269.                         c = [0],
  2270.                         u = 0,
  2271.                         p = 1e-4,
  2272.                         d = .016;
  2273.                     for (e = parseFloat(e) || 500, t = parseFloat(t) || 20, n = n || null, l.tension = e, l.friction = t, s = null !== n, s ? (u = o(e, t), r = u / n * d) : r = d; a = i(a || l, r), c.push(1 + a.x), u += 16, Math.abs(a.x) > p && Math.abs(a.v) > p;);
  2274.                     return s ? function(e) {
  2275.                         return c[e * (c.length - 1) | 0]
  2276.                     } : u
  2277.                 }
  2278.             }();
  2279.             $.Easings = {
  2280.                 linear: function(e) {
  2281.                     return e
  2282.                 },
  2283.                 swing: function(e) {
  2284.                     return .5 - Math.cos(e * Math.PI) / 2
  2285.                 },
  2286.                 spring: function(e) {
  2287.                     return 1 - Math.cos(4.5 * e * Math.PI) * Math.exp(6 * -e)
  2288.                 }
  2289.             }, d.each([
  2290.                 ["ease", [.25, .1, .25, 1]],
  2291.                 ["ease-in", [.42, 0, 1, 1]],
  2292.                 ["ease-out", [0, 0, .58, 1]],
  2293.                 ["ease-in-out", [.42, 0, .58, 1]],
  2294.                 ["easeInSine", [.47, 0, .745, .715]],
  2295.                 ["easeOutSine", [.39, .575, .565, 1]],
  2296.                 ["easeInOutSine", [.445, .05, .55, .95]],
  2297.                 ["easeInQuad", [.55, .085, .68, .53]],
  2298.                 ["easeOutQuad", [.25, .46, .45, .94]],
  2299.                 ["easeInOutQuad", [.455, .03, .515, .955]],
  2300.                 ["easeInCubic", [.55, .055, .675, .19]],
  2301.                 ["easeOutCubic", [.215, .61, .355, 1]],
  2302.                 ["easeInOutCubic", [.645, .045, .355, 1]],
  2303.                 ["easeInQuart", [.895, .03, .685, .22]],
  2304.                 ["easeOutQuart", [.165, .84, .44, 1]],
  2305.                 ["easeInOutQuart", [.77, 0, .175, 1]],
  2306.                 ["easeInQuint", [.755, .05, .855, .06]],
  2307.                 ["easeOutQuint", [.23, 1, .32, 1]],
  2308.                 ["easeInOutQuint", [.86, 0, .07, 1]],
  2309.                 ["easeInExpo", [.95, .05, .795, .035]],
  2310.                 ["easeOutExpo", [.19, 1, .22, 1]],
  2311.                 ["easeInOutExpo", [1, 0, 0, 1]],
  2312.                 ["easeInCirc", [.6, .04, .98, .335]],
  2313.                 ["easeOutCirc", [.075, .82, .165, 1]],
  2314.                 ["easeInOutCirc", [.785, .135, .15, .86]]
  2315.             ], function(e, t) {
  2316.                 $.Easings[t[0]] = l.apply(null, t[1])
  2317.             });
  2318.             var b = $.CSS = {
  2319.                 RegEx: {
  2320.                     isHex: /^#([A-f\d]{3}){1,2}$/i,
  2321.                     valueUnwrap: /^[A-z]+\((.*)\)$/i,
  2322.                     wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,
  2323.                     valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi
  2324.                 },
  2325.                 Lists: {
  2326.                     colors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"],
  2327.                     transformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"],
  2328.                     transforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"]
  2329.                 },
  2330.                 Hooks: {
  2331.                     templates: {
  2332.                         textShadow: ["Color X Y Blur", "black 0px 0px 0px"],
  2333.                         boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"],
  2334.                         clip: ["Top Right Bottom Left", "0px 0px 0px 0px"],
  2335.                         backgroundPosition: ["X Y", "0% 0%"],
  2336.                         transformOrigin: ["X Y Z", "50% 50% 0px"],
  2337.                         perspectiveOrigin: ["X Y", "50% 50%"]
  2338.                     },
  2339.                     registered: {},
  2340.                     register: function() {
  2341.                         for (var e = 0; e < b.Lists.colors.length; e++) {
  2342.                             var t = "color" === b.Lists.colors[e] ? "0 0 0 1" : "255 255 255 1";
  2343.                             b.Hooks.templates[b.Lists.colors[e]] = ["Red Green Blue Alpha", t]
  2344.                         }
  2345.                         var i, o, n;
  2346.                         if (_)
  2347.                             for (i in b.Hooks.templates) {
  2348.                                 o = b.Hooks.templates[i], n = o[0].split(" ");
  2349.                                 var s = o[1].match(b.RegEx.valueSplit);
  2350.                                 "Color" === n[0] && (n.push(n.shift()), s.push(s.shift()), b.Hooks.templates[i] = [n.join(" "), s.join(" ")])
  2351.                             }
  2352.                         for (i in b.Hooks.templates) {
  2353.                             o = b.Hooks.templates[i], n = o[0].split(" ");
  2354.                             for (var e in n) {
  2355.                                 var r = i + n[e],
  2356.                                     a = e;
  2357.                                 b.Hooks.registered[r] = [i, a]
  2358.                             }
  2359.                         }
  2360.                     },
  2361.                     getRoot: function(e) {
  2362.                         var t = b.Hooks.registered[e];
  2363.                         return t ? t[0] : e
  2364.                     },
  2365.                     cleanRootPropertyValue: function(e, t) {
  2366.                         return b.RegEx.valueUnwrap.test(t) && (t = t.match(b.RegEx.valueUnwrap)[1]), b.Values.isCSSNullValue(t) && (t = b.Hooks.templates[e][1]), t
  2367.                     },
  2368.                     extractValue: function(e, t) {
  2369.                         var i = b.Hooks.registered[e];
  2370.                         if (i) {
  2371.                             var o = i[0],
  2372.                                 n = i[1];
  2373.                             return t = b.Hooks.cleanRootPropertyValue(o, t), t.toString().match(b.RegEx.valueSplit)[n]
  2374.                         }
  2375.                         return t
  2376.                     },
  2377.                     injectValue: function(e, t, i) {
  2378.                         var o = b.Hooks.registered[e];
  2379.                         if (o) {
  2380.                             var n, s, r = o[0],
  2381.                                 a = o[1];
  2382.                             return i = b.Hooks.cleanRootPropertyValue(r, i), n = i.toString().match(b.RegEx.valueSplit), n[a] = t, s = n.join(" ")
  2383.                         }
  2384.                         return i
  2385.                     }
  2386.                 },
  2387.                 Normalizations: {
  2388.                     registered: {
  2389.                         clip: function(e, t, i) {
  2390.                             switch (e) {
  2391.                                 case "name":
  2392.                                     return "clip";
  2393.                                 case "extract":
  2394.                                     var o;
  2395.                                     return b.RegEx.wrappedValueAlreadyExtracted.test(i) ? o = i : (o = i.toString().match(b.RegEx.valueUnwrap), o = o ? o[1].replace(/,(\s+)?/g, " ") : i), o;
  2396.                                 case "inject":
  2397.                                     return "rect(" + i + ")"
  2398.                             }
  2399.                         },
  2400.                         blur: function(e, t, i) {
  2401.                             switch (e) {
  2402.                                 case "name":
  2403.                                     return $.State.isFirefox ? "filter" : "-webkit-filter";
  2404.                                 case "extract":
  2405.                                     var o = parseFloat(i);
  2406.                                     if (!o && 0 !== o) {
  2407.                                         var n = i.toString().match(/blur\(([0-9]+[A-z]+)\)/i);
  2408.                                         o = n ? n[1] : 0
  2409.                                     }
  2410.                                     return o;
  2411.                                 case "inject":
  2412.                                     return parseFloat(i) ? "blur(" + i + ")" : "none"
  2413.                             }
  2414.                         },
  2415.                         opacity: function(e, t, i) {
  2416.                             if (8 >= _) switch (e) {
  2417.                                 case "name":
  2418.                                     return "filter";
  2419.                                 case "extract":
  2420.                                     var o = i.toString().match(/alpha\(opacity=(.*)\)/i);
  2421.                                     return i = o ? o[1] / 100 : 1;
  2422.                                 case "inject":
  2423.                                     return t.style.zoom = 1, parseFloat(i) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(i), 10) + ")"
  2424.                             } else switch (e) {
  2425.                                 case "name":
  2426.                                     return "opacity";
  2427.                                 case "extract":
  2428.                                     return i;
  2429.                                 case "inject":
  2430.                                     return i
  2431.                             }
  2432.                         }
  2433.                     },
  2434.                     register: function() {
  2435.                         9 >= _ || $.State.isGingerbread || (b.Lists.transformsBase = b.Lists.transformsBase.concat(b.Lists.transforms3D));
  2436.                         for (var e = 0; e < b.Lists.transformsBase.length; e++) ! function() {
  2437.                             var t = b.Lists.transformsBase[e];
  2438.                             b.Normalizations.registered[t] = function(e, i, n) {
  2439.                                 switch (e) {
  2440.                                     case "name":
  2441.                                         return "transform";
  2442.                                     case "extract":
  2443.                                         return r(i) === o || r(i).transformCache[t] === o ? /^scale/i.test(t) ? 1 : 0 : r(i).transformCache[t].replace(/[()]/g, "");
  2444.                                     case "inject":
  2445.                                         var s = !1;
  2446.                                         switch (t.substr(0, t.length - 1)) {
  2447.                                             case "translate":
  2448.                                                 s = !/(%|px|em|rem|vw|vh|\d)$/i.test(n);
  2449.                                                 break;
  2450.                                             case "scal":
  2451.                                             case "scale":
  2452.                                                 $.State.isAndroid && r(i).transformCache[t] === o && 1 > n && (n = 1), s = !/(\d)$/i.test(n);
  2453.                                                 break;
  2454.                                             case "skew":
  2455.                                                 s = !/(deg|\d)$/i.test(n);
  2456.                                                 break;
  2457.                                             case "rotate":
  2458.                                                 s = !/(deg|\d)$/i.test(n)
  2459.                                         }
  2460.                                         return s || (r(i).transformCache[t] = "(" + n + ")"), r(i).transformCache[t]
  2461.                                 }
  2462.                             }
  2463.                         }();
  2464.                         for (var e = 0; e < b.Lists.colors.length; e++) ! function() {
  2465.                             var t = b.Lists.colors[e];
  2466.                             b.Normalizations.registered[t] = function(e, i, n) {
  2467.                                 switch (e) {
  2468.                                     case "name":
  2469.                                         return t;
  2470.                                     case "extract":
  2471.                                         var s;
  2472.                                         if (b.RegEx.wrappedValueAlreadyExtracted.test(n)) s = n;
  2473.                                         else {
  2474.                                             var r, a = {
  2475.                                                 black: "rgb(0, 0, 0)",
  2476.                                                 blue: "rgb(0, 0, 255)",
  2477.                                                 gray: "rgb(128, 128, 128)",
  2478.                                                 green: "rgb(0, 128, 0)",
  2479.                                                 red: "rgb(255, 0, 0)",
  2480.                                                 white: "rgb(255, 255, 255)"
  2481.                                             };
  2482.                                             /^[A-z]+$/i.test(n) ? r = a[n] !== o ? a[n] : a.black : b.RegEx.isHex.test(n) ? r = "rgb(" + b.Values.hexToRgb(n).join(" ") + ")" : /^rgba?\(/i.test(n) || (r = a.black), s = (r || n).toString().match(b.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ")
  2483.                                         }
  2484.                                         return 8 >= _ || 3 !== s.split(" ").length || (s += " 1"), s;
  2485.                                     case "inject":
  2486.                                         return 8 >= _ ? 4 === n.split(" ").length && (n = n.split(/\s+/).slice(0, 3).join(" ")) : 3 === n.split(" ").length && (n += " 1"), (8 >= _ ? "rgb" : "rgba") + "(" + n.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")"
  2487.                                 }
  2488.                             }
  2489.                         }()
  2490.                     }
  2491.                 },
  2492.                 Names: {
  2493.                     camelCase: function(e) {
  2494.                         return e.replace(/-(\w)/g, function(e, t) {
  2495.                             return t.toUpperCase()
  2496.                         })
  2497.                     },
  2498.                     SVGAttribute: function(e) {
  2499.                         var t = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";
  2500.                         return (_ || $.State.isAndroid && !$.State.isChrome) && (t += "|transform"), new RegExp("^(" + t + ")$", "i").test(e)
  2501.                     },
  2502.                     prefixCheck: function(e) {
  2503.                         if ($.State.prefixMatches[e]) return [$.State.prefixMatches[e], !0];
  2504.                         for (var t = ["", "Webkit", "Moz", "ms", "O"], i = 0, o = t.length; o > i; i++) {
  2505.                             var n;
  2506.                             if (n = 0 === i ? e : t[i] + e.replace(/^\w/, function(e) {
  2507.                                     return e.toUpperCase()
  2508.                                 }), f.isString($.State.prefixElement.style[n])) return $.State.prefixMatches[e] = n, [n, !0]
  2509.                         }
  2510.                         return [e, !1]
  2511.                     }
  2512.                 },
  2513.                 Values: {
  2514.                     hexToRgb: function(e) {
  2515.                         var t, i = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
  2516.                             o = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
  2517.                         return e = e.replace(i, function(e, t, i, o) {
  2518.                             return t + t + i + i + o + o
  2519.                         }), t = o.exec(e), t ? [parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)] : [0, 0, 0]
  2520.                     },
  2521.                     isCSSNullValue: function(e) {
  2522.                         return 0 == e || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)
  2523.                     },
  2524.                     getUnitType: function(e) {
  2525.                         return /^(rotate|skew)/i.test(e) ? "deg" : /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e) ? "" : "px"
  2526.                     },
  2527.                     getDisplayType: function(e) {
  2528.                         var t = e && e.tagName.toString().toLowerCase();
  2529.                         return /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t) ? "inline" : /^(li)$/i.test(t) ? "list-item" : /^(tr)$/i.test(t) ? "table-row" : /^(table)$/i.test(t) ? "table" : /^(tbody)$/i.test(t) ? "table-row-group" : "block"
  2530.                     },
  2531.                     addClass: function(e, t) {
  2532.                         e.classList ? e.classList.add(t) : e.className += (e.className.length ? " " : "") + t
  2533.                     },
  2534.                     removeClass: function(e, t) {
  2535.                         e.classList ? e.classList.remove(t) : e.className = e.className.toString().replace(new RegExp("(^|\\s)" + t.split(" ").join("|") + "(\\s|$)", "gi"), " ")
  2536.                     }
  2537.                 },
  2538.                 getPropertyValue: function(e, i, n, s) {
  2539.                     function a(e, i) {
  2540.                         function n() {
  2541.                             c && b.setPropertyValue(e, "display", "none")
  2542.                         }
  2543.                         var l = 0;
  2544.                         if (8 >= _) l = d.css(e, i);
  2545.                         else {
  2546.                             var c = !1;
  2547.                             if (/^(width|height)$/.test(i) && 0 === b.getPropertyValue(e, "display") && (c = !0, b.setPropertyValue(e, "display", b.Values.getDisplayType(e))), !s) {
  2548.                                 if ("height" === i && "border-box" !== b.getPropertyValue(e, "boxSizing").toString().toLowerCase()) {
  2549.                                     var u = e.offsetHeight - (parseFloat(b.getPropertyValue(e, "borderTopWidth")) || 0) - (parseFloat(b.getPropertyValue(e, "borderBottomWidth")) || 0) - (parseFloat(b.getPropertyValue(e, "paddingTop")) || 0) - (parseFloat(b.getPropertyValue(e, "paddingBottom")) || 0);
  2550.                                     return n(), u
  2551.                                 }
  2552.                                 if ("width" === i && "border-box" !== b.getPropertyValue(e, "boxSizing").toString().toLowerCase()) {
  2553.                                     var p = e.offsetWidth - (parseFloat(b.getPropertyValue(e, "borderLeftWidth")) || 0) - (parseFloat(b.getPropertyValue(e, "borderRightWidth")) || 0) - (parseFloat(b.getPropertyValue(e, "paddingLeft")) || 0) - (parseFloat(b.getPropertyValue(e, "paddingRight")) || 0);
  2554.                                     return n(), p
  2555.                                 }
  2556.                             }
  2557.                             var h;
  2558.                             h = r(e) === o ? t.getComputedStyle(e, null) : r(e).computedStyle ? r(e).computedStyle : r(e).computedStyle = t.getComputedStyle(e, null), "borderColor" === i && (i = "borderTopColor"), l = 9 === _ && "filter" === i ? h.getPropertyValue(i) : h[i], ("" === l || null === l) && (l = e.style[i]), n()
  2559.                         }
  2560.                         if ("auto" === l && /^(top|right|bottom|left)$/i.test(i)) {
  2561.                             var f = a(e, "position");
  2562.                             ("fixed" === f || "absolute" === f && /top|left/i.test(i)) && (l = d(e).position()[i] + "px")
  2563.                         }
  2564.                         return l
  2565.                     }
  2566.                     var l;
  2567.                     if (b.Hooks.registered[i]) {
  2568.                         var c = i,
  2569.                             u = b.Hooks.getRoot(c);
  2570.                         n === o && (n = b.getPropertyValue(e, b.Names.prefixCheck(u)[0])), b.Normalizations.registered[u] && (n = b.Normalizations.registered[u]("extract", e, n)), l = b.Hooks.extractValue(c, n)
  2571.                     } else if (b.Normalizations.registered[i]) {
  2572.                         var p, h;
  2573.                         p = b.Normalizations.registered[i]("name", e), "transform" !== p && (h = a(e, b.Names.prefixCheck(p)[0]), b.Values.isCSSNullValue(h) && b.Hooks.templates[i] && (h = b.Hooks.templates[i][1])), l = b.Normalizations.registered[i]("extract", e, h)
  2574.                     }
  2575.                     if (!/^[\d-]/.test(l))
  2576.                         if (r(e) && r(e).isSVG && b.Names.SVGAttribute(i))
  2577.                             if (/^(height|width)$/i.test(i)) try {
  2578.                                 l = e.getBBox()[i]
  2579.                             } catch (f) {
  2580.                                 l = 0
  2581.                             } else l = e.getAttribute(i);
  2582.                             else l = a(e, b.Names.prefixCheck(i)[0]);
  2583.                     return b.Values.isCSSNullValue(l) && (l = 0), $.debug >= 2 && console.log("Get " + i + ": " + l), l
  2584.                 },
  2585.                 setPropertyValue: function(e, i, o, n, s) {
  2586.                     var a = i;
  2587.                     if ("scroll" === i) s.container ? s.container["scroll" + s.direction] = o : "Left" === s.direction ? t.scrollTo(o, s.alternateValue) : t.scrollTo(s.alternateValue, o);
  2588.                     else if (b.Normalizations.registered[i] && "transform" === b.Normalizations.registered[i]("name", e)) b.Normalizations.registered[i]("inject", e, o), a = "transform", o = r(e).transformCache[i];
  2589.                     else {
  2590.                         if (b.Hooks.registered[i]) {
  2591.                             var l = i,
  2592.                                 c = b.Hooks.getRoot(i);
  2593.                             n = n || b.getPropertyValue(e, c), o = b.Hooks.injectValue(l, o, n), i = c
  2594.                         }
  2595.                         if (b.Normalizations.registered[i] && (o = b.Normalizations.registered[i]("inject", e, o), i = b.Normalizations.registered[i]("name", e)), a = b.Names.prefixCheck(i)[0], 8 >= _) try {
  2596.                             e.style[a] = o
  2597.                         } catch (u) {
  2598.                             $.debug && console.log("Browser does not support [" + o + "] for [" + a + "]")
  2599.                         } else r(e) && r(e).isSVG && b.Names.SVGAttribute(i) ? e.setAttribute(i, o) : e.style[a] = o;
  2600.                         $.debug >= 2 && console.log("Set " + i + " (" + a + "): " + o)
  2601.                     }
  2602.                     return [a, o]
  2603.                 },
  2604.                 flushTransformCache: function(e) {
  2605.                     function t(t) {
  2606.                         return parseFloat(b.getPropertyValue(e, t))
  2607.                     }
  2608.                     var i = "";
  2609.                     if ((_ || $.State.isAndroid && !$.State.isChrome) && r(e).isSVG) {
  2610.                         var o = {
  2611.                             translate: [t("translateX"), t("translateY")],
  2612.                             skewX: [t("skewX")],
  2613.                             skewY: [t("skewY")],
  2614.                             scale: 1 !== t("scale") ? [t("scale"), t("scale")] : [t("scaleX"), t("scaleY")],
  2615.                             rotate: [t("rotateZ"), 0, 0]
  2616.                         };
  2617.                         d.each(r(e).transformCache, function(e) {
  2618.                             /^translate/i.test(e) ? e = "translate" : /^scale/i.test(e) ? e = "scale" : /^rotate/i.test(e) && (e = "rotate"), o[e] && (i += e + "(" + o[e].join(" ") + ") ", delete o[e])
  2619.                         })
  2620.                     } else {
  2621.                         var n, s;
  2622.                         d.each(r(e).transformCache, function(t) {
  2623.                             return n = r(e).transformCache[t], "transformPerspective" === t ? (s = n, !0) : (9 === _ && "rotateZ" === t && (t = "rotate"), void(i += t + n + " "))
  2624.                         }), s && (i = "perspective" + s + " " + i)
  2625.                     }
  2626.                     b.setPropertyValue(e, "transform", i)
  2627.                 }
  2628.             };
  2629.             b.Hooks.register(), b.Normalizations.register(), $.hook = function(e, t, i) {
  2630.                 var n = o;
  2631.                 return e = s(e), d.each(e, function(e, s) {
  2632.                     if (r(s) === o && $.init(s), i === o) n === o && (n = $.CSS.getPropertyValue(s, t));
  2633.                     else {
  2634.                         var a = $.CSS.setPropertyValue(s, t, i);
  2635.                         "transform" === a[0] && $.CSS.flushTransformCache(s), n = a
  2636.                     }
  2637.                 }), n
  2638.             };
  2639.             var w = function() {
  2640.                 function e() {
  2641.                     return a ? T.promise || null : l
  2642.                 }
  2643.  
  2644.                 function n() {
  2645.                     function e(e) {
  2646.                         function p(e, t) {
  2647.                             var i = o,
  2648.                                 n = o,
  2649.                                 r = o;
  2650.                             return f.isArray(e) ? (i = e[0], !f.isArray(e[1]) && /^[\d-]/.test(e[1]) || f.isFunction(e[1]) || b.RegEx.isHex.test(e[1]) ? r = e[1] : (f.isString(e[1]) && !b.RegEx.isHex.test(e[1]) || f.isArray(e[1])) && (n = t ? e[1] : c(e[1], a.duration), e[2] !== o && (r = e[2]))) : i = e, t || (n = n || a.easing), f.isFunction(i) && (i = i.call(s, x, k)), f.isFunction(r) && (r = r.call(s, x, k)), [i || 0, n, r]
  2651.                         }
  2652.  
  2653.                         function _(e, t) {
  2654.                             var i, o;
  2655.                             return o = (t || "0").toString().toLowerCase().replace(/[%A-z]+$/, function(e) {
  2656.                                 return i = e, ""
  2657.                             }), i || (i = b.Values.getUnitType(e)), [o, i]
  2658.                         }
  2659.  
  2660.                         function g() {
  2661.                             var e = {
  2662.                                     myParent: s.parentNode || i.body,
  2663.                                     position: b.getPropertyValue(s, "position"),
  2664.                                     fontSize: b.getPropertyValue(s, "fontSize")
  2665.                                 },
  2666.                                 o = e.position === I.lastPosition && e.myParent === I.lastParent,
  2667.                                 n = e.fontSize === I.lastFontSize;
  2668.                             I.lastParent = e.myParent, I.lastPosition = e.position, I.lastFontSize = e.fontSize;
  2669.                             var a = 100,
  2670.                                 l = {};
  2671.                             if (n && o) l.emToPx = I.lastEmToPx, l.percentToPxWidth = I.lastPercentToPxWidth, l.percentToPxHeight = I.lastPercentToPxHeight;
  2672.                             else {
  2673.                                 var c = r(s).isSVG ? i.createElementNS("http://www.w3.org/2000/svg", "rect") : i.createElement("div");
  2674.                                 $.init(c), e.myParent.appendChild(c), d.each(["overflow", "overflowX", "overflowY"], function(e, t) {
  2675.                                     $.CSS.setPropertyValue(c, t, "hidden")
  2676.                                 }), $.CSS.setPropertyValue(c, "position", e.position), $.CSS.setPropertyValue(c, "fontSize", e.fontSize), $.CSS.setPropertyValue(c, "boxSizing", "content-box"), d.each(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height"], function(e, t) {
  2677.                                     $.CSS.setPropertyValue(c, t, a + "%")
  2678.                                 }), $.CSS.setPropertyValue(c, "paddingLeft", a + "em"), l.percentToPxWidth = I.lastPercentToPxWidth = (parseFloat(b.getPropertyValue(c, "width", null, !0)) || 1) / a, l.percentToPxHeight = I.lastPercentToPxHeight = (parseFloat(b.getPropertyValue(c, "height", null, !0)) || 1) / a, l.emToPx = I.lastEmToPx = (parseFloat(b.getPropertyValue(c, "paddingLeft")) || 1) / a, e.myParent.removeChild(c)
  2679.                             }
  2680.                             return null === I.remToPx && (I.remToPx = parseFloat(b.getPropertyValue(i.body, "fontSize")) || 16), null === I.vwToPx && (I.vwToPx = parseFloat(t.innerWidth) / 100, I.vhToPx = parseFloat(t.innerHeight) / 100), l.remToPx = I.remToPx, l.vwToPx = I.vwToPx, l.vhToPx = I.vhToPx, $.debug >= 1 && console.log("Unit ratios: " + JSON.stringify(l), s), l
  2681.                         }
  2682.                         if (a.begin && 0 === x) try {
  2683.                             a.begin.call(h, h)
  2684.                         } catch (y) {
  2685.                             setTimeout(function() {
  2686.                                 throw y
  2687.                             }, 1)
  2688.                         }
  2689.                         if ("scroll" === P) {
  2690.                             var w, S, C, A = /^x$/i.test(a.axis) ? "Left" : "Top",
  2691.                                 q = parseFloat(a.offset) || 0;
  2692.                             a.container ? f.isWrapped(a.container) || f.isNode(a.container) ? (a.container = a.container[0] || a.container, w = a.container["scroll" + A], C = w + d(s).position()[A.toLowerCase()] + q) : a.container = null : (w = $.State.scrollAnchor[$.State["scrollProperty" + A]], S = $.State.scrollAnchor[$.State["scrollProperty" + ("Left" === A ? "Top" : "Left")]], C = d(s).offset()[A.toLowerCase()] + q), l = {
  2693.                                 scroll: {
  2694.                                     rootPropertyValue: !1,
  2695.                                     startValue: w,
  2696.                                     currentValue: w,
  2697.                                     endValue: C,
  2698.                                     unitType: "",
  2699.                                     easing: a.easing,
  2700.                                     scrollData: {
  2701.                                         container: a.container,
  2702.                                         direction: A,
  2703.                                         alternateValue: S
  2704.                                     }
  2705.                                 },
  2706.                                 element: s
  2707.                             }, $.debug && console.log("tweensContainer (scroll): ", l.scroll, s)
  2708.                         } else if ("reverse" === P) {
  2709.                             if (!r(s).tweensContainer) return void d.dequeue(s, a.queue);
  2710.                             "none" === r(s).opts.display && (r(s).opts.display = "auto"), "hidden" === r(s).opts.visibility && (r(s).opts.visibility = "visible"), r(s).opts.loop = !1, r(s).opts.begin = null, r(s).opts.complete = null, v.easing || delete a.easing, v.duration || delete a.duration, a = d.extend({}, r(s).opts, a);
  2711.                             var O = d.extend(!0, {}, r(s).tweensContainer);
  2712.                             for (var R in O)
  2713.                                 if ("element" !== R) {
  2714.                                     var j = O[R].startValue;
  2715.                                     O[R].startValue = O[R].currentValue = O[R].endValue, O[R].endValue = j, f.isEmptyObject(v) || (O[R].easing = a.easing), $.debug && console.log("reverse tweensContainer (" + R + "): " + JSON.stringify(O[R]), s)
  2716.                                 }
  2717.                             l = O
  2718.                         } else if ("start" === P) {
  2719.                             var O;
  2720.                             r(s).tweensContainer && r(s).isAnimating === !0 && (O = r(s).tweensContainer), d.each(m, function(e, t) {
  2721.                                 if (RegExp("^" + b.Lists.colors.join("$|^") + "$").test(e)) {
  2722.                                     var i = p(t, !0),
  2723.                                         n = i[0],
  2724.                                         s = i[1],
  2725.                                         r = i[2];
  2726.                                     if (b.RegEx.isHex.test(n)) {
  2727.                                         for (var a = ["Red", "Green", "Blue"], l = b.Values.hexToRgb(n), c = r ? b.Values.hexToRgb(r) : o, u = 0; u < a.length; u++) {
  2728.                                             var d = [l[u]];
  2729.                                             s && d.push(s), c !== o && d.push(c[u]), m[e + a[u]] = d
  2730.                                         }
  2731.                                         delete m[e]
  2732.                                     }
  2733.                                 }
  2734.                             });
  2735.                             for (var E in m) {
  2736.                                 var M = p(m[E]),
  2737.                                     z = M[0],
  2738.                                     N = M[1],
  2739.                                     V = M[2];
  2740.                                 E = b.Names.camelCase(E);
  2741.                                 var L = b.Hooks.getRoot(E),
  2742.                                     H = !1;
  2743.                                 if (r(s).isSVG || "tween" === L || b.Names.prefixCheck(L)[1] !== !1 || b.Normalizations.registered[L] !== o) {
  2744.                                     (a.display !== o && null !== a.display && "none" !== a.display || a.visibility !== o && "hidden" !== a.visibility) && /opacity|filter/.test(E) && !V && 0 !== z && (V = 0), a._cacheValues && O && O[E] ? (V === o && (V = O[E].endValue + O[E].unitType), H = r(s).rootPropertyValueCache[L]) : b.Hooks.registered[E] ? V === o ? (H = b.getPropertyValue(s, L), V = b.getPropertyValue(s, E, H)) : H = b.Hooks.templates[L][1] : V === o && (V = b.getPropertyValue(s, E));
  2745.                                     var D, B, W, U = !1;
  2746.                                     if (D = _(E, V), V = D[0], W = D[1], D = _(E, z), z = D[0].replace(/^([+-\/*])=/, function(e, t) {
  2747.                                             return U = t, ""
  2748.                                         }), B = D[1], V = parseFloat(V) || 0, z = parseFloat(z) || 0, "%" === B && (/^(fontSize|lineHeight)$/.test(E) ? (z /= 100, B = "em") : /^scale/.test(E) ? (z /= 100, B = "") : /(Red|Green|Blue)$/i.test(E) && (z = z / 100 * 255, B = "")), /[\/*]/.test(U)) B = W;
  2749.                                     else if (W !== B && 0 !== V)
  2750.                                         if (0 === z) B = W;
  2751.                                         else {
  2752.                                             n = n || g();
  2753.                                             var Q = /margin|padding|left|right|width|text|word|letter/i.test(E) || /X$/.test(E) || "x" === E ? "x" : "y";
  2754.                                             switch (W) {
  2755.                                                 case "%":
  2756.                                                     V *= "x" === Q ? n.percentToPxWidth : n.percentToPxHeight;
  2757.                                                     break;
  2758.                                                 case "px":
  2759.                                                     break;
  2760.                                                 default:
  2761.                                                     V *= n[W + "ToPx"]
  2762.                                             }
  2763.                                             switch (B) {
  2764.                                                 case "%":
  2765.                                                     V *= 1 / ("x" === Q ? n.percentToPxWidth : n.percentToPxHeight);
  2766.                                                     break;
  2767.                                                 case "px":
  2768.                                                     break;
  2769.                                                 default:
  2770.                                                     V *= 1 / n[B + "ToPx"]
  2771.                                             }
  2772.                                         }
  2773.                                     switch (U) {
  2774.                                         case "+":
  2775.                                             z = V + z;
  2776.                                             break;
  2777.                                         case "-":
  2778.                                             z = V - z;
  2779.                                             break;
  2780.                                         case "*":
  2781.                                             z = V * z;
  2782.                                             break;
  2783.                                         case "/":
  2784.                                             z = V / z
  2785.                                     }
  2786.                                     l[E] = {
  2787.                                         rootPropertyValue: H,
  2788.                                         startValue: V,
  2789.                                         currentValue: V,
  2790.                                         endValue: z,
  2791.                                         unitType: B,
  2792.                                         easing: N
  2793.                                     }, $.debug && console.log("tweensContainer (" + E + "): " + JSON.stringify(l[E]), s)
  2794.                                 } else $.debug && console.log("Skipping [" + L + "] due to a lack of browser support.")
  2795.                             }
  2796.                             l.element = s
  2797.                         }
  2798.                         l.element && (b.Values.addClass(s, "velocity-animating"), F.push(l), "" === a.queue && (r(s).tweensContainer = l, r(s).opts = a), r(s).isAnimating = !0, x === k - 1 ? ($.State.calls.push([F, h, a, null, T.resolver]), $.State.isTicking === !1 && ($.State.isTicking = !0, u())) : x++)
  2799.                     }
  2800.                     var n, s = this,
  2801.                         a = d.extend({}, $.defaults, v),
  2802.                         l = {};
  2803.                     switch (r(s) === o && $.init(s), parseFloat(a.delay) && a.queue !== !1 && d.queue(s, a.queue, function(e) {
  2804.                         $.velocityQueueEntryFlag = !0, r(s).delayTimer = {
  2805.                             setTimeout: setTimeout(e, parseFloat(a.delay)),
  2806.                             next: e
  2807.                         }
  2808.                     }), a.duration.toString().toLowerCase()) {
  2809.                         case "fast":
  2810.                             a.duration = 200;
  2811.                             break;
  2812.                         case "normal":
  2813.                             a.duration = g;
  2814.                             break;
  2815.                         case "slow":
  2816.                             a.duration = 600;
  2817.                             break;
  2818.                         default:
  2819.                             a.duration = parseFloat(a.duration) || 1
  2820.                     }
  2821.                     $.mock !== !1 && ($.mock === !0 ? a.duration = a.delay = 1 : (a.duration *= parseFloat($.mock) || 1, a.delay *= parseFloat($.mock) || 1)), a.easing = c(a.easing, a.duration), a.begin && !f.isFunction(a.begin) && (a.begin = null), a.progress && !f.isFunction(a.progress) && (a.progress = null), a.complete && !f.isFunction(a.complete) && (a.complete = null), a.display !== o && null !== a.display && (a.display = a.display.toString().toLowerCase(), "auto" === a.display && (a.display = $.CSS.Values.getDisplayType(s))), a.visibility !== o && null !== a.visibility && (a.visibility = a.visibility.toString().toLowerCase()), a.mobileHA = a.mobileHA && $.State.isMobile && !$.State.isGingerbread, a.queue === !1 ? a.delay ? setTimeout(e, a.delay) : e() : d.queue(s, a.queue, function(t, i) {
  2822.                         return i === !0 ? (T.promise && T.resolver(h), !0) : ($.velocityQueueEntryFlag = !0, void e(t))
  2823.                     }), "" !== a.queue && "fx" !== a.queue || "inprogress" === d.queue(s)[0] || d.dequeue(s)
  2824.                 }
  2825.                 var a, l, _, h, m, v, y = arguments[0] && (arguments[0].p || d.isPlainObject(arguments[0].properties) && !arguments[0].properties.names || f.isString(arguments[0].properties));
  2826.                 if (f.isWrapped(this) ? (a = !1, _ = 0, h = this, l = this) : (a = !0, _ = 1, h = y ? arguments[0].elements || arguments[0].e : arguments[0]), h = s(h)) {
  2827.                     y ? (m = arguments[0].properties || arguments[0].p, v = arguments[0].options || arguments[0].o) : (m = arguments[_], v = arguments[_ + 1]);
  2828.                     var k = h.length,
  2829.                         x = 0;
  2830.                     if (!/^(stop|finish)$/i.test(m) && !d.isPlainObject(v)) {
  2831.                         var S = _ + 1;
  2832.                         v = {};
  2833.                         for (var C = S; C < arguments.length; C++) f.isArray(arguments[C]) || !/^(fast|normal|slow)$/i.test(arguments[C]) && !/^\d/.test(arguments[C]) ? f.isString(arguments[C]) || f.isArray(arguments[C]) ? v.easing = arguments[C] : f.isFunction(arguments[C]) && (v.complete = arguments[C]) : v.duration = arguments[C]
  2834.                     }
  2835.                     var T = {
  2836.                         promise: null,
  2837.                         resolver: null,
  2838.                         rejecter: null
  2839.                     };
  2840.                     a && $.Promise && (T.promise = new $.Promise(function(e, t) {
  2841.                         T.resolver = e, T.rejecter = t
  2842.                     }));
  2843.                     var P;
  2844.                     switch (m) {
  2845.                         case "scroll":
  2846.                             P = "scroll";
  2847.                             break;
  2848.                         case "reverse":
  2849.                             P = "reverse";
  2850.                             break;
  2851.                         case "finish":
  2852.                         case "stop":
  2853.                             d.each(h, function(e, t) {
  2854.                                 r(t) && r(t).delayTimer && (clearTimeout(r(t).delayTimer.setTimeout), r(t).delayTimer.next && r(t).delayTimer.next(), delete r(t).delayTimer)
  2855.                             });
  2856.                             var A = [];
  2857.                             return d.each($.State.calls, function(e, t) {
  2858.                                 t && d.each(t[1], function(i, n) {
  2859.                                     var s = v === o ? "" : v;
  2860.                                     return s === !0 || t[2].queue === s || v === o && t[2].queue === !1 ? void d.each(h, function(i, o) {
  2861.                                         o === n && ((v === !0 || f.isString(v)) && (d.each(d.queue(o, f.isString(v) ? v : ""), function(e, t) {
  2862.                                             f.isFunction(t) && t(null, !0)
  2863.                                         }), d.queue(o, f.isString(v) ? v : "", [])), "stop" === m ? (r(o) && r(o).tweensContainer && s !== !1 && d.each(r(o).tweensContainer, function(e, t) {
  2864.                                             t.endValue = t.currentValue
  2865.                                         }), A.push(e)) : "finish" === m && (t[2].duration = 1))
  2866.                                     }) : !0
  2867.                                 })
  2868.                             }), "stop" === m && (d.each(A, function(e, t) {
  2869.                                 p(t, !0)
  2870.                             }), T.promise && T.resolver(h)), e();
  2871.                         default:
  2872.                             if (!d.isPlainObject(m) || f.isEmptyObject(m)) {
  2873.                                 if (f.isString(m) && $.Redirects[m]) {
  2874.                                     var q = d.extend({}, v),
  2875.                                         O = q.duration,
  2876.                                         R = q.delay || 0;
  2877.                                     return q.backwards === !0 && (h = d.extend(!0, [], h).reverse()), d.each(h, function(e, t) {
  2878.                                         parseFloat(q.stagger) ? q.delay = R + parseFloat(q.stagger) * e : f.isFunction(q.stagger) && (q.delay = R + q.stagger.call(t, e, k)), q.drag && (q.duration = parseFloat(O) || (/^(callout|transition)/.test(m) ? 1e3 : g), q.duration = Math.max(q.duration * (q.backwards ? 1 - e / k : (e + 1) / k), .75 * q.duration, 200)), $.Redirects[m].call(t, t, q || {}, e, k, h, T.promise ? T : o)
  2879.                                     }), e()
  2880.                                 }
  2881.                                 var j = "Velocity: First argument (" + m + ") was not a property map, a known action, or a registered redirect. Aborting.";
  2882.                                 return T.promise ? T.rejecter(new Error(j)) : console.log(j), e()
  2883.                             }
  2884.                             P = "start"
  2885.                     }
  2886.                     var I = {
  2887.                             lastParent: null,
  2888.                             lastPosition: null,
  2889.                             lastFontSize: null,
  2890.                             lastPercentToPxWidth: null,
  2891.                             lastPercentToPxHeight: null,
  2892.                             lastEmToPx: null,
  2893.                             remToPx: null,
  2894.                             vwToPx: null,
  2895.                             vhToPx: null
  2896.                         },
  2897.                         F = [];
  2898.                     d.each(h, function(e, t) {
  2899.                         f.isNode(t) && n.call(t)
  2900.                     });
  2901.                     var E, q = d.extend({}, $.defaults, v);
  2902.                     if (q.loop = parseInt(q.loop), E = 2 * q.loop - 1, q.loop)
  2903.                         for (var M = 0; E > M; M++) {
  2904.                             var z = {
  2905.                                 delay: q.delay,
  2906.                                 progress: q.progress
  2907.                             };
  2908.                             M === E - 1 && (z.display = q.display, z.visibility = q.visibility, z.complete = q.complete), w(h, "reverse", z)
  2909.                         }
  2910.                     return e()
  2911.                 }
  2912.             };
  2913.             $ = d.extend(w, $), $.animate = w;
  2914.             var k = t.requestAnimationFrame || h;
  2915.             return $.State.isMobile || i.hidden === o || i.addEventListener("visibilitychange", function() {
  2916.                 i.hidden ? (k = function(e) {
  2917.                     return setTimeout(function() {
  2918.                         e(!0)
  2919.                     }, 16)
  2920.                 }, u()) : k = t.requestAnimationFrame || h
  2921.             }), e.Velocity = $, e !== t && (e.fn.velocity = w,
  2922.                 e.fn.velocity.defaults = $.defaults), d.each(["Down", "Up"], function(e, t) {
  2923.                 $.Redirects["slide" + t] = function(e, i, n, s, r, a) {
  2924.                     var l = d.extend({}, i),
  2925.                         c = l.begin,
  2926.                         u = l.complete,
  2927.                         p = {
  2928.                             height: "",
  2929.                             marginTop: "",
  2930.                             marginBottom: "",
  2931.                             paddingTop: "",
  2932.                             paddingBottom: ""
  2933.                         },
  2934.                         _ = {};
  2935.                     l.display === o && (l.display = "Down" === t ? "inline" === $.CSS.Values.getDisplayType(e) ? "inline-block" : "block" : "none"), l.begin = function() {
  2936.                         c && c.call(r, r);
  2937.                         for (var i in p) {
  2938.                             _[i] = e.style[i];
  2939.                             var o = $.CSS.getPropertyValue(e, i);
  2940.                             p[i] = "Down" === t ? [o, 0] : [0, o]
  2941.                         }
  2942.                         _.overflow = e.style.overflow, e.style.overflow = "hidden"
  2943.                     }, l.complete = function() {
  2944.                         for (var t in _) e.style[t] = _[t];
  2945.                         u && u.call(r, r), a && a.resolver(r)
  2946.                     }, $(e, p, l)
  2947.                 }
  2948.             }), d.each(["In", "Out"], function(e, t) {
  2949.                 $.Redirects["fade" + t] = function(e, i, n, s, r, a) {
  2950.                     var l = d.extend({}, i),
  2951.                         c = {
  2952.                             opacity: "In" === t ? 1 : 0
  2953.                         },
  2954.                         u = l.complete;
  2955.                     l.complete = n !== s - 1 ? l.begin = null : function() {
  2956.                         u && u.call(r, r), a && a.resolver(r)
  2957.                     }, l.display === o && (l.display = "In" === t ? "auto" : "none"), $(this, c, l)
  2958.                 }
  2959.             }), $
  2960.         }(window.jQuery || window.Zepto || window, window, document)
  2961.     }),
  2962.     function(e) {
  2963.         e.isScrollToFixed = function(t) {
  2964.             return !!e(t).data("ScrollToFixed")
  2965.         }, e.ScrollToFixed = function(t, i) {
  2966.             function o() {
  2967.                 w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed"), C = -1, k = w.offset().top, x = w.offset().left, m.options.offsets && (x += w.offset().left - w.position().left), -1 == S && (S = x), g = w.css("position"), b = !0, -1 != m.options.bottom && (w.trigger("preFixed.ScrollToFixed"), l(), w.trigger("fixed.ScrollToFixed"))
  2968.             }
  2969.  
  2970.             function n() {
  2971.                 var e = m.options.limit;
  2972.                 return e ? "function" == typeof e ? e.apply(w) : e : 0
  2973.             }
  2974.  
  2975.             function s() {
  2976.                 return "fixed" === g
  2977.             }
  2978.  
  2979.             function r() {
  2980.                 return "absolute" === g
  2981.             }
  2982.  
  2983.             function a() {
  2984.                 return !(s() || r())
  2985.             }
  2986.  
  2987.             function l() {
  2988.                 s() || (T.css({
  2989.                     display: w.css("display"),
  2990.                     width: w.outerWidth(!0),
  2991.                     height: w.outerHeight(!0),
  2992.                     "float": w.css("float")
  2993.                 }), cssOptions = {
  2994.                     "z-index": m.options.zIndex,
  2995.                     position: "fixed",
  2996.                     top: -1 == m.options.bottom ? d() : "",
  2997.                     bottom: -1 == m.options.bottom ? "" : m.options.bottom,
  2998.                     "margin-left": "0px"
  2999.                 }, m.options.dontSetWidth || (cssOptions.width = w.width()), w.css(cssOptions), w.addClass(m.options.baseClassName), m.options.className && w.addClass(m.options.className), g = "fixed")
  3000.             }
  3001.  
  3002.             function c() {
  3003.                 var e = n(),
  3004.                     t = x;
  3005.                 m.options.removeOffsets && (t = "", e -= k), cssOptions = {
  3006.                     position: "absolute",
  3007.                     top: e,
  3008.                     left: t,
  3009.                     "margin-left": "0px",
  3010.                     bottom: ""
  3011.                 }, m.options.dontSetWidth || (cssOptions.width = w.width()), w.css(cssOptions), g = "absolute"
  3012.             }
  3013.  
  3014.             function u() {
  3015.                 a() || (C = -1, T.css("display", "none"), w.css({
  3016.                     "z-index": y,
  3017.                     width: "",
  3018.                     position: v,
  3019.                     left: "",
  3020.                     top: $,
  3021.                     "margin-left": ""
  3022.                 }), w.removeClass("scroll-to-fixed-fixed"), m.options.className && w.removeClass(m.options.className), g = null)
  3023.             }
  3024.  
  3025.             function p(e) {
  3026.                 e != C && (w.css("left", x - e), C = e)
  3027.             }
  3028.  
  3029.             function d() {
  3030.                 var e = m.options.marginTop;
  3031.                 return e ? "function" == typeof e ? e.apply(w) : e : 0
  3032.             }
  3033.  
  3034.             function _() {
  3035.                 if (e.isScrollToFixed(w)) {
  3036.                     var t = b;
  3037.                     b ? a() && (k = w.offset().top, x = w.offset().left) : o();
  3038.                     var i = e(window).scrollLeft(),
  3039.                         _ = e(window).scrollTop(),
  3040.                         g = n();
  3041.                     m.options.minWidth && e(window).width() < m.options.minWidth ? a() && t || (f(), w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed")) : m.options.maxWidth && e(window).width() > m.options.maxWidth ? a() && t || (f(), w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed")) : -1 == m.options.bottom ? g > 0 && _ >= g - d() ? r() && t || (f(), w.trigger("preAbsolute.ScrollToFixed"), c(), w.trigger("unfixed.ScrollToFixed")) : _ >= k - d() ? (s() && t || (f(), w.trigger("preFixed.ScrollToFixed"), l(), C = -1, w.trigger("fixed.ScrollToFixed")), p(i)) : a() && t || (f(), w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed")) : g > 0 ? _ + e(window).height() - w.outerHeight(!0) >= g - (d() || -h()) ? s() && (f(), w.trigger("preUnfixed.ScrollToFixed"), "absolute" === v ? c() : u(), w.trigger("unfixed.ScrollToFixed")) : (s() || (f(), w.trigger("preFixed.ScrollToFixed"), l()), p(i), w.trigger("fixed.ScrollToFixed")) : p(i)
  3042.                 }
  3043.             }
  3044.  
  3045.             function h() {
  3046.                 return m.options.bottom ? m.options.bottom : 0
  3047.             }
  3048.  
  3049.             function f() {
  3050.                 var e = w.css("position");
  3051.                 w.trigger("absolute" == e ? "postAbsolute.ScrollToFixed" : "fixed" == e ? "postFixed.ScrollToFixed" : "postUnfixed.ScrollToFixed")
  3052.             }
  3053.             var m = this;
  3054.             m.$el = e(t), m.el = t, m.$el.data("ScrollToFixed", m);
  3055.             var g, v, $, y, b = !1,
  3056.                 w = m.$el,
  3057.                 k = 0,
  3058.                 x = 0,
  3059.                 S = -1,
  3060.                 C = -1,
  3061.                 T = null,
  3062.                 P = function(e) {
  3063.                     w.is(":visible") && (b = !1, _())
  3064.                 },
  3065.                 A = function(e) {
  3066.                     window.requestAnimationFrame ? requestAnimationFrame(_) : _()
  3067.                 },
  3068.                 q = function(e) {
  3069.                     e = e || window.event, e.preventDefault && e.preventDefault(), e.returnValue = !1
  3070.                 };
  3071.             m.init = function() {
  3072.                 m.options = e.extend({}, e.ScrollToFixed.defaultOptions, i), y = w.css("z-index"), m.$el.css("z-index", m.options.zIndex), T = e("<div />"), g = w.css("position"), v = w.css("position"), $ = w.css("top"), a() && m.$el.after(T), e(window).bind("resize.ScrollToFixed", P), e(window).bind("scroll.ScrollToFixed", A), "ontouchmove" in window && e(window).bind("touchmove.ScrollToFixed", _), m.options.preFixed && w.bind("preFixed.ScrollToFixed", m.options.preFixed), m.options.postFixed && w.bind("postFixed.ScrollToFixed", m.options.postFixed), m.options.preUnfixed && w.bind("preUnfixed.ScrollToFixed", m.options.preUnfixed), m.options.postUnfixed && w.bind("postUnfixed.ScrollToFixed", m.options.postUnfixed), m.options.preAbsolute && w.bind("preAbsolute.ScrollToFixed", m.options.preAbsolute), m.options.postAbsolute && w.bind("postAbsolute.ScrollToFixed", m.options.postAbsolute), m.options.fixed && w.bind("fixed.ScrollToFixed", m.options.fixed), m.options.unfixed && w.bind("unfixed.ScrollToFixed", m.options.unfixed), m.options.spacerClass && T.addClass(m.options.spacerClass), w.bind("resize.ScrollToFixed", function() {
  3073.                     T.height(w.height())
  3074.                 }), w.bind("scroll.ScrollToFixed", function() {
  3075.                     w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed"), _()
  3076.                 }), w.bind("detach.ScrollToFixed", function(t) {
  3077.                     q(t), w.trigger("preUnfixed.ScrollToFixed"), u(), w.trigger("unfixed.ScrollToFixed"), e(window).unbind("resize.ScrollToFixed", P), e(window).unbind("scroll.ScrollToFixed", A), w.unbind(".ScrollToFixed"), T.remove(), m.$el.removeData("ScrollToFixed")
  3078.                 }), P()
  3079.             }, m.init()
  3080.         }, e.ScrollToFixed.defaultOptions = {
  3081.             marginTop: 0,
  3082.             limit: 0,
  3083.             bottom: -1,
  3084.             zIndex: 1e3,
  3085.             baseClassName: "scroll-to-fixed-fixed"
  3086.         }, e.fn.scrollToFixed = function(t) {
  3087.             return this.each(function() {
  3088.                 new e.ScrollToFixed(this, t)
  3089.             })
  3090.         }
  3091.     }(jQuery),
  3092.     function(e) {
  3093.         var t = new Array,
  3094.             o = new Array;
  3095.         e.fn.doAutosize = function(t) {
  3096.             var i = e(this).data("minwidth"),
  3097.                 o = e(this).data("maxwidth"),
  3098.                 n = "",
  3099.                 s = e(this),
  3100.                 r = e("#" + e(this).data("tester_id"));
  3101.             if (n !== (n = s.val())) {
  3102.                 var a = n.replace(/&/g, "&amp;").replace(/\s/g, " ").replace(/</g, "&lt;").replace(/>/g, "&gt;");
  3103.                 r.html(a);
  3104.                 var l = r.width(),
  3105.                     c = l + t.comfortZone >= i ? l + t.comfortZone : i,
  3106.                     u = s.width(),
  3107.                     p = u > c && c >= i || c > i && o > c;
  3108.                 p && s.width(c)
  3109.             }
  3110.         }, e.fn.resetAutosize = function(t) {
  3111.             var i = e(this).data("minwidth") || t.minInputWidth || e(this).width(),
  3112.                 o = e(this).data("maxwidth") || t.maxInputWidth || e(this).closest(".tagsinput").width() - t.inputPadding,
  3113.                 n = e(this),
  3114.                 s = e("<tester/>").css({
  3115.                     position: "absolute",
  3116.                     top: -9999,
  3117.                     left: -9999,
  3118.                     width: "auto",
  3119.                     fontSize: n.css("fontSize"),
  3120.                     fontFamily: n.css("fontFamily"),
  3121.                     fontWeight: n.css("fontWeight"),
  3122.                     letterSpacing: n.css("letterSpacing"),
  3123.                     whiteSpace: "nowrap"
  3124.                 }),
  3125.                 r = e(this).attr("id") + "_autosize_tester";
  3126.             !e("#" + r).length > 0 && (s.attr("id", r), s.appendTo("body")), n.data("minwidth", i), n.data("maxwidth", o), n.data("tester_id", r), n.css("width", i)
  3127.         }, e.fn.addTag = function(i, n) {
  3128.             return n = jQuery.extend({
  3129.                 focus: !1,
  3130.                 callback: !0
  3131.             }, n), this.each(function() {
  3132.                 var s = e(this).attr("id"),
  3133.                     r = e(this).val().split(t[s]);
  3134.                 if ("" == r[0] && (r = new Array), i = jQuery.trim(i), n.unique) {
  3135.                     var a = e(r).tagExist(i);
  3136.                     1 == a && e("#" + s + "_tag").addClass("not_valid")
  3137.                 } else var a = !1;
  3138.                 if ("" != i && 1 != a) {
  3139.                     if (e("<span>").addClass("tag").append(e("<span>").text(i).append("&nbsp;&nbsp;"), e("<a>", {
  3140.                             href: "#",
  3141.                             title: "Removing tag",
  3142.                             text: "×"
  3143.                         }).click(function() {
  3144.                             return e("#" + s).removeTag(escape(i))
  3145.                         })).insertBefore("#" + s + "_addTag"), r.push(i), e("#" + s + "_tag").val(""), n.focus ? e("#" + s + "_tag").focus() : e("#" + s + "_tag").blur(), e.fn.tagsInput.updateTagsField(this, r), n.callback && o[s] && o[s].onAddTag) {
  3146.                         var l = o[s].onAddTag;
  3147.                         l.call(this, i)
  3148.                     }
  3149.                     if (o[s] && o[s].onChange) {
  3150.                         var c = r.length,
  3151.                             l = o[s].onChange;
  3152.                         l.call(this, e(this), r[c - 1])
  3153.                     }
  3154.                 }
  3155.             }), !1
  3156.         }, e.fn.removeTag = function(n) {
  3157.             return n = unescape(n), this.each(function() {
  3158.                 var s = e(this).attr("id"),
  3159.                     r = e(this).val().split(t[s]);
  3160.                 for (e("#" + s + "_tagsinput .tag").remove(), str = "", i = 0; i < r.length; i++) r[i] != n && (str = str + t[s] + r[i]);
  3161.                 if (e.fn.tagsInput.importTags(this, str), o[s] && o[s].onRemoveTag) {
  3162.                     var a = o[s].onRemoveTag;
  3163.                     a.call(this, n)
  3164.                 }
  3165.             }), !1
  3166.         }, e.fn.tagExist = function(t) {
  3167.             return jQuery.inArray(t, e(this)) >= 0
  3168.         }, e.fn.importTags = function(t) {
  3169.             id = e(this).attr("id"), e("#" + id + "_tagsinput .tag").remove(), e.fn.tagsInput.importTags(this, t)
  3170.         }, e.fn.tagsInput = function(i) {
  3171.             var n = jQuery.extend({
  3172.                 interactive: !0,
  3173.                 defaultText: "add a tag",
  3174.                 minChars: 0,
  3175.                 width: "300px",
  3176.                 height: "100px",
  3177.                 autocomplete: {
  3178.                     selectFirst: !1
  3179.                 },
  3180.                 hide: !0,
  3181.                 delimiter: ",",
  3182.                 unique: !0,
  3183.                 removeWithBackspace: !0,
  3184.                 placeholderColor: "#666666",
  3185.                 autosize: !0,
  3186.                 comfortZone: 20,
  3187.                 inputPadding: 12
  3188.             }, i);
  3189.             return this.each(function() {
  3190.                 n.hide && e(this).hide();
  3191.                 var i = e(this).attr("id"),
  3192.                     s = jQuery.extend({
  3193.                         pid: i,
  3194.                         real_input: "#" + i,
  3195.                         holder: "#" + i + "_tagsinput",
  3196.                         input_wrapper: "#" + i + "_addTag",
  3197.                         fake_input: "#" + i + "_tag"
  3198.                     }, n);
  3199.                 t[i] = s.delimiter, (n.onAddTag || n.onRemoveTag || n.onChange) && (o[i] = new Array, o[i].onAddTag = n.onAddTag, o[i].onRemoveTag = n.onRemoveTag, o[i].onChange = n.onChange);
  3200.                 var r = '<div id="' + i + '_tagsinput" class="tagsinput"><div id="' + i + '_addTag">';
  3201.                 if (n.interactive && (r = r + '<input id="' + i + '_tag" value="" data-default="' + n.defaultText + '" />'), r += '</div><div class="tags_clear"></div></div>', e(r).insertAfter(this), e(s.holder).css("width", n.width), e(s.holder).css("height", n.height), "" != e(s.real_input).val() && e.fn.tagsInput.importTags(e(s.real_input), e(s.real_input).val()), n.interactive) {
  3202.                     if (e(s.fake_input).val(e(s.fake_input).attr("data-default")), e(s.fake_input).css("color", n.placeholderColor), e(s.fake_input).resetAutosize(n), e(s.holder).bind("click", s, function(t) {
  3203.                             e(t.data.fake_input).focus()
  3204.                         }), e(s.fake_input).bind("focus", s, function(t) {
  3205.                             e(t.data.fake_input).val() == e(t.data.fake_input).attr("data-default") && e(t.data.fake_input).val(""), e(t.data.fake_input).css("color", "#000000")
  3206.                         }), void 0 != n.autocomplete_url) {
  3207.                         autocomplete_options = {
  3208.                             source: n.autocomplete_url
  3209.                         };
  3210.                         for (attrname in n.autocomplete) autocomplete_options[attrname] = n.autocomplete[attrname];
  3211.                         void 0 !== jQuery.Autocompleter ? (n.autocomplete.onItemSelect = function(t, o) {
  3212.                             e("#" + i).addTag(t.data + "", {
  3213.                                 focus: !0,
  3214.                                 unique: n.unique
  3215.                             })
  3216.                         }, e(s.fake_input).autocomplete(n.autocomplete_url, n.autocomplete), e(s.fake_input).bind("result", s, function(t, o, s) {
  3217.                             o && e("#" + i).addTag(o[0] + "", {
  3218.                                 focus: !0,
  3219.                                 unique: n.unique
  3220.                             })
  3221.                         })) : void 0 !== jQuery.ui.autocomplete && (e(s.fake_input).autocomplete(autocomplete_options), e(s.fake_input).bind("autocompleteselect", s, function(t, i) {
  3222.                             return e(t.data.real_input).addTag(i.item.value, {
  3223.                                 focus: !0,
  3224.                                 unique: n.unique
  3225.                             }), !1
  3226.                         }))
  3227.                     } else e(s.fake_input).bind("blur", s, function(t) {
  3228.                         var i = e(this).attr("data-default");
  3229.                         return "" != e(t.data.fake_input).val() && e(t.data.fake_input).val() != i ? t.data.minChars <= e(t.data.fake_input).val().length && (!t.data.maxChars || t.data.maxChars >= e(t.data.fake_input).val().length) && e(t.data.real_input).addTag(e(t.data.fake_input).val(), {
  3230.                             focus: !0,
  3231.                             unique: n.unique
  3232.                         }) : (e(t.data.fake_input).val(e(t.data.fake_input).attr("data-default")), e(t.data.fake_input).css("color", n.placeholderColor)), !1
  3233.                     });
  3234.                     e(s.fake_input).bind("keypress", s, function(t) {
  3235.                         return t.which == t.data.delimiter.charCodeAt(0) || 13 == t.which ? (t.preventDefault(), t.data.minChars <= e(t.data.fake_input).val().length && (!t.data.maxChars || t.data.maxChars >= e(t.data.fake_input).val().length) && e(t.data.real_input).addTag(e(t.data.fake_input).val(), {
  3236.                             focus: !0,
  3237.                             unique: n.unique
  3238.                         }), e(t.data.fake_input).resetAutosize(n), !1) : void(t.data.autosize && e(t.data.fake_input).doAutosize(n))
  3239.                     }), s.removeWithBackspace && e(s.fake_input).bind("keydown", function(t) {
  3240.                         if (8 == t.keyCode && "" == e(this).val()) {
  3241.                             t.preventDefault();
  3242.                             var i = e(this).closest(".tagsinput").find(".tag:last").text(),
  3243.                                 o = e(this).attr("id").replace(/_tag$/, "");
  3244.                             i = i.replace(/[\s]+×$/, ""), e("#" + o).removeTag(escape(i)), e(this).trigger("focus")
  3245.                         }
  3246.                     }), e(s.fake_input).blur(), s.unique && e(s.fake_input).keydown(function(t) {
  3247.                         (8 == t.keyCode || String.fromCharCode(t.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/)) && e(this).removeClass("not_valid")
  3248.                     })
  3249.                 }
  3250.                 return !1
  3251.             }), this
  3252.         }, e.fn.tagsInput.updateTagsField = function(i, o) {
  3253.             var n = e(i).attr("id");
  3254.             e(i).val(o.join(t[n]))
  3255.         }, e.fn.tagsInput.importTags = function(n, s) {
  3256.             e(n).val("");
  3257.             var r = e(n).attr("id"),
  3258.                 a = s.split(t[r]);
  3259.             for (i = 0; i < a.length; i++) e(n).addTag(a[i], {
  3260.                 focus: !1,
  3261.                 callback: !1
  3262.             });
  3263.             if (o[r] && o[r].onChange) {
  3264.                 var l = o[r].onChange;
  3265.                 l.call(n, n, a[i])
  3266.             }
  3267.         }
  3268.     }(jQuery),
  3269.     function(e) {
  3270.         "use strict";
  3271.         e.fn.autocomplete = function(t) {
  3272.             var i;
  3273.             arguments.length > 1 ? (i = t, t = arguments[1], t.url = i) : "string" == typeof t && (i = t, t = {
  3274.                 url: i
  3275.             });
  3276.             var o = e.extend({}, e.fn.autocomplete.defaults, t);
  3277.             return this.each(function() {
  3278.                 var t = e(this);
  3279.                 t.data("autocompleter", new e.Autocompleter(t, e.meta ? e.extend({}, o, t.data()) : o))
  3280.             })
  3281.         }, e.fn.autocomplete.defaults = {
  3282.             inputClass: "acInput",
  3283.             loadingClass: "acLoading",
  3284.             resultsClass: "acResults",
  3285.             selectClass: "acSelect",
  3286.             queryParamName: "q",
  3287.             extraParams: {},
  3288.             remoteDataType: !1,
  3289.             lineSeparator: "\n",
  3290.             cellSeparator: "|",
  3291.             minChars: 2,
  3292.             maxItemsToShow: 10,
  3293.             delay: 400,
  3294.             useCache: !0,
  3295.             maxCacheLength: 10,
  3296.             matchSubset: !0,
  3297.             matchCase: !1,
  3298.             matchInside: !0,
  3299.             mustMatch: !1,
  3300.             selectFirst: !1,
  3301.             selectOnly: !1,
  3302.             showResult: null,
  3303.             preventDefaultReturn: 1,
  3304.             preventDefaultTab: 0,
  3305.             autoFill: !1,
  3306.             filterResults: !0,
  3307.             filter: !0,
  3308.             sortResults: !0,
  3309.             sortFunction: null,
  3310.             onItemSelect: null,
  3311.             onNoMatch: null,
  3312.             onFinish: null,
  3313.             matchStringConverter: null,
  3314.             beforeUseConverter: null,
  3315.             autoWidth: "min-width",
  3316.             useDelimiter: !1,
  3317.             delimiterChar: ",",
  3318.             delimiterKeyCode: 188,
  3319.             processData: null,
  3320.             onError: null,
  3321.             enabled: !0
  3322.         };
  3323.         var t = function(t) {
  3324.                 var i, o, n = typeof t;
  3325.                 return "string" === n ? (i = t, o = {}) : e.isArray(t) ? (i = t[0], o = t.slice(1)) : "object" === n && (i = t.value, o = t.data), i = String(i), "object" != typeof o && (o = {}), {
  3326.                     value: i,
  3327.                     data: o
  3328.                 }
  3329.             },
  3330.             i = function(e, t, i) {
  3331.                 var o = parseInt(e, 10);
  3332.                 return i = i || {}, (isNaN(o) || i.min && o < i.min) && (o = t), o
  3333.             },
  3334.             o = function(e, t) {
  3335.                 return [e, encodeURIComponent(t)].join("=")
  3336.             },
  3337.             n = function(t, i) {
  3338.                 var n = [];
  3339.                 return e.each(i, function(e, t) {
  3340.                     n.push(o(e, t))
  3341.                 }), n.length && (t += -1 === t.indexOf("?") ? "?" : "&", t += n.join("&")), t
  3342.             },
  3343.             s = function(e, t, i) {
  3344.                 return e = String(e.value), t = String(t.value), i || (e = e.toLowerCase(), t = t.toLowerCase()), e > t ? 1 : t > e ? -1 : 0
  3345.             },
  3346.             r = function(e, t, i) {
  3347.                 var o, n, s, r, a, l, c = [];
  3348.                 for (l = String(e).replace("\r\n", "\n").split(t), o = 0; o < l.length; o++) {
  3349.                     for (r = l[o].split(i), s = [], n = 0; n < r.length; n++) s.push(decodeURIComponent(r[n]));
  3350.                     a = s.shift(), c.push({
  3351.                         value: a,
  3352.                         data: s
  3353.                     })
  3354.                 }
  3355.                 return c
  3356.             };
  3357.         e.Autocompleter = function(t, o) {
  3358.             if (!(t && t instanceof e && 1 === t.length && "INPUT" === t.get(0).tagName.toUpperCase())) throw new Error("Invalid parameter for jquery.Autocompleter, jQuery object with one element with INPUT tag expected.");
  3359.             var n = this;
  3360.             this.options = o, this.cacheData_ = {}, this.cacheLength_ = 0, this.selectClass_ = "jquery-autocomplete-selected-item", this.keyTimeout_ = null, this.finishTimeout_ = null, this.lastKeyPressed_ = null, this.lastProcessedValue_ = null, this.lastSelectedValue_ = null, this.active_ = !1, this.finishOnBlur_ = !0, this.options.minChars = i(this.options.minChars, e.fn.autocomplete.defaults.minChars, {
  3361.                 min: 0
  3362.             }), this.options.maxItemsToShow = i(this.options.maxItemsToShow, e.fn.autocomplete.defaults.maxItemsToShow, {
  3363.                 min: 0
  3364.             }), this.options.maxCacheLength = i(this.options.maxCacheLength, e.fn.autocomplete.defaults.maxCacheLength, {
  3365.                 min: 1
  3366.             }), this.options.delay = i(this.options.delay, e.fn.autocomplete.defaults.delay, {
  3367.                 min: 0
  3368.             }), 2 != this.options.preventDefaultReturn && (this.options.preventDefaultReturn = this.options.preventDefaultReturn ? 1 : 0), 2 != this.options.preventDefaultTab && (this.options.preventDefaultTab = this.options.preventDefaultTab ? 1 : 0), this.dom = {}, this.dom.$elem = t, this.dom.$elem.attr("autocomplete", "off").addClass(this.options.inputClass), this.dom.$results = e("<div></div>").hide().addClass(this.options.resultsClass).css({
  3369.                 position: "absolute"
  3370.             }), e("body").append(this.dom.$results), t.keydown(function(e) {
  3371.                 switch (n.lastKeyPressed_ = e.keyCode, n.lastKeyPressed_) {
  3372.                     case n.options.delimiterKeyCode:
  3373.                         n.options.useDelimiter && n.active_ && n.selectCurrent();
  3374.                         break;
  3375.                     case 35:
  3376.                     case 36:
  3377.                     case 16:
  3378.                     case 17:
  3379.                     case 18:
  3380.                     case 37:
  3381.                     case 39:
  3382.                         break;
  3383.                     case 38:
  3384.                         return e.preventDefault(), n.active_ ? n.focusPrev() : n.activate(), !1;
  3385.                     case 40:
  3386.                         return e.preventDefault(), n.active_ ? n.focusNext() : n.activate(), !1;
  3387.                     case 9:
  3388.                         if (n.active_ && (n.selectCurrent(), n.options.preventDefaultTab)) return e.preventDefault(), !1;
  3389.                         if (2 === n.options.preventDefaultTab) return e.preventDefault(), !1;
  3390.                         break;
  3391.                     case 13:
  3392.                         if (n.active_ && (n.selectCurrent(), n.options.preventDefaultReturn)) return e.preventDefault(), !1;
  3393.                         if (2 === n.options.preventDefaultReturn) return e.preventDefault(), !1;
  3394.                         break;
  3395.                     case 27:
  3396.                         if (n.active_) return e.preventDefault(), n.deactivate(!0), !1;
  3397.                         break;
  3398.                     default:
  3399.                         n.activate()
  3400.                 }
  3401.             }), t.on("paste", function() {
  3402.                 n.activate()
  3403.             });
  3404.             var s = function() {
  3405.                 n.deactivate(!0)
  3406.             };
  3407.             t.blur(function() {
  3408.                 n.finishOnBlur_ && (n.finishTimeout_ = setTimeout(s, 200))
  3409.             }), t.parents("form").on("submit", s)
  3410.         }, e.Autocompleter.prototype.position = function() {
  3411.             var t = this.dom.$elem.offset(),
  3412.                 i = this.dom.$results.outerHeight(),
  3413.                 o = e(window).outerHeight(),
  3414.                 n = t.top + this.dom.$elem.outerHeight(),
  3415.                 s = n + i,
  3416.                 r = {
  3417.                     top: n,
  3418.                     left: t.left
  3419.                 };
  3420.             if (s > o) {
  3421.                 var a = t.top - i;
  3422.                 a >= 0 && (r.top = a)
  3423.             }
  3424.             this.dom.$results.css(r)
  3425.         }, e.Autocompleter.prototype.cacheRead = function(e) {
  3426.             var t, i, o, n, s;
  3427.             if (this.options.useCache)
  3428.                 for (e = String(e), t = e.length, i = this.options.matchSubset ? 1 : t; t >= i;) {
  3429.                     for (n = this.options.matchInside ? t - i : 0, s = 0; n >= s;) {
  3430.                         if (o = e.substr(0, i), void 0 !== this.cacheData_[o]) return this.cacheData_[o];
  3431.                         s++
  3432.                     }
  3433.                     i++
  3434.                 }
  3435.             return !1
  3436.         }, e.Autocompleter.prototype.cacheWrite = function(e, t) {
  3437.             return this.options.useCache ? (this.cacheLength_ >= this.options.maxCacheLength && this.cacheFlush(), e = String(e), void 0 !== this.cacheData_[e] && this.cacheLength_++, this.cacheData_[e] = t, this.cacheData_[e]) : !1
  3438.         }, e.Autocompleter.prototype.cacheFlush = function() {
  3439.             this.cacheData_ = {}, this.cacheLength_ = 0
  3440.         }, e.Autocompleter.prototype.callHook = function(t, i) {
  3441.             var o = this.options[t];
  3442.             return o && e.isFunction(o) ? o(i, this) : !1
  3443.         }, e.Autocompleter.prototype.activate = function() {
  3444.             if (this.options.enabled) {
  3445.                 var e = this;
  3446.                 this.keyTimeout_ && clearTimeout(this.keyTimeout_), this.keyTimeout_ = setTimeout(function() {
  3447.                     e.activateNow()
  3448.                 }, this.options.delay)
  3449.             }
  3450.         }, e.Autocompleter.prototype.activateNow = function() {
  3451.             var e = this.beforeUseConverter(this.dom.$elem.val());
  3452.             e !== this.lastProcessedValue_ && e !== this.lastSelectedValue_ && this.fetchData(e)
  3453.         }, e.Autocompleter.prototype.fetchData = function(e) {
  3454.             var t = this,
  3455.                 i = function(e, i) {
  3456.                     t.options.processData && (e = t.options.processData(e)), t.showResults(t.filterResults(e, i), i)
  3457.                 };
  3458.             this.lastProcessedValue_ = e, e.length < this.options.minChars ? i([], e) : this.options.data ? i(this.options.data, e) : this.fetchRemoteData(e, function(t) {
  3459.                 i(t, e)
  3460.             })
  3461.         }, e.Autocompleter.prototype.fetchRemoteData = function(t, i) {
  3462.             var o = this.cacheRead(t);
  3463.             if (o) i(o);
  3464.             else {
  3465.                 var n = this,
  3466.                     s = "json" === n.options.remoteDataType ? "json" : "text",
  3467.                     r = function(e) {
  3468.                         var o = !1;
  3469.                         e !== !1 && (o = n.parseRemoteData(e), n.cacheWrite(t, o)), n.dom.$elem.removeClass(n.options.loadingClass), i(o)
  3470.                     };
  3471.                 this.dom.$elem.addClass(this.options.loadingClass), e.ajax({
  3472.                     url: this.makeUrl(t),
  3473.                     success: r,
  3474.                     error: function(t, i, o) {
  3475.                         e.isFunction(n.options.onError) ? n.options.onError(t, i, o) : r(!1)
  3476.                     },
  3477.                     dataType: s
  3478.                 })
  3479.             }
  3480.         }, e.Autocompleter.prototype.setExtraParam = function(t, i) {
  3481.             var o = e.trim(String(t));
  3482.             return o && (this.options.extraParams || (this.options.extraParams = {}), this.options.extraParams[o] !== i && (this.options.extraParams[o] = i, this.cacheFlush())), this
  3483.         }, e.Autocompleter.prototype.makeUrl = function(t) {
  3484.             var i = this.options.url,
  3485.                 o = e.extend({}, this.options.extraParams);
  3486.             return this.options.queryParamName === !1 ? i += encodeURIComponent(t) : o[this.options.queryParamName] = t, n(i, o)
  3487.         }, e.Autocompleter.prototype.parseRemoteData = function(t) {
  3488.             var i, o = t;
  3489.             if ("json" === this.options.remoteDataType) {
  3490.                 switch (i = typeof t) {
  3491.                     case "object":
  3492.                         o = t;
  3493.                         break;
  3494.                     case "string":
  3495.                         o = e.parseJSON(t);
  3496.                         break;
  3497.                     default:
  3498.                         throw new Error("Unexpected remote data type: " + i)
  3499.                 }
  3500.                 return o
  3501.             }
  3502.             return r(o, this.options.lineSeparator, this.options.cellSeparator)
  3503.         }, e.Autocompleter.prototype.defaultFilter = function(e, t) {
  3504.             if (!e.value) return !1;
  3505.             if (this.options.filterResults) {
  3506.                 var i = this.matchStringConverter(t),
  3507.                     o = this.matchStringConverter(e.value);
  3508.                 this.options.matchCase || (i = i.toLowerCase(), o = o.toLowerCase());
  3509.                 var n = o.indexOf(i);
  3510.                 return this.options.matchInside ? n > -1 : 0 === n
  3511.             }
  3512.             return !0
  3513.         }, e.Autocompleter.prototype.filterResult = function(t, i) {
  3514.             return this.options.filter === !1 ? !0 : e.isFunction(this.options.filter) ? this.options.filter(t, i) : this.defaultFilter(t, i)
  3515.         }, e.Autocompleter.prototype.filterResults = function(e, i) {
  3516.             var o, n, s = [];
  3517.             for (o = 0; o < e.length; o++) n = t(e[o]), this.filterResult(n, i) && s.push(n);
  3518.             return this.options.sortResults && (s = this.sortResults(s, i)), this.options.maxItemsToShow > 0 && this.options.maxItemsToShow < s.length && (s.length = this.options.maxItemsToShow), s
  3519.         }, e.Autocompleter.prototype.sortResults = function(t, i) {
  3520.             var o = this,
  3521.                 n = this.options.sortFunction;
  3522.             return e.isFunction(n) || (n = function(e, t, i) {
  3523.                 return s(e, t, o.options.matchCase)
  3524.             }), t.sort(function(e, t) {
  3525.                 return n(e, t, i, o.options)
  3526.             }), t
  3527.         }, e.Autocompleter.prototype.matchStringConverter = function(t, i, o) {
  3528.             var n = this.options.matchStringConverter;
  3529.             return e.isFunction(n) && (t = n(t, i, o)), t
  3530.         }, e.Autocompleter.prototype.beforeUseConverter = function(t) {
  3531.             t = this.getValue(t);
  3532.             var i = this.options.beforeUseConverter;
  3533.             return e.isFunction(i) && (t = i(t)), t
  3534.         }, e.Autocompleter.prototype.enableFinishOnBlur = function() {
  3535.             this.finishOnBlur_ = !0
  3536.         }, e.Autocompleter.prototype.disableFinishOnBlur = function() {
  3537.             this.finishOnBlur_ = !1
  3538.         }, e.Autocompleter.prototype.createItemFromResult = function(t) {
  3539.             var i = this,
  3540.                 o = e("<li/>");
  3541.             return o.html(this.showResult(t.value, t.data)), o.data({
  3542.                 value: t.value,
  3543.                 data: t.data
  3544.             }).click(function() {
  3545.                 i.selectItem(o)
  3546.             }).mousedown(i.disableFinishOnBlur).mouseup(i.enableFinishOnBlur), o
  3547.         }, e.Autocompleter.prototype.getItems = function() {
  3548.             return e(">ul>li", this.dom.$results)
  3549.         }, e.Autocompleter.prototype.showResults = function(t, i) {
  3550.             var o, n, s, r, a = t.length,
  3551.                 l = this,
  3552.                 c = e("<ul></ul>"),
  3553.                 u = !1,
  3554.                 p = !1;
  3555.             if (a) {
  3556.                 for (o = 0; a > o; o++) n = t[o], s = this.createItemFromResult(n), c.append(s), u === !1 && (u = String(n.value), p = s, s.addClass(this.options.firstItemClass)), o === a - 1 && s.addClass(this.options.lastItemClass);
  3557.                 this.dom.$results.html(c).show(), this.position(), this.options.autoWidth && (r = this.dom.$elem.outerWidth() - this.dom.$results.outerWidth() + this.dom.$results.width(), this.dom.$results.css(this.options.autoWidth, r)), this.getItems().hover(function() {
  3558.                     l.focusItem(this)
  3559.                 }, function() {}), (this.autoFill(u, i) || this.options.selectFirst || this.options.selectOnly && 1 === a) && this.focusItem(p), this.active_ = !0
  3560.             } else this.hideResults(), this.active_ = !1
  3561.         }, e.Autocompleter.prototype.showResult = function(t, i) {
  3562.             return e.isFunction(this.options.showResult) ? this.options.showResult(t, i) : e("<p></p>").text(t).html()
  3563.         }, e.Autocompleter.prototype.autoFill = function(e, t) {
  3564.             var i, o, n, s;
  3565.             if (this.options.autoFill && 8 !== this.lastKeyPressed_ && (i = String(e).toLowerCase(), o = String(t).toLowerCase(), n = e.length, s = t.length, i.substr(0, s) === o)) {
  3566.                 var r = this.getDelimiterOffsets(),
  3567.                     a = r.start ? " " : "";
  3568.                 this.setValue(a + e);
  3569.                 var l = s + r.start + a.length,
  3570.                     c = n + r.start + a.length;
  3571.                 return this.selectRange(l, c), !0
  3572.             }
  3573.             return !1
  3574.         }, e.Autocompleter.prototype.focusNext = function() {
  3575.             this.focusMove(1)
  3576.         }, e.Autocompleter.prototype.focusPrev = function() {
  3577.             this.focusMove(-1)
  3578.         }, e.Autocompleter.prototype.focusMove = function(t) {
  3579.             var o = this.getItems();
  3580.             if (t = i(t, 0))
  3581.                 for (var n = 0; n < o.length; n++)
  3582.                     if (e(o[n]).hasClass(this.selectClass_)) return void this.focusItem(n + t);
  3583.             this.focusItem(0)
  3584.         }, e.Autocompleter.prototype.focusItem = function(t) {
  3585.             var i, o = this.getItems();
  3586.             o.length && (o.removeClass(this.selectClass_).removeClass(this.options.selectClass), "number" == typeof t ? (0 > t ? t = 0 : t >= o.length && (t = o.length - 1), i = e(o[t])) : i = e(t), i && i.addClass(this.selectClass_).addClass(this.options.selectClass))
  3587.         }, e.Autocompleter.prototype.selectCurrent = function() {
  3588.             var t = e("li." + this.selectClass_, this.dom.$results);
  3589.             1 === t.length ? this.selectItem(t) : this.deactivate(!1)
  3590.         }, e.Autocompleter.prototype.selectItem = function(e) {
  3591.             var t = e.data("value"),
  3592.                 i = e.data("data"),
  3593.                 o = this.displayValue(t, i),
  3594.                 n = this.beforeUseConverter(o);
  3595.             this.lastProcessedValue_ = n, this.lastSelectedValue_ = n;
  3596.             var s = this.getDelimiterOffsets(),
  3597.                 r = this.options.delimiterChar,
  3598.                 a = this.dom.$elem,
  3599.                 l = 0;
  3600.             this.options.useDelimiter && (a.val().substring(s.start - 1, s.start) == r && " " != r && (o = " " + o), a.val().substring(s.end, s.end + 1) != r && this.lastKeyPressed_ != this.options.delimiterKeyCode ? o += r : l = 1), this.setValue(o), this.setCaret(s.start + o.length + l), this.callHook("onItemSelect", {
  3601.                 value: t,
  3602.                 data: i
  3603.             }), this.deactivate(!0), a.focus()
  3604.         }, e.Autocompleter.prototype.displayValue = function(t, i) {
  3605.             return e.isFunction(this.options.displayValue) ? this.options.displayValue(t, i) : t
  3606.         }, e.Autocompleter.prototype.hideResults = function() {
  3607.             this.dom.$results.hide()
  3608.         }, e.Autocompleter.prototype.deactivate = function(e) {
  3609.             this.finishTimeout_ && clearTimeout(this.finishTimeout_), this.keyTimeout_ && clearTimeout(this.keyTimeout_), e && (this.lastProcessedValue_ !== this.lastSelectedValue_ && (this.options.mustMatch && this.setValue(""), this.callHook("onNoMatch")), this.active_ && this.callHook("onFinish"), this.lastKeyPressed_ = null, this.lastProcessedValue_ = null, this.lastSelectedValue_ = null, this.active_ = !1), this.hideResults()
  3610.         }, e.Autocompleter.prototype.selectRange = function(e, t) {
  3611.             var i = this.dom.$elem.get(0);
  3612.             if (i.setSelectionRange) i.focus(), i.setSelectionRange(e, t);
  3613.             else if (i.createTextRange) {
  3614.                 var o = i.createTextRange();
  3615.                 o.collapse(!0), o.moveEnd("character", t), o.moveStart("character", e), o.select()
  3616.             }
  3617.         }, e.Autocompleter.prototype.setCaret = function(e) {
  3618.             this.selectRange(e, e)
  3619.         }, e.Autocompleter.prototype.getCaret = function() {
  3620.             var e, t, i, o, n, s, r = this.dom.$elem,
  3621.                 a = r[0];
  3622.             return a.createTextRange ? (t = document.selection, "textarea" != a.tagName.toLowerCase() ? (e = r.val(), i = t.createRange().duplicate(), i.moveEnd("character", e.length), o = "" === i.text ? e.length : e.lastIndexOf(i.text), i = t.createRange().duplicate(), i.moveStart("character", -e.length), n = i.text.length) : (i = t.createRange(), s = i.duplicate(), s.moveToElementText(a), s.setEndPoint("EndToEnd", i), o = s.text.length - i.text.length, n = o + i.text.length)) : (o = r[0].selectionStart, n = r[0].selectionEnd), {
  3623.                 start: o,
  3624.                 end: n
  3625.             }
  3626.         }, e.Autocompleter.prototype.setValue = function(e) {
  3627.             if (this.options.useDelimiter) {
  3628.                 var t = this.dom.$elem.val(),
  3629.                     i = this.getDelimiterOffsets(),
  3630.                     o = t.substring(0, i.start),
  3631.                     n = t.substring(i.end);
  3632.                 e = o + e + n
  3633.             }
  3634.             this.dom.$elem.val(e)
  3635.         }, e.Autocompleter.prototype.getValue = function(e) {
  3636.             if (this.options.useDelimiter) {
  3637.                 var t = this.getDelimiterOffsets();
  3638.                 return e.substring(t.start, t.end).trim()
  3639.             }
  3640.             return e
  3641.         }, e.Autocompleter.prototype.getDelimiterOffsets = function() {
  3642.             var e = this.dom.$elem.val();
  3643.             if (this.options.useDelimiter) {
  3644.                 var t = e.substring(0, this.getCaret().start),
  3645.                     i = t.lastIndexOf(this.options.delimiterChar) + 1,
  3646.                     o = e.substring(this.getCaret().start),
  3647.                     n = o.indexOf(this.options.delimiterChar); - 1 == n && (n = e.length), n += this.getCaret().start
  3648.             } else i = 0, n = e.length;
  3649.             return {
  3650.                 start: i,
  3651.                 end: n
  3652.             }
  3653.         }
  3654.     }(jQuery),
  3655.     function(e) {
  3656.         function t() {
  3657.             return e("<div/>")
  3658.         }
  3659.         var i = Math.abs,
  3660.             o = Math.max,
  3661.             n = Math.min,
  3662.             s = Math.round;
  3663.         e.imgAreaSelect = function(r, a) {
  3664.             function l(e) {
  3665.                 return e + me.left - ge.left
  3666.             }
  3667.  
  3668.             function c(e) {
  3669.                 return e + me.top - ge.top
  3670.             }
  3671.  
  3672.             function u(e) {
  3673.                 return e - me.left + ge.left
  3674.             }
  3675.  
  3676.             function p(e) {
  3677.                 return e - me.top + ge.top
  3678.             }
  3679.  
  3680.             function d(e) {
  3681.                 return e.pageX - ge.left
  3682.             }
  3683.  
  3684.             function _(e) {
  3685.                 return e.pageY - ge.top
  3686.             }
  3687.  
  3688.             function h(e) {
  3689.                 var t = e || B,
  3690.                     i = e || W;
  3691.                 return {
  3692.                     x1: s(ye.x1 * t),
  3693.                     y1: s(ye.y1 * i),
  3694.                     x2: s(ye.x2 * t),
  3695.                     y2: s(ye.y2 * i),
  3696.                     width: s(ye.x2 * t) - s(ye.x1 * t),
  3697.                     height: s(ye.y2 * i) - s(ye.y1 * i)
  3698.                 }
  3699.             }
  3700.  
  3701.             function f(e, t, i, o, n) {
  3702.                 var r = n || B,
  3703.                     a = n || W;
  3704.                 ye = {
  3705.                     x1: s(e / r || 0),
  3706.                     y1: s(t / a || 0),
  3707.                     x2: s(i / r || 0),
  3708.                     y2: s(o / a || 0)
  3709.                 }, ye.width = ye.x2 - ye.x1, ye.height = ye.y2 - ye.y1
  3710.             }
  3711.  
  3712.             function m() {
  3713.                 F && ue.width() && (me = {
  3714.                     left: s(ue.offset().left),
  3715.                     top: s(ue.offset().top)
  3716.                 }, N = ue.innerWidth(), V = ue.innerHeight(), me.top += ue.outerHeight() - V >> 1, me.left += ue.outerWidth() - N >> 1, Q = s(a.minWidth / B) || 0, G = s(a.minHeight / W) || 0, K = s(n(a.maxWidth / B || 1 << 24, N)), Y = s(n(a.maxHeight / W || 1 << 24, V)), "1.3.2" != e().jquery || "fixed" != $e || be.getBoundingClientRect || (me.top += o(document.body.scrollTop, be.scrollTop), me.left += o(document.body.scrollLeft, be.scrollLeft)), ge = /absolute|relative/.test(L.css("position")) ? {
  3717.                     left: s(L.offset().left) - L.scrollLeft(),
  3718.                     top: s(L.offset().top) - L.scrollTop()
  3719.                 } : "fixed" == $e ? {
  3720.                     left: e(document).scrollLeft(),
  3721.                     top: e(document).scrollTop()
  3722.                 } : {
  3723.                     left: 0,
  3724.                     top: 0
  3725.                 }, M = l(0), z = c(0), (ye.x2 > N || ye.y2 > V) && x())
  3726.             }
  3727.  
  3728.             function g(t) {
  3729.                 if (X) {
  3730.                     switch (pe.css({
  3731.                         left: l(ye.x1),
  3732.                         top: c(ye.y1)
  3733.                     }).add(de).width(ae = ye.width).height(le = ye.height), de.add(_e).add(fe).css({
  3734.                         left: 0,
  3735.                         top: 0
  3736.                     }), _e.width(o(ae - _e.outerWidth() + _e.innerWidth(), 0)).height(o(le - _e.outerHeight() + _e.innerHeight(), 0)), e(he[0]).css({
  3737.                         left: M,
  3738.                         top: z,
  3739.                         width: ye.x1,
  3740.                         height: V
  3741.                     }), e(he[1]).css({
  3742.                         left: M + ye.x1,
  3743.                         top: z,
  3744.                         width: ae,
  3745.                         height: ye.y1
  3746.                     }), e(he[2]).css({
  3747.                         left: M + ye.x2,
  3748.                         top: z,
  3749.                         width: N - ye.x2,
  3750.                         height: V
  3751.                     }), e(he[3]).css({
  3752.                         left: M + ye.x1,
  3753.                         top: z + ye.y2,
  3754.                         width: ae,
  3755.                         height: V - ye.y2
  3756.                     }), ae -= fe.outerWidth(), le -= fe.outerHeight(), fe.length) {
  3757.                         case 8:
  3758.                             e(fe[4]).css({
  3759.                                 left: ae >> 1
  3760.                             }), e(fe[5]).css({
  3761.                                 left: ae,
  3762.                                 top: le >> 1
  3763.                             }), e(fe[6]).css({
  3764.                                 left: ae >> 1,
  3765.                                 top: le
  3766.                             }), e(fe[7]).css({
  3767.                                 top: le >> 1
  3768.                             });
  3769.                         case 4:
  3770.                             fe.slice(1, 3).css({
  3771.                                 left: ae
  3772.                             }), fe.slice(2, 4).css({
  3773.                                 top: le
  3774.                             })
  3775.                     }
  3776.                     t !== !1 && (e.imgAreaSelect.onKeyPress != ke && e(document).unbind(e.imgAreaSelect.keyPress, e.imgAreaSelect.onKeyPress), a.keys && e(document)[e.imgAreaSelect.keyPress](e.imgAreaSelect.onKeyPress = ke)), xe && _e.outerWidth() - _e.innerWidth() == 2 && (_e.css("margin", 0), setTimeout(function() {
  3777.                         _e.css("margin", "auto")
  3778.                     }, 0))
  3779.                 }
  3780.             }
  3781.  
  3782.             function v(e) {
  3783.                 m(), g(e), J = l(ye.x1), ee = c(ye.y1), te = l(ye.x2), ie = c(ye.y2)
  3784.             }
  3785.  
  3786.             function $(e, t) {
  3787.                 a.fadeSpeed ? e.fadeOut(a.fadeSpeed, t) : e.hide()
  3788.             }
  3789.  
  3790.             function y(e) {
  3791.                 var t = u(d(e)) - ye.x1,
  3792.                     i = p(_(e)) - ye.y1;
  3793.                 ce || (m(), ce = !0, pe.one("mouseout", function() {
  3794.                     ce = !1
  3795.                 })), U = "", a.resizable && (i <= a.resizeMargin ? U = "n" : i >= ye.height - a.resizeMargin && (U = "s"), t <= a.resizeMargin ? U += "w" : t >= ye.width - a.resizeMargin && (U += "e")), pe.css("cursor", U ? U + "-resize" : a.movable ? "move" : ""), E && E.toggle()
  3796.             }
  3797.  
  3798.             function b(t) {
  3799.                 e("body").css("cursor", ""), (a.autoHide || ye.width * ye.height == 0) && $(pe.add(he), function() {
  3800.                     e(this).hide()
  3801.                 }), e(document).unbind("mousemove", S), pe.mousemove(y), a.onSelectEnd(r, h())
  3802.             }
  3803.  
  3804.             function w(t) {
  3805.                 return 1 != t.which ? !1 : (m(), U ? (e("body").css("cursor", U + "-resize"), J = l(ye[/w/.test(U) ? "x2" : "x1"]), ee = c(ye[/n/.test(U) ? "y2" : "y1"]), e(document).mousemove(S).one("mouseup", b), pe.unbind("mousemove", y)) : a.movable ? (H = M + ye.x1 - d(t), D = z + ye.y1 - _(t), pe.unbind("mousemove", y), e(document).mousemove(T).one("mouseup", function() {
  3806.                     a.onSelectEnd(r, h()), e(document).unbind("mousemove", T), pe.mousemove(y)
  3807.                 })) : ue.mousedown(t), !1)
  3808.             }
  3809.  
  3810.             function k(e) {
  3811.                 Z && (e ? (te = o(M, n(M + N, J + i(ie - ee) * Z * (te > J || -1))), ie = s(o(z, n(z + V, ee + i(te - J) / Z * (ie > ee || -1)))), te = s(te)) : (ie = o(z, n(z + V, ee + i(te - J) / Z * (ie > ee || -1))), te = s(o(M, n(M + N, J + i(ie - ee) * Z * (te > J || -1)))), ie = s(ie)))
  3812.             }
  3813.  
  3814.             function x() {
  3815.                 J = n(J, M + N), ee = n(ee, z + V), i(te - J) < Q && (te = J - Q * (J > te || -1), M > te ? J = M + Q : te > M + N && (J = M + N - Q)), i(ie - ee) < G && (ie = ee - G * (ee > ie || -1), z > ie ? ee = z + G : ie > z + V && (ee = z + V - G)), te = o(M, n(te, M + N)), ie = o(z, n(ie, z + V)), k(i(te - J) < i(ie - ee) * Z), i(te - J) > K && (te = J - K * (J > te || -1), k()), i(ie - ee) > Y && (ie = ee - Y * (ee > ie || -1), k(!0)), ye = {
  3816.                     x1: u(n(J, te)),
  3817.                     x2: u(o(J, te)),
  3818.                     y1: p(n(ee, ie)),
  3819.                     y2: p(o(ee, ie)),
  3820.                     width: i(te - J),
  3821.                     height: i(ie - ee)
  3822.                 }, g(), a.onSelectChange(r, h())
  3823.             }
  3824.  
  3825.             function S(e) {
  3826.                 return te = /w|e|^$/.test(U) || Z ? d(e) : l(ye.x2), ie = /n|s|^$/.test(U) || Z ? _(e) : c(ye.y2), x(), !1
  3827.             }
  3828.  
  3829.             function C(t, i) {
  3830.                 te = (J = t) + ye.width, ie = (ee = i) + ye.height, e.extend(ye, {
  3831.                     x1: u(J),
  3832.                     y1: p(ee),
  3833.                     x2: u(te),
  3834.                     y2: p(ie)
  3835.                 }), g(), a.onSelectChange(r, h())
  3836.             }
  3837.  
  3838.             function T(e) {
  3839.                 return J = o(M, n(H + d(e), M + N - ye.width)), ee = o(z, n(D + _(e), z + V - ye.height)), C(J, ee), e.preventDefault(), !1
  3840.             }
  3841.  
  3842.             function P() {
  3843.                 e(document).unbind("mousemove", P), m(), te = J, ie = ee, x(), U = "", he.is(":visible") || pe.add(he).hide().fadeIn(a.fadeSpeed || 0), X = !0, e(document).unbind("mouseup", A).mousemove(S).one("mouseup", b), pe.unbind("mousemove", y), a.onSelectStart(r, h())
  3844.             }
  3845.  
  3846.             function A() {
  3847.                 e(document).unbind("mousemove", P).unbind("mouseup", A), $(pe.add(he)), f(u(J), p(ee), u(J), p(ee)), this instanceof e.imgAreaSelect || (a.onSelectChange(r, h()), a.onSelectEnd(r, h()))
  3848.             }
  3849.  
  3850.             function q(t) {
  3851.                 return 1 != t.which || he.is(":animated") ? !1 : (m(), H = J = d(t), D = ee = _(t), e(document).mousemove(P).mouseup(A), !1)
  3852.             }
  3853.  
  3854.             function O() {
  3855.                 v(!1)
  3856.             }
  3857.  
  3858.             function R() {
  3859.                 F = !0, I(a = e.extend({
  3860.                     classPrefix: "imgareaselect",
  3861.                     movable: !0,
  3862.                     parent: "body",
  3863.                     resizable: !0,
  3864.                     resizeMargin: 10,
  3865.                     onInit: function() {},
  3866.                     onSelectStart: function() {},
  3867.                     onSelectChange: function() {},
  3868.                     onSelectEnd: function() {}
  3869.                 }, a)), pe.add(he).css({
  3870.                     visibility: ""
  3871.                 }), a.show && (X = !0, m(), g(), pe.add(he).hide().fadeIn(a.fadeSpeed || 0)), setTimeout(function() {
  3872.                     a.onInit(r, h())
  3873.                 }, 0)
  3874.             }
  3875.  
  3876.             function j(e, t) {
  3877.                 for (var i in t) void 0 !== a[i] && e.css(t[i], a[i])
  3878.             }
  3879.  
  3880.             function I(i) {
  3881.                 if (i.parent && (L = e(i.parent)).append(pe).append(he), e.extend(a, i), m(), null != i.handles) {
  3882.                     for (fe.remove(), fe = e([]), se = i.handles ? "corners" == i.handles ? 4 : 8 : 0; se--;) fe = fe.add(t());
  3883.                     fe.addClass(a.classPrefix + "-handle").css({
  3884.                         position: "absolute",
  3885.                         fontSize: 0,
  3886.                         zIndex: ve + 1 || 1
  3887.                     }), !parseInt(fe.css("width")) >= 0 && fe.width(5).height(5), (re = a.borderWidth) && fe.css({
  3888.                         borderWidth: re,
  3889.                         borderStyle: "solid"
  3890.                     }), j(fe, {
  3891.                         borderColor1: "border-color",
  3892.                         borderColor2: "background-color",
  3893.                         borderOpacity: "opacity"
  3894.                     })
  3895.                 }
  3896.                 for (B = a.imageWidth / N || 1, W = a.imageHeight / V || 1, null != i.x1 && (f(i.x1, i.y1, i.x2, i.y2), i.show = !i.hide), i.keys && (a.keys = e.extend({
  3897.                         shift: 1,
  3898.                         ctrl: "resize"
  3899.                     }, i.keys)), he.addClass(a.classPrefix + "-outer"), de.addClass(a.classPrefix + "-selection"), se = 0; se++ < 4;) e(_e[se - 1]).addClass(a.classPrefix + "-border" + se);
  3900.                 j(de, {
  3901.                     selectionColor: "background-color",
  3902.                     selectionOpacity: "opacity"
  3903.                 }), j(_e, {
  3904.                     borderOpacity: "opacity",
  3905.                     borderWidth: "border-width"
  3906.                 }), j(he, {
  3907.                     outerColor: "background-color",
  3908.                     outerOpacity: "opacity"
  3909.                 }), (re = a.borderColor1) && e(_e[0]).css({
  3910.                     borderStyle: "solid",
  3911.                     borderColor: re
  3912.                 }), (re = a.borderColor2) && e(_e[1]).css({
  3913.                     borderStyle: "dashed",
  3914.                     borderColor: re
  3915.                 }), pe.append(de.add(_e).add(E)).append(fe), xe && ((re = (he.css("filter") || "").match(/opacity=(\d+)/)) && he.css("opacity", re[1] / 100), (re = (_e.css("filter") || "").match(/opacity=(\d+)/)) && _e.css("opacity", re[1] / 100)), i.hide ? $(pe.add(he)) : i.show && F && (X = !0, pe.add(he).fadeIn(a.fadeSpeed || 0), v()), Z = (ne = (a.aspectRatio || "").split(/:/))[0] / ne[1], ue.add(he).unbind("mousedown", q), a.disable || a.enable === !1 ? (pe.unbind("mousemove", y).unbind("mousedown", w), e(window).unbind("resize", O)) : ((a.enable || a.disable === !1) && ((a.resizable || a.movable) && pe.mousemove(y).mousedown(w), e(window).resize(O)), a.persistent || ue.add(he).mousedown(q)), a.enable = a.disable = void 0
  3916.             }
  3917.             var F, E, M, z, N, V, L, H, D, B, W, U, Q, G, K, Y, Z, X, J, ee, te, ie, oe, ne, se, re, ae, le, ce, ue = e(r),
  3918.                 pe = t(),
  3919.                 de = t(),
  3920.                 _e = t().add(t()).add(t()).add(t()),
  3921.                 he = t().add(t()).add(t()).add(t()),
  3922.                 fe = e([]),
  3923.                 me = {
  3924.                     left: 0,
  3925.                     top: 0
  3926.                 },
  3927.                 ge = {
  3928.                     left: 0,
  3929.                     top: 0
  3930.                 },
  3931.                 ve = 0,
  3932.                 $e = "absolute",
  3933.                 ye = {
  3934.                     x1: 0,
  3935.                     y1: 0,
  3936.                     x2: 0,
  3937.                     y2: 0,
  3938.                     width: 0,
  3939.                     height: 0
  3940.                 },
  3941.                 be = document.documentElement,
  3942.                 we = navigator.userAgent,
  3943.                 ke = function(e) {
  3944.                     var t, i, s = a.keys,
  3945.                         r = e.keyCode;
  3946.                     if (t = isNaN(s.alt) || !e.altKey && !e.originalEvent.altKey ? !isNaN(s.ctrl) && e.ctrlKey ? s.ctrl : !isNaN(s.shift) && e.shiftKey ? s.shift : isNaN(s.arrows) ? 10 : s.arrows : s.alt, "resize" == s.arrows || "resize" == s.shift && e.shiftKey || "resize" == s.ctrl && e.ctrlKey || "resize" == s.alt && (e.altKey || e.originalEvent.altKey)) {
  3947.                         switch (r) {
  3948.                             case 37:
  3949.                                 t = -t;
  3950.                             case 39:
  3951.                                 i = o(J, te), J = n(J, te), te = o(i + t, J), k();
  3952.                                 break;
  3953.                             case 38:
  3954.                                 t = -t;
  3955.                             case 40:
  3956.                                 i = o(ee, ie), ee = n(ee, ie), ie = o(i + t, ee), k(!0);
  3957.                                 break;
  3958.                             default:
  3959.                                 return
  3960.                         }
  3961.                         x()
  3962.                     } else switch (J = n(J, te), ee = n(ee, ie), r) {
  3963.                         case 37:
  3964.                             C(o(J - t, M), ee);
  3965.                             break;
  3966.                         case 38:
  3967.                             C(J, o(ee - t, z));
  3968.                             break;
  3969.                         case 39:
  3970.                             C(J + n(t, N - u(te)), ee);
  3971.                             break;
  3972.                         case 40:
  3973.                             C(J, ee + n(t, V - p(ie)));
  3974.                             break;
  3975.                         default:
  3976.                             return
  3977.                     }
  3978.                     return !1
  3979.                 };
  3980.             this.remove = function() {
  3981.                 I({
  3982.                     disable: !0
  3983.                 }), pe.add(he).remove()
  3984.             }, this.getOptions = function() {
  3985.                 return a
  3986.             }, this.setOptions = I, this.getSelection = h, this.setSelection = f, this.cancelSelection = A, this.update = v;
  3987.             var xe = (/msie ([\w.]+)/i.exec(we) || [])[1],
  3988.                 Se = /opera/i.test(we),
  3989.                 Ce = /webkit/i.test(we) && !/chrome/i.test(we);
  3990.             for (oe = ue; oe.length;) ve = o(ve, isNaN(oe.css("z-index")) ? ve : oe.css("z-index")), "fixed" == oe.css("position") && ($e = "fixed"), oe = oe.parent(":not(body)");
  3991.             ve = a.zIndex || ve, xe && ue.attr("unselectable", "on"), e.imgAreaSelect.keyPress = xe || Ce ? "keydown" : "keypress", Se && (E = t().css({
  3992.                 width: "100%",
  3993.                 height: "100%",
  3994.                 position: "absolute",
  3995.                 zIndex: ve + 2 || 2
  3996.             })), pe.add(he).css({
  3997.                 visibility: "hidden",
  3998.                 position: $e,
  3999.                 overflow: "hidden",
  4000.                 zIndex: ve || "0"
  4001.             }), pe.css({
  4002.                 zIndex: ve + 2 || 2
  4003.             }), de.add(_e).css({
  4004.                 position: "absolute",
  4005.                 fontSize: 0
  4006.             }), r.complete || "complete" == r.readyState || !ue.is("img") ? R() : ue.one("load", R), !F && xe && xe >= 7 && (r.src = r.src)
  4007.         }, e.fn.imgAreaSelect = function(t) {
  4008.             return t = t || {}, this.each(function() {
  4009.                 e(this).data("imgAreaSelect") ? t.remove ? (e(this).data("imgAreaSelect").remove(), e(this).removeData("imgAreaSelect")) : e(this).data("imgAreaSelect").setOptions(t) : t.remove || (void 0 === t.enable && void 0 === t.disable && (t.enable = !0), e(this).data("imgAreaSelect", new e.imgAreaSelect(this, t)))
  4010.             }), t.instance ? e(this).data("imgAreaSelect") : this
  4011.         }
  4012.     }(jQuery),
  4013.     function(e) {
  4014.         e.fn.visible = function(t, i, o) {
  4015.             var n = e(this).eq(0),
  4016.                 s = n.get(0),
  4017.                 r = e(window),
  4018.                 a = r.scrollTop(),
  4019.                 l = a + r.height(),
  4020.                 c = r.scrollLeft(),
  4021.                 u = c + r.width(),
  4022.                 p = n.offset().top,
  4023.                 d = p + n.height(),
  4024.                 _ = n.offset().left,
  4025.                 h = _ + n.width(),
  4026.                 f = t === !0 ? d : p,
  4027.                 m = t === !0 ? p : d,
  4028.                 g = t === !0 ? h : _,
  4029.                 v = t === !0 ? _ : h,
  4030.                 $ = i === !0 ? s.offsetWidth * s.offsetHeight : !0,
  4031.                 o = o ? o : "both";
  4032.             return "both" === o ? !!$ && l >= m && f >= a && u >= v && g >= c : "vertical" === o ? !!$ && l >= m && f >= a : "horizontal" === o ? !!$ && u >= v && g >= c : void 0
  4033.         }
  4034.     }(jQuery),
  4035.     function(e) {
  4036.         e.fn.combSpr = function(t) {
  4037.             var i = e.extend({
  4038.                 width: 0,
  4039.                 dataurl: !1,
  4040.                 valueInput: "",
  4041.                 value: 0,
  4042.                 valueText: "",
  4043.                 childPlugin: null,
  4044.                 childBlock: null,
  4045.                 field: null,
  4046.                 fieldPlugin: null,
  4047.                 fieldValue: null,
  4048.                 placeholder: "",
  4049.                 zIndex: 0,
  4050.                 onSelect: function() {},
  4051.                 onClear: function() {}
  4052.             }, t);
  4053.             return this.each(function() {
  4054.                 var t, o, n = e(this).val(),
  4055.                     s = i.value,
  4056.                     r = -1,
  4057.                     a = [],
  4058.                     l = e(this),
  4059.                     c = !1,
  4060.                     u = {
  4061.                         set_value: function(t) {
  4062.                             l.val(a[r].title), s = a[r].id, e("#comb_spr_result_" + i.valueInput).hide(), e("#comb_spr_results_" + i.valueInput).html(""), e("#" + i.valueInput).val(a[r].id), "null" != i.childPlugin && e("#" + i.childPlugin).trigger("enable"), "null" != i.childBlock && 0 != a[r].id && e("#" + i.childBlock).show(), console.log("setting value " + a[r].title), "null" != i.childPlugin && e("#" + i.childPlugin).focus(), "function" == typeof i.onSelect && i.onSelect.call(this), clearTimeout(o)
  4063.                         },
  4064.                         update_current: function(t) {
  4065.                             e("#comb_spr_results_" + i.valueInput).children("a").removeClass("current"), r >= 0 && (e(".combspr_item:eq(" + r + ")").addClass("current"), e("#comb_spr_results_" + i.valueInput).scrollTop(e("#comb_spr_results_" + i.valueInput).scrollTop() + e(".combspr_item:eq(" + r + ")").position().top - e("#comb_spr_results_" + i.valueInput).height() / 2 + e(".combspr_item:eq(" + r + ")").height() / 2))
  4066.                         },
  4067.                         fetch_result: function(o) {
  4068.                             console.log("fetch result");
  4069.                             var n = e(this).val(),
  4070.                                 s = {
  4071.                                     query: e(this).val()
  4072.                                 };
  4073.                             null != i.field && (s[i.field] = e("#" + i.fieldValue).val()), t && t.abort(), t = e.ajax({
  4074.                                 type: "GET",
  4075.                                 url: i.dataurl,
  4076.                                 data: s,
  4077.                                 dataType: "json",
  4078.                                 timeout: 3e4,
  4079.                                 success: function(t) {
  4080.                                     "ok" == t.status && (a = t.result, r = -1, u.show_results.apply(this, {
  4081.                                         value: n
  4082.                                     }), a.length > 0 && (e("#comb_spr_result_" + i.valueInput).show(), e("#comb_spr_results_" + i.valueInput).show()))
  4083.                                 },
  4084.                                 error: function() {
  4085.                                     console.log("ajax error")
  4086.                                 }
  4087.                             })
  4088.                         },
  4089.                         show_results: function(t, o) {
  4090.                             if (e("#comb_spr_results_" + i.valueInput).html(""), 0 == a.length);
  4091.                             else {
  4092.                                 var s = !1;
  4093.                                 a.forEach(function(t, o, a) {
  4094.                                     var l = "";
  4095.                                     if ("" != n) {
  4096.                                         var c = new RegExp("(" + n + ")", "ig");
  4097.                                         l = t.title.replace(c, "<b>$1</b>"), s || (r = o, s = !0)
  4098.                                     } else l = t.title;
  4099.                                     var u = '<a href="#" rel="' + o + '" class="combspr_item">' + l;
  4100.                                     "" != t.subtitle && (u += '<div class="comb_spr_sub">' + t.subtitle + "</div>"), u += "</a>", e("#comb_spr_results_" + i.valueInput).append(u)
  4101.                                 }), u.update_current.apply(this, ["top"])
  4102.                             }
  4103.                         }
  4104.                     };
  4105.                 e(this).attr("autocomplete", "off"), e(this).wrap('<div id="combspr_div_' + i.valueInput + '" class="combspr_div"><div class="comb_spr_inp"></div></div>'), e(this).addClass("combspr");
  4106.                 var p = i.width - 34;
  4107.                 e(this).css("width", p + "px"), e(this).after('<b class="button comb_spr_button">â–¾</b>'), e(this).after('<input type="hidden" name="' + i.valueInput + '" id="' + i.valueInput + '">'), e("#" + i.valueInput).val(i.value), e(this).val(i.valueText), e(this).parent("div.comb_spr_inp").parent("div.combspr_div").append('<div id="comb_spr_result_' + i.valueInput + '" class="results"><div class="inner" id="comb_spr_results_' + i.valueInput + '">&nbsp;</div></div>'), i.zIndex > 0 && (e(this).parent("div.comb_spr_inp").css("z-index", i.zIndex, "important"), e(this).parent("div.comb_spr_inp").parent("div.combspr_div").children("div.results").css("z-index", --i.zIndex, "important")), "null" != i.childPlugin && 0 == e("#" + i.valueInput).val() && e("#" + i.childPlugin).trigger("disable"), "" != i.placeholder && e(this).attr("placeholder", i.placeholder), e(this).focus(function() {
  4108.                     e("#comb_spr_result_" + i.valueInput).show(), u.fetch_result.apply(this, {})
  4109.                 }), e("#comb_spr_results_" + i.valueInput).on("click", "a", function() {
  4110.                     return r = parseInt(e(this).attr("rel")), console.log("a clicked index " + r), u.set_value.apply(this), !1
  4111.                 }), e("#combspr_div_" + i.valueInput).on("click", ".comb_spr_button", function() {
  4112.                     return c ? !1 : (e("#comb_spr_result_" + i.valueInput).show(), void u.fetch_result.apply(this, {}))
  4113.                 }), e(this).keydown(function(e) {
  4114.                     var t = e.keyCode || e.which;
  4115.                     13 == t ? (a.length > 0 && r >= 0 && u.set_value.apply(this), e.preventDefault()) : 38 == t ? (a.length > 0 && r > 0 && (r--, u.update_current.apply(this, ["top"])), e.preventDefault()) : 40 == t && (a.length > 0 && r < a.length - 1 && (r++, u.update_current.apply(this, ["bottom"])), e.preventDefault())
  4116.                 }), e(this).keyup(function(t) {
  4117.                     var o = t.keyCode || t.which;
  4118.                     console.log("keyup " + o), 13 != o && 38 != o && 40 != o && (s = 0, n = e(this).val(), u.fetch_result.apply(this, {}), "null" != i.childPlugin && (e("#" + i.childPlugin).trigger("clearvalue"), e("#" + i.childPlugin).trigger("disable"), "null" != i.childBlock && e("#" + i.childBlock).hide()))
  4119.                 }), e(this).blur(function() {
  4120.                     o = setTimeout(function() {
  4121.                         0 == s && (l.val(""), e("#" + i.valueInput).val(0), "function" == typeof i.onClear && i.onClear.call(this)), a = [], r = -1, e("#comb_spr_result_" + i.valueInput).hide(), e("#comb_spr_results_" + i.valueInput).html("")
  4122.                     }, 150)
  4123.                 }), e(this).bind("disable", function() {
  4124.                     c = !0, e(this).attr("disabled", "disabled"), e(this).parent("div.comb_spr_inp").addClass("comb_spr_inp_dis"), console.log("disable")
  4125.                 }), e(this).bind("enable", function() {
  4126.                     c = !1, e(this).removeAttr("disabled"), e(this).parent("div.comb_spr_inp").removeClass("comb_spr_inp_dis"), console.log("enable")
  4127.                 }), e(this).bind("clearvalue", function() {
  4128.                     e("#" + i.valueInput).val(0), e(this).val(""), e("#comb_spr_result_" + i.valueInput).hide(), e("#comb_spr_results_" + i.valueInput).html(""), a = [], r = -1
  4129.                 }), "null" != i.fieldValue && 0 == e("#" + i.fieldValue).val() && (console.log("so what?"), e(this).trigger("disable")), "null" != i.childBlock && 0 == e("#" + i.valueInput).val() && e("#" + i.childBlock).hide()
  4130.             })
  4131.         }
  4132.     }(jQuery),
  4133.     function() {
  4134.         ! function(e) {
  4135.             var t, i;
  4136.             return t = function() {
  4137.                 function t(t, i, o, n) {
  4138.                     var s, r, a;
  4139.                     if (s = this._normalize_args(t, i, o, n), this.$container = s.$container, this.target = s.target, a = s.init_options, this._is_window = !this.$container[0].nodeName || -1 !== e.inArray(this.$container[0].nodeName.toLowerCase(), ["iframe", "#document", "html", "body"]), this._is_window && (this.$container = e(this.$container[0].contentWindow || window), a.container = this.$container), this._$container_for_scroll = this.$container.is(e(window)) ? e("body, html") : this.$container, a = this._normalize_options(a), this.options = e.extend(!0, {}, this.constructor.defaults, a), this.options = this._normalize_mode_options(this.options), null == this.target) return e.extend(!0, this.constructor.defaults, a), this._set_status("cancel"), this;
  4140.                     if (this._is_in_motion()) {
  4141.                         if (!this.constructor.last_scrollport.options.interrupt_scrollport) return this._set_status("cancel"), this;
  4142.                         this.constructor.last_scrollport.stop("interrupt")
  4143.                     }
  4144.                     return this.final_position = this._get_final_position(this.target), this.final_position.top_distance + this.final_position.left_distance === 0 ? (this._set_status("cancel"), this) : (r = this._$container_for_scroll.offset(), this.scroll_position = {
  4145.                         top: this.$container.scrollTop(),
  4146.                         left: this.$container.scrollLeft()
  4147.                     }, this.constructor.last_scrollport = this, this._do_scroll(this.final_position))
  4148.                 }
  4149.                 return t.defaults = {
  4150.                     mode: "usual",
  4151.                     interrupt: null,
  4152.                     interrupt_user: !0,
  4153.                     interrupt_scrollport: !0,
  4154.                     container: e(window),
  4155.                     delta: {
  4156.                         top: 0,
  4157.                         left: 0
  4158.                     },
  4159.                     on_start: null,
  4160.                     on_stop: null,
  4161.                     on_interrupt: null,
  4162.                     on_finish: null
  4163.                 }, t.prototype._normalize_args = function(t, i, o, n) {
  4164.                     var s, r;
  4165.                     return s = {}, r = null, null != n ? (s = n, r = {
  4166.                         top: parseFloat(i),
  4167.                         left: parseFloat(o)
  4168.                     }) : null != o ? !isNaN(parseFloat(o)) && isFinite(o) ? r = {
  4169.                         top: parseFloat(i),
  4170.                         left: parseFloat(o)
  4171.                     } : (s = o, r = !isNaN(parseFloat(i)) && isFinite(i) ? {
  4172.                         top: parseFloat(i)
  4173.                     } : i) : null != i && (!isNaN(parseFloat(i)) && isFinite(i) ? r = {
  4174.                         top: parseFloat(i)
  4175.                     } : "object" != typeof i || i instanceof jQuery ? r = i : s = i), null == t && (t = null != s.container ? s.container : e(window)), s.container = t, {
  4176.                         $container: t,
  4177.                         target: r,
  4178.                         init_options: s
  4179.                     }
  4180.                 }, t.last_scrollport = !1, t.prototype.status = "init", t.prototype._is_window = function(t) {
  4181.                     return !t.nodeName || -1 !== e.inArray(t.nodeName.toLowerCase(), ["iframe", "#document", "html", "body"])
  4182.                 }, t.prototype._get_final_position = function(t) {
  4183.                     var i, o, n, s, r, a, l, c, u, p, d, _, h, f, m, g, v;
  4184.                     return _ = this.$container.scrollTop(), d = this.$container.scrollLeft(), t instanceof jQuery || "object" == typeof t ? t instanceof jQuery && (i = t) : i = e(t), s = this._$container_for_scroll.offset(), l = s.top, n = s.left, r = this._$container_for_scroll[0].scrollHeight, a = this._$container_for_scroll[0].scrollWidth, o = this.$container.innerHeight(), c = this.$container.innerWidth(), null != i ? (f = i.offset(), m = f.top - this.options.delta.top, h = f.left - this.options.delta.left) : (m = null != t.top ? t.top - this.options.delta.top : _, h = null != t.left ? t.left - this.options.delta.left : d), c >= a ? (u = 0, p = 0) : (u = h + (this._is_window ? 0 : d) - n, u > a - c && (u = a - c), p = u - d), o >= r ? (g = 0, v = 0) : (g = m + (this._is_window ? 0 : _) - l, g > r - o && (g = r - o), v = g - _), {
  4185.                         top: g,
  4186.                         left: u,
  4187.                         top_distance: v,
  4188.                         left_distance: p
  4189.                     }
  4190.                 }, t.prototype._get_distance_betwin_points = function(e, t, i, o) {
  4191.                     var n, s;
  4192.                     return s = o - t, n = i - e, Math.sqrt(s * s + n * n)
  4193.                 }, t.prototype._get_point_betwin_points = function(e, t, i, o, n) {
  4194.                     var s, r, a, l;
  4195.                     return l = o - t, a = i - e, s = Math.sqrt(l * l + a * a), 0 > n && (n = s + n), r = n / s, {
  4196.                         left: e + a * r,
  4197.                         top: t + l * r
  4198.                     }
  4199.                 }, t.prototype._modes = {
  4200.                     usual: {
  4201.                         defaults: {
  4202.                             easing: "swing",
  4203.                             duration: 700
  4204.                         },
  4205.                         do_scroll: function(e, t) {
  4206.                             return e._$container_for_scroll.stop(!0).animate({
  4207.                                 scrollTop: t.top,
  4208.                                 scrollLeft: t.left
  4209.                             }, e.options.duration, e.options.easing, function() {
  4210.                                 return e._$container_for_scroll.last().is(this) ? e.stop("finish") : void 0
  4211.                             })
  4212.                         },
  4213.                         stop_scroll: function(e, t) {
  4214.                             return e._$container_for_scroll.stop(!0), e._set_status(t), e._call_end_callbacks()
  4215.                         }
  4216.                     },
  4217.                     roll: {
  4218.                         defaults: {
  4219.                             easing: "swing",
  4220.                             speed: 2500,
  4221.                             max_duration: 700,
  4222.                             min_duration: 300
  4223.                         },
  4224.                         do_scroll: function(e, t) {
  4225.                             var i, o;
  4226.                             return i = Math.sqrt(t.top_distance * t.top_distance + t.left_distance * t.left_distance), o = i / e.options.speed * 1e3, e.options.max_duration && o < e.options.min_duration && (o = e.options.min_duration), e.options.min_duration && o > e.options.max_duration && (o = e.options.max_duration), e._$container_for_scroll.stop(!0).animate({
  4227.                                 scrollTop: t.top,
  4228.                                 scrollLeft: t.left
  4229.                             }, o, e.options.easing, function() {
  4230.                                 return e._$container_for_scroll.last().is(this) ? e.stop("finish") : void 0
  4231.                             }), e
  4232.                         },
  4233.                         stop_scroll: function(e, t) {
  4234.                             return e._$container_for_scroll.stop(!0), e._set_status(t), e._call_end_callbacks()
  4235.                         }
  4236.                     },
  4237.                     hard: {
  4238.                         defaults: {
  4239.                             easing: "swing",
  4240.                             distance: 5,
  4241.                             duration: 100
  4242.                         },
  4243.                         do_scroll: function(e, t) {
  4244.                             var i;
  4245.                             return i = e._get_point_betwin_points(e.scroll_position.left, e.scroll_position.top, t.left, t.top, -e.options.distance), e._$container_for_scroll.scrollTop(i.top).scrollLeft(i.left), e._$container_for_scroll.stop(!0).animate({
  4246.                                 scrollTop: t.top,
  4247.                                 scrollLeft: t.left
  4248.                             }, e.options.duration, e.options.easing, function() {
  4249.                                 return e._$container_for_scroll.last().is(this) ? e.stop("finish") : void 0
  4250.                             }), e
  4251.                         },
  4252.                         stop_scroll: function(e, t) {
  4253.                             return e._$container_for_scroll.stop(!0), e._set_status(t), e._call_end_callbacks()
  4254.                         }
  4255.                     },
  4256.                     soft: {
  4257.                         defaults: {
  4258.                             easing: null,
  4259.                             easing_before: "swing",
  4260.                             easing_after: "swing",
  4261.                             distance: null,
  4262.                             distance_before: 200,
  4263.                             distance_after: 200,
  4264.                             duration: null,
  4265.                             duration_before: 200,
  4266.                             duration_after: 400,
  4267.                             speed: null,
  4268.                             waiting: 100
  4269.                         },
  4270.                         do_scroll: function(i, o) {
  4271.                             var n, s, r, a;
  4272.                             return a = Math.sqrt(o.top_distance * o.top_distance + o.left_distance * o.left_distance), a < 1.5 * (i.options.distance_before + i.options.distance_before) ? null != i.target.top ? null != i.target.left ? new t(i.$container, i.target.top, i.target.left, e.extend(!0, {}, i.options, {
  4273.                                 mode: "roll",
  4274.                                 speed: i.options.speed
  4275.                             })) : new t(i.$container, i.target.top, e.extend(!0, {}, i.options, {
  4276.                                 mode: "roll",
  4277.                                 speed: i.options.speed
  4278.                             })) : new t(i.$container, i.target, e.extend(!0, {}, i.options, {
  4279.                                 mode: "roll",
  4280.                                 speed: i.options.speed
  4281.                             })) : (r = i._get_point_betwin_points(i.scroll_position.left, i.scroll_position.top, o.left, o.top, i.options.distance_before), s = i._get_point_betwin_points(i.scroll_position.left, i.scroll_position.top, o.left, o.top, -i.options.distance_after), n = i._get_or_create_overlay(), n.stop(!0).show().animate({
  4282.                                 opacity: 1
  4283.                             }, i.options.duration_before), i._$container_for_scroll.stop(!0).animate({
  4284.                                 scrollTop: r.top,
  4285.                                 scrollLeft: r.left
  4286.                             }, i.options.duration_before, i.options.easing_before, function() {
  4287.                                 return i._$container_for_scroll.last().is(this) ? (i._$container_for_scroll.scrollTop(s.top).scrollLeft(s.left), n.animate({
  4288.                                     opacity: 1
  4289.                                 }, i.options.waiting, function() {
  4290.                                     return n.stop(!0).animate({
  4291.                                         opacity: 0
  4292.                                     }, i.options.duration_after, function() {
  4293.                                         return n.hide()
  4294.                                     }), i._$container_for_scroll.stop(!0).animate({
  4295.                                         scrollTop: o.top,
  4296.                                         scrollLeft: o.left
  4297.                                     }, i.options.duration_after, i.options.easing_after, function() {
  4298.                                         return i._$container_for_scroll.last().is(this) ? i.stop("finish") : void 0
  4299.                                     })
  4300.                                 })) : void 0
  4301.                             }), i)
  4302.                         },
  4303.                         stop_scroll: function(e, t) {
  4304.                             var i, o, n;
  4305.                             return i = e._get_or_create_overlay(), "none" === i.css("display") ? (e._set_status(t), void e._call_end_callbacks()) : (n = parseFloat(i.css("opacity")), o = e.options.duration_after * n, e._$container_for_scroll.stop(!0), e._set_status(t), e._call_end_callbacks(), i.stop(!0).animate({
  4306.                                 opacity: 0
  4307.                             }, o, function() {
  4308.                                 return i.hide()
  4309.                             }))
  4310.                         }
  4311.                     }
  4312.                 }, t.prototype.stop = function(e) {
  4313.                     return this._modes[this.options.mode].stop_scroll(this, e), this._$container_for_scroll.off("mousewheel.scrollport DOMMouseScroll.scrollport")
  4314.                 }, t.prototype._do_scroll = function(e) {
  4315.                     var t;
  4316.                     return t = this, this._$container_for_scroll.on("mousewheel.scrollport DOMMouseScroll.scrollport", function(e) {
  4317.                         return t.options.interrupt_user ? (t._$container_for_scroll.off("mousewheel.scrollport DOMMouseScroll.scrollport"), t.stop("interrupt")) : e.preventDefault()
  4318.                     }), this._set_status("motion"), null != this.options.on_start && this.options.on_start.call(this._$container_for_scroll, this), this._modes[this.options.mode].do_scroll(this, e)
  4319.                 }, t.prototype._set_status = function(e) {
  4320.                     return this.status = e
  4321.                 }, t.prototype._is_in_motion = function() {
  4322.                     return !!this.constructor.last_scrollport && "motion" === this.constructor.last_scrollport.status
  4323.                 }, t.prototype._call_end_callbacks = function() {
  4324.                     return null != this.options.on_stop && this.options.on_stop.call(this._$container_for_scroll, this), null != this.options.on_finish && "finish" === this.status && this.options.on_finish.call(this._$container_for_scroll, this), null != this.options.on_interrupt && "interrupt" === this.status ? this.options.on_interrupt.call(this._$container_for_scroll, this) : void 0
  4325.                 }, t.prototype._get_or_create_overlay = function() {
  4326.                     return null != this.constructor._$overlay && e(".scrollport-overlay").length ? this.constructor._$overlay.css({
  4327.                         width: this._$container_for_scroll[0].scrollWidth,
  4328.                         height: this._$container_for_scroll[0].scrollHeight
  4329.                     }) : (this.constructor._$overlay = e("<div>").attr("class", "scrollport-overlay").hide().appendTo(this._$container_for_scroll.first()).css({
  4330.                         backgroundColor: "#ffffff",
  4331.                         width: this._$container_for_scroll[0].scrollWidth,
  4332.                         height: this._$container_for_scroll[0].scrollHeight,
  4333.                         top: "0",
  4334.                         left: "0",
  4335.                         position: "absolute",
  4336.                         opacity: 0
  4337.                     }), this.constructor._$overlay)
  4338.                 }, t.prototype._normalize_options = function(e) {
  4339.                     return null != e.delta && ("object" == typeof e.delta ? (e.delta.top = null != e.delta.top ? parseFloat(e.delta.top) : 0, e.delta.left = null != e.delta.left ? parseFloat(e.delta.left) : 0) : e.delta = {
  4340.                         top: e.delta,
  4341.                         left: 0
  4342.                     }), null != e.interrupt && (e.interrupt_user = e.interrupt, e.interrupt_scrollport = e.interrupt), e
  4343.                 }, t.prototype._normalize_mode_options = function(t) {
  4344.                     return t = e.extend(!0, {}, this._modes[this.options.mode].defaults, t), "soft" === t.mode && (null != t.distance && (t.distance_before = t.distance, t.distance_after = t.distance), null != t.duration && (t.duration_before = t.duration, t.duration_after = t.duration), null != t.easing && (t.easing_before = t.easing, t.easing_after = t.easing), null == t.speed && (t.speed = (t.distance_before + t.distance_after) / (t.duration_before + t.duration_after) * 1e3)), t
  4345.                 }, t
  4346.             }(), i = function() {
  4347.                 function i(i, o, n, s, r) {
  4348.                     var a, l, c, u, p, d, _;
  4349.                     if (d = this, a = this._normalize_args(o, n, s, r), this.$link = i, this.target = a.target, this.$container = a.$container, _ = a.scrollport_options, null == this.target) {
  4350.                         for (c = ["data-scrollport", "href", "data-href"], u = !1, p = 0; !u && p < c.length;) l = this.$link.attr(c[p]), null != l && "" !== l && (u = !0), p++;
  4351.                         if (!u) return;
  4352.                         this.target = e(l)
  4353.                     }
  4354.                     this.$link.on("click", function(e) {
  4355.                         return e.preventDefault(), null != this.target.top ? null != this.target.left ? new t(d.$container, d.target.top, d.target.left, _) : new t(d.$container, d.target.top, _) : new t(d.$container, d.target, _)
  4356.                     })
  4357.                 }
  4358.                 return i.prototype._normalize_args = function(e, t, i, o) {
  4359.                     var n, s, r;
  4360.                     return n = null, s = {}, r = null, null != o ? (s = o, n = i, r = {
  4361.                         top: e,
  4362.                         left: t
  4363.                     }) : null != i ? i instanceof jQuery ? (n = i, r = {
  4364.                         top: e,
  4365.                         left: t
  4366.                     }) : (s = i, t instanceof jQuery ? (n = t, r = !isNaN(parseFloat(e)) && isFinite(e) ? {
  4367.                         top: e
  4368.                     } : e) : r = {
  4369.                         top: e,
  4370.                         left: t
  4371.                     }) : null != t ? !isNaN(parseFloat(t)) && isFinite(t) ? r = {
  4372.                         top: e,
  4373.                         left: t
  4374.                     } : t instanceof jQuery ? (n = t, r = !isNaN(parseFloat(e)) && isFinite(e) ? {
  4375.                         top: e
  4376.                     } : e) : (s = t, r = !isNaN(parseFloat(e)) && isFinite(e) ? {
  4377.                         top: e
  4378.                     } : e) : null != e && (!isNaN(parseFloat(e)) && isFinite(e) ? r = {
  4379.                         top: e
  4380.                     } : "object" != typeof e || e instanceof jQuery ? r = e : s = e), {
  4381.                         $container: n,
  4382.                         target: r,
  4383.                         scrollport_options: s
  4384.                     }
  4385.                 }, i
  4386.             }(), e.scrollport = function(e, i, o) {
  4387.                 return new t(null, e, i, o)
  4388.             }, e.fn.scrollport = function(e, i, o) {
  4389.                 return new t(this.first(), e, i, o), this
  4390.             }, e.fn.scrollport_link = function(t, o, n, s) {
  4391.                 return this.each(function() {
  4392.                     return new i(e(this), t, o, n, s)
  4393.                 })
  4394.             }, e(function() {
  4395.                 return e("[data-scrollport]").scrollport_link()
  4396.             })
  4397.         }(jQuery)
  4398.     }.call(this),
  4399.     function(e) {
  4400.         "function" == typeof define && define.amd ? define(["jquery"], e) : e(window.jQuery)
  4401.     }(function(e) {
  4402.         e.fn.numeric = function(t, i) {
  4403.             "boolean" == typeof t && (t = {
  4404.                 decimal: t,
  4405.                 negative: !0,
  4406.                 decimalPlaces: -1
  4407.             }), t = t || {}, "undefined" == typeof t.negative && (t.negative = !0);
  4408.             var o = t.decimal === !1 ? "" : t.decimal || ".",
  4409.                 n = t.negative === !0 ? !0 : !1,
  4410.                 s = "undefined" == typeof t.decimalPlaces ? -1 : t.decimalPlaces;
  4411.             return i = "function" == typeof i ? i : function() {}, this.data("numeric.decimal", o).data("numeric.negative", n).data("numeric.callback", i).data("numeric.decimalPlaces", s).keypress(e.fn.numeric.keypress).keyup(e.fn.numeric.keyup).blur(e.fn.numeric.blur)
  4412.         }, e.fn.numeric.keypress = function(t) {
  4413.             var i = e.data(this, "numeric.decimal"),
  4414.                 o = e.data(this, "numeric.negative"),
  4415.                 n = e.data(this, "numeric.decimalPlaces"),
  4416.                 s = t.charCode ? t.charCode : t.keyCode ? t.keyCode : 0;
  4417.             if (13 == s && "input" == this.nodeName.toLowerCase()) return !0;
  4418.             if (13 == s) return !1;
  4419.             var r = !1;
  4420.             if (t.ctrlKey && 97 == s || t.ctrlKey && 65 == s) return !0;
  4421.             if (t.ctrlKey && 120 == s || t.ctrlKey && 88 == s) return !0;
  4422.             if (t.ctrlKey && 99 == s || t.ctrlKey && 67 == s) return !0;
  4423.             if (t.ctrlKey && 122 == s || t.ctrlKey && 90 == s) return !0;
  4424.             if (t.ctrlKey && 118 == s || t.ctrlKey && 86 == s || t.shiftKey && 45 == s) return !0;
  4425.             if (48 > s || s > 57) {
  4426.                 var a = e(this).val();
  4427.                 if (0 !== e.inArray("-", a.split("")) && o && 45 == s && (0 === a.length || 0 === parseInt(e.fn.getSelectionStart(this), 10))) return !0;
  4428.                 i && s == i.charCodeAt(0) && -1 != e.inArray(i, a.split("")) && (r = !1), 8 != s && 9 != s && 13 != s && 35 != s && 36 != s && 37 != s && 39 != s && 46 != s ? r = !1 : "undefined" != typeof t.charCode && (t.keyCode == t.which && 0 !== t.which ? (r = !0, 46 == t.which && (r = !1)) : 0 !== t.keyCode && 0 === t.charCode && 0 === t.which && (r = !0)), i && s == i.charCodeAt(0) && (r = -1 == e.inArray(i, a.split("")) ? !0 : !1)
  4429.             } else if (r = !0, i && n > 0) {
  4430.                 var l = e.fn.getSelectionStart(this),
  4431.                     c = e.fn.getSelectionEnd(this),
  4432.                     u = e.inArray(i, e(this).val().split(""));
  4433.                 l === c && u >= 0 && l > u && e(this).val().length > u + n && (r = !1)
  4434.             }
  4435.             return r
  4436.         }, e.fn.numeric.keyup = function(t) {
  4437.             var i = e(this).val();
  4438.             if (i && i.length > 0) {
  4439.                 var o = e.fn.getSelectionStart(this),
  4440.                     n = e.fn.getSelectionEnd(this),
  4441.                     s = e.data(this, "numeric.decimal"),
  4442.                     r = e.data(this, "numeric.negative"),
  4443.                     a = e.data(this, "numeric.decimalPlaces");
  4444.                 if ("" !== s && null !== s) {
  4445.                     var l = e.inArray(s, i.split(""));
  4446.                     0 === l && (this.value = "0" + i, o++, n++), 1 == l && "-" == i.charAt(0) && (this.value = "-0" + i.substring(1), o++, n++), i = this.value
  4447.                 }
  4448.                 for (var c = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "-", s], u = i.length, p = u - 1; p >= 0; p--) {
  4449.                     var d = i.charAt(p);
  4450.                     0 !== p && "-" == d ? i = i.substring(0, p) + i.substring(p + 1) : 0 !== p || r || "-" != d || (i = i.substring(1));
  4451.                     for (var _ = !1, h = 0; h < c.length; h++)
  4452.                         if (d == c[h]) {
  4453.                             _ = !0;
  4454.                             break
  4455.                         }
  4456.                     _ && " " != d || (i = i.substring(0, p) + i.substring(p + 1))
  4457.                 }
  4458.                 var f = e.inArray(s, i.split(""));
  4459.                 if (f > 0)
  4460.                     for (var m = u - 1; m > f; m--) {
  4461.                         var g = i.charAt(m);
  4462.                         g == s && (i = i.substring(0, m) + i.substring(m + 1))
  4463.                     }
  4464.                 if (s && a > 0) {
  4465.                     var l = e.inArray(s, i.split(""));
  4466.                     l >= 0 && (i = i.substring(0, l + a + 1), n = Math.min(i.length, n))
  4467.                 }
  4468.                 this.value = i, e.fn.setSelection(this, [o, n])
  4469.             }
  4470.         }, e.fn.numeric.blur = function() {
  4471.             var t = e.data(this, "numeric.decimal"),
  4472.                 i = e.data(this, "numeric.callback"),
  4473.                 o = e.data(this, "numeric.negative"),
  4474.                 n = this.value;
  4475.             if ("" !== n) {
  4476.                 var s = new RegExp(o ? "-?" : "^\\d+$|^\\d*" + t + "\\d+$");
  4477.                 s.exec(n) || i.apply(this)
  4478.             }
  4479.         }, e.fn.removeNumeric = function() {
  4480.             return this.data("numeric.decimal", null).data("numeric.negative", null).data("numeric.callback", null).data("numeric.decimalPlaces", null).unbind("keypress", e.fn.numeric.keypress).unbind("keyup", e.fn.numeric.keyup).unbind("blur", e.fn.numeric.blur)
  4481.         }, e.fn.getSelectionStart = function(e) {
  4482.             if ("number" === e.type) return void 0;
  4483.             if (e.createTextRange && document.selection) {
  4484.                 var t = document.selection.createRange().duplicate();
  4485.                 return t.moveEnd("character", e.value.length), "" == t.text ? e.value.length : Math.max(0, e.value.lastIndexOf(t.text))
  4486.             }
  4487.             try {
  4488.                 return e.selectionStart
  4489.             } catch (i) {
  4490.                 return 0
  4491.             }
  4492.         }, e.fn.getSelectionEnd = function(e) {
  4493.             if ("number" === e.type) return void 0;
  4494.             if (e.createTextRange && document.selection) {
  4495.                 var t = document.selection.createRange().duplicate();
  4496.                 return t.moveStart("character", -e.value.length), t.text.length
  4497.             }
  4498.             return e.selectionEnd
  4499.         }, e.fn.setSelection = function(e, t) {
  4500.             if ("number" == typeof t && (t = [t, t]), t && t.constructor == Array && 2 == t.length)
  4501.                 if ("number" === e.type) e.focus();
  4502.                 else if (e.createTextRange) {
  4503.                 var i = e.createTextRange();
  4504.                 i.collapse(!0), i.moveStart("character", t[0]), i.moveEnd("character", t[1] - t[0]), i.select()
  4505.             } else {
  4506.                 e.focus();
  4507.                 try {
  4508.                     e.setSelectionRange && e.setSelectionRange(t[0], t[1])
  4509.                 } catch (o) {}
  4510.             }
  4511.         }
  4512.     }),
  4513.     function(e, t) {
  4514.         "use strict";
  4515.         var i = "undefined" != typeof module;
  4516.         i && (e = global, e.JS_MD5_TEST && (e.navigator = {
  4517.             userAgent: "Firefox"
  4518.         }));
  4519.         var o, n = (e.JS_MD5_TEST || !i) && -1 != navigator.userAgent.indexOf("Firefox"),
  4520.             s = !e.JS_MD5_TEST && "undefined" != typeof ArrayBuffer,
  4521.             r = "0123456789abcdef".split(""),
  4522.             a = [128, 32768, 8388608, -2147483648],
  4523.             l = [0, 8, 16, 24],
  4524.             c = [];
  4525.         if (s) {
  4526.             var u = new ArrayBuffer(68);
  4527.             o = new Uint8Array(u), c = new Uint32Array(u)
  4528.         }
  4529.         var p = function(e) {
  4530.             var t = "string" != typeof e;
  4531.             t && e.constructor == ArrayBuffer && (e = new Uint8Array(e));
  4532.             var i, u, p, d, _, h, f, m, g, v, $, y, b = !0,
  4533.                 w = !1,
  4534.                 k = 0,
  4535.                 x = 0,
  4536.                 S = 0,
  4537.                 C = e.length;
  4538.             c[16] = 0;
  4539.             do {
  4540.                 if (c[0] = c[16], c[16] = c[1] = c[2] = c[3] = c[4] = c[5] = c[6] = c[7] = c[8] = c[9] = c[10] = c[11] = c[12] = c[13] = c[14] = c[15] = 0, t)
  4541.                     if (s)
  4542.                         for (y = x; C > k && 64 > y; ++k) o[y++] = e[k];
  4543.                     else
  4544.                         for (y = x; C > k && 64 > y; ++k) c[y >> 2] |= e[k] << l[3 & y++];
  4545.                 else if (s)
  4546.                     for (y = x; C > k && 64 > y; ++k) $ = e.charCodeAt(k), 128 > $ ? o[y++] = $ : 2048 > $ ? (o[y++] = 192 | $ >> 6, o[y++] = 128 | 63 & $) : 55296 > $ || $ >= 57344 ? (o[y++] = 224 | $ >> 12, o[y++] = 128 | $ >> 6 & 63, o[y++] = 128 | 63 & $) : ($ = 65536 + ((1023 & $) << 10 | 1023 & e.charCodeAt(++k)), o[y++] = 240 | $ >> 18, o[y++] = 128 | $ >> 12 & 63, o[y++] = 128 | $ >> 6 & 63, o[y++] = 128 | 63 & $);
  4547.                 else
  4548.                     for (y = x; C > k && 64 > y; ++k) $ = e.charCodeAt(k), 128 > $ ? c[y >> 2] |= $ << l[3 & y++] : 2048 > $ ? (c[y >> 2] |= (192 | $ >> 6) << l[3 & y++], c[y >> 2] |= (128 | 63 & $) << l[3 & y++]) : 55296 > $ || $ >= 57344 ? (c[y >> 2] |= (224 | $ >> 12) << l[3 & y++], c[y >> 2] |= (128 | $ >> 6 & 63) << l[3 & y++], c[y >> 2] |= (128 | 63 & $) << l[3 & y++]) : ($ = 65536 + ((1023 & $) << 10 | 1023 & e.charCodeAt(++k)), c[y >> 2] |= (240 | $ >> 18) << l[3 & y++], c[y >> 2] |= (128 | $ >> 12 & 63) << l[3 & y++], c[y >> 2] |= (128 | $ >> 6 & 63) << l[3 & y++], c[y >> 2] |= (128 | 63 & $) << l[3 & y++]);
  4549.                 S += y - x, x = y - 64, k == C && (c[y >> 2] |= a[3 & y], ++k), k > C && 56 > y && (c[14] = S << 3, w = !0), b ? (_ = c[0] - 680876937, _ = (_ << 7 | _ >>> 25) - 271733879 << 0, m = (-1732584194 ^ 2004318071 & _) + c[1] - 117830708, m = (m << 12 | m >>> 20) + _ << 0, f = (-271733879 ^ m & (-271733879 ^ _)) + c[2] - 1126478375, f = (f << 17 | f >>> 15) + m << 0, h = (_ ^ f & (m ^ _)) + c[3] - 1316259209, h = (h << 22 | h >>> 10) + f << 0) : (_ = i, h = u, f = p, m = d, _ += (m ^ h & (f ^ m)) + c[0] - 680876936, _ = (_ << 7 | _ >>> 25) + h << 0, m += (f ^ _ & (h ^ f)) + c[1] - 389564586, m = (m << 12 | m >>> 20) + _ << 0, f += (h ^ m & (_ ^ h)) + c[2] + 606105819, f = (f << 17 | f >>> 15) + m << 0, h += (_ ^ f & (m ^ _)) + c[3] - 1044525330, h = (h << 22 | h >>> 10) + f << 0), _ += (m ^ h & (f ^ m)) + c[4] - 176418897, _ = (_ << 7 | _ >>> 25) + h << 0, m += (f ^ _ & (h ^ f)) + c[5] + 1200080426, m = (m << 12 | m >>> 20) + _ << 0, f += (h ^ m & (_ ^ h)) + c[6] - 1473231341, f = (f << 17 | f >>> 15) + m << 0, h += (_ ^ f & (m ^ _)) + c[7] - 45705983, h = (h << 22 | h >>> 10) + f << 0, _ += (m ^ h & (f ^ m)) + c[8] + 1770035416, _ = (_ << 7 | _ >>> 25) + h << 0, m += (f ^ _ & (h ^ f)) + c[9] - 1958414417, m = (m << 12 | m >>> 20) + _ << 0, f += (h ^ m & (_ ^ h)) + c[10] - 42063, f = (f << 17 | f >>> 15) + m << 0, h += (_ ^ f & (m ^ _)) + c[11] - 1990404162, h = (h << 22 | h >>> 10) + f << 0, _ += (m ^ h & (f ^ m)) + c[12] + 1804603682, _ = (_ << 7 | _ >>> 25) + h << 0, m += (f ^ _ & (h ^ f)) + c[13] - 40341101, m = (m << 12 | m >>> 20) + _ << 0, f += (h ^ m & (_ ^ h)) + c[14] - 1502002290, f = (f << 17 | f >>> 15) + m << 0, h += (_ ^ f & (m ^ _)) + c[15] + 1236535329, h = (h << 22 | h >>> 10) + f << 0, _ += (f ^ m & (h ^ f)) + c[1] - 165796510, _ = (_ << 5 | _ >>> 27) + h << 0, m += (h ^ f & (_ ^ h)) + c[6] - 1069501632, m = (m << 9 | m >>> 23) + _ << 0, f += (_ ^ h & (m ^ _)) + c[11] + 643717713, f = (f << 14 | f >>> 18) + m << 0, h += (m ^ _ & (f ^ m)) + c[0] - 373897302, h = (h << 20 | h >>> 12) + f << 0, _ += (f ^ m & (h ^ f)) + c[5] - 701558691, _ = (_ << 5 | _ >>> 27) + h << 0, m += (h ^ f & (_ ^ h)) + c[10] + 38016083, m = (m << 9 | m >>> 23) + _ << 0, f += (_ ^ h & (m ^ _)) + c[15] - 660478335, f = (f << 14 | f >>> 18) + m << 0, h += (m ^ _ & (f ^ m)) + c[4] - 405537848, h = (h << 20 | h >>> 12) + f << 0, _ += (f ^ m & (h ^ f)) + c[9] + 568446438, _ = (_ << 5 | _ >>> 27) + h << 0, m += (h ^ f & (_ ^ h)) + c[14] - 1019803690, m = (m << 9 | m >>> 23) + _ << 0, f += (_ ^ h & (m ^ _)) + c[3] - 187363961, f = (f << 14 | f >>> 18) + m << 0, h += (m ^ _ & (f ^ m)) + c[8] + 1163531501, h = (h << 20 | h >>> 12) + f << 0, _ += (f ^ m & (h ^ f)) + c[13] - 1444681467, _ = (_ << 5 | _ >>> 27) + h << 0, m += (h ^ f & (_ ^ h)) + c[2] - 51403784, m = (m << 9 | m >>> 23) + _ << 0, f += (_ ^ h & (m ^ _)) + c[7] + 1735328473, f = (f << 14 | f >>> 18) + m << 0, h += (m ^ _ & (f ^ m)) + c[12] - 1926607734, h = (h << 20 | h >>> 12) + f << 0, g = h ^ f, _ += (g ^ m) + c[5] - 378558, _ = (_ << 4 | _ >>> 28) + h << 0, m += (g ^ _) + c[8] - 2022574463, m = (m << 11 | m >>> 21) + _ << 0, v = m ^ _, f += (v ^ h) + c[11] + 1839030562, f = (f << 16 | f >>> 16) + m << 0, h += (v ^ f) + c[14] - 35309556, h = (h << 23 | h >>> 9) + f << 0, g = h ^ f, _ += (g ^ m) + c[1] - 1530992060, _ = (_ << 4 | _ >>> 28) + h << 0, m += (g ^ _) + c[4] + 1272893353, m = (m << 11 | m >>> 21) + _ << 0, v = m ^ _, f += (v ^ h) + c[7] - 155497632, f = (f << 16 | f >>> 16) + m << 0, h += (v ^ f) + c[10] - 1094730640, h = (h << 23 | h >>> 9) + f << 0, g = h ^ f, _ += (g ^ m) + c[13] + 681279174, _ = (_ << 4 | _ >>> 28) + h << 0, m += (g ^ _) + c[0] - 358537222, m = (m << 11 | m >>> 21) + _ << 0, v = m ^ _, f += (v ^ h) + c[3] - 722521979, f = (f << 16 | f >>> 16) + m << 0, h += (v ^ f) + c[6] + 76029189, h = (h << 23 | h >>> 9) + f << 0, g = h ^ f, _ += (g ^ m) + c[9] - 640364487, _ = (_ << 4 | _ >>> 28) + h << 0, m += (g ^ _) + c[12] - 421815835, m = (m << 11 | m >>> 21) + _ << 0, v = m ^ _, f += (v ^ h) + c[15] + 530742520, f = (f << 16 | f >>> 16) + m << 0, h += (v ^ f) + c[2] - 995338651, h = (h << 23 | h >>> 9) + f << 0, _ += (f ^ (h | ~m)) + c[0] - 198630844, _ = (_ << 6 | _ >>> 26) + h << 0, m += (h ^ (_ | ~f)) + c[7] + 1126891415, m = (m << 10 | m >>> 22) + _ << 0, f += (_ ^ (m | ~h)) + c[14] - 1416354905, f = (f << 15 | f >>> 17) + m << 0, h += (m ^ (f | ~_)) + c[5] - 57434055, h = (h << 21 | h >>> 11) + f << 0, _ += (f ^ (h | ~m)) + c[12] + 1700485571, _ = (_ << 6 | _ >>> 26) + h << 0, m += (h ^ (_ | ~f)) + c[3] - 1894986606, m = (m << 10 | m >>> 22) + _ << 0, f += (_ ^ (m | ~h)) + c[10] - 1051523, f = (f << 15 | f >>> 17) + m << 0, h += (m ^ (f | ~_)) + c[1] - 2054922799, h = (h << 21 | h >>> 11) + f << 0, _ += (f ^ (h | ~m)) + c[8] + 1873313359, _ = (_ << 6 | _ >>> 26) + h << 0, m += (h ^ (_ | ~f)) + c[15] - 30611744, m = (m << 10 | m >>> 22) + _ << 0, f += (_ ^ (m | ~h)) + c[6] - 1560198380, f = (f << 15 | f >>> 17) + m << 0, h += (m ^ (f | ~_)) + c[13] + 1309151649, h = (h << 21 | h >>> 11) + f << 0, _ += (f ^ (h | ~m)) + c[4] - 145523070, _ = (_ << 6 | _ >>> 26) + h << 0, m += (h ^ (_ | ~f)) + c[11] - 1120210379, m = (m << 10 | m >>> 22) + _ << 0, f += (_ ^ (m | ~h)) + c[2] + 718787259, f = (f << 15 | f >>> 17) + m << 0, h += (m ^ (f | ~_)) + c[9] - 343485551, h = (h << 21 | h >>> 11) + f << 0, b ? (i = _ + 1732584193 << 0, u = h - 271733879 << 0, p = f - 1732584194 << 0, d = m + 271733878 << 0, b = !1) : (i = i + _ << 0, u = u + h << 0, p = p + f << 0, d = d + m << 0)
  4550.             } while (!w);
  4551.             if (n) {
  4552.                 var T = r[i >> 4 & 15] + r[15 & i];
  4553.                 return T += r[i >> 12 & 15] + r[i >> 8 & 15], T += r[i >> 20 & 15] + r[i >> 16 & 15], T += r[i >> 28 & 15] + r[i >> 24 & 15], T += r[u >> 4 & 15] + r[15 & u], T += r[u >> 12 & 15] + r[u >> 8 & 15], T += r[u >> 20 & 15] + r[u >> 16 & 15], T += r[u >> 28 & 15] + r[u >> 24 & 15], T += r[p >> 4 & 15] + r[15 & p], T += r[p >> 12 & 15] + r[p >> 8 & 15], T += r[p >> 20 & 15] + r[p >> 16 & 15], T += r[p >> 28 & 15] + r[p >> 24 & 15], T += r[d >> 4 & 15] + r[15 & d], T += r[d >> 12 & 15] + r[d >> 8 & 15], T += r[d >> 20 & 15] + r[d >> 16 & 15], T += r[d >> 28 & 15] + r[d >> 24 & 15]
  4554.             }
  4555.             return r[i >> 4 & 15] + r[15 & i] + r[i >> 12 & 15] + r[i >> 8 & 15] + r[i >> 20 & 15] + r[i >> 16 & 15] + r[i >> 28 & 15] + r[i >> 24 & 15] + r[u >> 4 & 15] + r[15 & u] + r[u >> 12 & 15] + r[u >> 8 & 15] + r[u >> 20 & 15] + r[u >> 16 & 15] + r[u >> 28 & 15] + r[u >> 24 & 15] + r[p >> 4 & 15] + r[15 & p] + r[p >> 12 & 15] + r[p >> 8 & 15] + r[p >> 20 & 15] + r[p >> 16 & 15] + r[p >> 28 & 15] + r[p >> 24 & 15] + r[d >> 4 & 15] + r[15 & d] + r[d >> 12 & 15] + r[d >> 8 & 15] + r[d >> 20 & 15] + r[d >> 16 & 15] + r[d >> 28 & 15] + r[d >> 24 & 15]
  4556.         };
  4557.         if (!e.JS_MD5_TEST && i) {
  4558.             var d = require("crypto"),
  4559.                 _ = require("buffer").Buffer;
  4560.             module.exports = function(e) {
  4561.                 return "string" == typeof e ? e.length <= 80 ? p(e) : e.length <= 183 && !/[^\x00-\x7F]/.test(e) ? p(e) : d.createHash("md5").update(e, "utf8").digest("hex") : (e.constructor == ArrayBuffer && (e = new Uint8Array(e)), e.length <= 370 ? p(e) : d.createHash("md5").update(new _(e)).digest("hex"))
  4562.             }
  4563.         } else e && (e.md5 = p)
  4564.     }(this),
  4565.     function(e, t) {
  4566.         "function" == typeof define && define.amd ? define("pass-meter", t) : "object" == typeof module && module.exports ? module.exports = t() : e.PassMeter = t()
  4567.     }("undefined" != typeof window ? window : this, function() {
  4568.         "use strict";
  4569.         var e, t = {
  4570.             events: "keyup",
  4571.             afterTest: null,
  4572.             commonPasswords: ["password", "123456", "12345678", "1234", "qwerty"]
  4573.         };
  4574.         e = "function" != typeof jQuery ? function() {
  4575.             for (var e, t, i, o, n = arguments[0] || {}, s = 1, r = arguments.length; r > s; s++)
  4576.                 if (null !== (e = arguments[s]))
  4577.                     for (t in e) o = n[t], i = e[t], n !== i && void 0 !== i && (n[t] = i);
  4578.             return n
  4579.         } : jQuery.extend;
  4580.         var i = function(i) {
  4581.             "undefined" == typeof i ? i = {} : "function" == typeof i && (i = {
  4582.                 afterTest: i
  4583.             }), this.options = e({}, t, i)
  4584.         };
  4585.         return i.prototype = {
  4586.             constructor: i,
  4587.             checks: [{
  4588.                 score: 35,
  4589.                 callback: function(e) {
  4590.                     return e.length >= 8
  4591.                 }
  4592.             }, {
  4593.                 score: 20,
  4594.                 regex: new RegExp("[A-Z]")
  4595.             }, {
  4596.                 score: 10,
  4597.                 regex: new RegExp("[a-z]")
  4598.             }, {
  4599.                 score: 10,
  4600.                 regex: new RegExp("[0-9]")
  4601.             }, {
  4602.                 score: 25,
  4603.                 regex: new RegExp("\\W")
  4604.             }, {
  4605.                 score: -100,
  4606.                 callback: function(e) {
  4607.                     return -1 !== this.options.commonPasswords.indexOf(String(e).toLowerCase()) ? !0 : !1
  4608.                 }
  4609.             }],
  4610.             test: function(e) {
  4611.                 var t = this,
  4612.                     i = 0;
  4613.                 return this.checks.forEach(function(o) {
  4614.                     o.hasOwnProperty("regex") ? e.match(o.regex) && (i += o.score) : o.hasOwnProperty("callback") && o.callback.call(t, e) && (i += o.score)
  4615.                 }), 0 > i && (i = 0), i > 100 && (i = 100), "function" == typeof this.options.afterTest && this.options.afterTest(i, e), i
  4616.             }
  4617.         }, "function" == typeof jQuery && jQuery.fn && (jQuery.fn.passMeter = function(e) {
  4618.             return this.each(function() {
  4619.                 var t = jQuery(this);
  4620.                 if (!t.data("pass-meter")) {
  4621.                     var o = new i(e);
  4622.                     t.on(o.options.events, function() {
  4623.                         o.test(this.value)
  4624.                     }), t.data("pass-meter", o)
  4625.                 }
  4626.             })
  4627.         }), i
  4628.     }),
  4629.     function(e) {
  4630.         e.redirect = function(t, o, n) {
  4631.             if (n = n && "GET" == n.toUpperCase() ? "GET" : "POST", !o) {
  4632.                 var s = e.parse_url(t);
  4633.                 t = s.url, o = s.params
  4634.             }
  4635.             var r = e("<form>").attr({
  4636.                 method: n,
  4637.                 action: t
  4638.             });
  4639.             i(o, [], r), e("body").append(r), r.submit()
  4640.         }, e.parse_url = function(e) {
  4641.             if (-1 == e.indexOf("?")) return {
  4642.                 url: e,
  4643.                 params: {}
  4644.             };
  4645.             var t = e.split("?"),
  4646.                 e = t[0],
  4647.                 i = t[1],
  4648.                 o = i.split("&"),
  4649.                 n = {};
  4650.             for (var s in o) {
  4651.                 var r = o[s].split("=");
  4652.                 n[r[0]] = r[1]
  4653.             }
  4654.             return {
  4655.                 url: e,
  4656.                 params: n
  4657.             }
  4658.         };
  4659.         var t = function(t, i, o) {
  4660.                 var n;
  4661.                 if (o.length > 0) {
  4662.                     n = o[0];
  4663.                     for (var s = 1; s < o.length; ++s) n += "[" + o[s] + "]";
  4664.                     t = n + "[" + t + "]"
  4665.                 }
  4666.                 return e("<input>").attr({
  4667.                     type: "hidden",
  4668.                     name: t,
  4669.                     value: i
  4670.                 })
  4671.             },
  4672.             i = function(e, o, n) {
  4673.                 var s = [];
  4674.                 for (var r in e) "object" == typeof e[r] ? (s = o.slice(), s.push(r), i(e[r], s, n)) : t(r, e[r], o).appendTo(n)
  4675.             }
  4676.     }(jQuery), ! function(e) {
  4677.         "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery)
  4678.     }(function(e, t) {
  4679.         "use strict";
  4680.  
  4681.         function i(e, t) {
  4682.             this.container = e, this.options = t, this.init()
  4683.         }
  4684.  
  4685.         function o(t, i) {
  4686.             this.widget = t, this.options = e.extend({}, i), this.detectService(), this.service && this.init()
  4687.         }
  4688.  
  4689.         function n(e) {
  4690.             function t(e, t) {
  4691.                 return t.toUpper()
  4692.             }
  4693.             var i = {},
  4694.                 o = e.data();
  4695.             for (var n in o) {
  4696.                 var s = o[n];
  4697.                 "yes" === s ? s = !0 : "no" === s && (s = !1), i[n.replace(/-(\w)/g, t)] = s
  4698.             }
  4699.             return i
  4700.         }
  4701.  
  4702.         function s(e, t) {
  4703.             return r(e, t, encodeURIComponent)
  4704.         }
  4705.  
  4706.         function r(e, t, i) {
  4707.             return e.replace(/\{([^\}]+)\}/g, function(e, o) {
  4708.                 return o in t ? i ? i(t[o]) : t[o] : e
  4709.             })
  4710.         }
  4711.  
  4712.         function a(e, t) {
  4713.             var i = p + e;
  4714.             return i + " " + i + "_" + t
  4715.         }
  4716.  
  4717.         function l(t, i) {
  4718.             function o(r) {
  4719.                 "keydown" === r.type && 27 !== r.which || e(r.target).closest(t).length || (t.removeClass(d), n.off(s, o), e.isFunction(i) && i())
  4720.             }
  4721.             var n = e(document),
  4722.                 s = "click touchstart keydown";
  4723.             n.on(s, o)
  4724.         }
  4725.  
  4726.         function c(e) {
  4727.             var t = 10;
  4728.             if (document.documentElement.getBoundingClientRect) {
  4729.                 var i = parseInt(e.css("left"), 10),
  4730.                     o = parseInt(e.css("top"), 10),
  4731.                     n = e[0].getBoundingClientRect();
  4732.                 n.left < t ? e.css("left", t - n.left + i) : n.right > window.innerWidth - t && e.css("left", window.innerWidth - n.right - t + i), n.top < t ? e.css("top", t - n.top + o) : n.bottom > window.innerHeight - t && e.css("top", window.innerHeight - n.bottom - t + o)
  4733.             }
  4734.             e.addClass(d)
  4735.         }
  4736.         var u = "social-likes",
  4737.             p = u + "__",
  4738.             d = u + "_opened",
  4739.             _ = "https:" === location.protocol ? "https:" : "http:",
  4740.             h = "https:" === _,
  4741.             f = {
  4742.                 facebook: {
  4743.                     counterUrl: "https://graph.facebook.com/fql?q=SELECT+total_count+FROM+link_stat+WHERE+url%3D%22{url}%22&callback=?",
  4744.                     convertNumber: function(e) {
  4745.                         return e.data[0].total_count
  4746.                     },
  4747.                     popupUrl: "https://www.facebook.com/sharer/sharer.php?u={url}",
  4748.                     popupWidth: 600,
  4749.                     popupHeight: 500
  4750.                 },
  4751.                 twitter: {
  4752.                     counterUrl: "https://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",
  4753.                     convertNumber: function(e) {
  4754.                         return e.count
  4755.                     },
  4756.                     popupUrl: "https://twitter.com/intent/tweet?url={url}&text={title}",
  4757.                     popupWidth: 600,
  4758.                     popupHeight: 450,
  4759.                     click: function() {
  4760.                         return /[\.\?:\-–—]\s*$/.test(this.options.title) || (this.options.title += ":"), !0
  4761.                     }
  4762.                 },
  4763.                 mailru: {
  4764.                     counterUrl: _ + "//connect.mail.ru/share_count?url_list={url}&callback=1&func=?",
  4765.                     convertNumber: function(e) {
  4766.                         for (var t in e)
  4767.                             if (e.hasOwnProperty(t)) return e[t].shares
  4768.                     },
  4769.                     popupUrl: _ + "//connect.mail.ru/share?share_url={url}&title={title}",
  4770.                     popupWidth: 550,
  4771.                     popupHeight: 360
  4772.                 },
  4773.                 vkontakte: {
  4774.                     counterUrl: "https://vk.com/share.php?act=count&url={url}&index={index}",
  4775.                     counter: function(t, i) {
  4776.                         var o = f.vkontakte;
  4777.                         o._ || (o._ = [], window.VK || (window.VK = {}), window.VK.Share = {
  4778.                             count: function(e, t) {
  4779.                                 o._[e].resolve(t)
  4780.                             }
  4781.                         });
  4782.                         var n = o._.length;
  4783.                         o._.push(i), e.getScript(s(t, {
  4784.                             index: n
  4785.                         })).fail(i.reject)
  4786.                     },
  4787.                     popupUrl: _ + "//vk.com/share.php?url={url}&title={title}",
  4788.                     popupWidth: 550,
  4789.                     popupHeight: 330
  4790.                 },
  4791.                 odnoklassniki: {
  4792.                     counterUrl: h ? t : "http://connect.ok.ru/dk?st.cmd=extLike&ref={url}&uid={index}",
  4793.                     counter: function(t, i) {
  4794.                         var o = f.odnoklassniki;
  4795.                         o._ || (o._ = [], window.ODKL || (window.ODKL = {}), window.ODKL.updateCount = function(e, t) {
  4796.                             o._[e].resolve(t)
  4797.                         });
  4798.                         var n = o._.length;
  4799.                         o._.push(i), e.getScript(s(t, {
  4800.                             index: n
  4801.                         })).fail(i.reject)
  4802.                     },
  4803.                     popupUrl: "http://connect.ok.ru/dk?st.cmd=WidgetSharePreview&service=odnoklassniki&st.shareUrl={url}",
  4804.                     popupWidth: 550,
  4805.                     popupHeight: 360
  4806.                 },
  4807.                 plusone: {
  4808.                     counterUrl: h ? t : "http://share.yandex.ru/gpp.xml?url={url}",
  4809.                     counter: function(t, i) {
  4810.                         var o = f.plusone;
  4811.                         return o._ ? void i.reject() : (window.services || (window.services = {}), window.services.gplus = {
  4812.                             cb: function(e) {
  4813.                                 "string" == typeof e && (e = e.replace(/\D/g, "")), o._.resolve(parseInt(e, 10))
  4814.                             }
  4815.                         }, o._ = i, void e.getScript(s(t)).fail(i.reject))
  4816.                     },
  4817.                     popupUrl: "https://plus.google.com/share?url={url}",
  4818.                     popupWidth: 700,
  4819.                     popupHeight: 500
  4820.                 },
  4821.                 pinterest: {
  4822.                     counterUrl: _ + "//api.pinterest.com/v1/urls/count.json?url={url}&callback=?",
  4823.                     convertNumber: function(e) {
  4824.                         return e.count
  4825.                     },
  4826.                     popupUrl: _ + "//pinterest.com/pin/create/button/?url={url}&description={title}",
  4827.                     popupWidth: 630,
  4828.                     popupHeight: 270
  4829.                 }
  4830.             },
  4831.             m = {
  4832.                 promises: {},
  4833.                 fetch: function(t, i, o) {
  4834.                     m.promises[t] || (m.promises[t] = {});
  4835.                     var n = m.promises[t];
  4836.                     if (!o.forceUpdate && n[i]) return n[i];
  4837.                     var r = e.extend({}, f[t], o),
  4838.                         a = e.Deferred(),
  4839.                         l = r.counterUrl && s(r.counterUrl, {
  4840.                             url: i
  4841.                         });
  4842.                     return l && e.isFunction(r.counter) ? r.counter(l, a) : r.counterUrl ? e.getJSON(l).done(function(t) {
  4843.                         try {
  4844.                             var i = t;
  4845.                             e.isFunction(r.convertNumber) && (i = r.convertNumber(t)), a.resolve(i)
  4846.                         } catch (o) {
  4847.                             a.reject()
  4848.                         }
  4849.                     }).fail(a.reject) : a.reject(), n[i] = a.promise(), n[i]
  4850.                 }
  4851.             };
  4852.         e.fn.socialLikes = function(t) {
  4853.             return this.each(function() {
  4854.                 var o = e(this),
  4855.                     s = o.data(u);
  4856.                 s ? e.isPlainObject(t) && s.update(t) : (s = new i(o, e.extend({}, e.fn.socialLikes.defaults, t, n(o))), o.data(u, s))
  4857.             })
  4858.         }, e.fn.socialLikes.defaults = {
  4859.             url: window.location.href.replace(window.location.hash, ""),
  4860.             title: document.title,
  4861.             counters: !0,
  4862.             zeroes: !1,
  4863.             wait: 500,
  4864.             timeout: 1e4,
  4865.             popupCheckInterval: 500,
  4866.             singleTitle: "Share"
  4867.         }, i.prototype = {
  4868.             init: function() {
  4869.                 this.container.addClass(u), this.single = this.container.hasClass(u + "_single"), this.initUserButtons(), this.countersLeft = 0, this.number = 0, this.container.on("counter." + u, e.proxy(this.updateCounter, this));
  4870.                 var t = this.container.children();
  4871.                 this.makeSingleButton(), this.buttons = [], t.each(e.proxy(function(t, i) {
  4872.                     var n = new o(e(i), this.options);
  4873.                     this.buttons.push(n), n.options.counterUrl && this.countersLeft++
  4874.                 }, this)), this.options.counters ? (this.timer = setTimeout(e.proxy(this.appear, this), this.options.wait), this.timeout = setTimeout(e.proxy(this.ready, this, !0), this.options.timeout)) : this.appear()
  4875.             },
  4876.             initUserButtons: function() {
  4877.                 !this.userButtonInited && window.socialLikesButtons && e.extend(!0, f, socialLikesButtons), this.userButtonInited = !0
  4878.             },
  4879.             makeSingleButton: function() {
  4880.                 if (this.single) {
  4881.                     var t = this.container;
  4882.                     t.addClass(u + "_vertical"), t.wrap(e("<div>", {
  4883.                         "class": u + "_single-w"
  4884.                     })), t.wrapInner(e("<div>", {
  4885.                         "class": u + "__single-container"
  4886.                     }));
  4887.                     var i = t.parent(),
  4888.                         o = e("<div>", {
  4889.                             "class": a("widget", "single")
  4890.                         }),
  4891.                         n = e(r('<div class="{buttonCls}"><span class="{iconCls}"></span>{title}</div>', {
  4892.                             buttonCls: a("button", "single"),
  4893.                             iconCls: a("icon", "single"),
  4894.                             title: this.options.singleTitle
  4895.                         }));
  4896.                     o.append(n), i.append(o), o.on("click", function() {
  4897.                         var e = u + "__widget_active";
  4898.                         return o.toggleClass(e), o.hasClass(e) ? (t.css({
  4899.                             left: -(t.width() - o.width()) / 2,
  4900.                             top: -t.height()
  4901.                         }), c(t), l(t, function() {
  4902.                             o.removeClass(e)
  4903.                         })) : t.removeClass(d), !1
  4904.                     }), this.widget = o
  4905.                 }
  4906.             },
  4907.             update: function(t) {
  4908.                 if (t.forceUpdate || t.url !== this.options.url) {
  4909.                     this.number = 0, this.countersLeft = this.buttons.length, this.widget && this.widget.find("." + u + "__counter").remove(), e.extend(this.options, t);
  4910.                     for (var i = 0; i < this.buttons.length; i++) this.buttons[i].update(t)
  4911.                 }
  4912.             },
  4913.             updateCounter: function(e, t, i) {
  4914.                 i && (this.number += i, this.single && this.getCounterElem().text(this.number)), this.countersLeft--, 0 === this.countersLeft && (this.appear(), this.ready())
  4915.             },
  4916.             appear: function() {
  4917.                 this.container.addClass(u + "_visible")
  4918.             },
  4919.             ready: function(e) {
  4920.                 this.timeout && clearTimeout(this.timeout), this.container.addClass(u + "_ready"), e || this.container.trigger("ready." + u, this.number)
  4921.             },
  4922.             getCounterElem: function() {
  4923.                 var t = this.widget.find("." + p + "counter_single");
  4924.                 return t.length || (t = e("<span>", {
  4925.                     "class": a("counter", "single")
  4926.                 }), this.widget.append(t)), t
  4927.             }
  4928.         }, o.prototype = {
  4929.             init: function() {
  4930.                 this.detectParams(), this.initHtml(), setTimeout(e.proxy(this.initCounter, this), 0)
  4931.             },
  4932.             update: function(t) {
  4933.                 e.extend(this.options, {
  4934.                     forceUpdate: !1
  4935.                 }, t), this.widget.find("." + u + "__counter").remove(), this.initCounter()
  4936.             },
  4937.             detectService: function() {
  4938.                 var t = this.widget.data("service");
  4939.                 if (!t) {
  4940.                     for (var i = this.widget[0], o = i.classList || i.className.split(" "), n = 0; n < o.length; n++) {
  4941.                         var s = o[n];
  4942.                         if (f[s]) {
  4943.                             t = s;
  4944.                             break
  4945.                         }
  4946.                     }
  4947.                     if (!t) return
  4948.                 }
  4949.                 this.service = t, e.extend(this.options, f[t])
  4950.             },
  4951.             detectParams: function() {
  4952.                 var e = this.widget.data();
  4953.                 if (e.counter) {
  4954.                     var t = parseInt(e.counter, 10);
  4955.                     isNaN(t) ? this.options.counterUrl = e.counter : this.options.counterNumber = t
  4956.                 }
  4957.                 e.title && (this.options.title = e.title), e.url && (this.options.url = e.url)
  4958.             },
  4959.             initHtml: function() {
  4960.                 var t = this.options,
  4961.                     i = this.widget,
  4962.                     o = i.find("a");
  4963.                 o.length && this.cloneDataAttrs(o, i);
  4964.                 var n = e("<span>", {
  4965.                     "class": this.getElementClassNames("button"),
  4966.                     text: i.text()
  4967.                 });
  4968.                 if (t.clickUrl) {
  4969.                     var r = s(t.clickUrl, {
  4970.                             url: t.url,
  4971.                             title: t.title
  4972.                         }),
  4973.                         a = e("<a>", {
  4974.                             href: r
  4975.                         });
  4976.                     this.cloneDataAttrs(i, a), i.replaceWith(a), this.widget = i = a
  4977.                 } else i.on("click", e.proxy(this.click, this));
  4978.                 i.removeClass(this.service), i.addClass(this.getElementClassNames("widget")), n.prepend(e("<span>", {
  4979.                     "class": this.getElementClassNames("icon")
  4980.                 })), i.empty().append(n), this.button = n
  4981.             },
  4982.             initCounter: function() {
  4983.                 if (this.options.counters)
  4984.                     if (this.options.counterNumber) this.updateCounter(this.options.counterNumber);
  4985.                     else {
  4986.                         var t = {
  4987.                             counterUrl: this.options.counterUrl,
  4988.                             forceUpdate: this.options.forceUpdate
  4989.                         };
  4990.                         m.fetch(this.service, this.options.url, t).always(e.proxy(this.updateCounter, this))
  4991.                     }
  4992.             },
  4993.             cloneDataAttrs: function(e, t) {
  4994.                 var i = e.data();
  4995.                 for (var o in i) i.hasOwnProperty(o) && t.data(o, i[o])
  4996.             },
  4997.             getElementClassNames: function(e) {
  4998.                 return a(e, this.service)
  4999.             },
  5000.             updateCounter: function(t) {
  5001.                 t = parseInt(t, 10) || 0;
  5002.                 var i = {
  5003.                     "class": this.getElementClassNames("counter"),
  5004.                     text: t
  5005.                 };
  5006.                 t || this.options.zeroes || (i["class"] += " " + u + "__counter_empty", i.text = "");
  5007.                 var o = e("<span>", i);
  5008.                 this.widget.append(o), this.widget.trigger("counter." + u, [this.service, t])
  5009.             },
  5010.             click: function(t) {
  5011.                 var i = this.options,
  5012.                     o = !0;
  5013.                 if (e.isFunction(i.click) && (o = i.click.call(this, t)), o) {
  5014.                     var n = s(i.popupUrl, {
  5015.                         url: i.url,
  5016.                         title: i.title
  5017.                     });
  5018.                     n = this.addAdditionalParamsToUrl(n), this.openPopup(n, {
  5019.                         width: i.popupWidth,
  5020.                         height: i.popupHeight
  5021.                     })
  5022.                 }
  5023.                 return !1
  5024.             },
  5025.             addAdditionalParamsToUrl: function(t) {
  5026.                 var i = e.param(e.extend(this.widget.data(), this.options.data));
  5027.                 if (e.isEmptyObject(i)) return t;
  5028.                 var o = -1 === t.indexOf("?") ? "?" : "&";
  5029.                 return t + o + i
  5030.             },
  5031.             openPopup: function(t, i) {
  5032.                 var o = Math.round(screen.width / 2 - i.width / 2),
  5033.                     n = 0;
  5034.                 screen.height > i.height && (n = Math.round(screen.height / 3 - i.height / 2));
  5035.                 var s = window.open(t, "sl_" + this.service, "left=" + o + ",top=" + n + ",width=" + i.width + ",height=" + i.height + ",personalbar=0,toolbar=0,scrollbars=1,resizable=1");
  5036.                 if (s) {
  5037.                     s.focus(), this.widget.trigger("popup_opened." + u, [this.service, s]);
  5038.                     var r = setInterval(e.proxy(function() {
  5039.                         s.closed && (clearInterval(r), this.widget.trigger("popup_closed." + u, this.service))
  5040.                     }, this), this.options.popupCheckInterval)
  5041.                 } else location.href = t
  5042.             }
  5043.         }, e(function() {
  5044.             e("." + u).socialLikes()
  5045.         })
  5046.     }),
  5047.     function e(t, i, o) {
  5048.         function n(r, a) {
  5049.             if (!i[r]) {
  5050.                 if (!t[r]) {
  5051.                     var l = "function" == typeof require && require;
  5052.                     if (!a && l) return l(r, !0);
  5053.                     if (s) return s(r, !0);
  5054.                     var c = new Error("Cannot find module '" + r + "'");
  5055.                     throw c.code = "MODULE_NOT_FOUND", c
  5056.                 }
  5057.                 var u = i[r] = {
  5058.                     exports: {}
  5059.                 };
  5060.                 t[r][0].call(u.exports, function(e) {
  5061.                     var i = t[r][1][e];
  5062.                     return n(i ? i : e)
  5063.                 }, u, u.exports, e, t, i, o)
  5064.             }
  5065.             return i[r].exports
  5066.         }
  5067.         for (var s = "function" == typeof require && require, r = 0; r < o.length; r++) n(o[r]);
  5068.         return n
  5069.     }({
  5070.         1: [function(e, t, i) {
  5071.             "use strict";
  5072.             var o = {
  5073.                 rules: {}
  5074.             };
  5075.             o.rules.common = e("./LIVR/Rules/Common"), o.rules.string = e("./LIVR/Rules/String"), o.rules.numeric = e("./LIVR/Rules/Numeric"), o.rules.special = e("./LIVR/Rules/Special"), o.rules.helper = e("./LIVR/Rules/Helper"), o.rules.filters = e("./LIVR/Rules/Filters"), o.Validator = e("./LIVR/Validator"), o.Validator.registerDefaultRules({
  5076.                 required: o.rules.common.required,
  5077.                 not_empty: o.rules.common.not_empty,
  5078.                 not_empty_list: o.rules.common.not_empty_list,
  5079.                 one_of: o.rules.string.one_of,
  5080.                 max_length: o.rules.string.max_length,
  5081.                 min_length: o.rules.string.min_length,
  5082.                 length_equal: o.rules.string.length_equal,
  5083.                 length_between: o.rules.string.length_between,
  5084.                 like: o.rules.string.like,
  5085.                 integer: o.rules.numeric.integer,
  5086.                 positive_integer: o.rules.numeric.positive_integer,
  5087.                 decimal: o.rules.numeric.decimal,
  5088.                 positive_decimal: o.rules.numeric.positive_decimal,
  5089.                 max_number: o.rules.numeric.max_number,
  5090.                 min_number: o.rules.numeric.min_number,
  5091.                 number_between: o.rules.numeric.number_between,
  5092.                 email: o.rules.special.email,
  5093.                 equal_to_field: o.rules.special.equal_to_field,
  5094.                 url: o.rules.special.url,
  5095.                 iso_date: o.rules.special.iso_date,
  5096.                 nested_object: o.rules.helper.nested_object,
  5097.                 list_of: o.rules.helper.list_of,
  5098.                 list_of_objects: o.rules.helper.list_of_objects,
  5099.                 list_of_different_objects: o.rules.helper.list_of_different_objects,
  5100.                 trim: o.rules.filters.trim,
  5101.                 to_lc: o.rules.filters.to_lc,
  5102.                 to_uc: o.rules.filters.to_uc,
  5103.                 remove: o.rules.filters.remove,
  5104.                 leave_only: o.rules.filters.leave_only
  5105.             }), t.exports = o
  5106.         }, {
  5107.             "./LIVR/Rules/Common": 2,
  5108.             "./LIVR/Rules/Filters": 3,
  5109.             "./LIVR/Rules/Helper": 4,
  5110.             "./LIVR/Rules/Numeric": 5,
  5111.             "./LIVR/Rules/Special": 6,
  5112.             "./LIVR/Rules/String": 7,
  5113.             "./LIVR/Validator": 8
  5114.         }],
  5115.         2: [function(e, t, i) {
  5116.             "use strict";
  5117.             var o = e("../util");
  5118.             t.exports = {
  5119.                 required: function() {
  5120.                     return function(e) {
  5121.                         return o.isNoValue(e) ? "REQUIRED" : void 0
  5122.                     }
  5123.                 },
  5124.                 not_empty: function() {
  5125.                     return function(e) {
  5126.                         return null !== e && void 0 !== e && "" === e ? "CANNOT_BE_EMPTY" : void 0
  5127.                     }
  5128.                 },
  5129.                 not_empty_list: function() {
  5130.                     return function(e) {
  5131.                         return void 0 === e || "" === e ? "CANNOT_BE_EMPTY" : Array.isArray(e) ? e.length < 1 ? "CANNOT_BE_EMPTY" : void 0 : "WRONG_FORMAT"
  5132.                     }
  5133.                 }
  5134.             }
  5135.         }, {
  5136.             "../util": 9
  5137.         }],
  5138.         3: [function(e, t, i) {
  5139.             "use strict";
  5140.             var o = e("../util");
  5141.             t.exports = {
  5142.                 trim: function() {
  5143.                     return function(e, t, i) {
  5144.                         o.isNoValue(e) || "object" == typeof e || (e += "", i.push(e.replace(/^\s*/, "").replace(/\s*$/, "")))
  5145.                     }
  5146.                 },
  5147.                 to_lc: function() {
  5148.                     return function(e, t, i) {
  5149.                         o.isNoValue(e) || "object" == typeof e || (e += "", i.push(e.toLowerCase()))
  5150.                     }
  5151.                 },
  5152.                 to_uc: function() {
  5153.                     return function(e, t, i) {
  5154.                         o.isNoValue(e) || "object" == typeof e || (e += "", i.push(e.toUpperCase()))
  5155.                     }
  5156.                 },
  5157.                 remove: function(e) {
  5158.                     e = o.escapeRegExp(e);
  5159.                     var t = new RegExp("[" + e + "]", "g");
  5160.                     return function(e, i, n) {
  5161.                         o.isNoValue(e) || "object" == typeof e || (e += "", n.push(e.replace(t, "")))
  5162.                     }
  5163.                 },
  5164.                 leave_only: function(e) {
  5165.                     e = o.escapeRegExp(e);
  5166.                     var t = new RegExp("[^" + e + "]", "g");
  5167.                     return function(e, i, n) {
  5168.                         o.isNoValue(e) || "object" == typeof e || (e += "", n.push(e.replace(t, "")))
  5169.                     }
  5170.                 }
  5171.             }
  5172.         }, {
  5173.             "../util": 9
  5174.         }],
  5175.         4: [function(e, t, i) {
  5176.             "use strict";
  5177.             var o = e("../Validator"),
  5178.                 n = e("../util");
  5179.             t.exports = {
  5180.                 nested_object: function(e, t) {
  5181.                     var i = new o(e).registerRules(t).prepare();
  5182.                     return function(e, t, o) {
  5183.                         if (!n.isNoValue(e)) {
  5184.                             if ("object" != typeof e) return "FORMAT_ERROR";
  5185.                             var s = i.validate(e);
  5186.                             return s ? void o.push(s) : i.getErrors()
  5187.                         }
  5188.                     }
  5189.                 },
  5190.                 list_of: function(e, t) {
  5191.                     Array.isArray(e) || (e = Array.prototype.slice.call(arguments), t = e.pop());
  5192.                     var i = {
  5193.                             field: e
  5194.                         },
  5195.                         s = new o(i).registerRules(t).prepare();
  5196.                     return function(e, t, i) {
  5197.                         if (!n.isNoValue(e)) {
  5198.                             if (!Array.isArray(e)) return "FORMAT_ERROR";
  5199.                             for (var o = [], r = [], a = !1, l = 0; l < e.length; l++) {
  5200.                                 var c = s.validate({
  5201.                                     field: e[l]
  5202.                                 });
  5203.                                 c ? (o.push(c.field), r.push(null)) : (a = !0, r.push(s.getErrors().field), o.push(null))
  5204.                             }
  5205.                             return a ? r : void i.push(o)
  5206.                         }
  5207.                     }
  5208.                 },
  5209.                 list_of_objects: function(e, t) {
  5210.                     var i = new o(e).registerRules(t).prepare();
  5211.                     return function(e, t, o) {
  5212.                         if (!n.isNoValue(e)) {
  5213.                             if (!Array.isArray(e)) return "FORMAT_ERROR";
  5214.                             for (var s = [], r = [], a = !1, l = 0; l < e.length; l++) {
  5215.                                 var c = i.validate(e[l]);
  5216.                                 c ? (s.push(c), r.push(null)) : (a = !0, r.push(i.getErrors()), s.push(null))
  5217.                             }
  5218.                             return a ? r : void o.push(s)
  5219.                         }
  5220.                     }
  5221.                 },
  5222.                 list_of_different_objects: function(e, t, i) {
  5223.                     var s = {};
  5224.                     for (var r in t) {
  5225.                         var a = new o(t[r]).registerRules(i).prepare();
  5226.                         s[r] = a
  5227.                     }
  5228.                     return function(t, i, o) {
  5229.                         if (!n.isNoValue(t)) {
  5230.                             if (!Array.isArray(t)) return "FORMAT_ERROR";
  5231.                             for (var r = [], a = [], l = !1, c = 0; c < t.length; c++) {
  5232.                                 var u = t[c];
  5233.                                 if ("object" == typeof u && u[e] && s[u[e]]) {
  5234.                                     var p = s[u[e]],
  5235.                                         d = p.validate(u);
  5236.                                     d ? (r.push(d), a.push(null)) : (l = !0, a.push(p.getErrors()), r.push(null))
  5237.                                 } else a.push("FORMAT_ERROR")
  5238.                             }
  5239.                             return l ? a : void o.push(r)
  5240.                         }
  5241.                     }
  5242.                 }
  5243.             }
  5244.         }, {
  5245.             "../Validator": 8,
  5246.             "../util": 9
  5247.         }],
  5248.         5: [function(e, t, i) {
  5249.             "use strict";
  5250.             var o = e("../util");
  5251.             t.exports = {
  5252.                 integer: function() {
  5253.                     return function(e) {
  5254.                         return o.isNoValue(e) ? void 0 : o.isNumberOrString(e) ? (e += "", e.match(/^\-?[0-9]+$/) ? void 0 : "NOT_INTEGER") : "FORMAT_ERROR"
  5255.                     }
  5256.                 },
  5257.                 positive_integer: function() {
  5258.                     return function(e) {
  5259.                         return o.isNoValue(e) ? void 0 : o.isNumberOrString(e) ? (e += "", /^[1-9][0-9]*$/.test(e) ? void 0 : "NOT_POSITIVE_INTEGER") : "FORMAT_ERROR"
  5260.                     }
  5261.                 },
  5262.                 decimal: function() {
  5263.                     return function(e) {
  5264.                         return o.isNoValue(e) ? void 0 : o.isNumberOrString(e) ? (e += "", /^(?:\-?(?:[0-9]+\.[0-9]+)|(?:[0-9]+))$/.test(e) ? void 0 : "NOT_DECIMAL") : "FORMAT_ERROR"
  5265.                     }
  5266.                 },
  5267.                 positive_decimal: function() {
  5268.                     return function(e) {
  5269.                         return o.isNoValue(e) ? void 0 : o.isNumberOrString(e) ? (e += "", /^(?:(?:[0-9]*\.[0-9]+)|(?:[1-9][0-9]*))$/.test(e) ? void 0 : "NOT_POSITIVE_DECIMAL") : "FORMAT_ERROR"
  5270.                     }
  5271.                 },
  5272.                 max_number: function(e) {
  5273.                     return function(t) {
  5274.                         return o.isNoValue(t) ? void 0 : o.isNumberOrString(t) ? +t > +e ? "TOO_HIGH" : void 0 : "FORMAT_ERROR"
  5275.                     }
  5276.                 },
  5277.                 min_number: function(e) {
  5278.                     return function(t) {
  5279.                         return o.isNoValue(t) ? void 0 : o.isNumberOrString(t) ? +e > +t ? "TOO_LOW" : void 0 : "FORMAT_ERROR"
  5280.                     }
  5281.                 },
  5282.                 number_between: function(e, t) {
  5283.                     return function(i) {
  5284.                         return o.isNoValue(i) ? void 0 : o.isNumberOrString(i) ? +e > +i ? "TOO_LOW" : +i > +t ? "TOO_HIGH" : void 0 : "FORMAT_ERROR"
  5285.                     }
  5286.                 }
  5287.             }
  5288.         }, {
  5289.             "../util": 9
  5290.         }],
  5291.         6: [function(e, t, i) {
  5292.             "use strict";
  5293.             var o = e("../util");
  5294.             t.exports = {
  5295.                 email: function() {
  5296.                     var e = /^([\w\-_+]+(?:\.[\w\-_+]+)*)@((?:[\w\-]+\.)*\w[\w\-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
  5297.                     return function(t) {
  5298.                         return void 0 !== t && null !== t && "" !== t ? o.isNumberOrString(t) ? (t += "", e.test(t) ? /\@.*\@/.test(t) ? "WRONG_EMAIL" : /\@.*_/.test(t) ? "WRONG_EMAIL" : void 0 : "WRONG_EMAIL") : "FORMAT_ERROR" : void 0
  5299.                     }
  5300.                 },
  5301.                 equal_to_field: function(e) {
  5302.                     return function(t, i) {
  5303.                         return void 0 !== t && null !== t && "" !== t ? o.isNumberOrString(t) ? t != i[e] ? "FIELDS_NOT_EQUAL" : void 0 : "FORMAT_ERROR" : void 0
  5304.                     }
  5305.                 },
  5306.                 url: function() {
  5307.                     var e = "^(?:(?:http|https)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  5308.                         t = new RegExp(e, "i");
  5309.                     return function(e) {
  5310.                         if (void 0 !== e && null !== e && "" !== e) {
  5311.                             if (!o.isNumberOrString(e)) return "FORMAT_ERROR";
  5312.                             if (!(e.length < 2083 && t.test(e))) return "WRONG_URL"
  5313.                         }
  5314.                     }
  5315.                 },
  5316.                 iso_date: function() {
  5317.                     return function(e) {
  5318.                         if (void 0 !== e && null !== e && "" !== e) {
  5319.                             if (!o.isNumberOrString(e)) return "FORMAT_ERROR";
  5320.                             var t = e.match(/^(\d{4})-([0-1][0-9])-([0-3][0-9])$/);
  5321.                             if (t) {
  5322.                                 var i = Date.parse(e);
  5323.                                 if (!i && 0 !== i) return "WRONG_DATE";
  5324.                                 var n = new Date(i);
  5325.                                 if (n.setTime(n.getTime() + 60 * n.getTimezoneOffset() * 1e3), n.getFullYear() == t[1] && n.getMonth() + 1 == +t[2] && n.getDate() == +t[3]) return
  5326.                             }
  5327.                             return "WRONG_DATE"
  5328.                         }
  5329.                     }
  5330.                 }
  5331.             }
  5332.         }, {
  5333.             "../util": 9
  5334.         }],
  5335.         7: [function(e, t, i) {
  5336.             "use strict";
  5337.             var o = e("../util");
  5338.             t.exports = {
  5339.                 one_of: function(e) {
  5340.                     return Array.isArray(e) || (e = Array.prototype.slice.call(arguments), e.pop()),
  5341.                         function(t) {
  5342.                             if (void 0 !== t && null !== t && "" !== t) {
  5343.                                 if (!o.isNumberOrString(t)) return "FORMAT_ERROR";
  5344.                                 for (var i = 0; i < e.length; i++)
  5345.                                     if (t == e[i]) return;
  5346.                                 return "NOT_ALLOWED_VALUE"
  5347.                             }
  5348.                         }
  5349.                 },
  5350.                 max_length: function(e) {
  5351.                     return function(t) {
  5352.                         return void 0 !== t && null !== t && "" !== t ? o.isNumberOrString(t) ? (t += "", t.length > e ? "TOO_LONG" : void 0) : "FORMAT_ERROR" : void 0
  5353.                     }
  5354.                 },
  5355.                 min_length: function(e) {
  5356.                     return function(t) {
  5357.                         return void 0 !== t && null !== t && "" !== t ? o.isNumberOrString(t) ? (t += "", t.length < e ? "TOO_SHORT" : void 0) : "FORMAT_ERROR" : void 0
  5358.                     }
  5359.                 },
  5360.                 length_equal: function(e) {
  5361.                     return function(t) {
  5362.                         return void 0 !== t && null !== t && "" !== t ? o.isNumberOrString(t) ? (t += "", t.length < e ? "TOO_SHORT" : t.length > e ? "TOO_LONG" : void 0) : "FORMAT_ERROR" : void 0
  5363.                     }
  5364.                 },
  5365.                 length_between: function(e, t) {
  5366.                     return function(i) {
  5367.                         return void 0 !== i && null !== i && "" !== i ? o.isNumberOrString(i) ? (i += "", i.length < e ? "TOO_SHORT" : i.length > t ? "TOO_LONG" : void 0) : "FORMAT_ERROR" : void 0
  5368.                     }
  5369.                 },
  5370.                 like: function(e, t) {
  5371.                     var i = 3 === arguments.length && t.match("i"),
  5372.                         n = new RegExp(e, i ? "i" : "");
  5373.                     return function(e) {
  5374.                         return void 0 !== e && null !== e && "" !== e ? o.isNumberOrString(e) ? (e += "", e.match(n) ? void 0 : "WRONG_FORMAT") : "FORMAT_ERROR" : void 0
  5375.                     }
  5376.                 }
  5377.             }
  5378.         }, {
  5379.             "../util": 9
  5380.         }],
  5381.         8: [function(e, t, i) {
  5382.             "use strict";
  5383.  
  5384.             function o(e, t) {
  5385.                 this.isPrepared = !1, this.livrRules = e, this.validators = {}, this.validatorBuilders = {}, this.errors = null, this.isAutoTrim = null !== t && void 0 !== t ? t : r, this.registerRules(s)
  5386.             }
  5387.             var n = e("./util"),
  5388.                 s = {},
  5389.                 r = 0;
  5390.             o.registerDefaultRules = function(e) {
  5391.                 for (var t in e) s[t] = e[t]
  5392.             }, o.registerAliasedDefaultRule = function(e) {
  5393.                 if (!e.name) throw "Alias name required";
  5394.                 s[e.name] = o._buildAliasedRule(e)
  5395.             }, o._buildAliasedRule = function(e) {
  5396.                 if (!e.name) throw "Alias name required";
  5397.                 if (!e.rules) throw "Alias rules required";
  5398.                 var t = {
  5399.                     value: e.rules
  5400.                 };
  5401.                 return function(i) {
  5402.                     var n = new o(t).registerRules(i).prepare();
  5403.                     return function(t, i, o) {
  5404.                         var s = n.validate({
  5405.                             value: t
  5406.                         });
  5407.                         return s ? void o.push(s.value) : e.error || n.getErrors().value
  5408.                     }
  5409.                 }
  5410.             }, o.defaultAutoTrim = function(e) {
  5411.                 r = !!e
  5412.             }, o.prototype = {
  5413.                 prepare: function() {
  5414.                     var e = this.livrRules;
  5415.                     for (var t in e) {
  5416.                         var i = e[t];
  5417.                         Array.isArray(i) || (i = [i]);
  5418.                         for (var o = [], n = 0; n < i.length; n++) {
  5419.                             var s = this._parseRule(i[n]);
  5420.                             o.push(this._buildValidator(s.name, s.args))
  5421.                         }
  5422.                         this.validators[t] = o
  5423.                     }
  5424.                     return this.isPrepared = !0, this
  5425.                 },
  5426.                 validate: function(e) {
  5427.                     if (this.isPrepared || this.prepare(), !n.isObject(e)) return void(this.errors = "FORMAT_ERROR");
  5428.                     this.isAutoTrim && (e = this._autoTrim(e));
  5429.                     var t = {},
  5430.                         i = {};
  5431.                     for (var o in this.validators) {
  5432.                         var s = this.validators[o];
  5433.                         if (s && s.length)
  5434.                             for (var r = e[o], a = 0; a < s.length; a++) {
  5435.                                 var l = [],
  5436.                                     c = s[a](i.hasOwnProperty(o) ? i[o] : r, e, l);
  5437.                                 if (c) {
  5438.                                     t[o] = c;
  5439.                                     break
  5440.                                 }
  5441.                                 e.hasOwnProperty(o) && (l.length ? i[o] = l[0] : i.hasOwnProperty(o) || (i[o] = r))
  5442.                             }
  5443.                     }
  5444.                     return n.isEmptyObject(t) ? (this.errors = null, i) : (this.errors = t, !1)
  5445.                 },
  5446.                 getErrors: function() {
  5447.                     return this.errors
  5448.                 },
  5449.                 registerRules: function(e) {
  5450.                     for (var t in e) this.validatorBuilders[t] = e[t];
  5451.                     return this
  5452.                 },
  5453.                 registerAliasedRule: function(e) {
  5454.                     if (!e.name) throw "Alias name required";
  5455.                     return this.validatorBuilders[e.name] = o._buildAliasedRule(e), this
  5456.                 },
  5457.                 getRules: function() {
  5458.                     return this.validatorBuilders
  5459.                 },
  5460.                 _parseRule: function(e) {
  5461.                     var t, i;
  5462.                     return n.isObject(e) ? (t = Object.keys(e)[0], i = e[t], Array.isArray(i) || (i = [i])) : (t = e, i = []), {
  5463.                         name: t,
  5464.                         args: i
  5465.                     }
  5466.                 },
  5467.                 _buildValidator: function(e, t) {
  5468.                     if (!this.validatorBuilders[e]) throw "Rule [" + e + "] not registered";
  5469.                     var i = [];
  5470.                     return i.push.apply(i, t), i.push(this.getRules()), this.validatorBuilders[e].apply(null, i)
  5471.                 },
  5472.                 _autoTrim: function(e) {
  5473.                     var t = typeof e;
  5474.                     if ("object" !== t && e) return e.replace ? e.replace(/^\s*/, "").replace(/\s*$/, "") : e;
  5475.                     if ("object" == t && Array.isArray(e)) {
  5476.                         for (var i = [], o = 0; o < e.length; o++) i[o] = this._autoTrim(e[o]);
  5477.                         return i
  5478.                     }
  5479.                     if ("object" == t && n.isObject(e)) {
  5480.                         var i = {};
  5481.                         for (var s in e) e.hasOwnProperty(s) && (i[s] = this._autoTrim(e[s]));
  5482.                         return i
  5483.                     }
  5484.                     return e
  5485.                 }
  5486.             }, t.exports = o
  5487.         }, {
  5488.             "./util": 9
  5489.         }],
  5490.         9: [function(e, t, i) {
  5491.             "use strict";
  5492.             t.exports = {
  5493.                 isNumberOrString: function(e) {
  5494.                     return "string" == typeof e ? !0 : "number" == typeof e && isFinite(e) ? !0 : !1
  5495.                 },
  5496.                 isObject: function(e) {
  5497.                     return e === Object(e)
  5498.                 },
  5499.                 isEmptyObject: function(e) {
  5500.                     for (var t in e)
  5501.                         if (e.hasOwnProperty(t)) return !1;
  5502.                     return !0
  5503.                 },
  5504.                 escapeRegExp: function(e) {
  5505.                     return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")
  5506.                 },
  5507.                 isNoValue: function(e) {
  5508.                     return void 0 === e || null === e || "" === e
  5509.                 }
  5510.             }
  5511.         }, {}],
  5512.         10: [function(e, t, i) {
  5513.             window.LIVR = e("../lib/LIVR")
  5514.         }, {
  5515.             "../lib/LIVR": 1
  5516.         }]
  5517.     }, {}, [10]), window.odometerOptions = {
  5518.         duration: 5e3,
  5519.         theme: "default",
  5520.         auto: !1,
  5521.         format: "( ddd)"
  5522.     }, $.extend(!0, $.magnificPopup.defaults, {
  5523.         tClose: "Закрыть (Esc)",
  5524.         tLoading: "Пожалуйста, подождите...",
  5525.         gallery: {
  5526.             tPrev: "Назад (клавиша &larr;)",
  5527.             tNext: "Вперед (клавиша &rarr;)",
  5528.             tCounter: "%curr% из %total%"
  5529.         },
  5530.         image: {
  5531.             tError: '<a href="%url%">Изображение</a> не удалось загрузить.'
  5532.         },
  5533.         ajax: {
  5534.             tError: '<a href="%url%">Содержимое</a> не удалось загрузить.'
  5535.         }
  5536.     }), $(document).ready(function() {
  5537.         Sprashivai.logged || ($(".signin_lnk").magnificPopup({
  5538.             type: "inline",
  5539.             preloader: !1,
  5540.             focus: "#signin_username",
  5541.             modal: !0
  5542.         }), $(document).on("click", "#signin_close", function(e) {
  5543.             $("#signin_pass").val(""), e.preventDefault(), $.magnificPopup.close()
  5544.         }), $("#qick_sngp_inp_pwd").passMeter(function(e) {
  5545.             $("#pass_strong_ind").css("width", e + "%"), 30 > e ? $("#pass_strong_ind").css("background-color", "#FF7979") : 55 > e ? $("#pass_strong_ind").css("background-color", "#FFBC84") : $("#pass_strong_ind").css("background-color", "#91DD81")
  5546.         })), setTimeout(function() {
  5547.             Sprashivai.time_updater()
  5548.         }, 1e4), $(".pr_gft_img").length > 0 && $(".pr_gft_img").tooltipster({
  5549.             delay: 100,
  5550.             position: "top",
  5551.             contentAsHTML: !0,
  5552.             offsetY: -5,
  5553.             offsetX: 5
  5554.         }), $("#nav_search_inp").keydown(function(e) {
  5555.             var t = e.keyCode || e.which;
  5556.             if (13 == t) {
  5557.                 if (Sprashivai.following_matched.length > 0)
  5558.                     if ($(this).val().length > 0 && 0 == Sprashivai.following_index) location = "/search?query=" + encodeURIComponent($(this).val());
  5559.                     else {
  5560.                         var i = 0 == $(this).val().length ? Sprashivai.following_index : Sprashivai.following_index - 1;
  5561.                         location = "/" + Sprashivai.following_matched[i].username
  5562.                     } else $(this).val().length > 0 && (location = "/search?query=" + encodeURIComponent($(this).val()));
  5563.                 e.preventDefault()
  5564.             } else if (38 == t) Sprashivai.following_index > 0 && (Sprashivai.following_index--, Sprashivai.search_quick_update()), e.preventDefault();
  5565.             else if (40 == t) {
  5566.                 var o = Sprashivai.following_matched.length;
  5567.                 $(this).val().length > 0 && o++, o > 0 && Sprashivai.following_index < o - 1 && (Sprashivai.following_index++, Sprashivai.search_quick_update()), e.preventDefault()
  5568.             }
  5569.         }), $("#nav_search_inp").keyup(function(e) {
  5570.             var t = e.keyCode || e.which;
  5571.             13 == t || 38 == t || 40 == t || (Sprashivai.search_quick($(this).val()), Sprashivai.following_index = $(this).val().length > 0 ? 0 : Sprashivai.following_matched.length > 0 ? 0 : -1, Sprashivai.search_quick_update())
  5572.         }), $("#nav_search_inp").focus(function() {
  5573.             Sprashivai.logged && ($("#nav_search_results").show(), Sprashivai.following ? Sprashivai.search_quick($("#nav_search_inp").val()) : Profile.following_autocomplete(), Sprashivai.following_index = $(this).val().length > 0 ? 0 : Sprashivai.following_matched.length > 0 ? 0 : -1, Sprashivai.search_quick_update())
  5574.         }), $("#nav_search_inp").blur(function() {
  5575.             $("#nav_search_results").hide()
  5576.         }), $("#nav_search_results").on("mousedown", function(e) {
  5577.             e.preventDefault()
  5578.         }), $(".comment_options").on("click", ".cmnt_an_dis", function() {
  5579.             Sprashivai.show_error("Комментарии к своим ответам не могут быть анонимными")
  5580.         }), $("#nav_opt_link").click(function(e) {
  5581.             return "visible" == $("#top_menu_box").css("visibility") ? ($("#top_menu_box").css("top", "31px"), $("#top_menu_box").css("opacity", "0"), $("#top_menu_box").css("visibility", "hidden")) : Sprashivai.top_menu(), e.stopPropagation(), !1
  5582.         }), $("#top_menu_box").click(function(e) {
  5583.             e.stopPropagation()
  5584.         }), $("#not_cont").click(function(e) {
  5585.             e.stopPropagation()
  5586.         }), $("#head_not_lnk").click(function(e) {
  5587.             e.stopPropagation()
  5588.         }), $(document).click(function(e) {
  5589.             $("#top_menu_box").css("top", "31px"), $("#top_menu_box").css("opacity", "0"), $("#top_menu_box").css("visibility", "hidden"), $("#not_cont").css("display", "none")
  5590.         }), Sprashivai.logged || ($("#user_big_avatar").one("load", function() {
  5591.             $("#quick_signup_lyot").scrollToFixed({
  5592.                 marginTop: 60
  5593.             })
  5594.         }).each(function() {
  5595.             this.complete && $(this).load()
  5596.         }), $(document).on("focus", "#qick_sngp_inp_us", function() {
  5597.             $("#quick_sgp_hidden").css("max-height", "600px"), $("#quick_sgp_hidden").css("opacity", "1.0"), $("#quick_sgp_hidden").css("visibility", "visible")
  5598.         }), $(document).on("focus", ".sgnp_inp", function() {
  5599.             var e = $(this).attr("id").replace("_inp_", "_ab_"),
  5600.                 t = $(this).attr("id").replace("_inp_", "_er_");
  5601.             $("#" + t).hide(), $("#" + e).show()
  5602.         }), $(document).on("blur", ".sgnp_inp", function() {
  5603.             var e = $(this).attr("id").replace("_inp_", "_ab_"),
  5604.                 t = $(this).attr("id").replace("_inp_", "_er_");
  5605.             $("#" + e).hide(), "" != $("#" + t).children(".form_error_bl").html() && $("#" + t).show()
  5606.         }), $(document).on("blur", "#qick_sngp_inp_us", function() {
  5607.             Signup_quick.check_username(!1)
  5608.         }), $(document).on("blur", "#qick_sngp_inp_em", function() {
  5609.             Signup_quick.check_email(!1)
  5610.         }), $(document).on("blur", "#qick_sngp_inp_pwd", function() {
  5611.             Signup_quick.check_pwd(!1)
  5612.         })), Sprashivai.ichecks(), $("#self_av_options").length > 0 && $("#profile_avatar_wrapper").hover(function() {
  5613.             $("#self_av_options").velocity({
  5614.                 bottom: "",
  5615.                 opacity: "1.0"
  5616.             }, {
  5617.                 duration: 200,
  5618.                 delay: 0,
  5619.                 easing: "easeInSine"
  5620.             })
  5621.         }, function() {
  5622.             $("#self_av_options").velocity({
  5623.                 bottom: "-150px",
  5624.                 opacity: "0"
  5625.             }, {
  5626.                 duration: 200,
  5627.                 delay: 0,
  5628.                 easing: "easeInSine"
  5629.             })
  5630.         }), $(document).on({
  5631.             mouseenter: function() {
  5632.                 $(this).stop().velocity({
  5633.                     width: "80px",
  5634.                     height: "80px",
  5635.                     marginTop: "-10px"
  5636.                 }, {
  5637.                     duration: 100,
  5638.                     delay: 0,
  5639.                     easing: "easeInSine"
  5640.                 })
  5641.             },
  5642.             mouseleave: function() {
  5643.                 $(this).stop().velocity({
  5644.                     width: "60px",
  5645.                     height: "60px",
  5646.                     marginTop: "0"
  5647.                 }, {
  5648.                     duration: 100,
  5649.                     delay: 0,
  5650.                     easing: "easeInSine"
  5651.                 })
  5652.             }
  5653.         }, ".sms_feed_user"), $("#sms_live_in").hover(function() {
  5654.             $("#sms_feed_rel").stop().velocity({
  5655.                 marginLeft: "70px"
  5656.             }, {
  5657.                 duration: 350,
  5658.                 delay: 0,
  5659.                 easing: "easeInSine"
  5660.             })
  5661.         }, function() {
  5662.             $("#sms_feed_rel").stop().velocity({
  5663.                 marginLeft: "0px"
  5664.             }, {
  5665.                 duration: 350,
  5666.                 delay: 0,
  5667.                 easing: "easeInSine"
  5668.             })
  5669.         }), $("#sms_avatars_layout").hover(function() {
  5670.             $(this).stop().velocity({
  5671.                 left: "5px"
  5672.             }, {
  5673.                 duration: 100,
  5674.                 delay: 0,
  5675.                 easing: "easeInSine"
  5676.             })
  5677.         }, function() {
  5678.             $(this).stop().velocity({
  5679.                 left: "15px"
  5680.             }, {
  5681.                 duration: 100,
  5682.                 delay: 0,
  5683.                 easing: "easeInSine"
  5684.             })
  5685.         }), "profile_self" == Sprashivai.page && ($(".pr-qck-edit").on("mouseenter", "#pr_quck_edit_icon", function() {
  5686.             $("#pr_quck_edit_btn_lyot").show()
  5687.         }), $(".pr-qck-edit").on("mouseleave", "#pr_quck_edit_btn_lyot", function() {
  5688.             $("#pr_quck_edit_btn_lyot").hide()
  5689.         })), $(".toolt-soc").length > 0 && $(".toolt-soc").tooltipster({
  5690.             delay: 0,
  5691.             position: "top",
  5692.             offsetY: 12
  5693.         }), $(".sms_feed_user").tooltipster({
  5694.             delay: 100,
  5695.             position: "bottom",
  5696.             contentAsHTML: !0,
  5697.             offsetY: 2
  5698.         }), $(".toolt-n").tooltipster({
  5699.             delay: 0,
  5700.             position: "top"
  5701.         }), $(".toolt-na").tooltipster({
  5702.             delay: 0,
  5703.             position: "top",
  5704.             offsetY: -12
  5705.         }), $(".autosize").length > 0 && $(".autosize").autoResizer(), $(".av_mg").length > 0 && $(".av_mg").magnificPopup({
  5706.             type: "image"
  5707.         }), Sprashivai.odometer()
  5708.     }), Sprashivai.odometer = function() {
  5709.         $(".odometer_i").each(function() {
  5710.             var e = document.getElementById($(this).attr("id"));
  5711.             od = new Odometer({
  5712.                 el: e,
  5713.                 value: parseInt($(this).html().replace("&nbsp;", ""))
  5714.             }), $(this).removeClass("odometer_i")
  5715.         })
  5716.     }, Sprashivai.ichecks = function() {
  5717.         $(".icheck_i").each(function() {
  5718.             $(this).iCheck({
  5719.                 checkboxClass: "icheckbox_flat"
  5720.             }), $(this).removeClass("icheck_i")
  5721.         })
  5722.     };
  5723. var top_error_timeout, top_message_timeout;
  5724. Sprashivai.show_error = function(e) {
  5725.     $("#top_error_message").html(e), top_error_timeout && clearTimeout(top_error_timeout), $("#top_error").show();
  5726.     var t = e.length / 19 * 1e3;
  5727.     t = 4e3 > t ? 4e3 : t, top_error_timeout = setTimeout("$('#top_error').hide();", t)
  5728. }, Sprashivai.show_center_loader = function(e) {
  5729.     $("#notify_small_block").html(e);
  5730.     var t = $("#notify_small_block").width() / 2;
  5731.     $("#notify_small_block").css("margin-left", "-" + t + "px"), $("#notify_small_block").show(), $("#notify_small_block").velocity({
  5732.         top: "70px",
  5733.         opacity: "1.0"
  5734.     }, {
  5735.         duration: 80,
  5736.         delay: 0,
  5737.         easing: "easeInSine"
  5738.     })
  5739. }, Sprashivai.hide_center_loader = function() {
  5740.     $("#notify_small_block").css("top", "0"), $("#notify_small_block").css("opacity", "0"), $("#notify_small_block").hide()
  5741. }, Sprashivai.show_message = function(e) {
  5742.     $("#top_message_text").html(e), top_message_timeout && clearTimeout(top_message_timeout), $("#top_message").show();
  5743.     var t = e.length / 19 * 1e3;
  5744.     t = 4e3 > t ? 4e3 : t, top_message_timeout = setTimeout("$('#top_message').hide();", t)
  5745. }, Sprashivai.open_youtube = function(e) {
  5746.     $.magnificPopup.open({
  5747.         items: {
  5748.             src: e,
  5749.             type: "iframe"
  5750.         }
  5751.     })
  5752. }, Sprashivai.open_media = function(e) {
  5753.     $.magnificPopup.open({
  5754.         items: {
  5755.             src: e,
  5756.             type: "image"
  5757.         }
  5758.     })
  5759. }, Sprashivai.top_menu = function() {
  5760.     $("#top_menu_box").css("top", "51px"), $("#top_menu_box").css("opacity", "1"), $("#top_menu_box").css("visibility", "visible")
  5761. }, Sprashivai.show_two_factor_about = function() {
  5762.     $.magnificPopup.open({
  5763.         items: {
  5764.             src: "/modals/two_factor_auth"
  5765.         },
  5766.         type: "ajax",
  5767.         showCloseBtn: !1,
  5768.         closeOnBgClick: !1
  5769.     }, 0)
  5770. }, Sprashivai.show_support = function() {
  5771.     $.magnificPopup.open({
  5772.         items: {
  5773.             src: "/modals/support"
  5774.         },
  5775.         type: "ajax",
  5776.         showCloseBtn: !1,
  5777.         closeOnBgClick: !0
  5778.     }, 0)
  5779. }, Sprashivai.two_factor_auth = function(e) {
  5780.     $.magnificPopup.close(), setTimeout(function() {
  5781.         $.magnificPopup.open({
  5782.             items: {
  5783.                 src: "/modals/set_two_factor?step=" + e
  5784.             },
  5785.             type: "ajax",
  5786.             showCloseBtn: !1,
  5787.             closeOnBgClick: !1
  5788.         }, 0)
  5789.     }, 100)
  5790. }, Sprashivai.search_quick = function(e) {
  5791.     if ($("#nav_search_results_content").html(""), e.length > 0) {
  5792.         $("#nav_search_results_content").append('<div class="pr_aut_blck"><a href="/search?query=' + encodeURIComponent(e) + '" class="pr_aut_lnk_s">Искать <b>' + e + "</b></a></div>"), Sprashivai.following_matched = [];
  5793.         var t = new RegExp(e, "i");
  5794.         Sprashivai.following.forEach(function(e, i, o) {
  5795.             e.username.match(t) ? Sprashivai.following_matched.push(e) : e.city.match(t) ? Sprashivai.following_matched.push(e) : e.fullname.match(t) && Sprashivai.following_matched.push(e)
  5796.         })
  5797.     } else Sprashivai.following_matched = Sprashivai.following;
  5798.     var i = "",
  5799.         t = new RegExp("(" + e + ")", "i");
  5800.     Sprashivai.following_matched.forEach(function(e, o, n) {
  5801.         6 >= o && (i += '<div class="pr_aut_blck"><a href="/' + e.username + '" class="pr_aut_lnk"><img class="pr_aut_img" src="' + e.photo + '" width="30" height="30"><p class="pr_auth_tit">@' + e.username.replace(t, '<span class="highlight_yel">$1</span>'), e.official && (i += '<i class="icon spr_icon_official_small"></i>'), i += '</p><p class="pr_auth_subtit">' + e.fullname.replace(t, '<span class="highlight_yel">$1</span>') + "</p></a>", e.fav && (i += '<div class="pr_fav"><i class="icon spr_icon_star_small"></i></div>'), i += "</div>")
  5802.     }), $("#nav_search_results_content").append(i), Sprashivai.favs > 7 && 0 == e.length && $("#nav_search_results_content").append('<div class="pr_aut_blck"><a href="/my/favourites" class="pr_aut_lnk_fav">Пользователи в закладках <b>' + Sprashivai.favs + "</b></a></div>");
  5803.  
  5804. }, Sprashivai.search_quick_update = function() {
  5805.     $(".pr_aut_blck").removeClass("pr_aut_blck_sel"), Sprashivai.following_index >= 0 && $(".pr_aut_blck:eq(" + Sprashivai.following_index + ")").addClass("pr_aut_blck_sel")
  5806. }, Sprashivai.open_payments = function() {
  5807.     $.magnificPopup.open({
  5808.         items: {
  5809.             src: "/modals/payments"
  5810.         },
  5811.         type: "ajax",
  5812.         showCloseBtn: !1,
  5813.         closeOnBgClick: !1
  5814.     }, 0)
  5815. };
  5816. var search_xhr;
  5817. Sprashivai.search = function(e) {
  5818.     $("#srch_loader").show(), e && (search_hits = 0, search_passed = 0, $("#load-more-preloader").show(), $("#load-more-link").hide()), $("#srch_result").css("opacity", "0.6"), $("#srch_query_hid").val($("#srch_query").val()), $("#srch_offset").val(search_passed), search_xhr && search_xhr.abort(), search_xhr = $.ajax({
  5819.         type: "POST",
  5820.         url: "/search/load",
  5821.         data: $("#search_filters_form").serialize(),
  5822.         dataType: "json",
  5823.         timeout: 3e4,
  5824.         success: function(t) {
  5825.             $("#srch_result").css("opacity", "1"), $("#srch_loader").hide(), e && ($("#load-more-preloader").hide(), $("#load-more-link").show()), "ok" == t.status ? (e && $("#srch_result").html(""), -1 == t.hits ? ($("#srch_hits").hide(), $("#srch_empty").hide(), search_hits = 0, $("#srch_load_more").hide()) : 0 == t.hits ? ($("#srch_empty").show(), $("#srch_hits").hide(), search_hits = 0, $("#srch_load_more").hide()) : ($("#srch_hits_text").html(t.hits_text), $("#srch_empty").hide(), $("#srch_hits").show(), search_hits = t.hits, search_passed += t.passed, search_passed >= t.hits ? $("#srch_load_more").hide() : $("#srch_load_more").show()), $("#srch_result").append(t.users)) : Sprashivai.show_error(t.message)
  5826.         },
  5827.         error: function(t, i) {
  5828.             e && ($("#load-more-preloader").hide(), $("#load-more-link").show()), $("#srch_loader").hide(), $("#srch_result").css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  5829.         }
  5830.     })
  5831. }, Sprashivai.open_avatar = function(e) {
  5832.     $.magnificPopup.open({
  5833.         items: {
  5834.             src: e,
  5835.             type: "image"
  5836.         }
  5837.     })
  5838. }, Date.now || (Date.now = function() {
  5839.     return (new Date).getTime()
  5840. }), Sprashivai.time_updater = function() {
  5841.     $(".t_timer").length > 0 && $(".t_timer").each(function() {
  5842.         $(this).children(".t_t").html(return_date_time($(this).children(".t_st").html()))
  5843.     }), setTimeout(function() {
  5844.         Sprashivai.time_updater()
  5845.     }, 1e4)
  5846. }, Sprashivai.pass_set_eye = function() {
  5847.     "password" == $("#rec_inp_new_pass").attr("type") ? ($("#rec_inp_new_pass").attr("type", "text"), $("#signin_eye_pass_rec").removeClass("spr_icon_eye_off"), $("#signin_eye_pass_rec").addClass("spr_icon_eye")) : ($("#rec_inp_new_pass").attr("type", "password"), $("#signin_eye_pass_rec").removeClass("spr_icon_eye"), $("#signin_eye_pass_rec").addClass("spr_icon_eye_off"))
  5848. }, Sprashivai.signin_eye = function() {
  5849.     "password" == $("#signin_pass").attr("type") ? ($("#signin_pass").attr("type", "text"), $("#signin_eye_i").removeClass("spr_icon_eye_off"), $("#signin_eye_i").addClass("spr_icon_eye")) : ($("#signin_pass").attr("type", "password"), $("#signin_eye_i").removeClass("spr_icon_eye"), $("#signin_eye_i").addClass("spr_icon_eye_off"))
  5850. }, Sprashivai.quck_reg_eye = function() {
  5851.     "password" == $("#qick_sngp_inp_pwd").attr("type") ? ($("#qick_sngp_inp_pwd").attr("type", "text"), $("#signin_eye_reg").removeClass("spr_icon_eye_off"), $("#signin_eye_reg").addClass("spr_icon_eye")) : ($("#qick_sngp_inp_pwd").attr("type", "password"), $("#signin_eye_reg").removeClass("spr_icon_eye"), $("#signin_eye_reg").addClass("spr_icon_eye_off"))
  5852. }, Sprashivai.signin = function() {
  5853.     $("#signin_btn").attr("disabled", "disabled"), $("#signin_btn").html("подождите..."), $("#signin_error").hide(), $.ajax({
  5854.         type: "POST",
  5855.         url: "/ajax/signin",
  5856.         data: {
  5857.             email: $("#signin_username").val(),
  5858.             pass: md5($("#signin_pass").val())
  5859.         },
  5860.         dataType: "json",
  5861.         timeout: 3e4,
  5862.         success: function(e) {
  5863.             "ok" == e.status ? location.reload() : ($("#signin_btn").removeAttr("disabled"), $("#signin_btn").html("Войти"), $("#signin_error").html(e.message), $("#signin_error").show())
  5864.         },
  5865.         error: function(e, t) {
  5866.             $("#signin_btn").removeAttr("disabled"), $("#signin_btn").html("Войти"), $("#signin_error").html("Произошла ошибка, попробуйте еще раз"), $("#signin_error").show()
  5867.         }
  5868.     })
  5869. }, window.Signup_quick || (window.Signup_quick = {}), window.Signup || (window.Signup = {}), "signup_finish" == Sprashivai.page && $(document).ready(function() {
  5870.     $(document).on("blur", "#sgnp_fin_us", function() {
  5871.         Signup.check_username(!1)
  5872.     }), $(document).on("blur", "#sgnp_fin_em", function() {
  5873.         Signup.check_email(!1)
  5874.     }), $(document).on("keyup", "#sgnp_fin_pwd", function() {
  5875.         Signup.check_pwd(!1)
  5876.     }), $("#sgnp_fin_pwd").passMeter(function(e) {
  5877.         $("#pass_strong_ind").css("width", e + "%"), 30 > e ? $("#pass_strong_ind").css("background-color", "#FF7979") : 55 > e ? $("#pass_strong_ind").css("background-color", "#FFBC84") : $("#pass_strong_ind").css("background-color", "#91DD81")
  5878.     }), $(document).on("focus", ".msignup_input", function() {
  5879.         var e = $(this).attr("id") + "_about",
  5880.             t = $(this).attr("id") + "_error";
  5881.         $("#" + t).hide(), $("#" + e).show()
  5882.     }), $(document).on("blur", ".msignup_input", function() {
  5883.         var e = $(this).attr("id") + "_about",
  5884.             t = $(this).attr("id") + "_error";
  5885.         $("#" + e).hide(), "" != $("#" + t).children(".form_error_bl").html() && $("#" + t).show()
  5886.     }), $("#sgnp_fin_us").keyup(function() {
  5887.         var e = new RegExp(/^([a-zA-Z0-9_]{3,25}?)$/);
  5888.         $(this).val().length > 0 && e.test($(this).val()) ? ($("#sgnp_future_url").html("http://sprashivai.ru/" + $(this).val()), $("#sgnp_future_address").show()) : $("#sgnp_future_address").hide()
  5889.     })
  5890. }), Signup_quick.check_username = function(e) {
  5891.     if ($("#qick_sngp_inp_us").removeClass("inp_err"), $("#qick_sngp_inp_us").removeClass("inp_success"), $("#qick_sngp_er_us").children(".form_error_bl").html(""), $("#qick_sngp_er_us").hide(), !e && "" == $("#qick_sngp_inp_us").val()) return !0;
  5892.     if (0 == $("#qick_sngp_inp_us").val().length) return $("#qick_sngp_er_us").children(".form_error_bl").html("Введите имя пользователя"), $("#qick_sngp_er_us").show(), $("#qick_sngp_inp_us").addClass("inp_err"), !1;
  5893.     var t = new RegExp(/^([a-zA-Z0-9_]{1,100}?)$/);
  5894.     return t.test($("#qick_sngp_inp_us").val()) ? ($("#qick_sngp_load_us").show(), void $.ajax({
  5895.         type: "GET",
  5896.         url: "/signup/check_username",
  5897.         dataType: "json",
  5898.         data: {
  5899.             username: $("#qick_sngp_inp_us").val()
  5900.         },
  5901.         timeout: 3e4,
  5902.         success: function(e, t, i) {
  5903.             $("#qick_sngp_load_us").hide(), "ok" == e.status ? $("#qick_sngp_inp_us").addClass("inp_success") : ($("#qick_sngp_er_us").children(".form_error_bl").html(e.message), $("#qick_sngp_er_us").show(), $("#qick_sngp_inp_us").addClass("inp_err"))
  5904.         },
  5905.         error: function(e, t) {
  5906.             $("#qick_sngp_load_us").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  5907.         }
  5908.     })) : ($("#qick_sngp_er_us").children(".form_error_bl").html("Имя пользователя может содержать только английские буквы, цифры и знак нижнего подчеркивания!"), $("#qick_sngp_er_us").show(), $("#qick_sngp_inp_us").addClass("inp_err"), !1)
  5909. }, Signup_quick.check_email = function(e) {
  5910.     if ($("#qick_sngp_inp_em").removeClass("inp_err"), $("#qick_sngp_inp_em").removeClass("inp_success"), $("#qick_sngp_er_em").children(".form_error_bl").html(""), $("#qick_sngp_er_em").hide(), !e && "" == $("#qick_sngp_inp_em").val()) return !0;
  5911.     if (0 == $("#qick_sngp_inp_em").val().length) return $("#qick_sngp_er_em").children(".form_error_bl").html("Введите email"), $("#qick_sngp_er_em").show(), $("#qick_sngp_inp_em").addClass("inp_err"), !1;
  5912.     var t = new RegExp(/^[\w.-]+@([a-z0-9\-]+\.)+[a-z]{2,6}$/i);
  5913.     return t.test($("#qick_sngp_inp_em").val()) ? ($("#qick_sngp_load_em").show(), void $.ajax({
  5914.         type: "GET",
  5915.         url: "/signup/check_email",
  5916.         dataType: "json",
  5917.         data: {
  5918.             email: $("#qick_sngp_inp_em").val()
  5919.         },
  5920.         timeout: 3e4,
  5921.         success: function(e, t, i) {
  5922.             $("#qick_sngp_load_em").hide(), "ok" == e.status ? $("#qick_sngp_inp_em").addClass("inp_success") : ($("#qick_sngp_er_em").children(".form_error_bl").html(e.message), $("#qick_sngp_er_em").show(), $("#qick_sngp_inp_em").addClass("inp_err"))
  5923.         },
  5924.         error: function(e, t) {
  5925.             $("#qick_sngp_load_em").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  5926.         }
  5927.     })) : ($("#qick_sngp_er_em").children(".form_error_bl").html("Введите корректный email!"), $("#qick_sngp_er_em").show(), $("#qick_sngp_inp_em").addClass("inp_err"), !1)
  5928. }, Signup_quick.check_pwd = function(e) {
  5929.     return $("#qick_sngp_inp_pwd").removeClass("inp_err"), $("#qick_sngp_inp_pwd").removeClass("inp_success"), $("#qick_sngp_er_pwd").children(".form_error_bl").html(""), $("#qick_sngp_er_pwd").hide(), e || "" != $("#qick_sngp_inp_pwd").val() ? 0 == $("#qick_sngp_inp_pwd").val().length ? ($("#qick_sngp_er_pwd").children(".form_error_bl").html("Введите пароль"), $("#qick_sngp_er_pwd").show(), $("#qick_sngp_inp_pwd").addClass("inp_err"), !1) : $("#qick_sngp_inp_pwd").val().length < 6 ? ($("#qick_sngp_er_pwd").children(".form_error_bl").html("Введите пароль подлиннее, минимум 6 символов"), $("#qick_sngp_er_pwd").show(), $("#qick_sngp_inp_pwd").addClass("inp_err"), !1) : $("#qick_sngp_inp_pwd").val().length > 22 ? ($("#qick_sngp_er_pwd").children(".form_error_bl").html("Введите пароль покороче, максимум 22 символа"), $("#qick_sngp_er_pwd").show(), $("#qick_sngp_inp_pwd").addClass("inp_err"), !1) : ($("#qick_sngp_inp_pwd").addClass("inp_success"), !0) : !0
  5930. }, Signup_quick.signup = function() {
  5931.     $("#qick_sngp_btn").html("регистрируем"), $("#qick_sngp_btn").attr("disabled", "disabled"), $.ajax({
  5932.         type: "POST",
  5933.         url: "/signup/quick",
  5934.         data: {
  5935.             email: $("#qick_sngp_inp_em").val(),
  5936.             username: $("#qick_sngp_inp_us").val(),
  5937.             pass: $("#qick_sngp_inp_pwd").val()
  5938.         },
  5939.         dataType: "json",
  5940.         timeout: 3e4,
  5941.         success: function(e) {
  5942.             $("#qick_sngp_btn").html("Зарегистрироваться"), $("#qick_sngp_btn").removeAttr("disabled"), "ok" == e.status ? ($("#qick_sngp_btn").html("регистрируем"), $("#qick_sngp_btn").attr("disabled", "disabled"), Sprashivai.show_center_loader("Ð’Ñ‹ успешно зарегистрировались, подождите еще чуть-чуть..."), location = e.redirect) : e.field ? ($("#qick_sngp_er_" + e.field).children(".form_error_bl").html(e.message), $("#qick_sngp_er_" + e.field).show(), $("#qick_sngp_inp_" + e.field).addClass("inp_err")) : Sprashivai.show_error(e.message)
  5943.         },
  5944.         error: function(e, t) {
  5945.             $("#qick_sngp_btn").html("Зарегистрироваться"), $("#qick_sngp_btn").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  5946.         }
  5947.     })
  5948. }, Signup.signup_finish = function() {
  5949.     $("#btn_signup_finish").html("регистрируем"), $("#btn_signup_finish").attr("disabled", "disabled"), $.ajax({
  5950.         type: "POST",
  5951.         url: "/signup/finish",
  5952.         data: $("#form_signup_finish").serialize(),
  5953.         dataType: "json",
  5954.         timeout: 3e4,
  5955.         success: function(e) {
  5956.             $("#btn_signup_finish").html("Зарегистрироваться"), $("#btn_signup_finish").removeAttr("disabled"), "ok" == e.status ? ($("#btn_signup_finish").html("регистрируем"), $("#btn_signup_finish").attr("disabled", "disabled"), Sprashivai.show_center_loader("Ð’Ñ‹ успешно зарегистрировались, подождите еще чуть-чуть..."), location = "/signup/next?from=signup") : Sprashivai.show_error(e.message)
  5957.         },
  5958.         error: function(e, t) {
  5959.             $("#btn_signup_finish").html("Зарегистрироваться"), $("#btn_signup_finish").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  5960.         }
  5961.     })
  5962. }, "signup" == Sprashivai.page && $(document).ready(function() {
  5963.     $(document).on("blur", "#sgnp_fin_us", function() {
  5964.         Signup.check_username(!1)
  5965.     }), $(document).on("blur", "#sgnp_fin_em", function() {
  5966.         Signup.check_email(!1)
  5967.     }), $(document).on("keyup", "#sgnp_fin_pwd", function() {
  5968.         Signup.check_pwd(!1)
  5969.     }), $("#sgnp_fin_pwd").passMeter(function(e) {
  5970.         $("#pass_strong_ind").css("width", e + "%"), 30 > e ? $("#pass_strong_ind").css("background-color", "#FF7979") : 55 > e ? $("#pass_strong_ind").css("background-color", "#FFBC84") : $("#pass_strong_ind").css("background-color", "#91DD81")
  5971.     }), $(document).on("focus", ".msignup_input", function() {
  5972.         var e = $(this).attr("id") + "_about",
  5973.             t = $(this).attr("id") + "_error";
  5974.         $("#" + t).hide(), $("#" + e).show()
  5975.     }), $(document).on("blur", ".msignup_input", function() {
  5976.         var e = $(this).attr("id") + "_about",
  5977.             t = $(this).attr("id") + "_error";
  5978.         $("#" + e).hide(), "" != $("#" + t).children(".form_error_bl").html() && $("#" + t).show()
  5979.     }), $("#sgnp_fin_us").keyup(function() {
  5980.         var e = new RegExp(/^([a-zA-Z0-9_]{3,25}?)$/);
  5981.         $(this).val().length > 0 && e.test($(this).val()) ? ($("#sgnp_future_url").html("http://sprashivai.ru/" + $(this).val()), $("#sgnp_future_address").show()) : $("#sgnp_future_address").hide()
  5982.     })
  5983. }), Signup.check_username = function(e) {
  5984.     if ($("#sgnp_fin_us").removeClass("inp_err"), $("#sgnp_fin_us").removeClass("inp_success"), $("#sgnp_fin_us_error").children(".form_error_bl").html(""), $("#sgnp_fin_us_error").hide(), !e && "" == $("#sgnp_fin_us").val()) return !0;
  5985.     if (0 == $("#sgnp_fin_us").val().length) return $("#sgnp_fin_us_error").css("z-index", 100), $("#sgnp_fin_us_error").children(".form_error_bl").html("Введите имя пользователя"), $("#sgnp_fin_us_error").show(), $("#sgnp_fin_us").addClass("inp_err"), !1;
  5986.     var t = new RegExp(/^([a-zA-Z0-9_]{1,100}?)$/);
  5987.     return t.test($("#sgnp_fin_us").val()) ? ($("#sgnp_fin_us_loader").show(), void $.ajax({
  5988.         type: "GET",
  5989.         url: "/signup/check_username",
  5990.         dataType: "json",
  5991.         data: {
  5992.             username: $("#sgnp_fin_us").val()
  5993.         },
  5994.         timeout: 3e4,
  5995.         success: function(e, t, i) {
  5996.             $("#sgnp_fin_us_loader").hide(), "ok" == e.status ? $("#sgnp_fin_us").addClass("inp_success") : ($("#sgnp_fin_us_error").css("z-index", 100), $("#sgnp_fin_us_error").children(".form_error_bl").html(e.message), $("#sgnp_fin_us_error").show(), $("#sgnp_fin_us").addClass("inp_err"))
  5997.         },
  5998.         error: function(e, t) {
  5999.             $("#sgnp_fin_us_loader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6000.         }
  6001.     })) : ($("#sgnp_fin_us_error").css("z-index", 100), $("#sgnp_fin_us_error").children(".form_error_bl").html("Имя пользователя может содержать только английские буквы, цифры и знак нижнего подчеркивания!"), $("#sgnp_fin_us_error").show(), $("#sgnp_fin_us").addClass("inp_err"), !1)
  6002. }, Signup.check_email = function(e) {
  6003.     if ($("#sgnp_fin_em").removeClass("inp_err"), $("#sgnp_fin_em").removeClass("inp_success"), $("#sgnp_fin_em_error").children(".form_error_bl").html(""), $("#sgnp_fin_em_error").hide(), !e && "" == $("#sgnp_fin_em").val()) return !0;
  6004.     if (0 == $("#sgnp_fin_em").val().length) return $("#sgnp_fin_em_error").css("z-index", 100), $("#sgnp_fin_em_error").children(".form_error_bl").html("Введите email"), $("#sgnp_fin_em_error").show(), $("#sgnp_fin_em").addClass("inp_err"), !1;
  6005.     var t = new RegExp(/^[\w.-]+@([a-z0-9\-]+\.)+[a-z]{2,6}$/i);
  6006.     return t.test($("#sgnp_fin_em").val()) ? ($("#sgnp_fin_em_loader").show(), void $.ajax({
  6007.         type: "GET",
  6008.         url: "/signup/check_email",
  6009.         dataType: "json",
  6010.         data: {
  6011.             email: $("#sgnp_fin_em").val()
  6012.         },
  6013.         timeout: 3e4,
  6014.         success: function(e, t, i) {
  6015.             $("#sgnp_fin_em_loader").hide(), "ok" == e.status ? $("#sgnp_fin_em").addClass("inp_success") : ($("#sgnp_fin_em_error").css("z-index", 100), $("#sgnp_fin_em_error").children(".form_error_bl").html(e.message), $("#sgnp_fin_em_error").show(), $("#sgnp_fin_em").addClass("inp_err"))
  6016.         },
  6017.         error: function(e, t) {
  6018.             $("#sgnp_fin_em_loader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6019.         }
  6020.     })) : ($("#sgnp_fin_em_error").css("z-index", 100), $("#sgnp_fin_em_error").children(".form_error_bl").html("Введите корректный email!"), $("#sgnp_fin_em_error").show(), $("#sgnp_fin_em").addClass("inp_err"), !1)
  6021. }, Signup.check_pwd = function(e) {
  6022.     return $("#sgnp_fin_pwd").removeClass("inp_err"), $("#sgnp_fin_pwd").removeClass("inp_success"), $("#sgnp_fin_pwd_error").children(".form_error_bl").html(""), $("#sgnp_fin_pwd_error").hide(), e || "" != $("#sgnp_fin_pwd").val() ? 0 == $("#sgnp_fin_pwd").val().length ? ($("#sgnp_fin_pwd_error").css("z-index", 100), $("#sgnp_fin_pwd_error").children(".form_error_bl").html("Введите пароль"), $("#sgnp_fin_pwd_error").show(), $("#sgnp_fin_pwd").addClass("inp_err"), !1) : $("#sgnp_fin_pwd").val().length < 6 ? ($("#sgnp_fin_pwd_error").css("z-index", 100), $("#sgnp_fin_pwd_error").children(".form_error_bl").html("Введите пароль подлиннее, минимум 6 символов"), $("#sgnp_fin_pwd_error").show(), $("#sgnp_fin_pwd").addClass("inp_err"), !1) : $("#sgnp_fin_pwd").val().length > 22 ? ($("#sgnp_fin_pwd_error").css("z-index", 100), $("#sgnp_fin_pwd_error").children(".form_error_bl").html("Введите пароль покороче, максимум 22 символа"), $("#sgnp_fin_pwd_error").show(), $("#sgnp_fin_pwd").addClass("inp_err"), !1) : ($("#sgnp_fin_pwd").addClass("inp_success"), !0) : !0
  6023. }, Signup.signup_main = function() {
  6024.     $("#btn_signup_finish").html("регистрируем"), $("#btn_signup_finish").attr("disabled", "disabled"), $.ajax({
  6025.         type: "POST",
  6026.         url: "/signup/quick",
  6027.         data: {
  6028.             email: $("#sgnp_fin_em").val(),
  6029.             username: $("#sgnp_fin_us").val(),
  6030.             pass: $("#sgnp_fin_pwd").val(),
  6031.             "g-recaptcha-response": grecaptcha.getResponse()
  6032.         },
  6033.         dataType: "json",
  6034.         timeout: 3e4,
  6035.         success: function(e) {
  6036.             $("#btn_signup_finish").html("Зарегистрироваться"), $("#btn_signup_finish").removeAttr("disabled"), "ok" == e.status ? ($("#btn_signup_finish").html("регистрируем"), $("#btn_signup_finish").attr("disabled", "disabled"), Sprashivai.show_center_loader("Ð’Ñ‹ успешно зарегистрировались, подождите еще чуть-чуть..."), location = e.redirect) : e.field ? ($("#sgnp_fin_" + e.field + "_error").children(".form_error_bl").html(e.message), $("#sgnp_fin_" + e.field + "_error").show(), $("#sgnp_fin_" + e.field).addClass("inp_err")) : Sprashivai.show_error(e.message)
  6037.         },
  6038.         error: function(e, t) {
  6039.             $("#btn_signup_finish").html("Зарегистрироваться"), $("#btn_signup_finish").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6040.         }
  6041.     })
  6042. }, window.Profile || (window.Profile = {}), Profile.quick_edit_changed = !1, Profile.quick_edit_visible = !1, Profile.quick_edit = function(e) {
  6043.     e = "undefined" != typeof e ? e : !1, !Profile.quick_edit_visible || e ? ($.ajaxSetup({
  6044.         cache: !1
  6045.     }), Profile.quick_edit_visible = !0, $("#pr-quick-edit-lyot").show(), $("#pr-quick-edit-lyot").children(".loader-lyot").show(), $("#pr-quick-edit-lyot").children(".loader-error").hide(), $("#profile_quick_edit_content").hide(), $("#pr_quck_edit_btn_lyot").addClass("pr-qck-edit-btn-vis"), $("#pr-second-line").length > 0 && $("#pr-second-line").hide(), $("#profile_quick_edit_content").load("/blocks/profile/quick_edit", function(e, t, i) {
  6046.         $("#pr-quick-edit-lyot").children(".loader-lyot").hide(), "error" == t ? $("#pr-quick-edit-lyot").children(".loader-error").show() : $("#profile_quick_edit_content").show()
  6047.     })) : (Profile.quick_edit_visible = !1, $("#pr-quick-edit-lyot").hide(), $("#pr-quick-edit-lyot").children(".loader-lyot").hide(), $("#profile_quick_edit_content").unbind("load"), $("#pr_quck_edit_btn_lyot").removeClass("pr-qck-edit-btn-vis"), $("#pr-second-line").length > 0 && $("#pr-second-line").show())
  6048. }, Profile.edit_status = function() {
  6049.     $("#pr_status_text").hide(), $("#pr_status_edit").show(), $("#pr_status_edit_input").focus()
  6050. }, Profile.cancel_edit_status = function() {
  6051.     $("#pr_status_text").show(), $("#pr_status_edit").hide(), $("#pr_status_edit_input").val(Sprashivai.profile_status)
  6052. }, Profile.delete_status = function(e) {
  6053.     $("#pr_status_text").show(), $("#pr_status_edit").hide(), $("#pr_status_text_lnk").removeClass("lnk_drk_grey"), $("#pr_status_text_lnk").addClass("lnk_lght_grey"), $("#pr_status_text_lnk").html("изменить статус"), $("#pr_stat_delete").hide(), Sprashivai.profile_status = "", $("#pr_status_edit_input").val(""), $.ajax({
  6054.         type: "POST",
  6055.         url: "/profile/status/delete",
  6056.         data: {
  6057.             hash: e
  6058.         },
  6059.         dataType: "json",
  6060.         timeout: 3e4
  6061.     })
  6062. }, Profile.set_status = function(e) {
  6063.     $.ajax({
  6064.         type: "POST",
  6065.         url: "/profile/status/set",
  6066.         data: {
  6067.             status: $("#pr_status_edit_input").val(),
  6068.             hash: e
  6069.         },
  6070.         dataType: "json",
  6071.         timeout: 3e4,
  6072.         success: function(e) {
  6073.             "ok" == e.status ? ($("#pr_status_edit_input").val(e.status_text), $("#pr_status_text_lnk").addClass("lnk_drk_grey"), $("#pr_status_text_lnk").removeClass("lnk_lght_grey"), $("#pr_status_text_lnk").html(e.status_text), $("#pr_status_text").show(), $("#pr_status_edit").hide(), $("#pr_stat_delete").show(), Sprashivai.profile_status = e.status_text) : Sprashivai.show_error(e.message)
  6074.         },
  6075.         error: function(e, t) {
  6076.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6077.         }
  6078.     })
  6079. }, Profile.set_gender = function(e) {
  6080.     $("#pr_quick_edit_gender").val(e), "m" == e ? ($("#pr_quick_edit_gender_m").addClass("set_gen_m_a"), $("#pr_quick_edit_gender_m").removeClass("set_gen_m"), $("#pr_quick_edit_gender_w").addClass("set_gen_w"), $("#pr_quick_edit_gender_w").removeClass("set_gen_w_a"), $("#pr_quick_edit_gender").val(e)) : ($("#pr_quick_edit_gender_m").removeClass("set_gen_m_a"), $("#pr_quick_edit_gender_m").addClass("set_gen_m"), $("#pr_quick_edit_gender_w").removeClass("set_gen_w"), $("#pr_quick_edit_gender_w").addClass("set_gen_w_a"))
  6081. }, Profile.update_profile_quick = function(e) {
  6082.     $("#pr_quick_edit_button").html("сохраняем..."), $("#pr_quick_edit_button").attr("disabled", "disabled"), $("#pr_quick_edit_error").hide(), $("#interests_txtarea_tag").val().length > 0 && $("#interests_txtarea_tag").val() != tags_default_text && $("#interests_txtarea").addTag($("#interests_txtarea_tag").val());
  6083.     var t = $("#pr_quick_edit_dn_show_age").is(":checked") ? "true" : "false";
  6084.     $.ajax({
  6085.         type: "POST",
  6086.         url: "/profile/quick_edit",
  6087.         data: {
  6088.             fullname: $("#pr_quick_edit_fullname").val(),
  6089.             city: $("#pr_quick_edit_city").val(),
  6090.             city_id: $("#pr_quick_edit_city_id").val(),
  6091.             b_day: $("#pr_quick_edit_b_day").val(),
  6092.             b_month: $("#pr_quick_edit_b_month").val(),
  6093.             b_year: $("#pr_quick_edit_b_year").val(),
  6094.             show_age: t,
  6095.             gender: $("#pr_quick_edit_gender").val(),
  6096.             interests: $("#interests_txtarea").val(),
  6097.             hash: e,
  6098.             sig: hash_profile_quick_edit(e, $("#pr_quick_edit_fullname").val(), $("#pr_quick_edit_city").val())
  6099.         },
  6100.         dataType: "json",
  6101.         timeout: 3e4,
  6102.         success: function(e) {
  6103.             "ok" == e.status ? ($(".toolt-n").tooltipster("destroy"), $("#pr-second-line").html(e.profile.second_line), $("#pr-profile-name-main").html(e.profile.fullname), $("#pr-second-line").show(), $("#pr-quick-edit-lyot").hide(), $("#pr_quck_edit_btn_lyot").removeClass("pr-qck-edit-btn-vis"), Profile.quick_edit_visible = !1, $("#pr-quick-edit-lyot").children(".loader-lyot").hide(), $("#profile_quick_edit_content").unbind("load"), $(".toolt-n").tooltipster({
  6104.                 delay: 0,
  6105.                 position: "top",
  6106.                 animation: "grow"
  6107.             })) : ($("#pr_quick_edit_button").html("Сохранить"), $("#pr_quick_edit_button").removeAttr("disabled"), $("#pr_quick_edit_error").html(e.message), $("#pr_quick_edit_error").show())
  6108.         },
  6109.         error: function(e, t) {
  6110.             $("#pr_quick_edit_button").html("Сохранить"), $("#pr_quick_edit_button").removeAttr("disabled"), $("#pr_quick_edit_error").html("Произошла ошибка, попробуйте еще раз"), $("#pr_quick_edit_error").show()
  6111.         }
  6112.     })
  6113. }, Profile.recount = function() {
  6114.     $("#btn_set_recount").html("подождите..."), $("#btn_set_recount").attr("disabled", "disabled"), $.ajax({
  6115.         type: "POST",
  6116.         url: "/settings/recount",
  6117.         dataType: "json",
  6118.         timeout: 3e4,
  6119.         success: function(e) {
  6120.             "ok" == e.status ? (Sprashivai.show_message("Готово, обновляем страницу..."), location.reload()) : ($("#btn_set_recount").html("Пересчитать показатели"), $("#btn_set_recount").removeAttr("disabled"), Sprashivai.show_error(e.message))
  6121.         },
  6122.         error: function(e, t) {
  6123.             $("#btn_set_recount").html("Пересчитать показатели"), $("#btn_set_recount").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6124.         }
  6125.     })
  6126. }, Profile.toggle_favourite = function(e) {
  6127.     $.ajax({
  6128.         type: "POST",
  6129.         url: "/profile/set_favourite",
  6130.         data: {
  6131.             user: e
  6132.         },
  6133.         dataType: "json",
  6134.         timeout: 3e4,
  6135.         success: function(t) {
  6136.             "ok" == t.status ? ("removed" == t.action ? ($(".fav_lnk_" + e).children("i").removeClass("spr_icon_star"), $(".fav_lnk_" + e).children("i").addClass("spr_icon_star_grey")) : ($(".fav_lnk_" + e).children("i").addClass("spr_icon_star"), $(".fav_lnk_" + e).children("i").removeClass("spr_icon_star_grey")), $(".fav_lnk_" + e).tooltipster("destroy"), $(".fav_lnk_" + e).attr("title", t.title), Sprashivai.show_message(t.alert), $(".fav_lnk_" + e).tooltipster({
  6137.                 delay: 0,
  6138.                 position: "top",
  6139.                 animation: "grow"
  6140.             })) : Sprashivai.show_error(t.message)
  6141.         },
  6142.         error: function(e, t) {
  6143.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6144.         }
  6145.     })
  6146. }, Profile.delete_blacklist_item = function(e) {
  6147.     $("#bl_item_" + e).css("opacity", "0.6"), Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6148.         type: "POST",
  6149.         url: "/settings/blacklist/delete_record",
  6150.         data: {
  6151.             blacklist_id: e
  6152.         },
  6153.         dataType: "json",
  6154.         timeout: 3e4,
  6155.         success: function(t) {
  6156.             $("#bl_item_" + e).css("opacity", "1"), Sprashivai.hide_center_loader(), "ok" == t.status ? ($("#bl_item_" + e).velocity("slideUp", {
  6157.                 delay: 0,
  6158.                 duration: 150
  6159.             }), Sprashivai.show_message("Запись удалена из черного списка")) : Sprashivai.show_error(t.message)
  6160.         },
  6161.         error: function(t, i) {
  6162.             $("#bl_item_" + e).css("opacity", "1"), Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6163.         }
  6164.     })
  6165. }, Profile.terminate_all_sessions = function() {
  6166.     return confirm("Ð’Ñ‹ действительно хотите закрыть все сессии, кроме текущей?") ? (Sprashivai.show_center_loader("Пожалуйста, подождите..."), void $.ajax({
  6167.         type: "POST",
  6168.         url: "/settings/terminate_all_sessions",
  6169.         dataType: "json",
  6170.         timeout: 3e4,
  6171.         success: function(e) {
  6172.             "ok" == e.status ? location.reload() : (Sprashivai.hide_center_loader(), Sprashivai.show_error(e.message))
  6173.         },
  6174.         error: function(e, t) {
  6175.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6176.         }
  6177.     })) : !1
  6178. }, Profile.open_upload_avatar_dialog = function() {
  6179.     $.magnificPopup.open({
  6180.         items: {
  6181.             src: "/modals/profile/avatar/upload"
  6182.         },
  6183.         type: "ajax",
  6184.         showCloseBtn: !1,
  6185.         closeOnBgClick: !1
  6186.     }, 0)
  6187. }, Profile.open_sms_live_dialog = function() {
  6188.     $.magnificPopup.open({
  6189.         items: {
  6190.             src: "/modals/sms_live"
  6191.         },
  6192.         type: "ajax",
  6193.         showCloseBtn: !1,
  6194.         closeOnBgClick: !1
  6195.     }, 0)
  6196. }, Profile.sms_live_in = function(e) {
  6197.     $("#btn_sms_live_place").attr("disabled", "disabled"), $("#btn_sms_live_place_text").html("подождите..."), $.ajax({
  6198.         type: "POST",
  6199.         url: "/sms/live/place",
  6200.         dataType: "json",
  6201.         data: {
  6202.             hash: e
  6203.         },
  6204.         timeout: 3e4,
  6205.         success: function(e) {
  6206.             $("#btn_sms_live_place").removeAttr("disabled"), $("#btn_sms_live_place_text").html("Вступить с баланса"), "ok" == e.status ? ($(".self_balance").html(e.balance), $("#sms_live_users").prepend(e.cell_html), $("#sms_live_tmp_item").velocity({
  6207.                 marginLeft: "0"
  6208.             }, {
  6209.                 duration: 200,
  6210.                 delay: 0,
  6211.                 easing: "easeInSine",
  6212.                 complete: function() {
  6213.                     $("#sms_live_tmp_item").removeAttr("id")
  6214.                 }
  6215.             }), $.magnificPopup.close(), Sprashivai.show_message("Ð’Ñ‹ стали популярнее!")) : Sprashivai.show_error(e.message)
  6216.         },
  6217.         error: function() {
  6218.             $("#btn_sms_live_place").removeAttr("disabled"), $("#btn_sms_live_place_text").html("Вступить с баланса"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6219.         }
  6220.     })
  6221. }, Profile.open_verify_dialog = function() {
  6222.     $.magnificPopup.open({
  6223.         items: {
  6224.             src: "/modals/verify"
  6225.         },
  6226.         type: "ajax",
  6227.         showCloseBtn: !1,
  6228.         closeOnBgClick: !1
  6229.     }, 0)
  6230. };
  6231. var check_verified_timeout;
  6232. Profile.check_verified = function() {
  6233.     clearTimeout(check_verified_timeout), $.ajax({
  6234.         type: "POST",
  6235.         url: "/profile/check_verified",
  6236.         dataType: "json",
  6237.         timeout: 3e4,
  6238.         success: function(e) {
  6239.             "ok" == e.status && (e.verified ? ($("#modal_verify").hide(), $("#modal_verified").show()) : check_verified_timeout = setTimeout(function() {
  6240.                 Profile.check_verified()
  6241.             }, 8e3))
  6242.         }
  6243.     })
  6244. }, Profile.open_avatar_list = function() {
  6245.     $.magnificPopup.open({
  6246.         items: {
  6247.             src: "/modals/profile/avatars"
  6248.         },
  6249.         type: "ajax",
  6250.         showCloseBtn: !1,
  6251.         closeOnBgClick: !0
  6252.     }, 0)
  6253. }, Profile.set_avatar = function(e) {
  6254.     $.ajax({
  6255.         type: "POST",
  6256.         url: "/profile/avatar/set",
  6257.         data: {
  6258.             avatar_id: e
  6259.         },
  6260.         dataType: "json",
  6261.         timeout: 3e4,
  6262.         success: function(e) {
  6263.             "ok" == e.status ? ($(".av_self_s").attr("src", e.photo_square), $("#user_big_avatar").attr("src", e.photo_big), $("#self_av_opt_crop").show(), $("#self_av_opt_delete").show(), $.magnificPopup.close()) : Sprashivai.show_error(e.message)
  6264.         },
  6265.         error: function(e, t) {
  6266.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6267.         }
  6268.     })
  6269. }, Profile.avatar_upload_repeat = function() {
  6270.     $("#avtr_upl_cntr").show(), $("#av_upl_pgrs_div").hide(), $("#av_upl_crop").hide(), $("#av_upl_error").hide()
  6271. }, Profile.avatar_upload_error = function(e) {
  6272.     $("#av_upl_error_message").text(e), $("#avtr_upl_cntr").hide(), $("#av_upl_pgrs_div").hide(), $("#av_upl_crop").hide(), $("#av_upl_error").show()
  6273. }, Profile.close_upload_avatar_dialog = function() {
  6274.     "undefined" != typeof window.ias && window.ias.cancelSelection(), $.magnificPopup.close()
  6275. }, Profile.crop_avatar_dialog = function() {
  6276.     $.magnificPopup.open({
  6277.         items: {
  6278.             src: "/modals/avatar/crop"
  6279.         },
  6280.         type: "ajax",
  6281.         showCloseBtn: !1,
  6282.         closeOnBgClick: !1
  6283.     }, 0)
  6284. }, Profile.crop_avatar = function(e) {
  6285.     $("#btn_av_crop").attr("disabled", "disabled"), $("#btn_av_crop").children(".loader").show(), $.ajax({
  6286.         type: "POST",
  6287.         url: "/profile/avatar/crop",
  6288.         data: {
  6289.             avatar: $("#crop_av_id").val(),
  6290.             x1: $("#crop_av_x1").val(),
  6291.             x2: $("#crop_av_x2").val(),
  6292.             y1: $("#crop_av_y1").val(),
  6293.             y2: $("#crop_av_y2").val(),
  6294.             hash: e
  6295.         },
  6296.         dataType: "json",
  6297.         timeout: 3e4,
  6298.         success: function(e) {
  6299.             $("#btn_av_crop").removeAttr("disabled"), $("#btn_av_crop").children(".loader").hide(), "ok" == e.status ? ($(".av_self_s").attr("src", e.photo_square), Profile.close_upload_avatar_dialog()) : Sprashivai.show_error(e.message)
  6300.         },
  6301.         error: function(e, t) {
  6302.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз"), $("#btn_av_crop").removeAttr("disabled"), $("#btn_av_crop").children(".loader").hide()
  6303.         }
  6304.     })
  6305. }, Profile.following_autocomplete = function() {
  6306.     $("#nav_search_load").show(), $("#nav_search_results_content").html(""), $.ajax({
  6307.         type: "GET",
  6308.         url: "/ajax/following",
  6309.         dataType: "json",
  6310.         timeout: 3e4,
  6311.         success: function(e) {
  6312.             $("#nav_search_load").hide(), "ok" == e.status ? (Sprashivai.following = e.following, Sprashivai.following_matched = e.following, Sprashivai.favs = e.fav_count, $("#nav_search_results_content").html(e.html), Sprashivai.search_quick($("#nav_search_inp").val())) : Sprashivai.show_error(e.message)
  6313.         },
  6314.         error: function(e, t) {
  6315.             $("#nav_search_load").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6316.         }
  6317.     })
  6318. }, Profile.show_notifications = function(e) {
  6319.     return $("#not_cont").is(":visible") ? ($("#not_cont").hide(), !1) : ($("#not_cont").show(), $("#not_loading").show(), $("#not_error").hide(), void $.ajax({
  6320.         type: "GET",
  6321.         url: "/notifications/load",
  6322.         dataType: "json",
  6323.         timeout: 3e4,
  6324.         success: function(e) {
  6325.             $("#not_loading").hide(), "ok" == e.status ? ($("#not_content").show(), $("#not_content").html(e.html), e.unread > 0 ? $("#not_box_mark_as_read").css("display", "block") : $("#not_box_mark_as_read").hide()) : ($("#not_error").show(), $("#not_content").hide(), Sprashivai.show_error(e.message))
  6326.         },
  6327.         error: function(e, t) {
  6328.             $("#not_loading").hide(), $("#not_error").show(), $("#not_content").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6329.         }
  6330.     }))
  6331. }, Profile.load_notifications = function() {
  6332.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  6333.         type: "POST",
  6334.         url: "/notifications/full/load",
  6335.         data: {
  6336.             offset: notifications_passed
  6337.         },
  6338.         dataType: "json",
  6339.         timeout: 3e4,
  6340.         success: function(e) {
  6341.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($("#notifications_div").append(e.html), notifications_passed += e.passed, notifications_passed >= notifications_count && $("#load-more-link").hide()) : Sprashivai.show_error(e.message)
  6342.         },
  6343.         error: function(e, t) {
  6344.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6345.         }
  6346.     })
  6347. }, Profile.mark_notifications_as_read = function() {
  6348.     $("#notifications_div").css("opacity", "0.8"), $.ajax({
  6349.         type: "POST",
  6350.         url: "/notifications/mark_as_read",
  6351.         dataType: "json",
  6352.         timeout: 3e4,
  6353.         success: function(e) {
  6354.             $("#notifications_div").css("opacity", "1.0"), "ok" == e.status ? ($(".notify_big_link").removeClass("notify_link_unr"), $(".notify_link").removeClass("notify_link_unr"), $("#head_not_lnk").removeClass("spr_ntf_red"), $("#head_not_lnk").addClass("spr_ntf_blue"), $("#head_not_span").html("&nbsp;"), $("#not_box_mark_as_read").hide(), Sprashivai.show_message("Все уведомления отмечены как просмотренные")) : Sprashivai.show_error(e.message)
  6355.         },
  6356.         error: function(e, t) {
  6357.             $("#notifications_div").css("opacity", "1.0"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6358.         }
  6359.     })
  6360. }, Profile.load_following = function(e) {
  6361.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  6362.         type: "POST",
  6363.         url: "/" + e + "/following/load",
  6364.         data: {
  6365.             offset: following_passed
  6366.         },
  6367.         dataType: "json",
  6368.         timeout: 3e4,
  6369.         success: function(e) {
  6370.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($("#user_following").append(e.html), following_passed += e.passed, following_passed >= following_count && $("#load-more-link").hide()) : Sprashivai.show_error(e.message)
  6371.         },
  6372.         error: function(e, t) {
  6373.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6374.         }
  6375.     })
  6376. }, Profile.load_followers = function(e) {
  6377.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  6378.         type: "POST",
  6379.         url: "/" + e + "/followers/load",
  6380.         data: {
  6381.             offset: following_passed
  6382.         },
  6383.         dataType: "json",
  6384.         timeout: 3e4,
  6385.         success: function(e) {
  6386.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($("#user_following").append(e.html), following_passed += e.passed, following_passed >= following_count && $("#load-more-link").hide()) : Sprashivai.show_error(e.message)
  6387.         },
  6388.         error: function(e, t) {
  6389.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6390.         }
  6391.     })
  6392. }, Profile.unlink_social = function(e) {
  6393.     Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6394.         type: "POST",
  6395.         url: "/social/" + e + "/unlink",
  6396.         dataType: "json",
  6397.         timeout: 3e4,
  6398.         success: function(t) {
  6399.             Sprashivai.hide_center_loader(), "ok" == t.status ? ($("#social_privacy_" + e).hide(), $("#social_info_div_" + e).hide(), $("#social_btn_div_" + e).show(), $("#social_unlink_" + e).hide(), Sprashivai.show_message("Социальная сеть отключена")) : Sprashivai.show_error(t.message)
  6400.         },
  6401.         error: function(e, t) {
  6402.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6403.         }
  6404.     })
  6405. };
  6406. var settings_main_xhr;
  6407. Profile.save_settings = function() {
  6408.     $("#btn_set_main_save").html("сохраняем..."),
  6409.         $("#btn_set_main_save").attr("disabled", "disabled"), settings_main_xhr && settings_main_xhr.abort(), settings_main_xhr = $.ajax({
  6410.             type: "POST",
  6411.             url: "/settings/main/update",
  6412.             data: $("#form_settings_main").serialize(),
  6413.             dataType: "json",
  6414.             timeout: 3e4,
  6415.             success: function(e) {
  6416.                 $("#btn_set_main_save").html("Сохранить"), $("#btn_set_main_save").removeAttr("disabled", "disabled"), "ok" == e.status ? Sprashivai.show_message("Настройки сохранены") : Sprashivai.show_error(e.message)
  6417.             },
  6418.             error: function(e, t) {
  6419.                 $("#btn_set_main_save").html("Сохранить"), $("#btn_set_main_save").removeAttr("disabled", "disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6420.             }
  6421.         })
  6422. };
  6423. var settings_design_xhr;
  6424. Profile.save_design = function() {
  6425.     $("#btn_set_design").html("сохраняем..."), $("#btn_set_design").attr("disabled", "disabled");
  6426.     var e = $("#ui_bg_del").is(":checked") ? !0 : !1;
  6427.     settings_design_xhr && settings_design_xhr.abort(), settings_design_xhr = $.ajax({
  6428.         type: "POST",
  6429.         url: "/settings/design/update",
  6430.         data: $("#form_settings_design").serialize(),
  6431.         dataType: "json",
  6432.         timeout: 3e4,
  6433.         success: function(t) {
  6434.             $("#btn_set_design").html("Сохранить изменения"), $("#btn_set_design").removeAttr("disabled", "disabled"), "ok" == t.status ? (e && $("#ui_bg_settings").hide(), Sprashivai.show_message("Настройки сохранены")) : Sprashivai.show_error(t.message)
  6435.         },
  6436.         error: function(e, t) {
  6437.             $("#btn_set_design").html("Сохранить изменения"), $("#btn_set_design").removeAttr("disabled", "disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6438.         }
  6439.     })
  6440. };
  6441. var settings_privacy_xhr;
  6442. Profile.save_privacy = function() {
  6443.     $("#btn_privacy_save").html("сохраняем..."), $("#btn_privacy_save").attr("disabled", "disabled"), settings_privacy_xhr && settings_privacy_xhr.abort(), settings_privacy_xhr = $.ajax({
  6444.         type: "POST",
  6445.         url: "/settings/privacy/update",
  6446.         data: $("#form_settings_privacy").serialize(),
  6447.         dataType: "json",
  6448.         timeout: 3e4,
  6449.         success: function(e) {
  6450.             $("#btn_privacy_save").html("Сохранить"), $("#btn_privacy_save").removeAttr("disabled", "disabled"), "ok" == e.status ? Sprashivai.show_message("Настройки сохранены") : Sprashivai.show_error(e.message)
  6451.         },
  6452.         error: function(e, t) {
  6453.             $("#btn_privacy_save").html("Сохранить"), $("#btn_privacy_save").removeAttr("disabled", "disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6454.         }
  6455.     })
  6456. };
  6457. var settings_notify_xhr;
  6458. Profile.save_notify_settings = function() {
  6459.     $("#btn_notifications_save").html("сохраняем..."), $("#btn_notifications_save").attr("disabled", "disabled"), settings_notify_xhr && settings_notify_xhr.abort(), settings_notify_xhr = $.ajax({
  6460.         type: "POST",
  6461.         url: "/settings/notifications/update",
  6462.         data: $("#form_settings_notifications").serialize(),
  6463.         dataType: "json",
  6464.         timeout: 3e4,
  6465.         success: function(e) {
  6466.             $("#btn_notifications_save").html("Сохранить"), $("#btn_notifications_save").removeAttr("disabled", "disabled"), "ok" == e.status ? Sprashivai.show_message("Настройки сохранены") : Sprashivai.show_error(e.message)
  6467.         },
  6468.         error: function(e, t) {
  6469.             $("#btn_notifications_save").html("Сохранить"), $("#btn_notifications_save").removeAttr("disabled", "disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6470.         }
  6471.     })
  6472. }, Profile.remove_from_followers = function(e) {
  6473.     return confirm("Ð’Ñ‹ действительно хотите удалить этого пользователя из ваших подписчиков?") ? ($("#pr_ln_" + e).css("opacity", "0.6"), void $.ajax({
  6474.         type: "POST",
  6475.         url: "/profile/remove_from_followers",
  6476.         data: {
  6477.             username: e
  6478.         },
  6479.         dataType: "json",
  6480.         timeout: 3e4,
  6481.         success: function(t) {
  6482.             $("#pr_ln_" + e).css("opacity", "1"), "ok" == t.status ? ($("#pr_ln_" + e).velocity("slideUp", {
  6483.                 delay: 0,
  6484.                 duration: 150
  6485.             }), $("#followers_badge").html(t.count), t.count <= 0 && $("#followers_badge").hide(), Sprashivai.show_message("Пользователь удален из ваших подписчиков")) : Sprashivai.show_error(t.message)
  6486.         },
  6487.         error: function(t, i) {
  6488.             $("#pr_ln_" + e).css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6489.         }
  6490.     })) : !1
  6491. }, Profile.unlink_phone_modal = function() {
  6492.     $("#pwd_check_action").val("unlink_phone"), $.magnificPopup.open({
  6493.         items: {
  6494.             src: "#pwd_check_modal"
  6495.         },
  6496.         type: "inline",
  6497.         focus: "#pwd_check_inp"
  6498.     })
  6499. }, Profile.change_pass_modal = function() {
  6500.     return "" == $("#set_inp_pass1").val() ? (Sprashivai.show_error("Укажите новый пароль"), !1) : $("#set_inp_pass1").val() != $("#set_inp_pass2").val() ? (Sprashivai.show_error("Пароли не совпадают"), !1) : ($("#pwd_check_action").val("change_password"), void $.magnificPopup.open({
  6501.         items: {
  6502.             src: "#pwd_check_modal"
  6503.         },
  6504.         type: "inline",
  6505.         focus: "#pwd_check_inp"
  6506.     }))
  6507. }, Profile.change_username_modal = function() {
  6508.     $("#pwd_check_action").val("change_username"), $.magnificPopup.open({
  6509.         items: {
  6510.             src: "#pwd_check_modal"
  6511.         },
  6512.         type: "inline",
  6513.         focus: "#pwd_check_inp"
  6514.     })
  6515. }, Profile.change_email_modal = function() {
  6516.     return re = new RegExp(/^[\w.-]+@([a-z0-9\-]+\.)+[a-z]{2,6}$/i), re.test($("#set_inp_email").val()) ? ($("#pwd_check_action").val("change_email"), void $.magnificPopup.open({
  6517.         items: {
  6518.             src: "#pwd_check_modal"
  6519.         },
  6520.         type: "inline",
  6521.         focus: "#pwd_check_inp"
  6522.     })) : (Sprashivai.show_error("Введите корректный email адрес"), !1)
  6523. }, Profile.change_password = function() {
  6524.     $.ajax({
  6525.         type: "POST",
  6526.         url: "/profile/password/change",
  6527.         data: {
  6528.             pass: md5($("#pwd_check_inp").val()),
  6529.             new_pass: md5($("#set_inp_pass1").val())
  6530.         },
  6531.         dataType: "json",
  6532.         timeout: 3e4,
  6533.         success: function(e) {
  6534.             "ok" == e.status ? ($.magnificPopup.close(), Sprashivai.show_center_loader("Пароль изменен, подождите еще чуть-чуть..."), location.reload()) : ($("#pwd_check_error").html(e.message), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6535.                 $(this).removeClass("wrong")
  6536.             }))
  6537.         },
  6538.         error: function(e, t) {
  6539.             $("#pwd_check_error").html("Произошла ошибка, попробуйте еще раз"), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6540.                 $(this).removeClass("wrong")
  6541.             })
  6542.         }
  6543.     })
  6544. }, Profile.unlink_phone = function() {
  6545.     $.ajax({
  6546.         type: "POST",
  6547.         url: "/profile/unlink_phone",
  6548.         data: {
  6549.             pass: md5($("#pwd_check_inp").val())
  6550.         },
  6551.         dataType: "json",
  6552.         timeout: 3e4,
  6553.         success: function(e) {
  6554.             "ok" == e.status ? ($.magnificPopup.close(), Sprashivai.show_center_loader("Телефон откреплен, подождите еще чуть-чуть..."), location.reload()) : ($("#pwd_check_error").html(e.message), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6555.                 $(this).removeClass("wrong")
  6556.             }))
  6557.         },
  6558.         error: function(e, t) {
  6559.             $("#pwd_check_error").html("Произошла ошибка, попробуйте еще раз"), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6560.                 $(this).removeClass("wrong")
  6561.             })
  6562.         }
  6563.     })
  6564. }, Profile.change_email = function() {
  6565.     $.ajax({
  6566.         type: "POST",
  6567.         url: "/profile/email/change",
  6568.         data: {
  6569.             pass: md5($("#pwd_check_inp").val()),
  6570.             email: $("#set_inp_email").val()
  6571.         },
  6572.         dataType: "json",
  6573.         timeout: 3e4,
  6574.         success: function(e) {
  6575.             "ok" == e.status ? ($.magnificPopup.close(), Sprashivai.show_center_loader("Подождите еще чуть-чуть..."), location.reload()) : ($("#pwd_check_error").html(e.message), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6576.                 $(this).removeClass("wrong")
  6577.             }))
  6578.         },
  6579.         error: function(e, t) {
  6580.             $("#pwd_check_error").html("Произошла ошибка, попробуйте еще раз"), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6581.                 $(this).removeClass("wrong")
  6582.             })
  6583.         }
  6584.     })
  6585. }, Profile.change_username = function() {
  6586.     $.ajax({
  6587.         type: "POST",
  6588.         url: "/profile/username/change",
  6589.         data: {
  6590.             pass: md5($("#pwd_check_inp").val()),
  6591.             username: $("#set_inp_username").val()
  6592.         },
  6593.         dataType: "json",
  6594.         timeout: 3e4,
  6595.         success: function(e) {
  6596.             "ok" == e.status ? ($.magnificPopup.close(), Sprashivai.show_center_loader("Подождите еще чуть-чуть..."), location.reload()) : ($("#pwd_check_error").html(e.message), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6597.                 $(this).removeClass("wrong")
  6598.             }))
  6599.         },
  6600.         error: function(e, t) {
  6601.             $("#pwd_check_error").html("Произошла ошибка, попробуйте еще раз"), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6602.                 $(this).removeClass("wrong")
  6603.             })
  6604.         }
  6605.     })
  6606. }, Profile.resend_confirmation = function() {
  6607.     Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6608.         type: "POST",
  6609.         url: "/confirm/resend",
  6610.         dataType: "json",
  6611.         timeout: 3e4,
  6612.         success: function(e) {
  6613.             Sprashivai.hide_center_loader(), "ok" == e.status ? Sprashivai.show_message("Письмо с подтверждением отправлено на " + e.email) : Sprashivai.show_error(e.message)
  6614.         },
  6615.         error: function(e, t) {
  6616.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6617.         }
  6618.     })
  6619. }, Profile.check_password = function() {
  6620.     $.ajax({
  6621.         type: "POST",
  6622.         url: "/ajax/password/check",
  6623.         data: {
  6624.             pass: md5($("#pwd_check_inp").val())
  6625.         },
  6626.         dataType: "json",
  6627.         timeout: 3e4,
  6628.         success: function(e) {
  6629.             "ok" == e.status ? "unlink_phone" == $("#pwd_check_action").val() ? Profile.unlink_phone() : "change_email" == $("#pwd_check_action").val() ? Profile.change_email() : "change_password" == $("#pwd_check_action").val() ? Profile.change_password() : "change_username" == $("#pwd_check_action").val() && Profile.change_username() : ($("#pwd_check_error").html(e.message), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6630.                 $(this).removeClass("wrong")
  6631.             }))
  6632.         },
  6633.         error: function(e, t) {
  6634.             $("#pwd_check_error").html("Произошла ошибка, попробуйте еще раз"), $("#pwd_check_error").show(), $("#pwd_check_modal").addClass("wrong"), $("#pwd_check_modal").on("animationend", function(e) {
  6635.                 $(this).removeClass("wrong")
  6636.             })
  6637.         }
  6638.     })
  6639. }, Profile.delete_avatar = function() {
  6640.     return confirm("Ð’Ñ‹ действительно хотите удалить свой аватар?") ? (Sprashivai.show_center_loader("пожалуйста, подождите..."), void $.ajax({
  6641.         type: "POST",
  6642.         url: "/profile/avatar/remove/current",
  6643.         dataType: "json",
  6644.         timeout: 3e4,
  6645.         success: function(e) {
  6646.             Sprashivai.hide_center_loader(), "ok" == e.status ? ($("#user_big_avatar").attr("src", e.photo_big), $("#user_big_avatar_url").attr("href", e.photo_big), $("#self_av_opt_delete").hide(), $("#self_av_opt_crop").hide(), $(".av_self_s").attr("src", e.photo_s), Sprashivai.show_message("Пользователь удален из ваших подписчиков")) : Sprashivai.show_error(e.message)
  6647.         },
  6648.         error: function(e, t) {
  6649.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6650.         }
  6651.     })) : !1
  6652. }, window.User || (window.User = {}), User.open_gifts_dialog = function(e) {
  6653.     $.magnificPopup.open({
  6654.         items: {
  6655.             src: "/" + e + "/gift_select"
  6656.         },
  6657.         type: "ajax",
  6658.         showCloseBtn: !1,
  6659.         closeOnBgClick: !1
  6660.     }, 0)
  6661. }, window.Profile_settings || (window.Profile_settings = {}), "settings_main" == Sprashivai.page && $(document).ready(function() {
  6662.     $("#set_inp_pass1").passMeter(function(e) {
  6663.         $("#pass_strong_ind").css("width", e + "%"), 30 > e ? $("#pass_strong_ind").css("background-color", "#FF7979") : 55 > e ? $("#pass_strong_ind").css("background-color", "#FFBC84") : $("#pass_strong_ind").css("background-color", "#91DD81")
  6664.     })
  6665. }), Profile_settings.check_username = function() {
  6666.     $("#set_inp_username").removeClass("inp_success"), $("#set_inp_username").removeClass("inp_err");
  6667.     var e = new RegExp(/^([a-zA-Z0-9_]{3,24}?)$/);
  6668.     return e.test($("#set_inp_username").val()) ? void $.ajax({
  6669.         type: "GET",
  6670.         url: "/signup/check_username",
  6671.         dataType: "json",
  6672.         data: {
  6673.             username: $("#set_inp_username").val()
  6674.         },
  6675.         timeout: 3e4,
  6676.         success: function(e, t, i) {
  6677.             "ok" == e.status ? (Profile.change_username_modal(), $("#set_inp_username").removeClass("inp_err"), $("#set_inp_username").addClass("inp_success")) : ($("#set_inp_username").addClass("inp_err"), $("#set_inp_username").focus(), Sprashivai.show_error(e.message))
  6678.         },
  6679.         error: function(e, t) {
  6680.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6681.         }
  6682.     }) : (Sprashivai.show_error("Имя пользователя должно состоять только из английских букв, цифр и знака нижнего подчеркивания, от 3 до 24 символов"), $("#set_inp_username").addClass("inp_err"), $("#set_inp_username").focus(), !1)
  6683. }, Profile.save_new_pass = function() {
  6684.     $("#rec_new_pass_btn_subm").attr("disabled", "disabled"), $("#rec_new_pass_btn_subm").html("подождите..."), $.ajax({
  6685.         type: "POST",
  6686.         url: "/password/save",
  6687.         dataType: "json",
  6688.         data: {
  6689.             newpass: md5($("#rec_inp_new_pass").val()),
  6690.             h: $("#pass_set_hash").val()
  6691.         },
  6692.         timeout: 3e4,
  6693.         success: function(e, t, i) {
  6694.             $("#rec_new_pass_btn_subm").removeAttr("disabled"), $("#rec_new_pass_btn_subm").html("Установить пароль"), "ok" == e.status ? (Sprashivai.show_center_loader("Пожалуйста, подождите..."), location = "/password/changed") : Sprashivai.show_error(e.message)
  6695.         },
  6696.         error: function(e, t) {
  6697.             $("#rec_new_pass_btn_subm").removeAttr("disabled"), $("#rec_new_pass_btn_subm").html("Установить пароль"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6698.         }
  6699.     })
  6700. }, Profile.sent_recovery_email = function() {
  6701.     return $("#rec_inp_username").removeClass("inp_err"), "" == $("#rec_inp_username").val() ? (Sprashivai.show_error("Укажите логин или email"), $("#rec_inp_username").addClass("inp_err"), $("#rec_inp_username").focus(), !1) : ($("#rec_btn_subm").attr("disabled", "disabled"), $("#rec_btn_subm").html("подождите..."), void $.ajax({
  6702.         type: "POST",
  6703.         url: "/password/send_recovery",
  6704.         dataType: "json",
  6705.         data: {
  6706.             username: $("#rec_inp_username").val()
  6707.         },
  6708.         timeout: 3e4,
  6709.         success: function(e, t, i) {
  6710.             $("#rec_btn_subm").removeAttr("disabled"), $("#rec_btn_subm").html("Восстановить пароль"), "ok" == e.status ? ($("#rec_form_result").html(e.message), $("#rec_form_result").show(), $("#rec_inp_username").val("")) : Sprashivai.show_error(e.message)
  6711.         },
  6712.         error: function(e, t) {
  6713.             $("#rec_btn_subm").removeAttr("disabled"), $("#rec_btn_subm").html("Восстановить пароль"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6714.         }
  6715.     }))
  6716. }, Profile_settings.check_email = function() {
  6717.     $("#set_inp_email").removeClass("inp_success"), $("#set_inp_email").removeClass("inp_err");
  6718.     var e = new RegExp(/^[\w.-]+@([a-z0-9\-]+\.)+[a-z]{2,6}$/i);
  6719.     return e.test($("#set_inp_email").val()) ? void $.ajax({
  6720.         type: "GET",
  6721.         url: "/signup/check_email",
  6722.         dataType: "json",
  6723.         data: {
  6724.             email: $("#set_inp_email").val()
  6725.         },
  6726.         timeout: 3e4,
  6727.         success: function(e, t, i) {
  6728.             "ok" == e.status ? (Profile.change_email_modal(), $("#set_inp_email").removeClass("inp_err"), $("#set_inp_email").addClass("inp_success")) : ($("#set_inp_email").addClass("inp_err"), $("#set_inp_email").focus(), Sprashivai.show_error(e.message))
  6729.         },
  6730.         error: function(e, t) {
  6731.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6732.         }
  6733.     }) : (Sprashivai.show_error("Укажите корректный email адрес"), $("#set_inp_email").addClass("inp_err"), $("#set_inp_email").focus(), !1)
  6734. }, Profile.follow = function(e, t) {
  6735.     $(".btn_fol_med_" + e).children("button").attr("disabled", "disabled"), $(".btn_fol_big_" + e).children("button").attr("disabled", "disabled"), Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6736.         type: "POST",
  6737.         url: "/" + e + "/follow",
  6738.         dataType: "json",
  6739.         data: {
  6740.             hash: t,
  6741.             sig: hash_follow(e, t)
  6742.         },
  6743.         timeout: 3e4,
  6744.         success: function(t, i, o) {
  6745.             Sprashivai.hide_center_loader(), $(".btn_fol_big_" + e).children("button").removeAttr("disabled"), $(".btn_fol_med_" + e).children("button").removeAttr("disabled"), "ok" == t.status ? ($(".btn_fol_med_" + e).html(t.btn_mini), $(".btn_fol_big_" + e).html(t.btn_big), Sprashivai.show_message("Ð’Ñ‹ подписались на пользователя @" + e)) : Sprashivai.show_error(t.message)
  6746.         },
  6747.         error: function(t, i) {
  6748.             Sprashivai.hide_center_loader(), $(".btn_fol_big_" + e).children("button").removeAttr("disabled"), $(".btn_fol_med_" + e).children("button").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6749.         }
  6750.     })
  6751. }, Profile.unfollow = function(e, t) {
  6752.     $(".btn_fol_med_" + e).children("button").attr("disabled", "disabled"), $(".btn_fol_big_" + e).children("button").attr("disabled", "disabled"), Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6753.         type: "POST",
  6754.         url: "/" + e + "/unfollow",
  6755.         dataType: "json",
  6756.         data: {
  6757.             hash: t,
  6758.             sig: hash_follow(e, t)
  6759.         },
  6760.         timeout: 3e4,
  6761.         success: function(t, i, o) {
  6762.             Sprashivai.hide_center_loader(), $(".btn_fol_med_" + e).children("button").removeAttr("disabled"), $(".btn_fol_big_" + e).children("button").removeAttr("disabled"), "ok" == t.status ? ($(".btn_fol_med_" + e).html(t.btn_mini), $(".btn_fol_big_" + e).html(t.btn_big), Sprashivai.show_message("Ð’Ñ‹ отписались от пользователя @" + e)) : Sprashivai.show_error(t.message)
  6763.         },
  6764.         error: function(t, i) {
  6765.             Sprashivai.hide_center_loader(), $(".btn_fol_med_" + e).children("button").removeAttr("disabled"), $(".btn_fol_big_" + e).children("button").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6766.         }
  6767.     })
  6768. }, Profile.make_gift = function(e, t) {
  6769.     $("#btn_gift_make").attr("disabled", "disabled"), $("#btn_gift_make").html("отправляем..."), $("#mdl_gift_error").hide(), $.ajax({
  6770.         type: "POST",
  6771.         url: "/" + e + "/gift/make",
  6772.         dataType: "json",
  6773.         data: {
  6774.             gift: $("#mdl_gift_selected_id").val(),
  6775.             privacy: $("#gift_anon_sel").val(),
  6776.             message: $("#mdl_gift_message").val(),
  6777.             hash: t
  6778.         },
  6779.         timeout: 3e4,
  6780.         success: function(t, i, o) {
  6781.             $("#btn_gift_make").html("Отправить"), $("#btn_gift_make").removeAttr("disabled"), "ok" == t.status ? ($(".self_balance").html(t.balance), $.magnificPopup.close(), Sprashivai.show_message("Ð’Ñ‹ отправили подарок для @" + e), $("#pr_av_gft_cont").css("width", $("#pr_av_gft_cont").width() + 88 + "px"), $("#pr_av_gft_cont").prepend(t.gift_html), $("#pr_av_gft_cont").css("margin-left", "-92px"), $("#pr_av_gft_cont").velocity({
  6782.                 marginLeft: "0px"
  6783.             }, {
  6784.                 duration: 180,
  6785.                 easing: "ease-out"
  6786.             })) : ($("#mdl_gift_error").html(t.message), $("#mdl_gift_error").show())
  6787.         },
  6788.         error: function(e, t) {
  6789.             $("#btn_gift_make").html("Отправить"), $("#btn_gift_make").removeAttr("disabled"), $("#mdl_gift_error").html("Произошла ошибка, попробуйте еще раз"), $("#mdl_gift_error").show()
  6790.         }
  6791.     })
  6792. }, Profile.set_bg_fill = function(e) {
  6793.     $(".ui_bg").removeClass("ui_bg_selected"), $("#ui_bg_" + e).addClass("ui_bg_selected"), $("#ui_bg_fill").val(e), "cover" == e ? $("body").css("background-size", "cover") : $("body").css("background-size", "initial")
  6794. }, Profile.find_friends = function() {
  6795.     social_linked && ($("#friends_result").html('<span class="gr_it">Ищем ваших друзей. Пожалуйста, подождите...</span>'), Sprashivai.show_center_loader("Ищем ваших друзей. Пожалуйста, подождите..."), $("#friends_result").load("/tools/find_friends/load", {}, function() {
  6796.         Sprashivai.hide_center_loader()
  6797.     }))
  6798. }, Profile.fr_search_hide = function() {
  6799.     followed_hidden ? ($(".fr_srch_fld").show(), $("#fr_srch_hid_lnk").html("скрыть добавленных"), followed_hidden = !1) : ($(".fr_srch_fld").hide(), $("#fr_srch_hid_lnk").html("показать добавленных"), followed_hidden = !0)
  6800. }, Profile.hide_social = function(e) {
  6801.     Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6802.         type: "POST",
  6803.         url: "/settings/social/hide",
  6804.         dataType: "json",
  6805.         data: {
  6806.             social: e
  6807.         },
  6808.         timeout: 3e4,
  6809.         success: function(t, i, o) {
  6810.             Sprashivai.hide_center_loader(), "ok" == t.status ? t.show ? ($("#social_hide_lnk_" + e).children("i").removeClass("spr_icon_eye_off"), $("#social_hide_lnk_" + e).children("i").addClass("spr_icon_eye"), $("#social_hide_lnk_" + e).attr("onclick", "Profile.hide_social('" + e + "'); return false;"), Sprashivai.show_message("Социальная сеть отображается на вашем профайле")) : ($("#social_hide_lnk_" + e).children("i").addClass("spr_icon_eye_off"), $("#social_hide_lnk_" + e).children("i").removeClass("spr_icon_eye"), $("#social_hide_lnk_" + e).attr("onclick", "Profile.show_social('" + e + "'); return false;"), Sprashivai.show_message("Социальная сеть не отображается на вашем профайле")) : Sprashivai.show_error(t.message)
  6811.         },
  6812.         error: function(e, t) {
  6813.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6814.         }
  6815.     })
  6816. }, Profile.show_social = function(e) {
  6817.     Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  6818.         type: "POST",
  6819.         url: "/settings/social/show",
  6820.         dataType: "json",
  6821.         data: {
  6822.             social: e
  6823.         },
  6824.         timeout: 3e4,
  6825.         success: function(t, i, o) {
  6826.             Sprashivai.hide_center_loader(), "ok" == t.status ? t.show ? ($("#social_hide_lnk_" + e).children("i").removeClass("spr_icon_eye_off"), $("#social_hide_lnk_" + e).children("i").addClass("spr_icon_eye"), $("#social_hide_lnk_" + e).attr("onclick", "Profile.hide_social('" + e + "'); return false;"), Sprashivai.show_message("Социальная сеть отображается на вашем профайле")) : ($("#social_hide_lnk_" + e).children("i").addClass("spr_icon_eye_off"), $("#social_hide_lnk_" + e).children("i").removeClass("spr_icon_eye"), $("#social_hide_lnk_" + e).attr("onclick", "Profile.show_social('" + e + "'); return false;"), Sprashivai.show_message("Социальная сеть не отображается на вашем профайле")) : Sprashivai.show_error(t.message)
  6827.         },
  6828.         error: function(e, t) {
  6829.             Sprashivai.hide_center_loader(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6830.         }
  6831.     })
  6832. }, Profile.upload_document = function() {
  6833.     $(".form_about_lyot").hide(), $(".doc_inp").removeClass("inp_err"), LIVR.Validator.defaultAutoTrim(!0);
  6834.     var e = new LIVR.Validator({
  6835.         login: ["required", "spr_login"],
  6836.         email: ["required", "email"],
  6837.         document: ["required"]
  6838.     });
  6839.     e.registerRules({
  6840.         spr_login: function() {
  6841.             return function(e) {
  6842.                 if (void 0 !== e && null !== e && "" !== e) {
  6843.                     var t = new RegExp(/^([a-zA-Z0-9_]{3,24}?)$/);
  6844.                     return t.test(e) ? void 0 : "LOGIN_INCORRECT"
  6845.                 }
  6846.             }
  6847.         }
  6848.     });
  6849.     var t = {
  6850.             login: $("#doc_inp_login").val(),
  6851.             email: $("#doc_inp_email").val(),
  6852.             document: $("#doc_inp_document").val()
  6853.         },
  6854.         i = e.validate(t);
  6855.     i ? ($("#password_document_form").submit(), $("#doc_btn_subm").html("подождите..."), $("#doc_btn_subm").attr("disabled", "disabled")) : ($.each(e.getErrors(), function(e, t) {
  6856.         $("#doc_inp_error_" + e).children(".form_error_bl").html(lang.errors[e][t]), $("#doc_inp_error_" + e).show(), $("#doc_inp_" + e).addClass("inp_err")
  6857.     }), console.log("errors", e.getErrors()))
  6858. }, Profile.share_page = function() {
  6859.     $.magnificPopup.open({
  6860.         items: {
  6861.             src: "/modals/share"
  6862.         },
  6863.         type: "ajax",
  6864.         showCloseBtn: !1
  6865.     }, 0)
  6866. }, Profile.open_sms_live_from_m = function() {
  6867.     $.magnificPopup.close(), setTimeout(function() {
  6868.         Profile.open_sms_live_dialog()
  6869.     }, 100)
  6870. }, Profile.check_phone_pass = function() {
  6871.     $("#rec_ph_load").show(), $("#rec_ph_result").html(""), $.ajax({
  6872.         type: "POST",
  6873.         url: "/password/recovery_by_phone/check",
  6874.         dataType: "json",
  6875.         data: {
  6876.             country_code: $("#phone_country_code").val(),
  6877.             phone: $("#rec_ph_phone").val()
  6878.         },
  6879.         timeout: 3e4,
  6880.         success: function(e, t, i) {
  6881.             $("#rec_ph_load").hide(), "ok" == e.status ? $("#rec_ph_result").html(e.html) : Sprashivai.show_error(e.message)
  6882.         },
  6883.         error: function(e, t) {
  6884.             $("#rec_ph_load").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6885.         }
  6886.     })
  6887. }, Profile.hide_vk_notice = function() {
  6888.     $("#top_notice_vk").hide(), $.ajax({
  6889.         type: "POST",
  6890.         url: "/settings/social/hide_vk_notice",
  6891.         dataType: "json",
  6892.         timeout: 3e4
  6893.     })
  6894. }, Profile.hide_fb_notice = function() {
  6895.     $("#top_notice_fb").hide(), $.ajax({
  6896.         type: "POST",
  6897.         url: "/settings/social/hide_fb_notice",
  6898.         dataType: "json",
  6899.         timeout: 3e4
  6900.     })
  6901. }, Profile.delete_old_avatar = function(e) {
  6902.     $.ajax({
  6903.         type: "POST",
  6904.         url: "/profile/avatar/delete_old",
  6905.         dataType: "json",
  6906.         data: {
  6907.             avatar_id: e
  6908.         },
  6909.         timeout: 3e4,
  6910.         success: function(t, i, o) {
  6911.             "ok" == t.status ? $("#av_cell_" + e).hide() : Sprashivai.show_error(t.message)
  6912.         },
  6913.         error: function(e, t) {
  6914.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6915.         }
  6916.     })
  6917. };
  6918. var likes_timeout;
  6919. $(document).ready(function() {
  6920.     $(document).on("keyup", ".cmnt_txt_area", function() {
  6921.         var e = 4e3,
  6922.             t = e - $(this).val().length,
  6923.             i = $(this).attr("id").replace("cmnt_txt_", "");
  6924.         0 > t && (t = 0, $(this).val($(this).val().substr(0, e))), 100 > t ? $("#cmnt_cntr_" + i).show() : $("#cmnt_cntr_" + i).hide(), 0 == $(this).val().length || 0 > t ? $("#cmnt_btn_" + i).attr("disabled", "disabled") : $("#cmnt_btn_" + i).removeAttr("disabled"), $("#cmnt_cntr_" + i).html(t)
  6925.     }), $("#ask_txt_layout").on("keyup", "#ask_txt_area", function() {
  6926.         var e = 800,
  6927.             t = e - $(this).val().length;
  6928.         0 > t && (t = 0, $(this).val($(this).val().substr(0, e))), 100 > t ? $("#ask_cntr").show() : $("#ask_cntr").hide(), 0 == $(this).val().length || 0 > t ? $("#ask_btn").attr("disabled", "disabled") : $("#ask_btn").removeAttr("disabled"), 50 >= t ? $("#ask_cntr").addClass("cntr_red") : $("#ask_cntr").removeClass("cntr_red"), $("#ask_cntr").html(t)
  6929.     }), $(document).on("mouseenter", ".lk_exists", function() {
  6930.         var e = $(this).attr("rel");
  6931.         likes_timeout && clearTimeout(likes_timeout), $(".item_likes_lyot").not("#" + e).css("bottom", "25px"), $(".item_likes_lyot").not("#" + e).css("opacity", "0"), $(".item_likes_lyot").not("#" + e).css("visibility", "hidden"), $("#lks_" + e).css("bottom", "15px"), $("#lks_" + e).css("opacity", "1.0"), $("#lks_" + e).css("visibility", "visible")
  6932.     }), $(document).on("mouseenter", ".item_likes_lyot", function() {
  6933.         var e = $(this).attr("rel");
  6934.         likes_timeout && clearTimeout(likes_timeout), $(".item_likes_lyot").not("#" + e).css("bottom", "25px"), $(".item_likes_lyot").not("#" + e).css("opacity", "0"), $(".item_likes_lyot").not("#" + e).css("visibility", "hidden"), $("#lks_" + e).css("bottom", "15px"), $("#lks_" + e).css("opacity", "1.0"), $("#lks_" + e).css("visibility", "visible")
  6935.     }), $(document).on("mouseleave", ".lk_exists", function() {
  6936.         var e = $(this).attr("rel");
  6937.         likes_timeout = setTimeout('hide_lk("' + e + '")', 50)
  6938.     }), $(document).on("mouseleave", ".item_likes_lyot", function() {
  6939.         var e = $(this).attr("rel");
  6940.         likes_timeout = setTimeout('hide_lk("' + e + '")', 50)
  6941.     }), ("profile" == Sprashivai.page || "profile_self" == Sprashivai.page) && setTimeout(function() {
  6942.         Responses.check_new_responses(Sprashivai.profile_username)
  6943.     }, 3e4)
  6944. }), window.Inbox || (window.Inbox = {}), Inbox.delete_all = function(e) {
  6945.     confirm("Ð’Ñ‹ действительно хотите удалить ВСЕ новые вопросы? Это действие нельзя отменить!") && ($("#inbox_questions").css("opacity", "0.5"), $.ajax({
  6946.         type: "POST",
  6947.         url: "/inbox/delete/all",
  6948.         data: {
  6949.             hash: e,
  6950.             sig: hash_inbox_delete_all(e)
  6951.         },
  6952.         dataType: "json",
  6953.         timeout: 3e4,
  6954.         success: function(e, t, i) {
  6955.             $("#inbox_questions").css("opacity", "1.0"), "ok" == e.status ? ($("#inbox_questions").html(""), $("#load-more-link").hide(), $("#nq_remain_text").html(e.nq_string), $("#top_nq_badge").html(""), $("#top_nq_badge").hide(), $(".nq_del_all").hide(), Sprashivai.show_message("Все вопросы удалены")) : Sprashivai.show_error(e.message)
  6956.         },
  6957.         error: function(e, t) {
  6958.             $("#inbox_questions").css("opacity", "1.0"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  6959.         }
  6960.     }))
  6961. }, Inbox.toggle_answer_form = function(e) {
  6962.     $("#answer_form_" + e).hasClass("opened") ? ($("#answer_form_" + e).velocity({
  6963.         maxHeight: "0",
  6964.         opacity: "0"
  6965.     }, {
  6966.         duration: 250,
  6967.         delay: 0,
  6968.         easing: "easeInSine"
  6969.     }), $("#answer_form_" + e).removeClass("opened")) : ($("#answer_form_" + e).velocity({
  6970.         maxHeight: "600px",
  6971.         opacity: "1.0"
  6972.     }, {
  6973.         duration: 250,
  6974.         delay: 0,
  6975.         easing: "easeInSine"
  6976.     }), $("#answer_form_" + e).addClass("opened"), $("#answer_txtar_" + e).caretToEnd())
  6977. }, Inbox.load = function() {
  6978.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  6979.         type: "POST",
  6980.         url: "/inbox/load",
  6981.         data: {
  6982.             offset: inbox_offset
  6983.         },
  6984.         dataType: "json",
  6985.         timeout: 3e4,
  6986.         success: function(e) {
  6987.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status && ($(".toolt-na").tooltipster("destroy"), $("#inbox_questions").append(e.q_html), inbox_offset = e.q_offset, inbox_passed += e.q_passed, inbox_passed >= inbox_all && $("#load-more-link").hide(), $(".toolt-na").tooltipster({
  6988.                 delay: 0,
  6989.                 position: "top",
  6990.                 animation: "grow",
  6991.                 offsetY: -12
  6992.             }))
  6993.         },
  6994.         error: function(e, t) {
  6995.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка попробуйте еще раз")
  6996.         }
  6997.     })
  6998. }, Inbox.remove = function(e, t) {
  6999.     $("#nq_it_" + e).css("opacity", "0.6"), $.ajax({
  7000.         type: "POST",
  7001.         url: "/inbox/delete",
  7002.         data: {
  7003.             question: e
  7004.         },
  7005.         dataType: "json",
  7006.         timeout: 15e3,
  7007.         success: function(t, i, o) {
  7008.             $("#nq_it_" + e).css("opacity", "1"), "ok" == t.status ? ($("#nq_it_" + e).velocity("slideUp", {
  7009.                 delay: 0,
  7010.                 duration: 150
  7011.             }), t.nq_count > 0 ? ($("#top_nq_badge").html(t.nq_count), $("#top_nq_badge").show()) : ($("#top_nq_badge").html(""), $("#top_nq_badge").hide()), Sprashivai.logged && (document.title = t.nq_count > 0 ? "(" + t.nq_count + ") " + Sprashivai.page_title : Sprashivai.page_title), $("#nq_remain_text").html(t.nq_string), Sprashivai.show_message("Вопрос удален")) : Sprashivai.show_error(t.message)
  7012.         },
  7013.         error: function(t, i) {
  7014.             $("#nq_it_" + e).css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7015.         }
  7016.     })
  7017. }, Inbox.answer = function(e) {
  7018.     $("#answer_txtar_" + e).attr("disabled", "disabled"), $("#nq_btn_" + e).attr("disabled", "disabled"), $("#nq_btn_" + e).text("отвечаем"), $.ajax({
  7019.         type: "POST",
  7020.         url: "/inbox/answer",
  7021.         data: {
  7022.             question: e,
  7023.             media: $("#media_" + e).val(),
  7024.             answer: $("#answer_txtar_" + e).val()
  7025.         },
  7026.         dataType: "json",
  7027.         timeout: 3e4,
  7028.         success: function(t) {
  7029.             "ok" == t.status ? (t.nq_count > 0 ? ($("#top_nq_badge").html(t.nq_count), $("#top_nq_badge").show()) : ($("#top_nq_badge").html(""), $("#top_nq_badge").hide()), $("#nq_it_" + e).velocity("slideUp", {
  7030.                 delay: 0,
  7031.                 duration: 150
  7032.             }), $("#nq_remain_text").html(t.nq_string), Sprashivai.show_message("Ответ добавлен на вашу страницу"), Sprashivai.logged && (document.title = t.nq_count > 0 ? "(" + t.nq_count + ") " + Sprashivai.page_title : Sprashivai.page_title)) : "error" == t.status && ($("#answer_txtar_" + e).removeAttr("disabled"), $("#nq_btn_" + e).removeAttr("disabled"), $("#nq_btn_" + e).text("Ответить"), Sprashivai.show_error(t.message))
  7033.         },
  7034.         error: function(t, i) {
  7035.             $("#answer_txtar_" + e).removeAttr("disabled"), $("#nq_btn_" + e).removeAttr("disabled"), $("#nq_btn_" + e).text("Ответить"), Sprashivai.show_error("Произошла ошибка попробуйте еще раз")
  7036.         }
  7037.     })
  7038. }, Inbox.preview_media = function(e) {
  7039.     $.magnificPopup.open({
  7040.         items: {
  7041.             src: $("#nq_m_lnk_prev_" + e).attr("href"),
  7042.             type: "image"
  7043.         }
  7044.     })
  7045. }, Inbox.clean_media = function(e) {
  7046.     $("#nq_cont_m_" + e).show(), $("#nq_m_upld_" + e).hide(), $("#media_" + e).val(""), 0 == $("#answer_txtar_" + e).val().length && $("#nq_btn_" + e).attr("disabled", "disabled")
  7047. }, Inbox.init_media_uploader = function(e, t) {
  7048.     mOxie.Mime.addMimeType("image/jpeg,jpg jpeg");
  7049.     var i = new plupload.Uploader({
  7050.         runtimes: "html5,flash,silverlight",
  7051.         browse_button: "nq_btn_m_" + e,
  7052.         container: "nq_cont_m_" + e,
  7053.         multipart_params: {
  7054.             question_id: e,
  7055.             session: t
  7056.         },
  7057.         max_file_size: "10mb",
  7058.         url: "/question/media/attach",
  7059.         flash_swf_url: "http://st.sprashivai.net/10/251b77cbfd/uploader.swf",
  7060.         silverlight_xap_url: "http://st.sprashivai.net/10/2664b9ec17/uploader.xap",
  7061.         filters: [{
  7062.             title: "Изображения",
  7063.             extensions: "jpg,jpeg,gif,png"
  7064.         }],
  7065.         resize: {
  7066.             width: 800,
  7067.             height: 800,
  7068.             quality: 85
  7069.         }
  7070.     });
  7071.     i.init(), i.bind("FilesAdded", function(t, o) {
  7072.         var n = 1;
  7073.         t.files.length > n && t.splice(n), t.refresh(), i.start(), $("#nq_cont_m_" + e).hide(), $("#nq_pgrs_" + e).show()
  7074.     }), i.bind("UploadProgress", function(e, t) {
  7075.         $("#nq_m_pgrs_").css("width", t.percent + "%")
  7076.     }), i.bind("Error", function(t, i) {
  7077.         t.splice(0), $("#nq_cont_m_" + e).show(), $("#nq_pgrs_" + e).hide(), Sprashivai.show_error(i.message), t.refresh()
  7078.     }), i.bind("FileUploaded", function(t, i, o) {
  7079.         t.splice(0);
  7080.         try {
  7081.             resp = JSON.parse(o.response)
  7082.         } catch (n) {
  7083.             return Sprashivai.show_error("Произошла ошибка"), $("#nq_cont_m_" + e).show(), $("#nq_pgrs_" + e).hide(), void t.refresh()
  7084.         }
  7085.         resp.result ? ($("#nq_pgrs_" + e).hide(), $("#nq_m_preview_" + e).attr("src", resp.result), $("#nq_m_lnk_prev_" + e).attr("href", resp.media_big), $("#nq_m_upld_" + e).show(), $("#media_" + e).val(resp.media_id), $("#nq_btn_" + e).removeAttr("disabled"), t.refresh()) : resp.error ? ($("#nq_cont_m_" + e).show(), $("#nq_pgrs_" + e).hide(), Sprashivai.show_error(resp.error.message), t.refresh()) : ($("#nq_cont_m_" + e).show(), $("#nq_pgrs_" + e).hide(), Sprashivai.show_error("Произошла ошибка"), t.refresh())
  7086.     })
  7087. }, $(document).ready(function() {
  7088.     "inbox" == Sprashivai.page && ($(".nq_txt_area_lyot").on("keydown", ".antxtar", function(e) {
  7089.         if ((e.metaKey || e.ctrlKey) && 13 == e.keyCode) {
  7090.             e.preventDefault();
  7091.             var t = $(this).attr("id").replace("answer_txtar_", "");
  7092.             return Inbox.answer(t), !1
  7093.         }
  7094.         return !0
  7095.     }), $(document).on("keyup", ".antxtar", function() {
  7096.         var e = $(this).attr("id").replace("answer_txtar_", ""),
  7097.             t = answer_limit - $(this).val().length;
  7098.         t = 0 > t ? 0 : t, $(this).val().length < 2 && "" == $("#media_" + e).val() ? $("#nq_btn_" + e).attr("disabled", "disabled") : $("#nq_btn_" + e).removeAttr("disabled"), $("#nq_cntr_" + e).html(t), 5 >= t ? ($("#nq_cntr_" + e).html("Толстой, перелогиньтесь!"), $("#nq_cntr_" + e).show()) : 300 >= t ? $("#nq_cntr_" + e).show() : $("#nq_cntr_" + e).hide(), 50 >= t ? $("#nq_cntr_" + e).addClass("cntr_red") : $("#nq_cntr_" + e).removeClass("cntr_red"), $(this).val($(this).val().substring(0, answer_limit))
  7099.     }))
  7100. }), window.Responses || (window.Responses = {}), Responses.load = function(e) {
  7101.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  7102.         type: "POST",
  7103.         url: "/responses/load",
  7104.         data: {
  7105.             username: e,
  7106.             offset: profile_responses_offset
  7107.         },
  7108.         dataType: "json",
  7109.         timeout: 3e4,
  7110.         success: function(e, t, i) {
  7111.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($(".toolt-n").tooltipster("destroy"), $(".toolt-na").tooltipster("destroy"), $("#user_responses").append(e.q_html), profile_responses_offset = e.q_offset, profile_responses_passed += e.q_passed, profile_responses_passed >= profile_responses_all && $("#load-more-link").hide(), $(".toolt-n").tooltipster({
  7112.                 delay: 0,
  7113.                 position: "top",
  7114.                 animation: "grow"
  7115.             }), $(".toolt-na").tooltipster({
  7116.                 delay: 100,
  7117.                 position: "top",
  7118.                 animation: "grow",
  7119.                 offsetY: -12
  7120.             }), Sprashivai.odometer(), Sprashivai.ichecks()) : Sprashivai.show_error(e.message)
  7121.         },
  7122.         error: function(e, t) {
  7123.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7124.         }
  7125.     })
  7126. }, Responses.like = function(e, t) {
  7127.     $.ajax({
  7128.         type: "POST",
  7129.         url: "/response/like",
  7130.         data: {
  7131.             question: e,
  7132.             hash: t,
  7133.             sig: hash_like(t, e)
  7134.         },
  7135.         dataType: "json",
  7136.         timeout: 15e3,
  7137.         success: function(t, i, o) {
  7138.             "ok" == t.status ? ($("#lk_cntr_" + e).text(t.likes_f.replace("&nbsp;", "")), $("#lk_title_" + e).html(t.lk_us_title), 1 == t.action ? ($("#lk_link_" + e).addClass("liked"), $("#lk_av_cont_" + e).addClass("lk_av_ln_liked")) : ($("#lk_link_" + e).removeClass("liked"), $("#lk_av_cont_" + e).removeClass("lk_av_ln_liked")), t.likes > 0 ? ($("#lk_link_" + e).addClass("lk_exists"),
  7139.                 $("#lks_" + e).css("bottom", "15px"), $("#lks_" + e).css("opacity", "1.0"), $("#lks_" + e).css("visibility", "visible")) : ($("#lk_link_" + e).removeClass("lk_exists"), $("#lks_" + e).css("bottom", "25px"), $("#lks_" + e).css("opacity", "0"), $("#lks_" + e).css("visibility", "hidden"))) : Sprashivai.show_error(t.message)
  7140.         },
  7141.         error: function(e, t) {
  7142.             Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7143.         }
  7144.     })
  7145. };
  7146. var blurred = !1;
  7147. Responses.show_comment_form = function(e, t) {
  7148.     return console.log("show_comment_form force " + t), blurred && !t ? void(blurred = !1) : void($("#cmnt_form_" + e).is(":visible") ? ($("#cmnt_quick_inp_" + e).show(), $("#cmnt_form_" + e).hide()) : ($("#cmnt_quick_inp_" + e).hide(), $("#cmnt_form_" + e).show(), $("#cmnt_txt_" + e).caretToEnd()))
  7149. }, Responses.report_question = function(e) {
  7150.     $.magnificPopup.open({
  7151.         items: {
  7152.             src: "/modals/report_response?question_id=" + e
  7153.         },
  7154.         type: "ajax",
  7155.         showCloseBtn: !1,
  7156.         closeOnBgClick: !0
  7157.     }, 0)
  7158. }, Inbox.report_question = function(e) {
  7159.     $("#btn_report_question_" + e).html("подождите..."), $("#btn_report_question_" + e).attr("disabled", "disabled");
  7160.     var t = $("#add_to_black_list").is(":checked") ? "true" : "false";
  7161.     $.ajax({
  7162.         type: "POST",
  7163.         url: "/question/report",
  7164.         data: {
  7165.             question_id: e,
  7166.             bl: t,
  7167.             reason: $("input[name=report_reason]:checked", "#report_question_form").val()
  7168.         },
  7169.         dataType: "json",
  7170.         timeout: 15e3,
  7171.         success: function(t, i, o) {
  7172.             $("#btn_report_question_" + e).html("Пожаловаться"), $("#btn_report_question_" + e).removeAttr("disabled"), "ok" == t.status ? ($.magnificPopup.close(), $("#nq_it_" + e).velocity("slideUp", {
  7173.                 delay: 0,
  7174.                 duration: 150
  7175.             }), Sprashivai.show_message("Жалоба отправлена")) : Sprashivai.show_error(t.message)
  7176.         },
  7177.         error: function(t, i) {
  7178.             $("#btn_report_question_" + e).html("Пожаловаться"), $("#btn_report_question_" + e).removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7179.         }
  7180.     })
  7181. }, Responses.show_delete_form = function(e) {
  7182.     $.magnificPopup.open({
  7183.         items: {
  7184.             src: "/modals/response/remove?response_id=" + e
  7185.         },
  7186.         type: "ajax",
  7187.         showCloseBtn: !1,
  7188.         closeOnBgClick: !0
  7189.     }, 0)
  7190. }, Responses.comment = function(e, t) {
  7191.     if (0 == $("#cmnt_txt_" + e).val().length) return Sprashivai.show_error("Введите текст комментария"), !1;
  7192.     $("#cmnt_btn_" + e).attr("disabled", "disabled"), $("#cmnt_btn_" + e).html("комментируем...");
  7193.     var i = $("#cmnt_check_" + e).is(":checked") ? "true" : "false";
  7194.     $.ajax({
  7195.         type: "POST",
  7196.         url: "/response/comment",
  7197.         data: {
  7198.             response: e,
  7199.             comment: $("#cmnt_txt_" + e).val(),
  7200.             anonymously: i,
  7201.             hash: t,
  7202.             sig: hash_comment(t, e)
  7203.         },
  7204.         dataType: "json",
  7205.         timeout: 15e3,
  7206.         success: function(t, i, o) {
  7207.             $("#cmnt_btn_" + e).removeAttr("disabled"), $("#cmnt_btn_" + e).html("Комментировать"), "ok" == t.status ? ($("#comments_" + e).append(t.html), $("#cmnt_txt_" + e).val(""), $("#cmnt_btn_" + e).attr("disabled", "disabled"), $("#cmnt_cntr_" + e).hide()) : Sprashivai.show_error(t.message)
  7208.         },
  7209.         error: function(t, i) {
  7210.             $("#cmnt_btn_" + e).removeAttr("disabled"), $("#cmnt_btn_" + e).html("Комментировать"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7211.         }
  7212.     })
  7213. }, Responses.comment_delete = function(e, t) {
  7214.     $("#cmnt_lyt_" + e).css("opacity", "0.6"), $.ajax({
  7215.         type: "POST",
  7216.         url: "/comment/delete",
  7217.         data: {
  7218.             comment: e,
  7219.             hash: t,
  7220.             sig: hash_comment_delete(t, e)
  7221.         },
  7222.         dataType: "json",
  7223.         timeout: 15e3,
  7224.         success: function(t, i, o) {
  7225.             $("#cmnt_lyt_" + e).css("opacity", "1"), "ok" == t.status ? $("#cmnt_lyt_" + e).html(t.html) : Sprashivai.show_error(t.message)
  7226.         },
  7227.         error: function(t, i) {
  7228.             $("#cmnt_lyt_" + e).css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7229.         }
  7230.     })
  7231. }, Responses.comment_restore = function(e, t) {
  7232.     $("#cmnt_lyt_" + e).css("opacity", "0.6"), $.ajax({
  7233.         type: "POST",
  7234.         url: "/comment/restore",
  7235.         data: {
  7236.             comment: e,
  7237.             hash: t,
  7238.             sig: hash_comment(t, e)
  7239.         },
  7240.         dataType: "json",
  7241.         timeout: 15e3,
  7242.         success: function(t, i, o) {
  7243.             $("#cmnt_lyt_" + e).css("opacity", "1"), "ok" == t.status ? ($(".toolt-n").tooltipster("destroy"), $(".toolt-na").tooltipster("destroy"), $("#cmnt_lyt_" + e).html(t.html), $(".toolt-n").tooltipster({
  7244.                 delay: 0,
  7245.                 position: "top",
  7246.                 animation: "grow"
  7247.             }), $(".toolt-na").tooltipster({
  7248.                 delay: 100,
  7249.                 position: "top",
  7250.                 animation: "grow",
  7251.                 offsetY: -12
  7252.             })) : Sprashivai.show_error(t.message)
  7253.         },
  7254.         error: function(t, i) {
  7255.             $("#cmnt_lyt_" + e).css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7256.         }
  7257.     })
  7258. }, Responses.show_likes = function(e) {
  7259.     $.magnificPopup.open({
  7260.         items: {
  7261.             src: "/modals/likes/" + e
  7262.         },
  7263.         type: "ajax",
  7264.         showCloseBtn: !1,
  7265.         closeOnBgClick: !0
  7266.     }, 0)
  7267. }, Responses.comments_load = function(e, t) {
  7268.     $("#comments-all-" + e).hide(), $("#comments_loader_" + e).show(), $.ajax({
  7269.         type: "POST",
  7270.         url: "/response/comments",
  7271.         data: {
  7272.             response: e,
  7273.             offset: t
  7274.         },
  7275.         dataType: "json",
  7276.         timeout: 15e3,
  7277.         success: function(t, i, o) {
  7278.             "ok" == t.status ? ($("#comments-all-" + e).hide(), $("#comments_loader_" + e).hide(), $(".toolt-n").tooltipster("destroy"), $(".toolt-na").tooltipster("destroy"), $("#resp_cmnt_" + e).prepend(t.html), $(".toolt-n").tooltipster({
  7279.                 delay: 0,
  7280.                 position: "top",
  7281.                 animation: "grow"
  7282.             }), $(".toolt-na").tooltipster({
  7283.                 delay: 100,
  7284.                 position: "top",
  7285.                 animation: "grow",
  7286.                 offsetY: -12
  7287.             })) : ($("#comments-all-" + e).show(), $("#comments_loader_" + e).hide(), Sprashivai.show_error(t.message))
  7288.         },
  7289.         error: function(t, i) {
  7290.             $("#comments-all-" + e).show(), $("#comments_loader_" + e).hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7291.         }
  7292.     })
  7293. }, Responses.ask_error = function() {
  7294.     $("#ask_form_layout").addClass("wrong"), $("#ask_form_layout").on("animationend", function(e) {
  7295.         $(this).removeClass("wrong")
  7296.     })
  7297. }, Responses.check_new_responses = function(e) {
  7298.     $.ajax({
  7299.         type: "POST",
  7300.         url: "/responses/load/new",
  7301.         data: {
  7302.             username: e,
  7303.             offset: profile_new_load_offset
  7304.         },
  7305.         dataType: "json",
  7306.         timeout: 3e4,
  7307.         success: function(e, t, i) {
  7308.             "ok" == e.status && ($("#pr_responses_badge").html(e.q_resp_txt), e.q_passed > 0 && ($("#pr_new_resp_tmp").prepend(e.q_html), profile_new_load_offset = e.q_offset, profile_new_loaded_responses += e.q_passed, $("#pr_new_resp_load_show_lnk").html("Показать " + decl_of_num(profile_new_loaded_responses, ["новый ответ", "новых ответа", "новых ответов"])), $("#pr_new_resp_load_show").show()), Sprashivai.logged && (document.title = e.inbox_questions > 0 ? "(" + e.inbox_questions + ") " + Sprashivai.page_title : Sprashivai.page_title)), setTimeout(function() {
  7309.                 Responses.check_new_responses(Sprashivai.profile_username)
  7310.             }, 3e4)
  7311.         },
  7312.         error: function(e, t) {
  7313.             setTimeout(function() {
  7314.                 Responses.check_new_responses(Sprashivai.profile_username)
  7315.             }, 3e4)
  7316.         }
  7317.     })
  7318. }, Responses.show_new_responses = function() {
  7319.     profile_new_loaded_responses = 0, $(".toolt-n").filter(function() {
  7320.         return $(this).data("tooltipsterNs")
  7321.     }).tooltipster("destroy"), $(".toolt-na").filter(function() {
  7322.         return $(this).data("tooltipsterNs")
  7323.     }).tooltipster("destroy"), $("#user_responses").prepend($("#pr_new_resp_tmp").html()), $("#pr_new_resp_tmp").html(""), $("#pr_new_resp_load_show").hide(), $(".toolt-n").tooltipster({
  7324.         delay: 0,
  7325.         position: "top",
  7326.         animation: "grow"
  7327.     }), $(".toolt-na").tooltipster({
  7328.         delay: 100,
  7329.         position: "top",
  7330.         animation: "grow",
  7331.         offsetY: -12
  7332.     }), Sprashivai.odometer(), Sprashivai.ichecks()
  7333. }, Responses.reask = function() {
  7334.     $("#ask_sent").hide(), $("#ask_layout").show(), $("#ask_txt_area").focus()
  7335. }, Responses.remove = function(e) {
  7336.     $("#btn_resp_remove_" + e).html("удаляем"), $("#btn_resp_remove_" + e).attr("disabled", "disabled"), $.ajax({
  7337.         type: "POST",
  7338.         url: "/response/remove",
  7339.         data: {
  7340.             response: e
  7341.         },
  7342.         dataType: "json",
  7343.         timeout: 3e4,
  7344.         success: function(t, i, o) {
  7345.             $("#btn_resp_remove_" + e).html("Удалить"), $("#btn_resp_remove_" + e).removeAttr("disabled"), "ok" == t.status ? ($.magnificPopup.close(), $("#response_item_" + e).velocity("slideUp", {
  7346.                 delay: 0,
  7347.                 duration: 150
  7348.             }), $("#top_nq_badge").html(t.inbox), $("#pr_responses_badge").html(t.responses_f), t.inbox > 0 ? $("#top_nq_badge").show() : $("#top_nq_badge").hide(), Sprashivai.logged && (document.title = t.inbox > 0 ? "(" + t.inbox + ") " + Sprashivai.page_title : Sprashivai.page_title), t.responses > 0 ? $("#pr_responses_badge").show() : $("#pr_responses_badge").hide()) : Sprashivai.show_error("error" == t.status ? t.message : "Произошла ошибка, попробуйте еще раз")
  7349.         },
  7350.         error: function(t, i) {
  7351.             $("#btn_resp_remove_" + e).html("Удалить"), $("#btn_resp_remove_" + e).removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7352.         }
  7353.     })
  7354. }, Responses.ask = function(e, t) {
  7355.     $("#ask_btn").attr("disabled", "disabled"), $("#ask_btn").html("спрашиваем"), $("#ask_txt_area").attr("disabled", "disabled");
  7356.     var i = $("#ask_anonymously").is(":checked") ? "yes" : "no";
  7357.     $.ajax({
  7358.         type: "POST",
  7359.         url: "/question/ask",
  7360.         data: {
  7361.             username: e,
  7362.             anonymously: i,
  7363.             question: $("#ask_txt_area").val(),
  7364.             hash: t,
  7365.             sig: hash_ask(e, t)
  7366.         },
  7367.         dataType: "json",
  7368.         timeout: 3e4,
  7369.         success: function(e, t, i) {
  7370.             $("#ask_btn").removeAttr("disabled"), $("#ask_btn").html("Спросить"), $("#ask_txt_area").removeAttr("disabled"), "ok" == e.status ? ($("#ask_sent").show(), $("#ask_layout").hide(), $("#ask_txt_area").val("")) : "error" == e.status ? (Sprashivai.show_error(e.message), Responses.ask_error()) : (Sprashivai.show_error("Произошла ошибка, попробуйте еще раз"), Responses.ask_error())
  7371.         },
  7372.         error: function(e, t) {
  7373.             $("#ask_btn").removeAttr("disabled"), $("#ask_btn").html("Спросить"), $("#ask_txt_area").removeAttr("disabled"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз"), Responses.ask_error()
  7374.         }
  7375.     })
  7376. }, Responses.hide_response = function(e) {
  7377.     $("#response_item_" + e).css("opacity", "0.5"), $.ajax({
  7378.         type: "POST",
  7379.         url: "/response/hide",
  7380.         data: {
  7381.             question: e
  7382.         },
  7383.         dataType: "json",
  7384.         timeout: 3e4,
  7385.         success: function(t, i, o) {
  7386.             "ok" == t.status ? ($("#response_item_" + e).velocity("slideUp", {
  7387.                 delay: 0,
  7388.                 duration: 150
  7389.             }), Sprashivai.show_message("Ответ скрыт")) : "error" == t.status ? (Sprashivai.show_error(t.message), $("#response_item_" + e).css("opacity", "1")) : (Sprashivai.show_error("Произошла ошибка, попробуйте еще раз"), $("#response_item_" + e).css("opacity", "1"))
  7390.         },
  7391.         error: function(t, i) {
  7392.             $("#response_item_" + e).css("opacity", "1"), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7393.         }
  7394.     })
  7395. }, window.Gifts || (window.Gifts = {}), Gifts.move_right = function(e) {
  7396.     var t = parseInt($("#gft_cur_" + e).val()),
  7397.         i = parseInt($("#gft_sec_" + e).val());
  7398.     if (i > t) {
  7399.         t++;
  7400.         var o = 40 - 525 * (t - 1);
  7401.         $("#gft_cur_" + e).val(t), $("#mdl_gift_lt_" + e).velocity({
  7402.             marginLeft: o.toString() + "px"
  7403.         }, {
  7404.             duration: 350,
  7405.             easing: "easeInSine"
  7406.         })
  7407.     }
  7408.     t == i && $("#gft_ar_r_" + e).hide(), t > 1 && $("#gft_ar_l_" + e).show()
  7409. }, Gifts.move_left = function(e) {
  7410.     var t = parseInt($("#gft_cur_" + e).val()),
  7411.         i = parseInt($("#gft_sec_" + e).val());
  7412.     if (t > 1) {
  7413.         t--;
  7414.         var o = 1 == t ? 20 : 40 - 525 * (t - 1);
  7415.         $("#gft_cur_" + e).val(t), $("#mdl_gift_lt_" + e).velocity({
  7416.             marginLeft: o.toString() + "px"
  7417.         }, {
  7418.             duration: 350,
  7419.             easing: "easeInSine"
  7420.         })
  7421.     }
  7422.     1 == t && $("#gft_ar_l_" + e).hide(), i > t && $("#gft_ar_r_" + e).show()
  7423. }, Gifts.close_modal = function() {
  7424.     "select" == window.gift_current_view ? $.magnificPopup.close() : "selected" == window.gift_current_view && ($("#mdl_gift_selected").hide(), $("#mdl_gifts_lyt").show(), $(".mdl_gift").css("width", "600px"), window.gift_current_view = "select")
  7425. }, Gifts.select_gift = function(e, t, i, o) {
  7426.     $("#mdl_gift_selected_img").attr("src", i), $("#mdl_gift_selected_img").attr("src", t), $("#mdl_gift_selected").show(), $("#mdl_gifts_lyt").hide(), $(".mdl_gift").css("width", "400px"), $("#mdl_gift_selected_id").val(e), window.gift_current_view = "selected"
  7427. }, window.Payments || (window.Payments = {}), Payments.select_method = function(e) {
  7428.     return "in_work" == payments_state ? !1 : void("" == e ? ($("#payments_methods").show(), $(".pmnt_methd").hide(), payments_state = "main", $("#payments_close_link").html("Закрыть")) : ($("#payments_methods").hide(), $(".pmnt_methd").hide(), $("#payments_" + e).show(), payments_state = "payment_method", $("#payments_close_link").html("Назад")))
  7429. }, Payments.pay_card = function() {
  7430.     payments_state = "in_work";
  7431.     var e = $("input[name=bank_card_votes]:checked", "#pmnt_form_bank_card").val(),
  7432.         t = 0;
  7433.     t = parseInt("custom" == e ? $("#bank_card_votes").val() : e), $("#btn_pmnt_bank_cards").html("подождите..."), $("#btn_pmnt_bank_cards").attr("disabled", "disabled"), $.ajax({
  7434.         type: "POST",
  7435.         url: "/payments/create",
  7436.         data: {
  7437.             votes: t
  7438.         },
  7439.         dataType: "json",
  7440.         timeout: 3e4,
  7441.         success: function(e) {
  7442.             "ok" == e.status ? ($("#pmnt_pay_form_payment_type").val("AC"), $("#pmnt_pay_form_sum").val(e.amount), $("#pmnt_pay_form_order_number").val(e.order_id), $("#pay_form").submit()) : (payments_state = "payment_method", $("#btn_pmnt_bank_cards").html("Получить голоса"), $("#btn_pmnt_bank_cards").removeAttr("disabled"), $("#pmnt_bank_card_error").html(e.message), $("#pmnt_bank_card_error").show())
  7443.         },
  7444.         error: function(e, t) {
  7445.             payments_state = "payment_method", $("#pmnt_bank_card_error").html("Произошла ошибка, попробуйте еще раз"), $("#pmnt_bank_card_error").show(), $("#btn_pmnt_bank_cards").html("Получить голоса"), $("#btn_pmnt_bank_cards").removeAttr("disabled")
  7446.         }
  7447.     })
  7448. }, Payments.pay_ewallet = function() {
  7449.     payments_state = "in_work";
  7450.     var e = $("input[name=bank_card_votes]:checked", "#pmnt_form_ewallet").val(),
  7451.         t = 0;
  7452.     t = parseInt("custom" == e ? $("#ewallet_votes").val() : e), $("#btn_pmnt_ewallet").html("подождите..."), $("#btn_pmnt_ewallet").attr("disabled", "disabled"), $("#pmnt_wallet_error").hide(), $.ajax({
  7453.         type: "POST",
  7454.         url: "/payments/create",
  7455.         data: {
  7456.             votes: t
  7457.         },
  7458.         dataType: "json",
  7459.         timeout: 3e4,
  7460.         success: function(e) {
  7461.             if ("ok" == e.status) {
  7462.                 var t = "PC";
  7463.                 "yandex" == $("input[name=ewallet_type]:checked", "#pmnt_form_ewallet").val() ? t = "PC" : "webmoney" == $("input[name=ewallet_type]:checked", "#pmnt_form_ewallet").val() && (t = "WM"), $("#pmnt_pay_form_payment_type").val(t), $("#pmnt_pay_form_sum").val(e.amount), $("#pmnt_pay_form_order_number").val(e.order_id), $("#pay_form").submit()
  7464.             } else payments_state = "payment_method", $("#btn_pmnt_ewallet").html("Получить голоса"), $("#btn_pmnt_ewallet").removeAttr("disabled"), $("#pmnt_wallet_error").html(e.message), $("#pmnt_wallet_error").show()
  7465.         },
  7466.         error: function(e, t) {
  7467.             payments_state = "payment_method", $("#btn_pmnt_ewallet").html("Получить голоса"), $("#btn_pmnt_ewallet").removeAttr("disabled"), $("#pmnt_wallet_error").html("Произошла ошибка, попробуйте еще раз"), $("#pmnt_wallet_error").show()
  7468.         }
  7469.     })
  7470. }, Payments.set_ppc_votes = function(e) {
  7471.     $(".ppc_link").removeClass("ppc_link_active"), $("#ppc_votes_link_" + e).addClass("ppc_link_active"), $("#ppc_votes").val(e)
  7472. }, Payments.ppc_change_phone = function() {
  7473.     Sprashivai.show_center_loader("Пожалуйста, подождите..."), $.ajax({
  7474.         type: "POST",
  7475.         url: "/pay_per_click/unlink",
  7476.         dataType: "json",
  7477.         timeout: 3e4,
  7478.         success: function(e) {
  7479.             Sprashivai.hide_center_loader(), "ok" == e.status ? ($("#ppc_confirm_phone").hide(), $("#ppc_phone_linked").hide(), $("#ppc_link_phone").show(), $("#ppc_phone_input").focus()) : Sprashivai.show_error(e.message)
  7480.         },
  7481.         error: function(e, t) {
  7482.             Sprashivai.show_center_loader("Пожалуйста, подождите..."), Sprashivai.show_error(response.message)
  7483.         }
  7484.     })
  7485. }, Payments.ppc_link = function() {
  7486.     $("#btn_pmnt_ppc_phone").html("подождите..."), $("#btn_pmnt_ppc_phone").attr("disabled", "disabled"), $("#pmnt_ppc_link_error").hide(), payments_state = "in_work", $.ajax({
  7487.         type: "POST",
  7488.         url: "/pay_per_click/link",
  7489.         data: {
  7490.             phone: $("#ppc_phone_input").val()
  7491.         },
  7492.         dataType: "json",
  7493.         timeout: 3e4,
  7494.         success: function(e) {
  7495.             payments_state = "payment_method", "ok" == e.status ? ($("#ppc_link_phone").hide(), $("#ppc_confirm_phone").show(), $("#ppc_phone_code_input").focus(), $("#ppc_phone_number").html(e.phone_html), $("#ppc_phone_to_confirm").val(e.phone)) : ($("#btn_pmnt_ppc_phone").html("Получить голоса"), $("#btn_pmnt_ppc_phone").removeAttr("disabled"), $("#pmnt_ppc_link_error").html(e.message), $("#pmnt_ppc_link_error").show())
  7496.         },
  7497.         error: function(e, t) {
  7498.             payments_state = "payment_method", $("#btn_pmnt_ppc_phone").html("Получить голоса"), $("#btn_pmnt_ppc_phone").removeAttr("disabled"), $("#pmnt_ppc_link_error").html("Произошла ошибка, попробуйте еще раз"), $("#pmnt_ppc_link_error").show()
  7499.         }
  7500.     })
  7501. }, Payments.ppc_confirm = function() {
  7502.     $("#btn_pmnt_ppc_confirm").html("подождите..."), $("#btn_pmnt_ppc_confirm").attr("disabled", "disabled"), $("#pmnt_ppc_confirm_error").hide(), payments_state = "in_work", $.ajax({
  7503.         type: "POST",
  7504.         url: "/pay_per_click/check",
  7505.         data: {
  7506.             votes: $("#ppc_votes").val(),
  7507.             code: $("#ppc_phone_code_input").val(),
  7508.             phone: $("#ppc_phone_to_confirm").val()
  7509.         },
  7510.         dataType: "json",
  7511.         timeout: 3e4,
  7512.         success: function(e) {
  7513.             payments_state = "payment_method", "ok" == e.status ? ($("#ppc_confirm_phone").hide(), $("#ppc_sent").show(), $("#ppc_votes_block").hide()) : ($("#btn_pmnt_ppc_confirm").html("Подтвердить и получить голоса"), $("#btn_pmnt_ppc_confirm").removeAttr("disabled"), $("#pmnt_ppc_confirm_error").html(e.message), $("#pmnt_ppc_confirm_error").show())
  7514.         },
  7515.         error: function(e, t) {
  7516.             payments_state = "payment_method", $("#btn_pmnt_ppc_confirm").html("Подтвердить и получить голоса"), $("#btn_pmnt_ppc_confirm").removeAttr("disabled"), $("#pmnt_ppc_confirm_error").html("Произошла ошибка, попробуйте еще раз"), $("#pmnt_ppc_confirm_error").show()
  7517.         }
  7518.     })
  7519. }, Payments.ppc_new_payment = function() {
  7520.     $("#ppc_sent").hide(), $("#ppc_votes_block").show(), $("#ppc_phone_linked").show()
  7521. }, Payments.pay_ppc = function() {
  7522.     $("#btn_pmnt_ppc_pay").html("подождите..."), $("#btn_pmnt_ppc_pay").attr("disabled", "disabled"), $("#pmnt_ppc_pay_error").hide(), payments_state = "in_work", $.ajax({
  7523.         type: "POST",
  7524.         url: "/pay_per_click/pay",
  7525.         data: {
  7526.             votes: $("#ppc_votes").val()
  7527.         },
  7528.         dataType: "json",
  7529.         timeout: 3e4,
  7530.         success: function(e) {
  7531.             payments_state = "payment_method", $("#btn_pmnt_ppc_pay").html("Получить голоса"), $("#btn_pmnt_ppc_pay").removeAttr("disabled"), "ok" == e.status ? ($("#ppc_phone_linked").hide(), $("#ppc_sent").show(), $("#ppc_votes_block").hide()) : ($("#pmnt_ppc_pay_error").html(e.message), $("#pmnt_ppc_pay_error").show())
  7532.         },
  7533.         error: function(e, t) {
  7534.             payments_state = "payment_method", $("#btn_pmnt_ppc_pay").html("Получить голоса"), $("#btn_pmnt_ppc_pay").removeAttr("disabled"), $("#pmnt_ppc_pay_error").html("Произошла ошибка, попробуйте еще раз"), $("#pmnt_ppc_pay_error").show()
  7535.         }
  7536.     })
  7537. }, Payments.close_window = function() {
  7538.     return "in_work" == payments_state ? (alert("Ваша оплата в процессе, дождитесь результата, прежде чем закрыть это окно"), !1) : "payment_method" == payments_state ? (Payments.select_method(""), !0) : void $.magnificPopup.close()
  7539. }, Payments.select_country = function(e) {
  7540.     $(".tab_link").removeClass("tab_link_active"), $("#pmnt_country_link_" + e).addClass("tab_link_active"), $(".pmnt_country").hide(), $("#pmnt_country_" + e).show()
  7541. }, Payments.toggle_sms_live_rules = function() {
  7542.     $("#sms_live_rules").is(":visible") ? ($("#sms_live_rules_link").html("Показать подробности"), $("#sms_live_rules").hide()) : ($("#sms_live_rules_link").html("Скрыть подробности"), $("#sms_live_rules").show())
  7543. }, Payments.up_balance_from_m = function() {
  7544.     $.magnificPopup.close(), setTimeout(function() {
  7545.         Sprashivai.open_payments()
  7546.     }, 100)
  7547. }, window.Feed || (window.Feed = {}), Feed.load = function() {
  7548.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  7549.         type: "POST",
  7550.         url: "/feed/load",
  7551.         data: {
  7552.             offset: feed_offset
  7553.         },
  7554.         dataType: "json",
  7555.         timeout: 3e4,
  7556.         success: function(e, t, i) {
  7557.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($(".toolt-n").tooltipster("destroy"), $(".toolt-na").tooltipster("destroy"), $("#feed_items").append(e.q_html), feed_offset = e.q_offset, feed_passed += e.q_passed, feed_passed >= feed_all && $("#load-more-link").hide(), $(".toolt-n").tooltipster({
  7558.                 delay: 0,
  7559.                 position: "top",
  7560.                 animation: "grow"
  7561.             }), $(".toolt-na").tooltipster({
  7562.                 delay: 100,
  7563.                 position: "top",
  7564.                 animation: "grow",
  7565.                 offsetY: -12
  7566.             }), Sprashivai.odometer(), Sprashivai.ichecks()) : Sprashivai.show_error(e.message)
  7567.         },
  7568.         error: function(e, t) {
  7569.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7570.         }
  7571.     })
  7572. }, Feed.load_my = function() {
  7573.     $("#load-more-link").hide(), $("#load-more-preloader").show(), $.ajax({
  7574.         type: "POST",
  7575.         url: "/feed/my/load",
  7576.         data: {
  7577.             offset: feed_offset
  7578.         },
  7579.         dataType: "json",
  7580.         timeout: 3e4,
  7581.         success: function(e, t, i) {
  7582.             $("#load-more-link").show(), $("#load-more-preloader").hide(), "ok" == e.status ? ($(".toolt-n").tooltipster("destroy"), $(".toolt-na").tooltipster("destroy"), $("#feed_my").append(e.html), feed_offset = e.offset, feed_passed += e.passed, feed_passed >= feed_all && $("#load-more-link").hide(), $(".toolt-n").tooltipster({
  7583.                 delay: 0,
  7584.                 position: "top",
  7585.                 animation: "grow"
  7586.             }), $(".toolt-na").tooltipster({
  7587.                 delay: 100,
  7588.                 position: "top",
  7589.                 animation: "grow",
  7590.                 offsetY: -12
  7591.             }), Sprashivai.odometer(), Sprashivai.ichecks()) : Sprashivai.show_error(e.message)
  7592.         },
  7593.         error: function(e, t) {
  7594.             $("#load-more-link").show(), $("#load-more-preloader").hide(), Sprashivai.show_error("Произошла ошибка, попробуйте еще раз")
  7595.         }
  7596.     })
  7597. }, window.Partners || (window.Partners = {}), Partners.open_podari_zhizn_popup = function() {
  7598.     $.magnificPopup.open({
  7599.         items: {
  7600.             src: "/partners/podari_zhizn/popup"
  7601.         },
  7602.         type: "ajax",
  7603.         showCloseBtn: !1,
  7604.         closeOnBgClick: !1
  7605.     }, 0)
  7606. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement