/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
 //@ sourceMappingURL=jquery.min.map
 */
(function(e, t){var n, r, i = typeof t, o = e.location, a = e.document, s = a.documentElement, l = e.jQuery, u = e.$, c = {}, p = [], f = "1.10.2", d = p.concat, h = p.push, g = p.slice, m = p.indexOf, y = c.toString, v = c.hasOwnProperty, b = f.trim, x = function(e, t){return new x.fn.init(e, t, r)}, w = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, T = /\S+/g, C = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, N = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, k = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, E = /^[\],:{}\s]*$/, S = /(?:^|:|,)(?:\s*\[)+/g, A = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, j = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, D = /^-ms-/, L = /-([\da-z])/gi, H = function(e, t){return t.toUpperCase()}, q = function(e){(a.addEventListener || "load" === e.type || "complete" === a.readyState) && (_(), x.ready())}, _ = function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded", q, !1), e.removeEventListener("load", q, !1)):(a.detachEvent("onreadystatechange", q), e.detachEvent("onload", q))}; x.fn = x.prototype = {jquery:f, constructor:x, init:function(e, n, r){var i, o; if (!e)return this; if ("string" == typeof e){if (i = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3?[null, e, null]:N.exec(e), !i || !i[1] && n)return!n || n.jquery?(n || r).find(e):this.constructor(n).find(e); if (i[1]){if (n = n instanceof x?n[0]:n, x.merge(this, x.parseHTML(i[1], n && n.nodeType?n.ownerDocument || n:a, !0)), k.test(i[1]) && x.isPlainObject(n))for (i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i, n[i]); return this}if (o = a.getElementById(i[2]), o && o.parentNode){if (o.id !== i[2])return r.find(e); this.length = 1, this[0] = o}return this.context = a, this.selector = e, this}return e.nodeType?(this.context = this[0] = e, this.length = 1, this):x.isFunction(e)?r.ready(e):(e.selector !== t && (this.selector = e.selector, this.context = e.context), x.makeArray(e, this))}, selector:"", length:0, toArray:function(){return g.call(this)}, get:function(e){return null == e?this.toArray():0 > e?this[this.length + e]:this[e]}, pushStack:function(e){var t = x.merge(this.constructor(), e); return t.prevObject = this, t.context = this.context, t}, each:function(e, t){return x.each(this, e, t)}, ready:function(e){return x.ready.promise().done(e), this}, slice:function(){return this.pushStack(g.apply(this, arguments))}, first:function(){return this.eq(0)}, last:function(){return this.eq( - 1)}, eq:function(e){var t = this.length, n = + e + (0 > e?t:0); return this.pushStack(n >= 0 && t > n?[this[n]]:[])}, map:function(e){return this.pushStack(x.map(this, function(t, n){return e.call(t, n, t)}))}, end:function(){return this.prevObject || this.constructor(null)}, push:h, sort:[].sort, splice:[].splice}, x.fn.init.prototype = x.fn, x.extend = x.fn.extend = function(){var e, n, r, i, o, a, s = arguments[0] || {}, l = 1, u = arguments.length, c = !1; for ("boolean" == typeof s && (c = s, s = arguments[1] || {}, l = 2), "object" == typeof s || x.isFunction(s) || (s = {}), u === l && (s = this, --l); u > l; l++)if (null != (o = arguments[l]))for (i in o)e = s[i], r = o[i], s !== r && (c && r && (x.isPlainObject(r) || (n = x.isArray(r)))?(n?(n = !1, a = e && x.isArray(e)?e:[]):a = e && x.isPlainObject(e)?e:{}, s[i] = x.extend(c, a, r)):r !== t && (s[i] = r)); return s}, x.extend({expando:"jQuery" + (f + Math.random()).replace(/\D/g, ""), noConflict:function(t){return e.$ === x && (e.$ = u), t && e.jQuery === x && (e.jQuery = l), x}, isReady:!1, readyWait:1, holdReady:function(e){e?x.readyWait++:x.ready(!0)}, ready:function(e){if (e === !0?!--x.readyWait:!x.isReady){if (!a.body)return setTimeout(x.ready); x.isReady = !0, e !== !0 && --x.readyWait > 0 || (n.resolveWith(a, [x]), x.fn.trigger && x(a).trigger("ready").off("ready"))}}, isFunction:function(e){return"function" === x.type(e)}, isArray:Array.isArray || function(e){return"array" === x.type(e)}, isWindow:function(e){return null != e && e == e.window}, isNumeric:function(e){return!isNaN(parseFloat(e)) && isFinite(e)}, type:function(e){return null == e?e + "":"object" == typeof e || "function" == typeof e?c[y.call(e)] || "object":typeof e}, isPlainObject:function(e){var n; if (!e || "object" !== x.type(e) || e.nodeType || x.isWindow(e))return!1; try{if (e.constructor && !v.call(e, "constructor") && !v.call(e.constructor.prototype, "isPrototypeOf"))return!1} catch (r){return!1}if (x.support.ownLast)for (n in e)return v.call(e, n); for (n in e); return n === t || v.call(e, n)}, isEmptyObject:function(e){var t; for (t in e)return!1; return!0}, error:function(e){throw Error(e)}, parseHTML:function(e, t, n){if (!e || "string" != typeof e)return null; "boolean" == typeof t && (n = t, t = !1), t = t || a; var r = k.exec(e), i = !n && []; return r?[t.createElement(r[1])]:(r = x.buildFragment([e], t, i), i && x(i).remove(), x.merge([], r.childNodes))}, parseJSON:function(n){return e.JSON && e.JSON.parse?e.JSON.parse(n):null === n?n:"string" == typeof n && (n = x.trim(n), n && E.test(n.replace(A, "@").replace(j, "]").replace(S, "")))?Function("return " + n)():(x.error("Invalid JSON: " + n), t)}, parseXML:function(n){var r, i; if (!n || "string" != typeof n)return null; try{e.DOMParser?(i = new DOMParser, r = i.parseFromString(n, "text/xml")):(r = new ActiveXObject("Microsoft.XMLDOM"), r.async = "false", r.loadXML(n))} catch (o){r = t}return r && r.documentElement && !r.getElementsByTagName("parsererror").length || x.error("Invalid XML: " + n), r}, noop:function(){}, globalEval:function(t){t && x.trim(t) && (e.execScript || function(t){e.eval.call(e, t)})(t)}, camelCase:function(e){return e.replace(D, "ms-").replace(L, H)}, nodeName:function(e, t){return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()}, each:function(e, t, n){var r, i = 0, o = e.length, a = M(e); if (n){if (a){for (; o > i; i++)if (r = t.apply(e[i], n), r === !1)break} else for (i in e)if (r = t.apply(e[i], n), r === !1)break} else if (a){for (; o > i; i++)if (r = t.call(e[i], i, e[i]), r === !1)break} else for (i in e)if (r = t.call(e[i], i, e[i]), r === !1)break; return e}, trim:b && !b.call("\ufeff\u00a0")?function(e){return null == e?"":b.call(e)}:function(e){return null == e?"":(e + "").replace(C, "")}, makeArray:function(e, t){var n = t || []; return null != e && (M(Object(e))?x.merge(n, "string" == typeof e?[e]:e):h.call(n, e)), n}, inArray:function(e, t, n){var r; if (t){if (m)return m.call(t, e, n); for (r = t.length, n = n?0 > n?Math.max(0, r + n):n:0; r > n; n++)if (n in t && t[n] === e)return n}return - 1}, merge:function(e, n){var r = n.length, i = e.length, o = 0; if ("number" == typeof r)for (; r > o; o++)e[i++] = n[o]; else while (n[o] !== t)e[i++] = n[o++]; return e.length = i, e}, grep:function(e, t, n){var r, i = [], o = 0, a = e.length; for (n = !!n; a > o; o++)r = !!t(e[o], o), n !== r && i.push(e[o]); return i}, map:function(e, t, n){var r, i = 0, o = e.length, a = M(e), s = []; if (a)for (; o > i; i++)r = t(e[i], i, n), null != r && (s[s.length] = r); else for (i in e)r = t(e[i], i, n), null != r && (s[s.length] = r); return d.apply([], s)}, guid:1, proxy:function(e, n){var r, i, o; return"string" == typeof n && (o = e[n], n = e, e = o), x.isFunction(e)?(r = g.call(arguments, 2), i = function(){return e.apply(n || this, r.concat(g.call(arguments)))}, i.guid = e.guid = e.guid || x.guid++, i):t}, access:function(e, n, r, i, o, a, s){var l = 0, u = e.length, c = null == r; if ("object" === x.type(r)){o = !0; for (l in r)x.access(e, n, l, r[l], !0, a, s)} else if (i !== t && (o = !0, x.isFunction(i) || (s = !0), c && (s?(n.call(e, i), n = null):(c = n, n = function(e, t, n){return c.call(x(e), n)})), n))for (; u > l; l++)n(e[l], r, s?i:i.call(e[l], l, n(e[l], r))); return o?e:c?n.call(e):u?n(e[0], r):a}, now:function(){return(new Date).getTime()}, swap:function(e, t, n, r){var i, o, a = {}; for (o in t)a[o] = e.style[o], e.style[o] = t[o]; i = n.apply(e, r || []); for (o in t)e.style[o] = a[o]; return i}}), x.ready.promise = function(t){if (!n)if (n = x.Deferred(), "complete" === a.readyState)setTimeout(x.ready); else if (a.addEventListener)a.addEventListener("DOMContentLoaded", q, !1), e.addEventListener("load", q, !1); else{a.attachEvent("onreadystatechange", q), e.attachEvent("onload", q); var r = !1; try{r = null == e.frameElement && a.documentElement} catch (i){}r && r.doScroll && function o(){if (!x.isReady){try{r.doScroll("left")} catch (e){return setTimeout(o, 50)}_(), x.ready()}}()}return n.promise(t)}, x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t){c["[object " + t + "]"] = t.toLowerCase()}); function M(e){var t = e.length, n = x.type(e); return x.isWindow(e)?!1:1 === e.nodeType && t?!0:"array" === n || "function" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e)}r = x(a), function(e, t){var n, r, i, o, a, s, l, u, c, p, f, d, h, g, m, y, v, b = "sizzle" + - new Date, w = e.document, T = 0, C = 0, N = st(), k = st(), E = st(), S = !1, A = function(e, t){return e === t?(S = !0, 0):0}, j = typeof t, D = 1 << 31, L = {}.hasOwnProperty, H = [], q = H.pop, _ = H.push, M = H.push, O = H.slice, F = H.indexOf || function(e){var t = 0, n = this.length; for (; n > t; t++)if (this[t] === e)return t; return - 1}, B = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", P = "[\\x20\\t\\r\\n\\f]", R = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", W = R.replace("w", "w#"), $ = "\\[" + P + "*(" + R + ")" + P + "*(?:([*^$|!~]?=)" + P + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + W + ")|)|)" + P + "*\\]", I = ":(" + R + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + $.replace(3, 8) + ")*)|.*)\\)|)", z = RegExp("^" + P + "+|((?:^|[^\\\\])(?:\\\\.)*)" + P + "+$", "g"), X = RegExp("^" + P + "*," + P + "*"), U = RegExp("^" + P + "*([>+~]|" + P + ")" + P + "*"), V = RegExp(P + "*[+~]"), Y = RegExp("=" + P + "*([^\\]'\"]*)" + P + "*\\]", "g"), J = RegExp(I), G = RegExp("^" + W + "$"), Q = {ID:RegExp("^#(" + R + ")"), CLASS:RegExp("^\\.(" + R + ")"), TAG:RegExp("^(" + R.replace("w", "w*") + ")"), ATTR:RegExp("^" + $), PSEUDO:RegExp("^" + I), CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + P + "*(even|odd|(([+-]|)(\\d*)n|)" + P + "*(?:([+-]|)" + P + "*(\\d+)|))" + P + "*\\)|)", "i"), bool:RegExp("^(?:" + B + ")$", "i"), needsContext:RegExp("^" + P + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + P + "*((?:-\\d)?\\d*)" + P + "*\\)|)(?=[^-]|$)", "i")}, K = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, et = /^(?:input|select|textarea|button)$/i, tt = /^h\d$/i, nt = /'|\\/g, rt = RegExp("\\\\([\\da-f]{1,6}" + P + "?|(" + P + ")|.)", "ig"), it = function(e, t, n){var r = "0x" + t - 65536; return r !== r || n?t:0 > r?String.fromCharCode(r + 65536):String.fromCharCode(55296 | r >> 10, 56320 | 1023 & r)}; try{M.apply(H = O.call(w.childNodes), w.childNodes), H[w.childNodes.length].nodeType} catch (ot){M = {apply:H.length?function(e, t){_.apply(e, O.call(t))}:function(e, t){var n = e.length, r = 0; while (e[n++] = t[r++]); e.length = n - 1}}}function at(e, t, n, i){var o, a, s, l, u, c, d, m, y, x; if ((t?t.ownerDocument || t:w) !== f && p(t), t = t || f, n = n || [], !e || "string" != typeof e)return n; if (1 !== (l = t.nodeType) && 9 !== l)return[]; if (h && !i){if (o = Z.exec(e))if (s = o[1]){if (9 === l){if (a = t.getElementById(s), !a || !a.parentNode)return n; if (a.id === s)return n.push(a), n} else if (t.ownerDocument && (a = t.ownerDocument.getElementById(s)) && v(t, a) && a.id === s)return n.push(a), n} else{if (o[2])return M.apply(n, t.getElementsByTagName(e)), n; if ((s = o[3]) && r.getElementsByClassName && t.getElementsByClassName)return M.apply(n, t.getElementsByClassName(s)), n}if (r.qsa && (!g || !g.test(e))){if (m = d = b, y = t, x = 9 === l && e, 1 === l && "object" !== t.nodeName.toLowerCase()){c = mt(e), (d = t.getAttribute("id"))?m = d.replace(nt, "\\$&"):t.setAttribute("id", m), m = "[id='" + m + "'] ", u = c.length; while (u--)c[u] = m + yt(c[u]); y = V.test(e) && t.parentNode || t, x = c.join(",")}if (x)try{return M.apply(n, y.querySelectorAll(x)), n} catch (T){} finally{d || t.removeAttribute("id")}}}return kt(e.replace(z, "$1"), t, n, i)}function st(){var e = []; function t(n, r){return e.push(n += " ") > o.cacheLength && delete t[e.shift()], t[n] = r}return t}function lt(e){return e[b] = !0, e}function ut(e){var t = f.createElement("div"); try{return!!e(t)} catch (n){return!1} finally{t.parentNode && t.parentNode.removeChild(t), t = null}}function ct(e, t){var n = e.split("|"), r = e.length; while (r--)o.attrHandle[n[r]] = t}function pt(e, t){var n = t && e, r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || D) - (~e.sourceIndex || D); if (r)return r; if (n)while (n = n.nextSibling)if (n === t)return - 1; return e?1: - 1}function ft(e){return function(t){var n = t.nodeName.toLowerCase(); return"input" === n && t.type === e}}function dt(e){return function(t){var n = t.nodeName.toLowerCase(); return("input" === n || "button" === n) && t.type === e}}function ht(e){return lt(function(t){return t = + t, lt(function(n, r){var i, o = e([], n.length, t), a = o.length; while (a--)n[i = o[a]] && (n[i] = !(r[i] = n[i]))})})}s = at.isXML = function(e){var t = e && (e.ownerDocument || e).documentElement; return t?"HTML" !== t.nodeName:!1}, r = at.support = {}, p = at.setDocument = function(e){var n = e?e.ownerDocument || e:w, i = n.defaultView; return n !== f && 9 === n.nodeType && n.documentElement?(f = n, d = n.documentElement, h = !s(n), i && i.attachEvent && i !== i.top && i.attachEvent("onbeforeunload", function(){p()}), r.attributes = ut(function(e){return e.className = "i", !e.getAttribute("className")}), r.getElementsByTagName = ut(function(e){return e.appendChild(n.createComment("")), !e.getElementsByTagName("*").length}), r.getElementsByClassName = ut(function(e){return e.innerHTML = "<div class='a'></div><div class='a i'></div>", e.firstChild.className = "i", 2 === e.getElementsByClassName("i").length}), r.getById = ut(function(e){return d.appendChild(e).id = b, !n.getElementsByName || !n.getElementsByName(b).length}), r.getById?(o.find.ID = function(e, t){if (typeof t.getElementById !== j && h){var n = t.getElementById(e); return n && n.parentNode?[n]:[]}}, o.filter.ID = function(e){var t = e.replace(rt, it); return function(e){return e.getAttribute("id") === t}}):(delete o.find.ID, o.filter.ID = function(e){var t = e.replace(rt, it); return function(e){var n = typeof e.getAttributeNode !== j && e.getAttributeNode("id"); return n && n.value === t}}), o.find.TAG = r.getElementsByTagName?function(e, n){return typeof n.getElementsByTagName !== j?n.getElementsByTagName(e):t}:function(e, t){var n, r = [], i = 0, o = t.getElementsByTagName(e); if ("*" === e){while (n = o[i++])1 === n.nodeType && r.push(n); return r}return o}, o.find.CLASS = r.getElementsByClassName && function(e, n){return typeof n.getElementsByClassName !== j && h?n.getElementsByClassName(e):t}, m = [], g = [], (r.qsa = K.test(n.querySelectorAll)) && (ut(function(e){e.innerHTML = "<select><option selected=''></option></select>", e.querySelectorAll("[selected]").length || g.push("\\[" + P + "*(?:value|" + B + ")"), e.querySelectorAll(":checked").length || g.push(":checked")}), ut(function(e){var t = n.createElement("input"); t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("t", ""), e.querySelectorAll("[t^='']").length && g.push("[*^$]=" + P + "*(?:''|\"\")"), e.querySelectorAll(":enabled").length || g.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), g.push(",.*:")})), (r.matchesSelector = K.test(y = d.webkitMatchesSelector || d.mozMatchesSelector || d.oMatchesSelector || d.msMatchesSelector)) && ut(function(e){r.disconnectedMatch = y.call(e, "div"), y.call(e, "[s!='']:x"), m.push("!=", I)}), g = g.length && RegExp(g.join("|")), m = m.length && RegExp(m.join("|")), v = K.test(d.contains) || d.compareDocumentPosition?function(e, t){var n = 9 === e.nodeType?e.documentElement:e, r = t && t.parentNode; return e === r || !(!r || 1 !== r.nodeType || !(n.contains?n.contains(r):e.compareDocumentPosition && 16 & e.compareDocumentPosition(r)))}:function(e, t){if (t)while (t = t.parentNode)if (t === e)return!0; return!1}, A = d.compareDocumentPosition?function(e, t){if (e === t)return S = !0, 0; var i = t.compareDocumentPosition && e.compareDocumentPosition && e.compareDocumentPosition(t); return i?1 & i || !r.sortDetached && t.compareDocumentPosition(e) === i?e === n || v(w, e)? - 1:t === n || v(w, t)?1:c?F.call(c, e) - F.call(c, t):0:4 & i? - 1:1:e.compareDocumentPosition? - 1:1}:function(e, t){var r, i = 0, o = e.parentNode, a = t.parentNode, s = [e], l = [t]; if (e === t)return S = !0, 0; if (!o || !a)return e === n? - 1:t === n?1:o? - 1:a?1:c?F.call(c, e) - F.call(c, t):0; if (o === a)return pt(e, t); r = e; while (r = r.parentNode)s.unshift(r); r = t; while (r = r.parentNode)l.unshift(r); while (s[i] === l[i])i++; return i?pt(s[i], l[i]):s[i] === w? - 1:l[i] === w?1:0}, n):f}, at.matches = function(e, t){return at(e, null, null, t)}, at.matchesSelector = function(e, t){if ((e.ownerDocument || e) !== f && p(e), t = t.replace(Y, "='$1']"), !(!r.matchesSelector || !h || m && m.test(t) || g && g.test(t)))try{var n = y.call(e, t); if (n || r.disconnectedMatch || e.document && 11 !== e.document.nodeType)return n} catch (i){}return at(t, f, null, [e]).length > 0}, at.contains = function(e, t){return(e.ownerDocument || e) !== f && p(e), v(e, t)}, at.attr = function(e, n){(e.ownerDocument || e) !== f && p(e); var i = o.attrHandle[n.toLowerCase()], a = i && L.call(o.attrHandle, n.toLowerCase())?i(e, n, !h):t; return a === t?r.attributes || !h?e.getAttribute(n):(a = e.getAttributeNode(n)) && a.specified?a.value:null:a}, at.error = function(e){throw Error("Syntax error, unrecognized expression: " + e)}, at.uniqueSort = function(e){var t, n = [], i = 0, o = 0; if (S = !r.detectDuplicates, c = !r.sortStable && e.slice(0), e.sort(A), S){while (t = e[o++])t === e[o] && (i = n.push(o)); while (i--)e.splice(n[i], 1)}return e}, a = at.getText = function(e){var t, n = "", r = 0, i = e.nodeType; if (i){if (1 === i || 9 === i || 11 === i){if ("string" == typeof e.textContent)return e.textContent; for (e = e.firstChild; e; e = e.nextSibling)n += a(e)} else if (3 === i || 4 === i)return e.nodeValue} else for (; t = e[r]; r++)n += a(t); return n}, o = at.selectors = {cacheLength:50, createPseudo:lt, match:Q, attrHandle:{}, find:{}, relative:{">":{dir:"parentNode", first:!0}, " ":{dir:"parentNode"}, "+":{dir:"previousSibling", first:!0}, "~":{dir:"previousSibling"}}, preFilter:{ATTR:function(e){return e[1] = e[1].replace(rt, it), e[3] = (e[4] || e[5] || "").replace(rt, it), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)}, CHILD:function(e){return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3)?(e[3] || at.error(e[0]), e[4] = + (e[4]?e[5] + (e[6] || 1):2 * ("even" === e[3] || "odd" === e[3])), e[5] = + (e[7] + e[8] || "odd" === e[3])):e[3] && at.error(e[0]), e}, PSEUDO:function(e){var n, r = !e[5] && e[2]; return Q.CHILD.test(e[0])?null:(e[3] && e[4] !== t?e[2] = e[4]:r && J.test(r) && (n = mt(r, !0)) && (n = r.indexOf(")", r.length - n) - r.length) && (e[0] = e[0].slice(0, n), e[2] = r.slice(0, n)), e.slice(0, 3))}}, filter:{TAG:function(e){var t = e.replace(rt, it).toLowerCase(); return"*" === e?function(){return!0}:function(e){return e.nodeName && e.nodeName.toLowerCase() === t}}, CLASS:function(e){var t = N[e + " "]; return t || (t = RegExp("(^|" + P + ")" + e + "(" + P + "|$)")) && N(e, function(e){return t.test("string" == typeof e.className && e.className || typeof e.getAttribute !== j && e.getAttribute("class") || "")})}, ATTR:function(e, t, n){return function(r){var i = at.attr(r, e); return null == i?"!=" === t:t?(i += "", "=" === t?i === n:"!=" === t?i !== n:"^=" === t?n && 0 === i.indexOf(n):"*=" === t?n && i.indexOf(n) > - 1:"$=" === t?n && i.slice( - n.length) === n:"~=" === t?(" " + i + " ").indexOf(n) > - 1:"|=" === t?i === n || i.slice(0, n.length + 1) === n + "-":!1):!0}}, CHILD:function(e, t, n, r, i){var o = "nth" !== e.slice(0, 3), a = "last" !== e.slice( - 4), s = "of-type" === t; return 1 === r && 0 === i?function(e){return!!e.parentNode}:function(t, n, l){var u, c, p, f, d, h, g = o !== a?"nextSibling":"previousSibling", m = t.parentNode, y = s && t.nodeName.toLowerCase(), v = !l && !s; if (m){if (o){while (g){p = t; while (p = p[g])if (s?p.nodeName.toLowerCase() === y:1 === p.nodeType)return!1; h = g = "only" === e && !h && "nextSibling"}return!0}if (h = [a?m.firstChild:m.lastChild], a && v){c = m[b] || (m[b] = {}), u = c[e] || [], d = u[0] === T && u[1], f = u[0] === T && u[2], p = d && m.childNodes[d]; while (p = ++d && p && p[g] || (f = d = 0) || h.pop())if (1 === p.nodeType && ++f && p === t){c[e] = [T, d, f]; break}} else if (v && (u = (t[b] || (t[b] = {}))[e]) && u[0] === T)f = u[1]; else while (p = ++d && p && p[g] || (f = d = 0) || h.pop())if ((s?p.nodeName.toLowerCase() === y:1 === p.nodeType) && ++f && (v && ((p[b] || (p[b] = {}))[e] = [T, f]), p === t))break; return f -= i, f === r || 0 === f % r && f / r >= 0}}}, PSEUDO:function(e, t){var n, r = o.pseudos[e] || o.setFilters[e.toLowerCase()] || at.error("unsupported pseudo: " + e); return r[b]?r(t):r.length > 1?(n = [e, e, "", t], o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e, n){var i, o = r(e, t), a = o.length; while (a--)i = F.call(e, o[a]), e[i] = !(n[i] = o[a])}):function(e){return r(e, 0, n)}):r}}, pseudos:{not:lt(function(e){var t = [], n = [], r = l(e.replace(z, "$1")); return r[b]?lt(function(e, t, n, i){var o, a = r(e, null, i, []), s = e.length; while (s--)(o = a[s]) && (e[s] = !(t[s] = o))}):function(e, i, o){return t[0] = e, r(t, null, o, n), !n.pop()}}), has:lt(function(e){return function(t){return at(e, t).length > 0}}), contains:lt(function(e){return function(t){return(t.textContent || t.innerText || a(t)).indexOf(e) > - 1}}), lang:lt(function(e){return G.test(e || "") || at.error("unsupported lang: " + e), e = e.replace(rt, it).toLowerCase(), function(t){var n; do if (n = h?t.lang:t.getAttribute("xml:lang") || t.getAttribute("lang"))return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-"); while ((t = t.parentNode) && 1 === t.nodeType); return!1}}), target:function(t){var n = e.location && e.location.hash; return n && n.slice(1) === t.id}, root:function(e){return e === d}, focus:function(e){return e === f.activeElement && (!f.hasFocus || f.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)}, enabled:function(e){return e.disabled === !1}, disabled:function(e){return e.disabled === !0}, checked:function(e){var t = e.nodeName.toLowerCase(); return"input" === t && !!e.checked || "option" === t && !!e.selected}, selected:function(e){return e.parentNode && e.parentNode.selectedIndex, e.selected === !0}, empty:function(e){for (e = e.firstChild; e; e = e.nextSibling)if (e.nodeName > "@" || 3 === e.nodeType || 4 === e.nodeType)return!1; return!0}, parent:function(e){return!o.pseudos.empty(e)}, header:function(e){return tt.test(e.nodeName)}, input:function(e){return et.test(e.nodeName)}, button:function(e){var t = e.nodeName.toLowerCase(); return"input" === t && "button" === e.type || "button" === t}, text:function(e){var t; return"input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || t.toLowerCase() === e.type)}, first:ht(function(){return[0]}), last:ht(function(e, t){return[t - 1]}), eq:ht(function(e, t, n){return[0 > n?n + t:n]}), even:ht(function(e, t){var n = 0; for (; t > n; n += 2)e.push(n); return e}), odd:ht(function(e, t){var n = 1; for (; t > n; n += 2)e.push(n); return e}), lt:ht(function(e, t, n){var r = 0 > n?n + t:n; for (; --r >= 0; )e.push(r); return e}), gt:ht(function(e, t, n){var r = 0 > n?n + t:n; for (; t > ++r; )e.push(r); return e})}}, o.pseudos.nth = o.pseudos.eq; for (n in{radio:!0, checkbox:!0, file:!0, password:!0, image:!0})o.pseudos[n] = ft(n); for (n in{submit:!0, reset:!0})o.pseudos[n] = dt(n); function gt(){}gt.prototype = o.filters = o.pseudos, o.setFilters = new gt; function mt(e, t){var n, r, i, a, s, l, u, c = k[e + " "]; if (c)return t?0:c.slice(0); s = e, l = [], u = o.preFilter; while (s){(!n || (r = X.exec(s))) && (r && (s = s.slice(r[0].length) || s), l.push(i = [])), n = !1, (r = U.exec(s)) && (n = r.shift(), i.push({value:n, type:r[0].replace(z, " ")}), s = s.slice(n.length)); for (a in o.filter)!(r = Q[a].exec(s)) || u[a] && !(r = u[a](r)) || (n = r.shift(), i.push({value:n, type:a, matches:r}), s = s.slice(n.length)); if (!n)break}return t?s.length:s?at.error(e):k(e, l).slice(0)}function yt(e){var t = 0, n = e.length, r = ""; for (; n > t; t++)r += e[t].value; return r}function vt(e, t, n){var r = t.dir, o = n && "parentNode" === r, a = C++; return t.first?function(t, n, i){while (t = t[r])if (1 === t.nodeType || o)return e(t, n, i)}:function(t, n, s){var l, u, c, p = T + " " + a; if (s){while (t = t[r])if ((1 === t.nodeType || o) && e(t, n, s))return!0} else while (t = t[r])if (1 === t.nodeType || o)if (c = t[b] || (t[b] = {}), (u = c[r]) && u[0] === p){if ((l = u[1]) === !0 || l === i)return l === !0} else if (u = c[r] = [p], u[1] = e(t, n, s) || i, u[1] === !0)return!0}}function bt(e){return e.length > 1?function(t, n, r){var i = e.length; while (i--)if (!e[i](t, n, r))return!1; return!0}:e[0]}function xt(e, t, n, r, i){var o, a = [], s = 0, l = e.length, u = null != t; for (; l > s; s++)(o = e[s]) && (!n || n(o, r, i)) && (a.push(o), u && t.push(s)); return a}function wt(e, t, n, r, i, o){return r && !r[b] && (r = wt(r)), i && !i[b] && (i = wt(i, o)), lt(function(o, a, s, l){var u, c, p, f = [], d = [], h = a.length, g = o || Nt(t || "*", s.nodeType?[s]:s, []), m = !e || !o && t?g:xt(g, f, e, s, l), y = n?i || (o?e:h || r)?[]:a:m; if (n && n(m, y, s, l), r){u = xt(y, d), r(u, [], s, l), c = u.length; while (c--)(p = u[c]) && (y[d[c]] = !(m[d[c]] = p))}if (o){if (i || e){if (i){u = [], c = y.length; while (c--)(p = y[c]) && u.push(m[c] = p); i(null, y = [], u, l)}c = y.length; while (c--)(p = y[c]) && (u = i?F.call(o, p):f[c]) > - 1 && (o[u] = !(a[u] = p))}} else y = xt(y === a?y.splice(h, y.length):y), i?i(null, a, y, l):M.apply(a, y)})}function Tt(e){var t, n, r, i = e.length, a = o.relative[e[0].type], s = a || o.relative[" "], l = a?1:0, c = vt(function(e){return e === t}, s, !0), p = vt(function(e){return F.call(t, e) > - 1}, s, !0), f = [function(e, n, r){return!a && (r || n !== u) || ((t = n).nodeType?c(e, n, r):p(e, n, r))}]; for (; i > l; l++)if (n = o.relative[e[l].type])f = [vt(bt(f), n)]; else{if (n = o.filter[e[l].type].apply(null, e[l].matches), n[b]){for (r = ++l; i > r; r++)if (o.relative[e[r].type])break; return wt(l > 1 && bt(f), l > 1 && yt(e.slice(0, l - 1).concat({value:" " === e[l - 2].type?"*":""})).replace(z, "$1"), n, r > l && Tt(e.slice(l, r)), i > r && Tt(e = e.slice(r)), i > r && yt(e))}f.push(n)}return bt(f)}function Ct(e, t){var n = 0, r = t.length > 0, a = e.length > 0, s = function(s, l, c, p, d){var h, g, m, y = [], v = 0, b = "0", x = s && [], w = null != d, C = u, N = s || a && o.find.TAG("*", d && l.parentNode || l), k = T += null == C?1:Math.random() || .1; for (w && (u = l !== f && l, i = n); null != (h = N[b]); b++){if (a && h){g = 0; while (m = e[g++])if (m(h, l, c)){p.push(h); break}w && (T = k, i = ++n)}r && ((h = !m && h) && v--, s && x.push(h))}if (v += b, r && b !== v){g = 0; while (m = t[g++])m(x, y, l, c); if (s){if (v > 0)while (b--)x[b] || y[b] || (y[b] = q.call(p)); y = xt(y)}M.apply(p, y), w && !s && y.length > 0 && v + t.length > 1 && at.uniqueSort(p)}return w && (T = k, u = C), x}; return r?lt(s):s}l = at.compile = function(e, t){var n, r = [], i = [], o = E[e + " "]; if (!o){t || (t = mt(e)), n = t.length; while (n--)o = Tt(t[n]), o[b]?r.push(o):i.push(o); o = E(e, Ct(i, r))}return o}; function Nt(e, t, n){var r = 0, i = t.length; for (; i > r; r++)at(e, t[r], n); return n}function kt(e, t, n, i){var a, s, u, c, p, f = mt(e); if (!i && 1 === f.length){if (s = f[0] = f[0].slice(0), s.length > 2 && "ID" === (u = s[0]).type && r.getById && 9 === t.nodeType && h && o.relative[s[1].type]){if (t = (o.find.ID(u.matches[0].replace(rt, it), t) || [])[0], !t)return n; e = e.slice(s.shift().value.length)}a = Q.needsContext.test(e)?0:s.length; while (a--){if (u = s[a], o.relative[c = u.type])break; if ((p = o.find[c]) && (i = p(u.matches[0].replace(rt, it), V.test(s[0].type) && t.parentNode || t))){if (s.splice(a, 1), e = i.length && yt(s), !e)return M.apply(n, i), n; break}}}return l(e, f)(i, t, !h, n, V.test(e)), n}r.sortStable = b.split("").sort(A).join("") === b, r.detectDuplicates = S, p(), r.sortDetached = ut(function(e){return 1 & e.compareDocumentPosition(f.createElement("div"))}), ut(function(e){return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")}) || ct("type|href|height|width", function(e, n, r){return r?t:e.getAttribute(n, "type" === n.toLowerCase()?1:2)}), r.attributes && ut(function(e){return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")}) || ct("value", function(e, n, r){return r || "input" !== e.nodeName.toLowerCase()?t:e.defaultValue}), ut(function(e){return null == e.getAttribute("disabled")}) || ct(B, function(e, n, r){var i; return r?t:(i = e.getAttributeNode(n)) && i.specified?i.value:e[n] === !0?n.toLowerCase():null}), x.find = at, x.expr = at.selectors, x.expr[":"] = x.expr.pseudos, x.unique = at.uniqueSort, x.text = at.getText, x.isXMLDoc = at.isXML, x.contains = at.contains}(e); var O = {}; function F(e){var t = O[e] = {}; return x.each(e.match(T) || [], function(e, n){t[n] = !0}), t}x.Callbacks = function(e){e = "string" == typeof e?O[e] || F(e):x.extend({}, e); var n, r, i, o, a, s, l = [], u = !e.once && [], c = function(t){for (r = e.memory && t, i = !0, a = s || 0, s = 0, o = l.length, n = !0; l && o > a; a++)if (l[a].apply(t[0], t[1]) === !1 && e.stopOnFalse){r = !1; break}n = !1, l && (u?u.length && c(u.shift()):r?l = []:p.disable())}, p = {add:function(){if (l){var t = l.length; (function i(t){x.each(t, function(t, n){var r = x.type(n); "function" === r?e.unique && p.has(n) || l.push(n):n && n.length && "string" !== r && i(n)})})(arguments), n?o = l.length:r && (s = t, c(r))}return this}, remove:function(){return l && x.each(arguments, function(e, t){var r; while ((r = x.inArray(t, l, r)) > - 1)l.splice(r, 1), n && (o >= r && o--, a >= r && a--)}), this}, has:function(e){return e?x.inArray(e, l) > - 1:!(!l || !l.length)}, empty:function(){return l = [], o = 0, this}, disable:function(){return l = u = r = t, this}, disabled:function(){return!l}, lock:function(){return u = t, r || p.disable(), this}, locked:function(){return!u}, fireWith:function(e, t){return!l || i && !u || (t = t || [], t = [e, t.slice?t.slice():t], n?u.push(t):c(t)), this}, fire:function(){return p.fireWith(this, arguments), this}, fired:function(){return!!i}}; return p}, x.extend({Deferred:function(e){var t = [["resolve", "done", x.Callbacks("once memory"), "resolved"], ["reject", "fail", x.Callbacks("once memory"), "rejected"], ["notify", "progress", x.Callbacks("memory")]], n = "pending", r = {state:function(){return n}, always:function(){return i.done(arguments).fail(arguments), this}, then:function(){var e = arguments; return x.Deferred(function(n){x.each(t, function(t, o){var a = o[0], s = x.isFunction(e[t]) && e[t]; i[o[1]](function(){var e = s && s.apply(this, arguments); e && x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a + "With"](this === r?n.promise():this, s?[e]:arguments)})}), e = null}).promise()}, promise:function(e){return null != e?x.extend(e, r):r}}, i = {}; return r.pipe = r.then, x.each(t, function(e, o){var a = o[2], s = o[3]; r[o[1]] = a.add, s && a.add(function(){n = s}, t[1 ^ e][2].disable, t[2][2].lock), i[o[0]] = function(){return i[o[0] + "With"](this === i?r:this, arguments), this}, i[o[0] + "With"] = a.fireWith}), r.promise(i), e && e.call(i, i), i}, when:function(e){var t = 0, n = g.call(arguments), r = n.length, i = 1 !== r || e && x.isFunction(e.promise)?r:0, o = 1 === i?e:x.Deferred(), a = function(e, t, n){return function(r){t[e] = this, n[e] = arguments.length > 1?g.call(arguments):r, n === s?o.notifyWith(t, n):--i || o.resolveWith(t, n)}}, s, l, u; if (r > 1)for (s = Array(r), l = Array(r), u = Array(r); r > t; t++)n[t] && x.isFunction(n[t].promise)?n[t].promise().done(a(t, u, n)).fail(o.reject).progress(a(t, l, s)):--i; return i || o.resolveWith(u, n), o.promise()}}), x.support = function(t){var n, r, o, s, l, u, c, p, f, d = a.createElement("div"); if (d.setAttribute("className", "t"), d.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", n = d.getElementsByTagName("*") || [], r = d.getElementsByTagName("a")[0], !r || !r.style || !n.length)return t; s = a.createElement("select"), u = s.appendChild(a.createElement("option")), o = d.getElementsByTagName("input")[0], r.style.cssText = "top:1px;float:left;opacity:.5", t.getSetAttribute = "t" !== d.className, t.leadingWhitespace = 3 === d.firstChild.nodeType, t.tbody = !d.getElementsByTagName("tbody").length, t.htmlSerialize = !!d.getElementsByTagName("link").length, t.style = /top/.test(r.getAttribute("style")), t.hrefNormalized = "/a" === r.getAttribute("href"), t.opacity = /^0.5/.test(r.style.opacity), t.cssFloat = !!r.style.cssFloat, t.checkOn = !!o.value, t.optSelected = u.selected, t.enctype = !!a.createElement("form").enctype, t.html5Clone = "<:nav></:nav>" !== a.createElement("nav").cloneNode(!0).outerHTML, t.inlineBlockNeedsLayout = !1, t.shrinkWrapBlocks = !1, t.pixelPosition = !1, t.deleteExpando = !0, t.noCloneEvent = !0, t.reliableMarginRight = !0, t.boxSizingReliable = !0, o.checked = !0, t.noCloneChecked = o.cloneNode(!0).checked, s.disabled = !0, t.optDisabled = !u.disabled; try{delete d.test} catch (h){t.deleteExpando = !1}o = a.createElement("input"), o.setAttribute("value", ""), t.input = "" === o.getAttribute("value"), o.value = "t", o.setAttribute("type", "radio"), t.radioValue = "t" === o.value, o.setAttribute("checked", "t"), o.setAttribute("name", "t"), l = a.createDocumentFragment(), l.appendChild(o), t.appendChecked = o.checked, t.checkClone = l.cloneNode(!0).cloneNode(!0).lastChild.checked, d.attachEvent && (d.attachEvent("onclick", function(){t.noCloneEvent = !1}), d.cloneNode(!0).click()); for (f in{submit:!0, change:!0, focusin:!0})d.setAttribute(c = "on" + f, "t"), t[f + "Bubbles"] = c in e || d.attributes[c].expando === !1; d.style.backgroundClip = "content-box", d.cloneNode(!0).style.backgroundClip = "", t.clearCloneStyle = "content-box" === d.style.backgroundClip; for (f in x(t))break; return t.ownLast = "0" !== f, x(function(){var n, r, o, s = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", l = a.getElementsByTagName("body")[0]; l && (n = a.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", l.appendChild(n).appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", o = d.getElementsByTagName("td"), o[0].style.cssText = "padding:0;margin:0;border:0;display:none", p = 0 === o[0].offsetHeight, o[0].style.display = "", o[1].style.display = "none", t.reliableHiddenOffsets = p && 0 === o[0].offsetHeight, d.innerHTML = "", d.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", x.swap(l, null != l.style.zoom?{zoom:1}:{}, function(){t.boxSizing = 4 === d.offsetWidth}), e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(d, null) || {}).top, t.boxSizingReliable = "4px" === (e.getComputedStyle(d, null) || {width:"4px"}).width, r = d.appendChild(a.createElement("div")), r.style.cssText = d.style.cssText = s, r.style.marginRight = r.style.width = "0", d.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(r, null) || {}).marginRight)), typeof d.style.zoom !== i && (d.innerHTML = "", d.style.cssText = s + "width:1px;padding:1px;display:inline;zoom:1", t.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.innerHTML = "<div></div>", d.firstChild.style.width = "5px", t.shrinkWrapBlocks = 3 !== d.offsetWidth, t.inlineBlockNeedsLayout && (l.style.zoom = 1)), l.removeChild(n), n = d = o = r = null)}), n = s = l = u = r = o = null, t
}({}); var B = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, P = /([A-Z])/g; function R(e, n, r, i){if (x.acceptData(e)){var o, a, s = x.expando, l = e.nodeType, u = l?x.cache:e, c = l?e[s]:e[s] && s; if (c && u[c] && (i || u[c].data) || r !== t || "string" != typeof n)return c || (c = l?e[s] = p.pop() || x.guid++:s), u[c] || (u[c] = l?{}:{toJSON:x.noop}), ("object" == typeof n || "function" == typeof n) && (i?u[c] = x.extend(u[c], n):u[c].data = x.extend(u[c].data, n)), a = u[c], i || (a.data || (a.data = {}), a = a.data), r !== t && (a[x.camelCase(n)] = r), "string" == typeof n?(o = a[n], null == o && (o = a[x.camelCase(n)])):o = a, o}}function W(e, t, n){if (x.acceptData(e)){var r, i, o = e.nodeType, a = o?x.cache:e, s = o?e[x.expando]:x.expando; if (a[s]){if (t && (r = n?a[s]:a[s].data)){x.isArray(t)?t = t.concat(x.map(t, x.camelCase)):t in r?t = [t]:(t = x.camelCase(t), t = t in r?[t]:t.split(" ")), i = t.length; while (i--)delete r[t[i]]; if (n?!I(r):!x.isEmptyObject(r))return}(n || (delete a[s].data, I(a[s]))) && (o?x.cleanData([e], !0):x.support.deleteExpando || a != a.window?delete a[s]:a[s] = null)}}}x.extend({cache:{}, noData:{applet:!0, embed:!0, object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"}, hasData:function(e){return e = e.nodeType?x.cache[e[x.expando]]:e[x.expando], !!e && !I(e)}, data:function(e, t, n){return R(e, t, n)}, removeData:function(e, t){return W(e, t)}, _data:function(e, t, n){return R(e, t, n, !0)}, _removeData:function(e, t){return W(e, t, !0)}, acceptData:function(e){if (e.nodeType && 1 !== e.nodeType && 9 !== e.nodeType)return!1; var t = e.nodeName && x.noData[e.nodeName.toLowerCase()]; return!t || t !== !0 && e.getAttribute("classid") === t}}), x.fn.extend({data:function(e, n){var r, i, o = null, a = 0, s = this[0]; if (e === t){if (this.length && (o = x.data(s), 1 === s.nodeType && !x._data(s, "parsedAttrs"))){for (r = s.attributes; r.length > a; a++)i = r[a].name, 0 === i.indexOf("data-") && (i = x.camelCase(i.slice(5)), $(s, i, o[i])); x._data(s, "parsedAttrs", !0)}return o}return"object" == typeof e?this.each(function(){x.data(this, e)}):arguments.length > 1?this.each(function(){x.data(this, e, n)}):s?$(s, e, x.data(s, e)):null}, removeData:function(e){return this.each(function(){x.removeData(this, e)})}}); function $(e, n, r){if (r === t && 1 === e.nodeType){var i = "data-" + n.replace(P, "-$1").toLowerCase(); if (r = e.getAttribute(i), "string" == typeof r){try{r = "true" === r?!0:"false" === r?!1:"null" === r?null: + r + "" === r? + r:B.test(r)?x.parseJSON(r):r} catch (o){}x.data(e, n, r)} else r = t}return r}function I(e){var t; for (t in e)if (("data" !== t || !x.isEmptyObject(e[t])) && "toJSON" !== t)return!1; return!0}x.extend({queue:function(e, n, r){var i; return e?(n = (n || "fx") + "queue", i = x._data(e, n), r && (!i || x.isArray(r)?i = x._data(e, n, x.makeArray(r)):i.push(r)), i || []):t}, dequeue:function(e, t){t = t || "fx"; var n = x.queue(e, t), r = n.length, i = n.shift(), o = x._queueHooks(e, t), a = function(){x.dequeue(e, t)}; "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, a, o)), !r && o && o.empty.fire()}, _queueHooks:function(e, t){var n = t + "queueHooks"; return x._data(e, n) || x._data(e, n, {empty:x.Callbacks("once memory").add(function(){x._removeData(e, t + "queue"), x._removeData(e, n)})})}}), x.fn.extend({queue:function(e, n){var r = 2; return"string" != typeof e && (n = e, e = "fx", r--), r > arguments.length?x.queue(this[0], e):n === t?this:this.each(function(){var t = x.queue(this, e, n); x._queueHooks(this, e), "fx" === e && "inprogress" !== t[0] && x.dequeue(this, e)})}, dequeue:function(e){return this.each(function(){x.dequeue(this, e)})}, delay:function(e, t){return e = x.fx?x.fx.speeds[e] || e:e, t = t || "fx", this.queue(t, function(t, n){var r = setTimeout(t, e); n.stop = function(){clearTimeout(r)}})}, clearQueue:function(e){return this.queue(e || "fx", [])}, promise:function(e, n){var r, i = 1, o = x.Deferred(), a = this, s = this.length, l = function(){--i || o.resolveWith(a, [a])}; "string" != typeof e && (n = e, e = t), e = e || "fx"; while (s--)r = x._data(a[s], e + "queueHooks"), r && r.empty && (i++, r.empty.add(l)); return l(), o.promise(n)}}); var z, X, U = /[\t\r\n\f]/g, V = /\r/g, Y = /^(?:input|select|textarea|button|object)$/i, J = /^(?:a|area)$/i, G = /^(?:checked|selected)$/i, Q = x.support.getSetAttribute, K = x.support.input; x.fn.extend({attr:function(e, t){return x.access(this, x.attr, e, t, arguments.length > 1)}, removeAttr:function(e){return this.each(function(){x.removeAttr(this, e)})}, prop:function(e, t){return x.access(this, x.prop, e, t, arguments.length > 1)}, removeProp:function(e){return e = x.propFix[e] || e, this.each(function(){try{this[e] = t, delete this[e]} catch (n){}})}, addClass:function(e){var t, n, r, i, o, a = 0, s = this.length, l = "string" == typeof e && e; if (x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this, t, this.className))}); if (l)for (t = (e || "").match(T) || []; s > a; a++)if (n = this[a], r = 1 === n.nodeType && (n.className?(" " + n.className + " ").replace(U, " "):" ")){o = 0; while (i = t[o++])0 > r.indexOf(" " + i + " ") && (r += i + " "); n.className = x.trim(r)}return this}, removeClass:function(e){var t, n, r, i, o, a = 0, s = this.length, l = 0 === arguments.length || "string" == typeof e && e; if (x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this, t, this.className))}); if (l)for (t = (e || "").match(T) || []; s > a; a++)if (n = this[a], r = 1 === n.nodeType && (n.className?(" " + n.className + " ").replace(U, " "):"")){o = 0; while (i = t[o++])while (r.indexOf(" " + i + " ") >= 0)r = r.replace(" " + i + " ", " "); n.className = e?x.trim(r):""}return this}, toggleClass:function(e, t){var n = typeof e; return"boolean" == typeof t && "string" === n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this, n, this.className, t), t)}):this.each(function(){if ("string" === n){var t, r = 0, o = x(this), a = e.match(T) || []; while (t = a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)} else(n === i || "boolean" === n) && (this.className && x._data(this, "__className__", this.className), this.className = this.className || e === !1?"":x._data(this, "__className__") || "")})}, hasClass:function(e){var t = " " + e + " ", n = 0, r = this.length; for (; r > n; n++)if (1 === this[n].nodeType && (" " + this[n].className + " ").replace(U, " ").indexOf(t) >= 0)return!0; return!1}, val:function(e){var n, r, i, o = this[0]; {if (arguments.length)return i = x.isFunction(e), this.each(function(n){var o; 1 === this.nodeType && (o = i?e.call(this, n, x(this).val()):e, null == o?o = "":"number" == typeof o?o += "":x.isArray(o) && (o = x.map(o, function(e){return null == e?"":e + ""})), r = x.valHooks[this.type] || x.valHooks[this.nodeName.toLowerCase()], r && "set"in r && r.set(this, o, "value") !== t || (this.value = o))}); if (o)return r = x.valHooks[o.type] || x.valHooks[o.nodeName.toLowerCase()], r && "get"in r && (n = r.get(o, "value")) !== t?n:(n = o.value, "string" == typeof n?n.replace(V, ""):null == n?"":n)}}}), x.extend({valHooks:{option:{get:function(e){var t = x.find.attr(e, "value"); return null != t?t:e.text}}, select:{get:function(e){var t, n, r = e.options, i = e.selectedIndex, o = "select-one" === e.type || 0 > i, a = o?null:[], s = o?i + 1:r.length, l = 0 > i?s:o?i:0; for (; s > l; l++)if (n = r[l], !(!n.selected && l !== i || (x.support.optDisabled?n.disabled:null !== n.getAttribute("disabled")) || n.parentNode.disabled && x.nodeName(n.parentNode, "optgroup"))){if (t = x(n).val(), o)return t; a.push(t)}return a}, set:function(e, t){var n, r, i = e.options, o = x.makeArray(t), a = i.length; while (a--)r = i[a], (r.selected = x.inArray(x(r).val(), o) >= 0) && (n = !0); return n || (e.selectedIndex = - 1), o}}}, attr:function(e, n, r){var o, a, s = e.nodeType; if (e && 3 !== s && 8 !== s && 2 !== s)return typeof e.getAttribute === i?x.prop(e, n, r):(1 === s && x.isXMLDoc(e) || (n = n.toLowerCase(), o = x.attrHooks[n] || (x.expr.match.bool.test(n)?X:z)), r === t?o && "get"in o && null !== (a = o.get(e, n))?a:(a = x.find.attr(e, n), null == a?t:a):null !== r?o && "set"in o && (a = o.set(e, r, n)) !== t?a:(e.setAttribute(n, r + ""), r):(x.removeAttr(e, n), t))}, removeAttr:function(e, t){var n, r, i = 0, o = t && t.match(T); if (o && 1 === e.nodeType)while (n = o[i++])r = x.propFix[n] || n, x.expr.match.bool.test(n)?K && Q || !G.test(n)?e[r] = !1:e[x.camelCase("default-" + n)] = e[r] = !1:x.attr(e, n, ""), e.removeAttribute(Q?n:r)}, attrHooks:{type:{set:function(e, t){if (!x.support.radioValue && "radio" === t && x.nodeName(e, "input")){var n = e.value; return e.setAttribute("type", t), n && (e.value = n), t}}}}, propFix:{"for":"htmlFor", "class":"className"}, prop:function(e, n, r){var i, o, a, s = e.nodeType; if (e && 3 !== s && 8 !== s && 2 !== s)return a = 1 !== s || !x.isXMLDoc(e), a && (n = x.propFix[n] || n, o = x.propHooks[n]), r !== t?o && "set"in o && (i = o.set(e, r, n)) !== t?i:e[n] = r:o && "get"in o && null !== (i = o.get(e, n))?i:e[n]}, propHooks:{tabIndex:{get:function(e){var t = x.find.attr(e, "tabindex"); return t?parseInt(t, 10):Y.test(e.nodeName) || J.test(e.nodeName) && e.href?0: - 1}}}}), X = {set:function(e, t, n){return t === !1?x.removeAttr(e, n):K && Q || !G.test(n)?e.setAttribute(!Q && x.propFix[n] || n, n):e[x.camelCase("default-" + n)] = e[n] = !0, n}}, x.each(x.expr.match.bool.source.match(/\w+/g), function(e, n){var r = x.expr.attrHandle[n] || x.find.attr; x.expr.attrHandle[n] = K && Q || !G.test(n)?function(e, n, i){var o = x.expr.attrHandle[n], a = i?t:(x.expr.attrHandle[n] = t) != r(e, n, i)?n.toLowerCase():null; return x.expr.attrHandle[n] = o, a}:function(e, n, r){return r?t:e[x.camelCase("default-" + n)]?n.toLowerCase():null}}), K && Q || (x.attrHooks.value = {set:function(e, n, r){return x.nodeName(e, "input")?(e.defaultValue = n, t):z && z.set(e, n, r)}}), Q || (z = {set:function(e, n, r){var i = e.getAttributeNode(r); return i || e.setAttributeNode(i = e.ownerDocument.createAttribute(r)), i.value = n += "", "value" === r || n === e.getAttribute(r)?n:t}}, x.expr.attrHandle.id = x.expr.attrHandle.name = x.expr.attrHandle.coords = function(e, n, r){var i; return r?t:(i = e.getAttributeNode(n)) && "" !== i.value?i.value:null}, x.valHooks.button = {get:function(e, n){var r = e.getAttributeNode(n); return r && r.specified?r.value:t}, set:z.set}, x.attrHooks.contenteditable = {set:function(e, t, n){z.set(e, "" === t?!1:t, n)}}, x.each(["width", "height"], function(e, n){x.attrHooks[n] = {set:function(e, r){return"" === r?(e.setAttribute(n, "auto"), r):t}}})), x.support.hrefNormalized || x.each(["href", "src"], function(e, t){x.propHooks[t] = {get:function(e){return e.getAttribute(t, 4)}}}), x.support.style || (x.attrHooks.style = {get:function(e){return e.style.cssText || t}, set:function(e, t){return e.style.cssText = t + ""}}), x.support.optSelected || (x.propHooks.selected = {get:function(e){var t = e.parentNode; return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null}}), x.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function(){x.propFix[this.toLowerCase()] = this}), x.support.enctype || (x.propFix.enctype = "encoding"), x.each(["radio", "checkbox"], function(){x.valHooks[this] = {set:function(e, n){return x.isArray(n)?e.checked = x.inArray(x(e).val(), n) >= 0:t}}, x.support.checkOn || (x.valHooks[this].get = function(e){return null === e.getAttribute("value")?"on":e.value})}); var Z = /^(?:input|select|textarea)$/i, et = /^key/, tt = /^(?:mouse|contextmenu)|click/, nt = /^(?:focusinfocus|focusoutblur)$/, rt = /^([^.]*)(?:\.(.+)|)$/; function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement} catch (e){}}x.event = {global:{}, add:function(e, n, r, o, a){var s, l, u, c, p, f, d, h, g, m, y, v = x._data(e); if (v){r.handler && (c = r, r = c.handler, a = c.selector), r.guid || (r.guid = x.guid++), (l = v.events) || (l = v.events = {}), (f = v.handle) || (f = v.handle = function(e){return typeof x === i || e && x.event.triggered === e.type?t:x.event.dispatch.apply(f.elem, arguments)}, f.elem = e), n = (n || "").match(T) || [""], u = n.length; while (u--)s = rt.exec(n[u]) || [], g = y = s[1], m = (s[2] || "").split(".").sort(), g && (p = x.event.special[g] || {}, g = (a?p.delegateType:p.bindType) || g, p = x.event.special[g] || {}, d = x.extend({type:g, origType:y, data:o, handler:r, guid:r.guid, selector:a, needsContext:a && x.expr.match.needsContext.test(a), namespace:m.join(".")}, c), (h = l[g]) || (h = l[g] = [], h.delegateCount = 0, p.setup && p.setup.call(e, o, m, f) !== !1 || (e.addEventListener?e.addEventListener(g, f, !1):e.attachEvent && e.attachEvent("on" + g, f))), p.add && (p.add.call(e, d), d.handler.guid || (d.handler.guid = r.guid)), a?h.splice(h.delegateCount++, 0, d):h.push(d), x.event.global[g] = !0); e = null}}, remove:function(e, t, n, r, i){var o, a, s, l, u, c, p, f, d, h, g, m = x.hasData(e) && x._data(e); if (m && (c = m.events)){t = (t || "").match(T) || [""], u = t.length; while (u--)if (s = rt.exec(t[u]) || [], d = g = s[1], h = (s[2] || "").split(".").sort(), d){p = x.event.special[d] || {}, d = (r?p.delegateType:p.bindType) || d, f = c[d] || [], s = s[2] && RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), l = o = f.length; while (o--)a = f[o], !i && g !== a.origType || n && n.guid !== a.guid || s && !s.test(a.namespace) || r && r !== a.selector && ("**" !== r || !a.selector) || (f.splice(o, 1), a.selector && f.delegateCount--, p.remove && p.remove.call(e, a)); l && !f.length && (p.teardown && p.teardown.call(e, h, m.handle) !== !1 || x.removeEvent(e, d, m.handle), delete c[d])} else for (d in c)x.event.remove(e, d + t[u], n, r, !0); x.isEmptyObject(c) && (delete m.handle, x._removeData(e, "events"))}}, trigger:function(n, r, i, o){var s, l, u, c, p, f, d, h = [i || a], g = v.call(n, "type")?n.type:n, m = v.call(n, "namespace")?n.namespace.split("."):[]; if (u = f = i = i || a, 3 !== i.nodeType && 8 !== i.nodeType && !nt.test(g + x.event.triggered) && (g.indexOf(".") >= 0 && (m = g.split("."), g = m.shift(), m.sort()), l = 0 > g.indexOf(":") && "on" + g, n = n[x.expando]?n:new x.Event(g, "object" == typeof n && n), n.isTrigger = o?2:3, n.namespace = m.join("."), n.namespace_re = n.namespace?RegExp("(^|\\.)" + m.join("\\.(?:.*\\.|)") + "(\\.|$)"):null, n.result = t, n.target || (n.target = i), r = null == r?[n]:x.makeArray(r, [n]), p = x.event.special[g] || {}, o || !p.trigger || p.trigger.apply(i, r) !== !1)){if (!o && !p.noBubble && !x.isWindow(i)){for (c = p.delegateType || g, nt.test(c + g) || (u = u.parentNode); u; u = u.parentNode)h.push(u), f = u; f === (i.ownerDocument || a) && h.push(f.defaultView || f.parentWindow || e)}d = 0; while ((u = h[d++]) && !n.isPropagationStopped())n.type = d > 1?c:p.bindType || g, s = (x._data(u, "events") || {})[n.type] && x._data(u, "handle"), s && s.apply(u, r), s = l && u[l], s && x.acceptData(u) && s.apply && s.apply(u, r) === !1 && n.preventDefault(); if (n.type = g, !o && !n.isDefaultPrevented() && (!p._default || p._default.apply(h.pop(), r) === !1) && x.acceptData(i) && l && i[g] && !x.isWindow(i)){f = i[l], f && (i[l] = null), x.event.triggered = g; try{i[g]()} catch (y){}x.event.triggered = t, f && (i[l] = f)}return n.result}}, dispatch:function(e){e = x.event.fix(e); var n, r, i, o, a, s = [], l = g.call(arguments), u = (x._data(this, "events") || {})[e.type] || [], c = x.event.special[e.type] || {}; if (l[0] = e, e.delegateTarget = this, !c.preDispatch || c.preDispatch.call(this, e) !== !1){s = x.event.handlers.call(this, e, u), n = 0; while ((o = s[n++]) && !e.isPropagationStopped()){e.currentTarget = o.elem, a = 0; while ((i = o.handlers[a++]) && !e.isImmediatePropagationStopped())(!e.namespace_re || e.namespace_re.test(i.namespace)) && (e.handleObj = i, e.data = i.data, r = ((x.event.special[i.origType] || {}).handle || i.handler).apply(o.elem, l), r !== t && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation()))}return c.postDispatch && c.postDispatch.call(this, e), e.result}}, handlers:function(e, n){var r, i, o, a, s = [], l = n.delegateCount, u = e.target; if (l && u.nodeType && (!e.button || "click" !== e.type))for (; u != this; u = u.parentNode || this)if (1 === u.nodeType && (u.disabled !== !0 || "click" !== e.type)){for (o = [], a = 0; l > a; a++)i = n[a], r = i.selector + " ", o[r] === t && (o[r] = i.needsContext?x(r, this).index(u) >= 0:x.find(r, this, null, [u]).length), o[r] && o.push(i); o.length && s.push({elem:u, handlers:o})}return n.length > l && s.push({elem:this, handlers:n.slice(l)}), s}, fix:function(e){if (e[x.expando])return e; var t, n, r, i = e.type, o = e, s = this.fixHooks[i]; s || (this.fixHooks[i] = s = tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}), r = s.props?this.props.concat(s.props):this.props, e = new x.Event(o), t = r.length; while (t--)n = r[t], e[n] = o[n]; return e.target || (e.target = o.srcElement || a), 3 === e.target.nodeType && (e.target = e.target.parentNode), e.metaKey = !!e.metaKey, s.filter?s.filter(e, o):e}, props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks:{}, keyHooks:{props:"char charCode key keyCode".split(" "), filter:function(e, t){return null == e.which && (e.which = null != t.charCode?t.charCode:t.keyCode), e}}, mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter:function(e, n){var r, i, o, s = n.button, l = n.fromElement; return null == e.pageX && null != n.clientX && (i = e.target.ownerDocument || a, o = i.documentElement, r = i.body, e.pageX = n.clientX + (o && o.scrollLeft || r && r.scrollLeft || 0) - (o && o.clientLeft || r && r.clientLeft || 0), e.pageY = n.clientY + (o && o.scrollTop || r && r.scrollTop || 0) - (o && o.clientTop || r && r.clientTop || 0)), !e.relatedTarget && l && (e.relatedTarget = l === e.target?n.toElement:l), e.which || s === t || (e.which = 1 & s?1:2 & s?3:4 & s?2:0), e}}, special:{load:{noBubble:!0}, focus:{trigger:function(){if (this !== at() && this.focus)try{return this.focus(), !1} catch (e){}}, delegateType:"focusin"}, blur:{trigger:function(){return this === at() && this.blur?(this.blur(), !1):t}, delegateType:"focusout"}, click:{trigger:function(){return x.nodeName(this, "input") && "checkbox" === this.type && this.click?(this.click(), !1):t}, _default:function(e){return x.nodeName(e.target, "a")}}, beforeunload:{postDispatch:function(e){e.result !== t && (e.originalEvent.returnValue = e.result)}}}, simulate:function(e, t, n, r){var i = x.extend(new x.Event, n, {type:e, isSimulated:!0, originalEvent:{}}); r?x.event.trigger(i, null, t):x.event.dispatch.call(t, i), i.isDefaultPrevented() && n.preventDefault()}}, x.removeEvent = a.removeEventListener?function(e, t, n){e.removeEventListener && e.removeEventListener(t, n, !1)}:function(e, t, n){var r = "on" + t; e.detachEvent && (typeof e[r] === i && (e[r] = null), e.detachEvent(r, n))}, x.Event = function(e, n){return this instanceof x.Event?(e && e.type?(this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault()?it:ot):this.type = e, n && x.extend(this, n), this.timeStamp = e && e.timeStamp || x.now(), this[x.expando] = !0, t):new x.Event(e, n)}, x.Event.prototype = {isDefaultPrevented:ot, isPropagationStopped:ot, isImmediatePropagationStopped:ot, preventDefault:function(){var e = this.originalEvent; this.isDefaultPrevented = it, e && (e.preventDefault?e.preventDefault():e.returnValue = !1)}, stopPropagation:function(){var e = this.originalEvent; this.isPropagationStopped = it, e && (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)}, stopImmediatePropagation:function(){this.isImmediatePropagationStopped = it, this.stopPropagation()}}, x.each({mouseenter:"mouseover", mouseleave:"mouseout"}, function(e, t){x.event.special[e] = {delegateType:t, bindType:t, handle:function(e){var n, r = this, i = e.relatedTarget, o = e.handleObj; return(!i || i !== r && !x.contains(r, i)) && (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n}}}), x.support.submitBubbles || (x.event.special.submit = {setup:function(){return x.nodeName(this, "form")?!1:(x.event.add(this, "click._submit keypress._submit", function(e){var n = e.target, r = x.nodeName(n, "input") || x.nodeName(n, "button")?n.form:t; r && !x._data(r, "submitBubbles") && (x.event.add(r, "submit._submit", function(e){e._submit_bubble = !0}), x._data(r, "submitBubbles", !0))}), t)}, postDispatch:function(e){e._submit_bubble && (delete e._submit_bubble, this.parentNode && !e.isTrigger && x.event.simulate("submit", this.parentNode, e, !0))}, teardown:function(){return x.nodeName(this, "form")?!1:(x.event.remove(this, "._submit"), t)}}), x.support.changeBubbles || (x.event.special.change = {setup:function(){return Z.test(this.nodeName)?(("checkbox" === this.type || "radio" === this.type) && (x.event.add(this, "propertychange._change", function(e){"checked" === e.originalEvent.propertyName && (this._just_changed = !0)}), x.event.add(this, "click._change", function(e){this._just_changed && !e.isTrigger && (this._just_changed = !1), x.event.simulate("change", this, e, !0)})), !1):(x.event.add(this, "beforeactivate._change", function(e){var t = e.target; Z.test(t.nodeName) && !x._data(t, "changeBubbles") && (x.event.add(t, "change._change", function(e){!this.parentNode || e.isSimulated || e.isTrigger || x.event.simulate("change", this.parentNode, e, !0)}), x._data(t, "changeBubbles", !0))}), t)}, handle:function(e){var n = e.target; return this !== n || e.isSimulated || e.isTrigger || "radio" !== n.type && "checkbox" !== n.type?e.handleObj.handler.apply(this, arguments):t}, teardown:function(){return x.event.remove(this, "._change"), !Z.test(this.nodeName)}}), x.support.focusinBubbles || x.each({focus:"focusin", blur:"focusout"}, function(e, t){var n = 0, r = function(e){x.event.simulate(t, e.target, x.event.fix(e), !0)}; x.event.special[t] = {setup:function(){0 === n++ && a.addEventListener(e, r, !0)}, teardown:function(){0 === --n && a.removeEventListener(e, r, !0)}}}), x.fn.extend({on:function(e, n, r, i, o){var a, s; if ("object" == typeof e){"string" != typeof n && (r = r || n, n = t); for (a in e)this.on(a, n, r, e[a], o); return this}if (null == r && null == i?(i = n, r = n = t):null == i && ("string" == typeof n?(i = r, r = t):(i = r, r = n, n = t)), i === !1)i = ot; else if (!i)return this; return 1 === o && (s = i, i = function(e){return x().off(e), s.apply(this, arguments)}, i.guid = s.guid || (s.guid = x.guid++)), this.each(function(){x.event.add(this, e, i, r, n)})}, one:function(e, t, n, r){return this.on(e, t, n, r, 1)}, off:function(e, n, r){var i, o; if (e && e.preventDefault && e.handleObj)return i = e.handleObj, x(e.delegateTarget).off(i.namespace?i.origType + "." + i.namespace:i.origType, i.selector, i.handler), this; if ("object" == typeof e){for (o in e)this.off(o, n, e[o]); return this}return(n === !1 || "function" == typeof n) && (r = n, n = t), r === !1 && (r = ot), this.each(function(){x.event.remove(this, e, r, n)})}, trigger:function(e, t){return this.each(function(){x.event.trigger(e, t, this)})}, triggerHandler:function(e, n){var r = this[0]; return r?x.event.trigger(e, n, r, !0):t}}); var st = /^.[^:#\[\.,]*$/, lt = /^(?:parents|prev(?:Until|All))/, ut = x.expr.match.needsContext, ct = {children:!0, contents:!0, next:!0, prev:!0}; x.fn.extend({find:function(e){var t, n = [], r = this, i = r.length; if ("string" != typeof e)return this.pushStack(x(e).filter(function(){for (t = 0; i > t; t++)if (x.contains(r[t], this))return!0})); for (t = 0; i > t; t++)x.find(e, r[t], n); return n = this.pushStack(i > 1?x.unique(n):n), n.selector = this.selector?this.selector + " " + e:e, n}, has:function(e){var t, n = x(e, this), r = n.length; return this.filter(function(){for (t = 0; r > t; t++)if (x.contains(this, n[t]))return!0})}, not:function(e){return this.pushStack(ft(this, e || [], !0))}, filter:function(e){return this.pushStack(ft(this, e || [], !1))}, is:function(e){return!!ft(this, "string" == typeof e && ut.test(e)?x(e):e || [], !1).length}, closest:function(e, t){var n, r = 0, i = this.length, o = [], a = ut.test(e) || "string" != typeof e?x(e, t || this.context):0; for (; i > r; r++)for (n = this[r]; n && n !== t; n = n.parentNode)if (11 > n.nodeType && (a?a.index(n) > - 1:1 === n.nodeType && x.find.matchesSelector(n, e))){n = o.push(n); break}return this.pushStack(o.length > 1?x.unique(o):o)}, index:function(e){return e?"string" == typeof e?x.inArray(this[0], x(e)):x.inArray(e.jquery?e[0]:e, this):this[0] && this[0].parentNode?this.first().prevAll().length: - 1}, add:function(e, t){var n = "string" == typeof e?x(e, t):x.makeArray(e && e.nodeType?[e]:e), r = x.merge(this.get(), n); return this.pushStack(x.unique(r))}, addBack:function(e){return this.add(null == e?this.prevObject:this.prevObject.filter(e))}}); function pt(e, t){do e = e[t]; while (e && 1 !== e.nodeType); return e}x.each({parent:function(e){var t = e.parentNode; return t && 11 !== t.nodeType?t:null}, parents:function(e){return x.dir(e, "parentNode")}, parentsUntil:function(e, t, n){return x.dir(e, "parentNode", n)}, next:function(e){return pt(e, "nextSibling")}, prev:function(e){return pt(e, "previousSibling")}, nextAll:function(e){return x.dir(e, "nextSibling")}, prevAll:function(e){return x.dir(e, "previousSibling")}, nextUntil:function(e, t, n){return x.dir(e, "nextSibling", n)}, prevUntil:function(e, t, n){return x.dir(e, "previousSibling", n)}, siblings:function(e){return x.sibling((e.parentNode || {}).firstChild, e)}, children:function(e){return x.sibling(e.firstChild)}, contents:function(e){return x.nodeName(e, "iframe")?e.contentDocument || e.contentWindow.document:x.merge([], e.childNodes)}}, function(e, t){x.fn[e] = function(n, r){var i = x.map(this, t, n); return"Until" !== e.slice( - 5) && (r = n), r && "string" == typeof r && (i = x.filter(r, i)), this.length > 1 && (ct[e] || (i = x.unique(i)), lt.test(e) && (i = i.reverse())), this.pushStack(i)}}), x.extend({filter:function(e, t, n){var r = t[0]; return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType?x.find.matchesSelector(r, e)?[r]:[]:x.find.matches(e, x.grep(t, function(e){return 1 === e.nodeType}))}, dir:function(e, n, r){var i = [], o = e[n]; while (o && 9 !== o.nodeType && (r === t || 1 !== o.nodeType || !x(o).is(r)))1 === o.nodeType && i.push(o), o = o[n]; return i}, sibling:function(e, t){var n = []; for (; e; e = e.nextSibling)1 === e.nodeType && e !== t && n.push(e); return n}}); function ft(e, t, n){if (x.isFunction(t))return x.grep(e, function(e, r){return!!t.call(e, r, e) !== n}); if (t.nodeType)return x.grep(e, function(e){return e === t !== n}); if ("string" == typeof t){if (st.test(t))return x.filter(t, e, n); t = x.filter(t, e)}return x.grep(e, function(e){return x.inArray(e, t) >= 0 !== n})}function dt(e){var t = ht.split("|"), n = e.createDocumentFragment(); if (n.createElement)while (t.length)n.createElement(t.pop()); return n}var ht = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", gt = / jQuery\d+="(?:null|\d+)"/g, mt = RegExp("<(?:" + ht + ")[\\s/>]", "i"), yt = /^\s+/, vt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, bt = /<([\w:]+)/, xt = /<tbody/i, wt = /<|&#?\w+;/, Tt = /<(?:script|style|link)/i, Ct = /^(?:checkbox|radio)$/i, Nt = /checked\s*(?:[^=]|=\s*.checked.)/i, kt = /^$|\/(?:java|ecma)script/i, Et = /^true\/(.*)/, St = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, At = {option:[1, "<select multiple='multiple'>", "</select>"], legend:[1, "<fieldset>", "</fieldset>"], area:[1, "<map>", "</map>"], param:[1, "<object>", "</object>"], thead:[1, "<table>", "</table>"], tr:[2, "<table><tbody>", "</tbody></table>"], col:[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], td:[3, "<table><tbody><tr>", "</tr></tbody></table>"], _default:x.support.htmlSerialize?[0, "", ""]:[1, "X<div>", "</div>"]}, jt = dt(a), Dt = jt.appendChild(a.createElement("div")); At.optgroup = At.option, At.tbody = At.tfoot = At.colgroup = At.caption = At.thead, At.th = At.td, x.fn.extend({text:function(e){return x.access(this, function(e){return e === t?x.text(this):this.empty().append((this[0] && this[0].ownerDocument || a).createTextNode(e))}, null, e, arguments.length)}, append:function(){return this.domManip(arguments, function(e){if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType){var t = Lt(this, e); t.appendChild(e)}})}, prepend:function(){return this.domManip(arguments, function(e){if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType){var t = Lt(this, e); t.insertBefore(e, t.firstChild)}})}, before:function(){return this.domManip(arguments, function(e){this.parentNode && this.parentNode.insertBefore(e, this)})}, after:function(){return this.domManip(arguments, function(e){this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)})}, remove:function(e, t){var n, r = e?x.filter(e, this):this, i = 0; for (; null != (n = r[i]); i++)t || 1 !== n.nodeType || x.cleanData(Ft(n)), n.parentNode && (t && x.contains(n.ownerDocument, n) && _t(Ft(n, "script")), n.parentNode.removeChild(n)); return this}, empty:function(){var e, t = 0; for (; null != (e = this[t]); t++){1 === e.nodeType && x.cleanData(Ft(e, !1)); while (e.firstChild)e.removeChild(e.firstChild); e.options && x.nodeName(e, "select") && (e.options.length = 0)}return this}, clone:function(e, t){return e = null == e?!1:e, t = null == t?e:t, this.map(function(){return x.clone(this, e, t)})}, html:function(e){return x.access(this, function(e){var n = this[0] || {}, r = 0, i = this.length; if (e === t)return 1 === n.nodeType?n.innerHTML.replace(gt, ""):t; if (!("string" != typeof e || Tt.test(e) || !x.support.htmlSerialize && mt.test(e) || !x.support.leadingWhitespace && yt.test(e) || At[(bt.exec(e) || ["", ""])[1].toLowerCase()])){e = e.replace(vt, "<$1></$2>"); try{for (; i > r; r++)n = this[r] || {}, 1 === n.nodeType && (x.cleanData(Ft(n, !1)), n.innerHTML = e); n = 0} catch (o){}}n && this.empty().append(e)}, null, e, arguments.length)}, replaceWith:function(){var e = x.map(this, function(e){return[e.nextSibling, e.parentNode]}), t = 0; return this.domManip(arguments, function(n){var r = e[t++], i = e[t++]; i && (r && r.parentNode !== i && (r = this.nextSibling), x(this).remove(), i.insertBefore(n, r))}, !0), t?this:this.remove()}, detach:function(e){return this.remove(e, !0)}, domManip:function(e, t, n){e = d.apply([], e); var r, i, o, a, s, l, u = 0, c = this.length, p = this, f = c - 1, h = e[0], g = x.isFunction(h); if (g || !(1 >= c || "string" != typeof h || x.support.checkClone) && Nt.test(h))return this.each(function(r){var i = p.eq(r); g && (e[0] = h.call(this, r, i.html())), i.domManip(e, t, n)}); if (c && (l = x.buildFragment(e, this[0].ownerDocument, !1, !n && this), r = l.firstChild, 1 === l.childNodes.length && (l = r), r)){for (a = x.map(Ft(l, "script"), Ht), o = a.length; c > u; u++)i = l, u !== f && (i = x.clone(i, !0, !0), o && x.merge(a, Ft(i, "script"))), t.call(this[u], i, u); if (o)for (s = a[a.length - 1].ownerDocument, x.map(a, qt), u = 0; o > u; u++)i = a[u], kt.test(i.type || "") && !x._data(i, "globalEval") && x.contains(s, i) && (i.src?x._evalUrl(i.src):x.globalEval((i.text || i.textContent || i.innerHTML || "").replace(St, ""))); l = r = null}return this}}); function Lt(e, t){return x.nodeName(e, "table") && x.nodeName(1 === t.nodeType?t:t.firstChild, "tr")?e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type = (null !== x.find.attr(e, "type")) + "/" + e.type, e}function qt(e){var t = Et.exec(e.type); return t?e.type = t[1]:e.removeAttribute("type"), e}function _t(e, t){var n, r = 0; for (; null != (n = e[r]); r++)x._data(n, "globalEval", !t || x._data(t[r], "globalEval"))}function Mt(e, t){if (1 === t.nodeType && x.hasData(e)){var n, r, i, o = x._data(e), a = x._data(t, o), s = o.events; if (s){delete a.handle, a.events = {}; for (n in s)for (r = 0, i = s[n].length; i > r; r++)x.event.add(t, n, s[n][r])}a.data && (a.data = x.extend({}, a.data))}}function Ot(e, t){var n, r, i; if (1 === t.nodeType){if (n = t.nodeName.toLowerCase(), !x.support.noCloneEvent && t[x.expando]){i = x._data(t); for (r in i.events)x.removeEvent(t, r, i.handle); t.removeAttribute(x.expando)}"script" === n && t.text !== e.text?(Ht(t).text = e.text, qt(t)):"object" === n?(t.parentNode && (t.outerHTML = e.outerHTML), x.support.html5Clone && e.innerHTML && !x.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)):"input" === n && Ct.test(e.type)?(t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)):"option" === n?t.defaultSelected = t.selected = e.defaultSelected:("input" === n || "textarea" === n) && (t.defaultValue = e.defaultValue)}}x.each({appendTo:"append", prependTo:"prepend", insertBefore:"before", insertAfter:"after", replaceAll:"replaceWith"}, function(e, t){x.fn[e] = function(e){var n, r = 0, i = [], o = x(e), a = o.length - 1; for (; a >= r; r++)n = r === a?this:this.clone(!0), x(o[r])[t](n), h.apply(i, n.get()); return this.pushStack(i)}}); function Ft(e, n){var r, o, a = 0, s = typeof e.getElementsByTagName !== i?e.getElementsByTagName(n || "*"):typeof e.querySelectorAll !== i?e.querySelectorAll(n || "*"):t; if (!s)for (s = [], r = e.childNodes || e; null != (o = r[a]); a++)!n || x.nodeName(o, n)?s.push(o):x.merge(s, Ft(o, n)); return n === t || n && x.nodeName(e, n)?x.merge([e], s):s}function Bt(e){Ct.test(e.type) && (e.defaultChecked = e.checked)}x.extend({clone:function(e, t, n){var r, i, o, a, s, l = x.contains(e.ownerDocument, e); if (x.support.html5Clone || x.isXMLDoc(e) || !mt.test("<" + e.nodeName + ">")?o = e.cloneNode(!0):(Dt.innerHTML = e.outerHTML, Dt.removeChild(o = Dt.firstChild)), !(x.support.noCloneEvent && x.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || x.isXMLDoc(e)))for (r = Ft(o), s = Ft(e), a = 0; null != (i = s[a]); ++a)r[a] && Ot(i, r[a]); if (t)if (n)for (s = s || Ft(e), r = r || Ft(o), a = 0; null != (i = s[a]); a++)Mt(i, r[a]); else Mt(e, o); return r = Ft(o, "script"), r.length > 0 && _t(r, !l && Ft(e, "script")), r = s = i = null, o}, buildFragment:function(e, t, n, r){var i, o, a, s, l, u, c, p = e.length, f = dt(t), d = [], h = 0; for (; p > h; h++)if (o = e[h], o || 0 === o)if ("object" === x.type(o))x.merge(d, o.nodeType?[o]:o); else if (wt.test(o)){s = s || f.appendChild(t.createElement("div")), l = (bt.exec(o) || ["", ""])[1].toLowerCase(), c = At[l] || At._default, s.innerHTML = c[1] + o.replace(vt, "<$1></$2>") + c[2], i = c[0]; while (i--)s = s.lastChild; if (!x.support.leadingWhitespace && yt.test(o) && d.push(t.createTextNode(yt.exec(o)[0])), !x.support.tbody){o = "table" !== l || xt.test(o)?"<table>" !== c[1] || xt.test(o)?0:s:s.firstChild, i = o && o.childNodes.length; while (i--)x.nodeName(u = o.childNodes[i], "tbody") && !u.childNodes.length && o.removeChild(u)}x.merge(d, s.childNodes), s.textContent = ""; while (s.firstChild)s.removeChild(s.firstChild); s = f.lastChild} else d.push(t.createTextNode(o)); s && f.removeChild(s), x.support.appendChecked || x.grep(Ft(d, "input"), Bt), h = 0; while (o = d[h++])if ((!r || - 1 === x.inArray(o, r)) && (a = x.contains(o.ownerDocument, o), s = Ft(f.appendChild(o), "script"), a && _t(s), n)){i = 0; while (o = s[i++])kt.test(o.type || "") && n.push(o)}return s = null, f}, cleanData:function(e, t){var n, r, o, a, s = 0, l = x.expando, u = x.cache, c = x.support.deleteExpando, f = x.event.special; for (; null != (n = e[s]); s++)if ((t || x.acceptData(n)) && (o = n[l], a = o && u[o])){if (a.events)for (r in a.events)f[r]?x.event.remove(n, r):x.removeEvent(n, r, a.handle);
u[o] && (delete u[o], c?delete n[l]:typeof n.removeAttribute !== i?n.removeAttribute(l):n[l] = null, p.push(o))}}, _evalUrl:function(e){return x.ajax({url:e, type:"GET", dataType:"script", async:!1, global:!1, "throws":!0})}}), x.fn.extend({wrapAll:function(e){if (x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this, t))}); if (this[0]){var t = x(e, this[0].ownerDocument).eq(0).clone(!0); this[0].parentNode && t.insertBefore(this[0]), t.map(function(){var e = this; while (e.firstChild && 1 === e.firstChild.nodeType)e = e.firstChild; return e}).append(this)}return this}, wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this, t))}):this.each(function(){var t = x(this), n = t.contents(); n.length?n.wrapAll(e):t.append(e)})}, wrap:function(e){var t = x.isFunction(e); return this.each(function(n){x(this).wrapAll(t?e.call(this, n):e)})}, unwrap:function(){return this.parent().each(function(){x.nodeName(this, "body") || x(this).replaceWith(this.childNodes)}).end()}}); var Pt, Rt, Wt, $t = /alpha\([^)]*\)/i, It = /opacity\s*=\s*([^)]*)/, zt = /^(top|right|bottom|left)$/, Xt = /^(none|table(?!-c[ea]).+)/, Ut = /^margin/, Vt = RegExp("^(" + w + ")(.*)$", "i"), Yt = RegExp("^(" + w + ")(?!px)[a-z%]+$", "i"), Jt = RegExp("^([+-])=(" + w + ")", "i"), Gt = {BODY:"block"}, Qt = {position:"absolute", visibility:"hidden", display:"block"}, Kt = {letterSpacing:0, fontWeight:400}, Zt = ["Top", "Right", "Bottom", "Left"], en = ["Webkit", "O", "Moz", "ms"]; function tn(e, t){if (t in e)return t; var n = t.charAt(0).toUpperCase() + t.slice(1), r = t, i = en.length; while (i--)if (t = en[i] + n, t in e)return t; return r}function nn(e, t){return e = t || e, "none" === x.css(e, "display") || !x.contains(e.ownerDocument, e)}function rn(e, t){var n, r, i, o = [], a = 0, s = e.length; for (; s > a; a++)r = e[a], r.style && (o[a] = x._data(r, "olddisplay"), n = r.style.display, t?(o[a] || "none" !== n || (r.style.display = ""), "" === r.style.display && nn(r) && (o[a] = x._data(r, "olddisplay", ln(r.nodeName)))):o[a] || (i = nn(r), (n && "none" !== n || !i) && x._data(r, "olddisplay", i?n:x.css(r, "display")))); for (a = 0; s > a; a++)r = e[a], r.style && (t && "none" !== r.style.display && "" !== r.style.display || (r.style.display = t?o[a] || "":"none")); return e}x.fn.extend({css:function(e, n){return x.access(this, function(e, n, r){var i, o, a = {}, s = 0; if (x.isArray(n)){for (o = Rt(e), i = n.length; i > s; s++)a[n[s]] = x.css(e, n[s], !1, o); return a}return r !== t?x.style(e, n, r):x.css(e, n)}, e, n, arguments.length > 1)}, show:function(){return rn(this, !0)}, hide:function(){return rn(this)}, toggle:function(e){return"boolean" == typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}), x.extend({cssHooks:{opacity:{get:function(e, t){if (t){var n = Wt(e, "opacity"); return"" === n?"1":n}}}}, cssNumber:{columnCount:!0, fillOpacity:!0, fontWeight:!0, lineHeight:!0, opacity:!0, order:!0, orphans:!0, widows:!0, zIndex:!0, zoom:!0}, cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"}, style:function(e, n, r, i){if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style){var o, a, s, l = x.camelCase(n), u = e.style; if (n = x.cssProps[l] || (x.cssProps[l] = tn(u, l)), s = x.cssHooks[n] || x.cssHooks[l], r === t)return s && "get"in s && (o = s.get(e, !1, i)) !== t?o:u[n]; if (a = typeof r, "string" === a && (o = Jt.exec(r)) && (r = (o[1] + 1) * o[2] + parseFloat(x.css(e, n)), a = "number"), !(null == r || "number" === a && isNaN(r) || ("number" !== a || x.cssNumber[l] || (r += "px"), x.support.clearCloneStyle || "" !== r || 0 !== n.indexOf("background") || (u[n] = "inherit"), s && "set"in s && (r = s.set(e, r, i)) === t)))try{u[n] = r} catch (c){}}}, css:function(e, n, r, i){var o, a, s, l = x.camelCase(n); return n = x.cssProps[l] || (x.cssProps[l] = tn(e.style, l)), s = x.cssHooks[n] || x.cssHooks[l], s && "get"in s && (a = s.get(e, !0, r)), a === t && (a = Wt(e, n, i)), "normal" === a && n in Kt && (a = Kt[n]), "" === r || r?(o = parseFloat(a), r === !0 || x.isNumeric(o)?o || 0:a):a}}), e.getComputedStyle?(Rt = function(t){return e.getComputedStyle(t, null)}, Wt = function(e, n, r){var i, o, a, s = r || Rt(e), l = s?s.getPropertyValue(n) || s[n]:t, u = e.style; return s && ("" !== l || x.contains(e.ownerDocument, e) || (l = x.style(e, n)), Yt.test(l) && Ut.test(n) && (i = u.width, o = u.minWidth, a = u.maxWidth, u.minWidth = u.maxWidth = u.width = l, l = s.width, u.width = i, u.minWidth = o, u.maxWidth = a)), l}):a.documentElement.currentStyle && (Rt = function(e){return e.currentStyle}, Wt = function(e, n, r){var i, o, a, s = r || Rt(e), l = s?s[n]:t, u = e.style; return null == l && u && u[n] && (l = u[n]), Yt.test(l) && !zt.test(n) && (i = u.left, o = e.runtimeStyle, a = o && o.left, a && (o.left = e.currentStyle.left), u.left = "fontSize" === n?"1em":l, l = u.pixelLeft + "px", u.left = i, a && (o.left = a)), "" === l?"auto":l}); function on(e, t, n){var r = Vt.exec(t); return r?Math.max(0, r[1] - (n || 0)) + (r[2] || "px"):t}function an(e, t, n, r, i){var o = n === (r?"border":"content")?4:"width" === t?1:0, a = 0; for (; 4 > o; o += 2)"margin" === n && (a += x.css(e, n + Zt[o], !0, i)), r?("content" === n && (a -= x.css(e, "padding" + Zt[o], !0, i)), "margin" !== n && (a -= x.css(e, "border" + Zt[o] + "Width", !0, i))):(a += x.css(e, "padding" + Zt[o], !0, i), "padding" !== n && (a += x.css(e, "border" + Zt[o] + "Width", !0, i))); return a}function sn(e, t, n){var r = !0, i = "width" === t?e.offsetWidth:e.offsetHeight, o = Rt(e), a = x.support.boxSizing && "border-box" === x.css(e, "boxSizing", !1, o); if (0 >= i || null == i){if (i = Wt(e, t, o), (0 > i || null == i) && (i = e.style[t]), Yt.test(i))return i; r = a && (x.support.boxSizingReliable || i === e.style[t]), i = parseFloat(i) || 0}return i + an(e, t, n || (a?"border":"content"), r, o) + "px"}function ln(e){var t = a, n = Gt[e]; return n || (n = un(e, t), "none" !== n && n || (Pt = (Pt || x("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(t.documentElement), t = (Pt[0].contentWindow || Pt[0].contentDocument).document, t.write("<!doctype html><html>"), t.close(), n = un(e, t), Pt.detach()), Gt[e] = n), n}function un(e, t){var n = x(t.createElement(e)).appendTo(t.body), r = x.css(n[0], "display"); return n.remove(), r}x.each(["height", "width"], function(e, n){x.cssHooks[n] = {get:function(e, r, i){return r?0 === e.offsetWidth && Xt.test(x.css(e, "display"))?x.swap(e, Qt, function(){return sn(e, n, i)}):sn(e, n, i):t}, set:function(e, t, r){var i = r && Rt(e); return on(e, t, r?an(e, n, r, x.support.boxSizing && "border-box" === x.css(e, "boxSizing", !1, i), i):0)}}}), x.support.opacity || (x.cssHooks.opacity = {get:function(e, t){return It.test((t && e.currentStyle?e.currentStyle.filter:e.style.filter) || "")?.01 * parseFloat(RegExp.$1) + "":t?"1":""}, set:function(e, t){var n = e.style, r = e.currentStyle, i = x.isNumeric(t)?"alpha(opacity=" + 100 * t + ")":"", o = r && r.filter || n.filter || ""; n.zoom = 1, (t >= 1 || "" === t) && "" === x.trim(o.replace($t, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === t || r && !r.filter) || (n.filter = $t.test(o)?o.replace($t, i):o + " " + i)}}), x(function(){x.support.reliableMarginRight || (x.cssHooks.marginRight = {get:function(e, n){return n?x.swap(e, {display:"inline-block"}, Wt, [e, "marginRight"]):t}}), !x.support.pixelPosition && x.fn.position && x.each(["top", "left"], function(e, n){x.cssHooks[n] = {get:function(e, r){return r?(r = Wt(e, n), Yt.test(r)?x(e).position()[n] + "px":r):t}}})}), x.expr && x.expr.filters && (x.expr.filters.hidden = function(e){return 0 >= e.offsetWidth && 0 >= e.offsetHeight || !x.support.reliableHiddenOffsets && "none" === (e.style && e.style.display || x.css(e, "display"))}, x.expr.filters.visible = function(e){return!x.expr.filters.hidden(e)}), x.each({margin:"", padding:"", border:"Width"}, function(e, t){x.cssHooks[e + t] = {expand:function(n){var r = 0, i = {}, o = "string" == typeof n?n.split(" "):[n]; for (; 4 > r; r++)i[e + Zt[r] + t] = o[r] || o[r - 2] || o[0]; return i}}, Ut.test(e) || (x.cssHooks[e + t].set = on)}); var cn = /%20/g, pn = /\[\]$/, fn = /\r?\n/g, dn = /^(?:submit|button|image|reset|file)$/i, hn = /^(?:input|select|textarea|keygen)/i; x.fn.extend({serialize:function(){return x.param(this.serializeArray())}, serializeArray:function(){return this.map(function(){var e = x.prop(this, "elements"); return e?x.makeArray(e):this}).filter(function(){var e = this.type; return this.name && !x(this).is(":disabled") && hn.test(this.nodeName) && !dn.test(e) && (this.checked || !Ct.test(e))}).map(function(e, t){var n = x(this).val(); return null == n?null:x.isArray(n)?x.map(n, function(e){return{name:t.name, value:e.replace(fn, "\r\n")}}):{name:t.name, value:n.replace(fn, "\r\n")}}).get()}}), x.param = function(e, n){var r, i = [], o = function(e, t){t = x.isFunction(t)?t():null == t?"":t, i[i.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)}; if (n === t && (n = x.ajaxSettings && x.ajaxSettings.traditional), x.isArray(e) || e.jquery && !x.isPlainObject(e))x.each(e, function(){o(this.name, this.value)}); else for (r in e)gn(r, e[r], n, o); return i.join("&").replace(cn, "+")}; function gn(e, t, n, r){var i; if (x.isArray(t))x.each(t, function(t, i){n || pn.test(e)?r(e, i):gn(e + "[" + ("object" == typeof i?t:"") + "]", i, n, r)}); else if (n || "object" !== x.type(t))r(e, t); else for (i in t)gn(e + "[" + i + "]", t[i], n, r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(e, t){x.fn[t] = function(e, n){return arguments.length > 0?this.on(t, null, e, n):this.trigger(t)}}), x.fn.extend({hover:function(e, t){return this.mouseenter(e).mouseleave(t || e)}, bind:function(e, t, n){return this.on(e, null, t, n)}, unbind:function(e, t){return this.off(e, null, t)}, delegate:function(e, t, n, r){return this.on(t, e, n, r)}, undelegate:function(e, t, n){return 1 === arguments.length?this.off(e, "**"):this.off(t, e || "**", n)}}); var mn, yn, vn = x.now(), bn = /\?/, xn = /#.*$/, wn = /([?&])_=[^&]*/, Tn = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, Cn = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Nn = /^(?:GET|HEAD)$/, kn = /^\/\//, En = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, Sn = x.fn.load, An = {}, jn = {}, Dn = "*/".concat("*"); try{yn = o.href} catch (Ln){yn = a.createElement("a"), yn.href = "", yn = yn.href}mn = En.exec(yn.toLowerCase()) || []; function Hn(e){return function(t, n){"string" != typeof t && (n = t, t = "*"); var r, i = 0, o = t.toLowerCase().match(T) || []; if (x.isFunction(n))while (r = o[i++])"+" === r[0]?(r = r.slice(1) || "*", (e[r] = e[r] || []).unshift(n)):(e[r] = e[r] || []).push(n)}}function qn(e, n, r, i){var o = {}, a = e === jn; function s(l){var u; return o[l] = !0, x.each(e[l] || [], function(e, l){var c = l(n, r, i); return"string" != typeof c || a || o[c]?a?!(u = c):t:(n.dataTypes.unshift(c), s(c), !1)}), u}return s(n.dataTypes[0]) || !o["*"] && s("*")}function _n(e, n){var r, i, o = x.ajaxSettings.flatOptions || {}; for (i in n)n[i] !== t && ((o[i]?e:r || (r = {}))[i] = n[i]); return r && x.extend(!0, e, r), e}x.fn.load = function(e, n, r){if ("string" != typeof e && Sn)return Sn.apply(this, arguments); var i, o, a, s = this, l = e.indexOf(" "); return l >= 0 && (i = e.slice(l, e.length), e = e.slice(0, l)), x.isFunction(n)?(r = n, n = t):n && "object" == typeof n && (a = "POST"), s.length > 0 && x.ajax({url:e, type:a, dataType:"html", data:n}).done(function(e){o = arguments, s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r && function(e, t){s.each(r, o || [e.responseText, t, e])}), this}, x.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(e, t){x.fn[t] = function(e){return this.on(t, e)}}), x.extend({active:0, lastModified:{}, etag:{}, ajaxSettings:{url:yn, type:"GET", isLocal:Cn.test(mn[1]), global:!0, processData:!0, async:!0, contentType:"application/x-www-form-urlencoded; charset=UTF-8", accepts:{"*":Dn, text:"text/plain", html:"text/html", xml:"application/xml, text/xml", json:"application/json, text/javascript"}, contents:{xml:/xml/, html:/html/, json:/json/}, responseFields:{xml:"responseXML", text:"responseText", json:"responseJSON"}, converters:{"* text":String, "text html":!0, "text json":x.parseJSON, "text xml":x.parseXML}, flatOptions:{url:!0, context:!0}}, ajaxSetup:function(e, t){return t?_n(_n(e, x.ajaxSettings), t):_n(x.ajaxSettings, e)}, ajaxPrefilter:Hn(An), ajaxTransport:Hn(jn), ajax:function(e, n){"object" == typeof e && (n = e, e = t), n = n || {}; var r, i, o, a, s, l, u, c, p = x.ajaxSetup({}, n), f = p.context || p, d = p.context && (f.nodeType || f.jquery)?x(f):x.event, h = x.Deferred(), g = x.Callbacks("once memory"), m = p.statusCode || {}, y = {}, v = {}, b = 0, w = "canceled", C = {readyState:0, getResponseHeader:function(e){var t; if (2 === b){if (!c){c = {}; while (t = Tn.exec(a))c[t[1].toLowerCase()] = t[2]}t = c[e.toLowerCase()]}return null == t?null:t}, getAllResponseHeaders:function(){return 2 === b?a:null}, setRequestHeader:function(e, t){var n = e.toLowerCase(); return b || (e = v[n] = v[n] || e, y[e] = t), this}, overrideMimeType:function(e){return b || (p.mimeType = e), this}, statusCode:function(e){var t; if (e)if (2 > b)for (t in e)m[t] = [m[t], e[t]]; else C.always(e[C.status]); return this}, abort:function(e){var t = e || w; return u && u.abort(t), k(0, t), this}}; if (h.promise(C).complete = g.add, C.success = C.done, C.error = C.fail, p.url = ((e || p.url || yn) + "").replace(xn, "").replace(kn, mn[1] + "//"), p.type = n.method || n.type || p.method || p.type, p.dataTypes = x.trim(p.dataType || "*").toLowerCase().match(T) || [""], null == p.crossDomain && (r = En.exec(p.url.toLowerCase()), p.crossDomain = !(!r || r[1] === mn[1] && r[2] === mn[2] && (r[3] || ("http:" === r[1]?"80":"443")) === (mn[3] || ("http:" === mn[1]?"80":"443")))), p.data && p.processData && "string" != typeof p.data && (p.data = x.param(p.data, p.traditional)), qn(An, p, n, C), 2 === b)return C; l = p.global, l && 0 === x.active++ && x.event.trigger("ajaxStart"), p.type = p.type.toUpperCase(), p.hasContent = !Nn.test(p.type), o = p.url, p.hasContent || (p.data && (o = p.url += (bn.test(o)?"&":"?") + p.data, delete p.data), p.cache === !1 && (p.url = wn.test(o)?o.replace(wn, "$1_=" + vn++):o + (bn.test(o)?"&":"?") + "_=" + vn++)), p.ifModified && (x.lastModified[o] && C.setRequestHeader("If-Modified-Since", x.lastModified[o]), x.etag[o] && C.setRequestHeader("If-None-Match", x.etag[o])), (p.data && p.hasContent && p.contentType !== !1 || n.contentType) && C.setRequestHeader("Content-Type", p.contentType), C.setRequestHeader("Accept", p.dataTypes[0] && p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]] + ("*" !== p.dataTypes[0]?", " + Dn + "; q=0.01":""):p.accepts["*"]); for (i in p.headers)C.setRequestHeader(i, p.headers[i]); if (p.beforeSend && (p.beforeSend.call(f, C, p) === !1 || 2 === b))return C.abort(); w = "abort"; for (i in{success:1, error:1, complete:1})C[i](p[i]); if (u = qn(jn, p, n, C)){C.readyState = 1, l && d.trigger("ajaxSend", [C, p]), p.async && p.timeout > 0 && (s = setTimeout(function(){C.abort("timeout")}, p.timeout)); try{b = 1, u.send(y, k)} catch (N){if (!(2 > b))throw N; k( - 1, N)}} else k( - 1, "No Transport"); function k(e, n, r, i){var c, y, v, w, T, N = n; 2 !== b && (b = 2, s && clearTimeout(s), u = t, a = i || "", C.readyState = e > 0?4:0, c = e >= 200 && 300 > e || 304 === e, r && (w = Mn(p, C, r)), w = On(p, w, C, c), c?(p.ifModified && (T = C.getResponseHeader("Last-Modified"), T && (x.lastModified[o] = T), T = C.getResponseHeader("etag"), T && (x.etag[o] = T)), 204 === e || "HEAD" === p.type?N = "nocontent":304 === e?N = "notmodified":(N = w.state, y = w.data, v = w.error, c = !v)):(v = N, (e || !N) && (N = "error", 0 > e && (e = 0))), C.status = e, C.statusText = (n || N) + "", c?h.resolveWith(f, [y, N, C]):h.rejectWith(f, [C, N, v]), C.statusCode(m), m = t, l && d.trigger(c?"ajaxSuccess":"ajaxError", [C, p, c?y:v]), g.fireWith(f, [C, N]), l && (d.trigger("ajaxComplete", [C, p]), --x.active || x.event.trigger("ajaxStop")))}return C}, getJSON:function(e, t, n){return x.get(e, t, n, "json")}, getScript:function(e, n){return x.get(e, t, n, "script")}}), x.each(["get", "post"], function(e, n){x[n] = function(e, r, i, o){return x.isFunction(r) && (o = o || i, i = r, r = t), x.ajax({url:e, type:n, dataType:o, data:r, success:i})}}); function Mn(e, n, r){var i, o, a, s, l = e.contents, u = e.dataTypes; while ("*" === u[0])u.shift(), o === t && (o = e.mimeType || n.getResponseHeader("Content-Type")); if (o)for (s in l)if (l[s] && l[s].test(o)){u.unshift(s); break}if (u[0]in r)a = u[0]; else{for (s in r){if (!u[0] || e.converters[s + " " + u[0]]){a = s; break}i || (i = s)}a = a || i}return a?(a !== u[0] && u.unshift(a), r[a]):t}function On(e, t, n, r){var i, o, a, s, l, u = {}, c = e.dataTypes.slice(); if (c[1])for (a in e.converters)u[a.toLowerCase()] = e.converters[a]; o = c.shift(); while (o)if (e.responseFields[o] && (n[e.responseFields[o]] = t), !l && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = o, o = c.shift())if ("*" === o)o = l; else if ("*" !== l && l !== o){if (a = u[l + " " + o] || u["* " + o], !a)for (i in u)if (s = i.split(" "), s[1] === o && (a = u[l + " " + s[0]] || u["* " + s[0]])){a === !0?a = u[i]:u[i] !== !0 && (o = s[0], c.unshift(s[1])); break}if (a !== !0)if (a && e["throws"])t = a(t); else try{t = a(t)} catch (p){return{state:"parsererror", error:a?p:"No conversion from " + l + " to " + o}}}return{state:"success", data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/(?:java|ecma)script/}, converters:{"text script":function(e){return x.globalEval(e), e}}}), x.ajaxPrefilter("script", function(e){e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1)}), x.ajaxTransport("script", function(e){if (e.crossDomain){var n, r = a.head || x("head")[0] || a.documentElement; return{send:function(t, i){n = a.createElement("script"), n.async = !0, e.scriptCharset && (n.charset = e.scriptCharset), n.src = e.url, n.onload = n.onreadystatechange = function(e, t){(t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, n.parentNode && n.parentNode.removeChild(n), n = null, t || i(200, "success"))}, r.insertBefore(n, r.firstChild)}, abort:function(){n && n.onload(t, !0)}}}}); var Fn = [], Bn = /(=)\?(?=&|$)|\?\?/; x.ajaxSetup({jsonp:"callback", jsonpCallback:function(){var e = Fn.pop() || x.expando + "_" + vn++; return this[e] = !0, e}}), x.ajaxPrefilter("json jsonp", function(n, r, i){var o, a, s, l = n.jsonp !== !1 && (Bn.test(n.url)?"url":"string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Bn.test(n.data) && "data"); return l || "jsonp" === n.dataTypes[0]?(o = n.jsonpCallback = x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback, l?n[l] = n[l].replace(Bn, "$1" + o):n.jsonp !== !1 && (n.url += (bn.test(n.url)?"&":"?") + n.jsonp + "=" + o), n.converters["script json"] = function(){return s || x.error(o + " was not called"), s[0]}, n.dataTypes[0] = "json", a = e[o], e[o] = function(){s = arguments}, i.always(function(){e[o] = a, n[o] && (n.jsonpCallback = r.jsonpCallback, Fn.push(o)), s && x.isFunction(a) && a(s[0]), s = a = t}), "script"):t}); var Pn, Rn, Wn = 0, $n = e.ActiveXObject && function(){var e; for (e in Pn)Pn[e](t, !0)}; function In(){try{return new e.XMLHttpRequest} catch (t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")} catch (t){}}x.ajaxSettings.xhr = e.ActiveXObject?function(){return!this.isLocal && In() || zn()}:In, Rn = x.ajaxSettings.xhr(), x.support.cors = !!Rn && "withCredentials"in Rn, Rn = x.support.ajax = !!Rn, Rn && x.ajaxTransport(function(n){if (!n.crossDomain || x.support.cors){var r; return{send:function(i, o){var a, s, l = n.xhr(); if (n.username?l.open(n.type, n.url, n.async, n.username, n.password):l.open(n.type, n.url, n.async), n.xhrFields)for (s in n.xhrFields)l[s] = n.xhrFields[s]; n.mimeType && l.overrideMimeType && l.overrideMimeType(n.mimeType), n.crossDomain || i["X-Requested-With"] || (i["X-Requested-With"] = "XMLHttpRequest"); try{for (s in i)l.setRequestHeader(s, i[s])} catch (u){}l.send(n.hasContent && n.data || null), r = function(e, i){var s, u, c, p; try{if (r && (i || 4 === l.readyState))if (r = t, a && (l.onreadystatechange = x.noop, $n && delete Pn[a]), i)4 !== l.readyState && l.abort(); else{p = {}, s = l.status, u = l.getAllResponseHeaders(), "string" == typeof l.responseText && (p.text = l.responseText); try{c = l.statusText} catch (f){c = ""}s || !n.isLocal || n.crossDomain?1223 === s && (s = 204):s = p.text?200:404}} catch (d){i || o( - 1, d)}p && o(s, c, p, u)}, n.async?4 === l.readyState?setTimeout(r):(a = ++Wn, $n && (Pn || (Pn = {}, x(e).unload($n)), Pn[a] = r), l.onreadystatechange = r):r()}, abort:function(){r && r(t, !0)}}}}); var Xn, Un, Vn = /^(?:toggle|show|hide)$/, Yn = RegExp("^(?:([+-])=|)(" + w + ")([a-z%]*)$", "i"), Jn = /queueHooks$/, Gn = [nr], Qn = {"*":[function(e, t){var n = this.createTween(e, t), r = n.cur(), i = Yn.exec(t), o = i && i[3] || (x.cssNumber[e]?"":"px"), a = (x.cssNumber[e] || "px" !== o && + r) && Yn.exec(x.css(n.elem, e)), s = 1, l = 20; if (a && a[3] !== o){o = o || a[3], i = i || [], a = + r || 1; do s = s || ".5", a /= s, x.style(n.elem, e, a + o); while (s !== (s = n.cur() / r) && 1 !== s && --l)}return i && (a = n.start = + a || + r || 0, n.unit = o, n.end = i[1]?a + (i[1] + 1) * i[2]: + i[2]), n}]}; function Kn(){return setTimeout(function(){Xn = t}), Xn = x.now()}function Zn(e, t, n){var r, i = (Qn[t] || []).concat(Qn["*"]), o = 0, a = i.length; for (; a > o; o++)if (r = i[o].call(n, t, e))return r}function er(e, t, n){var r, i, o = 0, a = Gn.length, s = x.Deferred().always(function(){delete l.elem}), l = function(){if (i)return!1; var t = Xn || Kn(), n = Math.max(0, u.startTime + u.duration - t), r = n / u.duration || 0, o = 1 - r, a = 0, l = u.tweens.length; for (; l > a; a++)u.tweens[a].run(o); return s.notifyWith(e, [u, o, n]), 1 > o && l?n:(s.resolveWith(e, [u]), !1)}, u = s.promise({elem:e, props:x.extend({}, t), opts:x.extend(!0, {specialEasing:{}}, n), originalProperties:t, originalOptions:n, startTime:Xn || Kn(), duration:n.duration, tweens:[], createTween:function(t, n){var r = x.Tween(e, u.opts, t, n, u.opts.specialEasing[t] || u.opts.easing); return u.tweens.push(r), r}, stop:function(t){var n = 0, r = t?u.tweens.length:0; if (i)return this; for (i = !0; r > n; n++)u.tweens[n].run(1); return t?s.resolveWith(e, [u, t]):s.rejectWith(e, [u, t]), this}}), c = u.props; for (tr(c, u.opts.specialEasing); a > o; o++)if (r = Gn[o].call(u, e, c, u.opts))return r; return x.map(c, Zn, u), x.isFunction(u.opts.start) && u.opts.start.call(e, u), x.fx.timer(x.extend(l, {elem:e, anim:u, queue:u.opts.queue})), u.progress(u.opts.progress).done(u.opts.done, u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e, t){var n, r, i, o, a; for (n in e)if (r = x.camelCase(n), i = t[r], o = e[n], x.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), a = x.cssHooks[r], a && "expand"in a){o = a.expand(o), delete e[r]; for (n in o)n in e || (e[n] = o[n], t[n] = i)} else t[r] = i}x.Animation = x.extend(er, {tweener:function(e, t){x.isFunction(e)?(t = e, e = ["*"]):e = e.split(" "); var n, r = 0, i = e.length; for (; i > r; r++)n = e[r], Qn[n] = Qn[n] || [], Qn[n].unshift(t)}, prefilter:function(e, t){t?Gn.unshift(e):Gn.push(e)}}); function nr(e, t, n){var r, i, o, a, s, l, u = this, c = {}, p = e.style, f = e.nodeType && nn(e), d = x._data(e, "fxshow"); n.queue || (s = x._queueHooks(e, "fx"), null == s.unqueued && (s.unqueued = 0, l = s.empty.fire, s.empty.fire = function(){s.unqueued || l()}), s.unqueued++, u.always(function(){u.always(function(){s.unqueued--, x.queue(e, "fx").length || s.empty.fire()})})), 1 === e.nodeType && ("height"in t || "width"in t) && (n.overflow = [p.overflow, p.overflowX, p.overflowY], "inline" === x.css(e, "display") && "none" === x.css(e, "float") && (x.support.inlineBlockNeedsLayout && "inline" !== ln(e.nodeName)?p.zoom = 1:p.display = "inline-block")), n.overflow && (p.overflow = "hidden", x.support.shrinkWrapBlocks || u.always(function(){p.overflow = n.overflow[0], p.overflowX = n.overflow[1], p.overflowY = n.overflow[2]})); for (r in t)if (i = t[r], Vn.exec(i)){if (delete t[r], o = o || "toggle" === i, i === (f?"hide":"show"))continue; c[r] = d && d[r] || x.style(e, r)}if (!x.isEmptyObject(c)){d?"hidden"in d && (f = d.hidden):d = x._data(e, "fxshow", {}), o && (d.hidden = !f), f?x(e).show():u.done(function(){x(e).hide()}), u.done(function(){var t; x._removeData(e, "fxshow"); for (t in c)x.style(e, t, c[t])}); for (r in c)a = Zn(f?d[r]:0, r, u), r in d || (d[r] = a.start, f && (a.end = a.start, a.start = "width" === r || "height" === r?1:0))}}function rr(e, t, n, r, i){return new rr.prototype.init(e, t, n, r, i)}x.Tween = rr, rr.prototype = {constructor:rr, init:function(e, t, n, r, i, o){this.elem = e, this.prop = n, this.easing = i || "swing", this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (x.cssNumber[n]?"":"px")}, cur:function(){var e = rr.propHooks[this.prop]; return e && e.get?e.get(this):rr.propHooks._default.get(this)}, run:function(e){var t, n = rr.propHooks[this.prop]; return this.pos = t = this.options.duration?x.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration):e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set?n.set(this):rr.propHooks._default.set(this), this}}, rr.prototype.init.prototype = rr.prototype, rr.propHooks = {_default:{get:function(e){var t; return null == e.elem[e.prop] || e.elem.style && null != e.elem.style[e.prop]?(t = x.css(e.elem, e.prop, ""), t && "auto" !== t?t:0):e.elem[e.prop]}, set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style && (null != e.elem.style[x.cssProps[e.prop]] || x.cssHooks[e.prop])?x.style(e.elem, e.prop, e.now + e.unit):e.elem[e.prop] = e.now}}}, rr.propHooks.scrollTop = rr.propHooks.scrollLeft = {set:function(e){e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)}}, x.each(["toggle", "show", "hide"], function(e, t){var n = x.fn[t]; x.fn[t] = function(e, r, i){return null == e || "boolean" == typeof e?n.apply(this, arguments):this.animate(ir(t, !0), e, r, i)}}), x.fn.extend({fadeTo:function(e, t, n, r){return this.filter(nn).css("opacity", 0).show().end().animate({opacity:t}, e, n, r)}, animate:function(e, t, n, r){var i = x.isEmptyObject(e), o = x.speed(t, n, r), a = function(){var t = er(this, x.extend({}, e), o); (i || x._data(this, "finish")) && t.stop(!0)}; return a.finish = a, i || o.queue === !1?this.each(a):this.queue(o.queue, a)}, stop:function(e, n, r){var i = function(e){var t = e.stop; delete e.stop, t(r)}; return"string" != typeof e && (r = n, n = e, e = t), n && e !== !1 && this.queue(e || "fx", []), this.each(function(){var t = !0, n = null != e && e + "queueHooks", o = x.timers, a = x._data(this); if (n)a[n] && a[n].stop && i(a[n]); else for (n in a)a[n] && a[n].stop && Jn.test(n) && i(a[n]); for (n = o.length; n--; )o[n].elem !== this || null != e && o[n].queue !== e || (o[n].anim.stop(r), t = !1, o.splice(n, 1)); (t || !r) && x.dequeue(this, e)})}, finish:function(e){return e !== !1 && (e = e || "fx"), this.each(function(){var t, n = x._data(this), r = n[e + "queue"], i = n[e + "queueHooks"], o = x.timers, a = r?r.length:0; for (n.finish = !0, x.queue(this, e, []), i && i.stop && i.stop.call(this, !0), t = o.length; t--; )o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1)); for (t = 0; a > t; t++)r[t] && r[t].finish && r[t].finish.call(this); delete n.finish})}}); function ir(e, t){var n, r = {height:e}, i = 0; for (t = t?1:0; 4 > i; i += 2 - t)n = Zt[i], r["margin" + n] = r["padding" + n] = e; return t && (r.opacity = r.width = e), r}x.each({slideDown:ir("show"), slideUp:ir("hide"), slideToggle:ir("toggle"), fadeIn:{opacity:"show"}, fadeOut:{opacity:"hide"}, fadeToggle:{opacity:"toggle"}}, function(e, t){x.fn[e] = function(e, n, r){return this.animate(t, e, n, r)}}), x.speed = function(e, t, n){var r = e && "object" == typeof e?x.extend({}, e):{complete:n || !n && t || x.isFunction(e) && e, duration:e, easing:n && t || t && !x.isFunction(t) && t}; return r.duration = x.fx.off?0:"number" == typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default, (null == r.queue || r.queue === !0) && (r.queue = "fx"), r.old = r.complete, r.complete = function(){x.isFunction(r.old) && r.old.call(this), r.queue && x.dequeue(this, r.queue)}, r}, x.easing = {linear:function(e){return e}, swing:function(e){return.5 - Math.cos(e * Math.PI) / 2}}, x.timers = [], x.fx = rr.prototype.init, x.fx.tick = function(){var e, n = x.timers, r = 0; for (Xn = x.now(); n.length > r; r++)e = n[r], e() || n[r] !== e || n.splice(r--, 1); n.length || x.fx.stop(), Xn = t}, x.fx.timer = function(e){e() && x.timers.push(e) && x.fx.start()}, x.fx.interval = 13, x.fx.start = function(){Un || (Un = setInterval(x.fx.tick, x.fx.interval))}, x.fx.stop = function(){clearInterval(Un), Un = null}, x.fx.speeds = {slow:600, fast:200, _default:400}, x.fx.step = {}, x.expr && x.expr.filters && (x.expr.filters.animated = function(e){return x.grep(x.timers, function(t){return e === t.elem}).length}), x.fn.offset = function(e){if (arguments.length)return e === t?this:this.each(function(t){x.offset.setOffset(this, e, t)}); var n, r, o = {top:0, left:0}, a = this[0], s = a && a.ownerDocument; if (s)return n = s.documentElement, x.contains(n, a)?(typeof a.getBoundingClientRect !== i && (o = a.getBoundingClientRect()), r = or(s), {top:o.top + (r.pageYOffset || n.scrollTop) - (n.clientTop || 0), left:o.left + (r.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)}):o}, x.offset = {setOffset:function(e, t, n){var r = x.css(e, "position"); "static" === r && (e.style.position = "relative"); var i = x(e), o = i.offset(), a = x.css(e, "top"), s = x.css(e, "left"), l = ("absolute" === r || "fixed" === r) && x.inArray("auto", [a, s]) > - 1, u = {}, c = {}, p, f; l?(c = i.position(), p = c.top, f = c.left):(p = parseFloat(a) || 0, f = parseFloat(s) || 0), x.isFunction(t) && (t = t.call(e, n, o)), null != t.top && (u.top = t.top - o.top + p), null != t.left && (u.left = t.left - o.left + f), "using"in t?t.using.call(e, u):i.css(u)}}, x.fn.extend({position:function(){if (this[0]){var e, t, n = {top:0, left:0}, r = this[0]; return"fixed" === x.css(r, "position")?t = r.getBoundingClientRect():(e = this.offsetParent(), t = this.offset(), x.nodeName(e[0], "html") || (n = e.offset()), n.top += x.css(e[0], "borderTopWidth", !0), n.left += x.css(e[0], "borderLeftWidth", !0)), {top:t.top - n.top - x.css(r, "marginTop", !0), left:t.left - n.left - x.css(r, "marginLeft", !0)}}}, offsetParent:function(){return this.map(function(){var e = this.offsetParent || s; while (e && !x.nodeName(e, "html") && "static" === x.css(e, "position"))e = e.offsetParent; return e || s})}}), x.each({scrollLeft:"pageXOffset", scrollTop:"pageYOffset"}, function(e, n){var r = /Y/.test(n); x.fn[e] = function(i){return x.access(this, function(e, i, o){var a = or(e); return o === t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o, r?o:x(a).scrollTop()):e[i] = o, t)}, e, i, arguments.length, null)}}); function or(e){return x.isWindow(e)?e:9 === e.nodeType?e.defaultView || e.parentWindow:!1}x.each({Height:"height", Width:"width"}, function(e, n){x.each({padding:"inner" + e, content:n, "":"outer" + e}, function(r, i){x.fn[i] = function(i, o){var a = arguments.length && (r || "boolean" != typeof i), s = r || (i === !0 || o === !0?"margin":"border"); return x.access(this, function(n, r, i){var o; return x.isWindow(n)?n.document.documentElement["client" + e]:9 === n.nodeType?(o = n.documentElement, Math.max(n.body["scroll" + e], o["scroll" + e], n.body["offset" + e], o["offset" + e], o["client" + e])):i === t?x.css(n, r, s):x.style(n, r, i, s)}, n, a?i:t, a, null)}})}), x.fn.size = function(){return this.length}, x.fn.andSelf = x.fn.addBack, "object" == typeof module && module && "object" == typeof module.exports?module.exports = x:(e.jQuery = e.$ = x, "function" == typeof define && define.amd && define("jquery", [], function(){return x}))})(window);
// Modernizr v1.7  www.modernizr.com
window.Modernizr = function(a, b, c){function G(){e.input = function(a){for (var b = 0, c = a.length; b < c; b++)t[a[b]] = !!(a[b]in l); return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")), e.inputtypes = function(a){for (var d = 0, e, f, h, i = a.length; d < i; d++)l.setAttribute("type", f = a[d]), e = l.type !== "text", e && (l.value = m, l.style.cssText = "position:absolute;visibility:hidden;", /^range$/.test(f) && l.style.WebkitAppearance !== c?(g.appendChild(l), h = b.defaultView, e = h.getComputedStyle && h.getComputedStyle(l, null).WebkitAppearance !== "textfield" && l.offsetHeight !== 0, g.removeChild(l)):/^(search|tel)$/.test(f) || (/^(url|email)$/.test(f)?e = l.checkValidity && l.checkValidity() === !1:/^color$/.test(f)?(g.appendChild(l), g.offsetWidth, e = l.value != m, g.removeChild(l)):e = l.value != m)), s[a[d]] = !!e; return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a, b){var c = a.charAt(0).toUpperCase() + a.substr(1), d = (a + " " + p.join(c + " ") + c).split(" "); return!!E(d, b)}function E(a, b){for (var d in a)if (k[a[d]] !== c && (!b || b(a[d], j)))return!0}function D(a, b){return("" + a).indexOf(b) !== - 1}function C(a, b){return typeof a === b}function B(a, b){return A(o.join(a + ";") + (b || ""))}function A(a){k.cssText = a}var d = "1.7", e = {}, f = !0, g = b.documentElement, h = b.head || b.getElementsByTagName("head")[0], i = "modernizr", j = b.createElement(i), k = j.style, l = b.createElement("input"), m = ":)", n = Object.prototype.toString, o = " -webkit- -moz- -o- -ms- -khtml- ".split(" "), p = "Webkit Moz O ms Khtml".split(" "), q = {svg:"http://www.w3.org/2000/svg"}, r = {}, s = {}, t = {}, u = [], v, w = function(a){var c = b.createElement("style"), d = b.createElement("div"), e; c.textContent = a + "{#modernizr{height:3px}}", h.appendChild(c), d.id = "modernizr", g.appendChild(d), e = d.offsetHeight === 3, c.parentNode.removeChild(c), d.parentNode.removeChild(d); return!!e}, x = function(){function d(d, e){e = e || b.createElement(a[d] || "div"); var f = (d = "on" + d)in e; f || (e.setAttribute || (e = b.createElement("div")), e.setAttribute && e.removeAttribute && (e.setAttribute(d, ""), f = C(e[d], "function"), C(e[d], c) || (e[d] = c), e.removeAttribute(d))), e = null; return f}var a = {select:"input", change:"input", submit:"form", reset:"form", error:"img", load:"img", abort:"img"}; return d}(), y = ({}).hasOwnProperty, z; C(y, c) || C(y.call, c)?z = function(a, b){return b in a && C(a.constructor.prototype[b], c)}:z = function(a, b){return y.call(a, b)}, r.flexbox = function(){function c(a, b, c, d){a.style.cssText = o.join(b + ":" + c + ";") + (d || "")}function a(a, b, c, d){b += ":", a.style.cssText = (b + o.join(c + ";" + b)).slice(0, - b.length) + (d || "")}var d = b.createElement("div"), e = b.createElement("div"); a(d, "display", "box", "width:42px;padding:0;"), c(e, "box-flex", "1", "width:10px;"), d.appendChild(e), g.appendChild(d); var f = e.offsetWidth === 42; d.removeChild(e), g.removeChild(d); return f}, r.canvas = function(){var a = b.createElement("canvas"); return a.getContext && a.getContext("2d")}, r.canvastext = function(){return e.canvas && C(b.createElement("canvas").getContext("2d").fillText, "function")}, r.webgl = function(){return!!a.WebGLRenderingContext}, r.touch = function(){return"ontouchstart"in a || w("@media (" + o.join("touch-enabled),(") + "modernizr)")}, r.geolocation = function(){return!!navigator.geolocation}, r.postmessage = function(){return!!a.postMessage}, r.websqldatabase = function(){var b = !!a.openDatabase; return b}, r.indexedDB = function(){for (var b = - 1, c = p.length; ++b < c; ){var d = p[b].toLowerCase(); if (a[d + "_indexedDB"] || a[d + "IndexedDB"])return!0}return!1}, r.hashchange = function(){return x("hashchange", a) && (b.documentMode === c || b.documentMode > 7)}, r.history = function(){return !!(a.history && history.pushState)}, r.draganddrop = function(){return x("dragstart") && x("drop")}, r.websockets = function(){return"WebSocket"in a}, r.rgba = function(){A("background-color:rgba(150,255,150,.5)"); return D(k.backgroundColor, "rgba")}, r.hsla = function(){A("background-color:hsla(120,40%,100%,.5)"); return D(k.backgroundColor, "rgba") || D(k.backgroundColor, "hsla")}, r.multiplebgs = function(){A("background:url(//:),url(//:),red url(//:)"); return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)}, r.backgroundsize = function(){return F("backgroundSize")}, r.borderimage = function(){return F("borderImage")}, r.borderradius = function(){return F("borderRadius", "", function(a){return D(a, "orderRadius")})}, r.boxshadow = function(){return F("boxShadow")}, r.textshadow = function(){return b.createElement("div").style.textShadow === ""}, r.opacity = function(){B("opacity:.55"); return/^0.55$/.test(k.opacity)}, r.cssanimations = function(){return F("animationName")}, r.csscolumns = function(){return F("columnCount")}, r.cssgradients = function(){var a = "background-image:", b = "gradient(linear,left top,right bottom,from(#9f9),to(white));", c = "linear-gradient(left top,#9f9, white);"; A((a + o.join(b + a) + o.join(c + a)).slice(0, - a.length)); return D(k.backgroundImage, "gradient")}, r.cssreflections = function(){return F("boxReflect")}, r.csstransforms = function(){return!!E(["transformProperty", "WebkitTransform", "MozTransform", "OTransform", "msTransform"])}, r.csstransforms3d = function(){var a = !!E(["perspectiveProperty", "WebkitPerspective", "MozPerspective", "OPerspective", "msPerspective"]); a && "webkitPerspective"in g.style && (a = w("@media (" + o.join("transform-3d),(") + "modernizr)")); return a}, r.csstransitions = function(){return F("transitionProperty")}, r.fontface = function(){var a, c, d = h || g, e = b.createElement("style"), f = b.implementation || {hasFeature:function(){return!1}}; e.type = "text/css", d.insertBefore(e, d.firstChild), a = e.sheet || e.styleSheet; var i = f.hasFeature("CSS2", "")?function(b){if (!a || !b)return!1; var c = !1; try{a.insertRule(b, 0), c = /src/i.test(a.cssRules[0].cssText), a.deleteRule(a.cssRules.length - 1)} catch (d){}return c}:function(b){if (!a || !b)return!1; a.cssText = b; return a.cssText.length !== 0 && /src/i.test(a.cssText) && a.cssText.replace(/\r+|\n+/g, "").indexOf(b.split(" ")[0]) === 0}; c = i('@font-face { font-family: "font"; src: url(data:,); }'), d.removeChild(e); return c}, r.video = function(){var a = b.createElement("video"), c = !!a.canPlayType; if (c){c = new Boolean(c), c.ogg = a.canPlayType('video/ogg; codecs="theora"'); var d = 'video/mp4; codecs="avc1.42E01E'; c.h264 = a.canPlayType(d + '"') || a.canPlayType(d + ', mp4a.40.2"'), c.webm = a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c}, r.audio = function(){var a = b.createElement("audio"), c = !!a.canPlayType; c && (c = new Boolean(c), c.ogg = a.canPlayType('audio/ogg; codecs="vorbis"'), c.mp3 = a.canPlayType("audio/mpeg;"), c.wav = a.canPlayType('audio/wav; codecs="1"'), c.m4a = a.canPlayType("audio/x-m4a;") || a.canPlayType("audio/aac;")); return c}, r.localstorage = function(){try{return!!localStorage.getItem} catch (a){return!1}}, r.sessionstorage = function(){try{return!!sessionStorage.getItem} catch (a){return!1}}, r.webWorkers = function(){return!!a.Worker}, r.applicationcache = function(){return!!a.applicationCache}, r.svg = function(){return!!b.createElementNS && !!b.createElementNS(q.svg, "svg").createSVGRect}, r.inlinesvg = function(){var a = b.createElement("div"); a.innerHTML = "<svg/>"; return(a.firstChild && a.firstChild.namespaceURI) == q.svg}, r.smil = function(){return!!b.createElementNS && /SVG/.test(n.call(b.createElementNS(q.svg, "animate")))}, r.svgclippaths = function(){return!!b.createElementNS && /SVG/.test(n.call(b.createElementNS(q.svg, "clipPath")))}; for (var H in r)z(r, H) && (v = H.toLowerCase(), e[v] = r[H](), u.push((e[v]?"":"no-") + v)); e.input || G(), e.crosswindowmessaging = e.postmessage, e.historymanagement = e.history, e.addTest = function(a, b){a = a.toLowerCase(); if (!e[a]){b = !!b(), g.className += " " + (b?"":"no-") + a, e[a] = b; return e}}, A(""), j = l = null, f && a.attachEvent && function(){var a = b.createElement("div"); a.innerHTML = "<elem></elem>"; return a.childNodes.length !== 1}() && function(a, b){function p(a, b){var c = - 1, d = a.length, e, f = []; while (++c < d)e = a[c], (b = e.media || b) != "screen" && f.push(p(e.imports, b), e.cssText); return f.join("")}function o(a){var b = - 1; while (++b < e)a.createElement(d[b])}var c = "abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", d = c.split("|"), e = d.length, f = new RegExp("(^|\\s)(" + c + ")", "gi"), g = new RegExp("<(/*)(" + c + ")", "gi"), h = new RegExp("(^|[^\\n]*?\\s)(" + c + ")([^\\n]*)({[\\n\\w\\W]*?})", "gi"), i = b.createDocumentFragment(), j = b.documentElement, k = j.firstChild, l = b.createElement("body"), m = b.createElement("style"), n; o(b), o(i), k.insertBefore(m, k.firstChild), m.media = "print", a.attachEvent("onbeforeprint", function(){var a = - 1, c = p(b.styleSheets, "all"), k = [], o; n = n || b.body; while ((o = h.exec(c)) != null)k.push((o[1] + o[2] + o[3]).replace(f, "$1.iepp_$2") + o[4]); m.styleSheet.cssText = k.join("\n"); while (++a < e){var q = b.getElementsByTagName(d[a]), r = q.length, s = - 1; while (++s < r)q[s].className.indexOf("iepp_") < 0 && (q[s].className += " iepp_" + d[a])}i.appendChild(n), j.appendChild(l), l.className = n.className, l.innerHTML = n.innerHTML.replace(g, "<$1font")}), a.attachEvent("onafterprint", function(){l.innerHTML = "", j.removeChild(l), j.appendChild(n), m.styleSheet.cssText = ""})}(a, b), e._enableHTML5 = f, e._version = d, g.className = g.className.replace(/\bno-js\b/, "") + " js " + u.join(" "); return e}(this, this.document);!function(t){"function" == typeof define && define.amd?define(["jquery"], t):t(jQuery)}(function(t){function e(e, s){var n, o, a, r = e.nodeName.toLowerCase(); return"area" === r?(n = e.parentNode, o = n.name, !(!e.href || !o || "map" !== n.nodeName.toLowerCase()) && (!!(a = t("img[usemap='#" + o + "']")[0]) && i(a))):(/^(input|select|textarea|button|object)$/.test(r)?!e.disabled:"a" === r?e.href || s:s) && i(e)}function i(e){return t.expr.filters.visible(e) && !t(e).parents().addBack().filter(function(){return"hidden" === t.css(this, "visibility")}).length}function s(t){for (var e, i; t.length && t[0] !== document; ){if (("absolute" === (e = t.css("position")) || "relative" === e || "fixed" === e) && (i = parseInt(t.css("zIndex"), 10), !isNaN(i) && 0 !== i))return i; t = t.parent()}return 0}function n(){this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {closeText:"Done", prevText:"Prev", nextText:"Next", currentText:"Today", monthNames:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader:"Wk", dateFormat:"mm/dd/yy", firstDay:0, isRTL:!1, showMonthAfterYear:!1, yearSuffix:""}, this._defaults = {showOn:"focus", showAnim:"fadeIn", showOptions:{}, defaultDate:null, appendText:"", buttonText:"...", buttonImage:"", buttonImageOnly:!1, hideIfNoPrevNext:!1, navigationAsDateFormat:!1, gotoCurrent:!1, changeMonth:!1, changeYear:!1, yearRange:"c-10:c+10", showOtherMonths:!1, selectOtherMonths:!1, showWeek:!1, calculateWeek:this.iso8601Week, shortYearCutoff:"+10", minDate:null, maxDate:null, duration:"fast", beforeShowDay:null, beforeShow:null, onSelect:null, onChangeMonthYear:null, onClose:null, numberOfMonths:1, showCurrentAtPos:0, stepMonths:1, stepBigMonths:12, altField:"", altFormat:"", constrainInput:!0, showButtonPanel:!1, autoSize:!1, disabled:!1}, t.extend(this._defaults, this.regional[""]), this.regional.en = t.extend(!0, {}, this.regional[""]), this.regional["en-US"] = t.extend(!0, {}, this.regional.en), this.dpDiv = o(t("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function o(e){var i = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return e.delegate(i, "mouseout", function(){t(this).removeClass("ui-state-hover"), - 1 !== this.className.indexOf("ui-datepicker-prev") && t(this).removeClass("ui-datepicker-prev-hover"), - 1 !== this.className.indexOf("ui-datepicker-next") && t(this).removeClass("ui-datepicker-next-hover")}).delegate(i, "mouseover", a)}function a(){t.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0]) || (t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), t(this).addClass("ui-state-hover"), - 1 !== this.className.indexOf("ui-datepicker-prev") && t(this).addClass("ui-datepicker-prev-hover"), - 1 !== this.className.indexOf("ui-datepicker-next") && t(this).addClass("ui-datepicker-next-hover"))}function r(e, i){t.extend(e, i); for (var s in i)null == i[s] && (e[s] = i[s]); return e}function h(t){return function(){var e = this.element.val(); t.apply(this, arguments), this._refresh(), e !== this.element.val() && this._trigger("change")}}t.ui = t.ui || {}, t.extend(t.ui, {version:"1.11.4", keyCode:{BACKSPACE:8, COMMA:188, DELETE:46, DOWN:40, END:35, ENTER:13, ESCAPE:27, HOME:36, LEFT:37, PAGE_DOWN:34, PAGE_UP:33, PERIOD:190, RIGHT:39, SPACE:32, TAB:9, UP:38}}), t.fn.extend({scrollParent:function(e){var i = this.css("position"), s = "absolute" === i, n = e?/(auto|scroll|hidden)/:/(auto|scroll)/, o = this.parents().filter(function(){var e = t(this); return(!s || "static" !== e.css("position")) && n.test(e.css("overflow") + e.css("overflow-y") + e.css("overflow-x"))}).eq(0); return"fixed" !== i && o.length?o:t(this[0].ownerDocument || document)}, uniqueId:function(){var t = 0; return function(){return this.each(function(){this.id || (this.id = "ui-id-" + ++t)})}}(), removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id) && t(this).removeAttr("id")})}}), t.extend(t.expr[":"], {data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i, e)}}):function(e, i, s){return!!t.data(e, s[3])}, focusable:function(i){return e(i, !isNaN(t.attr(i, "tabindex")))}, tabbable:function(i){var s = t.attr(i, "tabindex"), n = isNaN(s); return(n || s >= 0) && e(i, !n)}}), t("<a>").outerWidth(1).jquery || t.each(["Width", "Height"], function(e, i){function s(e, i, s, o){return t.each(n, function(){i -= parseFloat(t.css(e, "padding" + this)) || 0, s && (i -= parseFloat(t.css(e, "border" + this + "Width")) || 0), o && (i -= parseFloat(t.css(e, "margin" + this)) || 0)}), i}var n = "Width" === i?["Left", "Right"]:["Top", "Bottom"], o = i.toLowerCase(), a = {innerWidth:t.fn.innerWidth, innerHeight:t.fn.innerHeight, outerWidth:t.fn.outerWidth, outerHeight:t.fn.outerHeight}; t.fn["inner" + i] = function(e){return void 0 === e?a["inner" + i].call(this):this.each(function(){t(this).css(o, s(this, e) + "px")})}, t.fn["outer" + i] = function(e, n){return"number" != typeof e?a["outer" + i].call(this, e):this.each(function(){t(this).css(o, s(this, e, !0, n) + "px")})}}), t.fn.addBack || (t.fn.addBack = function(t){return this.add(null == t?this.prevObject:this.prevObject.filter(t))}), t("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (t.fn.removeData = function(e){return function(i){return arguments.length?e.call(this, t.camelCase(i)):e.call(this)}}(t.fn.removeData)), t.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), t.fn.extend({focus:function(e){return function(i, s){return"number" == typeof i?this.each(function(){var e = this; setTimeout(function(){t(e).focus(), s && s.call(e)}, i)}):e.apply(this, arguments)}}(t.fn.focus), disableSelection:function(){var t = "onselectstart"in document.createElement("div")?"selectstart":"mousedown"; return function(){return this.bind(t + ".ui-disableSelection", function(t){t.preventDefault()})}}(), enableSelection:function(){return this.unbind(".ui-disableSelection")}, zIndex:function(e){if (void 0 !== e)return this.css("zIndex", e); if (this.length)for (var i, s, n = t(this[0]); n.length && n[0] !== document; ){if (("absolute" === (i = n.css("position")) || "relative" === i || "fixed" === i) && (s = parseInt(n.css("zIndex"), 10), !isNaN(s) && 0 !== s))return s; n = n.parent()}return 0}}), t.ui.plugin = {add:function(e, i, s){var n, o = t.ui[e].prototype; for (n in s)o.plugins[n] = o.plugins[n] || [], o.plugins[n].push([i, s[n]])}, call:function(t, e, i, s){var n, o = t.plugins[e]; if (o && (s || t.element[0].parentNode && 11 !== t.element[0].parentNode.nodeType))for (n = 0; n < o.length; n++)t.options[o[n][0]] && o[n][1].apply(t.element, i)}}; var l = 0, c = Array.prototype.slice; t.cleanData = function(e){return function(i){var s, n, o; for (o = 0; null != (n = i[o]); o++)try{(s = t._data(n, "events")) && s.remove && t(n).triggerHandler("remove")} catch (t){}e(i)}}(t.cleanData), t.widget = function(e, i, s){var n, o, a, r, h = {}, l = e.split(".")[0]; return e = e.split(".")[1], n = l + "-" + e, s || (s = i, i = t.Widget), t.expr[":"][n.toLowerCase()] = function(e){return!!t.data(e, n)}, t[l] = t[l] || {}, o = t[l][e], a = t[l][e] = function(t, e){if (!this._createWidget)return new a(t, e); arguments.length && this._createWidget(t, e)}, t.extend(a, o, {version:s.version, _proto:t.extend({}, s), _childConstructors:[]}), r = new i, r.options = t.widget.extend({}, r.options), t.each(s, function(e, s){t.isFunction(s)?h[e] = function(){var t = function(){return i.prototype[e].apply(this, arguments)}, n = function(t){return i.prototype[e].apply(this, t)}; return function(){var e, i = this._super, o = this._superApply; return this._super = t, this._superApply = n, e = s.apply(this, arguments), this._super = i, this._superApply = o, e}}():h[e] = s}), a.prototype = t.widget.extend(r, {widgetEventPrefix:o?r.widgetEventPrefix || e:e}, h, {constructor:a, namespace:l, widgetName:e, widgetFullName:n}), o?(t.each(o._childConstructors, function(e, i){var s = i.prototype; t.widget(s.namespace + "." + s.widgetName, a, i._proto)}), delete o._childConstructors):i._childConstructors.push(a), t.widget.bridge(e, a), a}, t.widget.extend = function(e){for (var i, s, n = c.call(arguments, 1), o = 0, a = n.length; o < a; o++)for (i in n[o])s = n[o][i], n[o].hasOwnProperty(i) && void 0 !== s && (t.isPlainObject(s)?e[i] = t.isPlainObject(e[i])?t.widget.extend({}, e[i], s):t.widget.extend({}, s):e[i] = s); return e}, t.widget.bridge = function(e, i){var s = i.prototype.widgetFullName || e; t.fn[e] = function(n){var o = "string" == typeof n, a = c.call(arguments, 1), r = this; return o?this.each(function(){var i, o = t.data(this, s); return"instance" === n?(r = o, !1):o?t.isFunction(o[n]) && "_" !== n.charAt(0)?(i = o[n].apply(o, a), i !== o && void 0 !== i?(r = i && i.jquery?r.pushStack(i.get()):i, !1):void 0):t.error("no such method '" + n + "' for " + e + " widget instance"):t.error("cannot call methods on " + e + " prior to initialization; attempted to call method '" + n + "'")}):(a.length && (n = t.widget.extend.apply(null, [n].concat(a))), this.each(function(){var e = t.data(this, s); e?(e.option(n || {}), e._init && e._init()):t.data(this, s, new i(n, this))})), r}}, t.Widget = function(){}, t.Widget._childConstructors = [], t.Widget.prototype = {widgetName:"widget", widgetEventPrefix:"", defaultElement:"<div>", options:{disabled:!1, create:null}, _createWidget:function(e, i){i = t(i || this.defaultElement || this)[0], this.element = t(i), this.uuid = l++, this.eventNamespace = "." + this.widgetName + this.uuid, this.bindings = t(), this.hoverable = t(), this.focusable = t(), i !== this && (t.data(i, this.widgetFullName, this), this._on(!0, this.element, {remove:function(t){t.target === i && this.destroy()}}), this.document = t(i.style?i.ownerDocument:i.document || i), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this.options = t.widget.extend({}, this.options, this._getCreateOptions(), e), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()}, _getCreateOptions:t.noop, _getCreateEventData:t.noop, _create:t.noop, _init:t.noop, destroy:function(){this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")}, _destroy:t.noop, widget:function(){return this.element}, option:function(e, i){var s, n, o, a = e; if (0 === arguments.length)return t.widget.extend({}, this.options); if ("string" == typeof e)if (a = {}, s = e.split("."), e = s.shift(), s.length){for (n = a[e] = t.widget.extend({}, this.options[e]), o = 0; o < s.length - 1; o++)n[s[o]] = n[s[o]] || {}, n = n[s[o]]; if (e = s.pop(), 1 === arguments.length)return void 0 === n[e]?null:n[e]; n[e] = i} else{if (1 === arguments.length)return void 0 === this.options[e]?null:this.options[e]; a[e] = i}return this._setOptions(a), this}, _setOptions:function(t){var e; for (e in t)this._setOption(e, t[e]); return this}, _setOption:function(t, e){return this.options[t] = e, "disabled" === t && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!e), e && (this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus"))), this}, enable:function(){return this._setOptions({disabled:!1})}, disable:function(){return this._setOptions({disabled:!0})}, _on:function(e, i, s){var n, o = this; "boolean" != typeof e && (s = i, i = e, e = !1), s?(i = n = t(i), this.bindings = this.bindings.add(i)):(s = i, i = this.element, n = this.widget()), t.each(s, function(s, a){function r(){if (e || !0 !== o.options.disabled && !t(this).hasClass("ui-state-disabled"))return("string" == typeof a?o[a]:a).apply(o, arguments)}"string" != typeof a && (r.guid = a.guid = a.guid || r.guid || t.guid++); var h = s.match(/^([\w:-]*)\s*(.*)$/), l = h[1] + o.eventNamespace, c = h[2]; c?n.delegate(c, l, r):i.bind(l, r)})}, _off:function(e, i){i = (i || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(i).undelegate(i), this.bindings = t(this.bindings.not(e).get()), this.focusable = t(this.focusable.not(e).get()), this.hoverable = t(this.hoverable.not(e).get())}, _delay:function(t, e){var i = this; return setTimeout(function(){return("string" == typeof t?i[t]:t).apply(i, arguments)}, e || 0)}, _hoverable:function(e){this.hoverable = this.hoverable.add(e), this._on(e, {mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")}, mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})}, _focusable:function(e){this.focusable = this.focusable.add(e), this._on(e, {focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")}, focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})}, _trigger:function(e, i, s){var n, o, a = this.options[e]; if (s = s || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix?e:this.widgetEventPrefix + e).toLowerCase(), i.target = this.element[0], o = i.originalEvent)for (n in o)n in i || (i[n] = o[n]); return this.element.trigger(i, s), !(t.isFunction(a) && !1 === a.apply(this.element[0], [i].concat(s)) || i.isDefaultPrevented())}}, t.each({show:"fadeIn", hide:"fadeOut"}, function(e, i){t.Widget.prototype["_" + e] = function(s, n, o){"string" == typeof n && (n = {effect:n}); var a, r = n?!0 === n || "number" == typeof n?i:n.effect || i:e; "number" == typeof (n = n || {}) && (n = {duration:n}), a = !t.isEmptyObject(n), n.complete = o, n.delay && s.delay(n.delay), a && t.effects && t.effects.effect[r]?s[e](n):r !== e && s[r]?s[r](n.duration, n.easing, o):s.queue(function(i){t(this)[e](), o && o.call(s[0]), i()})}}); t.widget; var u = !1; t(document).mouseup(function(){u = !1}); t.widget("ui.mouse", {version:"1.11.4", options:{cancel:"input,textarea,button,select,option", distance:1, delay:0}, _mouseInit:function(){var e = this; this.element.bind("mousedown." + this.widgetName, function(t){return e._mouseDown(t)}).bind("click." + this.widgetName, function(i){if (!0 === t.data(i.target, e.widgetName + ".preventClickEvent"))return t.removeData(i.target, e.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1}), this.started = !1}, _mouseDestroy:function(){this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)}, _mouseDown:function(e){if (!u){this._mouseMoved = !1, this._mouseStarted && this._mouseUp(e), this._mouseDownEvent = e; var i = this, s = 1 === e.which, n = !("string" != typeof this.options.cancel || !e.target.nodeName) && t(e.target).closest(this.options.cancel).length; return!(s && !n && this._mouseCapture(e)) || (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function(){i.mouseDelayMet = !0}, this.options.delay)), this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = !1 !== this._mouseStart(e), !this._mouseStarted)?(e.preventDefault(), !0):(!0 === t.data(e.target, this.widgetName + ".preventClickEvent") && t.removeData(e.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(t){return i._mouseMove(t)}, this._mouseUpDelegate = function(t){return i._mouseUp(t)}, this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), e.preventDefault(), u = !0, !0))}}, _mouseMove:function(e){if (this._mouseMoved){if (t.ui.ie && (!document.documentMode || document.documentMode < 9) && !e.button)return this._mouseUp(e); if (!e.which)return this._mouseUp(e)}return(e.which || e.button) && (this._mouseMoved = !0), this._mouseStarted?(this._mouseDrag(e), e.preventDefault()):(this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = !1 !== this._mouseStart(this._mouseDownEvent, e), this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)), !this._mouseStarted)}, _mouseUp:function(e){return this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, e.target === this._mouseDownEvent.target && t.data(e.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(e)), u = !1, !1}, _mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance}, _mouseDelayMet:function(){return this.mouseDelayMet}, _mouseStart:function(){}, _mouseDrag:function(){}, _mouseStop:function(){}, _mouseCapture:function(){return!0}}); !function(){function e(t, e, i){return[parseFloat(t[0]) * (p.test(t[0])?e / 100:1), parseFloat(t[1]) * (p.test(t[1])?i / 100:1)]}function i(e, i){return parseInt(t.css(e, i), 10) || 0}function s(e){var i = e[0]; return 9 === i.nodeType?{width:e.width(), height:e.height(), offset:{top:0, left:0}}:t.isWindow(i)?{width:e.width(), height:e.height(), offset:{top:e.scrollTop(), left:e.scrollLeft()}}:i.preventDefault?{width:0, height:0, offset:{top:i.pageY, left:i.pageX}}:{width:e.outerWidth(), height:e.outerHeight(), offset:e.offset()}}t.ui = t.ui || {}; var n, o, a = Math.max, r = Math.abs, h = Math.round, l = /left|center|right/, c = /top|center|bottom/, u = /[\+\-]\d+(\.[\d]+)?%?/, d = /^\w+/, p = /%$/, f = t.fn.position; t.position = {scrollbarWidth:function(){if (void 0 !== n)return n; var e, i, s = t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = s.children()[0]; return t("body").append(s), e = o.offsetWidth, s.css("overflow", "scroll"), i = o.offsetWidth, e === i && (i = s[0].clientWidth), s.remove(), n = e - i}, getScrollInfo:function(e){var i = e.isWindow || e.isDocument?"":e.element.css("overflow-x"), s = e.isWindow || e.isDocument?"":e.element.css("overflow-y"), n = "scroll" === i || "auto" === i && e.width < e.element[0].scrollWidth; return{width:"scroll" === s || "auto" === s && e.height < e.element[0].scrollHeight?t.position.scrollbarWidth():0, height:n?t.position.scrollbarWidth():0}}, getWithinInfo:function(e){var i = t(e || window), s = t.isWindow(i[0]), n = !!i[0] && 9 === i[0].nodeType; return{element:i, isWindow:s, isDocument:n, offset:i.offset() || {left:0, top:0}, scrollLeft:i.scrollLeft(), scrollTop:i.scrollTop(), width:s || n?i.width():i.outerWidth(), height:s || n?i.height():i.outerHeight()}}}, t.fn.position = function(n){if (!n || !n.of)return f.apply(this, arguments); n = t.extend({}, n); var p, m, g, v, _, b, y = t(n.of), w = t.position.getWithinInfo(n.within), x = t.position.getScrollInfo(w), k = (n.collision || "flip").split(" "), C = {}; return b = s(y), y[0].preventDefault && (n.at = "left top"), m = b.width, g = b.height, v = b.offset, _ = t.extend({}, v), t.each(["my", "at"], function(){var t, e, i = (n[this] || "").split(" "); 1 === i.length && (i = l.test(i[0])?i.concat(["center"]):c.test(i[0])?["center"].concat(i):["center", "center"]), i[0] = l.test(i[0])?i[0]:"center", i[1] = c.test(i[1])?i[1]:"center", t = u.exec(i[0]), e = u.exec(i[1]), C[this] = [t?t[0]:0, e?e[0]:0], n[this] = [d.exec(i[0])[0], d.exec(i[1])[0]]}), 1 === k.length && (k[1] = k[0]), "right" === n.at[0]?_.left += m:"center" === n.at[0] && (_.left += m / 2), "bottom" === n.at[1]?_.top += g:"center" === n.at[1] && (_.top += g / 2), p = e(C.at, m, g), _.left += p[0], _.top += p[1], this.each(function(){var s, l, c = t(this), u = c.outerWidth(), d = c.outerHeight(), f = i(this, "marginLeft"), b = i(this, "marginTop"), D = u + f + i(this, "marginRight") + x.width, I = d + b + i(this, "marginBottom") + x.height, T = t.extend({}, _), P = e(C.my, c.outerWidth(), c.outerHeight()); "right" === n.my[0]?T.left -= u:"center" === n.my[0] && (T.left -= u / 2), "bottom" === n.my[1]?T.top -= d:"center" === n.my[1] && (T.top -= d / 2), T.left += P[0], T.top += P[1], o || (T.left = h(T.left), T.top = h(T.top)), s = {marginLeft:f, marginTop:b}, t.each(["left", "top"], function(e, i){t.ui.position[k[e]] && t.ui.position[k[e]][i](T, {targetWidth:m, targetHeight:g, elemWidth:u, elemHeight:d, collisionPosition:s, collisionWidth:D, collisionHeight:I, offset:[p[0] + P[0], p[1] + P[1]], my:n.my, at:n.at, within:w, elem:c})}), n.using && (l = function(t){var e = v.left - T.left, i = e + m - u, s = v.top - T.top, o = s + g - d, h = {target:{element:y, left:v.left, top:v.top, width:m, height:g}, element:{element:c, left:T.left, top:T.top, width:u, height:d}, horizontal:i < 0?"left":e > 0?"right":"center", vertical:o < 0?"top":s > 0?"bottom":"middle"}; m < u && r(e + i) < m && (h.horizontal = "center"), g < d && r(s + o) < g && (h.vertical = "middle"), a(r(e), r(i)) > a(r(s), r(o))?h.important = "horizontal":h.important = "vertical", n.using.call(this, t, h)}), c.offset(t.extend(T, {using:l}))})}, t.ui.position = {fit:{left:function(t, e){var i, s = e.within, n = s.isWindow?s.scrollLeft:s.offset.left, o = s.width, r = t.left - e.collisionPosition.marginLeft, h = n - r, l = r + e.collisionWidth - o - n; e.collisionWidth > o?h > 0 && l <= 0?(i = t.left + h + e.collisionWidth - o - n, t.left += h - i):t.left = l > 0 && h <= 0?n:h > l?n + o - e.collisionWidth:n:h > 0?t.left += h:l > 0?t.left -= l:t.left = a(t.left - r, t.left)}, top:function(t, e){var i, s = e.within, n = s.isWindow?s.scrollTop:s.offset.top, o = e.within.height, r = t.top - e.collisionPosition.marginTop, h = n - r, l = r + e.collisionHeight - o - n; e.collisionHeight > o?h > 0 && l <= 0?(i = t.top + h + e.collisionHeight - o - n, t.top += h - i):t.top = l > 0 && h <= 0?n:h > l?n + o - e.collisionHeight:n:h > 0?t.top += h:l > 0?t.top -= l:t.top = a(t.top - r, t.top)}}, flip:{left:function(t, e){var i, s, n = e.within, o = n.offset.left + n.scrollLeft, a = n.width, h = n.isWindow?n.scrollLeft:n.offset.left, l = t.left - e.collisionPosition.marginLeft, c = l - h, u = l + e.collisionWidth - a - h, d = "left" === e.my[0]? - e.elemWidth:"right" === e.my[0]?e.elemWidth:0, p = "left" === e.at[0]?e.targetWidth:"right" === e.at[0]? - e.targetWidth:0, f = - 2 * e.offset[0]; c < 0?((i = t.left + d + p + f + e.collisionWidth - a - o) < 0 || i < r(c)) && (t.left += d + p + f):u > 0 && ((s = t.left - e.collisionPosition.marginLeft + d + p + f - h) > 0 || r(s) < u) && (t.left += d + p + f)}, top:function(t, e){var i, s, n = e.within, o = n.offset.top + n.scrollTop, a = n.height, h = n.isWindow?n.scrollTop:n.offset.top, l = t.top - e.collisionPosition.marginTop, c = l - h, u = l + e.collisionHeight - a - h, d = "top" === e.my[1]? - e.elemHeight:"bottom" === e.my[1]?e.elemHeight:0, p = "top" === e.at[1]?e.targetHeight:"bottom" === e.at[1]? - e.targetHeight:0, f = - 2 * e.offset[1]; c < 0?((s = t.top + d + p + f + e.collisionHeight - a - o) < 0 || s < r(c)) && (t.top += d + p + f):u > 0 && ((i = t.top - e.collisionPosition.marginTop + d + p + f - h) > 0 || r(i) < u) && (t.top += d + p + f)}}, flipfit:{left:function(){t.ui.position.flip.left.apply(this, arguments), t.ui.position.fit.left.apply(this, arguments)}, top:function(){t.ui.position.flip.top.apply(this, arguments), t.ui.position.fit.top.apply(this, arguments)}}}, function(){var e, i, s, n, a, r = document.getElementsByTagName("body")[0], h = document.createElement("div"); e = document.createElement(r?"div":"body"), s = {visibility:"hidden", width:0, height:0, border:0, margin:0, background:"none"}, r && t.extend(s, {position:"absolute", left:"-1000px", top:"-1000px"}); for (a in s)e.style[a] = s[a]; e.appendChild(h), (i = r || document.documentElement).insertBefore(e, i.firstChild), h.style.cssText = "position: absolute; left: 10.7432222px;", n = t(h).offset().left, o = n > 10 && n < 11, e.innerHTML = "", i.removeChild(e)}()}(); t.ui.position, t.widget("ui.accordion", {version:"1.11.4", options:{active:0, animate:{}, collapsible:!1, event:"click", header:"> li > :first-child,> :not(li):even", heightStyle:"auto", icons:{activeHeader:"ui-icon-triangle-1-s", header:"ui-icon-triangle-1-e"}, activate:null, beforeActivate:null}, hideProps:{borderTopWidth:"hide", borderBottomWidth:"hide", paddingTop:"hide", paddingBottom:"hide", height:"hide"}, showProps:{borderTopWidth:"show", borderBottomWidth:"show", paddingTop:"show", paddingBottom:"show", height:"show"}, _create:function(){var e = this.options; this.prevShow = this.prevHide = t(), this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role", "tablist"), e.collapsible || !1 !== e.active && null != e.active || (e.active = 0), this._processPanels(), e.active < 0 && (e.active += this.headers.length), this._refresh()}, _getCreateEventData:function(){return{header:this.active, panel:this.active.length?this.active.next():t()}}, _createIcons:function(){var e = this.options.icons; e && (t("<span>").addClass("ui-accordion-header-icon ui-icon " + e.header).prependTo(this.headers), this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader), this.headers.addClass("ui-accordion-icons"))}, _destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()}, _destroy:function(){var t; this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(), this._destroyIcons(), t = this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display", "").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(), "content" !== this.options.heightStyle && t.css("height", "")}, _setOption:function(t, e){"active" !== t?("event" === t && (this.options.event && this._off(this.headers, this.options.event), this._setupEvents(e)), this._super(t, e), "collapsible" !== t || e || !1 !== this.options.active || this._activate(0), "icons" === t && (this._destroyIcons(), e && this._createIcons()), "disabled" === t && (this.element.toggleClass("ui-state-disabled", !!e).attr("aria-disabled", e), this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!e))):this._activate(e)}, _keydown:function(e){if (!e.altKey && !e.ctrlKey){var i = t.ui.keyCode, s = this.headers.length, n = this.headers.index(e.target), o = !1; switch (e.keyCode){case i.RIGHT:case i.DOWN:o = this.headers[(n + 1) % s]; break; case i.LEFT:case i.UP:o = this.headers[(n - 1 + s) % s]; break; case i.SPACE:case i.ENTER:this._eventHandler(e); break; case i.HOME:o = this.headers[0]; break; case i.END:o = this.headers[s - 1]}o && (t(e.target).attr("tabIndex", - 1), t(o).attr("tabIndex", 0), o.focus(), e.preventDefault())}}, _panelKeyDown:function(e){e.keyCode === t.ui.keyCode.UP && e.ctrlKey && t(e.currentTarget).prev().focus()}, refresh:function(){var e = this.options; this._processPanels(), !1 === e.active && !0 === e.collapsible || !this.headers.length?(e.active = !1, this.active = t()):!1 === e.active?this._activate(0):this.active.length && !t.contains(this.element[0], this.active[0])?this.headers.length === this.headers.find(".ui-state-disabled").length?(e.active = !1, this.active = t()):this._activate(Math.max(0, e.active - 1)):e.active = this.headers.index(this.active), this._destroyIcons(), this._refresh()}, _processPanels:function(){var t = this.headers, e = this.panels; this.headers = this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"), this.panels = this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(), e && (this._off(t.not(this.headers)), this._off(e.not(this.panels)))}, _refresh:function(){var e, i = this.options, s = i.heightStyle, n = this.element.parent(); this.active = this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"), this.active.next().addClass("ui-accordion-content-active").show(), this.headers.attr("role", "tab").each(function(){var e = t(this), i = e.uniqueId().attr("id"), s = e.next(), n = s.uniqueId().attr("id"); e.attr("aria-controls", n), s.attr("aria-labelledby", i)}).next().attr("role", "tabpanel"), this.headers.not(this.active).attr({"aria-selected":"false", "aria-expanded":"false", tabIndex: - 1}).next().attr({"aria-hidden":"true"}).hide(), this.active.length?this.active.attr({"aria-selected":"true", "aria-expanded":"true", tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex", 0), this._createIcons(), this._setupEvents(i.event), "fill" === s?(e = n.height(), this.element.siblings(":visible").each(function(){var i = t(this), s = i.css("position"); "absolute" !== s && "fixed" !== s && (e -= i.outerHeight(!0))}), this.headers.each(function(){e -= t(this).outerHeight(!0)}), this.headers.next().each(function(){t(this).height(Math.max(0, e - t(this).innerHeight() + t(this).height()))}).css("overflow", "auto")):"auto" === s && (e = 0, this.headers.next().each(function(){e = Math.max(e, t(this).css("height", "").height())}).height(e))}, _activate:function(e){var i = this._findActive(e)[0]; i !== this.active[0] && (i = i || this.active[0], this._eventHandler({target:i, currentTarget:i, preventDefault:t.noop}))}, _findActive:function(e){return"number" == typeof e?this.headers.eq(e):t()}, _setupEvents:function(e){var i = {keydown:"_keydown"}; e && t.each(e.split(" "), function(t, e){i[e] = "_eventHandler"}), this._off(this.headers.add(this.headers.next())), this._on(this.headers, i), this._on(this.headers.next(), {keydown:"_panelKeyDown"}), this._hoverable(this.headers), this._focusable(this.headers)}, _eventHandler:function(e){var i = this.options, s = this.active, n = t(e.currentTarget), o = n[0] === s[0], a = o && i.collapsible, r = a?t():n.next(), h = {oldHeader:s, oldPanel:s.next(), newHeader:a?t():n, newPanel:r}; e.preventDefault(), o && !i.collapsible || !1 === this._trigger("beforeActivate", e, h) || (i.active = !a && this.headers.index(n), this.active = o?t():n, this._toggle(h), s.removeClass("ui-accordion-header-active ui-state-active"), i.icons && s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header), o || (n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"), i.icons && n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader), n.next().addClass("ui-accordion-content-active")))}, _toggle:function(e){var i = e.newPanel, s = this.prevShow.length?this.prevShow:e.oldPanel; this.prevShow.add(this.prevHide).stop(!0, !0), this.prevShow = i, this.prevHide = s, this.options.animate?this._animate(i, s, e):(s.hide(), i.show(), this._toggleComplete(e)), s.attr({"aria-hidden":"true"}), s.prev().attr({"aria-selected":"false", "aria-expanded":"false"}), i.length && s.length?s.prev().attr({tabIndex: - 1, "aria-expanded":"false"}):i.length && this.headers.filter(function(){return 0 === parseInt(t(this).attr("tabIndex"), 10)}).attr("tabIndex", - 1), i.attr("aria-hidden", "false").prev().attr({"aria-selected":"true", "aria-expanded":"true", tabIndex:0})}, _animate:function(t, e, i){var s, n, o, a = this, r = 0, h = t.css("box-sizing"), l = t.length && (!e.length || t.index() < e.index()), c = this.options.animate || {}, u = l && c.down || c, d = function(){a._toggleComplete(i)}; return"number" == typeof u && (o = u), "string" == typeof u && (n = u), n = n || u.easing || c.easing, o = o || u.duration || c.duration, e.length?t.length?(s = t.show().outerHeight(), e.animate(this.hideProps, {duration:o, easing:n, step:function(t, e){e.now = Math.round(t)}}), void t.hide().animate(this.showProps, {duration:o, easing:n, complete:d, step:function(t, i){i.now = Math.round(t), "height" !== i.prop?"content-box" === h && (r += i.now):"content" !== a.options.heightStyle && (i.now = Math.round(s - e.outerHeight() - r), r = 0)}})):e.animate(this.hideProps, o, n, d):t.animate(this.showProps, o, n, d)}, _toggleComplete:function(t){var e = t.oldPanel; e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"), e.length && (e.parent()[0].className = e.parent()[0].className), this._trigger("activate", null, t)}}), t.widget("ui.menu", {version:"1.11.4", defaultElement:"<ul>", delay:300, options:{icons:{submenu:"ui-icon-carat-1-e"}, items:"> *", menus:"ul", position:{my:"left-1 top", at:"right top"}, role:"menu", blur:null, focus:null, select:null}, _create:function(){this.activeMenu = this.element, this.mouseHandled = !1, this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({role:this.options.role, tabIndex:0}), this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"), this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()}, "click .ui-menu-item":function(e){var i = t(e.target); !this.mouseHandled && i.not(".ui-state-disabled").length && (this.select(e), e.isPropagationStopped() || (this.mouseHandled = !0), i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus") && t(this.document[0].activeElement).closest(".ui-menu").length && (this.element.trigger("focus", [!0]), this.active && 1 === this.active.parents(".ui-menu").length && clearTimeout(this.timer)))}, "mouseenter .ui-menu-item":function(e){if (!this.previousFilter){var i = t(e.currentTarget); i.siblings(".ui-state-active").removeClass("ui-state-active"), this.focus(e, i)}}, mouseleave:"collapseAll", "mouseleave .ui-menu":"collapseAll", focus:function(t, e){var i = this.active || this.element.find(this.options.items).eq(0); e || this.focus(t, i)}, blur:function(e){this._delay(function(){t.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(e)})}, keydown:"_keydown"}), this.refresh(), this._on(this.document, {click:function(t){this._closeOnDocumentClick(t) && this.collapseAll(t), this.mouseHandled = !1}})}, _destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e = t(this); e.data("ui-menu-submenu-carat") && e.remove()}), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")}, _keydown:function(e){var i, s, n, o, a = !0; switch (e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e); break; case t.ui.keyCode.PAGE_DOWN:this.nextPage(e); break; case t.ui.keyCode.HOME:this._move("first", "first", e); break; case t.ui.keyCode.END:this._move("last", "last", e); break; case t.ui.keyCode.UP:this.previous(e); break; case t.ui.keyCode.DOWN:this.next(e); break; case t.ui.keyCode.LEFT:this.collapse(e); break; case t.ui.keyCode.RIGHT:this.active && !this.active.is(".ui-state-disabled") && this.expand(e); break; case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e); break; case t.ui.keyCode.ESCAPE:this.collapse(e); break; default:a = !1, s = this.previousFilter || "", n = String.fromCharCode(e.keyCode), o = !1, clearTimeout(this.filterTimer), n === s?o = !0:n = s + n, i = this._filterMenuItems(n), (i = o && - 1 !== i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length || (n = String.fromCharCode(e.keyCode), i = this._filterMenuItems(n)), i.length?(this.focus(e, i), this.previousFilter = n, this.filterTimer = this._delay(function(){delete this.previousFilter}, 1e3)):delete this.previousFilter}a && e.preventDefault()}, _activate:function(t){this.active.is(".ui-state-disabled") || (this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))}, refresh:function(){var e, i = this, s = this.options.icons.submenu, n = this.element.find(this.options.menus); this.element.toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length), n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role, "aria-hidden":"true", "aria-expanded":"false"}).each(function(){var e = t(this), i = e.parent(), n = t("<span>").addClass("ui-menu-icon ui-icon " + s).data("ui-menu-submenu-carat", !0); i.attr("aria-haspopup", "true").prepend(n), e.attr("aria-labelledby", i.attr("id"))}), (e = n.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e = t(this); i._isDivider(e) && e.addClass("ui-widget-content ui-menu-divider")}), e.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex: - 1, role:this._itemRole()}), e.filter(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !t.contains(this.element[0], this.active[0]) && this.blur()}, _itemRole:function(){return{menu:"menuitem", listbox:"option"}[this.options.role]}, _setOption:function(t, e){"icons" === t && this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu), "disabled" === t && this.element.toggleClass("ui-state-disabled", !!e).attr("aria-disabled", e), this._super(t, e)}, focus:function(t, e){var i, s; this.blur(t, t && "focus" === t.type), this._scrollIntoView(e), this.active = e.first(), s = this.active.addClass("ui-state-focus").removeClass("ui-state-active"), this.options.role && this.element.attr("aria-activedescendant", s.attr("id")), this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"), t && "keydown" === t.type?this._close():this.timer = this._delay(function(){this._close()}, this.delay), (i = e.children(".ui-menu")).length && t && /^mouse/.test(t.type) && this._startOpening(i), this.activeMenu = e.parent(), this._trigger("focus", t, {item:e})}, _scrollIntoView:function(e){var i, s, n, o, a, r; this._hasScroll() && (i = parseFloat(t.css(this.activeMenu[0], "borderTopWidth")) || 0, s = parseFloat(t.css(this.activeMenu[0], "paddingTop")) || 0, n = e.offset().top - this.activeMenu.offset().top - i - s, o = this.activeMenu.scrollTop(), a = this.activeMenu.height(), r = e.outerHeight(), n < 0?this.activeMenu.scrollTop(o + n):n + r > a && this.activeMenu.scrollTop(o + n - a + r))}, blur:function(t, e){e || clearTimeout(this.timer), this.active && (this.active.removeClass("ui-state-focus"), this.active = null, this._trigger("blur", t, {item:this.active}))}, _startOpening:function(t){clearTimeout(this.timer), "true" === t.attr("aria-hidden") && (this.timer = this._delay(function(){this._close(), this._open(t)}, this.delay))}, _open:function(e){var i = t.extend({of:this.active}, this.options.position); clearTimeout(this.timer), this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden", "true"), e.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(i)}, collapseAll:function(e, i){clearTimeout(this.timer), this.timer = this._delay(function(){var s = i?this.element:t(e && e.target).closest(this.element.find(".ui-menu")); s.length || (s = this.element), this._close(s), this.blur(e), this.activeMenu = s}, this.delay)}, _close:function(t){t || (t = this.active?this.active.parent():this.element), t.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")}, _closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length}, _isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())}, collapse:function(t){var e = this.active && this.active.parent().closest(".ui-menu-item", this.element); e && e.length && (this._close(), this.focus(t, e))}, expand:function(t){var e = this.active && this.active.children(".ui-menu ").find(this.options.items).first(); e && e.length && (this._open(e.parent()), this._delay(function(){this.focus(t, e)}))}, next:function(t){this._move("next", "first", t)}, previous:function(t){this._move("prev", "last", t)}, isFirstItem:function(){return this.active && !this.active.prevAll(".ui-menu-item").length}, isLastItem:function(){return this.active && !this.active.nextAll(".ui-menu-item").length}, _move:function(t, e, i){var s; this.active && (s = "first" === t || "last" === t?this.active["first" === t?"prevAll":"nextAll"](".ui-menu-item").eq( - 1):this.active[t + "All"](".ui-menu-item").eq(0)), s && s.length && this.active || (s = this.activeMenu.find(this.options.items)[e]()), this.focus(i, s)}, nextPage:function(e){var i, s, n; this.active?this.isLastItem() || (this._hasScroll()?(s = this.active.offset().top, n = this.element.height(), this.active.nextAll(".ui-menu-item").each(function(){return(i = t(this)).offset().top - s - n < 0}), this.focus(e, i)):this.focus(e, this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)}, previousPage:function(e){var i, s, n; this.active?this.isFirstItem() || (this._hasScroll()?(s = this.active.offset().top, n = this.element.height(), this.active.prevAll(".ui-menu-item").each(function(){return(i = t(this)).offset().top - s + n > 0}), this.focus(e, i)):this.focus(e, this.activeMenu.find(this.options.items).first())):this.next(e)}, _hasScroll:function(){return this.element.outerHeight() < this.element.prop("scrollHeight")}, select:function(e){this.active = this.active || t(e.target).closest(".ui-menu-item"); var i = {item:this.active}; this.active.has(".ui-menu").length || this.collapseAll(e, !0), this._trigger("select", e, i)}, _filterMenuItems:function(e){var i = e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), s = new RegExp("^" + i, "i"); return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).text()))})}}); t.widget("ui.autocomplete", {version:"1.11.4", defaultElement:"<input>", options:{appendTo:null, autoFocus:!1, delay:300, minLength:1, position:{my:"left top", at:"left bottom", collision:"none"}, source:null, change:null, close:null, focus:null, open:null, response:null, search:null, select:null}, requestIndex:0, pending:0, _create:function(){var e, i, s, n = this.element[0].nodeName.toLowerCase(), o = "textarea" === n, a = "input" === n; this.isMultiLine = !!o || !a && this.element.prop("isContentEditable"), this.valueMethod = this.element[o || a?"val":"text"], this.isNewMenu = !0, this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {keydown:function(n){if (this.element.prop("readOnly"))return e = !0, s = !0, void(i = !0); e = !1, s = !1, i = !1; var o = t.ui.keyCode; switch (n.keyCode){case o.PAGE_UP:e = !0, this._move("previousPage", n); break; case o.PAGE_DOWN:e = !0, this._move("nextPage", n); break; case o.UP:e = !0, this._keyEvent("previous", n); break; case o.DOWN:e = !0, this._keyEvent("next", n); break; case o.ENTER:this.menu.active && (e = !0, n.preventDefault(), this.menu.select(n)); break; case o.TAB:this.menu.active && this.menu.select(n); break; case o.ESCAPE:this.menu.element.is(":visible") && (this.isMultiLine || this._value(this.term), this.close(n), n.preventDefault()); break; default:i = !0, this._searchTimeout(n)}}, keypress:function(s){if (e)return e = !1, void(this.isMultiLine && !this.menu.element.is(":visible") || s.preventDefault()); if (!i){var n = t.ui.keyCode; switch (s.keyCode){case n.PAGE_UP:this._move("previousPage", s); break; case n.PAGE_DOWN:this._move("nextPage", s); break; case n.UP:this._keyEvent("previous", s); break; case n.DOWN:this._keyEvent("next", s)}}}, input:function(t){if (s)return s = !1, void t.preventDefault(); this._searchTimeout(t)}, focus:function(){this.selectedItem = null, this.previous = this._value()}, blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching), this.close(t), this._change(t))}}), this._initSource(), this.menu = t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"), this._on(this.menu.element, {mousedown:function(e){e.preventDefault(), this.cancelBlur = !0, this._delay(function(){delete this.cancelBlur}); var i = this.menu.element[0]; t(e.target).closest(".ui-menu-item").length || this._delay(function(){var e = this; this.document.one("mousedown", function(s){s.target === e.element[0] || s.target === i || t.contains(i, s.target) || e.close()})})}, menufocus:function(e, i){var s, n; if (this.isNewMenu && (this.isNewMenu = !1, e.originalEvent && /^mouse/.test(e.originalEvent.type)))return this.menu.blur(), void this.document.one("mousemove", function(){t(e.target).trigger(e.originalEvent)}); n = i.item.data("ui-autocomplete-item"), !1 !== this._trigger("focus", e, {item:n}) && e.originalEvent && /^key/.test(e.originalEvent.type) && this._value(n.value), (s = i.item.attr("aria-label") || n.value) && t.trim(s).length && (this.liveRegion.children().hide(), t("<div>").text(s).appendTo(this.liveRegion))}, menuselect:function(t, e){var i = e.item.data("ui-autocomplete-item"), s = this.previous; this.element[0] !== this.document[0].activeElement && (this.element.focus(), this.previous = s, this._delay(function(){this.previous = s, this.selectedItem = i})), !1 !== this._trigger("select", t, {item:i}) && this._value(i.value), this.term = this._value(), this.close(t), this.selectedItem = i}}), this.liveRegion = t("<span>", {role:"status", "aria-live":"assertive", "aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body), this._on(this.window, {beforeunload:function(){this.element.removeAttr("autocomplete")}})}, _destroy:function(){clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()}, _setOption:function(t, e){this._super(t, e), "source" === t && this._initSource(), "appendTo" === t && this.menu.element.appendTo(this._appendTo()), "disabled" === t && e && this.xhr && this.xhr.abort()}, _appendTo:function(){var e = this.options.appendTo; return e && (e = e.jquery || e.nodeType?t(e):this.document.find(e).eq(0)), e && e[0] || (e = this.element.closest(".ui-front")), e.length || (e = this.document[0].body), e}, _initSource:function(){var e, i, s = this; t.isArray(this.options.source)?(e = this.options.source, this.source = function(i, s){s(t.ui.autocomplete.filter(e, i.term))}):"string" == typeof this.options.source?(i = this.options.source, this.source = function(e, n){s.xhr && s.xhr.abort(), s.xhr = t.ajax({url:i, data:e, dataType:"json", success:function(t){n(t)}, error:function(){n([])}})}):this.source = this.options.source}, _searchTimeout:function(t){clearTimeout(this.searching), this.searching = this._delay(function(){var e = this.term === this._value(), i = this.menu.element.is(":visible"), s = t.altKey || t.ctrlKey || t.metaKey || t.shiftKey; e && (!e || i || s) || (this.selectedItem = null, this.search(null, t))}, this.options.delay)}, search:function(t, e){return t = null != t?t:this._value(), this.term = this._value(), t.length < this.options.minLength?this.close(e):!1 !== this._trigger("search", e)?this._search(t):void 0}, _search:function(t){this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({term:t}, this._response())}, _response:function(){var e = ++this.requestIndex; return t.proxy(function(t){e === this.requestIndex && this.__response(t), --this.pending || this.element.removeClass("ui-autocomplete-loading")}, this)}, __response:function(t){t && (t = this._normalize(t)), this._trigger("response", null, {content:t}), !this.options.disabled && t && t.length && !this.cancelSearch?(this._suggest(t), this._trigger("open")):this._close()}, close:function(t){this.cancelSearch = !0, this._close(t)}, _close:function(t){this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", t))}, _change:function(t){this.previous !== this._value() && this._trigger("change", t, {item:this.selectedItem})}, _normalize:function(e){return e.length && e[0].label && e[0].value?e:t.map(e, function(e){return"string" == typeof e?{label:e, value:e}:t.extend({}, e, {label:e.label || e.value, value:e.value || e.label})})}, _suggest:function(e){var i = this.menu.element.empty(); this._renderMenu(i, e), this.isNewMenu = !0, this.menu.refresh(), i.show(), this._resizeMenu(), i.position(t.extend({of:this.element}, this.options.position)), this.options.autoFocus && this.menu.next()}, _resizeMenu:function(){var t = this.menu.element; t.outerWidth(Math.max(t.width("").outerWidth() + 1, this.element.outerWidth()))}, _renderMenu:function(e, i){var s = this; t.each(i, function(t, i){s._renderItemData(e, i)})}, _renderItemData:function(t, e){return this._renderItem(t, e).data("ui-autocomplete-item", e)}, _renderItem:function(e, i){return t("<li>").text(i.label).appendTo(e)}, _move:function(t, e){if (this.menu.element.is(":visible"))return this.menu.isFirstItem() && /^previous/.test(t) || this.menu.isLastItem() && /^next/.test(t)?(this.isMultiLine || this._value(this.term), void this.menu.blur()):void this.menu[t](e); this.search(null, e)}, widget:function(){return this.menu.element}, _value:function(){return this.valueMethod.apply(this.element, arguments)}, _keyEvent:function(t, e){this.isMultiLine && !this.menu.element.is(":visible") || (this._move(t, e), e.preventDefault())}}), t.extend(t.ui.autocomplete, {escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")}, filter:function(e, i){var s = new RegExp(t.ui.autocomplete.escapeRegex(i), "i"); return t.grep(e, function(t){return s.test(t.label || t.value || t)})}}), t.widget("ui.autocomplete", t.ui.autocomplete, {options:{messages:{noResults:"No search results.", results:function(t){return t + (t > 1?" results are":" result is") + " available, use up and down arrow keys to navigate."}}}, __response:function(e){var i; this._superApply(arguments), this.options.disabled || this.cancelSearch || (i = e && e.length?this.options.messages.results(e.length):this.options.messages.noResults, this.liveRegion.children().hide(), t("<div>").text(i).appendTo(this.liveRegion))}}); t.ui.autocomplete; var d, p = "ui-button ui-widget ui-state-default ui-corner-all", f = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", m = function(){var e = t(this); setTimeout(function(){e.find(":ui-button").button("refresh")}, 1)}, g = function(e){var i = e.name, s = e.form, n = t([]); return i && (i = i.replace(/'/g, "\\'"), n = s?t(s).find("[name='" + i + "'][type=radio]"):t("[name='" + i + "'][type=radio]", e.ownerDocument).filter(function(){return!this.form})), n}; t.widget("ui.button", {version:"1.11.4", defaultElement:"<button>", options:{disabled:null, text:!0, label:null, icons:{primary:null, secondary:null}}, _create:function(){this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, m), "boolean" != typeof this.options.disabled?this.options.disabled = !!this.element.prop("disabled"):this.element.prop("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title"); var e = this, i = this.options, s = "checkbox" === this.type || "radio" === this.type, n = s?"":"ui-state-active"; null === i.label && (i.label = "input" === this.type?this.buttonElement.val():this.buttonElement.html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(p).attr("role", "button").bind("mouseenter" + this.eventNamespace, function(){i.disabled || this === d && t(this).addClass("ui-state-active")}).bind("mouseleave" + this.eventNamespace, function(){i.disabled || t(this).removeClass(n)}).bind("click" + this.eventNamespace, function(t){i.disabled && (t.preventDefault(), t.stopImmediatePropagation())}), this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")}, blur:function(){this.buttonElement.removeClass("ui-state-focus")}}), s && this.element.bind("change" + this.eventNamespace, function(){e.refresh()}), "checkbox" === this.type?this.buttonElement.bind("click" + this.eventNamespace, function(){if (i.disabled)return!1}):"radio" === this.type?this.buttonElement.bind("click" + this.eventNamespace, function(){if (i.disabled)return!1; t(this).addClass("ui-state-active"), e.buttonElement.attr("aria-pressed", "true"); var s = e.element[0]; g(s).not(s).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed", "false")}):(this.buttonElement.bind("mousedown" + this.eventNamespace, function(){if (i.disabled)return!1; t(this).addClass("ui-state-active"), d = this, e.document.one("mouseup", function(){d = null})}).bind("mouseup" + this.eventNamespace, function(){if (i.disabled)return!1; t(this).removeClass("ui-state-active")}).bind("keydown" + this.eventNamespace, function(e){if (i.disabled)return!1; e.keyCode !== t.ui.keyCode.SPACE && e.keyCode !== t.ui.keyCode.ENTER || t(this).addClass("ui-state-active")}).bind("keyup" + this.eventNamespace + " blur" + this.eventNamespace, function(){t(this).removeClass("ui-state-active")}), this.buttonElement.is("a") && this.buttonElement.keyup(function(e){e.keyCode === t.ui.keyCode.SPACE && t(this).click()})), this._setOption("disabled", i.disabled), this._resetButton()}, _determineButtonType:function(){var t, e, i; this.element.is("[type=checkbox]")?this.type = "checkbox":this.element.is("[type=radio]")?this.type = "radio":this.element.is("input")?this.type = "input":this.type = "button", "checkbox" === this.type || "radio" === this.type?(t = this.element.parents().last(), e = "label[for='" + this.element.attr("id") + "']", this.buttonElement = t.find(e), this.buttonElement.length || (t = t.length?t.siblings():this.element.siblings(), this.buttonElement = t.filter(e), this.buttonElement.length || (this.buttonElement = t.find(e))), this.element.addClass("ui-helper-hidden-accessible"), (i = this.element.is(":checked")) && this.buttonElement.addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", i)):this.buttonElement = this.element}, widget:function(){return this.buttonElement}, _destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(p + " ui-state-active " + f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")}, _setOption:function(t, e){if (this._super(t, e), "disabled" === t)return this.widget().toggleClass("ui-state-disabled", !!e), this.element.prop("disabled", !!e), void(e && ("checkbox" === this.type || "radio" === this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active"))); this._resetButton()}, refresh:function(){var e = this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled"); e !== this.options.disabled && this._setOption("disabled", e), "radio" === this.type?g(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")}):"checkbox" === this.type && (this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))}, _resetButton:function(){if ("input" !== this.type){var e = this.buttonElement.removeClass(f), i = t("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(), s = this.options.icons, n = s.primary && s.secondary, o = []; s.primary || s.secondary?(this.options.text && o.push("ui-button-text-icon" + (n?"s":s.primary?"-primary":"-secondary")), s.primary && e.prepend("<span class='ui-button-icon-primary ui-icon " + s.primary + "'></span>"), s.secondary && e.append("<span class='ui-button-icon-secondary ui-icon " + s.secondary + "'></span>"), this.options.text || (o.push(n?"ui-button-icons-only":"ui-button-icon-only"), this.hasTitle || e.attr("title", t.trim(i)))):o.push("ui-button-text-only"), e.addClass(o.join(" "))} else this.options.label && this.element.val(this.options.label)}}), t.widget("ui.buttonset", {version:"1.11.4", options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"}, _create:function(){this.element.addClass("ui-buttonset")}, _init:function(){this.refresh()}, _setOption:function(t, e){"disabled" === t && this.buttons.button("option", t, e), this._super(t, e)}, refresh:function(){var e = "rtl" === this.element.css("direction"), i = this.element.find(this.options.items), s = i.filter(":ui-button"); i.not(":ui-button").button(), s.button("refresh"), this.buttons = i.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()}, _destroy:function(){this.element.removeClass("ui-buttonset"), this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}); t.ui.button; t.extend(t.ui, {datepicker:{version:"1.11.4"}}); var v; t.extend(n.prototype, {markerClassName:"hasDatepicker", maxRows:4, _widgetDatepicker:function(){return this.dpDiv}, setDefaults:function(t){return r(this._defaults, t || {}), this}, _attachDatepicker:function(e, i){var s, n, o; n = "div" === (s = e.nodeName.toLowerCase()) || "span" === s, e.id || (this.uuid += 1, e.id = "dp" + this.uuid), (o = this._newInst(t(e), n)).settings = t.extend({}, i || {}), "input" === s?this._connectDatepicker(e, o):n && this._inlineDatepicker(e, o)}, _newInst:function(e, i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"), input:e, selectedDay:0, selectedMonth:0, selectedYear:0, drawMonth:0, drawYear:0, inline:i, dpDiv:i?o(t("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}}, _connectDatepicker:function(e, i){var s = t(e); i.append = t([]), i.trigger = t([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp), this._autoSize(i), t.data(e, "datepicker", i), i.settings.disabled && this._disableDatepicker(e))}, _attachments:function(e, i){var s, n, o, a = this._get(i, "appendText"), r = this._get(i, "isRTL"); i.append && i.append.remove(), a && (i.append = t("<span class='" + this._appendClass + "'>" + a + "</span>"), e[r?"before":"after"](i.append)), e.unbind("focus", this._showDatepicker), i.trigger && i.trigger.remove(), "focus" !== (s = this._get(i, "showOn")) && "both" !== s || e.focus(this._showDatepicker), "button" !== s && "both" !== s || (n = this._get(i, "buttonText"), o = this._get(i, "buttonImage"), i.trigger = t(this._get(i, "buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o, alt:n, title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o, alt:n, title:n}):n)), e[r?"before":"after"](i.trigger), i.trigger.click(function(){return t.datepicker._datepickerShowing && t.datepicker._lastInput === e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing && t.datepicker._lastInput !== e[0]?(t.datepicker._hideDatepicker(), t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]), !1}))}, _autoSize:function(t){if (this._get(t, "autoSize") && !t.inline){var e, i, s, n, o = new Date(2009, 11, 20), a = this._get(t, "dateFormat"); a.match(/[DM]/) && (e = function(t){for (i = 0, s = 0, n = 0; n < t.length; n++)t[n].length > i && (i = t[n].length, s = n); return s}, o.setMonth(e(this._get(t, a.match(/MM/)?"monthNames":"monthNamesShort"))), o.setDate(e(this._get(t, a.match(/DD/)?"dayNames":"dayNamesShort")) + 20 - o.getDay())), t.input.attr("size", this._formatDate(t, o).length)}}, _inlineDatepicker:function(e, i){var s = t(e); s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), t.data(e, "datepicker", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(e), i.dpDiv.css("display", "block"))}, _dialogDatepicker:function(e, i, s, n, o){var a, h, l, c, u, d = this._dialogInst; return d || (this.uuid += 1, a = "dp" + this.uuid, this._dialogInput = t("<input type='text' id='" + a + "' style='position: absolute; top: -100px; width: 0px;'/>"), this._dialogInput.keydown(this._doKeyDown), t("body").append(this._dialogInput), (d = this._dialogInst = this._newInst(this._dialogInput, !1)).settings = {}, t.data(this._dialogInput[0], "datepicker", d)), r(d.settings, n || {}), i = i && i.constructor === Date?this._formatDate(d, i):i, this._dialogInput.val(i), this._pos = o?o.length?o:[o.pageX, o.pageY]:null, this._pos || (h = document.documentElement.clientWidth, l = document.documentElement.clientHeight, c = document.documentElement.scrollLeft || document.body.scrollLeft, u = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [h / 2 - 100 + c, l / 2 - 150 + u]), this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), d.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), t.blockUI && t.blockUI(this.dpDiv), t.data(this._dialogInput[0], "datepicker", d), this}, _destroyDatepicker:function(e){var i, s = t(e), n = t.data(e, "datepicker"); s.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), t.removeData(e, "datepicker"), "input" === i?(n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)):"div" !== i && "span" !== i || s.removeClass(this.markerClassName).empty(), v === n && (v = null))}, _enableDatepicker:function(e){var i, s, n = t(e), o = t.data(e, "datepicker"); n.hasClass(this.markerClassName) && ("input" === (i = e.nodeName.toLowerCase())?(e.disabled = !1, o.trigger.filter("button").each(function(){this.disabled = !1}).end().filter("img").css({opacity:"1.0", cursor:""})):"div" !== i && "span" !== i || ((s = n.children("." + this._inlineClass)).children().removeClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !1)), this._disabledInputs = t.map(this._disabledInputs, function(t){return t === e?null:t}))}, _disableDatepicker:function(e){var i, s, n = t(e), o = t.data(e, "datepicker"); n.hasClass(this.markerClassName) && ("input" === (i = e.nodeName.toLowerCase())?(e.disabled = !0, o.trigger.filter("button").each(function(){this.disabled = !0}).end().filter("img").css({opacity:"0.5", cursor:"default"})):"div" !== i && "span" !== i || ((s = n.children("." + this._inlineClass)).children().addClass("ui-state-disabled"), s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", !0)), this._disabledInputs = t.map(this._disabledInputs, function(t){return t === e?null:t}), this._disabledInputs[this._disabledInputs.length] = e)}, _isDisabledDatepicker:function(t){if (!t)return!1; for (var e = 0; e < this._disabledInputs.length; e++)if (this._disabledInputs[e] === t)return!0; return!1}, _getInst:function(e){try{return t.data(e, "datepicker")} catch (t){throw"Missing instance data for this datepicker"}}, _optionDatepicker:function(e, i, s){var n, o, a, h, l = this._getInst(e); if (2 === arguments.length && "string" == typeof i)return"defaults" === i?t.extend({}, t.datepicker._defaults):l?"all" === i?t.extend({}, l.settings):this._get(l, i):null; n = i || {}, "string" == typeof i && ((n = {})[i] = s), l && (this._curInst === l && this._hideDatepicker(), o = this._getDateDatepicker(e, !0), a = this._getMinMaxDate(l, "min"), h = this._getMinMaxDate(l, "max"), r(l.settings, n), null !== a && void 0 !== n.dateFormat && void 0 === n.minDate && (l.settings.minDate = this._formatDate(l, a)), null !== h && void 0 !== n.dateFormat && void 0 === n.maxDate && (l.settings.maxDate = this._formatDate(l, h)), "disabled"in n && (n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)), this._attachments(t(e), l), this._autoSize(l), this._setDate(l, o), this._updateAlternate(l), this._updateDatepicker(l))}, _changeDatepicker:function(t, e, i){this._optionDatepicker(t, e, i)}, _refreshDatepicker:function(t){var e = this._getInst(t); e && this._updateDatepicker(e)}, _setDateDatepicker:function(t, e){var i = this._getInst(t); i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i))}, _getDateDatepicker:function(t, e){var i = this._getInst(t); return i && !i.inline && this._setDateFromField(i, e), i?this._getDate(i):null}, _doKeyDown:function(e){var i, s, n, o = t.datepicker._getInst(e.target), a = !0, r = o.dpDiv.is(".ui-datepicker-rtl"); if (o._keyEvent = !0, t.datepicker._datepickerShowing)switch (e.keyCode){case 9:t.datepicker._hideDatepicker(), a = !1; break; case 13:return(n = t("td." + t.datepicker._dayOverClass + ":not(." + t.datepicker._currentClass + ")", o.dpDiv))[0] && t.datepicker._selectDay(e.target, o.selectedMonth, o.selectedYear, n[0]), i = t.datepicker._get(o, "onSelect"), i?(s = t.datepicker._formatDate(o), i.apply(o.input?o.input[0]:null, [s, o])):t.datepicker._hideDatepicker(), !1; case 27:t.datepicker._hideDatepicker(); break; case 33:t.datepicker._adjustDate(e.target, e.ctrlKey? - t.datepicker._get(o, "stepBigMonths"): - t.datepicker._get(o, "stepMonths"), "M"); break; case 34:t.datepicker._adjustDate(e.target, e.ctrlKey? + t.datepicker._get(o, "stepBigMonths"): + t.datepicker._get(o, "stepMonths"), "M"); break; case 35:(e.ctrlKey || e.metaKey) && t.datepicker._clearDate(e.target), a = e.ctrlKey || e.metaKey; break; case 36:(e.ctrlKey || e.metaKey) && t.datepicker._gotoToday(e.target), a = e.ctrlKey || e.metaKey; break; case 37:(e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r?1: - 1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey? - t.datepicker._get(o, "stepBigMonths"): - t.datepicker._get(o, "stepMonths"), "M"); break; case 38:(e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, - 7, "D"), a = e.ctrlKey || e.metaKey; break; case 39:(e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r? - 1:1, "D"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey? + t.datepicker._get(o, "stepBigMonths"): + t.datepicker._get(o, "stepMonths"), "M"); break; case 40:(e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, 7, "D"), a = e.ctrlKey || e.metaKey; break; default:a = !1} else 36 === e.keyCode && e.ctrlKey?t.datepicker._showDatepicker(this):a = !1; a && (e.preventDefault(), e.stopPropagation())}, _doKeyPress:function(e){var i, s, n = t.datepicker._getInst(e.target); if (t.datepicker._get(n, "constrainInput"))return i = t.datepicker._possibleChars(t.datepicker._get(n, "dateFormat")), s = String.fromCharCode(null == e.charCode?e.keyCode:e.charCode), e.ctrlKey || e.metaKey || s < " " || !i || i.indexOf(s) > - 1}, _doKeyUp:function(e){var i = t.datepicker._getInst(e.target); if (i.input.val() !== i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i, "dateFormat"), i.input?i.input.val():null, t.datepicker._getFormatConfig(i)) && (t.datepicker._setDateFromField(i), t.datepicker._updateAlternate(i), t.datepicker._updateDatepicker(i))} catch (t){}return!0}, _showDatepicker:function(e){if ("input" !== (e = e.target || e).nodeName.toLowerCase() && (e = t("input", e.parentNode)[0]), !t.datepicker._isDisabledDatepicker(e) && t.datepicker._lastInput !== e){var i, n, o, a, h, l, c; i = t.datepicker._getInst(e), t.datepicker._curInst && t.datepicker._curInst !== i && (t.datepicker._curInst.dpDiv.stop(!0, !0), i && t.datepicker._datepickerShowing && t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])), !1 !== (o = (n = t.datepicker._get(i, "beforeShow"))?n.apply(e, [e, i]):{}) && (r(i.settings, o), i.lastVal = null, t.datepicker._lastInput = e, t.datepicker._setDateFromField(i), t.datepicker._inDialog && (e.value = ""), t.datepicker._pos || (t.datepicker._pos = t.datepicker._findPos(e), t.datepicker._pos[1] += e.offsetHeight), a = !1, t(e).parents().each(function(){return!(a |= "fixed" === t(this).css("position"))}), h = {left:t.datepicker._pos[0], top:t.datepicker._pos[1]}, t.datepicker._pos = null, i.dpDiv.empty(), i.dpDiv.css({position:"absolute", display:"block", top:"-1000px"}), t.datepicker._updateDatepicker(i), h = t.datepicker._checkOffset(i, h, a), i.dpDiv.css({position:t.datepicker._inDialog && t.blockUI?"static":a?"fixed":"absolute", display:"none", left:h.left + "px", top:h.top + "px"}), i.inline || (l = t.datepicker._get(i, "showAnim"), c = t.datepicker._get(i, "duration"), i.dpDiv.css("z-index", s(t(e)) + 1), t.datepicker._datepickerShowing = !0, t.effects && t.effects.effect[l]?i.dpDiv.show(l, t.datepicker._get(i, "showOptions"), c):i.dpDiv[l || "show"](l?c:null), t.datepicker._shouldFocusInput(i) && i.input.focus(), t.datepicker._curInst = i))}}, _updateDatepicker:function(e){this.maxRows = 4, v = e, e.dpDiv.empty().append(this._generateHTML(e)), this._attachHandlers(e); var i, s = this._getNumberOfMonths(e), n = s[1], o = e.dpDiv.find("." + this._dayOverClass + " a"); o.length > 0 && a.apply(o.get(0)), e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), n > 1 && e.dpDiv.addClass("ui-datepicker-multi-" + n).css("width", 17 * n + "em"), e.dpDiv[(1 !== s[0] || 1 !== s[1]?"add":"remove") + "Class"]("ui-datepicker-multi"), e.dpDiv[(this._get(e, "isRTL")?"add":"remove") + "Class"]("ui-datepicker-rtl"), e === t.datepicker._curInst && t.datepicker._datepickerShowing && t.datepicker._shouldFocusInput(e) && e.input.focus(), e.yearshtml && (i = e.yearshtml, setTimeout(function(){i === e.yearshtml && e.yearshtml && e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml), i = e.yearshtml = null}, 0))}, _shouldFocusInput:function(t){return t.input && t.input.is(":visible") && !t.input.is(":disabled") && !t.input.is(":focus")}, _checkOffset:function(e, i, s){var n = e.dpDiv.outerWidth(), o = e.dpDiv.outerHeight(), a = e.input?e.input.outerWidth():0, r = e.input?e.input.outerHeight():0, h = document.documentElement.clientWidth + (s?0:t(document).scrollLeft()), l = document.documentElement.clientHeight + (s?0:t(document).scrollTop()); return i.left -= this._get(e, "isRTL")?n - a:0, i.left -= s && i.left === e.input.offset().left?t(document).scrollLeft():0, i.top -= s && i.top === e.input.offset().top + r?t(document).scrollTop():0, i.left -= Math.min(i.left, i.left + n > h && h > n?Math.abs(i.left + n - h):0), i.top -= Math.min(i.top, i.top + o > l && l > o?Math.abs(o + r):0), i}, _findPos:function(e){for (var i, s = this._getInst(e), n = this._get(s, "isRTL"); e && ("hidden" === e.type || 1 !== e.nodeType || t.expr.filters.hidden(e)); )e = e[n?"previousSibling":"nextSibling"]; return i = t(e).offset(), [i.left, i.top]}, _hideDatepicker:function(e){var i, s, n, o, a = this._curInst; !a || e && a !== t.data(e, "datepicker") || this._datepickerShowing && (i = this._get(a, "showAnim"), s = this._get(a, "duration"), n = function(){t.datepicker._tidyDialog(a)}, t.effects && (t.effects.effect[i] || t.effects[i])?a.dpDiv.hide(i, t.datepicker._get(a, "showOptions"), s, n):a.dpDiv["slideDown" === i?"slideUp":"fadeIn" === i?"fadeOut":"hide"](i?s:null, n), i || n(), this._datepickerShowing = !1, (o = this._get(a, "onClose")) && o.apply(a.input?a.input[0]:null, [a.input?a.input.val():"", a]), this._lastInput = null, this._inDialog && (this._dialogInput.css({position:"absolute", left:"0", top:"-100px"}), t.blockUI && (t.unblockUI(), t("body").append(this.dpDiv))), this._inDialog = !1)}, _tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, _checkExternalClick:function(e){if (t.datepicker._curInst){var i = t(e.target), s = t.datepicker._getInst(i[0]); (i[0].id === t.datepicker._mainDivId || 0 !== i.parents("#" + t.datepicker._mainDivId).length || i.hasClass(t.datepicker.markerClassName) || i.closest("." + t.datepicker._triggerClass).length || !t.datepicker._datepickerShowing || t.datepicker._inDialog && t.blockUI) && (!i.hasClass(t.datepicker.markerClassName) || t.datepicker._curInst === s) || t.datepicker._hideDatepicker()}}, _adjustDate:function(e, i, s){var n = t(e), o = this._getInst(n[0]); this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(o, i + ("M" === s?this._get(o, "showCurrentAtPos"):0), s), this._updateDatepicker(o))}, _gotoToday:function(e){var i, s = t(e), n = this._getInst(s[0]); this._get(n, "gotoCurrent") && n.currentDay?(n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear):(i = new Date, n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear()), this._notifyChange(n), this._adjustDate(s)}, _selectMonthYear:function(e, i, s){var n = t(e), o = this._getInst(n[0]); o["selected" + ("M" === s?"Month":"Year")] = o["draw" + ("M" === s?"Month":"Year")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(o), this._adjustDate(n)}, _selectDay:function(e, i, s, n){var o, a = t(e); t(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(a[0]) || ((o = this._getInst(a[0])).selectedDay = o.currentDay = t("a", n).html(), o.selectedMonth = o.currentMonth = i, o.selectedYear = o.currentYear = s, this._selectDate(e, this._formatDate(o, o.currentDay, o.currentMonth, o.currentYear)))}, _clearDate:function(e){var i = t(e); this._selectDate(i, "")}, _selectDate:function(e, i){var s, n = t(e), o = this._getInst(n[0]); i = null != i?i:this._formatDate(o), o.input && o.input.val(i), this._updateAlternate(o), (s = this._get(o, "onSelect"))?s.apply(o.input?o.input[0]:null, [i, o]):o.input && o.input.trigger("change"), o.inline?this._updateDatepicker(o):(this._hideDatepicker(), this._lastInput = o.input[0], "object" != typeof o.input[0] && o.input.focus(), this._lastInput = null)}, _updateAlternate:function(e){var i, s, n, o = this._get(e, "altField"); o && (i = this._get(e, "altFormat") || this._get(e, "dateFormat"), s = this._getDate(e), n = this.formatDate(i, s, this._getFormatConfig(e)), t(o).each(function(){t(this).val(n)}))}, noWeekends:function(t){var e = t.getDay(); return[e > 0 && e < 6, ""]}, iso8601Week:function(t){var e, i = new Date(t.getTime()); return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), e = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((e - i) / 864e5) / 7) + 1}, parseDate:function(e, i, s){if (null == e || null == i)throw"Invalid arguments"; if ("" === (i = "object" == typeof i?i.toString():i + ""))return null; var n, o, a, r, h = 0, l = (s?s.shortYearCutoff:null) || this._defaults.shortYearCutoff, c = "string" != typeof l?l:(new Date).getFullYear() % 100 + parseInt(l, 10), u = (s?s.dayNamesShort:null) || this._defaults.dayNamesShort, d = (s?s.dayNames:null) || this._defaults.dayNames, p = (s?s.monthNamesShort:null) || this._defaults.monthNamesShort, f = (s?s.monthNames:null) || this._defaults.monthNames, m = - 1, g = - 1, v = - 1, _ = - 1, b = !1, y = function(t){var i = n + 1 < e.length && e.charAt(n + 1) === t; return i && n++, i}, w = function(t){var e = y(t), s = "@" === t?14:"!" === t?20:"y" === t && e?4:"o" === t?3:2, n = "y" === t?s:1, o = new RegExp("^\\d{" + n + "," + s + "}"), a = i.substring(h).match(o); if (!a)throw"Missing number at position " + h; return h += a[0].length, parseInt(a[0], 10)}, x = function(e, s, n){var o = - 1, a = t.map(y(e)?n:s, function(t, e){return[[e, t]]}).sort(function(t, e){return - (t[1].length - e[1].length)}); if (t.each(a, function(t, e){var s = e[1]; if (i.substr(h, s.length).toLowerCase() === s.toLowerCase())return o = e[0], h += s.length, !1}), - 1 !== o)return o + 1; throw"Unknown name at position " + h}, k = function(){if (i.charAt(h) !== e.charAt(n))throw"Unexpected literal at position " + h; h++}; for (n = 0; n < e.length; n++)if (b)"'" !== e.charAt(n) || y("'")?k():b = !1; else switch (e.charAt(n)){case"d":v = w("d"); break; case"D":x("D", u, d); break; case"o":_ = w("o"); break; case"m":g = w("m"); break; case"M":g = x("M", p, f); break; case"y":m = w("y"); break; case"@":m = (r = new Date(w("@"))).getFullYear(), g = r.getMonth() + 1, v = r.getDate(); break; case"!":m = (r = new Date((w("!") - this._ticksTo1970) / 1e4)).getFullYear(), g = r.getMonth() + 1, v = r.getDate(); break; case"'":y("'")?k():b = !0; break; default:k()}if (h < i.length && (a = i.substr(h), !/^\s+/.test(a)))throw"Extra/unparsed characters found in date: " + a; if ( - 1 === m?m = (new Date).getFullYear():m < 100 && (m += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (m <= c?0: - 100)), _ > - 1)for (g = 1, v = _; ; ){if (o = this._getDaysInMonth(m, g - 1), v <= o)break; g++, v -= o}if ((r = this._daylightSavingAdjust(new Date(m, g - 1, v))).getFullYear() !== m || r.getMonth() + 1 !== g || r.getDate() !== v)throw"Invalid date"; return r}, ATOM:"yy-mm-dd", COOKIE:"D, dd M yy", ISO_8601:"yy-mm-dd", RFC_822:"D, d M y", RFC_850:"DD, dd-M-y", RFC_1036:"D, d M y", RFC_1123:"D, d M yy", RFC_2822:"D, d M yy", RSS:"D, d M y", TICKS:"!", TIMESTAMP:"@", W3C:"yy-mm-dd", _ticksTo1970:24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 60 * 60 * 1e7, formatDate:function(t, e, i){if (!e)return""; var s, n = (i?i.dayNamesShort:null) || this._defaults.dayNamesShort, o = (i?i.dayNames:null) || this._defaults.dayNames, a = (i?i.monthNamesShort:null) || this._defaults.monthNamesShort, r = (i?i.monthNames:null) || this._defaults.monthNames, h = function(e){var i = s + 1 < t.length && t.charAt(s + 1) === e; return i && s++, i}, l = function(t, e, i){var s = "" + e; if (h(t))for (; s.length < i; )s = "0" + s; return s}, c = function(t, e, i, s){return h(t)?s[e]:i[e]}, u = "", d = !1; if (e)for (s = 0; s < t.length; s++)if (d)"'" !== t.charAt(s) || h("'")?u += t.charAt(s):d = !1; else switch (t.charAt(s)){case"d":u += l("d", e.getDate(), 2); break; case"D":u += c("D", e.getDay(), n, o); break; case"o":u += l("o", Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime() - new Date(e.getFullYear(), 0, 0).getTime()) / 864e5), 3); break; case"m":u += l("m", e.getMonth() + 1, 2); break; case"M":u += c("M", e.getMonth(), a, r); break; case"y":u += h("y")?e.getFullYear():(e.getYear() % 100 < 10?"0":"") + e.getYear() % 100; break; case"@":u += e.getTime(); break; case"!":u += 1e4 * e.getTime() + this._ticksTo1970; break; case"'":h("'")?u += "'":d = !0; break; default:u += t.charAt(s)}return u}, _possibleChars:function(t){var e, i = "", s = !1, n = function(i){var s = e + 1 < t.length && t.charAt(e + 1) === i; return s && e++, s}; for (e = 0; e < t.length; e++)if (s)"'" !== t.charAt(e) || n("'")?i += t.charAt(e):s = !1; else switch (t.charAt(e)){case"d":case"m":case"y":case"@":i += "0123456789"; break; case"D":case"M":return null; case"'":n("'")?i += "'":s = !0; break; default:i += t.charAt(e)}return i}, _get:function(t, e){return void 0 !== t.settings[e]?t.settings[e]:this._defaults[e]}, _setDateFromField:function(t, e){if (t.input.val() !== t.lastVal){var i = this._get(t, "dateFormat"), s = t.lastVal = t.input?t.input.val():null, n = this._getDefaultDate(t), o = n, a = this._getFormatConfig(t); try{o = this.parseDate(i, s, a) || n} catch (t){s = e?"":s}t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear = o.getFullYear(), t.currentDay = s?o.getDate():0, t.currentMonth = s?o.getMonth():0, t.currentYear = s?o.getFullYear():0, this._adjustInstDate(t)}}, _getDefaultDate:function(t){return this._restrictMinMax(t, this._determineDate(t, this._get(t, "defaultDate"), new Date))}, _determineDate:function(e, i, s){var n = null == i || "" === i?s:"string" == typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e, "dateFormat"), i, t.datepicker._getFormatConfig(e))} catch (t){}for (var s = (i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null) || new Date, n = s.getFullYear(), o = s.getMonth(), a = s.getDate(), r = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, h = r.exec(i); h; ){switch (h[2] || "d"){case"d":case"D":a += parseInt(h[1], 10); break; case"w":case"W":a += 7 * parseInt(h[1], 10); break; case"m":case"M":o += parseInt(h[1], 10), a = Math.min(a, t.datepicker._getDaysInMonth(n, o)); break; case"y":case"Y":n += parseInt(h[1], 10), a = Math.min(a, t.datepicker._getDaysInMonth(n, o))}h = r.exec(i)}return new Date(n, o, a)}(i):"number" == typeof i?isNaN(i)?s:function(t){var e = new Date; return e.setDate(e.getDate() + t), e}(i):new Date(i.getTime()); return(n = n && "Invalid Date" === n.toString()?s:n) && (n.setHours(0), n.setMinutes(0), n.setSeconds(0), n.setMilliseconds(0)), this._daylightSavingAdjust(n)}, _daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours() > 12?t.getHours() + 2:0), t):null}, _setDate:function(t, e, i){var s = !e, n = t.selectedMonth, o = t.selectedYear, a = this._restrictMinMax(t, this._determineDate(t, e, new Date)); t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(), t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), n === t.selectedMonth && o === t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(s?"":this._formatDate(t))}, _getDate:function(t){return!t.currentYear || t.input && "" === t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay))}, _attachHandlers:function(e){var i = this._get(e, "stepMonths"), s = "#" + e.id.replace(/\\\\/g, "\\"); e.dpDiv.find("[data-handler]").map(function(){var e = {prev:function(){t.datepicker._adjustDate(s, - i, "M")}, next:function(){t.datepicker._adjustDate(s, + i, "M")}, hide:function(){t.datepicker._hideDatepicker()}, today:function(){t.datepicker._gotoToday(s)}, selectDay:function(){return t.datepicker._selectDay(s, + this.getAttribute("data-month"), + this.getAttribute("data-year"), this), !1}, selectMonth:function(){return t.datepicker._selectMonthYear(s, this, "M"), !1}, selectYear:function(){return t.datepicker._selectMonthYear(s, this, "Y"), !1}}; t(this).bind(this.getAttribute("data-event"), e[this.getAttribute("data-handler")])})}, _generateHTML:function(t){var e, i, s, n, o, a, r, h, l, c, u, d, p, f, m, g, v, _, b, y, w, x, k, C, D, I, T, P, M, S, z, H, A, N, E, W, O, F, R, L = new Date, Y = this._daylightSavingAdjust(new Date(L.getFullYear(), L.getMonth(), L.getDate())), B = this._get(t, "isRTL"), j = this._get(t, "showButtonPanel"), q = this._get(t, "hideIfNoPrevNext"), K = this._get(t, "navigationAsDateFormat"), U = this._getNumberOfMonths(t), V = this._get(t, "showCurrentAtPos"), X = this._get(t, "stepMonths"), $ = 1 !== U[0] || 1 !== U[1], G = this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear, t.currentMonth, t.currentDay):new Date(9999, 9, 9)), Q = this._getMinMaxDate(t, "min"), J = this._getMinMaxDate(t, "max"), Z = t.drawMonth - V, tt = t.drawYear; if (Z < 0 && (Z += 12, tt--), J)for (e = this._daylightSavingAdjust(new Date(J.getFullYear(), J.getMonth() - U[0] * U[1] + 1, J.getDate())), e = Q && e < Q?Q:e; this._daylightSavingAdjust(new Date(tt, Z, 1)) > e; )--Z < 0 && (Z = 11, tt--); for (t.drawMonth = Z, t.drawYear = tt, i = this._get(t, "prevText"), i = K?this.formatDate(i, this._daylightSavingAdjust(new Date(tt, Z - X, 1)), this._getFormatConfig(t)):i, s = this._canAdjustMonth(t, - 1, tt, Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (B?"e":"w") + "'>" + i + "</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + i + "'><span class='ui-icon ui-icon-circle-triangle-" + (B?"e":"w") + "'>" + i + "</span></a>", n = this._get(t, "nextText"), n = K?this.formatDate(n, this._daylightSavingAdjust(new Date(tt, Z + X, 1)), this._getFormatConfig(t)):n, o = this._canAdjustMonth(t, 1, tt, Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (B?"w":"e") + "'>" + n + "</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + n + "'><span class='ui-icon ui-icon-circle-triangle-" + (B?"w":"e") + "'>" + n + "</span></a>", a = this._get(t, "currentText"), r = this._get(t, "gotoCurrent") && t.currentDay?G:Y, a = K?this.formatDate(a, r, this._getFormatConfig(t)):a, h = t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + this._get(t, "closeText") + "</button>", l = j?"<div class='ui-datepicker-buttonpane ui-widget-content'>" + (B?h:"") + (this._isInRange(t, r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>" + a + "</button>":"") + (B?"":h) + "</div>":"", c = parseInt(this._get(t, "firstDay"), 10), c = isNaN(c)?0:c, u = this._get(t, "showWeek"), d = this._get(t, "dayNames"), p = this._get(t, "dayNamesMin"), f = this._get(t, "monthNames"), m = this._get(t, "monthNamesShort"), g = this._get(t, "beforeShowDay"), v = this._get(t, "showOtherMonths"), _ = this._get(t, "selectOtherMonths"), b = this._getDefaultDate(t), y = "", x = 0; x < U[0]; x++){for (k = "", this.maxRows = 4, C = 0; C < U[1]; C++){if (D = this._daylightSavingAdjust(new Date(tt, Z, t.selectedDay)), I = " ui-corner-all", T = "", $){if (T += "<div class='ui-datepicker-group", U[1] > 1)switch (C){case 0:T += " ui-datepicker-group-first", I = " ui-corner-" + (B?"right":"left"); break; case U[1] - 1:T += " ui-datepicker-group-last", I = " ui-corner-" + (B?"left":"right"); break; default:T += " ui-datepicker-group-middle", I = ""}T += "'>"}for (T += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + I + "'>" + (/all|left/.test(I) && 0 === x?B?o:s:"") + (/all|right/.test(I) && 0 === x?B?s:o:"") + this._generateMonthYearHeader(t, Z, tt, Q, J, x > 0 || C > 0, f, m) + "</div><table class='ui-datepicker-calendar'><thead><tr>", P = u?"<th class='ui-datepicker-week-col'>" + this._get(t, "weekHeader") + "</th>":"", w = 0; w < 7; w++)M = (w + c) % 7, P += "<th scope='col'" + ((w + c + 6) % 7 >= 5?" class='ui-datepicker-week-end'":"") + "><span title='" + d[M] + "'>" + p[M] + "</span></th>"; for (T += P + "</tr></thead><tbody>", S = this._getDaysInMonth(tt, Z), tt === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, S)), z = (this._getFirstDayOfMonth(tt, Z) - c + 7) % 7, H = Math.ceil((z + S) / 7), A = $ && this.maxRows > H?this.maxRows:H, this.maxRows = A, N = this._daylightSavingAdjust(new Date(tt, Z, 1 - z)), E = 0; E < A; E++){for (T += "<tr>", W = u?"<td class='ui-datepicker-week-col'>" + this._get(t, "calculateWeek")(N) + "</td>":"", w = 0; w < 7; w++)O = g?g.apply(t.input?t.input[0]:null, [N]):[!0, ""], R = (F = N.getMonth() !== Z) && !_ || !O[0] || Q && N < Q || J && N > J, W += "<td class='" + ((w + c + 6) % 7 >= 5?" ui-datepicker-week-end":"") + (F?" ui-datepicker-other-month":"") + (N.getTime() === D.getTime() && Z === t.selectedMonth && t._keyEvent || b.getTime() === N.getTime() && b.getTime() === D.getTime()?" " + this._dayOverClass:"") + (R?" " + this._unselectableClass + " ui-state-disabled":"") + (F && !v?"":" " + O[1] + (N.getTime() === G.getTime()?" " + this._currentClass:"") + (N.getTime() === Y.getTime()?" ui-datepicker-today":"")) + "'" + (F && !v || !O[2]?"":" title='" + O[2].replace(/'/g, "&#39;") + "'") + (R?"":" data-handler='selectDay' data-event='click' data-month='" + N.getMonth() + "' data-year='" + N.getFullYear() + "'") + ">" + (F && !v?"&#xa0;":R?"<span class='ui-state-default'>" + N.getDate() + "</span>":"<a class='ui-state-default" + (N.getTime() === Y.getTime()?" ui-state-highlight":"") + (N.getTime() === G.getTime()?" ui-state-active":"") + (F?" ui-priority-secondary":"") + "' href='#'>" + N.getDate() + "</a>") + "</td>", N.setDate(N.getDate() + 1), N = this._daylightSavingAdjust(N); T += W + "</tr>"}++Z > 11 && (Z = 0, tt++), k += T += "</tbody></table>" + ($?"</div>" + (U[0] > 0 && C === U[1] - 1?"<div class='ui-datepicker-row-break'></div>":""):"")}y += k}return y += l, t._keyEvent = !1, y}, _generateMonthYearHeader:function(t, e, i, s, n, o, a, r){var h, l, c, u, d, p, f, m, g = this._get(t, "changeMonth"), v = this._get(t, "changeYear"), _ = this._get(t, "showMonthAfterYear"), b = "<div class='ui-datepicker-title'>", y = ""; if (o || !g)y += "<span class='ui-datepicker-month'>" + a[e] + "</span>"; else{for (h = s && s.getFullYear() === i, l = n && n.getFullYear() === i, y += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>", c = 0; c < 12; c++)(!h || c >= s.getMonth()) && (!l || c <= n.getMonth()) && (y += "<option value='" + c + "'" + (c === e?" selected='selected'":"") + ">" + r[c] + "</option>"); y += "</select>"}if (_ || (b += y + (!o && g && v?"":"&#xa0;")), !t.yearshtml)if (t.yearshtml = "", o || !v)b += "<span class='ui-datepicker-year'>" + i + "</span>"; else{for (u = this._get(t, "yearRange").split(":"), d = (new Date).getFullYear(), f = (p = function(t){var e = t.match(/c[+\-].*/)?i + parseInt(t.substring(1), 10):t.match(/[+\-].*/)?d + parseInt(t, 10):parseInt(t, 10); return isNaN(e)?d:e})(u[0]), m = Math.max(f, p(u[1] || "")), f = s?Math.max(f, s.getFullYear()):f, m = n?Math.min(m, n.getFullYear()):m, t.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; f <= m; f++)t.yearshtml += "<option value='" + f + "'" + (f === i?" selected='selected'":"") + ">" + f + "</option>"; t.yearshtml += "</select>", b += t.yearshtml, t.yearshtml = null}return b += this._get(t, "yearSuffix"), _ && (b += (!o && g && v?"":"&#xa0;") + y), b += "</div>"}, _adjustInstDate:function(t, e, i){var s = t.drawYear + ("Y" === i?e:0), n = t.drawMonth + ("M" === i?e:0), o = Math.min(t.selectedDay, this._getDaysInMonth(s, n)) + ("D" === i?e:0), a = this._restrictMinMax(t, this._daylightSavingAdjust(new Date(s, n, o))); t.selectedDay = a.getDate(), t.drawMonth = t.selectedMonth = a.getMonth(), t.drawYear = t.selectedYear = a.getFullYear(), "M" !== i && "Y" !== i || this._notifyChange(t)}, _restrictMinMax:function(t, e){var i = this._getMinMaxDate(t, "min"), s = this._getMinMaxDate(t, "max"), n = i && e < i?i:e; return s && n > s?s:n}, _notifyChange:function(t){var e = this._get(t, "onChangeMonthYear"); e && e.apply(t.input?t.input[0]:null, [t.selectedYear, t.selectedMonth + 1, t])}, _getNumberOfMonths:function(t){var e = this._get(t, "numberOfMonths"); return null == e?[1, 1]:"number" == typeof e?[1, e]:e}, _getMinMaxDate:function(t, e){return this._determineDate(t, this._get(t, e + "Date"), null)}, _getDaysInMonth:function(t, e){return 32 - this._daylightSavingAdjust(new Date(t, e, 32)).getDate()}, _getFirstDayOfMonth:function(t, e){return new Date(t, e, 1).getDay()}, _canAdjustMonth:function(t, e, i, s){var n = this._getNumberOfMonths(t), o = this._daylightSavingAdjust(new Date(i, s + (e < 0?e:n[0] * n[1]), 1)); return e < 0 && o.setDate(this._getDaysInMonth(o.getFullYear(), o.getMonth())), this._isInRange(t, o)}, _isInRange:function(t, e){var i, s, n = this._getMinMaxDate(t, "min"), o = this._getMinMaxDate(t, "max"), a = null, r = null, h = this._get(t, "yearRange"); return h && (i = h.split(":"), s = (new Date).getFullYear(), a = parseInt(i[0], 10), r = parseInt(i[1], 10), i[0].match(/[+\-].*/) && (a += s), i[1].match(/[+\-].*/) && (r += s)), (!n || e.getTime() >= n.getTime()) && (!o || e.getTime() <= o.getTime()) && (!a || e.getFullYear() >= a) && (!r || e.getFullYear() <= r)}, _getFormatConfig:function(t){var e = this._get(t, "shortYearCutoff"); return e = "string" != typeof e?e:(new Date).getFullYear() % 100 + parseInt(e, 10), {shortYearCutoff:e, dayNamesShort:this._get(t, "dayNamesShort"), dayNames:this._get(t, "dayNames"), monthNamesShort:this._get(t, "monthNamesShort"), monthNames:this._get(t, "monthNames")}}, _formatDate:function(t, e, i, s){e || (t.currentDay = t.selectedDay, t.currentMonth = t.selectedMonth, t.currentYear = t.selectedYear); var n = e?"object" == typeof e?e:this._daylightSavingAdjust(new Date(s, i, e)):this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay)); return this.formatDate(this._get(t, "dateFormat"), n, this._getFormatConfig(t))}}), t.fn.datepicker = function(e){if (!this.length)return this; t.datepicker.initialized || (t(document).mousedown(t.datepicker._checkExternalClick), t.datepicker.initialized = !0), 0 === t("#" + t.datepicker._mainDivId).length && t("body").append(t.datepicker.dpDiv); var i = Array.prototype.slice.call(arguments, 1); return"string" != typeof e || "isDisabled" !== e && "getDate" !== e && "widget" !== e?"option" === e && 2 === arguments.length && "string" == typeof arguments[1]?t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i)):this.each(function(){"string" == typeof e?t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this].concat(i)):t.datepicker._attachDatepicker(this, e)}):t.datepicker["_" + e + "Datepicker"].apply(t.datepicker, [this[0]].concat(i))}, t.datepicker = new n, t.datepicker.initialized = !1, t.datepicker.uuid = (new Date).getTime(), t.datepicker.version = "1.11.4"; t.datepicker; t.widget("ui.draggable", t.ui.mouse, {version:"1.11.4", widgetEventPrefix:"drag", options:{addClasses:!0, appendTo:"parent", axis:!1, connectToSortable:!1, containment:!1, cursor:"auto", cursorAt:!1, grid:!1, handle:!1, helper:"original", iframeFix:!1, opacity:!1, refreshPositions:!1, revert:!1, revertDuration:500, scope:"default", scroll:!0, scrollSensitivity:20, scrollSpeed:20, snap:!1, snapMode:"both", snapTolerance:20, stack:!1, zIndex:!1, drag:null, start:null, stop:null}, _create:function(){"original" === this.options.helper && this._setPositionRelative(), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._setHandleClassName(), this._mouseInit()}, _setOption:function(t, e){this._super(t, e), "handle" === t && (this._removeHandleClassName(), this._setHandleClassName())}, _destroy:function(){(this.helper || this.element).is(".ui-draggable-dragging")?this.destroyOnClear = !0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._removeHandleClassName(), this._mouseDestroy())}, _mouseCapture:function(e){var i = this.options; return this._blurActiveElement(e), !(this.helper || i.disabled || t(e.target).closest(".ui-resizable-handle").length > 0) && (this.handle = this._getHandle(e), !!this.handle && (this._blockFrames(!0 === i.iframeFix?"iframe":i.iframeFix), !0))}, _blockFrames:function(e){this.iframeBlocks = this.document.find(e).map(function(){var e = t(this); return t("<div>").css("position", "absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})}, _unblockFrames:function(){this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)}, _blurActiveElement:function(e){var i = this.document[0]; if (this.handleElement.is(e.target))try{i.activeElement && "body" !== i.activeElement.nodeName.toLowerCase() && t(i.activeElement).blur()} catch (t){}}, _mouseStart:function(e){var i = this.options; return this.helper = this._createHelper(e), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), t.ui.ddmanager && (t.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(!0), this.offsetParent = this.helper.offsetParent(), this.hasFixedAncestor = this.helper.parents().filter(function(){return"fixed" === t(this).css("position")}).length > 0, this.positionAbs = this.element.offset(), this._refreshOffsets(e), this.originalPosition = this.position = this._generatePosition(e, !1), this.originalPageX = e.pageX, this.originalPageY = e.pageY, i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt), this._setContainment(), !1 === this._trigger("start", e)?(this._clear(), !1):(this._cacheHelperProportions(), t.ui.ddmanager && !i.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this._normalizeRightBottom(), this._mouseDrag(e, !0), t.ui.ddmanager && t.ui.ddmanager.dragStart(this, e), !0)}, _refreshOffsets:function(t){this.offset = {top:this.positionAbs.top - this.margins.top, left:this.positionAbs.left - this.margins.left, scroll:!1, parent:this._getParentOffset(), relative:this._getRelativeOffset()}, this.offset.click = {left:t.pageX - this.offset.left, top:t.pageY - this.offset.top}}, _mouseDrag:function(e, i){if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(e, !0), this.positionAbs = this._convertPositionTo("absolute"), !i){var s = this._uiHash(); if (!1 === this._trigger("drag", e, s))return this._mouseUp({}), !1; this.position = s.position}return this.helper[0].style.left = this.position.left + "px", this.helper[0].style.top = this.position.top + "px", t.ui.ddmanager && t.ui.ddmanager.drag(this, e), !1}, _mouseStop:function(e){var i = this, s = !1; return t.ui.ddmanager && !this.options.dropBehaviour && (s = t.ui.ddmanager.drop(this, e)), this.dropped && (s = this.dropped, this.dropped = !1), "invalid" === this.options.revert && !s || "valid" === this.options.revert && s || !0 === this.options.revert || t.isFunction(this.options.revert) && this.options.revert.call(this.element, s)?t(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function(){!1 !== i._trigger("stop", e) && i._clear()}):!1 !== this._trigger("stop", e) && this._clear(), !1}, _mouseUp:function(e){return this._unblockFrames(), t.ui.ddmanager && t.ui.ddmanager.dragStop(this, e), this.handleElement.is(e.target) && this.element.focus(), t.ui.mouse.prototype._mouseUp.call(this, e)}, cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(), this}, _getHandle:function(e){return!this.options.handle || !!t(e.target).closest(this.element.find(this.options.handle)).length}, _setHandleClassName:function(){this.handleElement = this.options.handle?this.element.find(this.options.handle):this.element, this.handleElement.addClass("ui-draggable-handle")}, _removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")}, _createHelper:function(e){var i = this.options, s = t.isFunction(i.helper), n = s?t(i.helper.apply(this.element[0], [e])):"clone" === i.helper?this.element.clone().removeAttr("id"):this.element; return n.parents("body").length || n.appendTo("parent" === i.appendTo?this.element[0].parentNode:i.appendTo), s && n[0] === this.element[0] && this._setPositionRelative(), n[0] === this.element[0] || /(fixed|absolute)/.test(n.css("position")) || n.css("position", "absolute"), n}, _setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position")) || (this.element[0].style.position = "relative")}, _adjustOffsetFromHelper:function(e){"string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {left: + e[0], top: + e[1] || 0}), "left"in e && (this.offset.click.left = e.left + this.margins.left), "right"in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top"in e && (this.offset.click.top = e.top + this.margins.top), "bottom"in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top)}, _isRootNode:function(t){return/(html|body)/i.test(t.tagName) || t === this.document[0]}, _getParentOffset:function(){var e = this.offsetParent.offset(), i = this.document[0]; return"absolute" === this.cssPosition && this.scrollParent[0] !== i && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), this._isRootNode(this.offsetParent[0]) && (e = {top:0, left:0}), {top:e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left:e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}}, _getRelativeOffset:function(){if ("relative" !== this.cssPosition)return{top:0, left:0}; var t = this.element.position(), e = this._isRootNode(this.scrollParent[0]); return{top:t.top - (parseInt(this.helper.css("top"), 10) || 0) + (e?0:this.scrollParent.scrollTop()), left:t.left - (parseInt(this.helper.css("left"), 10) || 0) + (e?0:this.scrollParent.scrollLeft())}}, _cacheMargins:function(){this.margins = {left:parseInt(this.element.css("marginLeft"), 10) || 0, top:parseInt(this.element.css("marginTop"), 10) || 0, right:parseInt(this.element.css("marginRight"), 10) || 0, bottom:parseInt(this.element.css("marginBottom"), 10) || 0}}, _cacheHelperProportions:function(){this.helperProportions = {width:this.helper.outerWidth(), height:this.helper.outerHeight()}}, _setContainment:function(){var e, i, s, n = this.options, o = this.document[0]; this.relativeContainer = null, n.containment?"window" !== n.containment?"document" !== n.containment?n.containment.constructor !== Array?("parent" === n.containment && (n.containment = this.helper[0].parentNode), (s = (i = t(n.containment))[0]) && (e = /(scroll|auto)/.test(i.css("overflow")), this.containment = [(parseInt(i.css("borderLeftWidth"), 10) || 0) + (parseInt(i.css("paddingLeft"), 10) || 0), (parseInt(i.css("borderTopWidth"), 10) || 0) + (parseInt(i.css("paddingTop"), 10) || 0), (e?Math.max(s.scrollWidth, s.offsetWidth):s.offsetWidth) - (parseInt(i.css("borderRightWidth"), 10) || 0) - (parseInt(i.css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (e?Math.max(s.scrollHeight, s.offsetHeight):s.offsetHeight) - (parseInt(i.css("borderBottomWidth"), 10) || 0) - (parseInt(i.css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relativeContainer = i)):this.containment = n.containment:this.containment = [0, 0, t(o).width() - this.helperProportions.width - this.margins.left, (t(o).height() || o.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]:this.containment = [t(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, t(window).scrollLeft() + t(window).width() - this.helperProportions.width - this.margins.left, t(window).scrollTop() + (t(window).height() || o.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]:this.containment = null}, _convertPositionTo:function(t, e){e || (e = this.position); var i = "absolute" === t?1: - 1, s = this._isRootNode(this.scrollParent[0]); return{top:e.top + this.offset.relative.top * i + this.offset.parent.top * i - ("fixed" === this.cssPosition? - this.offset.scroll.top:s?0:this.offset.scroll.top) * i, left:e.left + this.offset.relative.left * i + this.offset.parent.left * i - ("fixed" === this.cssPosition? - this.offset.scroll.left:s?0:this.offset.scroll.left) * i}}, _generatePosition:function(t, e){var i, s, n, o, a = this.options, r = this._isRootNode(this.scrollParent[0]), h = t.pageX, l = t.pageY; return r && this.offset.scroll || (this.offset.scroll = {top:this.scrollParent.scrollTop(), left:this.scrollParent.scrollLeft()}), e && (this.containment && (this.relativeContainer?(s = this.relativeContainer.offset(), i = [this.containment[0] + s.left, this.containment[1] + s.top, this.containment[2] + s.left, this.containment[3] + s.top]):i = this.containment, t.pageX - this.offset.click.left < i[0] && (h = i[0] + this.offset.click.left), t.pageY - this.offset.click.top < i[1] && (l = i[1] + this.offset.click.top), t.pageX - this.offset.click.left > i[2] && (h = i[2] + this.offset.click.left), t.pageY - this.offset.click.top > i[3] && (l = i[3] + this.offset.click.top)), a.grid && (n = a.grid[1]?this.originalPageY + Math.round((l - this.originalPageY) / a.grid[1]) * a.grid[1]:this.originalPageY, l = i?n - this.offset.click.top >= i[1] || n - this.offset.click.top > i[3]?n:n - this.offset.click.top >= i[1]?n - a.grid[1]:n + a.grid[1]:n, o = a.grid[0]?this.originalPageX + Math.round((h - this.originalPageX) / a.grid[0]) * a.grid[0]:this.originalPageX, h = i?o - this.offset.click.left >= i[0] || o - this.offset.click.left > i[2]?o:o - this.offset.click.left >= i[0]?o - a.grid[0]:o + a.grid[0]:o), "y" === a.axis && (h = this.originalPageX), "x" === a.axis && (l = this.originalPageY)), {top:l - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition? - this.offset.scroll.top:r?0:this.offset.scroll.top), left:h - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition? - this.offset.scroll.left:r?0:this.offset.scroll.left)}}, _clear:function(){this.helper.removeClass("ui-draggable-dragging"), this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1, this.destroyOnClear && this.destroy()}, _normalizeRightBottom:function(){"y" !== this.options.axis && "auto" !== this.helper.css("right") && (this.helper.width(this.helper.width()), this.helper.css("right", "auto")), "x" !== this.options.axis && "auto" !== this.helper.css("bottom") && (this.helper.height(this.helper.height()), this.helper.css("bottom", "auto"))}, _trigger:function(e, i, s){return s = s || this._uiHash(), t.ui.plugin.call(this, e, [i, s, this], !0), /^(drag|start|stop)/.test(e) && (this.positionAbs = this._convertPositionTo("absolute"), s.offset = this.positionAbs), t.Widget.prototype._trigger.call(this, e, i, s)}, plugins:{}, _uiHash:function(){return{helper:this.helper, position:this.position, originalPosition:this.originalPosition, offset:this.positionAbs}}}), t.ui.plugin.add("draggable", "connectToSortable", {start:function(e, i, s){var n = t.extend({}, i, {item:s.element}); s.sortables = [], t(s.options.connectToSortable).each(function(){var i = t(this).sortable("instance"); i && !i.options.disabled && (s.sortables.push(i), i.refreshPositions(), i._trigger("activate", e, n))})}, stop:function(e, i, s){var n = t.extend({}, i, {item:s.element}); s.cancelHelperRemoval = !1, t.each(s.sortables, function(){var t = this; t.isOver?(t.isOver = 0, s.cancelHelperRemoval = !0, t.cancelHelperRemoval = !1, t._storedCSS = {position:t.placeholder.css("position"), top:t.placeholder.css("top"), left:t.placeholder.css("left")}, t._mouseStop(e), t.options.helper = t.options._helper):(t.cancelHelperRemoval = !0, t._trigger("deactivate", e, n))})}, drag:function(e, i, s){t.each(s.sortables, function(){var n = !1, o = this; o.positionAbs = s.positionAbs, o.helperProportions = s.helperProportions, o.offset.click = s.offset.click, o._intersectsWith(o.containerCache) && (n = !0, t.each(s.sortables, function(){return this.positionAbs = s.positionAbs, this.helperProportions = s.helperProportions, this.offset.click = s.offset.click, this !== o && this._intersectsWith(this.containerCache) && t.contains(o.element[0], this.element[0]) && (n = !1), n})), n?(o.isOver || (o.isOver = 1, s._parent = i.helper.parent(), o.currentItem = i.helper.appendTo(o.element).data("ui-sortable-item", !0), o.options._helper = o.options.helper, o.options.helper = function(){return i.helper[0]}, e.target = o.currentItem[0], o._mouseCapture(e, !0), o._mouseStart(e, !0, !0), o.offset.click.top = s.offset.click.top, o.offset.click.left = s.offset.click.left, o.offset.parent.left -= s.offset.parent.left - o.offset.parent.left, o.offset.parent.top -= s.offset.parent.top - o.offset.parent.top, s._trigger("toSortable", e), s.dropped = o.element, t.each(s.sortables, function(){this.refreshPositions()}), s.currentItem = s.element, o.fromOutside = s), o.currentItem && (o._mouseDrag(e), i.position = o.position)):o.isOver && (o.isOver = 0, o.cancelHelperRemoval = !0, o.options._revert = o.options.revert, o.options.revert = !1, o._trigger("out", e, o._uiHash(o)), o._mouseStop(e, !0), o.options.revert = o.options._revert, o.options.helper = o.options._helper, o.placeholder && o.placeholder.remove(), i.helper.appendTo(s._parent), s._refreshOffsets(e), i.position = s._generatePosition(e, !0), s._trigger("fromSortable", e), s.dropped = !1, t.each(s.sortables, function(){this.refreshPositions()}))})}}), t.ui.plugin.add("draggable", "cursor", {start:function(e, i, s){var n = t("body"), o = s.options; n.css("cursor") && (o._cursor = n.css("cursor")), n.css("cursor", o.cursor)}, stop:function(e, i, s){var n = s.options; n._cursor && t("body").css("cursor", n._cursor)}}), t.ui.plugin.add("draggable", "opacity", {start:function(e, i, s){var n = t(i.helper), o = s.options; n.css("opacity") && (o._opacity = n.css("opacity")), n.css("opacity", o.opacity)}, stop:function(e, i, s){var n = s.options; n._opacity && t(i.helper).css("opacity", n._opacity)}}), t.ui.plugin.add("draggable", "scroll", {start:function(t, e, i){i.scrollParentNotHidden || (i.scrollParentNotHidden = i.helper.scrollParent(!1)), i.scrollParentNotHidden[0] !== i.document[0] && "HTML" !== i.scrollParentNotHidden[0].tagName && (i.overflowOffset = i.scrollParentNotHidden.offset())}, drag:function(e, i, s){var n = s.options, o = !1, a = s.scrollParentNotHidden[0], r = s.document[0]; a !== r && "HTML" !== a.tagName?(n.axis && "x" === n.axis || (s.overflowOffset.top + a.offsetHeight - e.pageY < n.scrollSensitivity?a.scrollTop = o = a.scrollTop + n.scrollSpeed:e.pageY - s.overflowOffset.top < n.scrollSensitivity && (a.scrollTop = o = a.scrollTop - n.scrollSpeed)), n.axis && "y" === n.axis || (s.overflowOffset.left + a.offsetWidth - e.pageX < n.scrollSensitivity?a.scrollLeft = o = a.scrollLeft + n.scrollSpeed:e.pageX - s.overflowOffset.left < n.scrollSensitivity && (a.scrollLeft = o = a.scrollLeft - n.scrollSpeed))):(n.axis && "x" === n.axis || (e.pageY - t(r).scrollTop() < n.scrollSensitivity?o = t(r).scrollTop(t(r).scrollTop() - n.scrollSpeed):t(window).height() - (e.pageY - t(r).scrollTop()) < n.scrollSensitivity && (o = t(r).scrollTop(t(r).scrollTop() + n.scrollSpeed))), n.axis && "y" === n.axis || (e.pageX - t(r).scrollLeft() < n.scrollSensitivity?o = t(r).scrollLeft(t(r).scrollLeft() - n.scrollSpeed):t(window).width() - (e.pageX - t(r).scrollLeft()) < n.scrollSensitivity && (o = t(r).scrollLeft(t(r).scrollLeft() + n.scrollSpeed)))), !1 !== o && t.ui.ddmanager && !n.dropBehaviour && t.ui.ddmanager.prepareOffsets(s, e)}}), t.ui.plugin.add("draggable", "snap", {start:function(e, i, s){var n = s.options; s.snapElements = [], t(n.snap.constructor !== String?n.snap.items || ":data(ui-draggable)":n.snap).each(function(){var e = t(this), i = e.offset(); this !== s.element[0] && s.snapElements.push({item:this, width:e.outerWidth(), height:e.outerHeight(), top:i.top, left:i.left})})}, drag:function(e, i, s){var n, o, a, r, h, l, c, u, d, p, f = s.options, m = f.snapTolerance, g = i.offset.left, v = g + s.helperProportions.width, _ = i.offset.top, b = _ + s.helperProportions.height; for (d = s.snapElements.length - 1; d >= 0; d--)l = (h = s.snapElements[d].left - s.margins.left) + s.snapElements[d].width, u = (c = s.snapElements[d].top - s.margins.top) + s.snapElements[d].height, v < h - m || g > l + m || b < c - m || _ > u + m || !t.contains(s.snapElements[d].item.ownerDocument, s.snapElements[d].item)?(s.snapElements[d].snapping && s.options.snap.release && s.options.snap.release.call(s.element, e, t.extend(s._uiHash(), {snapItem:s.snapElements[d].item})), s.snapElements[d].snapping = !1):("inner" !== f.snapMode && (n = Math.abs(c - b) <= m, o = Math.abs(u - _) <= m, a = Math.abs(h - v) <= m, r = Math.abs(l - g) <= m, n && (i.position.top = s._convertPositionTo("relative", {top:c - s.helperProportions.height, left:0}).top), o && (i.position.top = s._convertPositionTo("relative", {top:u, left:0}).top), a && (i.position.left = s._convertPositionTo("relative", {top:0, left:h - s.helperProportions.width}).left), r && (i.position.left = s._convertPositionTo("relative", {top:0, left:l}).left)), p = n || o || a || r, "outer" !== f.snapMode && (n = Math.abs(c - _) <= m, o = Math.abs(u - b) <= m, a = Math.abs(h - g) <= m, r = Math.abs(l - v) <= m, n && (i.position.top = s._convertPositionTo("relative", {top:c, left:0}).top), o && (i.position.top = s._convertPositionTo("relative", {top:u - s.helperProportions.height, left:0}).top), a && (i.position.left = s._convertPositionTo("relative", {top:0, left:h}).left), r && (i.position.left = s._convertPositionTo("relative", {top:0, left:l - s.helperProportions.width}).left)), !s.snapElements[d].snapping && (n || o || a || r || p) && s.options.snap.snap && s.options.snap.snap.call(s.element, e, t.extend(s._uiHash(), {snapItem:s.snapElements[d].item})), s.snapElements[d].snapping = n || o || a || r || p)}}), t.ui.plugin.add("draggable", "stack", {start:function(e, i, s){var n, o = s.options, a = t.makeArray(t(o.stack)).sort(function(e, i){return(parseInt(t(e).css("zIndex"), 10) || 0) - (parseInt(t(i).css("zIndex"), 10) || 0)}); a.length && (n = parseInt(t(a[0]).css("zIndex"), 10) || 0, t(a).each(function(e){t(this).css("zIndex", n + e)}), this.css("zIndex", n + a.length))}}), t.ui.plugin.add("draggable", "zIndex", {start:function(e, i, s){var n = t(i.helper), o = s.options; n.css("zIndex") && (o._zIndex = n.css("zIndex")), n.css("zIndex", o.zIndex)}, stop:function(e, i, s){var n = s.options; n._zIndex && t(i.helper).css("zIndex", n._zIndex)}}); t.ui.draggable; t.widget("ui.resizable", t.ui.mouse, {version:"1.11.4", widgetEventPrefix:"resize", options:{alsoResize:!1, animate:!1, animateDuration:"slow", animateEasing:"swing", aspectRatio:!1, autoHide:!1, containment:!1, ghost:!1, grid:!1, handles:"e,s,se", helper:!1, maxHeight:null, maxWidth:null, minHeight:10, minWidth:10, zIndex:90, resize:null, start:null, stop:null}, _num:function(t){return parseInt(t, 10) || 0}, _isNumber:function(t){return!isNaN(parseInt(t, 10))}, _hasScroll:function(e, i){if ("hidden" === t(e).css("overflow"))return!1; var s = i && "left" === i?"scrollLeft":"scrollTop", n = !1; return e[s] > 0 || (e[s] = 1, n = e[s] > 0, e[s] = 0, n)}, _create:function(){var e, i, s, n, o = this, a = this.options; if (this.element.addClass("ui-resizable"), t.extend(this, {_aspectRatio:!!a.aspectRatio, aspectRatio:a.aspectRatio, originalElement:this.element, _proportionallyResizeElements:[], _helper:a.helper || a.ghost || a.animate?a.helper || "ui-resizable-helper":null}), this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"), width:this.element.outerWidth(), height:this.element.outerHeight(), top:this.element.css("top"), left:this.element.css("left")})), this.element = this.element.parent().data("ui-resizable", this.element.resizable("instance")), this.elementIsWrapper = !0, this.element.css({marginLeft:this.originalElement.css("marginLeft"), marginTop:this.originalElement.css("marginTop"), marginRight:this.originalElement.css("marginRight"), marginBottom:this.originalElement.css("marginBottom")}), this.originalElement.css({marginLeft:0, marginTop:0, marginRight:0, marginBottom:0}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({position:"static", zoom:1, display:"block"})), this.originalElement.css({margin:this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = a.handles || (t(".ui-resizable-handle", this.element).length?{n:".ui-resizable-n", e:".ui-resizable-e", s:".ui-resizable-s", w:".ui-resizable-w", se:".ui-resizable-se", sw:".ui-resizable-sw", ne:".ui-resizable-ne", nw:".ui-resizable-nw"}:"e,s,se"), this._handles = t(), this.handles.constructor === String)for ("all" === this.handles && (this.handles = "n,e,s,w,se,sw,ne,nw"), e = this.handles.split(","), this.handles = {}, i = 0; i < e.length; i++)s = t.trim(e[i]), (n = t("<div class='ui-resizable-handle " + ("ui-resizable-" + s) + "'></div>")).css({zIndex:a.zIndex}), "se" === s && n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(n); this._renderAxis = function(e){var i, s, n, a; e = e || this.element; for (i in this.handles)this.handles[i].constructor === String?this.handles[i] = this.element.children(this.handles[i]).first().show():(this.handles[i].jquery || this.handles[i].nodeType) && (this.handles[i] = t(this.handles[i]), this._on(this.handles[i], {mousedown:o._mouseDown})), this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (s = t(this.handles[i], this.element), a = /sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(), n = ["padding", /ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""), e.css(n, a), this._proportionallyResize()), this._handles = this._handles.add(this.handles[i])}, this._renderAxis(this.element), this._handles = this._handles.add(this.element.find(".ui-resizable-handle")), this._handles.disableSelection(), this._handles.mouseover(function(){o.resizing || (this.className && (n = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), o.axis = n && n[1]?n[1]:"se")}), a.autoHide && (this._handles.hide(), t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled || (t(this).removeClass("ui-resizable-autohide"), o._handles.show())}).mouseleave(function(){a.disabled || o.resizing || (t(this).addClass("ui-resizable-autohide"), o._handles.hide())})), this._mouseInit()}, _destroy:function(){this._mouseDestroy(); var e, i = function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; return this.elementIsWrapper && (i(this.element), e = this.element, this.originalElement.css({position:e.css("position"), width:e.outerWidth(), height:e.outerHeight(), top:e.css("top"), left:e.css("left")}).insertAfter(e), e.remove()), this.originalElement.css("resize", this.originalResizeStyle), i(this.originalElement), this}, _mouseCapture:function(e){var i, s, n = !1; for (i in this.handles)((s = t(this.handles[i])[0]) === e.target || t.contains(s, e.target)) && (n = !0); return!this.options.disabled && n}, _mouseStart:function(e){var i, s, n, o = this.options, a = this.element; return this.resizing = !0, this._renderProxy(), i = this._num(this.helper.css("left")), s = this._num(this.helper.css("top")), o.containment && (i += t(o.containment).scrollLeft() || 0, s += t(o.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {left:i, top:s}, this.size = this._helper?{width:this.helper.width(), height:this.helper.height()}:{width:a.width(), height:a.height()}, this.originalSize = this._helper?{width:a.outerWidth(), height:a.outerHeight()}:{width:a.width(), height:a.height()}, this.sizeDiff = {width:a.outerWidth() - a.width(), height:a.outerHeight() - a.height()}, this.originalPosition = {left:i, top:s}, this.originalMousePosition = {left:e.pageX, top:e.pageY}, this.aspectRatio = "number" == typeof o.aspectRatio?o.aspectRatio:this.originalSize.width / this.originalSize.height || 1, n = t(".ui-resizable-" + this.axis).css("cursor"), t("body").css("cursor", "auto" === n?this.axis + "-resize":n), a.addClass("ui-resizable-resizing"), this._propagate("start", e), !0}, _mouseDrag:function(e){var i, s, n = this.originalMousePosition, o = this.axis, a = e.pageX - n.left || 0, r = e.pageY - n.top || 0, h = this._change[o]; return this._updatePrevProperties(), !!h && (i = h.apply(this, [e, a, r]), this._updateVirtualBoundaries(e.shiftKey), (this._aspectRatio || e.shiftKey) && (i = this._updateRatio(i, e)), i = this._respectSize(i, e), this._updateCache(i), this._propagate("resize", e), s = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), t.isEmptyObject(s) || (this._updatePrevProperties(), this._trigger("resize", e, this.ui()), this._applyChanges()), !1)}, _mouseStop:function(e){this.resizing = !1; var i, s, n, o, a, r, h, l = this.options, c = this; return this._helper && (n = (s = (i = this._proportionallyResizeElements).length && /textarea/i.test(i[0].nodeName)) && this._hasScroll(i[0], "left")?0:c.sizeDiff.height, o = s?0:c.sizeDiff.width, a = {width:c.helper.width() - o, height:c.helper.height() - n}, r = parseInt(c.element.css("left"), 10) + (c.position.left - c.originalPosition.left) || null, h = parseInt(c.element.css("top"), 10) + (c.position.top - c.originalPosition.top) || null, l.animate || this.element.css(t.extend(a, {top:h, left:r})), c.helper.height(c.size.height), c.helper.width(c.size.width), this._helper && !l.animate && this._proportionallyResize()), t("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", e), this._helper && this.helper.remove(), !1}, _updatePrevProperties:function(){this.prevPosition = {top:this.position.top, left:this.position.left}, this.prevSize = {width:this.size.width, height:this.size.height}}, _applyChanges:function(){var t = {}; return this.position.top !== this.prevPosition.top && (t.top = this.position.top + "px"), this.position.left !== this.prevPosition.left && (t.left = this.position.left + "px"), this.size.width !== this.prevSize.width && (t.width = this.size.width + "px"), this.size.height !== this.prevSize.height && (t.height = this.size.height + "px"), this.helper.css(t), t}, _updateVirtualBoundaries:function(t){var e, i, s, n, o, a = this.options; o = {minWidth:this._isNumber(a.minWidth)?a.minWidth:0, maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1 / 0, minHeight:this._isNumber(a.minHeight)?a.minHeight:0, maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1 / 0}, (this._aspectRatio || t) && (e = o.minHeight * this.aspectRatio, s = o.minWidth / this.aspectRatio, i = o.maxHeight * this.aspectRatio, n = o.maxWidth / this.aspectRatio, e > o.minWidth && (o.minWidth = e), s > o.minHeight && (o.minHeight = s), i < o.maxWidth && (o.maxWidth = i), n < o.maxHeight && (o.maxHeight = n)), this._vBoundaries = o}, _updateCache:function(t){this.offset = this.helper.offset(), this._isNumber(t.left) && (this.position.left = t.left), this._isNumber(t.top) && (this.position.top = t.top), this._isNumber(t.height) && (this.size.height = t.height), this._isNumber(t.width) && (this.size.width = t.width)}, _updateRatio:function(t){var e = this.position, i = this.size, s = this.axis; return this._isNumber(t.height)?t.width = t.height * this.aspectRatio:this._isNumber(t.width) && (t.height = t.width / this.aspectRatio), "sw" === s && (t.left = e.left + (i.width - t.width), t.top = null), "nw" === s && (t.top = e.top + (i.height - t.height), t.left = e.left + (i.width - t.width)), t}, _respectSize:function(t){var e = this._vBoundaries, i = this.axis, s = this._isNumber(t.width) && e.maxWidth && e.maxWidth < t.width, n = this._isNumber(t.height) && e.maxHeight && e.maxHeight < t.height, o = this._isNumber(t.width) && e.minWidth && e.minWidth > t.width, a = this._isNumber(t.height) && e.minHeight && e.minHeight > t.height, r = this.originalPosition.left + this.originalSize.width, h = this.position.top + this.size.height, l = /sw|nw|w/.test(i), c = /nw|ne|n/.test(i); return o && (t.width = e.minWidth), a && (t.height = e.minHeight), s && (t.width = e.maxWidth), n && (t.height = e.maxHeight), o && l && (t.left = r - e.minWidth), s && l && (t.left = r - e.maxWidth), a && c && (t.top = h - e.minHeight), n && c && (t.top = h - e.maxHeight), t.width || t.height || t.left || !t.top?t.width || t.height || t.top || !t.left || (t.left = null):t.top = null, t}, _getPaddingPlusBorderDimensions:function(t){for (var e = 0, i = [], s = [t.css("borderTopWidth"), t.css("borderRightWidth"), t.css("borderBottomWidth"), t.css("borderLeftWidth")], n = [t.css("paddingTop"), t.css("paddingRight"), t.css("paddingBottom"), t.css("paddingLeft")]; e < 4; e++)i[e] = parseInt(s[e], 10) || 0, i[e] += parseInt(n[e], 10) || 0; return{height:i[0] + i[2], width:i[1] + i[3]}}, _proportionallyResize:function(){if (this._proportionallyResizeElements.length)for (var t, e = 0, i = this.helper || this.element; e < this._proportionallyResizeElements.length; e++)t = this._proportionallyResizeElements[e], this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(t)), t.css({height:i.height() - this.outerDimensions.height || 0, width:i.width() - this.outerDimensions.width || 0})}, _renderProxy:function(){var e = this.element, i = this.options; this.elementOffset = e.offset(), this._helper?(this.helper = this.helper || t("<div style='overflow:hidden;'></div>"), this.helper.addClass(this._helper).css({width:this.element.outerWidth() - 1, height:this.element.outerHeight() - 1, position:"absolute", left:this.elementOffset.left + "px", top:this.elementOffset.top + "px", zIndex:++i.zIndex}), this.helper.appendTo("body").disableSelection()):this.helper = this.element}, _change:{e:function(t, e){return{width:this.originalSize.width + e}}, w:function(t, e){var i = this.originalSize; return{left:this.originalPosition.left + e, width:i.width - e}}, n:function(t, e, i){var s = this.originalSize; return{top:this.originalPosition.top + i, height:s.height - i}}, s:function(t, e, i){return{height:this.originalSize.height + i}}, se:function(e, i, s){return t.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [e, i, s]))}, sw:function(e, i, s){return t.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [e, i, s]))}, ne:function(e, i, s){return t.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [e, i, s]))}, nw:function(e, i, s){return t.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [e, i, s]))}}, _propagate:function(e, i){t.ui.plugin.call(this, e, [i, this.ui()]), "resize" !== e && this._trigger(e, i, this.ui())}, plugins:{}, ui:function(){return{originalElement:this.originalElement, element:this.element, helper:this.helper, position:this.position, size:this.size, originalSize:this.originalSize, originalPosition:this.originalPosition}}}), t.ui.plugin.add("resizable", "animate", {stop:function(e){var i = t(this).resizable("instance"), s = i.options, n = i._proportionallyResizeElements, o = n.length && /textarea/i.test(n[0].nodeName), a = o && i._hasScroll(n[0], "left")?0:i.sizeDiff.height, r = o?0:i.sizeDiff.width, h = {width:i.size.width - r, height:i.size.height - a}, l = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null, c = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null; i.element.animate(t.extend(h, c && l?{top:c, left:l}:{}), {duration:s.animateDuration, easing:s.animateEasing, step:function(){var s = {width:parseInt(i.element.css("width"), 10), height:parseInt(i.element.css("height"), 10), top:parseInt(i.element.css("top"), 10), left:parseInt(i.element.css("left"), 10)}; n && n.length && t(n[0]).css({width:s.width, height:s.height}), i._updateCache(s), i._propagate("resize", e)}})}}), t.ui.plugin.add("resizable", "containment", {start:function(){var e, i, s, n, o, a, r, h = t(this).resizable("instance"), l = h.options, c = h.element, u = l.containment, d = u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u; d && (h.containerElement = t(d), /document/.test(u) || u === document?(h.containerOffset = {left:0, top:0}, h.containerPosition = {left:0, top:0}, h.parentData = {element:t(document), left:0, top:0, width:t(document).width(), height:t(document).height() || document.body.parentNode.scrollHeight}):(e = t(d), i = [], t(["Top", "Right", "Left", "Bottom"]).each(function(t, s){i[t] = h._num(e.css("padding" + s))}), h.containerOffset = e.offset(), h.containerPosition = e.position(), h.containerSize = {height:e.innerHeight() - i[3], width:e.innerWidth() - i[1]}, s = h.containerOffset, n = h.containerSize.height, o = h.containerSize.width, a = h._hasScroll(d, "left")?d.scrollWidth:o, r = h._hasScroll(d)?d.scrollHeight:n, h.parentData = {element:d, left:s.left, top:s.top, width:a, height:r}))}, resize:function(e){var i, s, n, o, a = t(this).resizable("instance"), r = a.options, h = a.containerOffset, l = a.position, c = a._aspectRatio || e.shiftKey, u = {top:0, left:0}, d = a.containerElement, p = !0; d[0] !== document && /static/.test(d.css("position")) && (u = h), l.left < (a._helper?h.left:0) && (a.size.width = a.size.width + (a._helper?a.position.left - h.left:a.position.left - u.left), c && (a.size.height = a.size.width / a.aspectRatio, p = !1), a.position.left = r.helper?h.left:0), l.top < (a._helper?h.top:0) && (a.size.height = a.size.height + (a._helper?a.position.top - h.top:a.position.top), c && (a.size.width = a.size.height * a.aspectRatio, p = !1), a.position.top = a._helper?h.top:0), n = a.containerElement.get(0) === a.element.parent().get(0), o = /relative|absolute/.test(a.containerElement.css("position")), n && o?(a.offset.left = a.parentData.left + a.position.left, a.offset.top = a.parentData.top + a.position.top):(a.offset.left = a.element.offset().left, a.offset.top = a.element.offset().top), i = Math.abs(a.sizeDiff.width + (a._helper?a.offset.left - u.left:a.offset.left - h.left)), s = Math.abs(a.sizeDiff.height + (a._helper?a.offset.top - u.top:a.offset.top - h.top)), i + a.size.width >= a.parentData.width && (a.size.width = a.parentData.width - i, c && (a.size.height = a.size.width / a.aspectRatio, p = !1)), s + a.size.height >= a.parentData.height && (a.size.height = a.parentData.height - s, c && (a.size.width = a.size.height * a.aspectRatio, p = !1)), p || (a.position.left = a.prevPosition.left, a.position.top = a.prevPosition.top, a.size.width = a.prevSize.width, a.size.height = a.prevSize.height)}, stop:function(){var e = t(this).resizable("instance"), i = e.options, s = e.containerOffset, n = e.containerPosition, o = e.containerElement, a = t(e.helper), r = a.offset(), h = a.outerWidth() - e.sizeDiff.width, l = a.outerHeight() - e.sizeDiff.height; e._helper && !i.animate && /relative/.test(o.css("position")) && t(this).css({left:r.left - n.left - s.left, width:h, height:l}), e._helper && !i.animate && /static/.test(o.css("position")) && t(this).css({left:r.left - n.left - s.left, width:h, height:l})}}), t.ui.plugin.add("resizable", "alsoResize", {start:function(){var e = t(this).resizable("instance").options; t(e.alsoResize).each(function(){var e = t(this); e.data("ui-resizable-alsoresize", {width:parseInt(e.width(), 10), height:parseInt(e.height(), 10), left:parseInt(e.css("left"), 10), top:parseInt(e.css("top"), 10)})})}, resize:function(e, i){var s = t(this).resizable("instance"), n = s.options, o = s.originalSize, a = s.originalPosition, r = {height:s.size.height - o.height || 0, width:s.size.width - o.width || 0, top:s.position.top - a.top || 0, left:s.position.left - a.left || 0}; t(n.alsoResize).each(function(){var e = t(this), s = t(this).data("ui-resizable-alsoresize"), n = {}, o = e.parents(i.originalElement[0]).length?["width", "height"]:["width", "height", "top", "left"]; t.each(o, function(t, e){var i = (s[e] || 0) + (r[e] || 0); i && i >= 0 && (n[e] = i || null)}), e.css(n)})}, stop:function(){t(this).removeData("resizable-alsoresize")}}), t.ui.plugin.add("resizable", "ghost", {start:function(){var e = t(this).resizable("instance"), i = e.options, s = e.size; e.ghost = e.originalElement.clone(), e.ghost.css({opacity:.25, display:"block", position:"relative", height:s.height, width:s.width, margin:0, left:0, top:0}).addClass("ui-resizable-ghost").addClass("string" == typeof i.ghost?i.ghost:""), e.ghost.appendTo(e.helper)}, resize:function(){var e = t(this).resizable("instance"); e.ghost && e.ghost.css({position:"relative", height:e.size.height, width:e.size.width})}, stop:function(){var e = t(this).resizable("instance"); e.ghost && e.helper && e.helper.get(0).removeChild(e.ghost.get(0))}}), t.ui.plugin.add("resizable", "grid", {resize:function(){var e, i = t(this).resizable("instance"), s = i.options, n = i.size, o = i.originalSize, a = i.originalPosition, r = i.axis, h = "number" == typeof s.grid?[s.grid, s.grid]:s.grid, l = h[0] || 1, c = h[1] || 1, u = Math.round((n.width - o.width) / l) * l, d = Math.round((n.height - o.height) / c) * c, p = o.width + u, f = o.height + d, m = s.maxWidth && s.maxWidth < p, g = s.maxHeight && s.maxHeight < f, v = s.minWidth && s.minWidth > p, _ = s.minHeight && s.minHeight > f; s.grid = h, v && (p += l), _ && (f += c), m && (p -= l), g && (f -= c), /^(se|s|e)$/.test(r)?(i.size.width = p, i.size.height = f):/^(ne)$/.test(r)?(i.size.width = p, i.size.height = f, i.position.top = a.top - d):/^(sw)$/.test(r)?(i.size.width = p, i.size.height = f, i.position.left = a.left - u):((f - c <= 0 || p - l <= 0) && (e = i._getPaddingPlusBorderDimensions(this)), f - c > 0?(i.size.height = f, i.position.top = a.top - d):(f = c - e.height, i.size.height = f, i.position.top = a.top + o.height - f), p - l > 0?(i.size.width = p, i.position.left = a.left - u):(p = l - e.width, i.size.width = p, i.position.left = a.left + o.width - p))}}); t.ui.resizable, t.widget("ui.dialog", {version:"1.11.4", options:{appendTo:"body", autoOpen:!0, buttons:[], closeOnEscape:!0, closeText:"Close", dialogClass:"", draggable:!0, hide:null, height:"auto", maxHeight:null, maxWidth:null, minHeight:150, minWidth:150, modal:!1, position:{my:"center", at:"center", of:window, collision:"fit", using:function(e){var i = t(this).css(e).offset().top; i < 0 && t(this).css("top", e.top - i)}}, resizable:!0, show:null, title:null, width:300, beforeClose:null, close:null, drag:null, dragStart:null, dragStop:null, focus:null, open:null, resize:null, resizeStart:null, resizeStop:null}, sizeRelatedOptions:{buttons:!0, height:!0, maxHeight:!0, maxWidth:!0, minHeight:!0, minWidth:!0, width:!0}, resizableRelatedOptions:{maxHeight:!0, maxWidth:!0, minHeight:!0, minWidth:!0}, _create:function(){this.originalCss = {display:this.element[0].style.display, width:this.element[0].style.width, minHeight:this.element[0].style.minHeight, maxHeight:this.element[0].style.maxHeight, height:this.element[0].style.height}, this.originalPosition = {parent:this.element.parent(), index:this.element.parent().children().index(this.element)}, this.originalTitle = this.element.attr("title"), this.options.title = this.options.title || this.originalTitle, this._createWrapper(), this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog), this._createTitlebar(), this._createButtonPane(), this.options.draggable && t.fn.draggable && this._makeDraggable(), this.options.resizable && t.fn.resizable && this._makeResizable(), this._isOpen = !1, this._trackFocus()}, _init:function(){this.options.autoOpen && this.open()}, _appendTo:function(){var e = this.options.appendTo; return e && (e.jquery || e.nodeType)?t(e):this.document.find(e || "body").eq(0)}, _destroy:function(){var t, e = this.originalPosition; this._untrackInstance(), this._destroyOverlay(), this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(), this.uiDialog.stop(!0, !0).remove(), this.originalTitle && this.element.attr("title", this.originalTitle), (t = e.parent.children().eq(e.index)).length && t[0] !== this.element[0]?t.before(this.element):e.parent.append(this.element)}, widget:function(){return this.uiDialog}, disable:t.noop, enable:t.noop, close:function(e){var i, s = this; if (this._isOpen && !1 !== this._trigger("beforeClose", e)){if (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), !this.opener.filter(":focusable").focus().length)try{(i = this.document[0].activeElement) && "body" !== i.nodeName.toLowerCase() && t(i).blur()} catch (t){}this._hide(this.uiDialog, this.options.hide, function(){s._trigger("close", e)})}}, isOpen:function(){return this._isOpen}, moveToTop:function(){this._moveToTop()}, _moveToTop:function(e, i){var s = !1, n = this.uiDialog.siblings(".ui-front:visible").map(function(){return + t(this).css("z-index")}).get(), o = Math.max.apply(null, n); return o >= + this.uiDialog.css("z-index") && (this.uiDialog.css("z-index", o + 1), s = !0), s && !i && this._trigger("focus", e), s}, open:function(){var e = this; this._isOpen?this._moveToTop() && this._focusTabbable():(this._isOpen = !0, this.opener = t(this.document[0].activeElement), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css("z-index", this.uiDialog.css("z-index") - 1), this._show(this.uiDialog, this.options.show, function(){e._focusTabbable(), e._trigger("focus")}), this._makeFocusTarget(), this._trigger("open"))}, _focusTabbable:function(){var t = this._focusedElement; t || (t = this.element.find("[autofocus]")), t.length || (t = this.element.find(":tabbable")), t.length || (t = this.uiDialogButtonPane.find(":tabbable")), t.length || (t = this.uiDialogTitlebarClose.filter(":tabbable")), t.length || (t = this.uiDialog), t.eq(0).focus()}, _keepFocus:function(e){function i(){var e = this.document[0].activeElement; this.uiDialog[0] === e || t.contains(this.uiDialog[0], e) || this._focusTabbable()}e.preventDefault(), i.call(this), this._delay(i)}, _createWrapper:function(){this.uiDialog = t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + this.options.dialogClass).hide().attr({tabIndex: - 1, role:"dialog"}).appendTo(this._appendTo()), this._on(this.uiDialog, {keydown:function(e){if (this.options.closeOnEscape && !e.isDefaultPrevented() && e.keyCode && e.keyCode === t.ui.keyCode.ESCAPE)return e.preventDefault(), void this.close(e); if (e.keyCode === t.ui.keyCode.TAB && !e.isDefaultPrevented()){var i = this.uiDialog.find(":tabbable"), s = i.filter(":first"), n = i.filter(":last"); e.target !== n[0] && e.target !== this.uiDialog[0] || e.shiftKey?e.target !== s[0] && e.target !== this.uiDialog[0] || !e.shiftKey || (this._delay(function(){n.focus()}), e.preventDefault()):(this._delay(function(){s.focus()}), e.preventDefault())}}, mousedown:function(t){this._moveToTop(t) && this._focusTabbable()}}), this.element.find("[aria-describedby]").length || this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})}, _createTitlebar:function(){var e; this.uiDialogTitlebar = t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog), this._on(this.uiDialogTitlebar, {mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close") || this.uiDialog.focus()}}), this.uiDialogTitlebarClose = t("<button type='button'></button>").button({label:this.options.closeText, icons:{primary:"ui-icon-closethick"}, text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar), this._on(this.uiDialogTitlebarClose, {click:function(t){t.preventDefault(), this.close(t)}}), e = t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar), this._title(e), this.uiDialog.attr({"aria-labelledby":e.attr("id")})}, _title:function(t){this.options.title || t.html("&#160;"), t.text(this.options.title)}, _createButtonPane:function(){this.uiDialogButtonPane = t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), this.uiButtonSet = t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane), this._createButtons()}, _createButtons:function(){var e = this, i = this.options.buttons; this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), t.isEmptyObject(i) || t.isArray(i) && !i.length?this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i, function(i, s){var n, o; s = t.isFunction(s)?{click:s, text:i}:s, s = t.extend({type:"button"}, s), n = s.click, s.click = function(){n.apply(e.element[0], arguments)}, o = {icons:s.icons, text:s.showText}, delete s.icons, delete s.showText, t("<button></button>", s).button(o).appendTo(e.uiButtonSet)}), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog))}, _makeDraggable:function(){function e(t){return{position:t.position, offset:t.offset}}var i = this, s = this.options; this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", handle:".ui-dialog-titlebar", containment:"document", start:function(s, n){t(this).addClass("ui-dialog-dragging"), i._blockFrames(), i._trigger("dragStart", s, e(n))}, drag:function(t, s){i._trigger("drag", t, e(s))}, stop:function(n, o){var a = o.offset.left - i.document.scrollLeft(), r = o.offset.top - i.document.scrollTop(); s.position = {my:"left top", at:"left" + (a >= 0?"+":"") + a + " top" + (r >= 0?"+":"") + r, of:i.window}, t(this).removeClass("ui-dialog-dragging"), i._unblockFrames(), i._trigger("dragStop", n, e(o))}})}, _makeResizable:function(){function e(t){return{originalPosition:t.originalPosition, originalSize:t.originalSize, position:t.position, size:t.size}}var i = this, s = this.options, n = s.resizable, o = this.uiDialog.css("position"), a = "string" == typeof n?n:"n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({cancel:".ui-dialog-content", containment:"document", alsoResize:this.element, maxWidth:s.maxWidth, maxHeight:s.maxHeight, minWidth:s.minWidth, minHeight:this._minHeight(), handles:a, start:function(s, n){t(this).addClass("ui-dialog-resizing"), i._blockFrames(), i._trigger("resizeStart", s, e(n))}, resize:function(t, s){i._trigger("resize", t, e(s))}, stop:function(n, o){var a = i.uiDialog.offset(), r = a.left - i.document.scrollLeft(), h = a.top - i.document.scrollTop(); s.height = i.uiDialog.height(), s.width = i.uiDialog.width(), s.position = {my:"left top", at:"left" + (r >= 0?"+":"") + r + " top" + (h >= 0?"+":"") + h, of:i.window}, t(this).removeClass("ui-dialog-resizing"), i._unblockFrames(), i._trigger("resizeStop", n, e(o))}}).css("position", o)}, _trackFocus:function(){this._on(this.widget(), {focusin:function(e){this._makeFocusTarget(), this._focusedElement = t(e.target)}})}, _makeFocusTarget:function(){this._untrackInstance(), this._trackingInstances().unshift(this)}, _untrackInstance:function(){var e = this._trackingInstances(), i = t.inArray(this, e); - 1 !== i && e.splice(i, 1)}, _trackingInstances:function(){var t = this.document.data("ui-dialog-instances"); return t || (t = [], this.document.data("ui-dialog-instances", t)), t}, _minHeight:function(){var t = this.options; return"auto" === t.height?t.minHeight:Math.min(t.minHeight, t.height)}, _position:function(){var t = this.uiDialog.is(":visible"); t || this.uiDialog.show(), this.uiDialog.position(this.options.position), t || this.uiDialog.hide()}, _setOptions:function(e){var i = this, s = !1, n = {}; t.each(e, function(t, e){i._setOption(t, e), t in i.sizeRelatedOptions && (s = !0), t in i.resizableRelatedOptions && (n[t] = e)}), s && (this._size(), this._position()), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", n)}, _setOption:function(t, e){var i, s, n = this.uiDialog; "dialogClass" === t && n.removeClass(this.options.dialogClass).addClass(e), "disabled" !== t && (this._super(t, e), "appendTo" === t && this.uiDialog.appendTo(this._appendTo()), "buttons" === t && this._createButtons(), "closeText" === t && this.uiDialogTitlebarClose.button({label:"" + e}), "draggable" === t && ((i = n.is(":data(ui-draggable)")) && !e && n.draggable("destroy"), !i && e && this._makeDraggable()), "position" === t && this._position(), "resizable" === t && ((s = n.is(":data(ui-resizable)")) && !e && n.resizable("destroy"), s && "string" == typeof e && n.resizable("option", "handles", e), s || !1 === e || this._makeResizable()), "title" === t && this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))}, _size:function(){var t, e, i, s = this.options; this.element.show().css({width:"auto", minHeight:0, maxHeight:"none", height:0}), s.minWidth > s.width && (s.width = s.minWidth), t = this.uiDialog.css({height:"auto", width:s.width}).outerHeight(), e = Math.max(0, s.minHeight - t), i = "number" == typeof s.maxHeight?Math.max(0, s.maxHeight - t):"none", "auto" === s.height?this.element.css({minHeight:e, maxHeight:i, height:"auto"}):this.element.height(Math.max(0, s.height - t)), this.uiDialog.is(":data(ui-resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())}, _blockFrames:function(){this.iframeBlocks = this.document.find("iframe").map(function(){var e = t(this); return t("<div>").css({position:"absolute", width:e.outerWidth(), height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})}, _unblockFrames:function(){this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks)}, _allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length || !!t(e.target).closest(".ui-datepicker").length}, _createOverlay:function(){if (this.options.modal){var e = !0; this._delay(function(){e = !1}), this.document.data("ui-dialog-overlays") || this._on(this.document, {focusin:function(t){e || this._allowInteraction(t) || (t.preventDefault(), this._trackingInstances()[0]._focusTabbable())}}), this.overlay = t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()), this._on(this.overlay, {mousedown:"_keepFocus"}), this.document.data("ui-dialog-overlays", (this.document.data("ui-dialog-overlays") || 0) + 1)}}, _destroyOverlay:function(){if (this.options.modal && this.overlay){var t = this.document.data("ui-dialog-overlays") - 1; t?this.document.data("ui-dialog-overlays", t):this.document.unbind("focusin").removeData("ui-dialog-overlays"), this.overlay.remove(), this.overlay = null}}}); t.widget("ui.droppable", {version:"1.11.4", widgetEventPrefix:"drop", options:{accept:"*", activeClass:!1, addClasses:!0, greedy:!1, hoverClass:!1, scope:"default", tolerance:"intersect", activate:null, deactivate:null, drop:null, out:null, over:null}, _create:function(){var e, i = this.options, s = i.accept; this.isover = !1, this.isout = !0, this.accept = t.isFunction(s)?s:function(t){return t.is(s)}, this.proportions = function(){if (!arguments.length)return e || (e = {width:this.element[0].offsetWidth, height:this.element[0].offsetHeight}); e = arguments[0]}, this._addToManager(i.scope), i.addClasses && this.element.addClass("ui-droppable")}, _addToManager:function(e){t.ui.ddmanager.droppables[e] = t.ui.ddmanager.droppables[e] || [], t.ui.ddmanager.droppables[e].push(this)}, _splice:function(t){for (var e = 0; e < t.length; e++)t[e] === this && t.splice(e, 1)}, _destroy:function(){var e = t.ui.ddmanager.droppables[this.options.scope]; this._splice(e), this.element.removeClass("ui-droppable ui-droppable-disabled")}, _setOption:function(e, i){if ("accept" === e)this.accept = t.isFunction(i)?i:function(t){return t.is(i)}; else if ("scope" === e){var s = t.ui.ddmanager.droppables[this.options.scope]; this._splice(s), this._addToManager(i)}this._super(e, i)}, _activate:function(e){var i = t.ui.ddmanager.current; this.options.activeClass && this.element.addClass(this.options.activeClass), i && this._trigger("activate", e, this.ui(i))}, _deactivate:function(e){var i = t.ui.ddmanager.current; this.options.activeClass && this.element.removeClass(this.options.activeClass), i && this._trigger("deactivate", e, this.ui(i))}, _over:function(e){var i = t.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", e, this.ui(i)))}, _out:function(e){var i = t.ui.ddmanager.current; i && (i.currentItem || i.element)[0] !== this.element[0] && this.accept.call(this.element[0], i.currentItem || i.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", e, this.ui(i)))}, _drop:function(e, i){var s = i || t.ui.ddmanager.current, n = !1; return!(!s || (s.currentItem || s.element)[0] === this.element[0]) && (this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i = t(this).droppable("instance"); if (i.options.greedy && !i.options.disabled && i.options.scope === s.options.scope && i.accept.call(i.element[0], s.currentItem || s.element) && t.ui.intersect(s, t.extend(i, {offset:i.element.offset()}), i.options.tolerance, e))return n = !0, !1}), !n && (!!this.accept.call(this.element[0], s.currentItem || s.element) && (this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", e, this.ui(s)), this.element)))}, ui:function(t){return{draggable:t.currentItem || t.element, helper:t.helper, position:t.position, offset:t.positionAbs}}}), t.ui.intersect = function(){function t(t, e, i){return t >= e && t < e + i}return function(e, i, s, n){if (!i.offset)return!1; var o = (e.positionAbs || e.position.absolute).left + e.margins.left, a = (e.positionAbs || e.position.absolute).top + e.margins.top, r = o + e.helperProportions.width, h = a + e.helperProportions.height, l = i.offset.left, c = i.offset.top, u = l + i.proportions().width, d = c + i.proportions().height; switch (s){case"fit":return l <= o && r <= u && c <= a && h <= d; case"intersect":return l < o + e.helperProportions.width / 2 && r - e.helperProportions.width / 2 < u && c < a + e.helperProportions.height / 2 && h - e.helperProportions.height / 2 < d; case"pointer":return t(n.pageY, c, i.proportions().height) && t(n.pageX, l, i.proportions().width); case"touch":return(a >= c && a <= d || h >= c && h <= d || a < c && h > d) && (o >= l && o <= u || r >= l && r <= u || o < l && r > u); default:return!1}}}(), t.ui.ddmanager = {current:null, droppables:{default:[]}, prepareOffsets:function(e, i){var s, n, o = t.ui.ddmanager.droppables[e.options.scope] || [], a = i?i.type:null, r = (e.currentItem || e.element).find(":data(ui-droppable)").addBack(); t:for (s = 0; s < o.length; s++)if (!(o[s].options.disabled || e && !o[s].accept.call(o[s].element[0], e.currentItem || e.element))){for (n = 0; n < r.length; n++)if (r[n] === o[s].element[0]){o[s].proportions().height = 0; continue t}o[s].visible = "none" !== o[s].element.css("display"), o[s].visible && ("mousedown" === a && o[s]._activate.call(o[s], i), o[s].offset = o[s].element.offset(), o[s].proportions({width:o[s].element[0].offsetWidth, height:o[s].element[0].offsetHeight}))}}, drop:function(e, i){var s = !1; return t.each((t.ui.ddmanager.droppables[e.options.scope] || []).slice(), function(){this.options && (!this.options.disabled && this.visible && t.ui.intersect(e, this, this.options.tolerance, i) && (s = this._drop.call(this, i) || s), !this.options.disabled && this.visible && this.accept.call(this.element[0], e.currentItem || e.element) && (this.isout = !0, this.isover = !1, this._deactivate.call(this, i)))}), s}, dragStart:function(e, i){e.element.parentsUntil("body").bind("scroll.droppable", function(){e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i)})}, drag:function(e, i){e.options.refreshPositions && t.ui.ddmanager.prepareOffsets(e, i), t.each(t.ui.ddmanager.droppables[e.options.scope] || [], function(){if (!this.options.disabled && !this.greedyChild && this.visible){var s, n, o, a = t.ui.intersect(e, this, this.options.tolerance, i), r = !a && this.isover?"isout":a && !this.isover?"isover":null; r && (this.options.greedy && (n = this.options.scope, (o = this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope === n})).length && ((s = t(o[0]).droppable("instance")).greedyChild = "isover" === r)), s && "isover" === r && (s.isover = !1, s.isout = !0, s._out.call(s, i)), this[r] = !0, this["isout" === r?"isover":"isout"] = !1, this["isover" === r?"_over":"_out"].call(this, i), s && "isout" === r && (s.isout = !1, s.isover = !0, s._over.call(s, i)))}})}, dragStop:function(e, i){e.element.parentsUntil("body").unbind("scroll.droppable"), e.options.refreshPositions || t.ui.ddmanager.prepareOffsets(e, i)}}; t.ui.droppable; var _ = t; t.effects = {effect:{}}, function(t, e){function i(t, e, i){var s = c[e.type] || {}; return null == t?i || !e.def?null:e.def:(t = s.floor?~~t:parseFloat(t), isNaN(t)?e.def:s.mod?(t + s.mod) % s.mod:0 > t?0:s.max < t?s.max:t)}function s(e){var i = h(), s = i._rgba = []; return e = e.toLowerCase(), p(r, function(t, n){var o, a = n.re.exec(e), r = a && n.parse(a), h = n.space || "rgba"; if (r)return o = i[h](r), i[l[h].cache] = o[l[h].cache], s = i._rgba = o._rgba, !1}), s.length?("0,0,0,0" === s.join() && t.extend(s, o.transparent), i):o[e]}function n(t, e, i){return i = (i + 1) % 1, 6 * i < 1?t + (e - t) * i * 6:2 * i < 1?e:3 * i < 2?t + (e - t) * (2 / 3 - i) * 6:t}var o, a = /^([\-+])=\s*(\d+\.?\d*)/, r = [{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse:function(t){return[t[1], t[2], t[3], t[4]]}}, {re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse:function(t){return[2.55 * t[1], 2.55 * t[2], 2.55 * t[3], t[4]]}}, {re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse:function(t){return[parseInt(t[1], 16), parseInt(t[2], 16), parseInt(t[3], 16)]}}, {re:/#([a-f0-9])([a-f0-9])([a-f0-9])/, parse:function(t){return[parseInt(t[1] + t[1], 16), parseInt(t[2] + t[2], 16), parseInt(t[3] + t[3], 16)]}}, {re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space:"hsla", parse:function(t){return[t[1], t[2] / 100, t[3] / 100, t[4]]}}], h = t.Color = function(e, i, s, n){return new t.Color.fn.parse(e, i, s, n)}, l = {rgba:{props:{red:{idx:0, type:"byte"}, green:{idx:1, type:"byte"}, blue:{idx:2, type:"byte"}}}, hsla:{props:{hue:{idx:0, type:"degrees"}, saturation:{idx:1, type:"percent"}, lightness:{idx:2, type:"percent"}}}}, c = {byte:{floor:!0, max:255}, percent:{max:1}, degrees:{mod:360, floor:!0}}, u = h.support = {}, d = t("<p>")[0], p = t.each; d.style.cssText = "background-color:rgba(1,1,1,.5)", u.rgba = d.style.backgroundColor.indexOf("rgba") > - 1, p(l, function(t, e){e.cache = "_" + t, e.props.alpha = {idx:3, type:"percent", def:1}}), h.fn = t.extend(h.prototype, {parse:function(e, n, a, r){if (void 0 === e)return this._rgba = [null, null, null, null], this; (e.jquery || e.nodeType) && (e = t(e).css(n), n = void 0); var c = this, u = t.type(e), d = this._rgba = []; return void 0 !== n && (e = [e, n, a, r], u = "array"), "string" === u?this.parse(s(e) || o._default):"array" === u?(p(l.rgba.props, function(t, s){d[s.idx] = i(e[s.idx], s)}), this):"object" === u?(e instanceof h?p(l, function(t, i){e[i.cache] && (c[i.cache] = e[i.cache].slice())}):p(l, function(s, n){var o = n.cache; p(n.props, function(t, s){if (!c[o] && n.to){if ("alpha" === t || null == e[t])return; c[o] = n.to(c._rgba)}c[o][s.idx] = i(e[t], s, !0)}), c[o] && t.inArray(null, c[o].slice(0, 3)) < 0 && (c[o][3] = 1, n.from && (c._rgba = n.from(c[o])))}), this):void 0}, is:function(t){var e = h(t), i = !0, s = this; return p(l, function(t, n){var o, a = e[n.cache]; return a && (o = s[n.cache] || n.to && n.to(s._rgba) || [], p(n.props, function(t, e){if (null != a[e.idx])return i = a[e.idx] === o[e.idx]})), i}), i}, _space:function(){var t = [], e = this; return p(l, function(i, s){e[s.cache] && t.push(i)}), t.pop()}, transition:function(t, e){var s = h(t), n = s._space(), o = l[n], a = 0 === this.alpha()?h("transparent"):this, r = a[o.cache] || o.to(a._rgba), u = r.slice(); return s = s[o.cache], p(o.props, function(t, n){var o = n.idx, a = r[o], h = s[o], l = c[n.type] || {}; null !== h && (null === a?u[o] = h:(l.mod && (h - a > l.mod / 2?a += l.mod:a - h > l.mod / 2 && (a -= l.mod)), u[o] = i((h - a) * e + a, n)))}), this[n](u)}, blend:function(e){if (1 === this._rgba[3])return this; var i = this._rgba.slice(), s = i.pop(), n = h(e)._rgba; return h(t.map(i, function(t, e){return(1 - s) * n[e] + s * t}))}, toRgbaString:function(){var e = "rgba(", i = t.map(this._rgba, function(t, e){return null == t?e > 2?1:0:t}); return 1 === i[3] && (i.pop(), e = "rgb("), e + i.join() + ")"}, toHslaString:function(){var e = "hsla(", i = t.map(this.hsla(), function(t, e){return null == t && (t = e > 2?1:0), e && e < 3 && (t = Math.round(100 * t) + "%"), t}); return 1 === i[3] && (i.pop(), e = "hsl("), e + i.join() + ")"}, toHexString:function(e){var i = this._rgba.slice(), s = i.pop(); return e && i.push(~~(255 * s)), "#" + t.map(i, function(t){return t = (t || 0).toString(16), 1 === t.length?"0" + t:t}).join("")}, toString:function(){return 0 === this._rgba[3]?"transparent":this.toRgbaString()}}), h.fn.parse.prototype = h.fn, l.hsla.to = function(t){if (null == t[0] || null == t[1] || null == t[2])return[null, null, null, t[3]]; var e, i, s = t[0] / 255, n = t[1] / 255, o = t[2] / 255, a = t[3], r = Math.max(s, n, o), h = Math.min(s, n, o), l = r - h, c = r + h, u = .5 * c; return e = h === r?0:s === r?60 * (n - o) / l + 360:n === r?60 * (o - s) / l + 120:60 * (s - n) / l + 240, i = 0 === l?0:u <= .5?l / c:l / (2 - c), [Math.round(e) % 360, i, u, null == a?1:a]}, l.hsla.from = function(t){if (null == t[0] || null == t[1] || null == t[2])return[null, null, null, t[3]]; var e = t[0] / 360, i = t[1], s = t[2], o = t[3], a = s <= .5?s * (1 + i):s + i - s * i, r = 2 * s - a; return[Math.round(255 * n(r, a, e + 1 / 3)), Math.round(255 * n(r, a, e)), Math.round(255 * n(r, a, e - 1 / 3)), o]}, p(l, function(e, s){var n = s.props, o = s.cache, r = s.to, l = s.from; h.fn[e] = function(e){if (r && !this[o] && (this[o] = r(this._rgba)), void 0 === e)return this[o].slice(); var s, a = t.type(e), c = "array" === a || "object" === a?e:arguments, u = this[o].slice(); return p(n, function(t, e){var s = c["object" === a?t:e.idx]; null == s && (s = u[e.idx]), u[e.idx] = i(s, e)}), l?(s = h(l(u)), s[o] = u, s):h(u)}, p(n, function(i, s){h.fn[i] || (h.fn[i] = function(n){var o, r = t.type(n), h = "alpha" === i?this._hsla?"hsla":"rgba":e, l = this[h](), c = l[s.idx]; return"undefined" === r?c:("function" === r && (n = n.call(this, c), r = t.type(n)), null == n && s.empty?this:("string" === r && (o = a.exec(n)) && (n = c + parseFloat(o[2]) * ("+" === o[1]?1: - 1)), l[s.idx] = n, this[h](l)))})})}), h.hook = function(e){var i = e.split(" "); p(i, function(e, i){t.cssHooks[i] = {set:function(e, n){var o, a, r = ""; if ("transparent" !== n && ("string" !== t.type(n) || (o = s(n)))){if (n = h(o || n), !u.rgba && 1 !== n._rgba[3]){for (a = "backgroundColor" === i?e.parentNode:e; ("" === r || "transparent" === r) && a && a.style; )try{r = t.css(a, "backgroundColor"), a = a.parentNode} catch (t){}n = n.blend(r && "transparent" !== r?r:"_default")}n = n.toRgbaString()}try{e.style[i] = n} catch (t){}}}, t.fx.step[i] = function(e){e.colorInit || (e.start = h(e.elem, i), e.end = h(e.end), e.colorInit = !0), t.cssHooks[i].set(e.elem, e.start.transition(e.end, e.pos))}})}, h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"), t.cssHooks.borderColor = {expand:function(t){var e = {}; return p(["Top", "Right", "Bottom", "Left"], function(i, s){e["border" + s + "Color"] = t}), e}}, o = t.Color.names = {aqua:"#00ffff", black:"#000000", blue:"#0000ff", fuchsia:"#ff00ff", gray:"#808080", green:"#008000", lime:"#00ff00", maroon:"#800000", navy:"#000080", olive:"#808000", purple:"#800080", red:"#ff0000", silver:"#c0c0c0", teal:"#008080", white:"#ffffff", yellow:"#ffff00", transparent:[null, null, null, 0], _default:"#ffffff"}}(_), function(){function e(e){var i, s, n = e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e, null):e.currentStyle, o = {}; if (n && n.length && n[0] && n[n[0]])for (s = n.length; s--; )"string" == typeof n[i = n[s]] && (o[t.camelCase(i)] = n[i]); else for (i in n)"string" == typeof n[i] && (o[i] = n[i]); return o}function i(e, i){var s, o, a = {}; for (s in i)o = i[s], e[s] !== o && (n[s] || !t.fx.step[s] && isNaN(parseFloat(o)) || (a[s] = o)); return a}var s = ["add", "remove", "toggle"], n = {border:1, borderBottom:1, borderColor:1, borderLeft:1, borderRight:1, borderTop:1, borderWidth:1, margin:1, padding:1}; t.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function(e, i){t.fx.step[i] = function(t){("none" !== t.end && !t.setAttr || 1 === t.pos && !t.setAttr) && (_.style(t.elem, i, t.end), t.setAttr = !0)}}), t.fn.addBack || (t.fn.addBack = function(t){return this.add(null == t?this.prevObject:this.prevObject.filter(t))}), t.effects.animateClass = function(n, o, a, r){var h = t.speed(o, a, r); return this.queue(function(){var o, a = t(this), r = a.attr("class") || "", l = h.children?a.find("*").addBack():a; l = l.map(function(){return{el:t(this), start:e(this)}}), (o = function(){t.each(s, function(t, e){n[e] && a[e + "Class"](n[e])})})(), l = l.map(function(){return this.end = e(this.el[0]), this.diff = i(this.start, this.end), this}), a.attr("class", r), l = l.map(function(){var e = this, i = t.Deferred(), s = t.extend({}, h, {queue:!1, complete:function(){i.resolve(e)}}); return this.el.animate(this.diff, s), i.promise()}), t.when.apply(t, l.get()).done(function(){o(), t.each(arguments, function(){var e = this.el; t.each(this.diff, function(t){e.css(t, "")})}), h.complete.call(a[0])})})}, t.fn.extend({addClass:function(e){return function(i, s, n, o){return s?t.effects.animateClass.call(this, {add:i}, s, n, o):e.apply(this, arguments)}}(t.fn.addClass), removeClass:function(e){return function(i, s, n, o){return arguments.length > 1?t.effects.animateClass.call(this, {remove:i}, s, n, o):e.apply(this, arguments)}}(t.fn.removeClass), toggleClass:function(e){return function(i, s, n, o, a){return"boolean" == typeof s || void 0 === s?n?t.effects.animateClass.call(this, s?{add:i}:{remove:i}, n, o, a):e.apply(this, arguments):t.effects.animateClass.call(this, {toggle:i}, s, n, o)}}(t.fn.toggleClass), switchClass:function(e, i, s, n, o){return t.effects.animateClass.call(this, {add:i, remove:e}, s, n, o)}})}(), function(){function e(e, i, s, n){return t.isPlainObject(e) && (i = e, e = e.effect), e = {effect:e}, null == i && (i = {}), t.isFunction(i) && (n = i, s = null, i = {}), ("number" == typeof i || t.fx.speeds[i]) && (n = s, s = i, i = {}), t.isFunction(s) && (n = s, s = null), i && t.extend(e, i), s = s || i.duration, e.duration = t.fx.off?0:"number" == typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default, e.complete = n || i.complete, e}function i(e){return!(e && "number" != typeof e && !t.fx.speeds[e]) || ("string" == typeof e && !t.effects.effect[e] || (!!t.isFunction(e) || "object" == typeof e && !e.effect))}t.extend(t.effects, {version:"1.11.4", save:function(t, e){for (var i = 0; i < e.length; i++)null !== e[i] && t.data("ui-effects-" + e[i], t[0].style[e[i]])}, restore:function(t, e){var i, s; for (s = 0; s < e.length; s++)null !== e[s] && (void 0 === (i = t.data("ui-effects-" + e[s])) && (i = ""), t.css(e[s], i))}, setMode:function(t, e){return"toggle" === e && (e = t.is(":hidden")?"show":"hide"), e}, getBaseline:function(t, e){var i, s; switch (t[0]){case"top":i = 0; break; case"middle":i = .5; break; case"bottom":i = 1; break; default:i = t[0] / e.height}switch (t[1]){case"left":s = 0; break; case"center":s = .5; break; case"right":s = 1; break; default:s = t[1] / e.width}return{x:s, y:i}}, createWrapper:function(e){if (e.parent().is(".ui-effects-wrapper"))return e.parent(); var i = {width:e.outerWidth(!0), height:e.outerHeight(!0), float:e.css("float")}, s = t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%", background:"transparent", border:"none", margin:0, padding:0}), n = {width:e.width(), height:e.height()}, o = document.activeElement; try{o.id} catch (t){o = document.body}return e.wrap(s), (e[0] === o || t.contains(e[0], o)) && t(o).focus(), s = e.parent(), "static" === e.css("position")?(s.css({position:"relative"}), e.css({position:"relative"})):(t.extend(i, {position:e.css("position"), zIndex:e.css("z-index")}), t.each(["top", "left", "bottom", "right"], function(t, s){i[s] = e.css(s), isNaN(parseInt(i[s], 10)) && (i[s] = "auto")}), e.css({position:"relative", top:0, left:0, right:"auto", bottom:"auto"})), e.css(n), s.css(i).show()}, removeWrapper:function(e){var i = document.activeElement; return e.parent().is(".ui-effects-wrapper") && (e.parent().replaceWith(e), (e[0] === i || t.contains(e[0], i)) && t(i).focus()), e}, setTransition:function(e, i, s, n){return n = n || {}, t.each(i, function(t, i){var o = e.cssUnit(i); o[0] > 0 && (n[i] = o[0] * s + o[1])}), n}}), t.fn.extend({effect:function(){function i(e){function i(){t.isFunction(o) && o.call(n[0]), t.isFunction(e) && e()}var n = t(this), o = s.complete, r = s.mode; (n.is(":hidden")?"hide" === r:"show" === r)?(n[r](), i()):a.call(n[0], s, i)}var s = e.apply(this, arguments), n = s.mode, o = s.queue, a = t.effects.effect[s.effect]; return t.fx.off || !a?n?this[n](s.duration, s.complete):this.each(function(){s.complete && s.complete.call(this)}):!1 === o?this.each(i):this.queue(o || "fx", i)}, show:function(t){return function(s){if (i(s))return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "show", this.effect.call(this, n)}}(t.fn.show), hide:function(t){return function(s){if (i(s))return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "hide", this.effect.call(this, n)}}(t.fn.hide), toggle:function(t){return function(s){if (i(s) || "boolean" == typeof s)return t.apply(this, arguments); var n = e.apply(this, arguments); return n.mode = "toggle", this.effect.call(this, n)}}(t.fn.toggle), cssUnit:function(e){var i = this.css(e), s = []; return t.each(["em", "px", "%", "pt"], function(t, e){i.indexOf(e) > 0 && (s = [parseFloat(i), e])}), s}})}(), function(){var e = {}; t.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function(t, i){e[i] = function(e){return Math.pow(e, t + 2)}}), t.extend(e, {Sine:function(t){return 1 - Math.cos(t * Math.PI / 2)}, Circ:function(t){return 1 - Math.sqrt(1 - t * t)}, Elastic:function(t){return 0 === t || 1 === t?t: - Math.pow(2, 8 * (t - 1)) * Math.sin((80 * (t - 1) - 7.5) * Math.PI / 15)}, Back:function(t){return t * t * (3 * t - 2)}, Bounce:function(t){for (var e, i = 4; t < ((e = Math.pow(2, --i)) - 1) / 11; ); return 1 / Math.pow(4, 3 - i) - 7.5625 * Math.pow((3 * e - 2) / 22 - t, 2)}}), t.each(e, function(e, i){t.easing["easeIn" + e] = i, t.easing["easeOut" + e] = function(t){return 1 - i(1 - t)}, t.easing["easeInOut" + e] = function(t){return t < .5?i(2 * t) / 2:1 - i( - 2 * t + 2) / 2}})}(); t.effects, t.effects.effect.blind = function(e, i){var s, n, o, a = t(this), r = /up|down|vertical/, h = /up|left|vertical|horizontal/, l = ["position", "top", "bottom", "left", "right", "height", "width"], c = t.effects.setMode(a, e.mode || "hide"), u = e.direction || "up", d = r.test(u), p = d?"height":"width", f = d?"top":"left", m = h.test(u), g = {}, v = "show" === c; a.parent().is(".ui-effects-wrapper")?t.effects.save(a.parent(), l):t.effects.save(a, l), a.show(), n = (s = t.effects.createWrapper(a).css({overflow:"hidden"}))[p](), o = parseFloat(s.css(f)) || 0, g[p] = v?n:0, m || (a.css(d?"bottom":"right", 0).css(d?"top":"left", "auto").css({position:"absolute"}), g[f] = v?o:n + o), v && (s.css(p, 0), m || s.css(f, o + n)), s.animate(g, {duration:e.duration, easing:e.easing, queue:!1, complete:function(){"hide" === c && a.hide(), t.effects.restore(a, l), t.effects.removeWrapper(a), i()}})}, t.effects.effect.bounce = function(e, i){var s, n, o, a = t(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = t.effects.setMode(a, e.mode || "effect"), l = "hide" === h, c = "show" === h, u = e.direction || "up", d = e.distance, p = e.times || 5, f = 2 * p + (c || l?1:0), m = e.duration / f, g = e.easing, v = "up" === u || "down" === u?"top":"left", _ = "up" === u || "left" === u, b = a.queue(), y = b.length; for ((c || l) && r.push("opacity"), t.effects.save(a, r), a.show(), t.effects.createWrapper(a), d || (d = a["top" === v?"outerHeight":"outerWidth"]() / 3), c && ((o = {opacity:1})[v] = 0, a.css("opacity", 0).css(v, _?2 * - d:2 * d).animate(o, m, g)), l && (d /= Math.pow(2, p - 1)), (o = {})[v] = 0, s = 0; s < p; s++)(n = {})[v] = (_?"-=":"+=") + d, a.animate(n, m, g).animate(o, m, g), d = l?2 * d:d / 2; l && ((n = {opacity:0})[v] = (_?"-=":"+=") + d, a.animate(n, m, g)), a.queue(function(){l && a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()}), y > 1 && b.splice.apply(b, [1, 0].concat(b.splice(y, f + 1))), a.dequeue()}, t.effects.effect.clip = function(e, i){var s, n, o, a = t(this), r = ["position", "top", "bottom", "left", "right", "height", "width"], h = "show" === t.effects.setMode(a, e.mode || "hide"), l = "vertical" === (e.direction || "vertical"), c = l?"height":"width", u = l?"top":"left", d = {}; t.effects.save(a, r), a.show(), s = t.effects.createWrapper(a).css({overflow:"hidden"}), o = (n = "IMG" === a[0].tagName?s:a)[c](), h && (n.css(c, 0), n.css(u, o / 2)), d[c] = h?o:0, d[u] = h?0:o / 2, n.animate(d, {queue:!1, duration:e.duration, easing:e.easing, complete:function(){h || a.hide(), t.effects.restore(a, r), t.effects.removeWrapper(a), i()}})}, t.effects.effect.drop = function(e, i){var s, n = t(this), o = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"], a = t.effects.setMode(n, e.mode || "hide"), r = "show" === a, h = e.direction || "left", l = "up" === h || "down" === h?"top":"left", c = "up" === h || "left" === h?"pos":"neg", u = {opacity:r?1:0}; t.effects.save(n, o), n.show(), t.effects.createWrapper(n), s = e.distance || n["top" === l?"outerHeight":"outerWidth"](!0) / 2, r && n.css("opacity", 0).css(l, "pos" === c? - s:s), u[l] = (r?"pos" === c?"+=":"-=":"pos" === c?"-=":"+=") + s, n.animate(u, {queue:!1, duration:e.duration, easing:e.easing, complete:function(){"hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()}})}, t.effects.effect.explode = function(e, i){function s(){d.css({visibility:"visible"}), t(v).remove(), p || d.hide(), i()}var n, o, a, r, h, l, c = e.pieces?Math.round(Math.sqrt(e.pieces)):3, u = c, d = t(this), p = "show" === t.effects.setMode(d, e.mode || "hide"), f = d.show().css("visibility", "hidden").offset(), m = Math.ceil(d.outerWidth() / u), g = Math.ceil(d.outerHeight() / c), v = []; for (n = 0; n < c; n++)for (r = f.top + n * g, l = n - (c - 1) / 2, o = 0; o < u; o++)a = f.left + o * m, h = o - (u - 1) / 2, d.clone().appendTo("body").wrap("<div></div>").css({position:"absolute", visibility:"visible", left: - o * m, top: - n * g}).parent().addClass("ui-effects-explode").css({position:"absolute", overflow:"hidden", width:m, height:g, left:a + (p?h * m:0), top:r + (p?l * g:0), opacity:p?0:1}).animate({left:a + (p?0:h * m), top:r + (p?0:l * g), opacity:p?1:0}, e.duration || 500, e.easing, function(){v.push(this), v.length === c * u && s()})}, t.effects.effect.fade = function(e, i){var s = t(this), n = t.effects.setMode(s, e.mode || "toggle"); s.animate({opacity:n}, {queue:!1, duration:e.duration, easing:e.easing, complete:i})}, t.effects.effect.fold = function(e, i){var s, n, o = t(this), a = ["position", "top", "bottom", "left", "right", "height", "width"], r = t.effects.setMode(o, e.mode || "hide"), h = "show" === r, l = "hide" === r, c = e.size || 15, u = /([0-9]+)%/.exec(c), d = !!e.horizFirst, p = h !== d, f = p?["width", "height"]:["height", "width"], m = e.duration / 2, g = {}, v = {}; t.effects.save(o, a), o.show(), s = t.effects.createWrapper(o).css({overflow:"hidden"}), n = p?[s.width(), s.height()]:[s.height(), s.width()], u && (c = parseInt(u[1], 10) / 100 * n[l?0:1]), h && s.css(d?{height:0, width:c}:{height:c, width:0}), g[f[0]] = h?n[0]:c, v[f[1]] = h?n[1]:0, s.animate(g, m, e.easing).animate(v, m, e.easing, function(){l && o.hide(), t.effects.restore(o, a), t.effects.removeWrapper(o), i()})}, t.effects.effect.highlight = function(e, i){var s = t(this), n = ["backgroundImage", "backgroundColor", "opacity"], o = t.effects.setMode(s, e.mode || "show"), a = {backgroundColor:s.css("backgroundColor")}; "hide" === o && (a.opacity = 0), t.effects.save(s, n), s.show().css({backgroundImage:"none", backgroundColor:e.color || "#ffff99"}).animate(a, {queue:!1, duration:e.duration, easing:e.easing, complete:function(){"hide" === o && s.hide(), t.effects.restore(s, n), i()}})}, t.effects.effect.size = function(e, i){var s, n, o, a = t(this), r = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], h = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], l = ["width", "height", "overflow"], c = ["fontSize"], u = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], d = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], p = t.effects.setMode(a, e.mode || "effect"), f = e.restore || "effect" !== p, m = e.scale || "both", g = e.origin || ["middle", "center"], v = a.css("position"), _ = f?r:h, b = {height:0, width:0, outerHeight:0, outerWidth:0}; "show" === p && a.show(), s = {height:a.height(), width:a.width(), outerHeight:a.outerHeight(), outerWidth:a.outerWidth()}, "toggle" === e.mode && "show" === p?(a.from = e.to || b, a.to = e.from || s):(a.from = e.from || ("show" === p?b:s), a.to = e.to || ("hide" === p?b:s)), o = {from:{y:a.from.height / s.height, x:a.from.width / s.width}, to:{y:a.to.height / s.height, x:a.to.width / s.width}}, "box" !== m && "both" !== m || (o.from.y !== o.to.y && (_ = _.concat(u), a.from = t.effects.setTransition(a, u, o.from.y, a.from), a.to = t.effects.setTransition(a, u, o.to.y, a.to)), o.from.x !== o.to.x && (_ = _.concat(d), a.from = t.effects.setTransition(a, d, o.from.x, a.from), a.to = t.effects.setTransition(a, d, o.to.x, a.to))), "content" !== m && "both" !== m || o.from.y !== o.to.y && (_ = _.concat(c).concat(l), a.from = t.effects.setTransition(a, c, o.from.y, a.from), a.to = t.effects.setTransition(a, c, o.to.y, a.to)), t.effects.save(a, _), a.show(), t.effects.createWrapper(a), a.css("overflow", "hidden").css(a.from), g && (n = t.effects.getBaseline(g, s), a.from.top = (s.outerHeight - a.outerHeight()) * n.y, a.from.left = (s.outerWidth - a.outerWidth()) * n.x, a.to.top = (s.outerHeight - a.to.outerHeight) * n.y, a.to.left = (s.outerWidth - a.to.outerWidth) * n.x), a.css(a.from), "content" !== m && "both" !== m || (u = u.concat(["marginTop", "marginBottom"]).concat(c), d = d.concat(["marginLeft", "marginRight"]), l = r.concat(u).concat(d), a.find("*[width]").each(function(){var i = t(this), s = {height:i.height(), width:i.width(), outerHeight:i.outerHeight(), outerWidth:i.outerWidth()}; f && t.effects.save(i, l), i.from = {height:s.height * o.from.y, width:s.width * o.from.x, outerHeight:s.outerHeight * o.from.y, outerWidth:s.outerWidth * o.from.x}, i.to = {height:s.height * o.to.y, width:s.width * o.to.x, outerHeight:s.height * o.to.y, outerWidth:s.width * o.to.x}, o.from.y !== o.to.y && (i.from = t.effects.setTransition(i, u, o.from.y, i.from), i.to = t.effects.setTransition(i, u, o.to.y, i.to)), o.from.x !== o.to.x && (i.from = t.effects.setTransition(i, d, o.from.x, i.from), i.to = t.effects.setTransition(i, d, o.to.x, i.to)), i.css(i.from), i.animate(i.to, e.duration, e.easing, function(){f && t.effects.restore(i, l)})})), a.animate(a.to, {queue:!1, duration:e.duration, easing:e.easing, complete:function(){0 === a.to.opacity && a.css("opacity", a.from.opacity), "hide" === p && a.hide(), t.effects.restore(a, _), f || ("static" === v?a.css({position:"relative", top:a.to.top, left:a.to.left}):t.each(["top", "left"], function(t, e){a.css(e, function(e, i){var s = parseInt(i, 10), n = t?a.to.left:a.to.top; return"auto" === i?n + "px":s + n + "px"})})), t.effects.removeWrapper(a), i()}})}, t.effects.effect.scale = function(e, i){var s = t(this), n = t.extend(!0, {}, e), o = t.effects.setMode(s, e.mode || "effect"), a = parseInt(e.percent, 10) || (0 === parseInt(e.percent, 10)?0:"hide" === o?0:100), r = e.direction || "both", h = e.origin, l = {height:s.height(), width:s.width(), outerHeight:s.outerHeight(), outerWidth:s.outerWidth()}, c = {y:"horizontal" !== r?a / 100:1, x:"vertical" !== r?a / 100:1}; n.effect = "size", n.queue = !1, n.complete = i, "effect" !== o && (n.origin = h || ["middle", "center"], n.restore = !0), n.from = e.from || ("show" === o?{height:0, width:0, outerHeight:0, outerWidth:0}:l), n.to = {height:l.height * c.y, width:l.width * c.x, outerHeight:l.outerHeight * c.y, outerWidth:l.outerWidth * c.x}, n.fade && ("show" === o && (n.from.opacity = 0, n.to.opacity = 1), "hide" === o && (n.from.opacity = 1, n.to.opacity = 0)), s.effect(n)}, t.effects.effect.puff = function(e, i){var s = t(this), n = t.effects.setMode(s, e.mode || "hide"), o = "hide" === n, a = parseInt(e.percent, 10) || 150, r = a / 100, h = {height:s.height(), width:s.width(), outerHeight:s.outerHeight(), outerWidth:s.outerWidth()}; t.extend(e, {effect:"scale", queue:!1, fade:!0, mode:n, complete:i, percent:o?a:100, from:o?h:{height:h.height * r, width:h.width * r, outerHeight:h.outerHeight * r, outerWidth:h.outerWidth * r}}), s.effect(e)}, t.effects.effect.pulsate = function(e, i){var s, n = t(this), o = t.effects.setMode(n, e.mode || "show"), a = "show" === o, r = "hide" === o, h = a || "hide" === o, l = 2 * (e.times || 5) + (h?1:0), c = e.duration / l, u = 0, d = n.queue(), p = d.length; for (!a && n.is(":visible") || (n.css("opacity", 0).show(), u = 1), s = 1; s < l; s++)n.animate({opacity:u}, c, e.easing), u = 1 - u; n.animate({opacity:u}, c, e.easing), n.queue(function(){r && n.hide(), i()}), p > 1 && d.splice.apply(d, [1, 0].concat(d.splice(p, l + 1))), n.dequeue()}, t.effects.effect.shake = function(e, i){var s, n = t(this), o = ["position", "top", "bottom", "left", "right", "height", "width"], a = t.effects.setMode(n, e.mode || "effect"), r = e.direction || "left", h = e.distance || 20, l = e.times || 3, c = 2 * l + 1, u = Math.round(e.duration / c), d = "up" === r || "down" === r?"top":"left", p = "up" === r || "left" === r, f = {}, m = {}, g = {}, v = n.queue(), _ = v.length; for (t.effects.save(n, o), n.show(), t.effects.createWrapper(n), f[d] = (p?"-=":"+=") + h, m[d] = (p?"+=":"-=") + 2 * h, g[d] = (p?"-=":"+=") + 2 * h, n.animate(f, u, e.easing), s = 1; s < l; s++)n.animate(m, u, e.easing).animate(g, u, e.easing); n.animate(m, u, e.easing).animate(f, u / 2, e.easing).queue(function(){"hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()}), _ > 1 && v.splice.apply(v, [1, 0].concat(v.splice(_, c + 1))), n.dequeue()}, t.effects.effect.slide = function(e, i){var s, n = t(this), o = ["position", "top", "bottom", "left", "right", "width", "height"], a = t.effects.setMode(n, e.mode || "show"), r = "show" === a, h = e.direction || "left", l = "up" === h || "down" === h?"top":"left", c = "up" === h || "left" === h, u = {}; t.effects.save(n, o), n.show(), s = e.distance || n["top" === l?"outerHeight":"outerWidth"](!0), t.effects.createWrapper(n).css({overflow:"hidden"}), r && n.css(l, c?isNaN(s)?"-" + s: - s:s), u[l] = (r?c?"+=":"-=":c?"-=":"+=") + s, n.animate(u, {queue:!1, duration:e.duration, easing:e.easing, complete:function(){"hide" === a && n.hide(), t.effects.restore(n, o), t.effects.removeWrapper(n), i()}})}, t.effects.effect.transfer = function(e, i){var s = t(this), n = t(e.to), o = "fixed" === n.css("position"), a = t("body"), r = o?a.scrollTop():0, h = o?a.scrollLeft():0, l = n.offset(), c = {top:l.top - r, left:l.left - h, height:n.innerHeight(), width:n.innerWidth()}, u = s.offset(), d = t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top - r, left:u.left - h, height:s.innerHeight(), width:s.innerWidth(), position:o?"fixed":"absolute"}).animate(c, e.duration, e.easing, function(){d.remove(), i()})}, t.widget("ui.progressbar", {version:"1.11.4", options:{max:100, value:0, change:null, complete:null}, min:0, _create:function(){this.oldValue = this.options.value = this._constrainedValue(), this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar", "aria-valuemin":this.min}), this.valueDiv = t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element), this._refreshValue()}, _destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove()}, value:function(t){if (void 0 === t)return this.options.value; this.options.value = this._constrainedValue(t), this._refreshValue()}, _constrainedValue:function(t){return void 0 === t && (t = this.options.value), this.indeterminate = !1 === t, "number" != typeof t && (t = 0), !this.indeterminate && Math.min(this.options.max, Math.max(this.min, t))}, _setOptions:function(t){var e = t.value; delete t.value, this._super(t), this.options.value = this._constrainedValue(e), this._refreshValue()}, _setOption:function(t, e){"max" === t && (e = Math.max(this.min, e)), "disabled" === t && this.element.toggleClass("ui-state-disabled", !!e).attr("aria-disabled", e), this._super(t, e)}, _percentage:function(){return this.indeterminate?100:100 * (this.options.value - this.min) / (this.options.max - this.min)}, _refreshValue:function(){var e = this.options.value, i = this._percentage(); this.valueDiv.toggle(this.indeterminate || e > this.min).toggleClass("ui-corner-right", e === this.options.max).width(i.toFixed(0) + "%"), this.element.toggleClass("ui-progressbar-indeterminate", this.indeterminate), this.indeterminate?(this.element.removeAttr("aria-valuenow"), this.overlayDiv || (this.overlayDiv = t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max, "aria-valuenow":e}), this.overlayDiv && (this.overlayDiv.remove(), this.overlayDiv = null)), this.oldValue !== e && (this.oldValue = e, this._trigger("change")), e === this.options.max && this._trigger("complete")}}), t.widget("ui.selectable", t.ui.mouse, {version:"1.11.4", options:{appendTo:"body", autoRefresh:!0, distance:0, filter:"*", tolerance:"touch", selected:null, selecting:null, start:null, stop:null, unselected:null, unselecting:null}, _create:function(){var e, i = this; this.element.addClass("ui-selectable"), this.dragged = !1, this.refresh = function(){(e = t(i.options.filter, i.element[0])).addClass("ui-selectee"), e.each(function(){var e = t(this), i = e.offset(); t.data(this, "selectable-item", {element:this, $element:e, left:i.left, top:i.top, right:i.left + e.outerWidth(), bottom:i.top + e.outerHeight(), startselected:!1, selected:e.hasClass("ui-selected"), selecting:e.hasClass("ui-selecting"), unselecting:e.hasClass("ui-unselecting")})})}, this.refresh(), this.selectees = e.addClass("ui-selectee"), this._mouseInit(), this.helper = t("<div class='ui-selectable-helper'></div>")}, _destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled"), this._mouseDestroy()}, _mouseStart:function(e){var i = this, s = this.options; this.opos = [e.pageX, e.pageY], this.options.disabled || (this.selectees = t(s.filter, this.element[0]), this._trigger("start", e), t(s.appendTo).append(this.helper), this.helper.css({left:e.pageX, top:e.pageY, width:0, height:0}), s.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function(){var s = t.data(this, "selectable-item"); s.startselected = !0, e.metaKey || e.ctrlKey || (s.$element.removeClass("ui-selected"), s.selected = !1, s.$element.addClass("ui-unselecting"), s.unselecting = !0, i._trigger("unselecting", e, {unselecting:s.element}))}), t(e.target).parents().addBack().each(function(){var s, n = t.data(this, "selectable-item"); if (n)return s = !e.metaKey && !e.ctrlKey || !n.$element.hasClass("ui-selected"), n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"), n.unselecting = !s, n.selecting = s, n.selected = s, s?i._trigger("selecting", e, {selecting:n.element}):i._trigger("unselecting", e, {unselecting:n.element}), !1}))}, _mouseDrag:function(e){if (this.dragged = !0, !this.options.disabled){var i, s = this, n = this.options, o = this.opos[0], a = this.opos[1], r = e.pageX, h = e.pageY; return o > r && (i = r, r = o, o = i), a > h && (i = h, h = a, a = i), this.helper.css({left:o, top:a, width:r - o, height:h - a}), this.selectees.each(function(){var i = t.data(this, "selectable-item"), l = !1; i && i.element !== s.element[0] && ("touch" === n.tolerance?l = !(i.left > r || i.right < o || i.top > h || i.bottom < a):"fit" === n.tolerance && (l = i.left > o && i.right < r && i.top > a && i.bottom < h), l?(i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, s._trigger("selecting", e, {selecting:i.element}))):(i.selecting && ((e.metaKey || e.ctrlKey) && i.startselected?(i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0):(i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), s._trigger("unselecting", e, {unselecting:i.element}))), i.selected && (e.metaKey || e.ctrlKey || i.startselected || (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, s._trigger("unselecting", e, {unselecting:i.element})))))}), !1}}, _mouseStop:function(e){var i = this; return this.dragged = !1, t(".ui-unselecting", this.element[0]).each(function(){var s = t.data(this, "selectable-item"); s.$element.removeClass("ui-unselecting"), s.unselecting = !1, s.startselected = !1, i._trigger("unselected", e, {unselected:s.element})}), t(".ui-selecting", this.element[0]).each(function(){var s = t.data(this, "selectable-item"); s.$element.removeClass("ui-selecting").addClass("ui-selected"), s.selecting = !1, s.selected = !0, s.startselected = !0, i._trigger("selected", e, {selected:s.element})}), this._trigger("stop", e), this.helper.remove(), !1}}), t.widget("ui.selectmenu", {version:"1.11.4", defaultElement:"<select>", options:{appendTo:null, disabled:null, icons:{button:"ui-icon-triangle-1-s"}, position:{my:"left top", at:"left bottom", collision:"none"}, width:null, change:null, close:null, focus:null, open:null, select:null}, _create:function(){var t = this.element.uniqueId().attr("id"); this.ids = {element:t, button:t + "-button", menu:t + "-menu"}, this._drawButton(), this._drawMenu(), this.options.disabled && this.disable()}, _drawButton:function(){var e = this; this.label = t("label[for='" + this.ids.element + "']").attr("for", this.ids.button), this._on(this.label, {click:function(t){this.button.focus(), t.preventDefault()}}), this.element.hide(), this.button = t("<span>", {class:"ui-selectmenu-button ui-widget ui-state-default ui-corner-all", tabindex:this.options.disabled? - 1:0, id:this.ids.button, role:"combobox", "aria-expanded":"false", "aria-autocomplete":"list", "aria-owns":this.ids.menu, "aria-haspopup":"true"}).insertAfter(this.element), t("<span>", {class:"ui-icon " + this.options.icons.button}).prependTo(this.button), this.buttonText = t("<span>", {class:"ui-selectmenu-text"}).appendTo(this.button), this._setText(this.buttonText, this.element.find("option:selected").text()), this._resizeButton(), this._on(this.button, this._buttonEvents), this.button.one("focusin", function(){e.menuItems || e._refreshMenu()}), this._hoverable(this.button), this._focusable(this.button)}, _drawMenu:function(){var e = this; this.menu = t("<ul>", {"aria-hidden":"true", "aria-labelledby":this.ids.button, id:this.ids.menu}), this.menuWrap = t("<div>", {class:"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()), this.menuInstance = this.menu.menu({role:"listbox", select:function(t, i){t.preventDefault(), e._setSelection(), e._select(i.item.data("ui-selectmenu-item"), t)}, focus:function(t, i){var s = i.item.data("ui-selectmenu-item"); null != e.focusIndex && s.index !== e.focusIndex && (e._trigger("focus", t, {item:s}), e.isOpen || e._select(s, t)), e.focusIndex = s.index, e.button.attr("aria-activedescendant", e.menuItems.eq(s.index).attr("id"))}}).menu("instance"), this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"), this.menuInstance._off(this.menu, "mouseleave"), this.menuInstance._closeOnDocumentClick = function(){return!1}, this.menuInstance._isDivider = function(){return!1}}, refresh:function(){this._refreshMenu(), this._setText(this.buttonText, this._getSelectedItem().text()), this.options.width || this._resizeButton()}, _refreshMenu:function(){this.menu.empty(); var t, e = this.element.find("option"); e.length && (this._parseOptions(e), this._renderMenu(this.menu, this.items), this.menuInstance.refresh(), this.menuItems = this.menu.find("li").not(".ui-selectmenu-optgroup"), t = this._getSelectedItem(), this.menuInstance.focus(null, t), this._setAria(t.data("ui-selectmenu-item")), this._setOption("disabled", this.element.prop("disabled")))}, open:function(t){this.options.disabled || (this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"), this.menuInstance.focus(null, this._getSelectedItem())):this._refreshMenu(), this.isOpen = !0, this._toggleAttr(), this._resizeMenu(), this._position(), this._on(this.document, this._documentClick), this._trigger("open", t))}, _position:function(){this.menuWrap.position(t.extend({of:this.button}, this.options.position))}, close:function(t){this.isOpen && (this.isOpen = !1, this._toggleAttr(), this.range = null, this._off(this.document), this._trigger("close", t))}, widget:function(){return this.button}, menuWidget:function(){return this.menu}, _renderMenu:function(e, i){var s = this, n = ""; t.each(i, function(i, o){o.optgroup !== n && (t("<li>", {class:"ui-selectmenu-optgroup ui-menu-divider" + (o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""), text:o.optgroup}).appendTo(e), n = o.optgroup), s._renderItemData(e, o)})}, _renderItemData:function(t, e){return this._renderItem(t, e).data("ui-selectmenu-item", e)}, _renderItem:function(e, i){var s = t("<li>"); return i.disabled && s.addClass("ui-state-disabled"), this._setText(s, i.label), s.appendTo(e)}, _setText:function(t, e){e?t.text(e):t.html("&#160;")}, _move:function(t, e){var i, s, n = ".ui-menu-item"; this.isOpen?i = this.menuItems.eq(this.focusIndex):(i = this.menuItems.eq(this.element[0].selectedIndex), n += ":not(.ui-state-disabled)"), (s = "first" === t || "last" === t?i["first" === t?"prevAll":"nextAll"](n).eq( - 1):i[t + "All"](n).eq(0)).length && this.menuInstance.focus(e, s)}, _getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)}, _toggle:function(t){this[this.isOpen?"close":"open"](t)}, _setSelection:function(){var t; this.range && (window.getSelection?((t = window.getSelection()).removeAllRanges(), t.addRange(this.range)):this.range.select(), this.button.focus())}, _documentClick:{mousedown:function(e){this.isOpen && (t(e.target).closest(".ui-selectmenu-menu, #" + this.ids.button).length || this.close(e))}}, _buttonEvents:{mousedown:function(){var t; window.getSelection?(t = window.getSelection()).rangeCount && (this.range = t.getRangeAt(0)):this.range = document.selection.createRange()}, click:function(t){this._setSelection(), this._toggle(t)}, keydown:function(e){var i = !0; switch (e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e), i = !1; break; case t.ui.keyCode.ENTER:this.isOpen && this._selectFocusedItem(e); break; case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev", e); break; case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next", e); break; case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e); break; case t.ui.keyCode.LEFT:this._move("prev", e); break; case t.ui.keyCode.RIGHT:this._move("next", e); break; case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first", e); break; case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last", e); break; default:this.menu.trigger(e), i = !1}i && e.preventDefault()}}, _selectFocusedItem:function(t){var e = this.menuItems.eq(this.focusIndex); e.hasClass("ui-state-disabled") || this._select(e.data("ui-selectmenu-item"), t)}, _select:function(t, e){var i = this.element[0].selectedIndex; this.element[0].selectedIndex = t.index, this._setText(this.buttonText, t.label), this._setAria(t), this._trigger("select", e, {item:t}), t.index !== i && this._trigger("change", e, {item:t}), this.close(e)}, _setAria:function(t){var e = this.menuItems.eq(t.index).attr("id"); this.button.attr({"aria-labelledby":e, "aria-activedescendant":e}), this.menu.attr("aria-activedescendant", e)}, _setOption:function(t, e){"icons" === t && this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button), this._super(t, e), "appendTo" === t && this.menuWrap.appendTo(this._appendTo()), "disabled" === t && (this.menuInstance.option("disabled", e), this.button.toggleClass("ui-state-disabled", e).attr("aria-disabled", e), this.element.prop("disabled", e), e?(this.button.attr("tabindex", - 1), this.close()):this.button.attr("tabindex", 0)), "width" === t && this._resizeButton()}, _appendTo:function(){var e = this.options.appendTo; return e && (e = e.jquery || e.nodeType?t(e):this.document.find(e).eq(0)), e && e[0] || (e = this.element.closest(".ui-front")), e.length || (e = this.document[0].body), e}, _toggleAttr:function(){this.button.toggleClass("ui-corner-top", this.isOpen).toggleClass("ui-corner-all", !this.isOpen).attr("aria-expanded", this.isOpen), this.menuWrap.toggleClass("ui-selectmenu-open", this.isOpen), this.menu.attr("aria-hidden", !this.isOpen)}, _resizeButton:function(){var t = this.options.width; t || (t = this.element.show().outerWidth(), this.element.hide()), this.button.outerWidth(t)}, _resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(), this.menu.width("").outerWidth() + 1))}, _getCreateOptions:function(){return{disabled:this.element.prop("disabled")}}, _parseOptions:function(e){var i = []; e.each(function(e, s){var n = t(s), o = n.parent("optgroup"); i.push({element:n, index:e, value:n.val(), label:n.text(), optgroup:o.attr("label") || "", disabled:o.prop("disabled") || n.prop("disabled")})}), this.items = i}, _destroy:function(){this.menuWrap.remove(), this.button.remove(), this.element.show(), this.element.removeUniqueId(), this.label.attr("for", this.ids.element)}}), t.widget("ui.slider", t.ui.mouse, {version:"1.11.4", widgetEventPrefix:"slide", options:{animate:!1, distance:0, max:100, min:0, orientation:"horizontal", range:!1, step:1, value:0, values:null, change:null, slide:null, start:null, stop:null}, numPages:5, _create:function(){this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this._calculateNewMax(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all"), this._refresh(), this._setOption("disabled", this.options.disabled), this._animateOff = !1}, _refresh:function(){this._createRange(), this._createHandles(), this._setupEvents(), this._refreshValue()}, _createHandles:function(){var e, i, s = this.options, n = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), o = []; for (i = s.values && s.values.length || 1, n.length > i && (n.slice(i).remove(), n = n.slice(0, i)), e = n.length; e < i; e++)o.push("<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>"); this.handles = n.add(t(o.join("")).appendTo(this.element)), this.handle = this.handles.eq(0), this.handles.each(function(e){t(this).data("ui-slider-handle-index", e)})}, _createRange:function(){var e = this.options, i = ""; e.range?(!0 === e.range && (e.values?e.values.length && 2 !== e.values.length?e.values = [e.values[0], e.values[0]]:t.isArray(e.values) && (e.values = e.values.slice(0)):e.values = [this._valueMin(), this._valueMin()]), this.range && this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"", bottom:""}):(this.range = t("<div></div>").appendTo(this.element), i = "ui-slider-range ui-widget-header ui-corner-all"), this.range.addClass(i + ("min" === e.range || "max" === e.range?" ui-slider-range-" + e.range:""))):(this.range && this.range.remove(), this.range = null)}, _setupEvents:function(){this._off(this.handles), this._on(this.handles, this._handleEvents), this._hoverable(this.handles), this._focusable(this.handles)}, _destroy:function(){this.handles.remove(), this.range && this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"), this._mouseDestroy()}, _mouseCapture:function(e){var i, s, n, o, a, r, h, l = this, c = this.options; return!c.disabled && (this.elementSize = {width:this.element.outerWidth(), height:this.element.outerHeight()}, this.elementOffset = this.element.offset(), i = {x:e.pageX, y:e.pageY}, s = this._normValueFromMouse(i), n = this._valueMax() - this._valueMin() + 1, this.handles.each(function(e){var i = Math.abs(s - l.values(e)); (n > i || n === i && (e === l._lastChangedValue || l.values(e) === c.min)) && (n = i, o = t(this), a = e)}), !1 !== this._start(e, a) && (this._mouseSliding = !0, this._handleIndex = a, o.addClass("ui-state-active").focus(), r = o.offset(), h = !t(e.target).parents().addBack().is(".ui-slider-handle"), this._clickOffset = h?{left:0, top:0}:{left:e.pageX - r.left - o.width() / 2, top:e.pageY - r.top - o.height() / 2 - (parseInt(o.css("borderTopWidth"), 10) || 0) - (parseInt(o.css("borderBottomWidth"), 10) || 0) + (parseInt(o.css("marginTop"), 10) || 0)}, this.handles.hasClass("ui-state-hover") || this._slide(e, a, s), this._animateOff = !0, !0))}, _mouseStart:function(){return!0}, _mouseDrag:function(t){var e = {x:t.pageX, y:t.pageY}, i = this._normValueFromMouse(e); return this._slide(t, this._handleIndex, i), !1}, _mouseStop:function(t){return this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(t, this._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1}, _detectOrientation:function(){this.orientation = "vertical" === this.options.orientation?"vertical":"horizontal"}, _normValueFromMouse:function(t){var e, i, s, n, o; return"horizontal" === this.orientation?(e = this.elementSize.width, i = t.x - this.elementOffset.left - (this._clickOffset?this._clickOffset.left:0)):(e = this.elementSize.height, i = t.y - this.elementOffset.top - (this._clickOffset?this._clickOffset.top:0)), (s = i / e) > 1 && (s = 1), s < 0 && (s = 0), "vertical" === this.orientation && (s = 1 - s), n = this._valueMax() - this._valueMin(), o = this._valueMin() + s * n, this._trimAlignValue(o)}, _start:function(t, e){var i = {handle:this.handles[e], value:this.value()}; return this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("start", t, i)}, _slide:function(t, e, i){var s, n, o; this.options.values && this.options.values.length?(s = this.values(e?0:1), 2 === this.options.values.length && !0 === this.options.range && (0 === e && i > s || 1 === e && i < s) && (i = s), i !== this.values(e) && ((n = this.values())[e] = i, o = this._trigger("slide", t, {handle:this.handles[e], value:i, values:n}), s = this.values(e?0:1), !1 !== o && this.values(e, i))):i !== this.value() && !1 !== (o = this._trigger("slide", t, {handle:this.handles[e], value:i})) && this.value(i)}, _stop:function(t, e){var i = {handle:this.handles[e], value:this.value()}; this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("stop", t, i)}, _change:function(t, e){if (!this._keySliding && !this._mouseSliding){var i = {handle:this.handles[e], value:this.value()}; this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._lastChangedValue = e, this._trigger("change", t, i)}}, value:function(t){return arguments.length?(this.options.value = this._trimAlignValue(t), this._refreshValue(), void this._change(null, 0)):this._value()}, values:function(e, i){var s, n, o; if (arguments.length > 1)return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(), void this._change(null, e); if (!arguments.length)return this._values(); if (!t.isArray(arguments[0]))return this.options.values && this.options.values.length?this._values(e):this.value(); for (s = this.options.values, n = arguments[0], o = 0; o < s.length; o += 1)s[o] = this._trimAlignValue(n[o]), this._change(null, o); this._refreshValue()}, _setOption:function(e, i){var s, n = 0; switch ("range" === e && !0 === this.options.range && ("min" === i?(this.options.value = this._values(0), this.options.values = null):"max" === i && (this.options.value = this._values(this.options.values.length - 1), this.options.values = null)), t.isArray(this.options.values) && (n = this.options.values.length), "disabled" === e && this.element.toggleClass("ui-state-disabled", !!i), this._super(e, i), e){case"orientation":this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue(), this.handles.css("horizontal" === i?"bottom":"left", ""); break; case"value":this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1; break; case"values":for (this._animateOff = !0, this._refreshValue(), s = 0; s < n; s += 1)this._change(null, s); this._animateOff = !1; break; case"step":case"min":case"max":this._animateOff = !0, this._calculateNewMax(), this._refreshValue(), this._animateOff = !1; break; case"range":this._animateOff = !0, this._refresh(), this._animateOff = !1}}, _value:function(){var t = this.options.value; return t = this._trimAlignValue(t)}, _values:function(t){var e, i, s; if (arguments.length)return e = this.options.values[t], e = this._trimAlignValue(e); if (this.options.values && this.options.values.length){for (i = this.options.values.slice(), s = 0; s < i.length; s += 1)i[s] = this._trimAlignValue(i[s]); return i}return[]}, _trimAlignValue:function(t){if (t <= this._valueMin())return this._valueMin(); if (t >= this._valueMax())return this._valueMax(); var e = this.options.step > 0?this.options.step:1, i = (t - this._valueMin()) % e, s = t - i; return 2 * Math.abs(i) >= e && (s += i > 0?e: - e), parseFloat(s.toFixed(5))}, _calculateNewMax:function(){var t = this.options.max, e = this._valueMin(), i = this.options.step; t = Math.floor( + (t - e).toFixed(this._precision()) / i) * i + e, this.max = parseFloat(t.toFixed(this._precision()))}, _precision:function(){var t = this._precisionOf(this.options.step); return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t}, _precisionOf:function(t){var e = t.toString(), i = e.indexOf("."); return - 1 === i?0:e.length - i - 1}, _valueMin:function(){return this.options.min}, _valueMax:function(){return this.max}, _refreshValue:function(){var e, i, s, n, o, a = this.options.range, r = this.options, h = this, l = !this._animateOff && r.animate, c = {}; this.options.values && this.options.values.length?this.handles.each(function(s){i = (h.values(s) - h._valueMin()) / (h._valueMax() - h._valueMin()) * 100, c["horizontal" === h.orientation?"left":"bottom"] = i + "%", t(this).stop(1, 1)[l?"animate":"css"](c, r.animate), !0 === h.options.range && ("horizontal" === h.orientation?(0 === s && h.range.stop(1, 1)[l?"animate":"css"]({left:i + "%"}, r.animate), 1 === s && h.range[l?"animate":"css"]({width:i - e + "%"}, {queue:!1, duration:r.animate})):(0 === s && h.range.stop(1, 1)[l?"animate":"css"]({bottom:i + "%"}, r.animate), 1 === s && h.range[l?"animate":"css"]({height:i - e + "%"}, {queue:!1, duration:r.animate}))), e = i}):(s = this.value(), n = this._valueMin(), o = this._valueMax(), i = o !== n?(s - n) / (o - n) * 100:0, c["horizontal" === this.orientation?"left":"bottom"] = i + "%", this.handle.stop(1, 1)[l?"animate":"css"](c, r.animate), "min" === a && "horizontal" === this.orientation && this.range.stop(1, 1)[l?"animate":"css"]({width:i + "%"}, r.animate), "max" === a && "horizontal" === this.orientation && this.range[l?"animate":"css"]({width:100 - i + "%"}, {queue:!1, duration:r.animate}), "min" === a && "vertical" === this.orientation && this.range.stop(1, 1)[l?"animate":"css"]({height:i + "%"}, r.animate), "max" === a && "vertical" === this.orientation && this.range[l?"animate":"css"]({height:100 - i + "%"}, {queue:!1, duration:r.animate}))}, _handleEvents:{keydown:function(e){var i, s, n, o = t(e.target).data("ui-slider-handle-index"); switch (e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if (e.preventDefault(), !this._keySliding && (this._keySliding = !0, t(e.target).addClass("ui-state-active"), !1 === this._start(e, o)))return}switch (n = this.options.step, i = s = this.options.values && this.options.values.length?this.values(o):this.value(), e.keyCode){case t.ui.keyCode.HOME:s = this._valueMin(); break; case t.ui.keyCode.END:s = this._valueMax(); break; case t.ui.keyCode.PAGE_UP:s = this._trimAlignValue(i + (this._valueMax() - this._valueMin()) / this.numPages); break; case t.ui.keyCode.PAGE_DOWN:s = this._trimAlignValue(i - (this._valueMax() - this._valueMin()) / this.numPages); break; case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if (i === this._valueMax())return; s = this._trimAlignValue(i + n); break; case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if (i === this._valueMin())return; s = this._trimAlignValue(i - n)}this._slide(e, o, s)}, keyup:function(e){var i = t(e.target).data("ui-slider-handle-index"); this._keySliding && (this._keySliding = !1, this._stop(e, i), this._change(e, i), t(e.target).removeClass("ui-state-active"))}}}), t.widget("ui.sortable", t.ui.mouse, {version:"1.11.4", widgetEventPrefix:"sort", ready:!1, options:{appendTo:"parent", axis:!1, connectWith:!1, containment:!1, cursor:"auto", cursorAt:!1, dropOnEmpty:!0, forcePlaceholderSize:!1, forceHelperSize:!1, grid:!1, handle:!1, helper:"original", items:"> *", opacity:!1, placeholder:!1, revert:!1, scroll:!0, scrollSensitivity:20, scrollSpeed:20, scope:"default", tolerance:"intersect", zIndex:1e3, activate:null, beforeStop:null, change:null, deactivate:null, out:null, over:null, receive:null, remove:null, sort:null, start:null, stop:null, update:null}, _isOverAxis:function(t, e, i){return t >= e && t < e + i}, _isFloating:function(t){return/left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))}, _create:function(){this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.offset = this.element.offset(), this._mouseInit(), this._setHandleClassName(), this.ready = !0}, _setOption:function(t, e){this._super(t, e), "handle" === t && this._setHandleClassName()}, _setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"), t.each(this.items, function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})}, _destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"), this._mouseDestroy(); for (var t = this.items.length - 1; t >= 0; t--)this.items[t].item.removeData(this.widgetName + "-item"); return this}, _mouseCapture:function(e, i){var s = null, n = !1, o = this; return!this.reverting && (!this.options.disabled && "static" !== this.options.type && (this._refreshItems(e), t(e.target).parents().each(function(){if (t.data(this, o.widgetName + "-item") === o)return s = t(this), !1}), t.data(e.target, o.widgetName + "-item") === o && (s = t(e.target)), !!s && (!(this.options.handle && !i && (t(this.options.handle, s).find("*").addBack().each(function(){this === e.target && (n = !0)}), !n)) && (this.currentItem = s, this._removeCurrentsFromItems(), !0))))}, _mouseStart:function(e, i, s){var n, o, a = this.options; if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(e), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {top:this.offset.top - this.margins.top, left:this.offset.left - this.margins.left}, t.extend(this.offset, {click:{left:e.pageX - this.offset.left, top:e.pageY - this.offset.top}, parent:this._getParentOffset(), relative:this._getRelativeOffset()}), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(e), this.originalPageX = e.pageX, this.originalPageY = e.pageY, a.cursorAt && this._adjustOffsetFromHelper(a.cursorAt), this.domPosition = {prev:this.currentItem.prev()[0], parent:this.currentItem.parent()[0]}, this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), a.containment && this._setContainment(), a.cursor && "auto" !== a.cursor && (o = this.document.find("body"), this.storedCursor = o.css("cursor"), o.css("cursor", a.cursor), this.storedStylesheet = t("<style>*{ cursor: " + a.cursor + " !important; }</style>").appendTo(o)), a.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", a.opacity)), a.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", a.zIndex)), this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", e, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s)for (n = this.containers.length - 1; n >= 0; n--)this.containers[n]._trigger("activate", e, this._uiHash(this)); return t.ui.ddmanager && (t.ui.ddmanager.current = this), t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(e), !0}, _mouseDrag:function(e){var i, s, n, o, a = this.options, r = !1; for (this.position = this._generatePosition(e), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== this.document[0] && "HTML" !== this.scrollParent[0].tagName?(this.overflowOffset.top + this.scrollParent[0].offsetHeight - e.pageY < a.scrollSensitivity?this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + a.scrollSpeed:e.pageY - this.overflowOffset.top < a.scrollSensitivity && (this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - a.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - e.pageX < a.scrollSensitivity?this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + a.scrollSpeed:e.pageX - this.overflowOffset.left < a.scrollSensitivity && (this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - a.scrollSpeed)):(e.pageY - this.document.scrollTop() < a.scrollSensitivity?r = this.document.scrollTop(this.document.scrollTop() - a.scrollSpeed):this.window.height() - (e.pageY - this.document.scrollTop()) < a.scrollSensitivity && (r = this.document.scrollTop(this.document.scrollTop() + a.scrollSpeed)), e.pageX - this.document.scrollLeft() < a.scrollSensitivity?r = this.document.scrollLeft(this.document.scrollLeft() - a.scrollSpeed):this.window.width() - (e.pageX - this.document.scrollLeft()) < a.scrollSensitivity && (r = this.document.scrollLeft(this.document.scrollLeft() + a.scrollSpeed))), !1 !== r && t.ui.ddmanager && !a.dropBehaviour && t.ui.ddmanager.prepareOffsets(this, e)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--)if (s = this.items[i], n = s.item[0], (o = this._intersectsWithPointer(s)) && s.instance === this.currentContainer && !(n === this.currentItem[0] || this.placeholder[1 === o?"next":"prev"]()[0] === n || t.contains(this.placeholder[0], n) || "semi-dynamic" === this.options.type && t.contains(this.element[0], n))){if (this.direction = 1 === o?"down":"up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(s))break; this._rearrange(e, s), this._trigger("change", e, this._uiHash()); break}return this._contactContainers(e), t.ui.ddmanager && t.ui.ddmanager.drag(this, e), this._trigger("sort", e, this._uiHash()), this.lastPositionAbs = this.positionAbs, !1}, _mouseStop:function(e, i){if (e){if (t.ui.ddmanager && !this.options.dropBehaviour && t.ui.ddmanager.drop(this, e), this.options.revert){var s = this, n = this.placeholder.offset(), o = this.options.axis, a = {}; o && "x" !== o || (a.left = n.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body?0:this.offsetParent[0].scrollLeft)), o && "y" !== o || (a.top = n.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body?0:this.offsetParent[0].scrollTop)), this.reverting = !0, t(this.helper).animate(a, parseInt(this.options.revert, 10) || 500, function(){s._clear(e)})} else this._clear(e, i); return!1}}, cancel:function(){if (this.dragging){this._mouseUp({target:null}), "original" === this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show(); for (var e = this.containers.length - 1; e >= 0; e--)this.containers[e]._trigger("deactivate", null, this._uiHash(this)), this.containers[e].containerCache.over && (this.containers[e]._trigger("out", null, this._uiHash(this)), this.containers[e].containerCache.over = 0)}return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), t.extend(this, {helper:null, dragging:!1, reverting:!1, _noFinalSort:null}), this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)), this}, serialize:function(e){var i = this._getItemsAsjQuery(e && e.connected), s = []; return e = e || {}, t(i).each(function(){var i = (t(e.item || this).attr(e.attribute || "id") || "").match(e.expression || /(.+)[\-=_](.+)/); i && s.push((e.key || i[1] + "[]") + "=" + (e.key && e.expression?i[1]:i[2]))}), !s.length && e.key && s.push(e.key + "="), s.join("&")}, toArray:function(e){var i = this._getItemsAsjQuery(e && e.connected), s = []; return e = e || {}, i.each(function(){s.push(t(e.item || this).attr(e.attribute || "id") || "")}), s}, _intersectsWith:function(t){var e = this.positionAbs.left, i = e + this.helperProportions.width, s = this.positionAbs.top, n = s + this.helperProportions.height, o = t.left, a = o + t.width, r = t.top, h = r + t.height, l = this.offset.click.top, c = this.offset.click.left, u = "x" === this.options.axis || s + l > r && s + l < h, d = "y" === this.options.axis || e + c > o && e + c < a, p = u && d; return"pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating?"width":"height"] > t[this.floating?"width":"height"]?p:o < e + this.helperProportions.width / 2 && i - this.helperProportions.width / 2 < a && r < s + this.helperProportions.height / 2 && n - this.helperProportions.height / 2 < h}, _intersectsWithPointer:function(t){var e = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height), i = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width), s = e && i, n = this._getDragVerticalDirection(), o = this._getDragHorizontalDirection(); return!!s && (this.floating?o && "right" === o || "down" === n?2:1:n && ("down" === n?2:1))}, _intersectsWithSides:function(t){var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height), i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width), s = this._getDragVerticalDirection(), n = this._getDragHorizontalDirection(); return this.floating && n?"right" === n && i || "left" === n && !i:s && ("down" === s && e || "up" === s && !e)}, _getDragVerticalDirection:function(){var t = this.positionAbs.top - this.lastPositionAbs.top; return 0 !== t && (t > 0?"down":"up")}, _getDragHorizontalDirection:function(){var t = this.positionAbs.left - this.lastPositionAbs.left; return 0 !== t && (t > 0?"right":"left")}, refresh:function(t){return this._refreshItems(t), this._setHandleClassName(), this.refreshPositions(), this}, _connectWith:function(){var t = this.options; return t.connectWith.constructor === String?[t.connectWith]:t.connectWith}, _getItemsAsjQuery:function(e){var i, s, n, o, a = [], r = [], h = this._connectWith(); if (h && e)for (i = h.length - 1; i >= 0; i--)for (s = (n = t(h[i], this.document[0])).length - 1; s >= 0; s--)(o = t.data(n[s], this.widgetFullName)) && o !== this && !o.options.disabled && r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items, o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), o]); for (r.push([t.isFunction(this.options.items)?this.options.items.call(this.element, null, {options:this.options, item:this.currentItem}):t(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), i = r.length - 1; i >= 0; i--)r[i][0].each(function(){a.push(this)}); return t(a)}, _removeCurrentsFromItems:function(){var e = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = t.grep(this.items, function(t){for (var i = 0; i < e.length; i++)if (e[i] === t.item[0])return!1; return!0})}, _refreshItems:function(e){this.items = [], this.containers = [this]; var i, s, n, o, a, r, h, l, c = this.items, u = [[t.isFunction(this.options.items)?this.options.items.call(this.element[0], e, {item:this.currentItem}):t(this.options.items, this.element), this]], d = this._connectWith(); if (d && this.ready)for (i = d.length - 1; i >= 0; i--)for (s = (n = t(d[i], this.document[0])).length - 1; s >= 0; s--)(o = t.data(n[s], this.widgetFullName)) && o !== this && !o.options.disabled && (u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0], e, {item:this.currentItem}):t(o.options.items, o.element), o]), this.containers.push(o)); for (i = u.length - 1; i >= 0; i--)for (a = u[i][1], s = 0, l = (r = u[i][0]).length; s < l; s++)(h = t(r[s])).data(this.widgetName + "-item", a), c.push({item:h, instance:a, width:0, height:0, left:0, top:0})}, refreshPositions:function(e){this.floating = !!this.items.length && ("x" === this.options.axis || this._isFloating(this.items[0].item)), this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); var i, s, n, o; for (i = this.items.length - 1; i >= 0; i--)(s = this.items[i]).instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (n = this.options.toleranceElement?t(this.options.toleranceElement, s.item):s.item, e || (s.width = n.outerWidth(), s.height = n.outerHeight()), o = n.offset(), s.left = o.left, s.top = o.top); if (this.options.custom && this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); else for (i = this.containers.length - 1; i >= 0; i--)o = this.containers[i].element.offset(), this.containers[i].containerCache.left = o.left, this.containers[i].containerCache.top = o.top, this.containers[i].containerCache.width = this.containers[i].element.outerWidth(), this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); return this}, _createPlaceholder:function(e){var i, s = (e = e || this).options; s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = {element:function(){var s = e.currentItem[0].nodeName.toLowerCase(), n = t("<" + s + ">", e.document[0]).addClass(i || e.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper"); return"tbody" === s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0), t("<tr>", e.document[0]).appendTo(n)):"tr" === s?e._createTrPlaceholder(e.currentItem, n):"img" === s && n.attr("src", e.currentItem.attr("src")), i || n.css("visibility", "hidden"), n}, update:function(t, n){i && !s.forcePlaceholderSize || (n.height() || n.height(e.currentItem.innerHeight() - parseInt(e.currentItem.css("paddingTop") || 0, 10) - parseInt(e.currentItem.css("paddingBottom") || 0, 10)), n.width() || n.width(e.currentItem.innerWidth() - parseInt(e.currentItem.css("paddingLeft") || 0, 10) - parseInt(e.currentItem.css("paddingRight") || 0, 10)))}}), e.placeholder = t(s.placeholder.element.call(e.element, e.currentItem)), e.currentItem.after(e.placeholder), s.placeholder.update(e, e.placeholder)}, _createTrPlaceholder:function(e, i){var s = this; e.children().each(function(){t("<td>&#160;</td>", s.document[0]).attr("colspan", t(this).attr("colspan") || 1).appendTo(i)})}, _contactContainers:function(e){var i, s, n, o, a, r, h, l, c, u, d = null, p = null; for (i = this.containers.length - 1; i >= 0; i--)if (!t.contains(this.currentItem[0], this.containers[i].element[0]))if (this._intersectsWith(this.containers[i].containerCache)){if (d && t.contains(this.containers[i].element[0], d.element[0]))continue; d = this.containers[i], p = i} else this.containers[i].containerCache.over && (this.containers[i]._trigger("out", e, this._uiHash(this)), this.containers[i].containerCache.over = 0); if (d)if (1 === this.containers.length)this.containers[p].containerCache.over || (this.containers[p]._trigger("over", e, this._uiHash(this)), this.containers[p].containerCache.over = 1); else{for (n = 1e4, o = null, a = (c = d.floating || this._isFloating(this.currentItem))?"left":"top", r = c?"width":"height", u = c?"clientX":"clientY", s = this.items.length - 1; s >= 0; s--)t.contains(this.containers[p].element[0], this.items[s].item[0]) && this.items[s].item[0] !== this.currentItem[0] && (h = this.items[s].item.offset()[a], l = !1, e[u] - h > this.items[s][r] / 2 && (l = !0), Math.abs(e[u] - h) < n && (n = Math.abs(e[u] - h), o = this.items[s], this.direction = l?"up":"down")); if (!o && !this.options.dropOnEmpty)return; if (this.currentContainer === this.containers[p])return void(this.currentContainer.containerCache.over || (this.containers[p]._trigger("over", e, this._uiHash()), this.currentContainer.containerCache.over = 1)); o?this._rearrange(e, o, null, !0):this._rearrange(e, null, this.containers[p].element, !0), this._trigger("change", e, this._uiHash()), this.containers[p]._trigger("change", e, this._uiHash(this)), this.currentContainer = this.containers[p], this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[p]._trigger("over", e, this._uiHash(this)), this.containers[p].containerCache.over = 1}}, _createHelper:function(e){var i = this.options, s = t.isFunction(i.helper)?t(i.helper.apply(this.element[0], [e, this.currentItem])):"clone" === i.helper?this.currentItem.clone():this.currentItem; return s.parents("body").length || t("parent" !== i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]), s[0] === this.currentItem[0] && (this._storedCSS = {width:this.currentItem[0].style.width, height:this.currentItem[0].style.height, position:this.currentItem.css("position"), top:this.currentItem.css("top"), left:this.currentItem.css("left")}), s[0].style.width && !i.forceHelperSize || s.width(this.currentItem.width()), s[0].style.height && !i.forceHelperSize || s.height(this.currentItem.height()), s}, _adjustOffsetFromHelper:function(e){"string" == typeof e && (e = e.split(" ")), t.isArray(e) && (e = {left: + e[0], top: + e[1] || 0}), "left"in e && (this.offset.click.left = e.left + this.margins.left), "right"in e && (this.offset.click.left = this.helperProportions.width - e.right + this.margins.left), "top"in e && (this.offset.click.top = e.top + this.margins.top), "bottom"in e && (this.offset.click.top = this.helperProportions.height - e.bottom + this.margins.top)}, _getParentOffset:function(){this.offsetParent = this.helper.offsetParent(); var e = this.offsetParent.offset(); return"absolute" === this.cssPosition && this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0]) && (e.left += this.scrollParent.scrollLeft(), e.top += this.scrollParent.scrollTop()), (this.offsetParent[0] === this.document[0].body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && t.ui.ie) && (e = {top:0, left:0}), {top:e.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left:e.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}}, _getRelativeOffset:function(){if ("relative" === this.cssPosition){var t = this.currentItem.position(); return{top:t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left:t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()}}return{top:0, left:0}}, _cacheMargins:function(){this.margins = {left:parseInt(this.currentItem.css("marginLeft"), 10) || 0, top:parseInt(this.currentItem.css("marginTop"), 10) || 0}}, _cacheHelperProportions:function(){this.helperProportions = {width:this.helper.outerWidth(), height:this.helper.outerHeight()}}, _setContainment:function(){var e, i, s, n = this.options; "parent" === n.containment && (n.containment = this.helper[0].parentNode), "document" !== n.containment && "window" !== n.containment || (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, "document" === n.containment?this.document.width():this.window.width() - this.helperProportions.width - this.margins.left, ("document" === n.containment?this.document.width():this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]), /^(document|window|parent)$/.test(n.containment) || (e = t(n.containment)[0], i = t(n.containment).offset(), s = "hidden" !== t(e).css("overflow"), this.containment = [i.left + (parseInt(t(e).css("borderLeftWidth"), 10) || 0) + (parseInt(t(e).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(t(e).css("borderTopWidth"), 10) || 0) + (parseInt(t(e).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s?Math.max(e.scrollWidth, e.offsetWidth):e.offsetWidth) - (parseInt(t(e).css("borderLeftWidth"), 10) || 0) - (parseInt(t(e).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s?Math.max(e.scrollHeight, e.offsetHeight):e.offsetHeight) - (parseInt(t(e).css("borderTopWidth"), 10) || 0) - (parseInt(t(e).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])}, _convertPositionTo:function(e, i){i || (i = this.position); var s = "absolute" === e?1: - 1, n = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0])?this.scrollParent:this.offsetParent, o = /(html|body)/i.test(n[0].tagName); return{top:i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition? - this.scrollParent.scrollTop():o?0:n.scrollTop()) * s, left:i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition? - this.scrollParent.scrollLeft():o?0:n.scrollLeft()) * s}}, _generatePosition:function(e){var i, s, n = this.options, o = e.pageX, a = e.pageY, r = "absolute" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && t.contains(this.scrollParent[0], this.offsetParent[0])?this.scrollParent:this.offsetParent, h = /(html|body)/i.test(r[0].tagName); return"relative" !== this.cssPosition || this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()), this.originalPosition && (this.containment && (e.pageX - this.offset.click.left < this.containment[0] && (o = this.containment[0] + this.offset.click.left), e.pageY - this.offset.click.top < this.containment[1] && (a = this.containment[1] + this.offset.click.top), e.pageX - this.offset.click.left > this.containment[2] && (o = this.containment[2] + this.offset.click.left), e.pageY - this.offset.click.top > this.containment[3] && (a = this.containment[3] + this.offset.click.top)), n.grid && (i = this.originalPageY + Math.round((a - this.originalPageY) / n.grid[1]) * n.grid[1], a = this.containment?i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3]?i:i - this.offset.click.top >= this.containment[1]?i - n.grid[1]:i + n.grid[1]:i, s = this.originalPageX + Math.round((o - this.originalPageX) / n.grid[0]) * n.grid[0], o = this.containment?s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2]?s:s - this.offset.click.left >= this.containment[0]?s - n.grid[0]:s + n.grid[0]:s)), {top:a - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition? - this.scrollParent.scrollTop():h?0:r.scrollTop()), left:o - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition? - this.scrollParent.scrollLeft():h?0:r.scrollLeft())}}, _rearrange:function(t, e, i, s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction?e.item[0]:e.item[0].nextSibling), this.counter = this.counter?++this.counter:1; var n = this.counter; this._delay(function(){n === this.counter && this.refreshPositions(!s)})}, _clear:function(t, e){function i(t, e, i){return function(s){i._trigger(t, s, e._uiHash(e))}}this.reverting = !1; var s, n = []; if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]){for (s in this._storedCSS)"auto" !== this._storedCSS[s] && "static" !== this._storedCSS[s] || (this._storedCSS[s] = ""); this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")} else this.currentItem.show(); for (this.fromOutside && !e && n.push(function(t){this._trigger("receive", t, this._uiHash(this.fromOutside))}), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || n.push(function(t){this._trigger("update", t, this._uiHash())}), this !== this.currentContainer && (e || (n.push(function(t){this._trigger("remove", t, this._uiHash())}), n.push(function(t){return function(e){t._trigger("receive", e, this._uiHash(this))}}.call(this, this.currentContainer)), n.push(function(t){return function(e){t._trigger("update", e, this._uiHash(this))}}.call(this, this.currentContainer)))), s = this.containers.length - 1; s >= 0; s--)e || n.push(i("deactivate", this, this.containers[s])), this.containers[s].containerCache.over && (n.push(i("out", this, this.containers[s])), this.containers[s].containerCache.over = 0); if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex?"":this._storedZIndex), this.dragging = !1, e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.cancelHelperRemoval || (this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null), !e){for (s = 0; s < n.length; s++)n[s].call(this, t); this._trigger("stop", t, this._uiHash())}return this.fromOutside = !1, !this.cancelHelperRemoval}, _trigger:function(){!1 === t.Widget.prototype._trigger.apply(this, arguments) && this.cancel()}, _uiHash:function(e){var i = e || this; return{helper:i.helper, placeholder:i.placeholder || t([]), position:i.position, originalPosition:i.originalPosition, offset:i.positionAbs, item:i.currentItem, sender:e?e.element:null}}}), t.widget("ui.spinner", {version:"1.11.4", defaultElement:"<input>", widgetEventPrefix:"spin", options:{culture:null, icons:{down:"ui-icon-triangle-1-s", up:"ui-icon-triangle-1-n"}, incremental:!0, max:null, min:null, numberFormat:null, page:10, step:1, change:null, spin:null, start:null, stop:null}, _create:function(){this._setOption("max", this.options.max), this._setOption("min", this.options.min), this._setOption("step", this.options.step), "" !== this.value() && this._value(this.element.val(), !0), this._draw(), this._on(this._events), this._refresh(), this._on(this.window, {beforeunload:function(){this.element.removeAttr("autocomplete")}})}, _getCreateOptions:function(){var e = {}, i = this.element; return t.each(["min", "max", "step"], function(t, s){var n = i.attr(s); void 0 !== n && n.length && (e[s] = n)}), e}, _events:{keydown:function(t){this._start(t) && this._keydown(t) && t.preventDefault()}, keyup:"_stop", focus:function(){this.previous = this.element.val()}, blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(), this._refresh(), this.previous !== this.element.val() && this._trigger("change", t))}, mousewheel:function(t, e){if (e){if (!this.spinning && !this._start(t))return!1; this._spin((e > 0?1: - 1) * this.options.step, t), clearTimeout(this.mousewheelTimer), this.mousewheelTimer = this._delay(function(){this.spinning && this._stop(t)}, 100), t.preventDefault()}}, "mousedown .ui-spinner-button":function(e){function i(){this.element[0] === this.document[0].activeElement || (this.element.focus(), this.previous = s, this._delay(function(){this.previous = s}))}var s; s = this.element[0] === this.document[0].activeElement?this.previous:this.element.val(), e.preventDefault(), i.call(this), this.cancelBlur = !0, this._delay(function(){delete this.cancelBlur, i.call(this)}), !1 !== this._start(e) && this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up")?1: - 1, e)}, "mouseup .ui-spinner-button":"_stop", "mouseenter .ui-spinner-button":function(e){if (t(e.currentTarget).hasClass("ui-state-active"))return!1 !== this._start(e) && void this._repeat(null, t(e.currentTarget).hasClass("ui-spinner-up")?1: - 1, e)}, "mouseleave .ui-spinner-button":"_stop"}, _draw:function(){var t = this.uiSpinner = this.element.addClass("ui-spinner-input").attr("autocomplete", "off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml()); this.element.attr("role", "spinbutton"), this.buttons = t.find(".ui-spinner-button").attr("tabIndex", - 1).button().removeClass("ui-corner-all"), this.buttons.height() > Math.ceil(.5 * t.height()) && t.height() > 0 && t.height(t.height()), this.options.disabled && this.disable()}, _keydown:function(e){var i = this.options, s = t.ui.keyCode; switch (e.keyCode){case s.UP:return this._repeat(null, 1, e), !0; case s.DOWN:return this._repeat(null, - 1, e), !0; case s.PAGE_UP:return this._repeat(null, i.page, e), !0; case s.PAGE_DOWN:return this._repeat(null, - i.page, e), !0}return!1}, _uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"}, _buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon " + this.options.icons.up + "'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon " + this.options.icons.down + "'>&#9660;</span></a>"}, _start:function(t){return!(!this.spinning && !1 === this._trigger("start", t)) && (this.counter || (this.counter = 1), this.spinning = !0, !0)}, _repeat:function(t, e, i){t = t || 500, clearTimeout(this.timer), this.timer = this._delay(function(){this._repeat(40, e, i)}, t), this._spin(e * this.options.step, i)}, _spin:function(t, e){var i = this.value() || 0; this.counter || (this.counter = 1), i = this._adjustValue(i + t * this._increment(this.counter)), this.spinning && !1 === this._trigger("spin", e, {value:i}) || (this._value(i), this.counter++)}, _increment:function(e){var i = this.options.incremental; return i?t.isFunction(i)?i(e):Math.floor(e * e * e / 5e4 - e * e / 500 + 17 * e / 200 + 1):1}, _precision:function(){var t = this._precisionOf(this.options.step); return null !== this.options.min && (t = Math.max(t, this._precisionOf(this.options.min))), t}, _precisionOf:function(t){var e = t.toString(), i = e.indexOf("."); return - 1 === i?0:e.length - i - 1}, _adjustValue:function(t){var e, i, s = this.options; return e = null !== s.min?s.min:0, i = t - e, i = Math.round(i / s.step) * s.step, t = e + i, t = parseFloat(t.toFixed(this._precision())), null !== s.max && t > s.max?s.max:null !== s.min && t < s.min?s.min:t}, _stop:function(t){this.spinning && (clearTimeout(this.timer), clearTimeout(this.mousewheelTimer), this.counter = 0, this.spinning = !1, this._trigger("stop", t))}, _setOption:function(t, e){if ("culture" === t || "numberFormat" === t){var i = this._parse(this.element.val()); return this.options[t] = e, void this.element.val(this._format(i))}"max" !== t && "min" !== t && "step" !== t || "string" == typeof e && (e = this._parse(e)), "icons" === t && (this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up), this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)), this._super(t, e), "disabled" === t && (this.widget().toggleClass("ui-state-disabled", !!e), this.element.prop("disabled", !!e), this.buttons.button(e?"disable":"enable"))}, _setOptions:h(function(t){this._super(t)}), _parse:function(t){return"string" == typeof t && "" !== t && (t = window.Globalize && this.options.numberFormat?Globalize.parseFloat(t, 10, this.options.culture): + t), "" === t || isNaN(t)?null:t}, _format:function(t){return"" === t?"":window.Globalize && this.options.numberFormat?Globalize.format(t, this.options.numberFormat, this.options.culture):t}, _refresh:function(){this.element.attr({"aria-valuemin":this.options.min, "aria-valuemax":this.options.max, "aria-valuenow":this._parse(this.element.val())})}, isValid:function(){var t = this.value(); return null !== t && t === this._adjustValue(t)}, _value:function(t, e){var i; "" !== t && null !== (i = this._parse(t)) && (e || (i = this._adjustValue(i)), t = this._format(i)), this.element.val(t), this._refresh()}, _destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled", !1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.uiSpinner.replaceWith(this.element)}, stepUp:h(function(t){this._stepUp(t)}), _stepUp:function(t){this._start() && (this._spin((t || 1) * this.options.step), this._stop())}, stepDown:h(function(t){this._stepDown(t)}), _stepDown:function(t){this._start() && (this._spin((t || 1) * - this.options.step), this._stop())}, pageUp:h(function(t){this._stepUp((t || 1) * this.options.page)}), pageDown:h(function(t){this._stepDown((t || 1) * this.options.page)}), value:function(t){if (!arguments.length)return this._parse(this.element.val()); h(this._value).call(this, t)}, widget:function(){return this.uiSpinner}}), t.widget("ui.tabs", {version:"1.11.4", delay:300, options:{active:null, collapsible:!1, event:"click", heightStyle:"content", hide:null, show:null, activate:null, beforeActivate:null, beforeLoad:null, load:null}, _isLocal:function(){var t = /#.*$/; return function(e){var i, s; i = (e = e.cloneNode(!1)).href.replace(t, ""), s = location.href.replace(t, ""); try{i = decodeURIComponent(i)} catch (t){}try{s = decodeURIComponent(s)} catch (t){}return e.hash.length > 1 && i === s}}(), _create:function(){var e = this, i = this.options; this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", i.collapsible), this._processTabs(), i.active = this._initialActive(), t.isArray(i.disabled) && (i.disabled = t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"), function(t){return e.tabs.index(t)}))).sort()), !1 !== this.options.active && this.anchors.length?this.active = this._findActive(i.active):this.active = t(), this._refresh(), this.active.length && this.load(i.active)}, _initialActive:function(){var e = this.options.active, i = this.options.collapsible, s = location.hash.substring(1); return null === e && (s && this.tabs.each(function(i, n){if (t(n).attr("aria-controls") === s)return e = i, !1}), null === e && (e = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), null !== e && - 1 !== e || (e = !!this.tabs.length && 0)), !1 !== e && - 1 === (e = this.tabs.index(this.tabs.eq(e))) && (e = !i && 0), !i && !1 === e && this.anchors.length && (e = 0), e}, _getCreateEventData:function(){return{tab:this.active, panel:this.active.length?this._getPanelForTab(this.active):t()}}, _tabKeydown:function(e){var i = t(this.document[0].activeElement).closest("li"), s = this.tabs.index(i), n = !0; if (!this._handlePageNav(e)){switch (e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++; break; case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n = !1, s--; break; case t.ui.keyCode.END:s = this.anchors.length - 1; break; case t.ui.keyCode.HOME:s = 0; break; case t.ui.keyCode.SPACE:return e.preventDefault(), clearTimeout(this.activating), void this._activate(s); case t.ui.keyCode.ENTER:return e.preventDefault(), clearTimeout(this.activating), void this._activate(s !== this.options.active && s); default:return}e.preventDefault(), clearTimeout(this.activating), s = this._focusNextTab(s, n), e.ctrlKey || e.metaKey || (i.attr("aria-selected", "false"), this.tabs.eq(s).attr("aria-selected", "true"), this.activating = this._delay(function(){this.option("active", s)}, this.delay))}}, _panelKeydown:function(e){this._handlePageNav(e) || e.ctrlKey && e.keyCode === t.ui.keyCode.UP && (e.preventDefault(), this.active.focus())}, _handlePageNav:function(e){return e.altKey && e.keyCode === t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active - 1, !1)), !0):e.altKey && e.keyCode === t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active + 1, !0)), !0):void 0}, _findNextTab:function(e, i){for (var s = this.tabs.length - 1; - 1 !== t.inArray((e > s && (e = 0), e < 0 && (e = s), e), this.options.disabled); )e = i?e + 1:e - 1; return e}, _focusNextTab:function(t, e){return t = this._findNextTab(t, e), this.tabs.eq(t).focus(), t}, _setOption:function(t, e){"active" !== t?"disabled" !== t?(this._super(t, e), "collapsible" === t && (this.element.toggleClass("ui-tabs-collapsible", e), e || !1 !== this.options.active || this._activate(0)), "event" === t && this._setupEvents(e), "heightStyle" === t && this._setupHeightStyle(e)):this._setupDisabled(e):this._activate(e)}, _sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&"):""}, refresh:function(){var e = this.options, i = this.tablist.children(":has(a[href])"); e.disabled = t.map(i.filter(".ui-state-disabled"), function(t){return i.index(t)}), this._processTabs(), !1 !== e.active && this.anchors.length?this.active.length && !t.contains(this.tablist[0], this.active[0])?this.tabs.length === e.disabled.length?(e.active = !1, this.active = t()):this._activate(this._findNextTab(Math.max(0, e.active - 1), !1)):e.active = this.tabs.index(this.active):(e.active = !1, this.active = t()), this._refresh()}, _refresh:function(){this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({"aria-selected":"false", "aria-expanded":"false", tabIndex: - 1}), this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}), this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true", "aria-expanded":"true", tabIndex:0}), this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex", 0)}, _processTabs:function(){var e = this, i = this.tabs, s = this.anchors, n = this.panels; this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist").delegate("> li", "mousedown" + this.eventNamespace, function(e){t(this).is(".ui-state-disabled") && e.preventDefault()}).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function(){t(this).closest("li").is(".ui-state-disabled") && this.blur()}), this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab", tabIndex: - 1}), this.anchors = this.tabs.map(function(){return t("a", this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation", tabIndex: - 1}), this.panels = t(), this.anchors.each(function(i, s){var n, o, a, r = t(s).uniqueId().attr("id"), h = t(s).closest("li"), l = h.attr("aria-controls"); e._isLocal(s)?(a = (n = s.hash).substring(1), o = e.element.find(e._sanitizeSelector(n))):(n = "#" + (a = h.attr("aria-controls") || t({}).uniqueId()[0].id), (o = e.element.find(n)).length || (o = e._createPanel(a)).insertAfter(e.panels[i - 1] || e.tablist), o.attr("aria-live", "polite")), o.length && (e.panels = e.panels.add(o)), l && h.data("ui-tabs-aria-controls", l), h.attr({"aria-controls":a, "aria-labelledby":r}), o.attr("aria-labelledby", r)}), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel"), i && (this._off(i.not(this.tabs)), this._off(s.not(this.anchors)), this._off(n.not(this.panels)))}, _getList:function(){return this.tablist || this.element.find("ol,ul").eq(0)}, _createPanel:function(e){return t("<div>").attr("id", e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", !0)}, _setupDisabled:function(e){t.isArray(e) && (e.length?e.length === this.anchors.length && (e = !0):e = !1); for (var i, s = 0; i = this.tabs[s]; s++)!0 === e || - 1 !== t.inArray(s, e)?t(i).addClass("ui-state-disabled").attr("aria-disabled", "true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled"); this.options.disabled = e}, _setupEvents:function(e){var i = {}; e && t.each(e.split(" "), function(t, e){i[e] = "_eventHandler"}), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(!0, this.anchors, {click:function(t){t.preventDefault()}}), this._on(this.anchors, i), this._on(this.tabs, {keydown:"_tabKeydown"}), this._on(this.panels, {keydown:"_panelKeydown"}), this._focusable(this.tabs), this._hoverable(this.tabs)}, _setupHeightStyle:function(e){var i, s = this.element.parent(); "fill" === e?(i = s.height(), i -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function(){var e = t(this), s = e.css("position"); "absolute" !== s && "fixed" !== s && (i -= e.outerHeight(!0))}), this.element.children().not(this.panels).each(function(){i -= t(this).outerHeight(!0)}), this.panels.each(function(){t(this).height(Math.max(0, i - t(this).innerHeight() + t(this).height()))}).css("overflow", "auto")):"auto" === e && (i = 0, this.panels.each(function(){i = Math.max(i, t(this).height("").height())}).height(i))}, _eventHandler:function(e){var i = this.options, s = this.active, n = t(e.currentTarget).closest("li"), o = n[0] === s[0], a = o && i.collapsible, r = a?t():this._getPanelForTab(n), h = s.length?this._getPanelForTab(s):t(), l = {oldTab:s, oldPanel:h, newTab:a?t():n, newPanel:r}; e.preventDefault(), n.hasClass("ui-state-disabled") || n.hasClass("ui-tabs-loading") || this.running || o && !i.collapsible || !1 === this._trigger("beforeActivate", e, l) || (i.active = !a && this.tabs.index(n), this.active = o?t():n, this.xhr && this.xhr.abort(), h.length || r.length || t.error("jQuery UI Tabs: Mismatching fragment identifier."), r.length && this.load(this.tabs.index(n), e), this._toggle(e, l))}, _toggle:function(e, i){function s(){o.running = !1, o._trigger("activate", e, i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), a.length && o.options.show?o._show(a, o.options.show, s):(a.show(), s())}var o = this, a = i.newPanel, r = i.oldPanel; this.running = !0, r.length && this.options.hide?this._hide(r, this.options.hide, function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), r.hide(), n()), r.attr("aria-hidden", "true"), i.oldTab.attr({"aria-selected":"false", "aria-expanded":"false"}), a.length && r.length?i.oldTab.attr("tabIndex", - 1):a.length && this.tabs.filter(function(){return 0 === t(this).attr("tabIndex")}).attr("tabIndex", - 1), a.attr("aria-hidden", "false"), i.newTab.attr({"aria-selected":"true", "aria-expanded":"true", tabIndex:0})}, _activate:function(e){var i, s = this._findActive(e); s[0] !== this.active[0] && (s.length || (s = this.active), i = s.find(".ui-tabs-anchor")[0], this._eventHandler({target:i, currentTarget:i, preventDefault:t.noop}))}, _findActive:function(e){return!1 === e?t():this.tabs.eq(e)}, _getIndex:function(t){return"string" == typeof t && (t = this.anchors.index(this.anchors.filter("[href$='" + t + "']"))), t}, _destroy:function(){this.xhr && this.xhr.abort(), this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"), this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"), this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(), this.tablist.unbind(this.eventNamespace), this.tabs.add(this.panels).each(function(){t.data(this, "ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}), this.tabs.each(function(){var e = t(this), i = e.data("ui-tabs-aria-controls"); i?e.attr("aria-controls", i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "")}, enable:function(e){var i = this.options.disabled; !1 !== i && (void 0 === e?i = !1:(e = this._getIndex(e), i = t.isArray(i)?t.map(i, function(t){return t !== e?t:null}):t.map(this.tabs, function(t, i){return i !== e?i:null})), this._setupDisabled(i))}, disable:function(e){var i = this.options.disabled; if (!0 !== i){if (void 0 === e)i = !0; else{if (e = this._getIndex(e), - 1 !== t.inArray(e, i))return; i = t.isArray(i)?t.merge([e], i).sort():[e]}this._setupDisabled(i)}}, load:function(e, i){e = this._getIndex(e); var s = this, n = this.tabs.eq(e), o = n.find(".ui-tabs-anchor"), a = this._getPanelForTab(n), r = {tab:n, panel:a}, h = function(t, e){"abort" === e && s.panels.stop(!1, !0), n.removeClass("ui-tabs-loading"), a.removeAttr("aria-busy"), t === s.xhr && delete s.xhr}; this._isLocal(o[0]) || (this.xhr = t.ajax(this._ajaxSettings(o, i, r)), this.xhr && "canceled" !== this.xhr.statusText && (n.addClass("ui-tabs-loading"), a.attr("aria-busy", "true"), this.xhr.done(function(t, e, n){setTimeout(function(){a.html(t), s._trigger("load", i, r), h(n, e)}, 1)}).fail(function(t, e){setTimeout(function(){h(t, e)}, 1)})))}, _ajaxSettings:function(e, i, s){var n = this; return{url:e.attr("href"), beforeSend:function(e, o){return n._trigger("beforeLoad", i, t.extend({jqXHR:e, ajaxSettings:o}, s))}}}, _getPanelForTab:function(e){var i = t(e).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + i))}}), t.widget("ui.tooltip", {version:"1.11.4", options:{content:function(){var e = t(this).attr("title") || ""; return t("<a>").text(e).html()}, hide:!0, items:"[title]:not([disabled])", position:{my:"left top+15", at:"left bottom", collision:"flipfit flip"}, show:!0, tooltipClass:null, track:!1, close:null, open:null}, _addDescribedBy:function(e, i){var s = (e.attr("aria-describedby") || "").split(/\s+/); s.push(i), e.data("ui-tooltip-id", i).attr("aria-describedby", t.trim(s.join(" ")))}, _removeDescribedBy:function(e){var i = e.data("ui-tooltip-id"), s = (e.attr("aria-describedby") || "").split(/\s+/), n = t.inArray(i, s); - 1 !== n && s.splice(n, 1), e.removeData("ui-tooltip-id"), (s = t.trim(s.join(" ")))?e.attr("aria-describedby", s):e.removeAttr("aria-describedby")}, _create:function(){this._on({mouseover:"open", focusin:"open"}), this.tooltips = {}, this.parents = {}, this.options.disabled && this._disable(), this.liveRegion = t("<div>").attr({role:"log", "aria-live":"assertive", "aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)}, _setOption:function(e, i){var s = this; if ("disabled" === e)return this[i?"_disable":"_enable"](), void(this.options[e] = i); this._super(e, i), "content" === e && t.each(this.tooltips, function(t, e){s._updateContent(e.element)})}, _disable:function(){var e = this; t.each(this.tooltips, function(i, s){var n = t.Event("blur"); n.target = n.currentTarget = s.element[0], e.close(n, !0)}), this.element.find(this.options.items).addBack().each(function(){var e = t(this); e.is("[title]") && e.data("ui-tooltip-title", e.attr("title")).removeAttr("title")})}, _enable:function(){this.element.find(this.options.items).addBack().each(function(){var e = t(this); e.data("ui-tooltip-title") && e.attr("title", e.data("ui-tooltip-title"))})}, open:function(e){var i = this, s = t(e?e.target:this.element).closest(this.options.items); s.length && !s.data("ui-tooltip-id") && (s.attr("title") && s.data("ui-tooltip-title", s.attr("title")), s.data("ui-tooltip-open", !0), e && "mouseover" === e.type && s.parents().each(function(){var e, s = t(this); s.data("ui-tooltip-open") && ((e = t.Event("blur")).target = e.currentTarget = this, i.close(e, !0)), s.attr("title") && (s.uniqueId(), i.parents[this.id] = {element:this, title:s.attr("title")}, s.attr("title", ""))}), this._registerCloseHandlers(e, s), this._updateContent(s, e))}, _updateContent:function(t, e){var i, s = this.options.content, n = this, o = e?e.type:null; if ("string" == typeof s)return this._open(e, t, s); (i = s.call(t[0], function(i){n._delay(function(){t.data("ui-tooltip-open") && (e && (e.type = o), this._open(e, t, i))})})) && this._open(e, t, i)}, _open:function(e, i, s){function n(t){l.of = t, a.is(":hidden") || a.position(l)}var o, a, r, h, l = t.extend({}, this.options.position); s && ((o = this._find(i))?o.tooltip.find(".ui-tooltip-content").html(s):(i.is("[title]") && (e && "mouseover" === e.type?i.attr("title", ""):i.removeAttr("title")), o = this._tooltip(i), a = o.tooltip, this._addDescribedBy(i, a.attr("id")), a.find(".ui-tooltip-content").html(s), this.liveRegion.children().hide(), s.clone?(h = s.clone()).removeAttr("id").find("[id]").removeAttr("id"):h = s, t("<div>").html(h).appendTo(this.liveRegion), this.options.track && e && /^mouse/.test(e.type)?(this._on(this.document, {mousemove:n}), n(e)):a.position(t.extend({of:i}, this.options.position)), a.hide(), this._show(a, this.options.show), this.options.show && this.options.show.delay && (r = this.delayedShow = setInterval(function(){a.is(":visible") && (n(l.of), clearInterval(r))}, t.fx.interval)), this._trigger("open", e, {tooltip:a})))}, _registerCloseHandlers:function(e, i){var s = {keyup:function(e){if (e.keyCode === t.ui.keyCode.ESCAPE){var s = t.Event(e); s.currentTarget = i[0], this.close(s, !0)}}}; i[0] !== this.element[0] && (s.remove = function(){this._removeTooltip(this._find(i).tooltip)}), e && "mouseover" !== e.type || (s.mouseleave = "close"), e && "focusin" !== e.type || (s.focusout = "close"), this._on(!0, i, s)}, close:function(e){var i, s = this, n = t(e?e.currentTarget:this.element), o = this._find(n); o?(i = o.tooltip, o.closing || (clearInterval(this.delayedShow), n.data("ui-tooltip-title") && !n.attr("title") && n.attr("title", n.data("ui-tooltip-title")), this._removeDescribedBy(n), o.hiding = !0, i.stop(!0), this._hide(i, this.options.hide, function(){s._removeTooltip(t(this))}), n.removeData("ui-tooltip-open"), this._off(n, "mouseleave focusout keyup"), n[0] !== this.element[0] && this._off(n, "remove"), this._off(this.document, "mousemove"), e && "mouseleave" === e.type && t.each(this.parents, function(e, i){t(i.element).attr("title", i.title), delete s.parents[e]}), o.closing = !0, this._trigger("close", e, {tooltip:i}), o.hiding || (o.closing = !1))):n.removeData("ui-tooltip-open")}, _tooltip:function(e){var i = t("<div>").attr("role", "tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || "")), s = i.uniqueId().attr("id"); return t("<div>").addClass("ui-tooltip-content").appendTo(i), i.appendTo(this.document[0].body), this.tooltips[s] = {element:e, tooltip:i}}, _find:function(t){var e = t.data("ui-tooltip-id"); return e?this.tooltips[e]:null}, _removeTooltip:function(t){t.remove(), delete this.tooltips[t.attr("id")]}, _destroy:function(){var e = this; t.each(this.tooltips, function(i, s){var n = t.Event("blur"), o = s.element; n.target = n.currentTarget = o[0], e.close(n, !0), t("#" + i).remove(), o.data("ui-tooltip-title") && (o.attr("title") || o.attr("title", o.data("ui-tooltip-title")), o.removeData("ui-tooltip-title"))}), this.liveRegion.remove()}})});(function ($) {
    $.mbsmessage = function (data, autoclose, cls) {
        $.mbsmessage.loading();
        $.mbsmessage.fillMbsmessage(data, cls);
        if (autoclose)
            $.mbsmessage.startTimer();
    };
    $.extend($.mbsmessage, {
        settings: {
            closeimage: siteConstants.webroot + 'img/mbsmessage/close.gif',
            leftimage: siteConstants.webroot + 'img/mbsmessage/left.png',
            rightimage: siteConstants.webroot + 'img/mbsmessage/right.png',
            mbshtml: '\
				<div id="mbsmessage" class="alert--positioned-top-center alert "> \
				<div class="close"></div> \
				<div>\
				<div class="content">Content</div> \
				</div> \
				</div>'
        },
        loading: function () {
            initialize();
            $('#mbsmessage').show();
        },
        fillMbsmessage: function (data, cls) {
            if (cls) {

                $('#mbsmessage').removeClass('alert--process');
                $('#mbsmessage').removeClass('alert--danger');
                $('#mbsmessage').removeClass('alert--success');
                $('#mbsmessage').removeClass('alert');

                $('#mbsmessage').addClass(cls);
            }

            $('#mbsmessage .content').html(data);
            $('#mbsmessage').fadeIn();
            //$('#mbsmessage').css({top:10, left:10});
        },
        close: function () {
            $(document).trigger('close.mbsmessage');
        },
        startTimer: function () {
            if ($.mbsmessage.timer)
                clearTimeout($.mbsmessage.timer);
            if (CONF_AUTO_CLOSE_SYSTEM_MESSAGES == 1) {
                $.mbsmessage.timeInterval = CONF_TIME_AUTO_CLOSE_SYSTEM_MESSAGES;
            }
            $.mbsmessage.timer = setTimeout('$.mbsmessage.checkTimer()', 3000);
        },
        checkTimer: function () {
            if (!$.mbsmessage.timer)
                return;
            if (!$.mbsmessage.timeInterval)
                $.mbsmessage.timeInterval = 3;
            $.mbsmessage.timeInterval -= 3;
            if ($.mbsmessage.timeInterval <= 0) {
                $(document).trigger('close.mbsmessage');
                clearTimeout($.mbsmessage.timer);
            } else {
                $.mbsmessage.timer = setTimeout('$.mbsmessage.checkTimer()', 3000);
            }
        }
    });

    $.fn.mbsmessage = function (settings) {
        initialize(settings);
    };



    function initialize(settings) {
        if ($.mbsmessage.timer)
            clearTimeout($.mbsmessage.timer);
        if ($.mbsmessage.settings.initialized)
            return true;
        $.mbsmessage.settings.initialized = true;
        $(document).trigger('initialize.mbsmessage');
        if (settings)
            $.extend($.mbsmessage.settings, settings);
        $('body').append($.mbsmessage.settings.mbshtml);
        var preload = [new Image(), new Image(), new Image()];
        preload[0].src = $.mbsmessage.settings.closeimage;
        preload[1].src = $.mbsmessage.settings.leftimage;
        preload[2].src = $.mbsmessage.settings.rightimage;
        $('#mbsmessage .left').html('<img src="' + $.mbsmessage.settings.leftimage + '" />');
        $('#mbsmessage .right').html('<img src="' + $.mbsmessage.settings.rightimage + '" />');
        //$('#mbsmessage .close').html('<img src="' + $.mbsmessage.settings.closeimage + '" />');
        $('#mbsmessage .close').click($.mbsmessage.close);
        $('#mbsmessage .close').attr({src: $.mbsmessage.settings.closeimage});

    }

    $(document).bind('close.mbsmessage', function () {
        if ($.mbsmessage.timer)
            clearTimeout($.mbsmessage.timer);
        $('#mbsmessage').fadeOut(function () {
            $('#mbsmessage .content').removeClass().addClass('content');
        });
    });

})(jQuery);(function($) {
    /*
    Validation Singleton
    */
    var Validation = function() {

        messages={
                required: "{caption} is mandatory.",
                email: "Please enter valid email ID for {caption}.",
                charonly: "Only characters are supported for {caption}.",
                integer: "Please enter integer value for {caption}.",
                floating: "Please enter numeric value for {caption}.",
                username: "{caption} must start with a letter and can contain only alphanumeric characters (letters, _, ., digits). Length must be between 4 to 20 characters.",
                password: "{caption} Length Must be between 6 to 20 characters.",
                user_regex: "Invalid value for {caption}.",
                lengthrange: "Length of {caption} must be between {minlength} and {maxlength}.",
                range: "Value of {caption} must be between {minval} and {maxval}.",
                selectionrange: "Please select {minval} to {maxval} options",
                comparewith_lt: "{caption} must be less than {comparefield}.",
                comparewith_le: "{caption} must be less than or equal to {comparefield}.",
                comparewith_gt: "{caption} must be greater than {comparefield}.",
                comparewith_ge: "{caption} must be greater than or equal to {comparefield}.",
                comparewith_eq: "{caption} must be same as {comparefield}.",
                comparewith_ne: "{caption} should not be same as {comparefield}."
        };
        
        parseDate = function(str, format) {
        	if ( typeof(datePickerFormatToDate) == 'function' ) {
    			return datePickerFormatToDate(str, format);
    		}
    		else {
    			return $.datepicker.parseDate( format, str );
    		}
        };
        
        var rules = {
            email : {
               check: function(rval, value) {
                   if(rval && value)
                       return testPattern(value,"^((?:(?:(?:[a-zA-Z0-9][\\.\\-\\+_]?)*)[a-zA-Z0-9])+)\\@((?:(?:(?:[a-zA-Z0-9][\\.\\-_]?){0,62})[a-zA-Z0-9])+)\\.([a-zA-Z0-9]{2,63})$");
                   return true;
               }
            },
            
            required : {
               check: function(rval, value) {
                  if(rval){ 
                       if(value){
                           return true;
                       }
                       else{
                           return false;
                       }
                  }
                  else{
                      return true;
                  }
               }
            },

            charonly:{
                check: function(rval, value){
                    if(rval && value){
                        return testPattern(value, '^[a-zA-Z\\s]*$');
                    }
                    return true;
                }
            },

            integer:{
                check: function(rval, value){
                    if(rval && value){
                        return testPattern(value, '^-?[\\d]+$');
                    }
                    return true;
                }
            },

            floating:{
                check: function(rval, value){
                    if(rval && value){
                        return testPattern(value, '^-?[\\d]*\\.?[\\d]+$');
                    }
                    return true;
                }
            },

            username:{
                check: function(rval, value){
                    if(rval && value){
                        return testPattern(value, '^[a-zA-Z][a-zA-Z_\\.0-9]{3,19}$');
                    }
                    return true;
                }
            },

            password:{
                check: function(rval, value){
                    if(rval && value){
                        return testPattern(value, '^.{6,20}$');
                    }
                    return true;
                }
            },

            user_regex:{
                check: function(rval, value){
                    if(value){
                        return testPattern(value, rval);
                    }
                    return true;
                }
            },

            lengthrange:{
                check: function(rval, value){
                    if(value && $.isArray(rval) && rval.length==2){
                        return (value.length>=rval[0] && value.length<=rval[1]);
                    }
                    return true;
                }
            },
            
            selectionrange: {
                check: function(rval, value){
                    if($.isArray(rval) && rval.length==2){
                        return (value >= rval[0] && value <= rval[1]);
                    }
                    return true;
                }
            },

            range:{
                check: function(rval, value){
                    if(value){
                        var minval=rval.minval;
                        var maxval=rval.maxval;
                        if(rval.dateFormat){
                        	minval = $.Validation.convertStringToDate(minval, rval.dateFormat).getTime();
                            maxval = $.Validation.convertStringToDate(maxval, rval.dateFormat).getTime();
                            value = $.Validation.convertStringToDate(value, rval.dateFormat).getTime();
                        }
                        if(rval.numeric){
                            minval=parseFloat(minval);
                            maxval=parseFloat(maxval);
                            value=parseFloat(value);
                        }
                        return(value >= minval && value <= maxval);
                    }
                    return true;
                }
            },

            comparewith:{
                check: function(rval, value, o){
                    rval = $.trim(rval);
                    value = $.trim(value);
                    
                    if(o.dateFormat && rval != '' && value != ''){
                        rval = $.Validation.convertStringToDate(rval, o.dateFormat).getTime();
                        value = $.Validation.convertStringToDate(value, o.dateFormat).getTime();
                    }
                    if(o.numeric && rval != '' && value != ''){
                        rval=parseFloat(rval);
                        value=parseFloat(value);
                    }
                    
                    switch (o.operator) {
                    case 'lt':
                        return(value < rval);
                        break;
                    case 'le':
                        return(value<=rval);
                        break;
                    case 'gt':
                        return(value>rval);
                        break;
                    case 'ge':
                        return(value>=rval);
                        break;
                    case 'ne':
                        return(value!=rval);
                        break;
                    default:
                        return(value==rval);
                        break;
                    }
                }
            }
        }
        var testPattern = function(value, pattern) {
            var regExp = new RegExp(pattern,"");
            return regExp.test(value);
        }
        return {
            
            addRule : function(name, rule) {

                rules[name] = rule;
            },
            getRule : function(name) {
                return rules[name];
            },

            getMessage: function(name){
                return messages[name];
            },

            setMessages: function(obj){
                jQuery.extend(messages, obj);
            },
            
            convertStringToDate: function (str, format) {
            	return parseDate(str, format);
            }
        }
    };
    
    /* 
    Form factory 
    */
    var Form = function(form, options) {
        this.form=form;
        this.options=options;
    }
    Form.prototype = {
    		validate : function() {
    			if(typeof FCKeditorAPI !== 'undefined'){
    				for(x in FCKeditorAPI.Instances){
    					this.form.find(':hidden[name="' + x + '"]').val(FCKeditorAPI.GetInstance(x).GetXHTML(true));
    				}
    			}
    			if ( window.CKEDITOR ){
    				for (x in CKEDITOR.instances) CKEDITOR.instances[x].updateElement();
    			}

    			if (typeof oUtil == 'object'){
    				var editors = oUtil.arrEditor;
    				for (x in editors){
    					var obj = eval(editors[x]);
    					if ($('#' + obj.idTextArea).length) {
    						$('#' + obj.idTextArea).val(obj.getXHTMLBody());
    					}
    				}
    			}

    			var $form = this;
    			$form.valid = true;
    			this.form.find("input, textarea, select").each(function() {
    				var field = new Field(this, $form.options);
    				field.validate();
    				$form.valid = $form.valid && field.valid;
    				if ( 0 == $form.options.errordisplay && !field.valid ) {
    					this.focus();
    					return false;
    				} 
    			});
    			
    		},
    		isValid : function() {
    			return this.valid;
    		}
    }
    
    /* 
    Field factory 
    */
    var Field = function(field, options) {
        this.settings=options;
        this.field = $(field);
        this.valid = false;
        if(this.settings.errordisplay != 0 && this.settings.errordisplay != 1) this.attach("change");
        
        if(this.settings.errordisplay==1 && this.settings.summaryElementId=='validation_default') {
        	this.settings.summaryElementId=$(field).parents('form').attr('id');
        }
        if ($(field).attr('data-mbsunichk')) {
        	$(field).attr('autocomplete', 'off').keyup(function() { $(this).attr('data-mbsunichk', '2') });
        }
    }
    Field.prototype = {
        
        attach : function(event) {
        
            var obj = this;
            if(event == "change") {
                obj.field.bind("change",function() {
                    return obj.validate();
                });
            }
            if(event == "keyup") {
                obj.field.bind("keyup",function(e) {
                    return obj.validate();
                });
            }
        },
        validate : function() {
            var clname='field-error_' + this.field.attr('name').replace(/\[/g, '_').replace(/\]/g, '_');
            if (this.field.attr('data-fat-arr-index')) {
            	clname += '_' + this.field.attr('data-fat-arr-index');
            }
            
            $('.'+clname).remove();
            
            var obj = this,
                field = obj.field,
                errorClass = "field-error",
                errorlist = $(document.createElement("div")).addClass(errorClass).addClass(clname),
                types = {};
            
            	if (jQuery(field).attr('data-fatreq')) {
            		var s = eval('[' + jQuery(field).attr('data-fatreq') + ']');
            		types = s[0];
            	}
            
                errors = []; 
            jQuery.each(types, function(rname, rval){
                if(rname!='customMessage'){
                    var rule=$.Validation.getRule(rname);
                    
                    var fldval = $.trim(field.val());
                    
                    if (field.attr('data-fatdateformat') && 'range' == rname) {
                    	rval.dateFormat = field.attr('data-fatdateformat');
                    }
                    
                    if (field.attr('type')){
                        if(field.attr('type').toLowerCase()==='checkbox'){
                        	if (field.attr('name').indexOf('[') > 0 && rname == 'selectionrange') {
                        		var arrayFieldNamePre = field.attr('name');
                        		arrayFieldNamePre = arrayFieldNamePre.substring(0, arrayFieldNamePre.indexOf('[') + 1);
                        		fldval = $(field).parents('form').find('input[name^="' + arrayFieldNamePre + '"]:checked').length;
                        	}
                        	else {
                        		fldval=(field.is(':checked'))?fldval:'';
                        	}
                        }
                    }
                    
                    if(rname=='comparewith'){
                        for (x in rval){
                        	if (field.attr('data-fatdateformat')) {
                            	rval[x].dateFormat = field.attr('data-fatdateformat');
                            }
                            var validvalue=rule.check($(field).parents('form').find('[name='+rval[x].fldname+']').val(), fldval, rval[x]);
                            if (!validvalue) break;
                        }
                    }
                    else{
                        var validvalue=rule.check(rval, fldval);
                    }
                    
                    if(!validvalue){
                        field.addClass("error");
                        if(types.customMessage){
                            msg=types.customMessage;
                        }
                        else{
                            if(rname=='comparewith'){
                                msg=$.Validation.getMessage(rname+'_'+rval[x].operator);
                                msg=msg.replace("{comparefield}", $(field).parents('form').find('[name='+rval[x].fldname+']').attr('data-field-caption'));
                            }
                            else{
                                msg=$.Validation.getMessage(rname);
                            }
                        }
                        msg=msg.replace("{caption}",$(field).attr('data-field-caption'));
                        if(jQuery.isArray(rval) && rval.length==2){
                            msg=msg.replace("{minval}", rval[0]);
                            msg=msg.replace("{minlength}", rval[0]);
                            msg=msg.replace("{maxval}", rval[1]);
                            msg=msg.replace("{maxlength}", rval[1]);
                        }
                        if(rname=='range'){
                            msg=msg.replace("{minval}", rval.minval);
                            msg=msg.replace("{maxval}", rval.maxval);
                        }
                        
                        errors.push(msg);
                    }
            }});
            
            if(errors.length) {
                if(this.settings.errordisplay!=0 && this.settings.errordisplay!=1){
                    obj.field.unbind("keyup");
                    obj.attach("keyup");
                }
                switch(this.settings.errordisplay){
                case 1:
                    $('#'+this.settings.summaryElementId).append(errorlist.empty());
                    document.getElementById(this.settings.summaryElementId).scrollIntoView();
                    break;
                case 2:
                	if(field.attr('type') && field.attr('type').toLowerCase()==='checkbox') {
                		field.parent().before(errorlist.empty());
                	}
                	else {
                		field.before(errorlist.empty());
                	}
                    break;
                case 3:
                	if(field.attr('type') && field.attr('type').toLowerCase()==='checkbox') {
                		field.parent().after(errorlist.empty());
                	}
                	else {
                		field.after(errorlist.empty());
                	}
                    break;
                case 0:
                    
                    break;
                }
                for(error in errors) {
                    if(this.settings.errordisplay == 0){
                        alert(errors[error]);
                        return;
                    }
                    else {
                    		//var li=$(document.createElement('li')).append($(document.createElement('a')).html(errors[error]).attr({'href':'javascript:void(0);'}).bind('click', function(){$(field).focus();}));
                    		var li=$(document.createElement('span')).html(errors[error]);
                    		li.appendTo(errorlist);
                    }
                }
                obj.valid = false;
            } 
            else {
                errorlist.remove();
                field.removeClass("error");
                obj.valid = true;
            }
            if (this.field.attr('data-mbsunichk')) {
            	if (this.field.attr('data-mbsunichk') == '2') {
            		obj.valid = false;
            		if (!this.field.hasClass('field-processing')) this.field.trigger('change');
            	}
            }
        }
    }
    
    /* 
    Validation extends jQuery prototype
    */
    $.extend($.fn, {
        
        validation : function(options) {
            
        	$('[data-fat-req-change]', $(this)).each(function() {
            	$(this).trigger('change');
            });
        	
            var validator = new Form($(this), options);
            $.data($(this)[0], 'validator', validator);
            
            var $this = $(this);
            $(this).bind("submit", function(e) {
            	if ($this.hasClass('data-fat-submitted')) {
            		e.preventDefault();
            		console.log('Prevented resubmit of form.');
            		return ;
            	}
                validator.validate(); 
                if(!validator.isValid()) {
                    e.preventDefault();
                }
                else {
                	$this.addClass('data-fat-submitted');
                	setTimeout(function() {
                		$this.removeClass('data-fat-submitted');
                	}, 3000);
                }
            });
            return validator;
        },
        validate : function() {
            var validator = $.data($(this)[0], 'validator');
            validator.validate();
            return validator.isValid();
        }
    });
    $.Validation = new Validation();
})(jQuery);

(function() {
	checkUnique = function(fld, tbl, tbl_fld, tbl_key, key_fld, constraints){
		fld.removeClass('field-unique-error');
		fld.removeClass('field-unique-success');
		fld.addClass('field-processing');
	    var entered = fld.val();
	    $.ajax({
	        url: fcom.makeUrl('checkunique', 'check'),
	        type: 'POST',
	        dataType: 'json',
	        data: {'val':entered, 'tbl':tbl, 'tbl_fld':tbl_fld, 'tbl_key':tbl_key, 'key_val':key_fld.val(), 'constraints':constraints},
	        success: function(ans){
	            fld.removeClass('field-processing');
	            $(fld).attr('data-mbsunichk', 1);
	            if(ans.status==0){
	            	fld.addClass('field-unique-error');
	            	
	            	checkUniqueErrorNotify(fld.attr('data-field-caption'),  entered);
	                fld.val(ans.existing_value);
	                fld.focus();
	            }
	            if (ans.status == 1) {
	            	fld.addClass('field-unique-success');
	            }
	        }
	    });
	    
	    fld.bind('keyup', function(event) {
	    	$( this ).removeClass('field-unique-error');
	    	$( this ).removeClass('field-unique-success');
	    	$( this ).unbind( event );
	    });
	}
	
	fatUpdateRequirement = function(el) {
		el = $(el);
		var str = el.attr('data-fat-req-change');
		if (!str) return;
		var arr = JSON.parse(str);
		var v = el.val();
		if (el.attr('type') == 'checkbox' && !el.is(':checked')) {
			v = '';
		}
		for (var i = arr.length - 1; i >=0; i--) {
			var match = false;
			switch (arr[i].operator) {
			case 'eq':
				match = (v == arr[i].val);
				break;
			case 'ne':
				match = (v != arr[i].val);
				break;
			case 'gt':
				match = (v > arr[i].val);
				break;
			case 'lt':
				match = (v < arr[i].val);
				break;
			case 'ge':
				match = (v >= arr[i].val);
				break;
			case 'le':
				match = (v <= arr[i].val);
				break;
			}
			if (!match) continue;
			$(el[0].form.elements[arr[i].fldname]).attr('data-fatreq', JSON.stringify(arr[i].requirement));
		}
	};
	
	checkUniqueErrorNotify = function (caption, value) {
		alert(caption + " '" + value + "' is not available");
	};
})();var fcom = {
    ajaxRequestLog: [],
    logAjaxRequest: function (url, data, res) {

        var d = (new Date()).getTime();
        var last = d - 120000;
        var obj = {url: url,
            data: (typeof data == "object") ? JSON.stringify(data) : data,
            res: (typeof res == "object") ? JSON.stringify(res) : res,
            t: d};

        var repeatCount = 0;

        for (var i = fcom.ajaxRequestLog.length - 1; i >= 0; i--) {
            var oldObj = fcom.ajaxRequestLog[i];
            if (oldObj.t < last) {
                fcom.ajaxRequestLog.splice(i, 1);
                continue;
            }

            if (oldObj.url == obj.url && oldObj.data == obj.data && oldObj.res == obj.res) {
                repeatCount++;
            }
        }

        if (repeatCount >= 10) {
            if (confirm('This page seems to be stuck with some ajax call loop.\nDo you want to reload the page?')) {
                location.reload();
            }
        }

        fcom.ajaxRequestLog.push(obj);
        console.log('Added log: ' + fcom.ajaxRequestLog.length);
    },

    ajax: function (url, data, fn, options) {
        var o = $.extend(true, {fOutMode: 'html', timeout: 300000, maxRetry: 0, retryNumber: 0}, options);
        if ("string" == $.type(data)) {
            data += '&fOutMode=' + o.fOutMode + '&fIsAjax=1';
        }

        if ("object" == $.type(data)) {
            var data = $.extend(true, {}, data);
            if (!data.isAjax)
                data.fIsAjax = 1;
            if (!data.fOutMode)
                data.fOutMode = o.fOutMode;
        }

        $.ajax({
            method: "POST",
            url: url,
            data: data,
            dataType: o.fOutMode,
            success: function (t) {
                fcom.logAjaxRequest(url, data, t);
                if (o.fOutMode == 'json') {
                    if (t.status == -1) {
                        alert(t.msg);
                        if (options.errorFn) {
                            options.errorFn();
                        }
                        return;
                    }
                }
                fn(t);
            },
            error: function (jqXHR, textStatus, error) {
                if (textStatus == "parsererror" && jqXHR.statusText == "OK") {
                    alert('Seems some json error.' + jqXHR.responseText);
                    return;
                }


                o.retryNumber++;
                if (o.retryNumber <= o.maxRetry) {
                    console.log('Will retry ' + o.retryNumber);
                    setTimeout(function () {
                        fcom.ajax(url, data, fn, o)
                    }, 3000);
                }/* else {
                 if (!options.errorFn) {
                 alert(jqXHR.statusText + '\n' + textStatus);
                 }
                 } */

                console.log("Ajax Request " + url + " error: " + textStatus + " -- " + error);
                if (options.errorFn) {
                    options.errorFn();
                }
            },
            timeout: o.timeout
        });
    },

    updateWithAjax: function (url, data, fn, options) {

        $.mbsmessage(langLbl.requestProcessing, true, 'alert--process alert');
        var o = $.extend(true, {fOutMode: 'json'}, options);
        this.ajax(url, data, function (ans) {

            if (ans.status != 1) {
                $(document).trigger('close.mbsmessage');

                $.systemMessage(ans.msg, 'alert alert--danger');

                /* Custom Code[ */
                if (ans.redirectUrl) {
                    setTimeout(function () {
                        window.location.href = ans.redirectUrl
                    }, 3000);
                }
                /* ] */
                //alert(ans.msg);
                return;
            }
            if (ans.alertType) {
                $alertType = ans.alertType;
            } else {
                $alertType = 'alert alert--success';
            }
            $.mbsmessage(ans.msg, true, $alertType);

            if (CONF_AUTO_CLOSE_SYSTEM_MESSAGES == 1) {
                var time = CONF_TIME_AUTO_CLOSE_SYSTEM_MESSAGES * 1000;
                setTimeout(function () {
                    $.systemMessage.close();
                }, time);
            }

            /* setTimeout(function () {
             $.mbsmessage.close();
             }, 3000); */

            fn(ans);
        }, o);
    },

    camel2dashed: function (str) {
        return str.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase();
    },

    breakUrl: function (url) {
        url = url.substring(siteConstants.userWebRoot.length);
        var arr = url.split('/');
        var obj = {controller: arr[0], action: '', others: []};
        arr.shift();
        if (!arr.length)
            return obj;

        obj.action = arr[0];
        arr.shift();

        obj.others = arr;

        return obj;
    },

    makeUrl: function (controller, action, others, use_root_url, urlRewritingEnabled) {
        if (typeof urlRewritingEnabled === 'undefined') {
            urlRewritingEnabled = (siteConstants.rewritingEnabled == 1);
        }
        if (!use_root_url) {
            use_root_url = (urlRewritingEnabled) ? siteConstants.webroot : siteConstants.webroot_traditional;
        }
        var url;
        if (!controller)
            controller = '';
        if (!action)
            action = '';

        controller = this.camel2dashed(controller);
        action = this.camel2dashed(action);

        if (!others)
            others = [];
        if ('' == action && others.length)
            action = 'index';

        url = use_root_url + controller;

        if ('' != action)
            url += '/' + action;
        if (others.length) {
            for (x in others)
                others[x] = encodeURIComponent(others[x]);
            url += '/' + others.join('/');
        }
        return url;
    },
    frmData: function (frm) {
        return $(frm).serialize();
    },
    qStringToObject: function (q) {
        var args = new Object();
        var pairs = q.split("&");
        for (var i = 0; i < pairs.length; i++) {
            var pos = pairs[i].indexOf('=');
            if (pos == -1)
                continue;
            var argname = pairs[i].substring(0, pos);
            var value = pairs[i].substring(pos + 1);
            args[argname] = unescape(value);
        }
        return args;
    },
    urlWrittenQueryObject: function () {
        var url = location.pathname;
        url = url.substring(siteConstants.userWebRoot.length);
        var arr = url.split('/');
        if (arr.length <= 2)
            return {};
        arr.shift();
        arr.shift();
        var obj = {};
        for (var i = 0; i < arr.length; i += 2) {
            obj[arr[i]] = arr[i + 1];
        }

        return obj;
    }
};

$.fn.selectRange = function (start, end) {
    if (!end)
        end = start;
    return this.each(function () {
        if (this.setSelectionRange) {
            if (!$(this).is(':visible'))
                return;
            this.focus();
            this.setSelectionRange(start, end);
        } else if (this.createTextRange) {
            var range = this.createTextRange();
            range.collapse(true);
            range.moveEnd('character', end);
            range.moveStart('character', start);
            range.select();
        }
    });
};$(document).on('click', '.menu-toggle ', function () {
    if (!$(this).parent().hasClass("is--active") && $(".collections-ui").hasClass("is--active")) {
        $(".collections-ui").removeClass("is--active")
        $(".menu-toggle").removeClass("cross");
        $('html').removeClass("nav-active");
    }
    $(this).parent().toggleClass("is--active");
    $('html').toggleClass("nav-active");
    $(this).toggleClass("cross");
});

/* for search form */
$(document).on('click', '.toggle--search-js', function () {
    $(this).toggleClass("is--active");
    $('html').toggleClass("is--form-visible");
    $('.search--keyword--js').focus();
});
$("document").ready(function () {

    $('.parents--link').click(function () {


        $(this).parent().toggleClass("is--active");
        $(this).parent().find('.childs').toggleClass("opened");
    });
    /* for Dashbaord Links form */

});




// Wait for window load
$(window).load(function () {
    // Animate loader off screen
    $(".pageloader").remove();
    setSelectedCatValue();
});

$("document").ready(function () {
    /*common drop down function  */
    $('.dropdown__trigger-js').each(function () {
        $(this).click(function () {

            if ($('html').hasClass('cart-is-active')) {
                $('.cart').removeClass('cart-is-active');
                $('html').removeClass("cart-is-active");
            }
            if ($('body').hasClass('toggled_left')) {
                $('.navs_toggle').removeClass("active");
                $('body').removeClass('toggled_left');
            }
            if ($('html').hasClass('toggled-user')) {
                $('.dropdown__trigger-js').parent('.dropdown').removeClass("is-active");
                $("html").removeClass("toggled-user");
            }

            $(this).parent('.dropdown').toggleClass("is-active");
            $("html").toggleClass("toggled-user");
            return false;
        });
    })
    $('html, .common_overlay').click(function () {
        if ($('.dropdown').hasClass('is-active')) {
            $('.dropdown').removeClass('is-active');
            $('html').removeClass('toggled-user');
        }

        if ($('html').hasClass('is--form-visible')) {
            $('html').removeClass('is--form-visible');
            $('.toggle--search-js').toggleClass("is--active");
        }
    });
    $('.dropdown__target-js').click(function (e) {
        e.stopPropagation();
    });

    $('.collections-ui').on('click', '.collection__container', function (e) {
        e.stopPropagation();
    });

    $('#cartSummary').on('click', '.cart-detail', function (e) {
        e.stopPropagation();
    });

    $('.main-search').on('click', '.form--search-popup', function (e) {

        if (!$(e.target).hasClass('link__close')) {
            e.stopPropagation();
        } else {
            /* $('.toggle--search-js').toggleClass("is--active");
             $('html').toggleClass("is--form-visible");	 */
            if ($('html').hasClass('is--form-visible')) {
                $('html').removeClass('is--form-visible');
                $('.toggle--search-js').toggleClass("is--active");
            }
        }
    });

    /* for fixed header */
    $(window).scroll(function () {
        body_height = $("#body").position();
        scroll_position = $(window).scrollTop();
        if (typeof body_height !== typeof undefined && body_height.top < scroll_position)
            $("body").addClass("fixed");
        else
            $("body").removeClass("fixed");
    });

    /* for footer */
    if ($(window).width() < 767) {
        $('.f-links h3').click(function () {
            if ($(this).hasClass('active')) {
                $(this).removeClass('active');
                $(this).siblings('.f-links ul').slideUp();
                return false;
            }
            $('.f-links h3').removeClass('active');
            $(this).addClass("active");
            $('.f-links ul').slideUp();
            $(this).siblings('.f-links ul').slideDown();
            return;
        });
    }

    /* for footer accordion */
    $(function () {
        $('.accordion_triger').on('click', function (e) {
            e.preventDefault();
            if ($(this).hasClass('active')) {
                $(this).removeClass('active');
                $(this).next()
                        .stop()
                        .slideUp(300);
            } else {
                $(this).addClass('active');
                $(this).next()
                        .stop()
                        .slideDown(300);
            }
        });
        /* $(document).delegate('.cart > a','click',function(){
         $('html').toggleClass("cart-is-active");
         $(this).toggleClass("cart-is-active");
         }); */
    });


    /* for cart area */
    $('.cart').on('click', function () {
        if ($('html').hasClass('toggled-user')) {
            $('.dropdown__trigger-js').parent('.dropdown').removeClass("is-active");
            $("html").removeClass("toggled-user");
        }
        $('html').toggleClass("cart-is-active");
        $(this).toggleClass("cart-is-active");
        /* return false;  */
    });
    $('html').click(function () {
        if ($('html').hasClass('cart-is-active')) {
            $('html').removeClass('cart-is-active');
            $('.cart').toggleClass("cart-is-active");
        }
        if ($('.collection__container').hasClass('open-menu')) {
            $('.open-menu').parent().toggleClass('is-active');
            $('.open-menu').toggleClass('open-menu');
        }
    });
    $('.cart').click(function (e) {
        e.stopPropagation();
    });
});

/*ripple effect*/
$(function () {
    var ink, d, x, y;
    $(".ripplelink, .slick-arrow").click(function (e) {
        if ($(this).find(".ink").length === 0) {
            $(this).prepend("<span class='ink'></span>");
        }
        ink = $(this).find(".ink");
        ink.removeClass("animate");

        if (!ink.height() && !ink.width()) {
            d = Math.max($(this).outerWidth(), $(this).outerHeight());
            ink.css({height: d, width: d});
        }
        x = e.pageX - $(this).offset().left - ink.width() / 2;
        y = e.pageY - $(this).offset().top - ink.height() / 2;
        ink.css({top: y + 'px', left: x + 'px'}).addClass("animate");
    });
});



/*back-top*/
$(document).ready(function () {
    // hide #back-top first
    $(".back-to-top").hide();

    // fade in #back-top
    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 100) {
                $('.back-to-top').fadeIn();
            } else {
                $('.back-to-top').fadeOut();
            }
        });
        // scroll body to 0px on click
        $('.back-to-top a').click(function () {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });
    });

    $('.switch-button').click(function () {
        $(this).toggleClass("is--active");
        if ($(this).hasClass("buyer") && !$(this).hasClass("is--active")) {
            window.location.href = fcom.makeUrl('seller');
        }
        if ($(this).hasClass("seller") && $(this).hasClass("is--active")) {
            window.location.href = fcom.makeUrl('buyer');
        }
    });

    var t;
    $('a.loadmore').on('click', function (e) {
        e.preventDefault();
        clearTimeout(t);
        $(this).toggleClass('loading');
        t = setTimeout(function () {
            $('a.loadmore').removeClass("loading")
        }, 2500);
    });
});



/*  like animation  */
$(document).ready(function () {
    var debug = /*true ||*/ false;
    var h = document.querySelector('.heart-wrapper');
    $(document).delegate('.heart-wrapper', 'click', function () {
        product_id = $(this).attr('data-id');
        toggleProductFavorite(product_id, $(this));
        h = document.querySelector('heart-wrapper');
    });

    /*   function toggleActivate(){
     h.classList.toggle('is-active');
     }   */

    if (debug) {
        var elts = Array.prototype.slice.call(h.querySelectorAll(':scope > *'), 0);
        var activated = false;
        var animating = false;
        var count = 0;
        var step = 1000;

        function setAnim(state) {
            elts.forEach(function (elt) {
                elt.style.animationPlayState = state;
            });
        }

        h.addEventListener('click', function () {
            if (animating)
                return;
            if (count > 27) {
                h.classList.remove('is-active');
                count = 0;
                return;
            }
            if (!activated)
                h.classList.add('is-active') && (activated = true);

            console.log('Step : ' + (++count));
            animating = true;

            setAnim('running');
            setTimeout(function () {
                setAnim('paused');
                animating = false;
            }, step);
        }, false);

        setAnim('paused');
        elts.forEach(function (elt) {
            elt.style.animationDuration = step / 1000 * 27 + 's';
        });
    }
});

$(function () {
    var elem = "";
    var settings = {
        mode: "toggle",
        limit: 2,
    };
    var text = "";
    $.fn.viewMore = function (options) {
        $.extend(settings, options)
        text = $(this).html();
        elem = this;
        initialize();
    };

    function initialize() {
        total_li = $(elem).children('ul').children('li').length;
        console.log(total_li);
        limit = settings.limit;
        console.log(limit);
        extra_li = total_li - limit;
        if (total_li > limit) {
            $(elem).children('ul').children('li:gt(' + (limit - 1) + ')').hide();
            $(elem).append('<a class="read_more_toggle closed"  onClick="bindChangeToggle(this);"><span class="ink animate"></span> <span class="read_more">View More</span></a>');
        }
    }
});

function bindChangeToggle(obj) {
    if ($(obj).hasClass('closed')) {
        $(obj).find('.read_more').text('.. View Less');
        $(obj).removeClass('closed');
        $('#accordian').children('ul').children('li').show();
    } else {
        $(obj).addClass('closed');
        $(obj).find('.read_more').text('.. View More');
        $('#accordian').children('ul').children('li:gt(0)').hide();
    }
}
function setSelectedCatValue() {
    var e = document.getElementById("category--js");
    if (e != undefined) {
        var strCat = e.options[e.selectedIndex].text;
        $('.select_value-js').html(strCat);
    }
}

function animation(obj) {
    if ($(obj).val().length > 0) {
        if (!$('.submit--js').hasClass('is--active'))
            $('.submit--js').addClass('is--active');
    } else {
        $('.submit--js').removeClass('is--active');
    }
}

(function () {
    Slugify = function (str, str_val_id, is_slugify, caption) {
        var str = str.toString().toLowerCase()
                .replace(/\s+/g, '-')           // Replace spaces with -
                .replace(/[^\w\-]+/g, '')       // Remove all non-word chars
                .replace(/\-\-+/g, '-')         // Replace multiple - with single -
                .replace(/^-+/, '')             // Trim - from start of text
                .replace(/-+$/, '');
        if ($("#" + is_slugify).val() == 0) {
            $("#" + str_val_id).val(str);
            $("#" + caption).html(siteConstants.webroot + str);
        }
    };

    getSlugUrl = function (obj, str, extra, pos) {
        if (typeof pos == undefined || pos == null) {
            pos = 'pre';
        }
        var str = str.toString().toLowerCase()
                .replace(/\s+/g, '-')           // Replace spaces with -
                .replace(/[^\w\-]+/g, '')       // Remove all non-word chars
                .replace(/\-\-+/g, '-')         // Replace multiple - with single -
                .replace(/^-+/, '')             // Trim - from start of text
                .replace(/-+$/, '');
        if (extra && pos == 'pre') {
            str = extra + '/' + str;
        }
        if (extra && pos == 'post') {
            str = str + '/' + extra;
        }
        $(obj).next().html(siteConstants.webroot + str);
    };
})();









/* scroll tab active function */
moveToTargetDiv('.tabs--scroll ul li.is-active', '.tabs--scroll ul', langLbl.layoutDirection);

$(document).on('click', '.tabs--scroll ul li', function () {
    $('.tabs--scroll ul li').removeClass('is-active');
    $(this).addClass('is-active');
    moveToTargetDiv('.tabs--scroll ul li.is-active', '.tabs--scroll ul', langLbl.layoutDirection);
});

function moveToTargetDiv(target, outer, layout) {
    var out = $(outer);
    var tar = $(target);
    //var x = out.width();
    //var y = tar.outerWidth(true);
    var z = tar.index();
    var q = 0;
    var m = out.find('li');

    for (var i = 0; i < z; i++) {
        q += $(m[i]).outerWidth(true) + 4;
    }

    $('.tabs--scroll ul').animate({
        scrollLeft: Math.max(0, q)
    }, 800);
    return false;
}

function moveToTargetDivssss(target, outer, layout) {
    var out = $(outer);
    var tar = $(target);
    var z = tar.index();
    var m = out.find('li');

    if (layout == 'ltr') {
        var q = 0;
        for (var i = 0; i < z; i++) {
            q += $(m[i]).outerWidth(true) + 4;
        }
    } else {
        var ulWidth = 0;
        $(outer + " li").each(function () {
            ulWidth = ulWidth + $(this).outerWidth(true);
        });

        var q = 0;
        for (var i = 0; i <= z; i++) {
            q += $(m[i]).outerWidth(true);
        }
        q = ulWidth - q;

        /* var q = out.last().outerWidth(true);							
         var q = ulWidth;							
         for(var i = z; i > 0; i--){
         q-= $(m[i]).outerWidth(true);				
         }   */
    }
    out.animate({
        scrollLeft: Math.max(0, q)
    }, 800);
    return false;
}
/*
 * respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries
 * Copyright 2011, Scott Jehl, scottjehl.com
 * Dual licensed under the MIT or GPL Version 2 licenses. 
 * Usage: Check out the readme file or github.com/scottjehl/respond
 */
(function(e, h){e.respond = {}; respond.update = function(){}; respond.mediaQueriesSupported = h; if (h){return}var u = e.document, r = u.documentElement, i = [], k = [], p = [], o = {}, g = 30, f = u.getElementsByTagName("head")[0] || r, b = f.getElementsByTagName("link"), d = [], a = function(){var B = b, w = B.length; for (var z = 0; z < w; z++){var y = B[z], x = y.href, A = y.media, v = y.rel && y.rel.toLowerCase() === "stylesheet"; if (!!x && v && !o[x]){if (!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x) || x.replace(RegExp.$1, "").split("/")[0] === e.location.host){d.push({href:x, media:A})} else{o[x] = true}}}t()}, t = function(){if (d.length){var v = d.shift(); n(v.href, function(w){m(w, v.href, v.media); o[v.href] = true; t()})}}, m = function(G, v, x){var E = G.match(/@media ([^\{]+)\{((?!@media)[\s\S])*(?=\}[\s]*\/\*\/mediaquery\*\/)/gmi), H = E && E.length || 0, v = v.substring(0, v.lastIndexOf("/")), w = function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + v + "$2$3")}, y = !H && x; if (v.length){v += "/"}if (y){H = 1}for (var B = 0; B < H; B++){var C; if (y){C = x; k.push(w(G))} else{C = E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/) && RegExp.$1; k.push(RegExp.$2 && w(RegExp.$2))}var z = C.split(","), F = z.length; for (var A = 0; A < F; A++){var D = z[A]; i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/) && RegExp.$2, rules:k.length - 1, minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/) && parseFloat(RegExp.$1), maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/) && parseFloat(RegExp.$1)})}}j()}, l, q, j = function(E){var v = "clientWidth", x = r[v], D = u.compatMode === "CSS1Compat" && x || u.body[v] || x, z = {}, C = u.createDocumentFragment(), B = b[b.length - 1], w = (new Date()).getTime(); if (E && l && w - l < g){clearTimeout(q); q = setTimeout(j, g); return} else{l = w}for (var y in i){var F = i[y]; if (!F.minw && !F.maxw || (!F.minw || F.minw && D >= F.minw) && (!F.maxw || F.maxw && D <= F.maxw)){if (!z[F.media]){z[F.media] = []}z[F.media].push(k[F.rules])}}for (var y in p){if (p[y] && p[y].parentNode === f){f.removeChild(p[y])}}for (var y in z){var G = u.createElement("style"), A = z[y].join("\n"); G.type = "text/css"; G.media = y; if (G.styleSheet){G.styleSheet.cssText = A} else{G.appendChild(u.createTextNode(A))}C.appendChild(G); p.push(G)}f.insertBefore(C, B.nextSibling)}, n = function(v, x){var w = c(); if (!w){return}w.open("GET", v, true); w.onreadystatechange = function(){if (w.readyState != 4 || w.status != 200 && w.status != 304){return}x(w.responseText)}; if (w.readyState == 4){return}w.send()}, c = (function(){var v = false, w = [function(){return new ActiveXObject("Microsoft.XMLHTTP")}, function(){return new ActiveXObject("Msxml3.XMLHTTP")}, function(){return new ActiveXObject("Msxml2.XMLHTTP")}, function(){return new XMLHttpRequest()}], y = w.length; while (y--){try{v = w[y]()} catch (x){continue}break}return function(){return v}})(); a(); respond.update = a; function s(){j(true)}if (e.addEventListener){e.addEventListener("resize", s, false)} else{if (e.attachEvent){e.attachEvent("onresize", s)}}})(this, (function(f){if (f.matchMedia){return true}var e, i = document, c = i.documentElement, g = c.firstElementChild || c.firstChild, h = !i.body, d = i.body || i.createElement("body"), b = i.createElement("div"), a = "only all"; b.id = "mq-test-1"; b.style.cssText = "position:absolute;top:-99em"; d.appendChild(b); b.innerHTML = '_<style media="' + a + '"> #mq-test-1 { width: 9px; }</style>'; if (h){c.insertBefore(d, g)}b.removeChild(b.firstChild); e = b.offsetWidth == 9; if (h){c.removeChild(d)} else{d.removeChild(b)}return e})(this));function initialize() {
  geocoder = new google.maps.Geocoder();
}

function getCountryStates(countryId, stateId, dv) {
  //alert(fcom.makeUrl('DriverRegistration', 'getStates', [countryId, stateId]));
  fcom.ajax(
    fcom.makeUrl("DriverRegistration", "getStates", [countryId, stateId]),
    "",
    function (res) {
      //alert(res);
      $(dv).empty();
      $(dv).append(res);
    }
  );
}
function getModelsMake(makeId, modelId, dv) {
  fcom.ajax(
    fcom.makeUrl("DriverRegistration", "getCarModels", [makeId, modelId]),
    "",
    function (res) {
      //alert(res); alert(dv);
      $(dv).empty();
      $(dv).append(res);
    }
  );
}
function resendVerificationLink(user) {
  if (user == "") {
    return false;
  }
  $(document).trigger("closeMsg.systemMessage");
  $.mbsmessage(langLbl.processing, false, "alert--process alert");
  fcom.updateWithAjax(
    fcom.makeUrl("DriverRegistration", "resendVerification", [user]),
    "",
    function (ans) {
      $.mbsmessage(ans.msg, false, "alert alert--success");
    }
  );
}

function getCardType(number) {
  // visa
  var re = new RegExp("^4");
  if (number.match(re) != null) return "Visa";

  // Mastercard
  re = new RegExp("^5[1-5]");
  if (number.match(re) != null) return "Mastercard";

  // AMEX
  re = new RegExp("^3[47]");
  if (number.match(re) != null) return "AMEX";

  // Discover
  re = new RegExp(
    "^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"
  );
  if (number.match(re) != null) return "Discover";

  // Diners
  re = new RegExp("^36");
  if (number.match(re) != null) return "Diners";

  // Diners - Carte Blanche
  re = new RegExp("^30[0-5]");
  if (number.match(re) != null) return "Diners - Carte Blanche";

  // JCB
  re = new RegExp("^35(2[89]|[3-8][0-9])");
  if (number.match(re) != null) return "JCB";

  // Visa Electron
  re = new RegExp("^(4026|417500|4508|4844|491(3|7))");
  if (number.match(re) != null) return "Visa Electron";

  return "";
}

(function ($) {
  $.extend(fcom, {
    getLoader: function () {
      return '<div class="loader-yk"><div class="loader-yk-inner"></div></div>';
    },

    scrollToTop: function (obj) {
      if (typeof obj == undefined || obj == null) {
        $("html, body").animate(
          { scrollTop: $("html, body").offset().top - 100 },
          "slow"
        );
      } else {
        $("html, body").animate(
          { scrollTop: $(obj).offset().top - 100 },
          "slow"
        );
      }
    },
    resetEditorInstance: function () {
      if (extendEditorJs == true) {
        var editors = oUtil.arrEditor;
        for (x in editors) {
          eval("delete window." + editors[x]);
        }
        oUtil.arrEditor = [];
      }
    },
    setEditorLayout: function (lang_id) {
      if (extendEditorJs == true) {
        var editors = oUtil.arrEditor;
        layout = langLbl["language" + lang_id];
        for (x in editors) {
          $("#idContent" + editors[x])
            .contents()
            .find("body")
            .css("direction", layout);
        }
      }
    },
  });

  $(document).bind("loading.facebox", function () {
    $("#facebox .content").addClass("fbminwidth");
  });

  $(document).bind("afterClose.facebox", fcom.resetEditorInstance);
  $(document).bind("beforeReveal.facebox", function () {
    $("#facebox .content").addClass("fbminwidth");
  });

  $(document).bind("reveal.facebox", function () {
    $("#facebox .content").addClass("fbminwidth");
  });

  $.systemMessage = function (data, cls) {
    initialize();
    $.systemMessage.loading();
    $.systemMessage.fillSysMessage(data, cls);
  };

  $.extend($.systemMessage, {
    settings: {
      closeimage: siteConstants.webroot + "images/facebox/close.gif",
    },
    loading: function () {
      $(".system_message").show();
    },
    fillSysMessage: function (data, cls) {
      if (cls) $(".system_message").addClass(cls);
      $(".system_message .content").html(data);
      $(".system_message").fadeIn();

      if (CONF_AUTO_CLOSE_SYSTEM_MESSAGES == 1) {
        var time = CONF_TIME_AUTO_CLOSE_SYSTEM_MESSAGES * 1000;
        setTimeout(function () {
          $.systemMessage.close();
        }, time);
      }

      /* $('.system_message').css({top:10}); */
    },
    close: function () {
      $(document).trigger("closeMsg.systemMessage");
    },
  });

  $(document).bind("closeMsg.systemMessage", function () {
    $(".system_message").fadeOut();
  });

  function initialize() {
    $(".system_message .closeMsg").click($.systemMessage.close);
  }
  /* [ */
  $.fn.serialize_without_blank = function () {
    var $form = this,
      result,
      $disabled = $([]);

    $form.find(":input").each(function () {
      var $this = $(this);
      if ($.trim($this.val()) === "" && !$this.is(":disabled")) {
        $disabled.add($this);
        $this.attr("disabled", true);
      }
    });

    result = $form.serialize();
    $disabled.removeAttr("disabled");
    return result;
  };
  /* ] */
})(jQuery);

function isUserLogged() {
  var isUserLogged = 0;
  $.ajax({
    url: fcom.makeUrl("DriverRegistration", "checkAjaxUserLoggedIn"),
    async: false,
    dataType: "json",
  }).done(function (ans) {
    isUserLogged = parseInt(ans.isUserLogged);
  });
  return isUserLogged;
}

$(window).scroll(function () {
  $(this).scrollTop() > 50
    ? $("header").addClass("js--scrolled")
    : $("header").removeClass("js--scrolled");
});
