(function() { var b = "21030529-10:00"; var d = "20141124.1540"; var c = false, a = /xyz/.test(function() { xyz }) ? /\b_super\b/ : /.*/; this.class = function() { }; class.extend = function(i) { var e = this.prototype; c = true; var h = new this(); c = false; for (var g in i) { h[g] = typeof i[g] == "function" && typeof e[g] == "function" && a.test(i[g]) ? (function(j, k) { return function() { var m = this._super; this._super = e[j]; var l = k.apply(this, arguments); this._super = m; return l } })(g, i[g]) : i[g] } function f() { if (!c && this.init) { this.init.apply(this, arguments) } } f.prototype = h; f.prototype.constructor = f; f.extend = arguments.callee; return f } })(); (function() { if (!string.repeat) { string.prototype.repeat = function(g) { return new array(g + 1).join(this) } } if (!string.trim) { string.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, "") } } if (typeof object.getprototypeof !== "function") { if (typeof "test".__proto__ === "object") { object.getprototypeof = function(g) { return g.__proto__ } } else { object.getprototypeof = function(g) { return g.constructor.prototype } } } var c = {}; var e = object.prototype.hasownproperty, c = {}, f = object.prototype.tostring; var a = "boolean number string function array date regexp object".split(" "); for (var b = 0; b < a.length; b++) { c["[object " + a[b] + "]"] = a[b].tolowercase() } function d(l, m) { var k = window; var n = l.split("."); for (var j = 0; j < n.length; j++) { var g = n[j]; if (typeof k[g] === "undefined") { k[g] = {} } k = k[g] } if (m) { for (var h in m) { k[h] = m[h] } } return k } d("let", {$: function() { var g = new array(); for (var j = 0; j < arguments.length; j++) { var h = arguments[j]; if (typeof h == "string") { h = document.getelementbyid(h) } if (arguments.length == 1) { return h } g.push(h) } return g },isfunction: function(g) { return let.type(g) === "function" },iswindow: function(g) { return g && typeof g === "object" && "setinterval" in g },type: function(g) { return g == null ? string(g) : c[f.call(g)] || "object" },isarray: function(g) { return object.prototype.tostring.apply(g) === "[object array]" },addevent: function(h, g, i) { if (!(h = let.$(h))) { return false } if (h.addeventlistener) { h.addeventlistener(g, i, false); return true } else { if (h.attachevent) { h["e" + g + i] = i; h[g + i] = function() { h["e" + g + i](window.event) }; h.attachevent("on" + g, h[g + i]); return true } } return false },removeevent: function(h, g, i) { if (!(h = let.$(h))) { return false } if (h.removeeventlistener) { h.removeeventlistener(g, i, false); return true } else { if (h.detachevent) { h.detachevent("on" + g, h[g + i]); h[g + i] = null; return true } } return false },gettarget: function(g) { g = g || window.event; var h = g.target || g.srcelement; if (h.nodetype == let.nodetype.text_node) { h = node.parentnode } return h },nodetype: {element_node: 1,attribute_node: 2,text_node: 3,cdata_secyion_node: 4,entity_reference_node: 5,entity_node: 6,processing_instruction_node: 7,comment_node: 8,document_node: 9,document_type_node: 10,document_fragment_node: 11,notation_node: 12},getelementsbyclassname: function(k, h, j) { j = j || document; if (!(j = let.$(j))) { return false } var n = (h == "*" && j.all) ? j.all : j.getelementsbytagname(h); var g = new array(); k = k.replace(/\-/g, "\\-"); var o = new regexp("(^|\\s)" + k + "(\\s|$)"); var l; for (var m = 0; m < n.length; m++) { l = n[m]; if (o.test(l.classname)) { g.push(l) } } return g },istype: function(h, g) { var j = object.prototype.tostring, i; return (g === "null" && h === null) || (g === "undefined" && h === i) || j.call(h).slice(8, -1) === g },isplainobject: function(h) { if (!h || let.type(h) !== "object" || h.nodetype || let.iswindow(h)) { return false } if (h.constructor && !e.call(h, "constructor") && !e.call(h.constructor.prototype, "isprototypeof")) { return false } var g; for (g in h) { } return g === undefined || e.call(h, g) },extend: function() { var q, h, g, j, n, o, k = arguments[0] || {}, l = 1, m = arguments.length, r = false; if (typeof k === "boolean") { r = k; k = arguments[1] || {}; l = 2 } if (typeof k !== "object" && !let.isfunction(k)) { k = {} } if (m === l) { k = this; --l } for (; l < m; l++) { if ((q = arguments[l]) != null) { for (h in q) { g = k[h]; j = q[h]; if (k === j) { continue } if (r && j && (let.isplainobject(j) || (n = let.isarray(j)))) { if (n) { n = false; o = g && let.isarray(g) ? g : [] } else { o = g && let.isplainobject(g) ? g : {} } k[h] = let.extend(r, o, j) } else { if (j !== undefined) { k[h] = j } } } } } return k },deepcopy: function(i, g) { for (var h in g) { var j = g[h]; if (i === j) { continue } if (let.istype(j, "object")) { i[h] = arguments.callee(i[h] || {}, j) } else { if (let.istype(j, "array")) { i[h] = arguments.callee(i[h] || [], j) } else { i[h] = j } } } return i },throttle: function(h, g) { var i = null; return function() { var k = this, j = arguments; cleartimeout(i); i = settimeout(function() { h.apply(k, j) }, g) } },toggledisplay: function(h, i) { if (!(h = let.$(h))) { return false } var g = h.style.display || let.getstyle(h, "display"); if (g != "none") { h.style.display = "none" } else { h.style.display = i || "" } return true },bindfunction: function(h, g) { return function() { g.apply(h, arguments) } },getprevioussibling: function(g) { if (g.previoussibling.nodetype == let.nodetype.text_node) { return let.getprevioussibling(g.previoussibling) } else { return g.previoussibling } },getnextsibling: function(g) { if (g.nextsibling.nodetype == let.nodetype.text_node) { return let.getnextsibling(g.nextsibling) } else { return g.nextsibling } },insertafter: function(h, g) { if (!(h = let.$(h))) { return false } if (!(g = let.$(g))) { return false } return g.parentnode.insertbefore(h, g.nextsibling) },removechild: function(g) { if (!(g = let.$(g))) { return false } while (g.firstchild) { g.firstchild.parentnode.removechild(g.firstchild) } return g },removenode: (function() { var g = !+"\v1" ? function() { var h; return function(i) { if (!(i = let.$(i))) { return false } if (i && i.tagname != "body") { h = h || document.createelement("div"); h.appendchild(i); h.innerhtml = "" } } }() : function(h) { if (!(h = let.$(h))) { return false } if (h && h.parentnode && h.tagname != "body") { h.parentnode.removechild(h) } }; return g })(),camelize: function(g) { return g.replace(/-(\w)/g, function(h, i) { return i.touppercase() }) },uncamelize: function(h, g) { g = g || "-"; return h.replace(/([a-z])([a-z])/g, function(i, k, j) { return k + g + j.tolowercase() }) },setstyle: function(h, g) { if (!(h = let.$(h))) { return false } for (property in g) { if (!g.hasownproperty(property)) { continue } if (h.style.setproperty) { h.style.setproperty(let.uncamelize(property, "-"), g[property], null) } else { h.style[let.camelize(property)] = g[property] } } return true },getstyle: function(h, g) { if (!(h = let.$(h)) || !g) { return false } var j = h.style[let.camelize(g)]; if (!j) { if (document.defaultview && document.defaultview.getcomputedstyle) { var i = document.defaultview.getcomputedstyle(h, null); j = i ? i.getpropertyvalue(let.uncamelize(g, "-")) : null } else { if (h.currentstyle) { j = h.currentstyle[let.camelize(g)] } } } return (j == "" || j == "auto") ? 0 : j },getcoords: function(g) { var k = g.getboundingclientrect(), o = g.ownerdocument, l = o.body, j = o.documentelement, i = j.clienttop || l.clienttop || 0, m = j.clientleft || l.clientleft || 0, n = k.top + (self.pageyoffset || j.scrolltop || l.scrolltop) - i, h = k.left + (self.pagexoffset || j.scrollleft || l.scrollleft) - m; return {top: n,left: h} },getelementsbyattribute: function(t) { var w = /([\*a-za-z1-6]*)?(\[(\w+)\s*(\^|\$|\*|\||~|!)?=?\s*([\w\u00c0-\uffff\s\-_\.]+)?\])?/, h = arguments[1] || document, j = t.match(w), w = j[1] || "*", g = j[3], r = j[4] + "=", u = j[5], v = {"class": "classname","for": "htmlfor"}, k = [], q = (w === "*" && h.all) ? h.all : h.getelementsbytagname(w), n = q.length; if ((!!document.queryselectorall) && r != "!=") { q = document.queryselectorall(t); for (var l = 0, n = q.length; l < n; l++) { k.push(q[l]) } return k } if (!+"\v1") { g = v[g] ? v[g] : g } while (--n >= 0) { var o = q[n], s = !+"\v1" ? o[g] : o.getattribute(g); if (typeof s === "string" && s.length > 0) { if (!!u) { var m = r === "=" ? s === u : r === "!=" ? s != u : r === "*=" ? s.indexof(u) >= 0 : r === "~=" ? (" " + s + " ").indexof(u) >= 0 : r === "^=" ? s.indexof(u) === 0 : r === "$=" ? s.slice(-u.length) === u : r === "|=" ? s === u || s.substring(0, u.length + 1) === u + "-" : false; m && k.push(o) } else { k.push(o) } } } return k },getclassnames: function(g) { if (!(g = let.$(g))) { return false } return g.classname.replace(/\s+/, " ").split(" ") },hasclassname: function(h, g) { if (!(h = let.$(h))) { return false } var k = let.getclassnames(h); for (var j = 0; j < k.length; j++) { if (k[j] === g) { return true } } return false },addclassname: function(h, g) { if (!(h = let.$(h))) { return false } h.classname += (h.classname ? " " : "") + g; return true },removeclassname: function(j, h) { if (!(j = let.$(j))) { return false } var l = let.getclassnames(j); var g = l.length; for (var k = g - 1; k >= 0; k--) { if (l[k] === h) { delete (l[k]) } } j.classname = l.join(" "); return (g == l.length ? false : true) },createelement: function(h, j, i, l, g) { var k = document.createelement(h); j && let.extend(k, j); i && let.setstyle(k, i); if (l) { switch (g) { case "before": l.parentnode.insertbefore(k, l); break; case "after": let.insertafter(k, l); break; case "prepend": l.insertbefore(k, l.firstchild); break; default: l.appendchild(k) } } return k },stoppropagation: function(g) { g = g || window.event; if (g.stoppropagation) { g.stoppropagation() } else { g.cancelbubble = true } },startmove: function(j, g, i, h) { var i = i || 30; clearinterval(j.timer); j.isplay = false; j.timer = setinterval(function() { j.isplay = false; var k = ""; var l = true; for (k in g) { var n = 0; if (k == "opacity") { n = math.round(parsefloat(let.getstyle(j, k)) * 100) } else { n = parseint(let.getstyle(j, k)) } if (n != g[k]) { l = false } var m = (g[k] - n) / 8; m = m > 0 ? math.ceil(m) : math.floor(m); if (k == "opacity") { j.style.filter = "alpha(opacity:" + (n + m) + ")"; j.style.opacity = (n + m) / 100 } else { j.style[k] = n + m + "px" } } j.isplay = true; if (l) { j.isplay = false; clearinterval(j.timer); if (h) { h() } } }, i) },outerheight: function(g) { return parseint(g.offsetheight) + parseint(let.getstyle(g, "marginbottom")) + parseint(let.getstyle(g, "margintop")) },outerwidth: function(g) { return parseint(g.offsetwidth) + parseint(let.getstyle(g, "marginleft")) + parseint(let.getstyle(g, "marginright")) },scrollmember: function(o, m, j) { var i = o.memobj, l = o.marg, n = parseint(o.men), h = parseint(o.offl); var k = {}, g = math.abs(parseint(let.getstyle(i, l))); if (m) { if (j == 0 || j) { j == 0 ? 1 : j + 1; g = -(h * j) } else { if (g >= n) { i.style[l] = "0px"; g = 0 } g = -(g + h) } } else { if (j) { j == 0 ? 1 : j + 1; g = h * j } else { if (g <= 0) { i.style[l] = -n + "px"; g = n } g = -(g - h) } } k[l] = g; return k },contains: function(g, h) { return g.contains ? g != h && g.contains(h) : !!(g.comparedocumentposition(h) & 16) },fixedmouse: function(i, j) { var h, g = i.type.tolowercase(); if (g == "mouseover") { h = i.relatedtarget || i.fromelement } else { if (g = "mouseout") { h = i.relatedtarget || i.toelement } else { return true } } return h && h.prefix != "xul" && !let.contains(j, h) && h !== j },preventdefault: function(g) { g = g || window.event; if (g.preventdefault) { g.preventdefault() } else { g.returnvalue = false } },setcookie: function(i, k, m, g) { if (m) { var h = new date(); h.settime(h.gettime() + (m * 24 * 60 * 60 * 1000)); var j = "; expires=" + h.togmtstring() } else { var j = "" } var l = i + "=" + k + j + "; path=/; domain=" + (g || ""); document.cookie = l },getcookie: function(h) { var l = h + "="; var g = document.cookie.split(";"); for (var j = 0; j < g.length; j++) { var k = g[j]; while (k.charat(0) == " ") { k = k.substring(1, k.length) } if (k.indexof(l) == 0) { return k.substring(l.length, k.length) } } return null },deletecookie: function(h, g) { let.setcookie(h, "", -1, g) },chartcount: function(m, j) { var h = ""; for (var k = 0, g = m.length, l = 0; k < g; k++) { if (m.charcodeat(k) > 127) { l += 2 } else { l++ } } if (j && l >= j) { return m.slice(0, j) + "...." } else { if (j && l < j) { return m + "....." } else { return l } } },addloadevent: (function() { var h = false, g = []; function i() { h = true; for (var j; j = g.pop(); ) { j() } } return function(k, j) { if (j) { return let.addevent(window, "load", k) } if (document.readystate === "complete") { return k && settimeout(k, 1) } k && g.push(k); h && i(); if (!+"\v1") { (function() { if (h) { return } try { document.documentelement.doscroll("left") } catch (l) { settimeout(arguments.callee, 0); return } i() })(); window.attachevent("onload", i) } else { document.addeventlistener("domcontentloaded", function() { document.removeeventlistener("domcontentloaded", arguments.callee, false); i() }, false); window.addeventlistener("load", i, false) } } })(),addnewloadevent: function(i, h) { if (h) { return let.addevent(window, "load", i) } var j = function() { if (arguments.callee.done) { return } arguments.callee.done = true; i.apply(document, arguments) }; if (document.addeventlistener) { document.addeventlistener("domcontentloaded", j, false) } if (/webkit/i.test(navigator.useragent)) { var g = setinterval(function() { if (/loaded|complete/.test(document.readystate)) { clearinterval(g); j() } }, 10) } return true },loadscript: function(h, j, k) { var i = document.createelement("script"); i.type = "text/javascript"; if (k && !/[&?]callback=/.test(h)) { if (typeof j == "function") { var g = "_" + (+new date) + math.round(math.random() * 1000); window[g] = j; j = null; h += (/\?/.test(h)) ? "&" : "?"; h += "callback=" + g } } if (i.readystate) { i.onreadystatechange = function() { if (i.readystate == "loaded" || i.readystate == "complete") { i.onreadystatechange = null; j && j(); i.parentnode.removechild(i) } } } else { i.onload = function() { j && j(); i.parentnode.removechild(i) } } i.src = h; document.getelementsbytagname("head")[0].appendchild(i) }}); let.addloadevent() })(); (function() { function.prototype.bind = function() { var b = this, d = arguments[0], a = new array(); for (var c = 1; c < arguments.length; c++) { a.push(arguments[c]) } return function() { return b.apply(d, a) } }; let.stockvisited = class.extend({_elementtarget: null,_intmaxlength: 0,_stringhtmltemplate: "",_arraystocklist: [],_arrayhotlist: [],_arraylist: [],_intthread: -1,_arraydata: {},_replace: function(d, f) { var c = ""; if (f.indexof("hk") == -1) { c = window["hq_str_s_" + f].split(",") } else { c = window["hq_str_" + f].split(","); c = [c[1], c[6], c[7], c[8], c[12], c[11]] } if (!c || !f || !c[0]) { return "" } c[50] = f; c[51] = f.replace(/^s[hz]/, ""); c[52] = ""; c[54] = " "; c[1] = (c[1] * 1).tofixed(2); c[55] = (c[2] * 1).tofixed(2); c[56] = f.replace(/[^0-9]/ig,""); if (f in this._arraydata) { if (c[1] * 1 > this._arraydata[f]) { c[54] = "" } else { if (c[1] * 1 < this._arraydata[f]) { c[54] = "" } else { c[54] = " " } } } this._arraydata[f] = c[1] * 1; if (c[3] * 1 > 0) { c[52] = "col_2" } if (c[3] * 1 < 0) { c[52] = "col_9" } var b = d.match(/()?/gm); if (b != null) { for (var e = 0; e < b.length; e++) { var a = c[b[e].replace(/()/g, "").replace(/@/g, "")]; a = typeof a == "undefined" ? "--" : a; d = d.replace(b[e], a) } } return d },_fill: function() { var c = this._stringhtmltemplate; var e = c.split(""); _stringhtmlspace = e[1]; c = e[0] + e[2]; var e = c.split(""); var a = e[0]; var b = e[1]; for (var d = 0; d < this._arraystocklist.length; d++) { a += this._replace(b, this._arraystocklist[d]) } if (this._arraystocklist.length < this._intmaxlength - 1) { a += _stringhtmlspace } for (var d = 0; d < this._arrayhotlist.length; d++) { a += this._replace(b, this._arrayhotlist[d]) } this._elementtarget.innerhtml = a + e[2] },_makelist: function() { var a = !+"\v1" ? this._elementtarget.stock : this._elementtarget.getattribute("stock"); this._arraystocklist = a.split(","); return a.split(",") },_random: function() { return (new date()).gettime() + math.random().tostring().replace("0.", "") },_load: function(c, d, b) { var a = document.createelement("script"); a.type = "text/javascript"; if (typeof b != "undefined") { a.charset = b } a._functioncallback = typeof d != "undefined" ? d : new function(); a[document.all ? "onreadystatechange" : "onload"] = function() { if (document.all && this.readystate != "loaded" && this.readystate != "complete") { return } this._functioncallback(this); this._functioncallback = null; this[document.all ? "onreadystatechange" : "onload"] = null; this.parentnode.removechild(this) }; a.src = c; document.getelementsbytagname("head")[0].appendchild(a) },load: function() { this._load("http://hq.sinajs.cn/rn=" + this._random() + "&list=" + this._arraylist.join(","), this._fill.bind(this), "gb2312") },init: function(e, c, b) { this._elementtarget = document.getelementbyid(e); this._intmaxlength = c; this._stringhtmltemplate = this._elementtarget.innerhtml; var a = this._makelist(); for (var d = 0; d < a.length; d++) { if (a[d].indexof("hk") == -1) { a[d] = "s_" + a[d] } } this._arraylist = a; this.interval = b; this.load() },start: function() { if (typeof (this.timeid) != "undefined" && this.timeid != 0 && this.timeid != null) { clearinterval(this.timeid) } else { this.timeid = setinterval(this.load.bind(this), this.interval) } },end: function() { if (typeof (this.timeid) != "undefined" && this.timeid != 0 && this.timeid != null) { clearinterval(this.timeid); this.timeid = null } }}) })(); (function() { let.login = function() { return new login() }; let.login = function() { let.loadscript("http://i.house.sina.com.cn/js/sinasso.js", function() { new housessocontroller({custom: {init: function(c, b) { housessocontroller.houseloginstatus = 0; housessocontroller.houseuserinfo = null; var a = housessocontroller.topobj = this; this.house = c; let.$("userlogout").onclick = function(d) { var f = "正在退出..."; if (let.$("userlogout").innerhtml != f) { let.$("userlogout").innerhtml = f; c.logout() } let.preventdefault(d) } },login: function(a) { var c = this; if (a) { var b = a.uid || c.uid; housessocontroller.houseloginstatus = 2; housessocontroller.houseuserinfo = a; c.uid = a.uid; c.topbar(a) } else { housessocontroller.houseloginstatus = -1; housessocontroller.houseuserinfo = null; this.topbar() } },logout: function(a) { housessocontroller.houseloginstatus = -1; housessocontroller.houseuserinfo = null; let.$("userlogout").innerhtml = "[退出]"; let.addclassname(let.$("userinfo"), "none"); let.removeclassname(let.$("userlogin"), "none") },fail: function() { housessocontroller.houseloginstatus = -1; housessocontroller.houseuserinfo = null },topbar: function(a) { if (a) { let.$("username").innerhtml = "您好 " + (a.nick || a.nickname || a.displayname) + ","; if (let.$("usernametopbar")) { let.$("usernametopbar").innerhtml = (a.nick || a.nickname) + "的乐居" } let.removeclassname(let.$("userinfo"), "none"); let.addclassname(let.$("userlogin"), "none") } else { let.addclassname(let.$("userinfo"), "none"); let.removeclassname(let.$("userlogin"), "none") } }}}) }) } })(); (function() { let.slidebox = function(c, a) { var b = new let.slidebox(c, a) }; let.slidebox = class.extend({init: function(b, a) { this.data = b; this.type = this.data.type || "left"; this.evet = this.data.evet || "click"; this.hostop = this.data.hostop || false; this.slideobj = document.getelementbyid(this.data.slideid); this.changebtn = document.getelementbyid(this.data.changeid); this.sum = this.data.sum || 1; this.shows = this.data.shows || 1; if (a == "box") { this.box() } else { this.view() } },view: function() { var d = this.data.time || 4000, s = this.data.hover || "hover"; var l = "", o = 0, q = 0, c = null, h = null, a = null, e = null, k = null, g = false; var j = this.slideobj.getattribute("slideh"), t = this.slideobj.getattribute("slidew"); var r = this.slideobj.children[0], f = r.children, n = true; a = this.slidestyle(r, f, j, t); for (o; o < f.length; o++) { if (o == 0) { l += "" + (o + 1) + "" } else { l += "" + (o + 1) + "" } f[o].style.csstext = "width:" + t + "px;height:" + j + "px" } this.changebtn.innerhtml = l; h = this.changebtn.children; for (o = 0; o < h.length; o++) { h[o].index = o; h[o]["on" + this.evet] = function() { if (!r.isplay) { h[q].classname = ""; var i = q == (h.length - 1) ? true : false; window.cleartimeout(c); b(this.index, i); q = this.index } } } if (d) { c = settimeout(m, d); if (this.hostop) { r.onmouseout = r.onmouseover = function(i) { i = i || window.event; var u = i.target || i.srcelement; if (i.type == "mouseover" && let.fixedmouse(i, r)) { n = false; window.cleartimeout(c) } else { if (i.type == "mouseout" && let.fixedmouse(i, r)) { n = true; c = window.settimeout(m, d) } } } } } function m() { window.cleartimeout(c); if (n && !r.isplay) { h[q].classname = ""; q++; if (q > h.length - 1) { q = 0 } b(q, true) } } function b(i, u) { if (!r.isplay) { h[i].classname = s; if (i == 0 && u) { g = true; i = f.length; f[0].style.position = "relative"; f[0].style[a.marg] = a.offl * i + "px" } else { g = false } let.startmove(r, let.scrollmember(a, true, i), null, function() { if (g) { f[0].style[a.marg] = "0px"; f[0].style.position = ""; r.style[a.marg] = "0px" } if (n) { c = settimeout(m, d) } }) } } },box: function() { var g = this.data.time || 4000, h = true, a = null, k = null, e = null, q = null, n = null, f = null, l = null; var i = this.data.changel ? document.getelementbyid(this.data.changel) : null; var b = this.data.changer ? document.getelementbyid(this.data.changer) : null; var m = this.slideobj.children[0], j = this.slideobj, o = true, d = m.children.length, r; r = m.innerhtml; do { m.innerhtml += r } while (m.children.length < d + parseint(this.sum)); n = m.children; e = let.outerheight(n[0]); q = let.outerwidth(n[0]); l = this.slidestyle(m, n, e, q, this.shows, this.sum, d); if (g) { f = window.settimeout(c, g); if (this.hostop) { j.onmouseout = j.onmouseover = function(s) { s = s || window.event; var t = s.target || s.srcelement; if (s.type == "mouseover" && let.fixedmouse(s, j)) { window.cleartimeout(f); h = o = false } else { if (s.type == "mouseout" && let.fixedmouse(s, j)) { h = o = true; f = window.settimeout(c, 2000) } } } } } if (b && b) { b.onclick = i.onclick = function(s) { var t = true; s = s || window.event; var u = s.target || s.srcelement; if (u === i) { t = false } if (h) { window.cleartimeout(f); let.startmove(m, let.scrollmember(l, t), null, function() { h = true; f = settimeout(c, g) }) } h = false } } function c() { window.cleartimeout(f); if (o && h) { let.startmove(m, let.scrollmember(l, true), null, function() { h = true; f = window.settimeout(c, g) }) } h = false } },slidestyle: function(g, h, b, i, d, f, e) { var a, c, d = parseint(d) || 1, f = parseint(f) || 1; if (this.type && this.type.touppercase() == "top") { a = b; c = a * e + a; g.style.csstext = "position:absolute;top:0px;"; return {memobj: g,marg: this.type,men: (c - (a * d)),offl: (a * d)} } else { a = i; c = a * h.length; g.style.csstext = "width:" + c + "px;position:absolute;"; return {memobj: g,marg: this.type,men: (c - (a * (f + d))),offl: (a * d)} } }}) })(); (function() { let.lazyload = class.extend({windowheight: document.documentelement.clientheight,showthreshold: 200,arrload: {},timer: null,time: 100,init: function(c) { var d = this; var a = this._init(c); for (var b in a) { this.calculate(a[b]) } this.isload(); let.addevent(window, "scroll", function() { d.loadelements() }); let.addevent(window, "resize", function() { d.loadelements() }) },loadelements: function() { var a = this; cleartimeout(this.timer); this.timer = settimeout(function() { a.isload() }, this.time) },_init: function(b) { var c = {}; for (var a in b) { c[a] = let.getelementsbyattribute(a + "[" + b[a] + "]") } return c },calculate: function(d) { if (d.length == 0) { return null } else { for (var b = 0, a = d.length; b < a; b++) { var c = let.getcoords(d[b]).top; if (!this.arrload.hasownproperty(c)) { this.arrload[c] = [] } this.arrload[c].push(d[b]) } } },isload: function() { var b = this.getscrolltop(); var h = this.arrload; if (h != null && h != {}) { var g = this.showthreshold; for (var e in h) { if (parseint(e) >= b - g && parseint(e) <= b + this.windowheight + g && h.hasownproperty(e)) { for (var d = 0, a = h[e].length; d < a; d++) { var f = h[e][d]; var c = f.getattribute("lsrc"); f.setattribute("src", c); f.removeattribute("lsrc") } delete this.arrload[e] } } } },getscrolltop: function(a) { var b = a ? a.ownerdocument : document; return b.documentelement.scrolltop || b.body.scrolltop }}) })(); (function() { let.tab = function(a, c) { var b = new let.tab(a, c) }; let.tab = class.extend({init: function(h, j) { this.defaults = {tabname: "data-tab",classname: "data-onclass",ajaxname: "data-ajax",typename: "data-type",currentname: "data-current",hidden: "none",event: "mouseenter",slide: false,ajax: false,ajaxoptions: null}; var g; g = this; this.options = let.extend({}, g.defaults, h); var v = 0; var c = 1; var s; var w = this.options.id.split(","); v = w.length; if (parseint(w.length) === 1) { var r = this.options.id.split(" "); var d = let.$(r[0]); s = d.getelementsbytagname(r[1]); v = s.length; c = 2 } else { } h = this.options; var n = h.tabname; var f = h.ajaxname; var m = h.classname; var a = h.typename; var o = "ajax"; this.taboptions = []; this.taboptions[f] = []; this.taboptions[m] = []; this.taboptions[a] = []; this.taboptions[o] = []; var x = 0; for (var u = 0; u < v; u++) { var q; if (parseint(c) === 1) { q = let.$(w[u]) } else { q = s[u] } var l = q.getattribute(n); if (l === undefined || l === null) { x++; continue } var l = l.substr(1); var e = let.$(l); var b = q.getattribute(h.currentname); this.taboptions[f].push(q.getattribute(f)); if (typeof q.getattribute(m) === "undefined") { this.taboptions[m].push("") } else { this.taboptions[m].push(q.getattribute(m)) } this.taboptions[a].push([q, l]); this.taboptions[o].push(!!q.getattribute(f) || this.options.ajax); if (let.hasclassname(q, this.taboptions[m][u]) && h.ajax && !!!e.innerhtml.trim()) { g.gettabhtml(u) } var t = u - x; (function(i) { var y; if (window.document.all) { y = h.event } else { if (h.event == "mouseenter") { y = "mouseover" } else { y = h.event } } let.addevent(q, y, function() { if (!let.hasclassname(g.taboptions[a][i][0], g.taboptions[m][i])) { var z = let.$(g.taboptions[a][i][1]); var k = z.getelementsbytagname("textarea").length; if ((g.taboptions[o][i] && !!!z.innerhtml.trim()) || parseint(k) != 0) { g.gettabhtml.call(g, i) } else { g.changetab.call(g, i) } } }) })(t); if (b == "true") { this.fireevent(q, eventtype) } } },connect: function(c, b, h) { var a = this; if (!c) { return false } var g = false; var f = ""; if (window.activexobject) { try { g = new activexobject("msxml2.xmlhttp") } catch (d) { try { g = new activexobject("microsoft.xmlhttp") } catch (d) { } } } else { if (window.xmlhttprequest) { g = new xmlhttprequest() } else { return false } } ajaxfriendlyurl = "http://" + window.location.host + c; g.onreadystatechange = function() { if (g.readystate == 4 && g.status == 200) { b.innerhtml = g.responsetext; a.changetab(h) } }; g.open("get", ajaxfriendlyurl, true); g.send(null) },changetab: function(c) { var e; var f = this; var g = this.options; var h = g.typename; var a = g.classname; for (e = 0; e < this.taboptions[h].length; e++) { var d = this.taboptions[h][e]; b(d[0], this.taboptions[a][e]); let.addclassname(d[1], this.options.hidden) } let.addclassname(this.taboptions[h][c][0], this.taboptions[a][c]); var j = document.getelementbyid(this.taboptions[h][c][1]); b(j, this.options.hidden); function b(m, k) { var t = m.classname; if (typeof m.classname != "undefined" && m.classname != 0 && m.classname != null) { var o = m.classname.split(/\s+/); var q = k.split(/\s+/); var s = o.length; var l = q.length; var n = 0; var r = 0; for (r = 0; r < l; r++) { for (n = 0; n < s; ++n) { if (o[n] == q[r]) { o.splice(n, 1); n--; s-- } } } m.classname = o.join(" "); return m } } },gettabhtml: function(f) { var a = this.options; var d = let.$(this.taboptions[a.typename][f][1]); var c = d.getelementsbytagname("textarea")[0]; var b = this; if (c) { var e = "" + c.innerhtml; e = e.replace(/</g, "<"); e = e.replace(/>/g, ">"); d.innerhtml = e; this.changetab(f) } else { this.connect(this.taboptions[a.ajaxname][f], d, f) } },fireevent: function(b, a) { if (document.createeventobject) { return b.fireevent("on" + a) } else { var c = document.createevent("htmlevents"); c.initevent(a, true, true); return !b.dispatchevent(c) } }}) })(); (function() { let.jsonp = new (function jsonp() { this.request = function(url, callback) { var tempname = "jsonp" + (new date().gettime()).tostring().substr(5); this[tempname] = ""; var sc = document.createelement("script"); this[tempname] = function(str) { callback(str); sc.parentnode.removechild(sc); delete this[tempname] }; sc.setattribute("type", "text/javascript"); sc.setattribute("charset", "utf8"); sc.setattribute("src", url + "&callback=let.jsonp." + tempname); document.body.appendchild(sc) } })(); let.suggest = function(id, option) { var sug = new let.suggest(id, option) }; let.suggest = class.extend({init: function(id, option) { this.create(id, option) },create: function(id, option) { var abspos, closetimer, requesttimer, lastkeyword, resultsbox, qurl, keyword, suggestform; var searchinput = let.$(id); var defaultoption = {requestdelay: 320,closedelay: 160,maxresultsnum: 20,api: "http://data.house.sina.com.cn/api/search_suggest.php",param: {city: "nc"},offset: {left: 0,top: 0,width: 0}}; option = let.deepcopy(defaultoption, option); _init(); function _init() { var suggestform = document.getelementbyid("con_search_1"); if (suggestform) { suggestform = suggestform.getelementsbytagname("form")[0] } if (searchinput && searchinput.tagname == "input") { qurl = option.api + "?"; for (p in option.param) { qurl += p + "=" + option.param[p] + "&" } resultsbox = let.createelement("div", {classname: "none com" + id}, {position: "absolute"}, document.body); let.preventdefault(searchinput); let.addevent(searchinput, "focus", function() { _getresults() }); let.addevent(searchinput, "blur", function() { if (requesttimer) { cleartimeout(requesttimer) } settimeout(_hideresults, option.closedelay) }); let.addevent(searchinput, "input", function() { if (requesttimer) { cleartimeout(requesttimer) } requesttimer = settimeout(_getresults, option.requestdelay) }); let.addevent(searchinput, "keydown", function(e) { e = e ? e : window.event; var keynum = e.keycode; var currentli = let.getelementsbyclassname("selected", "li", resultsbox)[0]; switch (keynum) { case 38: if (currentli.previoussibling) { let.removeclassname(currentli, "selected"); let.addclassname(currentli.previoussibling, "selected"); _setinputvalue(currentli.previoussibling.innerhtml) } break; case 40: if (currentli.nextsibling) { let.removeclassname(currentli, "selected"); let.addclassname(currentli.nextsibling, "selected"); _setinputvalue(currentli.nextsibling.innerhtml) } break; case 27: _hideresults(); searchinput.blur(); break; default: if (!+"\v1") { if (requesttimer) { cleartimeout(requesttimer) } requesttimer = settimeout(_getresults, option.requestdelay) } } }); let.addevent(resultsbox, "mouseover", function(e) { e = e || window.event; var ot = e.target || e.srcelement; if (ot.tagname == "li") { var lis = ot.parentnode.childnodes; var len = lis.length; for (var i = 0; i < len; i++) { let.removeclassname(lis[i], "selected") } let.addclassname(ot, "selected") } }); let.addevent(resultsbox, "click", function(e) { e = e || window.event; var ot = e.target || e.srcelement; if (ot.tagname == "li") { cleartimeout(closetimer); _setinputvalue(ot.innerhtml); _hideresults(); if (suggestform && suggestform.submit) { suggestform.submit() } } }) } else { return "init failed" } } function _getresults() { keyword = encodeuri(searchinput.value); if (keyword != "") { if (keyword == lastkeyword) { _showresults() } else { let.jsonp.request(qurl + "q=" + keyword, _queryapi) } } else { resultsbox.innerhtml = ""; lastkeyword = ""; _hideresults() } } function _queryapi(str) { var results, tempul, templi, len; resultsbox.innerhtml = ""; try { results = eval(str); option.maxresultsnum > results.length ? len = results.length : len = option.maxresultsnum; tempul = document.createelement("ul"); for (var i = 0; i < len; i++) { templi = document.createelement("li"); templi.innerhtml = results[i].name; if (i == 0) { let.addclassname(templi, "selected") } tempul.appendchild(templi) } resultsbox.appendchild(tempul) } catch (e) { resultsbox.innerhtml = "