Web/image/scroll.js
(完整代码) 53KB/*! jQuery Cookie */
jQuery.cookie = function (b, j, m) { if (typeof j != "undefined") { m = m || {}; if (j === null) { j = ""; m.expires = -1 } var e = ""; if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) { var f; if (typeof m.expires == "number") { f = new Date(); f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000)) } else { f = m.expires } e = "; expires=" + f.toUTCString() } var l = m.path ? "; path=" + (m.path) : ""; var g = m.domain ? "; domain=" + (m.domain) : ""; var a = m.secure ? "; secure" : ""; document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("") } else { var d = null; if (document.cookie && document.cookie != "") { var k = document.cookie.split(";"); for (var h = 0; h < k.length; h++) { var c = jQuery.trim(k[h]); if (c.substring(0, b.length + 1) == (b + "=")) { d = decodeURIComponent(c.substring(b.length + 1)); break } } } return d } }; /*! artDialog Core, version 4.1.6 */
; (function (g, h) { function n(b) { var d = c.expando, e = b === g ? 0 : b[d]; e === h && (b[d] = e = ++c.uuid); return e }; function p() { if (!c.isReady) { try { document.documentElement.doScroll("left") } catch (b) { setTimeout(p, 1); return }; c.ready() } }; var c = g.art = function (b, d) { return new c.fn.init(b, d) }, v = !1, r = [], s, l = "opacity" in document.documentElement.style, t = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, m = /[\n\t]/g, q = /alpha\([^)]*\)/i, z = /opacity=([^)]*)/, x = /^([+-]=)?([\d+-.]+)(.*)$/; if (g.$ === h) g.$ = c; c.fn = c.prototype = { constructor: c, ready: function (b) { c.bindReady(); c.isReady ? b.call(document, c) : r && r.push(b); return this }, hasClass: function (b) { return -1 < (" " + this[0].className + " ").replace(m, " ").indexOf(" " + b + " ") ? !0 : !1 }, addClass: function (b) { this.hasClass(b) || (this[0].className += " " + b); return this }, removeClass: function (b) { var d = this[0]; if (b) { if (this.hasClass(b)) d.className = d.className.replace(b, " ") } else d.className = ""; return this }, css: function (b, d) { var e, a = this[0]; if ("string" === typeof b) { if (d === h) return c.css(a, b); "opacity" === b ? c.opacity.set(a, d) : a.style[b] = d } else for (e in b) "opacity" === e ? c.opacity.set(a, b[e]) : a.style[e] = b[e]; return this }, show: function () { return this.css("display", "block") }, hide: function () { return this.css("display", "none") }, offset: function () { var b = this[0], d = b.getBoundingClientRect(), c = b.ownerDocument, b = c.body, c = c.documentElement; return { left: d.left + (self.pageXOffset || c.scrollLeft) - (c.clientLeft || b.clientLeft || 0), top: d.top + (self.pageYOffset || c.scrollTop) - (c.clientTop || b.clientTop || 0)} }, html: function (b) { var d = this[0]; if (b === h) return d.innerHTML; c.cleanData(d.getElementsByTagName("*")); d.innerHTML = b; return this }, remove: function () { var b = this[0]; c.cleanData(b.getElementsByTagName("*")); c.cleanData([b]); b.parentNode.removeChild(b); return this }, bind: function (b, d) { c.event.add(this[0], b, d); return this }, unbind: function (b, d) { c.event.remove(this[0], b, d); return this } }; c.fn.init = function (b, d) { var e, d = d || document; if (!b) return this; if (b.nodeType) return this[0] = b, this; if ("body" === b && d.body) return this[0] = d.body, this; if ("head" === b || "html" === b) return this[0] = d.getElementsByTagName(b)[0], this; if ("string" === typeof b && (e = t.exec(b)) && e[2]) return (e = d.getElementById(e[2])) && e.parentNode && (this[0] = e), this; if ("function" === typeof b) return c(document).ready(b); this[0] = b; return this }; c.fn.init.prototype = c.fn; c.noop = function () { }; c.isWindow = function (b) { return b && "object" === typeof b && "setInterval" in b }; c.isArray = function (b) { return "[object Array]" === Object.prototype.toString.call(b) }; c.fn.find = function (b) { var d = this[0], e = b.split(".")[1]; if (e) if (document.getElementsByClassName) e = d.getElementsByClassName(e); else { for (var a = b = 0, f = [], d = (d || document).getElementsByTagName("*"), k = d.length, e = RegExp("(^|\\s)" + e + "(\\s|$)"); b < k; b++) e.test(d[b].className) && (f[a] = d[b], a++); e = f } else e = d.getElementsByTagName(b); return c(e[0]) }; c.each = function (b, d) { var c, a = 0, f = b.length; if (f === h) for (c in b) { if (!1 === d.call(b[c], c, b[c])) break } else for (c = b[0]; a < f && !1 !== d.call(c, a, c); c = b[++a]); return b }; c.data = function (b, d, e) { var a = c.cache, b = n(b); if (d === h) return a[b]; a[b] || (a[b] = {}); e !== h && (a[b][d] = e); return a[b][d] }; c.removeData = function (b, d) { var e = !0, a = c.expando, f = c.cache, k = n(b), w = k && f[k]; if (w) if (d) { delete w[d]; for (var y in w) e = !1; e && delete c.cache[k] } else delete f[k], b.removeAttribute ? b.removeAttribute(a) : b[a] = null }; c.uuid = 0; c.cache = {}; c.expando = "@cache" + +new Date; c.event = { add: function (b, d, e) { var i; var a, f = c.event; a = c.data(b, "@events") || c.data(b, "@events", {}); i = a[d] = a[d] || {}, a = i; (a.listeners = a.listeners || []).push(e); if (!a.handler) a.elem = b, a.handler = f.handler(a), b.addEventListener ? b.addEventListener(d, a.handler, !1) : b.attachEvent("on" + d, a.handler) }, remove: function (b, d, e) { var a, f, k; f = c.event; var w = !0, y = c.data(b, "@events"); if (y) if (d) { if (f = y[d]) { k = f.listeners; if (e) for (a = 0; a < k.length; a++) k[a] === e && k.splice(a--, 1); else f.listeners = []; if (0 === f.listeners.length) { b.removeEventListener ? b.removeEventListener(d, f.handler, !1) : b.detachEvent("on" + d, f.handler); delete y[d]; f = c.data(b, "@events"); for (var i in f) w = !1; w && c.removeData(b, "@events") } } } else for (a in y) f.remove(b, a) }, handler: function (b) { return function (d) { for (var d = c.event.fix(d || g.event), e = 0, a = b.listeners, f; f = a[e++]; ) !1 === f.call(b.elem, d) && (d.preventDefault(), d.stopPropagation()) } }, fix: function (b) { if (b.target) return b; var c = { target: b.srcElement || document, preventDefault: function () { b.returnValue = !1 }, stopPropagation: function () { b.cancelBubble = !0 } }, e; for (e in b) c[e] = b[e]; return c } }; c.cleanData = function (b) { for (var d = 0, e, a = b.length, f = c.event.remove, k = c.removeData; d < a; d++) e = b[d], f(e), k(e) }; c.isReady = !1; c.ready = function () { if (!c.isReady) { if (!document.body) return setTimeout(c.ready, 13); c.isReady = !0; if (r) { for (var b, d = 0; b = r[d++]; ) b.call(document, c); r = null } } }; c.bindReady = function () { if (!v) { v = !0; if ("complete" === document.readyState) return c.ready(); if (document.addEventListener) document.addEventListener("DOMContentLoaded", s, !1), g.addEventListener("load", c.ready, !1); else if (document.attachEvent) { document.attachEvent("onreadystatechange", s); g.attachEvent("onload", c.ready); var b = !1; try { b = null == g.frameElement } catch (d) { } document.documentElement.doScroll && b && p() } } }; document.addEventListener ? s = function () { document.removeEventListener("DOMContentLoaded", s, !1); c.ready() } : document.attachEvent && (s = function () { "complete" === document.readyState && (document.detachEvent("onreadystatechange", s), c.ready()) }); c.css = "defaultView" in document && "getComputedStyle" in document.defaultView ? function (b, c) { return document.defaultView.getComputedStyle(b, !1)[c] } : function (b, d) { return ("opacity" === d ? c.opacity.get(b) : b.currentStyle[d]) || "" }; c.opacity = { get: function (b) { return l ? document.defaultView.getComputedStyle(b, !1).opacity : z.test((b.currentStyle ? b.currentStyle.filter : b.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : 1 }, set: function (b, c) { if (l) return b.style.opacity = c; var e = b.style; e.zoom = 1; var a = "alpha(opacity=" + 100 * c + ")", f = e.filter || ""; e.filter = q.test(f) ? f.replace(q, a) : e.filter + " " + a } }; c.each(["Left", "Top"], function (b, d) { var e = "scroll" + d; c.fn[e] = function () { var a = this[0], f; return (f = c.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1) ? "pageXOffset" in f ? f[b ? "pageYOffset" : "pageXOffset"] : f.document.documentElement[e] || f.document.body[e] : a[e] } }); c.each(["Height", "Width"], function (b, d) { var e = d.toLowerCase(); c.fn[e] = function (a) { var f = this[0]; return !f ? null == a ? null : this : c.isWindow(f) ? f.document.documentElement["client" + d] || f.document.body["client" + d] : 9 === f.nodeType ? Math.max(f.documentElement["client" + d], f.body["scroll" + d], f.documentElement["scroll" + d], f.body["offset" + d], f.documentElement["offset" + d]) : null } }); c.ajax = function (b) { var d = g.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), e = b.url; if (!1 === b.cache) var a = +new Date, f = e.replace(/([?&])_=[^&]*/, "$1_=" + a), e = f + (f === e ? (/\?/.test(e) ? "&" : "?") + "_=" + a : ""); d.onreadystatechange = function () { if (4 === d.readyState && 200 === d.status) b.success && b.success(d.responseText), d.onreadystatechange = c.noop }; d.open("GET", e, 1); d.send(null) }; c.fn.animate = function (b, d, e, a) { "function" === typeof e && (a = e); var e = e && c.easing[e] ? e : "swing", f = this[0], k, w, y, i, j, u, o = { speed: d || 400, easing: e, callback: function () { if (null != k) f.style.overflow = ""; a && a() }, curAnim: {} }; c.each(b, function (a, f) { o.curAnim[a] = f }); c.each(b, function (a, b) { w = new c.fx(f, o, a); y = x.exec(b); i = parseFloat("opacity" === a || f.style && null != f.style[a] ? c.css(f, a) : f[a]); j = parseFloat(y[2]); u = y[3]; if ("height" === a || "width" === a) j = Math.max(0, j), k = [f.style.overflow, f.style.overflowX, f.style.overflowY]; w.custom(i, j, u) }); if (null != k) f.style.overflow = "hidden"; return this }; c.timers = []; c.fx = function (b, c, e) { this.elem = b; this.options = c; this.prop = e }; c.fx.prototype = { custom: function (b, d, e) { function a() { return f.step() }; var f = this; f.startTime = c.fx.now(); f.start = b; f.end = d; f.unit = e; f.now = f.start; f.state = f.pos = 0; a.elem = f.elem; a(); c.timers.push(a); if (!c.timerId) c.timerId = setInterval(c.fx.tick, 13) }, step: function () { var b = c.fx.now(), d = !0; if (b >= this.options.speed + this.startTime) { this.now = this.end; this.state = this.pos = 1; this.update(); this.options.curAnim[this.prop] = !0; for (var e in this.options.curAnim) !0 !== this.options.curAnim[e] && (d = !1); d && this.options.callback.call(this.elem); return !1 }; b -= this.startTime; this.state = b / this.options.speed; this.pos = c.easing[this.options.easing](this.state, b, 0, 1, this.options.speed); this.now = this.start + (this.end - this.start) * this.pos; this.update(); return !0 }, update: function () { "opacity" === this.prop ? c.opacity.set(this.elem, this.now) : this.elem.style && null != this.elem.style[this.prop] ? this.elem.style[this.prop] = this.now + this.unit : this.elem[this.prop] = this.now } }; c.fx.now = function () { return +new Date }; c.easing = { linear: function (b, c, e, a) { return e + a * b }, swing: function (b, c, e, a) { return (-Math.cos(b * Math.PI) / 2 + 0.5) * a + e } }; c.fx.tick = function () { for (var b = c.timers, d = 0; d < b.length; d++) !b[d]() && b.splice(d--, 1); !b.length && c.fx.stop() }; c.fx.stop = function () { clearInterval(c.timerId); c.timerId = null }; c.fn.stop = function () { for (var b = c.timers, d = b.length - 1; 0 <= d; d--) b[d].elem === this[0] && b.splice(d, 1); return this }; return c })(window); (function (g, h, n) { g.noop = g.noop || function () { }; var p, c, v, r, s = 0, l = g(h), t = g(document), m = g("html"); v = document.documentElement; var q = h.VBArray && !h.XMLHttpRequest, z = "createTouch" in document && !("onmousemove" in v) || /(iPhone|iPad|iPod)/i.test(navigator.userAgent), x = "artDialog" + +new Date, b = function (a, f, c) { a = a || {}; if ("string" === typeof a || 1 === a.nodeType) a = { content: a, fixed: !z }; var d; d = b.defaults; var e = a.follow = 1 === this.nodeType && this || a.follow, i; for (i in d) a[i] === n && (a[i] = d[i]); g.each({ ok: "yesFn", cancel: "noFn", close: "closeFn", init: "initFn", okVal: "yesText", cancelVal: "noText" }, function (f, b) { a[f] = a[f] !== n ? a[f] : a[b] }); "string" === typeof e && (e = g(e)[0]); a.id = e && e[x + "follow"] || a.id || x + s; d = b.list[a.id]; if (e && d) return d.follow(e).zIndex().focus(); if (d) return d.zIndex().focus(); if (z) a.fixed = !1; if (!g.isArray(a.button)) a.button = a.button ? [a.button] : []; if (f !== n) a.ok = f; if (c !== n) a.cancel = c; a.ok && a.button.push({ name: a.okVal, callback: a.ok, focus: !0 }); a.cancel && a.button.push({ name: a.cancelVal, callback: a.cancel }); b.defaults.zIndex = a.zIndex; s++; return b.list[a.id] = p ? p._init(a) : new b.fn._init(a) }; b.fn = b.prototype = { version: "4.1.6", closed: !0, _init: function (a) { var _iconPath = 'http://s.hqbcdn.com/lib/dialog'; var f, b = a.icon, c = b && (q ? { png: "icons/" + b + ".png"} : { backgroundImage: "url('" + _iconPath + "/skins/icons/" + b + ".png')" }); this.closed = !1; this.config = a; this.DOM = f = this.DOM || this._getDOM(); f.wrap.addClass(a.skin); f.close[!1 === a.cancel ? "hide" : "show"](); f.icon[0].style.display = b ? "" : "none"; f.iconBg.css(c || { background: "none" }); f.se.css("cursor", a.resize ? "se-resize" : "auto"); f.title.css("cursor", a.drag ? "move" : "auto"); f.content.css("padding", a.padding); this[a.show ? "show" : "hide"](!0); this.button(a.button).title(a.title).content(a.content, !0).size(a.width, a.height).time(a.time); a.follow ? this.follow(a.follow) : this.position(a.left, a.top); this.zIndex().focus(); a.lock && this.lock(); this._addEvent(); this._ie6PngFix(); p = null; a.init && a.init.call(this, h); return this }, content: function (a, b) { var c, d, e, i, j = this, u = j.DOM, o = u.wrap[0], g = o.offsetWidth, t = o.offsetHeight, h = parseInt(o.style.left), q = parseInt(o.style.top), m = o.style.width, u = u.content, l = u[0]; j._elemBack && j._elemBack(); o.style.width = "auto"; if (a === n) return l; if ("string" === typeof a) u.html(a); else if (a && 1 === a.nodeType) i = a.style.display, c = a.previousSibling, d = a.nextSibling, e = a.parentNode, j._elemBack = function () { c && c.parentNode ? c.parentNode.insertBefore(a, c.nextSibling) : d && d.parentNode ? d.parentNode.insertBefore(a, d) : e && e.appendChild(a); a.style.display = i; j._elemBack = null }, u.html(""), l.appendChild(a), a.style.display = "block"; if (!b) { j.config.follow ? j.follow(j.config.follow) : (g = o.offsetWidth - g, t = o.offsetHeight - t, q -= t / 2, o.style.left = Math.max(h - g / 2, 0) + "px", o.style.top = Math.max(q, 0) + "px"); if (m && "auto" !== m) o.style.width = o.offsetWidth + "px"; j._autoPositionType() }; j._ie6SelectFix(); j._runScript(l); return j }, title: function (a) { var b = this.DOM, c = b.wrap, b = b.title; if (a === n) return b[0]; !1 === a ? (b.hide().html(""), c.addClass("aui_state_noTitle")) : (b.show().html(a || ""), c.removeClass("aui_state_noTitle")); return this }, position: function (a, b) { var c = this.config, d = this.DOM.wrap[0], e = q ? !1 : c.fixed, c = q && this.config.fixed, i = t.scrollLeft(), j = t.scrollTop(), g = e ? 0 : i, e = e ? 0 : j, o = l.width(), h = l.height(), m = d.offsetWidth, p = d.offsetHeight, d = d.style; if (a || 0 === a) if (this._left = -1 !== a.toString().indexOf("%") ? a : null, a = this._toNumber(a, o - m), "number" === typeof a) a = c ? a += i : a + g, d.left = Math.max(a, g) + "px"; else if ("string" === typeof a) d.left = a; if (b || 0 === b) if (this._top = -1 !== b.toString().indexOf("%") ? b : null, b = this._toNumber(b, h - p), "number" === typeof b) b = c ? b += j : b + e, d.top = Math.max(b, e) + "px"; else if ("string" === typeof b) d.top = b; if (a !== n && b !== n) this._follow = null, this._autoPositionType(); return this }, size: function (a, b) { var c, d, e = this.DOM; d = e.wrap; var i = e.main, g = d[0].style, e = i[0].style; if (a) if (this._width = -1 !== a.toString().indexOf("%") ? a : null, c = l.width() - d[0].offsetWidth + i[0].offsetWidth, a = c = this._toNumber(a, c), "number" === typeof a) g.width = "auto", e.width = Math.max(this.config.minWidth, a) + "px", g.width = d[0].offsetWidth + "px"; else if ("string" === typeof a) e.width = a, "auto" === a && d.css("width", "auto"); if (b) if (this._height = -1 !== b.toString().indexOf("%") ? b : null, d = l.height() - d[0].offsetHeight + i[0].offsetHeight, b = d = this._toNumber(b, d), "number" === typeof b) e.height = Math.max(this.config.minHeight, b) + "px"; else if ("string" === typeof b) e.height = b; this._ie6SelectFix(); return this }, follow: function (a) { var b, c = this.config; if ("string" === typeof a || a && 1 === a.nodeType) b = g(a), a = b[0]; if (!a || !a.offsetWidth && !a.offsetHeight) return this.position(this._left, this._top); var d = x + "follow", e = l.width(), i = l.height(), j = t.scrollLeft(), u = t.scrollTop(), o = b.offset(); b = a.offsetWidth; var h = q ? !1 : c.fixed, m = h ? o.left - j : o.left, o = h ? o.top - u : o.top, n = this.DOM.wrap[0], p = n.style, r = n.offsetWidth, n = n.offsetHeight, s = m - (r - b) / 2, z = o + a.offsetHeight, j = h ? 0 : j, u = h ? 0 : u; p.left = (s < j ? m : s + r > e && m - r > j ? m - r + b : s) + "px"; p.top = (z + n > i + u && o - n > u ? o - n : z) + "px"; this._follow && this._follow.removeAttribute(d); this._follow = a; a[d] = c.id; this._autoPositionType(); return this }, button: function () { var a = this, b = arguments, c = a.DOM.buttons, d = c[0], e = a._listeners = a._listeners || {}, i = g.isArray(b[0]) ? b[0] : [].slice.call(b); if (b[0] === n) return d; g.each(i, function (b, c) { var f = c.name, k = !e[f], i = !k ? e[f].elem : document.createElement("button"); e[f] || (e[f] = {}); if (c.callback) e[f].callback = c.callback; if (c.className) i.className = c.className; if (c.focus) a._focus && a._focus.removeClass("aui_state_highlight"), a._focus = g(i).addClass("aui_state_highlight"), a.focus(); i.setAttribute("type", "button"); i[x + "callback"] = f; i.disabled = !!c.disabled; if (k) i.innerHTML = f, e[f].elem = i, d.appendChild(i) }); c[0].style.display = i.length ? "" : "none"; a._ie6SelectFix(); return a }, show: function (a) { this.DOM.wrap.show(); !a && this._lockMaskWrap && this._lockMaskWrap.show(); return this }, hide: function (a) { this.DOM.wrap.hide(); !a && this._lockMaskWrap && this._lockMaskWrap.hide(); return this }, close: function () { if (this.closed) return this; var a = this.DOM, c = a.wrap, d = b.list, e = this.config.close, g = this.config.follow; this.time(); if ("function" === typeof e && !1 === e.call(this, h)) return this; this.unlock(); this._elemBack && this._elemBack(); c[0].className = c[0].style.cssText = ""; a.title.html(""); a.content.html(""); a.buttons.html(""); if (b.focus === this) b.focus = null; g && g.removeAttribute(x + "follow"); delete d[this.config.id]; this._removeEvent(); this.hide(!0)._setAbsolute(); for (var i in this) this.hasOwnProperty(i) && "DOM" !== i && delete this[i]; p ? c.remove() : p = this; return this }, time: function (a) { var b = this, c = b.config.cancelVal, d = b._timer; d && clearTimeout(d); if (a) b._timer = setTimeout(function () { b._click(c) }, 1E3 * a); return b }, focus: function () { try { var a = this._focus && this._focus[0] || this.DOM.close[0]; a && a.focus() } catch (b) { } return this }, zIndex: function () { var a = this.DOM.wrap, c = b.focus, d = b.defaults.zIndex++; a.css("zIndex", d); this._lockMask && this._lockMask.css("zIndex", d - 1); c && c.DOM.wrap.removeClass("aui_state_focus"); b.focus = this; a.addClass("aui_state_focus"); return this }, lock: function () { if (this._lock) return this; var a = this, c = b.defaults.zIndex - 1, d = a.DOM.wrap, e = a.config, h = t.width(), i = t.height(), j = a._lockMaskWrap || g(document.body.appendChild(document.createElement("div"))), m = a._lockMask || g(j[0].appendChild(document.createElement("div"))), h = z ? "width:" + h + "px;height:" + i + "px" : "width:100%;height:100%", i = q ? "position:absolute;left:expression((document).documentElement.scrollLeft);top:expression((document).documentElement.scrollTop);width:expression((document).documentElement.clientWidth);height:expression((document).documentElement.clientHeight)" : ""; a.zIndex(); d.addClass("aui_state_lock"); j[0].style.cssText = h + ";position:fixed;z-index:" + c + ";top:0;left:0;overflow:hidden;" + i; m[0].style.cssText = "height:100%;background:" + e.background + ";filter:alpha(opacity=0);opacity:0"; q && m.html('<iframe src="about:blank" style="width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;filter:alpha(opacity=0)"></iframe>'); m.stop(); m.bind("click", function () { return false; }).bind("dblclick", function () { a._click(a.config.cancelVal) }); 0 === e.duration ? m.css({ opacity: e.opacity }) : m.animate({ opacity: e.opacity }, e.duration); a._lockMaskWrap = j; a._lockMask = m; a._lock = !0; return a }, unlock: function () { var a = this._lockMaskWrap, b = this._lockMask; if (!this._lock) return this; var c = a[0].style, d = function () { q && (c.removeExpression("width"), c.removeExpression("height"), c.removeExpression("left"), c.removeExpression("top")); c.cssText = "display:none"; p && a.remove() }; b.stop().unbind(); this.DOM.wrap.removeClass("aui_state_lock"); this.config.duration ? b.animate({ opacity: 0 }, this.config.duration, d) : d(); this._lock = !1; return this }, _getDOM: function () { var a = document.createElement("div"), c = document.body; a.style.cssText = "position:absolute;left:0;top:0"; a.innerHTML = b._templates; c.insertBefore(a, c.firstChild); for (var c = 0, d = { wrap: g(a) }, e = a.getElementsByTagName("*"), h = e.length; c < h; c++) (a = e[c].className.split("aui_")[1]) && (d[a] = g(e[c])); return d }, _toNumber: function (a, b) { if (!a && 0 !== a || "number" === typeof a) return a; var c = a.length - 1; a.lastIndexOf("px") === c ? a = parseInt(a) : a.lastIndexOf("%") === c && (a = parseInt(b * a.split("%")[0] / 100)); return a }, _ie6PngFix: q ? function () { for (var a = 0, c, d, e = 'http://s.hqbcdn.com/lib/dialog/skins/', g = this.DOM.wrap[0].getElementsByTagName("*"); a < g.length; a++) if (c = g[a], d = c.currentStyle.png) d = e + d, c = c.runtimeStyle, c.backgroundImage = "none", c.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + d + "',sizingMethod='crop')" } : g.noop, _ie6SelectFix: q ? function () { var a = this.DOM.wrap, b = a[0], c = x + "iframeMask", d = a[c], e = b.offsetWidth, i = b.offsetHeight, e = e + "px", i = i + "px"; d ? (d.style.width = e, d.style.height = i) : (d = b.appendChild(document.createElement("iframe")), a[c] = d, d.src = "about:blank", d.style.cssText = "position:absolute;z-index:-1;left:0;top:0;filter:alpha(opacity=0);width:" + e + ";height:" + i) } : g.noop, _runScript: function (a) { for (var b, c = b = 0, a = a.getElementsByTagName("script"), d = a.length, e = []; b < d; b++) if ("text/dialog" === a[b].type) e[c] = a[b].innerHTML, c++; e.length && (e = e.join(""), b = new Function(e), b.call(this)) }, _autoPositionType: function () { this[this.config.fixed ? "_setFixed" : "_setAbsolute"]() }, _setFixed: function () { q && g(function () { "fixed" !== m.css("backgroundAttachment") && "fixed" !== g("body").css("backgroundAttachment") && m.css({ zoom: 1, backgroundImage: "url(about:blank)", backgroundAttachment: "fixed" }) }); return function () { var a = this.DOM.wrap, b = a[0].style; if (q) { var c = parseInt(a.css("left")), a = parseInt(a.css("top")), d = t.scrollLeft(), e = t.scrollTop(); this._setAbsolute(); b.setExpression("left", "eval((document.documentElement).scrollLeft + " + (c - d) + ') + "px"'); b.setExpression("top", "eval((document.documentElement).scrollTop + " + (a - e) + ') + "px"') } else b.position = "fixed" } } (), _setAbsolute: function () { var a = this.DOM.wrap[0].style; q && (a.removeExpression("left"), a.removeExpression("top")); a.position = "absolute" }, _click: function (a) { a = this._listeners[a] && this._listeners[a].callback; return "function" !== typeof a || !1 !== a.call(this, h) ? this.close() : this }, _reset: function (a) { var b = this._winSize || l.width() * l.height(), c = this._follow, d = this._width, e = this._height, i = this._left, g = this._top; if (a && (a = this._winSize = l.width() * l.height(), b === a)) return; (d || e) && this.size(d, e); c ? this.follow(c) : (i || g) && this.position(i, g) }, _addEvent: function () { var a, b = this, c = b.config, d = "CollectGarbage" in h, e = b.DOM; b._winResize = function () { a && clearTimeout(a); a = setTimeout(function () { b._reset(d) }, 40) }; l.bind("resize", b._winResize); e.wrap.bind("click", function (a) { a = a.target; if (a.disabled) return !1; if (a === e.close[0]) return b._click(c.cancelVal), !1; (a = a[x + "callback"]) && b._click(a); b._ie6SelectFix() }).bind("mousedown", function () { b.zIndex() }) }, _removeEvent: function () { this.DOM.wrap.unbind(); l.unbind("resize", this._winResize) } }; b.fn._init.prototype = b.fn; g.fn.dialog = g.fn.artDialog = function () { var a = arguments; this[this.live ? "live" : "bind"]("click", function () { b.apply(this, a); return !1 }); return this }; b.focus = null; b.get = function (a) { return a === n ? b.list : b.list[a] }; b.list = {}; t.bind("keydown", function (a) { var c = a.target.nodeName, d = /^INPUT|TEXTAREA$/, e = b.focus, a = a.keyCode; e && e.config.esc && !d.test(c) && 27 === a && e._click(e.config.cancelVal) }); r = h._artDialog_path || function (a, b, d) { for (b in a) a[b].src && -1 !== a[b].src.indexOf("artDialog") && (d = a[b]); c = d || a[a.length - 1]; d = c.src.replace(/\\/g, "/"); return 0 > d.lastIndexOf("/") ? "." : d.substring(0, d.lastIndexOf("/")) } (document.getElementsByTagName("script")); if (v = c.src.split("skin=")[1]) { var d = document.createElement("link"); d.rel = "stylesheet"; d.href = r + "/skins/" + v + ".css?" + b.fn.version; c.parentNode.insertBefore(d, c) } l.bind("load", function () { setTimeout(function () { s || b({ left: "-9999em", time: 9, fixed: !1, lock: !1, focus: !1 }) }, 150) }); try { document.execCommand("BackgroundImageCache", !1, !0) } catch (e) { } b._templates = '<div class="aui_outer"><table class="aui_border"><tbody><tr><td class="aui_nw"></td><td class="aui_n"></td><td class="aui_ne"></td></tr><tr><td class="aui_w"></td><td class="aui_c"><div class="aui_inner"><table class="aui_dialog"><tbody><tr><td colspan="2" class="aui_header"><div class="aui_titleBar"><div class="aui_title"></div><a class="aui_close" href="javascript:/*artDialog*/;">\u00d7</a></div></td></tr><tr><td class="aui_icon"><div class="aui_iconBg"></div></td><td class="aui_main"><div class="aui_content"></div></td></tr><tr><td colspan="2" class="aui_footer"><div class="aui_buttons"></div></td></tr></tbody></table></div></td><td class="aui_e"></td></tr><tr><td class="aui_sw"></td><td class="aui_s"></td><td class="aui_se"></td></tr></tbody></table></div>'; b.defaults = { content: '<div class="aui_loading"><span>loading..</span></div>', title: "\u6d88\u606f", button: null, ok: null, cancel: null, init: null, close: null, okVal: "\u786e\u5b9a", cancelVal: "\u53d6\u6d88", width: "auto", height: "auto", minWidth: 96, minHeight: 32, skin: "", icon: null, time: null, esc: !0, focus: !0, show: !0, follow: null, path: r, lock: !1, background: "#000", opacity: 0.6, duration: 300, fixed: !1, left: "50%", top: "38.2%", zIndex: 1987, resize: !0, drag: !0 }; h.artDialog = g.dialog = g.artDialog = b })(this.art || this.jQuery && (this.art = jQuery), this); (function (g) { var h, n, p = g(window), c = g(document), v = document.documentElement, r = !("minWidth" in v.style), s = "onlosecapture" in v, l = "setCapture" in v; artDialog.dragEvent = function () { var c = this, g = function (g) { var h = c[g]; c[g] = function () { return h.apply(c, arguments) } }; g("start"); g("move"); g("end") }; artDialog.dragEvent.prototype = { onstart: g.noop, start: function (g) { c.bind("mousemove", this.move).bind("mouseup", this.end); this._sClientX = g.clientX; this._sClientY = g.clientY; this.onstart(g.clientX, g.clientY); return !1 }, onmove: g.noop, move: function (c) { this._mClientX = c.clientX; this._mClientY = c.clientY; this.onmove(c.clientX - this._sClientX, c.clientY - this._sClientY); return !1 }, onend: g.noop, end: function (g) { c.unbind("mousemove", this.move).unbind("mouseup", this.end); this.onend(g.clientX, g.clientY); return !1 } }; n = function (g) { var m, q, n, x, b, d, e = artDialog.focus, a = e.DOM, f = a.wrap, k = a.title, w = a.main, v = "getSelection" in window ? function () { window.getSelection().removeAllRanges() } : function () { try { document.selection.empty() } catch (a) { } }; h.onstart = function () { d ? (q = w[0].offsetWidth, n = w[0].offsetHeight) : (x = f[0].offsetLeft, b = f[0].offsetTop); c.bind("dblclick", h.end); !r && s ? k.bind("losecapture", h.end) : p.bind("blur", h.end); l && k[0].setCapture(); f.addClass("aui_state_drag"); e.focus() }; h.onmove = function (a, c) { if (d) { var g = f[0].style, h = w[0].style, k = a + q, l = c + n; g.width = "auto"; h.width = Math.max(0, k) + "px"; g.width = f[0].offsetWidth + "px"; h.height = Math.max(0, l) + "px" } else h = f[0].style, g = Math.max(m.minX, Math.min(m.maxX, a + x)), k = Math.max(m.minY, Math.min(m.maxY, c + b)), h.left = g + "px", h.top = k + "px"; v(); e._ie6SelectFix() }; h.onend = function () { c.unbind("dblclick", h.end); !r && s ? k.unbind("losecapture", h.end) : p.unbind("blur", h.end); l && k[0].releaseCapture(); r && !e.closed && e._autoPositionType(); f.removeClass("aui_state_drag") }; d = g.target === a.se[0] ? !0 : !1; m = function () { var a = e.DOM.wrap[0], b = "fixed" === a.style.position, d = a.offsetWidth, a = a.offsetHeight, f = p.width(), g = p.height(), h = b ? 0 : c.scrollLeft(), b = b ? 0 : c.scrollTop(); return { minX: h, minY: b, maxX: f - d + h, maxY: g - a + b} } (); h.start(g) }; c.bind("mousedown", function (c) { var g = artDialog.focus; if (g) { var l = c.target, p = g.config, g = g.DOM; if (!1 !== p.drag && l === g.title[0] || !1 !== p.resize && l === g.se[0]) return h = h || new artDialog.dragEvent, n(c), !1 } }) })(this.art || this.jQuery && (this.art = jQuery));
(function (config) { config['lock'] = true; config['drag'] = false; })(art.dialog.defaults); /*
* Slides, A Slideshow Plugin for jQuery
* Intructions: http://slidesjs.com
* By: Nathan Searles, http://nathansearles.com
* Version: 1.2.0
* Updated: February 5th, 2013
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function (a) { a.fn.slides = function (b) { return b = a.extend({}, a.fn.slides.option, b), this.each(function () { function w(g, h, i) { if (!p && o) { switch (p = !0, b.animationStart(n + 1), g) { case "next": l = n, k = n + 1, k = e === k ? 0 : k, r = 2 * f, g = 2 * -f, n = k; break; case "prev": l = n, k = n - 1, k = -1 === k ? e - 1 : k, r = 0, g = 0, n = k; break; case "pagination": k = parseInt(i, 10), l = a("." + b.paginationClass + " li." + b.currentClass + " a", c).attr("href").match("[^#/]+$"), k > l ? (r = 2 * f, g = 2 * -f) : (r = 0, g = 0), n = k } "fade" === h ? b.crossfade ? d.children(":eq(" + k + ")", c).css({ zIndex: 10 }).fadeIn(b.fadeSpeed, b.fadeEasing, function () { b.autoHeight ? d.animate({ height: d.children(":eq(" + k + ")", c).outerHeight() }, b.autoHeightSpeed, function () { d.children(":eq(" + l + ")", c).css({ display: "none", zIndex: 0 }), d.children(":eq(" + k + ")", c).css({ zIndex: 0 }), b.animationComplete(k + 1), p = !1 }) : (d.children(":eq(" + l + ")", c).css({ display: "none", zIndex: 0 }), d.children(":eq(" + k + ")", c).css({ zIndex: 0 }), b.animationComplete(k + 1), p = !1) }) : d.children(":eq(" + l + ")", c).fadeOut(b.fadeSpeed, b.fadeEasing, function () { b.autoHeight ? d.animate({ height: d.children(":eq(" + k + ")", c).outerHeight() }, b.autoHeightSpeed, function () { d.children(":eq(" + k + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing) }) : d.children(":eq(" + k + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing, function () { }), b.animationComplete(k + 1), p = !1 }) : (d.children(":eq(" + k + ")").css({ left: r, display: "block" }), b.autoHeight ? d.animate({ left: g, height: d.children(":eq(" + k + ")").outerHeight() }, b.slideSpeed, b.slideEasing, function () { d.css({ left: -f }), d.children(":eq(" + k + ")").css({ left: f, zIndex: 5 }), d.children(":eq(" + l + ")").css({ left: f, display: "none", zIndex: 0 }), b.animationComplete(k + 1), p = !1 }) : d.animate({ left: g }, b.slideSpeed, b.slideEasing, function () { d.css({ left: -f }), d.children(":eq(" + k + ")").css({ left: f, zIndex: 5 }), d.children(":eq(" + l + ")").css({ left: f, display: "none", zIndex: 0 }), b.animationComplete(k + 1), p = !1 })), b.pagination && (a("." + b.paginationClass + " li." + b.currentClass, c).removeClass(b.currentClass), a("." + b.paginationClass + " li:eq(" + k + ")", c).addClass(b.currentClass)) } } function x() { clearInterval(c.data("interval")) } function y() { b.pause ? (clearTimeout(c.data("pause")), clearInterval(c.data("interval")), u = setTimeout(function () { clearTimeout(c.data("pause")), v = setInterval(function () { w("next", i) }, b.play), c.data("interval", v) }, b.pause), c.data("pause", u)) : x() } a("." + b.container, a(this)).children().wrapAll('<div class="slides_control"/>'); var o, p, q, r, t, u, v, c = a(this), d = a(".slides_control", c), e = d.children().size(), f = d.children().outerWidth(), g = d.children().outerHeight(), h = b.start - 1, i = 0 > b.effect.indexOf(",") ? b.effect : b.effect.replace(" ", "").split(",")[0], j = 0 > b.effect.indexOf(",") ? i : b.effect.replace(" ", "").split(",")[1], k = 0, l = 0, m = 0, n = 0; if (2 > e) return a("." + b.container, a(this)).fadeIn(b.fadeSpeed, b.fadeEasing, function () { o = !0, b.slidesLoaded() }), a("." + b.next + ", ." + b.prev).fadeOut(0), !1; if (!(2 > e)) { if (0 > h && (h = 0), h > e && (h = e - 1), b.start && (n = h), b.randomize && d.randomize(), a("." + b.container, c).css({ overflow: "hidden", position: "relative" }), d.children().css({ position: "absolute", top: 0, left: d.children().outerWidth(), zIndex: 0, display: "none" }), d.css({ position: "relative", width: 3 * f, height: g, left: -f }), a("." + b.container, c).css({ display: "block" }), b.autoHeight && (d.children().css({ height: "auto" }), d.animate({ height: d.children(":eq(" + h + ")").outerHeight() }, b.autoHeightSpeed)), b.preload && d.find("img:eq(" + h + ")").length) { a("." + b.container, c).css({ background: "url(" + b.preloadImage + ") no-repeat 50% 50%" }); var z = d.find("img:eq(" + h + ")").attr("src") + "?" + (new Date).getTime(); t = "slides_control" != a("img", c).parent().attr("class") ? d.children(":eq(0)")[0].tagName.toLowerCase() : d.find("img:eq(" + h + ")"), d.find("img:eq(" + h + ")").attr("src", z).load(function () { d.find(t + ":eq(" + h + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function () { a(this).css({ zIndex: 5 }), a("." + b.container, c).css({ background: "" }), o = !0, b.slidesLoaded() }) }) } else d.children(":eq(" + h + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function () { o = !0, b.slidesLoaded() }); b.bigTarget && (d.children().css({ cursor: "pointer" }), d.children().on("click", function () { return w("next", i), !1 })), b.hoverPause && b.play && (d.bind("mouseover", function () { x() }), d.bind("mouseleave", function () { y() })), b.generateNextPrev && (a("." + b.container, c).after('<a href="#" class="' + b.prev + '">Prev</a>'), a("." + b.prev, c).after('<a href="#" class="' + b.next + '">Next</a>')), a("." + b.next, c).on("click", function (a) { a.preventDefault(), b.play && y(), w("next", i) }), a("." + b.prev, c).on("click", function (a) { a.preventDefault(), b.play && y(), w("prev", i) }), b.generatePagination ? (b.prependPagination ? c.prepend("<ul class=" + b.paginationClass + "></ul>") : c.append("<ul class=" + b.paginationClass + "></ul>"), d.children().each(function () { a("." + b.paginationClass, c).append('<li><a href="#' + m + '">' + (m + 1) + "</a></li>"), m++ })) : a("." + b.paginationClass + " li a", c).each(function () { a(this).attr("href", "#" + m), m++ }), a("." + b.paginationClass + " li:eq(" + h + ")", c).addClass(b.currentClass), a("." + b.paginationClass + " li a", c).on("click", function () { return b.play && y(), q = a(this).attr("href").match("[^#/]+$"), n != q && w("pagination", j, q), !1 }), a("a.link", c).on("click", function () { return b.play && y(), q = a(this).attr("href").match("[^#/]+$") - 1, n != q && w("pagination", j, q), !1 }), b.play && (v = setInterval(function () { w("next", i) }, b.play), c.data("interval", v)) } }) }, a.fn.slides.option = { preload: !1, preloadImage: "/img/loading.gif", container: "slides_container", generateNextPrev: !1, next: "next", prev: "prev", pagination: !0, generatePagination: !0, prependPagination: !1, paginationClass: "pagination", currentClass: "current", fadeSpeed: 350, fadeEasing: "", slideSpeed: 350, slideEasing: "", start: 1, effect: "slide", crossfade: !1, randomize: !1, play: 0, pause: 0, hoverPause: !1, autoHeight: !1, autoHeightSpeed: 350, bigTarget: !1, animationStart: function () { }, animationComplete: function () { }, slidesLoaded: function () { } }, a.fn.randomize = function (b) { function c() { return Math.round(Math.random()) - .5 } return a(this).each(function () { var d = a(this), e = d.children(), f = e.length; if (f > 1) { e.hide(); var g = []; for (i = 0; f > i; i++) g[g.length] = i; g = g.sort(c), a.each(g, function (a, c) { var f = e.eq(c), g = f.clone(!0); g.show().appendTo(d), void 0 !== b && b(f, g), f.remove() }) } }) } })(jQuery);
/*!
* OKHQB member sign login dialog
* require [ jquery.js, jquery.cookie.js, artDialog.js ]
*/
(function (a) { var b = { init: function () { this.event_handler(); this.load_style("http://s1.hqbcdn.com/", "lib/OKHQB/sign/sign.css") }, load_style: function (d, f) { try { var g = document.getElementsByTagName("head").item(0), h; h = document.createElement("link"); h.setAttribute("rel", "stylesheet"); h.setAttribute("type", "text/css"); h.setAttribute("href", d + f); g.appendChild(h) } catch (c) { } }, event_handler: function () { $("#OKHQB-sign .tit-tabs ul li").live("click", function () { var e = $(this); e.siblings("li").removeClass("active"); e.addClass("active"); $(".tg-box", "#OKHQB-sign").hide(); $("." + e.attr("tg")).show() }); $("label.label-placeholder", ".sign-in-form-item").live("click", function () { $(this).siblings("input").trigger("focus") }); $("input.s-item-input", ".sign-in-form-item").live("focus", function () { var e = $(this); e.removeClass("error").addClass("focus"); if (!$.trim(e.val())) { e.siblings("label").hide() } }).live("blur", function () { var e = $(this); e.removeClass("error").removeClass("focus"); if (!$.trim(e.val())) { e.siblings("label").show() } }); $("input.m-item-input", ".mob-sign-up-form-item").live("focus", function () { var e = $(this); e.removeClass("error").addClass("focus"); if (!$.trim(e.val())) { e.siblings(".label-placeholder").hide() } }); $('input[name="mob-sign-up-number"]').live("blur", function () { var g = $(this), h = $.trim(g.val()), f = /^1[3|4|5|7|8]\d{9}$/, e = /^\w+((\-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|\-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$/; if (!h) { g.removeClass("focus").removeClass("error"); g.siblings(".label-placeholder").show() } else { if (h && !f.test(h)) { g.removeClass("focus").addClass("error"); g.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span><span class="message">手机号码格式不正确</span>').show(); $("input.getMoblieCaptcha", ".mob-sign-up-form-item").data("disabled", true) } else { g.removeClass("focus").removeClass("error"); g.siblings(".i-tips").html('<span class="tips_icon_type tips_succ"></span><span class="message">填写正确</span>').show(); $("input.getMoblieCaptcha", ".mob-sign-up-form-item").data("disabled", false) } } }); $('input[name="mob-sign-up-moblieCaptcha"]').live("blur", function () { var h = $(this), g = h.siblings(".i-tips"), f = $.trim(h.val()), e = /^\d{6}$/i; if (!f) { h.removeClass("focus").removeClass("error"); h.siblings(".label-placeholder").show() } else { if (!e.test(f)) { h.removeClass("focus").addClass("error"); g.html('<span class="tips_icon_type tips_error"></span><span class="message">验证码错误,请重新输入</span>').show() } else { function i(j) { var k = $.trim($('input[name="mob-sign-up-number"]').val()); g.html("正在验证..."); $.ajax({ url: "http://login.okhqb.com/member/checkRegisterMobileCaptcha.json", dataType: "jsonp", jsonp: "callback", data: { mobile: k, mobileCaptcha: f }, success: function (l) { if (l.code == "200") { g.html('<span class="tips_icon_type tips_succ"></span><span class="message">填写正确</span>').show(); j.removeClass("error") } else { j.addClass("error"); g.html('<span class="tips_icon_type tips_error"></span><span class="message">' + l.msg + "</span>").show() } } }) } i(h) } } }); $('input[name="mob-sign-up-passwd"]').live("blur", function () { var f = $(this), e = $.trim(f.val()); cfpdValue = $.trim($('input[name="conf-mob-sign-up-passwd"]').val()); f.siblings(".passwd-strength").html("").hide(); if (!e) { f.removeClass("focus").removeClass("error"); f.siblings(".label-placeholder").show() } else { if (e.length < 6) { f.removeClass("focus").addClass("error"); f.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span> <span class="message">密码长度不能小于6位</span>').show() } else { f.removeClass("focus").removeClass("error"); f.siblings(".i-tips").html("").hide(); c(e) } } if (cfpdValue && e != cfpdValue) { var i = $('input[name="conf-mob-sign-up-passwd"]'); i.removeClass("focus").addClass("error"); i.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span> <span class="message">密码填写不一致</span>').show() } else { if (cfpdValue && e == cfpdValue) { var i = $('input[name="conf-mob-sign-up-passwd"]'); i.removeClass("focus").removeClass("error"); i.siblings(".i-tips").html('<span class="tips_icon_type tips_succ"></span> <span class="message">填写正确</span>').show() } } }); $('input[name="captchaCode"]').live("blur", function () { var g = $(this), e = $.trim(g.val()); if (!e) { g.removeClass("focus").removeClass("error"); g.siblings(".label-placeholder").show() } }); $('input[name="captchaCode"]').live("keyup", function () { var g = $(this), e = $.trim(g.val()); if (e.length >= 4) { $.ajax({ type: "get", url: "http://canvas.okhqb.com/captcha/checkCaptcha.json?captcha=" + e, dataType: "jsonp", success: function (f) { if (f.code == 200) { g.removeClass("focus").removeClass("error"); g.siblings(".i-tips").html('<span class="tips_icon_type tips_succ"></span><span class="message">验证成功</span>').show() } else { g.removeClass("focus").addClass("error"); g.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span><span class="message">' + f.msg + "</span>").show() } }, error: function (f) { g.removeClass("focus").addClass("error"); g.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span><span class="message">' + f.msg + "</span>").show() } }) } }); $("button.blue-botton").live("mouseenter", function () { $(this).addClass("blue-botton-hover") }).live("mouseleave", function () { $(this).removeClass("blue-botton-hover") }); $("input.getMoblieCaptcha", ".mob-sign-up-form-item").live("click", function () { var g = $(this), h = $('input[name="mob-sign-up-number"]'), f = g.siblings(".i-tips-moblieCaptcha"), e = $.trim(h.val()); if (g.data("disabled")) { return } if (!e) { h.addClass("error"); h.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span><span class="message">请输入手机号码</span>').show(); return } g.data("disabled", true); f.html("正在获取...").show(); $.ajax({ url: "http://login.okhqb.com/member/simpleSendMobileCaptcha.json?mobile=" + e, dataType: "jsonp", success: function (i) { if (i.code === 200) { f.html("验证码已发送").show(); d(60, g, function () { f.html("").hide() }) } else { if (i.code === 12507) { f.html("").hide(); h.siblings(".i-tips").html('<span class="tips_icon_type tips_error"></span><span class="message">该手机号已被注册,请点此<a href="javascript:$(\'.tab-login\').trigger(\'click\');">登录</a></span>').show() } else { if (i.code === 10784) { g.data("disabled", true); f.html("操作频繁,请稍等").show() } else { g.data("disabled", false) } } } } }) }); function d(f, e, g) { if (f > 0) { e.val(f + "秒后重新获取"); setTimeout(function () { d(--f, e) }, 1000) } else { e.data("disabled", false).val("获取短息验证码"); if ($.isFunction(g)) { g.call(e) } } } function c(e) { if (!e) { return } var f = $(".passwd-strength"); var i = 0, i = i + ((e.search(/[a-zA-Z]/) != -1) ? 1 : 0) + ((e.search(/[0-9]/) != -1) ? 1 : 0) + ((e.search(/[^A-Za-z0-9]/) != -1) ? 1 : 0); tips_txt = { l: "安全等级:低", m: "安全等级:中", h: "安全等级:高" }; if (i <= 1) { level = "l" } else { if (i == 2) { level = "m" } else { if (i == 3) { level = "h" } } } if (level) { f.html('<span class="passwd-strength-icon strength-' + level + '"> </span><span class="t">' + tips_txt[level] + "</span>").show() } } }, isSignIn: function () { try { return ($.cookie("auth")) == null ? false : true } catch (c) { return false } }, dialog: function (d) { var e = $.extend({ sign_in_callback: function () { }, sign_up_callback: function () { } }, d); var c = '<div id="OKHQB-sign"><div class="OKHQB-logo"></div><div class="tit-tabs"><ul><li class="tab-login active" tg="sign-in-form-item"><a href="javascript:;">会员登录</a></li><li class="tab-mobreg" tg="mob-sign-up-form-item"><a href="javascript:;">快速注册</a></li></ul></div><div class="form-box"><div class="sign-in-form-item tg-box"><div name="sign_in_tips" class="i-tips" style="display:none;"></div><div class="i-l-item pos-relative"><input name="sign-in-account" class="s-item-input" type="text" value=""><label class="label-placeholder">请输入您的昵称/邮箱/注册手机</label></div><div class="i-l-item pos-relative"><input name="sign-in-passwd" class="s-item-input" type="password" value=""><label class="label-placeholder">请输入您的密码</label></div><div class="i-l-item"><button name="sign-in-submit" class="blue-botton">登录</button> <span class="forgot-passwd"><a href="http://login.okhqb.com/member/memberForget.html" target="_blank">忘记密码?</a></span></div><ul class="cooperation-sign"><li><a href="javascript:OKHQB_sign.QQ_sign_in();" class="u-qq"><em></em>QQ账号登录</a></li><li><a href="javascript:OKHQB_sign.SinaWeibo_sign_in();" class="u-sina-weibo"><em></em>新浪微博登录</a></li><li><a href="javascript:OKHQB_sign.wechat_sign_in();" class="u-wechat"><em></em>微信登录</a></li></ul></div><ul class="mob-sign-up-form-item tg-box" style="display:none;"><li id="mob_sign_up_nm_tips" style="padding-bottom:5px; display:none;" class="i-tips"></li><li><input name="mob-sign-up-number" class="m-item-input" type="text" value=""><label class="label-placeholder" style="display: block;">手机</label><div class="i-tips" style="display:none;"></div></li><li><input name="mob-sign-up-moblieCaptcha" class="m-item-input" type="text" value="" maxlength="6" style="width:97px;"><input name="getMoblieCaptcha" type="button" class="getMoblieCaptcha" value="获取短息验证码" /><label class="label-placeholder" style="display: block;">手机验证码</label><span class="i-tips-moblieCaptcha"></span><div class="i-tips" style="display:none;"></div></li><li><input name="mob-sign-up-passwd" class="m-item-input" type="password" value="" maxlength="16"><label class="label-placeholder" style="display: block;">密码</label><div class="i-tips" style="display:none;"></div><div class="passwd-strength" style="display:none;"></div></li><li><input name="captchaCode" id="captchaCode" class="m-item-input" type="text" value="" style="width:86px;"><label class="label-placeholder" style="display: block;">验证码</label><img src="" alt="" id="captcha_img"><span>看不清?<a href="javascript:;" id="changeCaptcha">换一张</a></span> <div class="i-tips" style="display:none;"></div></li><li><label>我已阅读并同意</label><a href="http://www.baidu.com/help/index/1000000061_1000000145.html" target="_blank">《手机销售数码商城服务协议》</a> <button name="mob-sign-up-submit" class="blue-botton">立即注册</button></li></ul></div></div>'; art.dialog({ id: "HQB_Sign_dialog", title: false, padding: 0, content: c, close: function () { b.unload_submit_event() } }); $("#captcha_img").attr("src", "http://canvas.okhqb.com/captcha/captchaImage.html?s=" + Math.random()); $("#changeCaptcha,#captcha_img").live("click", function () { $("#captcha_img").attr("src", "http://canvas.okhqb.com/captcha/captchaImage.html?s=" + Math.random()); $("#captchaCode").val("") }); $('button[name="sign-in-submit"]').live("click", function () { b.sign_in_doings(e.sign_in_callback) }); $('button[name="mob-sign-up-submit"]').live("click", function () { b.sign_up_doings(e.sign_in_callback) }); $(window).on("keypress.sign", function (g) { var h = (g.keyCode ? g.keyCode : g.which), f = $("#OKHQB-sign .tit-tabs .active"); if (h == "13") { g.preventDefault(); if (f.hasClass("tab-login")) { b.sign_in_doings(e.sign_in_callback) } else { if (f.hasClass("tab-mobreg")) { b.sign_up_doings(e.sign_in_callback) } } } }) }, sign_in_doings: function (g) { var j = $('input[name="sign-in-account"]'), h = $('input[name="sign-in-passwd"]'), f = $.trim(j.val()), d = $.trim(h.val()); if (f.length < 1) { c("请输入您的昵称/邮箱/注册手机", "error", "sign-in-account"); return false } else { if (d.length < 1) { c("请输入您的密码", "error", "sign-in-passwd"); return false } else { try { $.ajax({ url: "http://login.okhqb.com/member/boxLogin.json", data: { userName: f, passWord: d }, type: "POST", dataType: "jsonp", jsonpCallback: "signInCallback", beforeSend: function () { c("正在为您努力登录...", "info") }, success: function (k) { if (k.code == 200) { var e = $.parseJSON(k.data); art.dialog.get("HQB_Sign_dialog").close(); b.render_toolbar(e.nickname, e.total_points); if (g && typeof g == "function") { g.apply() } } else { c(k.msg, "error") } } }) } catch (i) { c("登录失败:系统异常", "error") } } } function c(e, n, m) { var l = $('div[name="sign_in_tips"]', ".sign-in-form-item"), k = $('input[name="' + m + '"]'); if (!e || !n) { l.html("").hide(); $("input.s-item-input").each(function () { $(this).removeClass("focus").removeClass("error") }) } else { l.html('<span class="tips_icon_type tips_' + n + '"></span> <span class="message">' + e + "</span>").show(); k.focus().delay(100) } } }, sign_up_doings: function (j) { var l = $('input[name="mob-sign-up-number"]'), k = $('input[name="mob-sign-up-passwd"]'), d = $('input[name="mob-sign-up-moblieCaptcha"]'), p = $.trim($("#captchaCode").val()), g = $.trim(l.val()), o = $.trim(d.val()), m = $.trim(k.val()), B = $(".passwd-strength"), A = $('button[name="mob-sign-up-submit"]'), h = /^1[3|4|5|7|8]\d{9}$/, f = /^\w+((\-\w+)|(\.\w+))*@[A-Za-z0-9]+((\.|\-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$/; if (!g.length) { n("手机号码不能为空", "error", "mob-sign-up-number"); return false } else { if (!h.test(g)) { n("手机号码格式错误", "error", "mob-sign-up-number"); return false } } if (!o.length) { n("手机验证码不能为空", "error", "mob-sign-up-moblieCaptcha"); return false } else { if (!/^\d{6}$/i.test(o)) { n("请输入正确的手机验证码", "error", "mob-sign-up-moblieCaptcha"); return false } } if (!m.length) { n("密码不能为空", "error", "mob-sign-up-passwd"); return false } else { if (m.length < 6 && m.length > 16) { n("密码长度应为6-16个字符", "error", "mob-sign-up-passwd"); return false } } if (p.length < 4) { n("请输入验证码", "error", "captchaCode"); return false } n(false); B.html("").hide(); if (A.hasClass("disable")) { return } A.addClass("disable"); try { $.ajax({ url: "http://login.okhqb.com/member/create.json", data: { userName: g, moblieCaptcha: o, password: m, safety: 1, imgcode: p }, type: "POST", dataType: "jsonp", jsonpCallback: "mobSignUpCallback", beforeSend: function () { i("数据提交中...", "info") }, success: function (e) { A.removeClass("disable"); if (e.code == 200) { art.dialog({ title: false, content: "注册成功", icon: "succeed_s", time: 3 }); art.dialog.get("HQB_Sign_dialog").close(); b.render_toolbar(e.data.mobile, e.data.total_points); if (j && typeof j == "function") { j.apply() } } else { i(e.msg, "error") } } }) } catch (c) { i("注册失败:系统异常", "error") } function n(t, s, q) { var r = $('input[name="' + q + '"]'), e = r.siblings(".i-tips"); if (!t || !s || !q) { $(".i-tips", ".mob-sign-up-form-item").each(function () { $(this).html("").hide() }); $("input.m-item-input").each(function () { $(this).removeClass("focus").removeClass("error") }) } else { e.html('<span class="tips_icon_type tips_' + s + '"></span> <span class="message">' + t + "</span>").show(); r.removeClass("focus").addClass("error") } } function i(r, q) { if (!r) { return } var e = $("#mob_sign_up_nm_tips"); if (r == "hide") { e.html("").hide() } else { e.html('<span class="tips_icon_type tips_' + q + '"></span> <span class="message">' + r + "</span>").show() } } }, QQ_sign_in: function () { var d = window.location.href, c = "http://login.okhqb.com/member/union/qq.html?forward="; window.location.href = c + d; return false }, SinaWeibo_sign_in: function () { var d = window.location.href, c = "http://login.okhqb.com/member/union/sina.html?forward="; window.location.href = c + d; return false }, wechat_sign_in: function () { var d = window.location.href, c = "http://login.okhqb.com/member/toWechatUnoinLogin.html?forward="; window.location.href = c + d; return false }, AliPay_sign_in: function () { var d = window.location.href, c = "http://login.okhqb.com/member/union/alipay.html?forward="; window.location.href = c + d; return false }, unload_submit_event: function () { try { $('button[name="sign-in-submit"]').unbind("click"); $('button[name="mob-sign-up-submit"]').unbind("click"); $(window).unbind(".sign") } catch (c) { } }, render_toolbar: function (f, d) { var g = $("#toolbar_bg") || $("#toolbar"), f = f || "强粉"; try { g.find(".notloggedin").hide(); g.find(".thelogged").html('您好,<a class="u_name" rel="nofollow" href="' + _href + '">' + nickname + '</a> 欢迎回来 <a href="http://www.baidu.com/member/logout.html" class="logout"> 退出</a><a href="http://my.okhqb.com/my/home.html?ad=dd_id" class="signEveryday"><span>签到赚积分</span></a>').show() } catch (c) { } } }; a.OKHQB_sign = b })(window); OKHQB_sign.init();
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。