/*-----------H-ui前端框架-------------
* H-ui.min.js v3.1.9
* http://www.h-ui.net/
* Created & Modified by guojunhui
* Date modified 2017.11.13
*
* Copyright 2013-2017 北京颖杰联创科技有限公司 All rights reserved.
* Licensed under MIT license.
* http://opensource.org/licenses/MIT
*/
!function () { if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var a = document.createElement("style"); a.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")); document.getElementsByTagName("head")[0].appendChild(a) } }(); function stopDefault(a) { if (a && a.preventDefault) { a.preventDefault() } else { window.event.returnValue = false } return false } !(function (a) { if (typeof define === "function" && define.amd) { define(["jquery"], a) } else { if (typeof exports === "object") { module.exports = a(require("jquery")) } else { a(jQuery) } } }(function (f) { var a = /\+/g; function d(i) { return b.raw ? i : encodeURIComponent(i) } function g(i) { return b.raw ? i : decodeURIComponent(i) } function h(i) { return d(b.json ? JSON.stringify(i) : String(i)) } function c(i) { if (i.indexOf('"') === 0) { i = i.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\") } try { i = decodeURIComponent(i.replace(a, " ")); return b.json ? JSON.parse(i) : i } catch (j) { } } function e(j, i) { var k = b.raw ? j : c(j); return f.isFunction(i) ? i(k) : k } var b = f.cookie = function (q, p, v) { if (arguments.length > 1 && !f.isFunction(p)) { v = f.extend({}, b.defaults, v); if (typeof v.expires === "number") { var r = v.expires, u = v.expires = new Date(); u.setMilliseconds(u.getMilliseconds() + r * 86400000) } return (document.cookie = [d(q), "=", h(p), v.expires ? "; expires=" + v.expires.toUTCString() : "", v.path ? "; path=" + v.path : "", v.domain ? "; domain=" + v.domain : "", v.secure ? "; secure" : ""].join("")) } var w = q ? undefined : {}, s = document.cookie ? document.cookie.split("; ") : [], o = 0, m = s.length; for (; o < m; o++) { var n = s[o].split("="), j = g(n.shift()), k = n.join("="); if (q === j) { w = e(k, p); break } if (!q && (k = e(k)) !== undefined) { w[j] = k } } return w }; b.defaults = {}; f.removeCookie = function (j, i) { f.cookie(j, "", f.extend({}, i, { expires: -1 })); return !f.cookie(j) } })); (function (a) { if (typeof define === "function" && define.amd) { define(["jquery"], a) } else { a((typeof (jQuery) != "undefined") ? jQuery : window.Zepto) } }(function (f) { var c = {}; c.fileapi = f("").get(0).files !== undefined; c.formdata = window.FormData !== undefined; var e = !!f.fn.prop; f.fn.attr2 = function () { if (!e) { return this.attr.apply(this, arguments) } var g = this.prop.apply(this, arguments); if ((g && g.jquery) || typeof g === "string") { return g } return this.attr.apply(this, arguments) }; f.fn.ajaxSubmit = function (j) { if (!this.length) { d("ajaxSubmit: skipping submit process - no element selected"); return this } var i, C, m, o = this; if (typeof j == "function") { j = { success: j } } else { if (j === undefined) { j = {} } } i = j.type || this.attr2("method"); C = j.url || this.attr2("action"); m = (typeof C === "string") ? f.trim(C) : ""; m = m || window.location.href || ""; if (m) { m = (m.match(/^([^#]+)/) || [])[1] } j = f.extend(true, { url: m, success: f.ajaxSettings.success, type: i || f.ajaxSettings.type, iframeSrc: /^https/i.test(window.location.href || "") ? "javascript:false" : "about:blank" }, j); var u = {}; this.trigger("form-pre-serialize", [this, j, u]); if (u.veto) { d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"); return this } if (j.beforeSerialize && j.beforeSerialize(this, j) === false) { d("ajaxSubmit: submit aborted via beforeSerialize callback"); return this } var n = j.traditional; if (n === undefined) { n = f.ajaxSettings.traditional } var s = []; var E, F = this.formToArray(j.semantic, s); if (j.data) { j.extraData = j.data; E = f.param(j.data, n) } if (j.beforeSubmit && j.beforeSubmit(F, this, j) === false) { d("ajaxSubmit: submit aborted via beforeSubmit callback"); return this } this.trigger("form-submit-validate", [F, this, j, u]); if (u.veto) { d("ajaxSubmit: submit vetoed via form-submit-validate trigger"); return this } var y = f.param(F, n); if (E) { y = (y ? (y + "&" + E) : E) } if (j.type.toUpperCase() == "GET") { j.url += (j.url.indexOf("?") >= 0 ? "&" : "?") + y; j.data = null } else { j.data = y } var H = []; if (j.resetForm) { H.push(function () { o.resetForm() }) } if (j.clearForm) { H.push(function () { o.clearForm(j.includeHidden) }) } if (!j.dataType && j.target) { var l = j.success || function () { }; H.push(function (q) { var k = j.replaceTarget ? "replaceWith" : "html"; f(j.target)[k](q).each(l, arguments) }) } else { if (j.success) { H.push(j.success) } } j.success = function (K, q, L) { var J = j.context || this; for (var I = 0, k = H.length; I < k; I++) { H[I].apply(J, [K, q, L || o, o]) } }; if (j.error) { var z = j.error; j.error = function (J, k, q) { var I = j.context || this; z.apply(I, [J, k, q, o]) } } if (j.complete) { var h = j.complete; j.complete = function (I, k) { var q = j.context || this; h.apply(q, [I, k, o]) } } var D = f("input[type=file]:enabled", this).filter(function () { return f(this).val() !== "" }); var p = D.length > 0; var B = "multipart/form-data"; var x = (o.attr("enctype") == B || o.attr("encoding") == B); var w = c.fileapi && c.formdata; d("fileAPI :" + w); var r = (p || x) && !w; var v; if (j.iframe !== false && (j.iframe || r)) { if (j.closeKeepAlive) { f.get(j.closeKeepAlive, function () { v = G(F) }) } else { v = G(F) } } else { if ((p || x) && w) { v = t(F) } else { v = f.ajax(j) } } o.removeData("jqxhr").data("jqxhr", v); for (var A = 0; A < s.length; A++) { s[A] = null } this.trigger("form-submit-notify", [this, j]); return this; function g(K) { var L = f.param(K, j.traditional).split("&"); var q = L.length; var k = []; var J, I; for (J = 0; J < q; J++) { L[J] = L[J].replace(/\+/g, " "); I = L[J].split("="); k.push([decodeURIComponent(I[0]), decodeURIComponent(I[1])]) } return k } function t(q) { var k = new FormData(); for (var I = 0; I < q.length; I++) { k.append(q[I].name, q[I].value) } if (j.extraData) { var L = g(j.extraData); for (I = 0; I < L.length; I++) { if (L[I]) { k.append(L[I][0], L[I][1]) } } } j.data = null; var K = f.extend(true, {}, f.ajaxSettings, j, { contentType: false, processData: false, cache: false, type: i || "POST" }); if (j.uploadProgress) { K.xhr = function () { var M = f.ajaxSettings.xhr(); if (M.upload) { M.upload.addEventListener("progress", function (Q) { var P = 0; var N = Q.loaded || Q.position; var O = Q.total; if (Q.lengthComputable) { P = Math.ceil(N / O * 100) } j.uploadProgress(Q, N, O, P) }, false) } return M } } K.data = null; var J = K.beforeSend; K.beforeSend = function (N, M) { if (j.formData) { M.data = j.formData } else { M.data = k } if (J) { J.call(this, N, M) } }; return f.ajax(K) } function G(af) { var L = o[0], K, ab, V, ad, Y, N, Q, O, P, Z, ac, T; var ai = f.Deferred(); ai.abort = function (aj) { O.abort(aj) }; if (af) { for (ab = 0; ab < s.length; ab++) { K = f(s[ab]); if (e) { K.prop("disabled", false) } else { K.removeAttr("disabled") } } } V = f.extend(true, {}, f.ajaxSettings, j); V.context = V.context || V; Y = "jqFormIO" + (new Date().getTime()); if (V.iframeTarget) { N = f(V.iframeTarget); Z = N.attr2("name"); if (!Z) { N.attr2("name", Y) } else { Y = Z } } else { N = f(''); N.css({ position: "absolute", top: "-1000px", left: "-1000px" }) } Q = N[0]; O = { aborted: 0, responseText: null, responseXML: null, status: 0, statusText: "n/a", getAllResponseHeaders: function () { }, getResponseHeader: function () { }, setRequestHeader: function () { }, abort: function (aj) { var ak = (aj === "timeout" ? "timeout" : "aborted"); d("aborting upload... " + ak); this.aborted = 1; try { if (Q.contentWindow.document.execCommand) { Q.contentWindow.document.execCommand("Stop") } } catch (al) { } N.attr("src", V.iframeSrc); O.error = ak; if (V.error) { V.error.call(V.context, O, ak, aj) } if (ad) { f.event.trigger("ajaxError", [O, V, ak]) } if (V.complete) { V.complete.call(V.context, O, ak) } } }; ad = V.global; if (ad && 0 === f.active++) { f.event.trigger("ajaxStart") } if (ad) { f.event.trigger("ajaxSend", [O, V]) } if (V.beforeSend && V.beforeSend.call(V.context, O, V) === false) { if (V.global) { f.active-- } ai.reject(); return ai } if (O.aborted) { ai.reject(); return ai } P = L.clk; if (P) { Z = P.name; if (Z && !P.disabled) { V.extraData = V.extraData || {}; V.extraData[Z] = P.value; if (P.type == "image") { V.extraData[Z + ".x"] = L.clk_x; V.extraData[Z + ".y"] = L.clk_y } } } var U = 1; var R = 2; function S(al) { var ak = null; try { if (al.contentWindow) { ak = al.contentWindow.document } } catch (aj) { d("cannot get iframe.contentWindow document: " + aj) } if (ak) { return ak } try { ak = al.contentDocument ? al.contentDocument : al.document } catch (aj) { d("cannot get iframe.contentDocument: " + aj); ak = al.document } return ak } var J = f("meta[name=csrf-token]").attr("content"); var I = f("meta[name=csrf-param]").attr("content"); if (I && J) { V.extraData = V.extraData || {}; V.extraData[I] = J } function aa() { var ar = o.attr2("target"), an = o.attr2("action"), al = "multipart/form-data", ao = o.attr("enctype") || o.attr("encoding") || al; L.setAttribute("target", Y); if (!i || /post/i.test(i)) { L.setAttribute("method", "POST") } if (an != V.url) { L.setAttribute("action", V.url) } if (!V.skipEncodingOverride && (!i || /post/i.test(i))) { o.attr({ encoding: "multipart/form-data", enctype: "multipart/form-data" }) } if (V.timeout) { T = setTimeout(function () { ac = true; X(U) }, V.timeout) } function ap() { try { var at = S(Q).readyState; d("state = " + at); if (at && at.toLowerCase() == "uninitialized") { setTimeout(ap, 50) } } catch (au) { d("Server abort: ", au, " (", au.name, ")"); X(R); if (T) { clearTimeout(T) } T = undefined } } var aq = []; try { if (V.extraData) { for (var ak in V.extraData) { if (V.extraData.hasOwnProperty(ak)) { if (f.isPlainObject(V.extraData[ak]) && V.extraData[ak].hasOwnProperty("name") && V.extraData[ak].hasOwnProperty("value")) { aq.push(f('').val(V.extraData[ak].value).appendTo(L)[0]) } else { aq.push(f('').val(V.extraData[ak]).appendTo(L)[0]) } } } } if (!V.iframeTarget) { N.appendTo("body") } if (Q.attachEvent) { Q.attachEvent("onload", X) } else { Q.addEventListener("load", X, false) } setTimeout(ap, 15); try { L.submit() } catch (am) { var aj = document.createElement("form").submit; aj.apply(L) } } finally { L.setAttribute("action", an); L.setAttribute("enctype", ao); if (ar) { L.setAttribute("target", ar) } else { o.removeAttr("target") } f(aq).remove() } } if (V.forceSync) { aa() } else { setTimeout(aa, 10) } var ag, ah, ae = 50, M; function X(ap) { if (O.aborted || M) { return } ah = S(Q); if (!ah) { d("cannot access response document"); ap = R } if (ap === U && O) { O.abort("timeout"); ai.reject(O, "timeout"); return } else { if (ap == R && O) { O.abort("server abort"); ai.reject(O, "error", "server abort"); return } } if (!ah || ah.location.href == V.iframeSrc) { if (!ac) { return } } if (Q.detachEvent) { Q.detachEvent("onload", X) } else { Q.removeEventListener("load", X, false) } var an = "success", ar; try { if (ac) { throw "timeout" } var am = V.dataType == "xml" || ah.XMLDocument || f.isXMLDoc(ah); d("isXml=" + am); if (!am && window.opera && (ah.body === null || !ah.body.innerHTML)) { if (--ae) { d("requeing onLoad callback, DOM not available"); setTimeout(X, 250); return } } var at = ah.body ? ah.body : ah.documentElement; O.responseText = at ? at.innerHTML : null; O.responseXML = ah.XMLDocument ? ah.XMLDocument : ah; if (am) { V.dataType = "xml" } O.getResponseHeader = function (aw) { var av = { "content-type": V.dataType }; return av[aw.toLowerCase()] }; if (at) { O.status = Number(at.getAttribute("status")) || O.status; O.statusText = at.getAttribute("statusText") || O.statusText } var aj = (V.dataType || "").toLowerCase(); var aq = /(json|script|text)/.test(aj); if (aq || V.textarea) { var ao = ah.getElementsByTagName("textarea")[0]; if (ao) { O.responseText = ao.value; O.status = Number(ao.getAttribute("status")) || O.status; O.statusText = ao.getAttribute("statusText") || O.statusText } else { if (aq) { var ak = ah.getElementsByTagName("pre")[0]; var au = ah.getElementsByTagName("body")[0]; if (ak) { O.responseText = ak.textContent ? ak.textContent : ak.innerText } else { if (au) { O.responseText = au.textContent ? au.textContent : au.innerText } } } } } else { if (aj == "xml" && !O.responseXML && O.responseText) { O.responseXML = W(O.responseText) } } try { ag = k(O, aj, V) } catch (al) { an = "parsererror"; O.error = ar = (al || an) } } catch (al) { d("error caught: ", al); an = "error"; O.error = ar = (al || an) } if (O.aborted) { d("upload aborted"); an = null } if (O.status) { an = (O.status >= 200 && O.status < 300 || O.status === 304) ? "success" : "error" } if (an === "success") { if (V.success) { V.success.call(V.context, ag, "success", O) } ai.resolve(O.responseText, "success", O); if (ad) { f.event.trigger("ajaxSuccess", [O, V]) } } else { if (an) { if (ar === undefined) { ar = O.statusText } if (V.error) { V.error.call(V.context, O, an, ar) } ai.reject(O, "error", ar); if (ad) { f.event.trigger("ajaxError", [O, V, ar]) } } } if (ad) { f.event.trigger("ajaxComplete", [O, V]) } if (ad && !--f.active) { f.event.trigger("ajaxStop") } if (V.complete) { V.complete.call(V.context, O, an) } M = true; if (V.timeout) { clearTimeout(T) } setTimeout(function () { if (!V.iframeTarget) { N.remove() } else { N.attr("src", V.iframeSrc) } O.responseXML = null }, 100) } var W = f.parseXML || function (aj, ak) { if (window.ActiveXObject) { ak = new ActiveXObject("Microsoft.XMLDOM"); ak.async = "false"; ak.loadXML(aj) } else { ak = (new DOMParser()).parseFromString(aj, "text/xml") } return (ak && ak.documentElement && ak.documentElement.nodeName != "parsererror") ? ak : null }; var q = f.parseJSON || function (aj) { return window["eval"]("(" + aj + ")") }; var k = function (ao, am, al) { var ak = ao.getResponseHeader("content-type") || "", aj = am === "xml" || !am && ak.indexOf("xml") >= 0, an = aj ? ao.responseXML : ao.responseText; if (aj && an.documentElement.nodeName === "parsererror") { if (f.error) { f.error("parsererror") } } if (al && al.dataFilter) { an = al.dataFilter(an, am) } if (typeof an === "string") { if (am === "json" || !am && ak.indexOf("json") >= 0) { an = q(an) } else { if (am === "script" || !am && ak.indexOf("javascript") >= 0) { f.globalEval(an) } } } return an }; return ai } }; f.fn.ajaxForm = function (g) { g = g || {}; g.delegation = g.delegation && f.isFunction(f.fn.on); if (!g.delegation && this.length === 0) { var h = { s: this.selector, c: this.context }; if (!f.isReady && h.s) { d("DOM not ready, queuing ajaxForm"); f(function () { f(h.s, h.c).ajaxForm(g) }); return this } d("terminating; zero elements found by selector" + (f.isReady ? "" : " (DOM not ready)")); return this } if (g.delegation) { f(document).off("submit.form-plugin", this.selector, b).off("click.form-plugin", this.selector, a).on("submit.form-plugin", this.selector, g, b).on("click.form-plugin", this.selector, g, a); return this } return this.ajaxFormUnbind().on("submit.form-plugin", g, b).on("click.form-plugin", g, a) }; function b(h) { var g = h.data; if (!h.isDefaultPrevented()) { h.preventDefault(); f(h.target).ajaxSubmit(g) } } function a(k) { var j = k.target; var h = f(j); if (!(h.is("[type=submit],[type=image]"))) { var g = h.closest("[type=submit]"); if (g.length === 0) { return } j = g[0] } var i = this; i.clk = j; if (j.type == "image") { if (k.offsetX !== undefined) { i.clk_x = k.offsetX; i.clk_y = k.offsetY } else { if (typeof f.fn.offset == "function") { var l = h.offset(); i.clk_x = k.pageX - l.left; i.clk_y = k.pageY - l.top } else { i.clk_x = k.pageX - j.offsetLeft; i.clk_y = k.pageY - j.offsetTop } } } setTimeout(function () { i.clk = i.clk_x = i.clk_y = null }, 100) } f.fn.ajaxFormUnbind = function () { return this.unbind("submit.form-plugin click.form-plugin") }; f.fn.formToArray = function (x, g) { var w = []; if (this.length === 0) { return w } var l = this[0]; var z = this.attr("id"); var q = x ? l.getElementsByTagName("*") : l.elements; var A; if (q && !/MSIE [678]/.test(navigator.userAgent)) { q = f(q).get() } if (z) { A = f(':input[form="' + z + '"]').get(); if (A.length) { q = (q || []).concat(A) } } if (!q || !q.length) { return w } var r, p, o, y, m, t, k; for (r = 0, t = q.length; r < t; r++) { m = q[r]; o = m.name; if (!o || m.disabled) { continue } if (x && l.clk && m.type == "image") { if (l.clk == m) { w.push({ name: o, value: f(m).val(), type: m.type }); w.push({ name: o + ".x", value: l.clk_x }, { name: o + ".y", value: l.clk_y }) } continue } y = f.fieldValue(m, true); if (y && y.constructor == Array) { if (g) { g.push(m) } for (p = 0, k = y.length; p < k; p++) { w.push({ name: o, value: y[p] }) } } else { if (c.fileapi && m.type == "file") { if (g) { g.push(m) } var h = m.files; if (h.length) { for (p = 0; p < h.length; p++) { w.push({ name: o, value: h[p], type: m.type }) } } else { w.push({ name: o, value: "", type: m.type }) } } else { if (y !== null && typeof y != "undefined") { if (g) { g.push(m) } w.push({ name: o, value: y, type: m.type, required: m.required }) } } } } if (!x && l.clk) { var s = f(l.clk), u = s[0]; o = u.name; if (o && !u.disabled && u.type == "image") { w.push({ name: o, value: s.val() }); w.push({ name: o + ".x", value: l.clk_x }, { name: o + ".y", value: l.clk_y }) } } return w }; f.fn.formSerialize = function (g) { return f.param(this.formToArray(g)) }; f.fn.fieldSerialize = function (h) { var g = []; this.each(function () { var m = this.name; if (!m) { return } var k = f.fieldValue(this, h); if (k && k.constructor == Array) { for (var l = 0, j = k.length; l < j; l++) { g.push({ name: m, value: k[l] }) } } else { if (k !== null && typeof k != "undefined") { g.push({ name: this.name, value: k }) } } }); return f.param(g) }; f.fn.fieldValue = function (m) { for (var l = [], j = 0, g = this.length; j < g; j++) { var k = this[j]; var h = f.fieldValue(k, m); if (h === null || typeof h == "undefined" || (h.constructor == Array && !h.length)) { continue } if (h.constructor == Array) { f.merge(l, h) } else { l.push(h) } } return l }; f.fieldValue = function (g, o) { var j = g.name, u = g.type, w = g.tagName.toLowerCase(); if (o === undefined) { o = true } if (o && (!j || g.disabled || u == "reset" || u == "button" || (u == "checkbox" || u == "radio") && !g.checked || (u == "submit" || u == "image") && g.form && g.form.clk != g || w == "select" && g.selectedIndex == -1)) { return null } if (w == "select") { var p = g.selectedIndex; if (p < 0) { return null } var r = [], h = g.options; var l = (u == "select-one"); var q = (l ? p + 1 : h.length); for (var k = (l ? p : 0); k < q; k++) { var m = h[k]; if (m.selected) { var s = m.value; if (!s) { s = (m.attributes && m.attributes.value && !(m.attributes.value.specified)) ? m.text : m.value } if (l) { return s } r.push(s) } } return r } return f(g).val() }; f.fn.clearForm = function (g) { return this.each(function () { f("input,select,textarea", this).clearFields(g) }) }; f.fn.clearFields = f.fn.clearInputs = function (g) { var h = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; return this.each(function () { var j = this.type, i = this.tagName.toLowerCase(); if (h.test(j) || i == "textarea") { this.value = "" } else { if (j == "checkbox" || j == "radio") { this.checked = false } else { if (i == "select") { this.selectedIndex = -1 } else { if (j == "file") { if (/MSIE/.test(navigator.userAgent)) { f(this).replaceWith(f(this).clone(true)) } else { f(this).val("") } } else { if (g) { if ((g === true && /hidden/.test(j)) || (typeof g == "string" && f(this).is(g))) { this.value = "" } } } } } } }) }; f.fn.resetForm = function () { return this.each(function () { if (typeof this.reset == "function" || (typeof this.reset == "object" && !this.reset.nodeType)) { this.reset() } }) }; f.fn.enable = function (g) { if (g === undefined) { g = true } return this.each(function () { this.disabled = !g }) }; f.fn.selected = function (g) { if (g === undefined) { g = true } return this.each(function () { var h = this.type; if (h == "checkbox" || h == "radio") { this.checked = g } else { if (this.tagName.toLowerCase() == "option") { var i = f(this).parent("select"); if (g && i[0] && i[0].type == "select-one") { i.find("option").selected(false) } this.selected = g } } }) }; f.fn.ajaxSubmit.debug = false; function d() { if (!f.fn.ajaxSubmit.debug) { return } var g = "[jquery.form] " + Array.prototype.join.call(arguments, ""); if (window.console && window.console.log) { window.console.log(g) } else { if (window.opera && window.opera.postError) { window.opera.postError(g) } } } })); !(function (c, b, a, e) { var d = c(b); c.fn.lazyload = function (f) { var h = this; var i; var g = { threshold: 0, failure_limit: 0, event: "scroll", effect: "show", container: b, data_attribute: "original", skip_invisible: true, appear: null, load: null, placeholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" }; function j() { var k = 0; h.each(function () { var l = c(this); if (g.skip_invisible && !l.is(":visible")) { return } if (c.abovethetop(this, g) || c.leftofbegin(this, g)) { } else { if (!c.belowthefold(this, g) && !c.rightoffold(this, g)) { l.trigger("appear"); k = 0 } else { if (++k > g.failure_limit) { return false } } } }) } if (f) { if (e !== f.failurelimit) { f.failure_limit = f.failurelimit; delete f.failurelimit } if (e !== f.effectspeed) { f.effect_speed = f.effectspeed; delete f.effectspeed } c.extend(g, f) } i = (g.container === e || g.container === b) ? d : c(g.container); if (0 === g.event.indexOf("scroll")) { i.on(g.event, function () { return j() }) } this.each(function () { var k = this; var l = c(k); k.loaded = false; if (l.attr("src") === e || l.attr("src") === false) { if (l.is("img")) { l.attr("src", g.placeholder) } } l.one("appear", function () { if (!this.loaded) { if (g.appear) { var m = h.length; g.appear.call(k, m, g) } c("").on("load", function () { var o = l.attr("data-" + g.data_attribute); l.hide(); if (l.is("img")) { l.attr("src", o) } else { l.css("background-image", "url('" + o + "')") } l[g.effect](g.effect_speed); k.loaded = true; var n = c.grep(h, function (q) { return !q.loaded }); h = c(n); if (g.load) { var p = h.length; g.load.call(k, p, g) } }).attr("src", l.attr("data-" + g.data_attribute)) } }); if (0 !== g.event.indexOf("scroll")) { l.on(g.event, function () { if (!k.loaded) { l.trigger("appear") } }) } }); d.on("resize", function () { j() }); if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { d.on("pageshow", function (k) { if (k.originalEvent && k.originalEvent.persisted) { h.each(function () { c(this).trigger("appear") }) } }) } c(a).ready(function () { j() }); return this }; c.belowthefold = function (g, h) { var f; if (h.container === e || h.container === b) { f = (b.innerHeight ? b.innerHeight : d.height()) + d.scrollTop() } else { f = c(h.container).offset().top + c(h.container).height() } return f <= c(g).offset().top - h.threshold }; c.rightoffold = function (g, h) { var f; if (h.container === e || h.container === b) { f = d.width() + d.scrollLeft() } else { f = c(h.container).offset().left + c(h.container).width() } return f <= c(g).offset().left - h.threshold }; c.abovethetop = function (g, h) { var f; if (h.container === e || h.container === b) { f = d.scrollTop() } else { f = c(h.container).offset().top } return f >= c(g).offset().top + h.threshold + c(g).height() }; c.leftofbegin = function (g, h) { var f; if (h.container === e || h.container === b) { f = d.scrollLeft() } else { f = c(h.container).offset().left } return f >= c(g).offset().left + h.threshold + c(g).width() }; c.inviewport = function (f, g) { return !c.rightoffold(f, g) && !c.leftofbegin(f, g) && !c.belowthefold(f, g) && !c.abovethetop(f, g) }; c.extend(c.expr[":"], { "below-the-fold": function (f) { return c.belowthefold(f, { threshold: 0 }) }, "above-the-top": function (f) { return !c.belowthefold(f, { threshold: 0 }) }, "right-of-screen": function (f) { return c.rightoffold(f, { threshold: 0 }) }, "left-of-screen": function (f) { return !c.rightoffold(f, { threshold: 0 }) }, "in-viewport": function (f) { return c.inviewport(f, { threshold: 0 }) }, "above-the-fold": function (f) { return !c.belowthefold(f, { threshold: 0 }) }, "right-of-fold": function (f) { return c.rightoffold(f, { threshold: 0 }) }, "left-of-fold": function (f) { return !c.rightoffold(f, { threshold: 0 }) } }) })(jQuery, window, document); (function (a, d, b) { var c = function (e, g) { var f = !!d.getComputedStyle; if (!f) { d.getComputedStyle = function (x) { this.el = x; this.getPropertyValue = function (z) { var y = /(\-([a-z]){1})/g; if (z === "float") { z = "styleFloat" } if (y.test(z)) { z = z.replace(y, function () { return arguments[2].toUpperCase() }) } return x.currentStyle[z] ? x.currentStyle[z] : null }; return this } } var q = function (A, y, z, x) { if ("addEventListener" in A) { try { A.addEventListener(y, z, x) } catch (B) { if (typeof z === "object" && z.handleEvent) { A.addEventListener(y, function (C) { z.handleEvent.call(z, C) }, x) } else { throw B } } } else { if ("attachEvent" in A) { if (typeof z === "object" && z.handleEvent) { A.attachEvent("on" + y, function () { z.handleEvent.call(z) }) } else { A.attachEvent("on" + y, z) } } } }, r = function (A, y, z, x) { if ("removeEventListener" in A) { try { A.removeEventListener(y, z, x) } catch (B) { if (typeof z === "object" && z.handleEvent) { A.removeEventListener(y, function (C) { z.handleEvent.call(z, C) }, x) } else { throw B } } } else { if ("detachEvent" in A) { if (typeof z === "object" && z.handleEvent) { A.detachEvent("on" + y, function () { z.handleEvent.call(z) }) } else { A.detachEvent("on" + y, z) } } } }, h = function (z) { if (z.children.length < 1) { throw new Error("The Nav container has no containing elements") } var y = []; for (var x = 0; x < z.children.length; x++) { if (z.children[x].nodeType === 1) { y.push(z.children[x]) } } return y }, s = function (z, x) { for (var y in x) { z.setAttribute(y, x[y]) } }, l = function (y, x) { if (y.className.indexOf(x) !== 0) { y.className += " " + x; y.className = y.className.replace(/(^\s*)|(\s*$)/g, "") } }, o = function (z, x) { var y = new RegExp("(\\s|^)" + x + "(\\s|$)"); z.className = z.className.replace(y, " ").replace(/(^\s*)|(\s*$)/g, "") }, t = function (A, z, y) { for (var x = 0; x < A.length; x++) { z.call(y, x, A[x]) } }; var j, n, i, w = a.createElement("style"), k = a.documentElement, v, p, u; var m = function (z, x) { var y; this.options = { animate: true, transition: 284, label: "Menu", insert: "before", customToggle: "", closeOnNavClick: false, openPos: "relative", navClass: "nav-collapse", navActiveClass: "js-nav-active", jsClass: "js", init: function () { }, open: function () { }, close: function () { } }; for (y in x) { this.options[y] = x[y] } l(k, this.options.jsClass); this.wrapperEl = z.replace("#", ""); if (a.getElementById(this.wrapperEl)) { this.wrapper = a.getElementById(this.wrapperEl) } else { if (a.querySelector(this.wrapperEl)) { this.wrapper = a.querySelector(this.wrapperEl) } else { throw new Error("The nav element you are trying to select doesn't exist") } } this.wrapper.inner = h(this.wrapper); n = this.options; j = this.wrapper; this._init(this) }; m.prototype = { destroy: function () { this._removeStyles(); o(j, "closed"); o(j, "opened"); o(j, n.navClass); o(j, n.navClass + "-" + this.index); o(k, n.navActiveClass); j.removeAttribute("style"); j.removeAttribute("aria-hidden"); r(d, "resize", this, false); r(d, "focus", this, false); r(a.body, "touchmove", this, false); r(i, "touchstart", this, false); r(i, "touchend", this, false); r(i, "mouseup", this, false); r(i, "keyup", this, false); r(i, "click", this, false); if (!n.customToggle) { i.parentNode.removeChild(i) } else { i.removeAttribute("aria-hidden") } }, toggle: function () { if (v === true) { if (!u) { this.open() } else { this.close() } } }, open: function () { if (!u) { o(j, "closed"); l(j, "opened"); l(k, n.navActiveClass); l(i, "active"); j.style.position = n.openPos; s(j, { "aria-hidden": "false" }); u = true; n.open() } }, close: function () { if (u) { l(j, "closed"); o(j, "opened"); o(k, n.navActiveClass); o(i, "active"); s(j, { "aria-hidden": "true" }); if (n.animate) { v = false; setTimeout(function () { j.style.position = "absolute"; v = true }, n.transition + 10) } else { j.style.position = "absolute" } u = false; n.close() } }, resize: function () { if (d.getComputedStyle(i, null).getPropertyValue("display") !== "none") { p = true; s(i, { "aria-hidden": "false" }); if (j.className.match(/(^|\s)closed(\s|$)/)) { s(j, { "aria-hidden": "true" }); j.style.position = "absolute" } this._createStyles(); this._calcHeight() } else { p = false; s(i, { "aria-hidden": "true" }); s(j, { "aria-hidden": "false" }); j.style.position = n.openPos; this._removeStyles() } }, handleEvent: function (y) { var x = y || d.event; switch (x.type) { case "touchstart": this._onTouchStart(x); break; case "touchmove": this._onTouchMove(x); break; case "touchend": case "mouseup": this._onTouchEnd(x); break; case "click": this._preventDefault(x); break; case "keyup": this._onKeyUp(x); break; case "focus": case "resize": this.resize(x); break } }, _init: function () { this.index = b++; l(j, n.navClass); l(j, n.navClass + "-" + this.index); l(j, "closed"); v = true; u = false; this._closeOnNavClick(); this._createToggle(); this._transitions(); this.resize(); var x = this; setTimeout(function () { x.resize() }, 20); q(d, "resize", this, false); q(d, "focus", this, false); q(a.body, "touchmove", this, false); q(i, "touchstart", this, false); q(i, "touchend", this, false); q(i, "mouseup", this, false); q(i, "keyup", this, false); q(i, "click", this, false); n.init() }, _createStyles: function () { if (!w.parentNode) { w.type = "text/css"; a.getElementsByTagName("head")[0].appendChild(w) } }, _removeStyles: function () { if (w.parentNode) { w.parentNode.removeChild(w) } }, _createToggle: function () { if (!n.customToggle) { var y = a.createElement("a"); y.innerHTML = n.label; s(y, { "href": "#", "class": "nav-toggle" }); if (n.insert === "after") { j.parentNode.insertBefore(y, j.nextSibling) } else { j.parentNode.insertBefore(y, j) } i = y } else { var x = n.customToggle.replace("#", ""); if (a.getElementById(x)) { i = a.getElementById(x) } else { if (a.querySelector(x)) { i = a.querySelector(x) } else { throw new Error("The custom nav toggle you are trying to select doesn't exist") } } } }, _closeOnNavClick: function () { if (n.closeOnNavClick) { var y = j.getElementsByTagName("a"), x = this; t(y, function (z, A) { q(y[z], "click", function () { if (p) { x.toggle() } }, false) }) } }, _preventDefault: function (x) { if (x.preventDefault) { if (x.stopImmediatePropagation) { x.stopImmediatePropagation() } x.preventDefault(); x.stopPropagation(); return false } else { x.returnValue = false } }, _onTouchStart: function (x) { if (!Event.prototype.stopImmediatePropagation) { this._preventDefault(x) } this.startX = x.touches[0].clientX; this.startY = x.touches[0].clientY; this.touchHasMoved = false; r(i, "mouseup", this, false) }, _onTouchMove: function (x) { if (Math.abs(x.touches[0].clientX - this.startX) > 10 || Math.abs(x.touches[0].clientY - this.startY) > 10) { this.touchHasMoved = true } }, _onTouchEnd: function (y) { this._preventDefault(y); if (!p) { return } if (!this.touchHasMoved) { if (y.type === "touchend") { this.toggle(); return } else { var x = y || d.event; if (!(x.which === 3 || x.button === 2)) { this.toggle() } } } }, _onKeyUp: function (y) { var x = y || d.event; if (x.keyCode === 13) { this.toggle() } }, _transitions: function () { if (n.animate) { var x = j.style, y = "max-height " + n.transition + "ms"; x.WebkitTransition = x.MozTransition = x.OTransition = x.transition = y } }, _calcHeight: function () { var z = 0; for (var y = 0; y < j.inner.length; y++) { z += j.inner[y].offsetHeight } var x = "." + n.jsClass + " ." + n.navClass + "-" + this.index + ".opened{max-height:" + z + "px !important} ." + n.jsClass + " ." + n.navClass + "-" + this.index + ".opened.dropdown-active {max-height:9999px !important}"; if (w.styleSheet) { w.styleSheet.cssText = x } else { w.innerHTML = x } x = "" } }; return new m(e, g) }; if (typeof module !== "undefined" && module.exports) { module.exports = c } else { d.responsiveNav = c } }(document, window, 0)); !function (h, j, e) { var a = "placeholder" in j.createElement("input"); var f = "placeholder" in j.createElement("textarea"); var k = e.fn; var d = e.valHooks; var b = e.propHooks; var m; var l; if (a && f) { l = k.placeholder = function () { return this }; l.input = l.textarea = true } else { l = k.placeholder = function () { var o = this; o.filter((a ? "textarea" : ":input") + "[placeholder]").not(".placeholder").on({ "focus.placeholder": c, "blur.placeholder": g }).data("placeholder-enabled", true).trigger("blur.placeholder"); return o }; l.input = a; l.textarea = f; m = { "get": function (p) { var o = e(p); var q = o.data("placeholder-password"); if (q) { return q[0].value } return o.data("placeholder-enabled") && o.hasClass("placeholder") ? "" : p.value }, "set": function (p, r) { var o = e(p); var q = o.data("placeholder-password"); if (q) { return q[0].value = r } if (!o.data("placeholder-enabled")) { return p.value = r } if (r == "") { p.value = r; if (p != n()) { g.call(p) } } else { if (o.hasClass("placeholder")) { c.call(p, true, r) || (p.value = r) } else { p.value = r } } return o } }; if (!a) { d.input = m; b.value = m } if (!f) { d.textarea = m; b.value = m } e(function () { e(j).delegate("form", "submit.placeholder", function () { var o = e(".placeholder", this).each(c); setTimeout(function () { o.each(g) }, 10) }) }); e(h).on("beforeunload.placeholder", function () { e(".placeholder").each(function () { this.value = "" }) }) } function i(p) { var o = {}; var q = /^jQuery\d+$/; e.each(p.attributes, function (s, r) { if (r.specified && !q.test(r.name)) { o[r.name] = r.value } }); return o } function c(p, q) { var o = this; var r = e(o); if (o.value == r.attr("placeholder") && r.hasClass("placeholder")) { if (r.data("placeholder-password")) { r = r.hide().next().show().attr("id", r.removeAttr("id").data("placeholder-id")); if (p === true) { return r[0].value = q } r.focus() } else { o.value = ""; r.removeClass("placeholder"); o == n() && o.select() } } } function g() { var s; var o = this; var r = e(o); var q = this.id; if (o.value == "") { if (o.type == "password") { if (!r.data("placeholder-textinput")) { try { s = r.clone().prop("type", "text") } catch (p) { s = e("").prop(e.extend(i(this), { "type": "text" })) } s.removeAttr("name").data({ "placeholder-password": r, "placeholder-id": q }).on("focus.placeholder", c); r.data({ "placeholder-textinput": s, "placeholder-id": q }).before(s) } r = r.removeAttr("id").hide().prev().attr("id", q).show() } r.addClass("placeholder"); r[0].value = r.attr("placeholder") } else { r.removeClass("placeholder") } } function n() { try { return j.activeElement } catch (o) { } } }(this, document, jQuery); !function (c) { var b = "emailsuggest", d = { sugClass: "emailSug", domains: ["163.com", "126.com", "sohu.com", "139.com", "sina.com", "qq.com", "gmail.com"] }; function a(f, e) { this.$field = c(f); this.options = c.extend(true, {}, d, e); this._defaults = d; this._domains = this.options.domains; this.selectedIndex = 0; this.init() } a.prototype = { init: function () { this.addEvent() }, addEvent: function () { var e = this, f; this.$field.on("keyup.ema", function (g) { f = c.trim(this.value); if (f) { e.create(this, f); e.doSelect(g.keyCode) } else { e.hide() } }).on("blur.ema", function () { setTimeout(function () { e.hide() }, 200) }) }, create: function (i, q) { var l = this, k, m, o, n = [], j, h, p, g, r, f, e = 2; i = c(i); j = i.offset(); g = i.outerWidth(true) - e; r = i.outerHeight(true); h = j.left; p = j.top + r; f = "left: " + h + "px; top: " + p + "px; width: " + g + "px; border: 1px solid #e2e2e2; border-top: 0; display: none"; o = c('
'); n.push('
'); k = this.filter(q, this._domains); m = k.length; c.each(k, function (t, u) { var s = l.options.sugClass + "-item"; if (l.selectedIndex > m - 1) { if (t === 0) { s += " active"; l.selectedIndex = 0 } } else { if (t === l.selectedIndex) { s += " active" } } n.push('
' + q.replace(/@.*/, "") + "@" + u + "
") }); n.push("
"); n = n.join(""); if (this.$suggest) { this.$suggest.empty(); this.$suggest.append(n) } else { o.append(n); c("body").append(o); this.$suggest = o; this.$suggest.on("mouseenter click", "." + this.options.sugClass + "-item", function (u) { var t, s; s = c(this); t = s.parent().children(); if (u.type === "mouseenter") { s.addClass("active").siblings().removeClass("active"); l.selectedIndex = c.inArray(this, t) } else { l.$field.val(t.eq(l.selectedIndex).text()); l.hide() } }) } this.show() }, doSelect: function (h) { var f = c("." + this.options.sugClass + "-item", this.$suggest), g = 0, e = f.length - 1; switch (h) { case 13: c("li.active", this.$suggest).trigger("click"); this.selectedIndex = 0; break; case 38: this.selectedIndex--; if (this.selectedIndex < g) { this.selectedIndex = e } f.removeClass("active").eq(this.selectedIndex).addClass("active"); break; case 40: this.selectedIndex++; if (this.selectedIndex > e) { this.selectedIndex = g } f.removeClass("active").eq(this.selectedIndex).addClass("active"); break; default: break } }, filter: function (g, e) { var i, h, f = []; i = g.indexOf("@"); if (i > -1) { h = g.substring(i + 1); c.each(e, function (j, k) { if (k.indexOf(h) > -1) { f.push(k) } }) } else { f = e } return f }, show: function () { if (this.$suggest) { this.$suggest.show() } }, hide: function () { if (this.$suggest) { this.$suggest.hide() } } }; c.fn[b] = function (e) { return this.each(function () { if (!c.data(this, b)) { c.data(this, b, new a(this, e)) } }) } }(window.jQuery); !function (a) { a.fn.Huispinner = function (c, e) { var d = { value: 1, minValue: 1, maxValue: 999, dis: 1, }; var c = a.extend(d, c); var b = { up: 38, down: 40 }; this.each(function () { var g = a(this); var k = '
"; g.append(k); var f = g.find(".input-text"), j = g.find(".subtract"), i = g.find(".add"), h = parseInt(f.val()); if (h <= c.minValue) { j.addClass("disabled"); i.removeClass("disabled") } if (h >= c.maxValue) { j.removeClass("disabled"); i.addClass("disabled") } f.on("blur", function () { var l = a(this).val(); l = l.replace(/[^\d]/g, ""); l = l.replace(/\b(0+)/gi, ""); if (l != "") { if (l > c.minValue && l < c.maxValue) { f.val(l); i.removeClass("disabled"); j.removeClass("disabled") } else { if (l <= c.minValue) { f.val(c.minValue); j.addClass("disabled"); i.removeClass("disabled") } else { f.val(c.maxValue); j.removeClass("disabled"); i.addClass("disabled") } } } else { a(this).val(c.minValue); j.addClass("disabled"); i.removeClass("disabled") } if (e) { e(f.val()) } }); f.on("keydown", function (m) { var l = m || window.event; if (l.keyCode === b.up) { j.trigger("click"); l.returnValue = false } if (l.keyCode === b.down) { i.trigger("click"); l.returnValue = false } }); j.on("click", function () { var l = parseInt(f.val()); f.val(l <= c.minValue ? c.minValue : l - c.dis); i.removeClass("disabled"); if (f.val() <= c.minValue) { f.val(c.minValue); j.addClass("disabled") } if (e) { e(f.val()) } }); i.on("click", function () { var l = parseInt(f.val()); f.val(l >= c.maxValue ? c.maxValue : l + c.dis); j.removeClass("disabled"); if (f.val() >= c.maxValue) { f.val(c.maxValue); i.addClass("disabled") } if (e) { e(f.val()) } }) }) } }(window.jQuery); !function (a) { a.Huiloading = { show: function (d) { if (a(".loading-wraper").length > 0) { a(".loading-wraper").remove() } if (d == null) { d = "" } var c = '
' + d + "
"; a(document.body).append(c); var b = a(".loading-wraper .loading-content").width() + 40; a(".loading-wraper .loading-content").css({ "margin-left": -(b / 2) + "px", }) }, hide: function () { a(".loading-wraper").remove() } } }(window.jQuery); !function (a) { a.extend({ format: function (j, b, k) { j = j.toString(); var h = j.length; if (h > b) { var d = h % b, c = parseInt(h / b), g = [], f = j.substr(0, d); if (f != "") { g.push(f) } for (var e = 0; e < c; e++) { g.push(j.substr(d + e * b, b)) } j = g.join(k) } return j } }) }(window.jQuery); !function (a) { a.fn.togglePassword = function (c) { var d = a.extend(a.fn.togglePassword.defaults, c), b = a(this); a(d.el).on(d.ev, function () { "password" == a(b).attr("type") ? a(b).attr("type", "text") : a(b).attr("type", "password") }) }; a.fn.togglePassword.defaults = { ev: "click" } }(window.jQuery); !(function (c) { var g = "iCheck", e = g + "-helper", q = "checkbox", a = "radio", s = "checked", x = "un" + s, i = "disabled", h = "determinate", b = "in" + h, r = "update", t = "type", d = "click", w = "touchbegin.i touchend.i", p = "addClass", f = "removeClass", l = "trigger", z = "label", o = "cursor", n = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent); c.fn[g] = function (N, E) { var J = 'input[type="' + q + '"], input[type="' + a + '"]', L = c(), B = function (O) { O.each(function () { var P = c(this); if (P.is(J)) { L = L.add(P) } else { L = L.add(P.find(J)) } }) }; if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(N)) { N = N.toLowerCase(); B(this); return L.each(function () { var O = c(this); if (N == "destroy") { u(O, "ifDestroyed") } else { v(O, true, N) } if (c.isFunction(E)) { E() } }) } else { if (typeof N == "object" || !N) { var F = c.extend({ checkedClass: s, disabledClass: i, indeterminateClass: b, labelHover: true }, N), G = F.handle, I = F.hoverClass || "hover", M = F.focusClass || "focus", K = F.activeClass || "active", C = !!F.labelHover, H = F.labelHoverClass || "hover", D = ("" + F.increaseArea).replace("%", "") | 0; if (G == q || G == a) { J = 'input[type="' + G + '"]' } if (D < -50) { D = -50 } B(this); return L.each(function () { var Z = c(this); u(Z); var R = this, O = R.id, S = -D + "%", aa = 100 + (D * 2) + "%", T = { position: "absolute", top: S, left: S, display: "block", width: aa, height: aa, margin: 0, padding: 0, background: "#fff", border: 0, opacity: 0 }, U = n ? { position: "absolute", visibility: "hidden" } : D ? T : { position: "absolute", opacity: 0 }, V = R[t] == q ? F.checkboxClass || "i" + q : F.radioClass || "i" + a, X = c(z + '[for="' + O + '"]').add(Z.closest(z)), W = !!F.aria, Q = g + "-" + Math.random().toString(36).substr(2, 6), Y = '")[l]("ifCreated").parent().append(F.insert); P = c('').css(T).appendTo(Y); Z.data(g, { o: F, s: Z.attr("style") }).css(U); !!F.inheritClass && Y[p](R.className || ""); !!F.inheritID && O && Y.attr("id", g + "-" + O); Y.css("position") == "static" && Y.css("position", "relative"); v(Z, true, r); if (X.length) { X.on(d + ".i mouseover.i mouseout.i " + w, function (ad) { var ab = ad[t], ac = c(this); if (!R[i]) { if (ab == d) { if (c(ad.target).is("a")) { return } v(Z, false, true) } else { if (C) { if (/ut|nd/.test(ab)) { Y[f](I); ac[f](H) } else { Y[p](I); ac[p](H) } } } if (n) { ad.stopPropagation() } else { return false } } }) } Z.on(d + ".i focus.i blur.i keyup.i keydown.i keypress.i", function (ad) { var ac = ad[t], ab = ad.keyCode; if (ac == d) { return false } else { if (ac == "keydown" && ab == 32) { if (!(R[t] == a && R[s])) { if (R[s]) { y(Z, s) } else { k(Z, s) } } return false } else { if (ac == "keyup" && R[t] == a) { !R[s] && k(Z, s) } else { if (/us|ur/.test(ac)) { Y[ac == "blur" ? f : p](M) } } } } }); P.on(d + " mousedown mouseup mouseover mouseout " + w, function (ad) { var ac = ad[t], ab = /wn|up/.test(ac) ? K : I; if (!R[i]) { if (ac == d) { v(Z, false, true) } else { if (/wn|er|in/.test(ac)) { Y[p](ab) } else { Y[f](ab + " " + K) } if (X.length && C && ab == I) { X[/ut|nd/.test(ac) ? f : p](H) } } if (n) { ad.stopPropagation() } else { return false } } }) }) } else { return this } } }; function v(B, H, G) { var C = B[0], E = /er/.test(G) ? b : /bl/.test(G) ? i : s, F = G == r ? { checked: C[s], disabled: C[i], indeterminate: B.attr(b) == "true" || B.attr(h) == "false" } : C[E]; if (/^(ch|di|in)/.test(G) && !F) { k(B, E) } else { if (/^(un|en|de)/.test(G) && F) { y(B, E) } else { if (G == r) { for (var D in F) { if (F[D]) { k(B, D, true) } else { y(B, D, true) } } } else { if (!H || G == "toggle") { if (!H) { B[l]("ifClicked") } if (F) { if (C[t] !== a) { y(B, E) } } else { k(B, E) } } } } } } function k(K, D, B) { var G = K[0], M = K.parent(), L = D == s, C = D == b, H = D == i, N = C ? h : L ? x : "enabled", F = m(K, N + j(G[t])), J = m(K, D + j(G[t])); if (G[D] !== true) { if (!B && D == s && G[t] == a && G.name) { var E = K.closest("form"), I = 'input[name="' + G.name + '"]'; I = E.length ? E.find(I) : c(I); I.each(function () { if (this !== G && c(this).data(g)) { y(c(this), D) } }) } if (C) { G[D] = true; if (G[s]) { y(K, s, "force") } } else { if (!B) { G[D] = true } if (L && G[b]) { y(K, b, false) } } A(K, L, D, B) } if (G[i] && !!m(K, o, true)) { M.find("." + e).css(o, "default") } M[p](J || m(K, D) || ""); if (!!M.attr("role") && !C) { M.attr("aria-" + (H ? i : s), "true") } M[f](F || m(K, N) || "") } function y(I, D, B) { var F = I[0], K = I.parent(), J = D == s, C = D == b, G = D == i, L = C ? h : J ? x : "enabled", E = m(I, L + j(F[t])), H = m(I, D + j(F[t])); if (F[D] !== false) { if (C || !B || B == "force") { F[D] = false } A(I, J, L, B) } if (!F[i] && !!m(I, o, true)) { K.find("." + e).css(o, "pointer") } K[f](H || m(I, D) || ""); if (!!K.attr("role") && !C) { K.attr("aria-" + (G ? i : s), "false") } K[p](E || m(I, L) || "") } function u(B, C) { if (B.data(g)) { B.parent().html(B.attr("style", B.data(g).s || "")); if (C) { B[l](C) } B.off(".i").unwrap(); c(z + '[for="' + B[0].id + '"]').add(B.closest(z)).off(".i") } } function m(B, D, C) { if (B.data(g)) { return B.data(g).o[D + (C ? "" : "Class")] } } function j(B) { return B.charAt(0).toUpperCase() + B.slice(1) } function A(C, D, E, B) { if (!B) { if (D) { C[l]("ifToggled") } C[l]("ifChanged")[l]("if" + j(E)) } } })(window.jQuery || window.Zepto); !(function (b) { var a = { init: function (c) { return this.each(function () { var d = this, h = b(d).empty(); d.opt = b.extend(true, {}, b.fn.raty.defaults, c); h.data("settings", d.opt); d.opt.number = a.between(d.opt.number, 0, 20); if (d.opt.path.substring(d.opt.path.length - 1, d.opt.path.length) != "/") { d.opt.path += "/" } if (typeof d.opt.score == "function") { d.opt.score = d.opt.score.call(d) } if (d.opt.score) { d.opt.score = a.between(d.opt.score, 0, d.opt.number) } for (var e = 1; e <= d.opt.number; e++) { b("", { src: d.opt.path + ((!d.opt.score || d.opt.score < e) ? d.opt.starOff : d.opt.starOn), alt: e, title: (e <= d.opt.hints.length && d.opt.hints[e - 1] !== null) ? d.opt.hints[e - 1] : e }).appendTo(d); if (d.opt.space) { h.append((e < d.opt.number) ? "" : "") } } d.stars = h.children('img:not(".raty-cancel")'); d.score = b("", { type: "hidden", name: d.opt.scoreName }).appendTo(d); if (d.opt.score && d.opt.score > 0) { d.score.val(d.opt.score); a.roundStar.call(d, d.opt.score) } if (d.opt.iconRange) { a.fill.call(d, d.opt.score) } a.setTarget.call(d, d.opt.score, d.opt.targetKeep); var g = d.opt.space ? 4 : 0, f = d.opt.width || (d.opt.number * d.opt.size + d.opt.number * g); if (d.opt.cancel) { d.cancel = b("", { src: d.opt.path + d.opt.cancelOff, alt: "x", title: d.opt.cancelHint, "class": "raty-cancel" }); if (d.opt.cancelPlace == "left") { } else { } f += (d.opt.size + g) } if (d.opt.readOnly) { a.fixHint.call(d); if (d.cancel) { d.cancel.hide() } } else { h.css("cursor", "pointer"); a.bindAction.call(d) } }) }, between: function (e, d, c) { return Math.min(Math.max(parseFloat(e), d), c) }, bindAction: function () { var c = this, e = b(c); e.mouseleave(function () { var f = c.score.val() || undefined; a.initialize.call(c, f); a.setTarget.call(c, f, c.opt.targetKeep); if (c.opt.mouseover) { c.opt.mouseover.call(c, f) } }); var d = c.opt.half ? "mousemove" : "mouseover"; if (c.opt.cancel) { c.cancel.mouseenter(function () { b(this).attr("src", c.opt.path + c.opt.cancelOn); c.stars.attr("src", c.opt.path + c.opt.starOff); a.setTarget.call(c, null, true); if (c.opt.mouseover) { c.opt.mouseover.call(c, null) } }).mouseleave(function () { b(this).attr("src", c.opt.path + c.opt.cancelOff); if (c.opt.mouseover) { c.opt.mouseover.call(c, c.score.val() || null) } }).click(function (f) { c.score.removeAttr("value"); if (c.opt.click) { c.opt.click.call(c, null, f) } }) } c.stars.bind(d, function (g) { var h = parseInt(this.alt, 10); if (c.opt.half) { var f = parseFloat((g.pageX - b(this).offset().left) / c.opt.size), i = (f > 0.5) ? 1 : 0.5; h = parseFloat(this.alt) - 1 + i; a.fill.call(c, h); if (c.opt.precision) { h = h - i + f } a.showHalf.call(c, h) } else { a.fill.call(c, h) } e.data("score", h); a.setTarget.call(c, h, true); if (c.opt.mouseover) { c.opt.mouseover.call(c, h, g) } }).click(function (f) { c.score.val((c.opt.half || c.opt.precision) ? e.data("score") : this.alt); if (c.opt.click) { c.opt.click.call(c, c.score.val(), f) } }) }, cancel: function (c) { return b(this).each(function () { var d = this, e = b(d); if (e.data("readonly") === true) { return this } if (c) { a.click.call(d, null) } else { a.score.call(d, null) } d.score.removeAttr("value") }) }, click: function (c) { return b(this).each(function () { if (b(this).data("readonly") === true) { return this } a.initialize.call(this, c); if (this.opt.click) { this.opt.click.call(this, c) } else { a.error.call(this, 'you must add the "click: function(score, evt) { }" callback.') } a.setTarget.call(this, c, true) }) }, error: function (c) { b(this).html(c); b.error(c) }, fill: function (k) { var c = this, h = c.stars.length, g = 0, d, j, f; for (var e = 1; e <= h; e++) { d = c.stars.eq(e - 1); if (c.opt.iconRange && c.opt.iconRange.length > g) { j = c.opt.iconRange[g]; if (c.opt.single) { f = (e == k) ? (j.on || c.opt.starOn) : (j.off || c.opt.starOff) } else { f = (e <= k) ? (j.on || c.opt.starOn) : (j.off || c.opt.starOff) } if (e <= j.range) { d.attr("src", c.opt.path + f) } if (e == j.range) { g++ } } else { if (c.opt.single) { f = (e == k) ? c.opt.starOn : c.opt.starOff } else { f = (e <= k) ? c.opt.starOn : c.opt.starOff } d.attr("src", c.opt.path + f) } } }, fixHint: function () { var c = b(this), e = parseInt(this.score.val(), 10), d = this.opt.noRatedMsg; if (!isNaN(e) && e > 0) { d = (e <= this.opt.hints.length && this.opt.hints[e - 1] !== null) ? this.opt.hints[e - 1] : e } c.data("readonly", true).css("cursor", "default").attr("title", d); this.score.attr("readonly", "readonly"); this.stars.attr("title", d) }, getScore: function () { var d = [], c; b(this).each(function () { c = this.score.val(); d.push(c ? parseFloat(c) : undefined) }); return (d.length > 1) ? d : d[0] }, readOnly: function (c) { return this.each(function () { var d = b(this); if (d.data("readonly") === c) { return this } if (this.cancel) { if (c) { this.cancel.hide() } else { this.cancel.show() } } if (c) { d.unbind(); d.children("img").unbind(); a.fixHint.call(this) } else { a.bindAction.call(this); a.unfixHint.call(this) } d.data("readonly", c) }) }, reload: function () { return a.set.call(this, {}) }, roundStar: function (e) { var d = (e - Math.floor(e)).toFixed(2); if (d > this.opt.round.down) { var c = this.opt.starOn; if (d < this.opt.round.up && this.opt.halfShow) { c = this.opt.starHalf } else { if (d < this.opt.round.full) { c = this.opt.starOff } } this.stars.eq(Math.ceil(e) - 1).attr("src", this.opt.path + c) } }, score: function () { return arguments.length ? a.setScore.apply(this, arguments) : a.getScore.call(this) }, set: function (c) { this.each(function () { var d = b(this), f = d.data("settings"), e = d.clone().removeAttr("style").insertBefore(d); d.remove(); e.raty(b.extend(f, c)) }); return b(this.selector) }, setScore: function (c) { return b(this).each(function () { if (b(this).data("readonly") === true) { return this } a.initialize.call(this, c); a.setTarget.call(this, c, true) }) }, setTarget: function (e, d) { if (this.opt.target) { var c = b(this.opt.target); if (c.length == 0) { a.error.call(this, "目标选择器无效或丢失!") } var f = e; if (!d || f === undefined) { f = this.opt.targetText } else { if (this.opt.targetType == "hint") { f = (f === null && this.opt.cancel) ? this.opt.cancelHint : this.opt.hints[Math.ceil(f - 1)] } else { f = this.opt.precision ? parseFloat(f).toFixed(1) : parseInt(f, 10) } } if (this.opt.targetFormat.indexOf("{score}") < 0) { a.error.call(this, '模版 "{score}" 找不到!') } if (e !== null) { f = this.opt.targetFormat.toString().replace("{score}", f) } if (c.is(":input")) { c.val(f) } else { c.html(f) } } }, showHalf: function (d) { var c = (d - Math.floor(d)).toFixed(1); if (c > 0 && c < 0.6) { this.stars.eq(Math.ceil(d) - 1).attr("src", this.opt.path + this.opt.starHalf) } }, initialize: function (c) { c = !c ? 0 : a.between(c, 0, this.opt.number); a.fill.call(this, c); if (c > 0) { if (this.opt.halfShow) { a.roundStar.call(this, c) } this.score.val(c) } }, unfixHint: function () { for (var c = 0; c < this.opt.number; c++) { this.stars.eq(c).attr("title", (c < this.opt.hints.length && this.opt.hints[c] !== null) ? this.opt.hints[c] : c) } b(this).data("readonly", false).css("cursor", "pointer").removeAttr("title"); this.score.attr("readonly", "readonly") } }; b.fn.raty = function (c) { if (a[c]) { return a[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof c === "object" || !c) { return a.init.apply(this, arguments) } else { b.error("方法 " + c + " 不存在!") } } }; b.fn.raty.defaults = { cancel: false, cancelHint: "取消评级!", cancelOff: "cancel-off.png", cancelOn: "cancel-on.png", cancelPlace: "left", click: undefined, half: false, halfShow: true, hints: ["10", "20", "30", "40", "50", "60", "70", "80", "90", "100"], iconRange: undefined, mouseover: undefined, noRatedMsg: "没有额定", number: 10, path: "images/", precision: false, round: { down: 0.25, full: 0.6, up: 0.76 }, readOnly: false, score: undefined, scoreName: "score", single: false, size: 16, space: true, starHalf: "star-half.png", starOff: "star-off.png", starOn: "star-on.png", target: undefined, targetFormat: "{score}", targetKeep: false, targetText: "", targetType: "hint", width: undefined } })(jQuery); !(function (a) { a.fn.onePageNav = function (b) { var c = a.extend({}, a.fn.onePageNav.defaults, b), d = {}; d.sections = {}; d.bindNav = function (f, h, i) { var g = f.parent(), e = f.attr("href"), j = a(window); if (!g.hasClass(i.currentClass)) { if (i.begin) { i.begin() } d.adjustNav(h, g, i.currentClass); j.unbind(".onePageNav"); a.scrollTo(e, i.scrollSpeed, { easing: i.easing, offset: { top: -i.scrollOffset }, onAfter: function () { if (i.changeHash) { window.location.hash = e } j.bind("scroll.onePageNav", function () { d.scrollChange(h, i) }); if (i.end) { i.end() } } }) } }; d.adjustNav = function (g, e, f) { g.find("." + f).removeClass(f); e.addClass(f) }; d.getPositions = function (f, g) { var e = f.find("a"); if (g.filter !== "") { e = e.filter(g.filter) } e.each(function () { var j = a(this).attr("href"), i = a(j).offset(), h = i.top; d.sections[j.substr(1)] = Math.round(h) - g.scrollOffset }) }; d.getSection = function (i, g) { var e = "", h = Math.round(a(window).height() * g.scrollThreshold); for (var f in d.sections) { if ((d.sections[f] - h) < i) { e = f } } return e }; d.scrollChange = function (g, h) { d.getPositions(g, h); var f = a(window).scrollTop(), e = d.getSection(f, h); if (e !== "") { d.adjustNav(g, g.find("a[href=#" + e + "]").parent(), h.currentClass) } }; d.init = function (g, h) { var f = false, e = g.find("a"); if (h.filter !== "") { e = e.filter(h.filter) } e.bind("click", function (i) { d.bindNav(a(this), g, h); i.preventDefault() }); d.getPositions(g, h); a(window).bind("scroll.onePageNav", function () { f = true }); setInterval(function () { if (f) { f = false; d.scrollChange(g, h) } }, 250) }; return this.each(function () { var e = a(this), f = a.meta ? a.extend({}, c, e.data()) : c; d.init(e, f) }) }; a.fn.onePageNav.defaults = { currentClass: "current", changeHash: false, easing: "swing", filter: "", scrollSpeed: 750, scrollOffset: 0, scrollThreshold: 0.5, begin: false, end: false } })(jQuery); (function (e) { var b = "Hui.colorPicker"; var d = '
'; var a = { zh_cn: { errorTip: "不是有效的颜色值" }, zh_tw: { errorTip: "不是有效的顏色值" }, en: { errorTip: "Not a valid color value" } }; var c = function (g, f) { this.name = b; this.$ = e(g); this.getOptions(f); this.init() }; c.DEFAULTS = { colors: ["#00BCD4", "#388E3C", "#3280fc", "#3F51B5", "#9C27B0", "#795548", "#F57C00", "#F44336", "#E91E63"], pullMenuRight: true, wrapper: "btn-wrapper", tileSize: 30, lineCount: 5, optional: true, tooltip: "top", icon: "caret-down", }; c.prototype.init = function () { var f = this.options, h = this; this.$picker = e(d).addClass(f.wrapper); this.$picker.find(".cp-title").toggle(f.title !== undefined).text(f.title); this.$menu = this.$picker.find(".dropdown-menu").toggleClass("pull-right", f.pullMenuRight); this.$btn = this.$picker.find(".btn.dropdown-toggle"); this.$btn.find(".ic").addClass("icon-" + f.icon); if (f.btnTip) { this.$picker.attr("data-toggle", "tooltip").tooltip({ title: f.btnTip, placement: f.tooltip, container: "body" }) } this.$.attr("data-provide", null).after(this.$picker); this.colors = {}; e.each(this.options.colors, function (j, l) { if (e.zui.Color.isColor(l)) { var k = new e.zui.Color(l); h.colors[k.toCssStr()] = k } }); this.updateColors(); var h = this; this.$picker.on("click", ".cp-tile", function () { h.setValue(e(this).data("color")) }); var i = this.$; var g = function () { var k = i.val(); var j = e.zui.Color.isColor(k); i.parent().toggleClass("has-error", !j && !(f.optional && k === "")); if (j) { h.setValue(k, true) } else { if (f.optional && k === "") { i.tooltip("hide") } else { if (!i.is(":focus")) { i.tooltip("show", f.errorTip) } } } }; if (i.is("input:not([type=hidden])")) { if (f.tooltip) { i.attr("data-toggle", "tooltip").tooltip({ trigger: "manual", placement: f.tooltip, tipClass: "tooltip-danger", container: "body" }) } i.on("keyup paste input change", g) } else { i.appendTo(this.$picker) } g() }; c.prototype.addColor = function (f) { var h = f.toCssStr(), g = this.options; if (!this.colors[h]) { this.colors[h] = f } var i = e('', { titile: f }).data("color", f).css({ "color": f.contrast().toCssStr(), "background": h, "border-color": f.luma() > 0.43 ? "#ccc" : "transparent" }).attr("data-color", h); this.$menu.append(e("").css({ width: g.tileSize, height: g.tileSize }).append(i)); if (g.optional) { this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu) } }; c.prototype.updateColors = function (g) { var k = this.$picker, i = this.$menu.empty(), h = this.options, g = g || this.colors, j = this; var f = 0; e.each(g, function (m, n) { j.addColor(n); f++ }); if (h.optional) { var l = e('
').css({ width: h.tileSize, height: h.tileSize }); this.$menu.append(l); f++ } i.css("width", Math.min(f, h.lineCount) * h.tileSize + 6) }; c.prototype.setValue = function (f, i) { var g = this.options; this.$menu.find(".cp-tile.active").removeClass("active"); var h = ""; if (f) { var j = new e.zui.Color(f); h = j.toCssStr().toLowerCase(); this.$btn.css({ background: h, color: j.contrast().toCssStr(), borderColor: j.luma() > 0.43 ? "#ccc" : h }); if (!this.colors[h]) { this.addColor(j) } if (!i && this.$.val().toLowerCase() !== h) { this.$.val(h).trigger("change") } this.$menu.find(".cp-tile[data-color=" + h + "]").addClass("active"); this.$.tooltip("hide"); this.$.trigger("colorchange", j) } else { this.$btn.attr("style", null); if (!i && this.$.val() !== "") { this.$.val(h).trigger("change") } if (g.optional) { this.$.tooltip("hide") } this.$menu.find(".cp-tile.empty").addClass("active"); this.$.trigger("colorchange", null) } if (g.updateBorder) { e(g.updateBorder).css("border-color", h) } if (g.updateBackground) { e(g.updateBackground).css("background-color", h) } if (g.updateColor) { e(g.updateText).css("color", h) } if (g.updateText) { e(g.updateText).text(h) } }; c.prototype.getOptions = function (f) { var g = e.extend({}, c.DEFAULTS, this.$.data(), f); if (typeof g.colors === "string") { g.colors = g.colors.split(",") } var h = (g.lang || e.zui.clientLang()).toLowerCase(); if (!g.errorTip) { g.errorTip = a[h].errorTip } if (!e.fn.tooltip) { g.btnTip = false } this.options = g }; e.fn.colorPicker = function (f) { return this.each(function () { var i = e(this); var h = i.data(b); var g = typeof f == "object" && f; if (!h) { i.data(b, (h = new c(this, g))) } if (typeof f == "string") { h[f]() } }) }; e.fn.colorPicker.Constructor = c; e(function () { e('[data-provide="colorpicker"]').colorPicker() }) }(jQuery)); function HuiaddFavorite(b) { b.site = b.site || window.location.href; b.name = b.name || document.title; try { window.external.addFavorite(b.site, b.name) } catch (a) { try { window.sidebar.addPanel(name, site, "") } catch (a) { $.Huimodalalert("加入收藏失败,请使用Ctrl+D进行添加", 2000) } } } function Huisethome(c) { try { c.style.behavior = "url(#default#homepage)"; c.setHomePage(webSite) } catch (b) { if (window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") } catch (b) { $.Huimodalalert("此操作被浏览器拒绝!\n请在浏览器地址栏输入\"about:config\"并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。", 2000) } var a = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); a.setCharPref("browser.startup.homepage", url) } } } function displaynavbar(a) { if ($(a).hasClass("open")) { $(a).removeClass("open"); $("body").removeClass("big-page") } else { $(a).addClass("open"); $("body").addClass("big-page") } } !function (a) { a.fn.Huihover = function (b) { var c = { className: "hover", }; var b = a.extend(c, b); this.each(function () { var d = a(this); d.hover(function () { d.addClass(b.className) }, function () { d.removeClass(b.className) }) }) } }(window.jQuery); !function (a) { a.fn.Huifocusblur = function (b) { var c = { className: "focus", }; var b = a.extend(c, b); this.each(function () { var d = a(this); d.focus(function () { d.addClass(b.className).removeClass("inputError") }); d.blur(function () { d.removeClass(b.className) }) }) } }(window.jQuery); !function (a) { a.Huiselect = function (c, d) { var b = a(d); a(c + " cite").click(function () { var e = a(c + " ul"); e.slideToggle() }); a(c + " ul li a").click(function () { var e = a(this).text(); a(c + " cite").html(e); var f = a(this).attr("selectid"); b.val(f); a(c + " ul").hide() }); a(document).click(function () { a(c + " ul").hide() }) } }(window.jQuery); !function (a) { a.fn.Huitab = function (b, d) { var c = { tabBar: ".tabBar span", tabCon: ".tabCon", className: "current", tabEvent: "click", index: 0, }; var b = a.extend(c, b); this.each(function () { var e = a(this); e.find(b.tabBar).removeClass(b.className); e.find(b.tabBar).eq(b.index).addClass(b.className); e.find(b.tabCon).hide(); e.find(b.tabCon).eq(b.index).show(); e.find(b.tabBar).on(b.tabEvent, function () { e.find(b.tabBar).removeClass(b.className); a(this).addClass(b.className); var f = e.find(b.tabBar).index(this); e.find(b.tabCon).hide(); e.find(b.tabCon).eq(f).show(); if (d) { d() } }) }) } }(window.jQuery); !function (a) { a.fn.Huifold = function (b) { var c = { titCell: ".item .Huifold-header", mainCell: ".item .Huifold-body", type: 1, trigger: "click", className: "selected", speed: "first", }; var b = a.extend(c, b); this.each(function () { var d = a(this); d.find(b.titCell).on(b.trigger, function () { if (a(this).next().is(":visible")) { if (b.type == 2) { return false } else { a(this).next().slideUp(b.speed).end().removeClass(b.className); if (a(this).find("b")) { a(this).find("b").html("+") } } } else { if (b.type == 3) { a(this).next().slideDown(b.speed).end().addClass(b.className); if (a(this).find("b")) { a(this).find("b").html("-") } } else { d.find(b.mainCell).slideUp(b.speed); d.find(b.titCell).removeClass(b.className); if (d.find(b.titCell).find("b")) { d.find(b.titCell).find("b").html("+") } a(this).next().slideDown(b.speed).end().addClass(b.className); if (a(this).find("b")) { a(this).find("b").html("-") } } } }) }) } }(window.jQuery); !function (a) { a.fn.Huitags = function (c) { var d = { value: "Hui前端框架,H-ui,辉哥", maxlength: 20, number: 5, tagsDefault: ["Html", "CSS", "JS"], }; var c = a.extend(d, c); var b = { Enter: 13, Enter2: 108, Spacebar: 32 }; this.each(function () { var j = a(this); var n = '
' + '' + '
' + '' + "
" + '
' + '
暂无常用标签
' + '' + "
" + '' + "
"; j.append(n); var h = j.find(".Huitags-wraper"); var k = j.find(".Huitags-editor"); var p = j.find(".Huitags-input"); var l = j.find(".Huitags-list"); var q = j.find(".Huitags-has"); var e = j.find(".Huitags-val"); if (c.tagsDefault) { var m = (c.tagsDefault).length; for (var g = 0; g < m; g++) { q.append("" + c.tagsDefault[g] + "") } q.find("span").on("click", function () { var i = a(this).text(); i = i.replace(/(^\s*)|(\s*$)/g, ""); k.append('' + i + ""); o(this); a(this).remove() }) } function o(t) { var u = ""; var s = j.find(".Huitags-token"); if (s.length < 1) { p.val(""); return false } for (var r = 0; r < s.length; r++) { u += s.eq(r).text() + "," } u = f(u, 1); u = u.join(); e.val(u) } function f(t, s) { t = t.replace(/(^\s*)|(\s*$)/g, ""); if (s == 1) { t = t.replace(/(\s)|(,)/g, ",") } else { t = t.replace(/(,)/g, ",") } t = t.replace(/^,|,$/g, ""); t = t.replace(/,+/g, ","); t = t.split(","); var u = [t[0]]; for (var r = 1; r < t.length; r++) { if (t.indexOf(t[r]) == r) { if (t[r] == "") { continue } u.push(t[r]) } } return u } p.on("keydown", function (t) { var i = t || window.event; if (i.keyCode == b.Enter || i.keyCode == b.Enter2 || i.keyCode == b.Spacebar) { var r = p.val().replace(/\s+/g, ""); var s = /^,|,$/gi; r = r.replace(s, ""); r = a.trim(r); if (r != "") { p.change() } else { return false } } }); p.on("change", function () { var w = p.val(); var u = e.val(); var r = u + "," + w; if (r != "") { var t = ''; var i = f(r, 1); if (i.length > 0) { for (var s = 0; s < i.length; s++) { t += '' + i[s] + "" } e.val(i); k.html(t); p.val("").blur() } } }); a(document).on("click", ".Huitags-token", function () { a(this).remove(); var s = ""; if (j.find(".Huitags-token").length < 1) { e.val(""); return false } else { for (var r = 0; r < j.find(".Huitags-token").length; r++) { s += j.find(".Huitags-token").eq(r).text() + "," } s = s.substring(0, s.length - 1); e.val(s) } }); p.change() }) } }(window.jQuery); !function (a) { a.Huitagsmixed = function (b) { a(b).each(function () { var c = 9; var e = 0; var d = parseInt(Math.random() * (c - e + 1) + e); a(this).addClass("tags" + d) }) } }(window.jQuery); !function (a) { a.fn.Huitextarealength = function (b) { var c = { minlength: 0, maxlength: 140, errorClass: "error", exceed: true, }; var b = a.extend(c, b); this.each(function () { var f = a(this); var e = f.val(); var d = e.length; var g = '
' + d + "/" + b.maxlength + "
"; f.parent().append(g); f.on("keyup", function () { e = f.val(); d = e.length; if (d > b.maxlength) { if (b.exceed) { f.addClass(b.errorClass) } else { e = e.substring(0, b.maxlength); f.val(e); f.removeClass(b.errorClass) } } else { if (d < b.minlength) { f.addClass(b.errorClass) } else { f.removeClass(b.errorClass) } } f.parent().find(".textarea-length").text(e.length) }) }) } }(window.jQuery); !function (a) { a.fn.Huipreview = function (b) { var c = { className: "active", bigImgWidth: 300, }; var b = a.extend(c, b); this.each(function () { var d = a(this); var e; d.hover(function () { clearTimeout(e); e = setTimeout(function () { a("#preview-wraper").remove(); var f = d.find("img").attr("src"); var n = d.attr("data-src"); var l = d.attr("data-width"); var t = d.attr("data-height"); var q = a(window).width(); var o = q / 2; var r = d.parent().offset().top; var g = d.parent().offset().left; var p = d.parent().width(); var k = d.parent().height(); var m = (g + p / 2); var s = "auto", h = "auto"; if (m < o) { s = (p + g) + "px" } else { h = (q - g) + "px" } d.addClass(b.className); if (n == "") { return false } else { var j = '
' + '' + "
"; a("body").append(j); var i = new Image(); i.src = n; i.onload = function () { a("#preview-wraper").find("img").attr("src", n).css("width", b.bigImgWidth) } } }, 500) }, function () { clearTimeout(e); d.removeClass(b.className); a("#preview-wraper").remove() }) }) } }(window.jQuery); !function (a) { a.Huimodalalert = function (c, b) { if (a(".modal-alert").length > 0) { a(".modal-alert").remove() } if (b == 0 || typeof (b) == "undefined") { a(document.body).append('
"; f.fn.datetimepicker.DPGlobal = g; f.fn.datetimepicker.noConflict = function () { f.fn.datetimepicker = b; return this }; f(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api", '[data-provide="datetimepicker"]', function (k) { var j = f(this); if (j.data("datetimepicker")) { return } k.preventDefault(); j.datetimepicker("show") }); f(function () { f('[data-provide="datetimepicker-inline"]').datetimepicker() }) })); !function (a) { a.fn["bootstrapSwitch"] = function (c) { var b = { init: function () { return this.each(function () { var p = a(this), m, f, l, o, h = "", g = p.attr("class"), i, d, j = "ON", e = "OFF", n = false; a.each(["size-MINI", "size-S", "size-L"], function (q, r) { if (g.indexOf(r) >= 0) { h = r } }); p.addClass("has-switch"); if (p.data("on") !== undefined) { i = "switch-" + p.data("on") } if (p.data("on-label") !== undefined) { j = p.data("on-label") } if (p.data("off-label") !== undefined) { e = p.data("off-label") } if (p.data("icon") !== undefined) { n = p.data("icon") } f = a("").addClass("switch-left").addClass(h).addClass(i).html(j); i = ""; if (p.data("off") !== undefined) { i = "switch-" + p.data("off") } l = a("").addClass("switch-right").addClass(h).addClass(i).html(e); o = a("