首页 > 代码库 > 02.lib-v1.js

02.lib-v1.js

   1 /*   2  Date: 2014-07-29 4:06:07 [PM]    3  */   4 function StringBuilder() {   5     this.strings = new Array, this.length = 0   6 }   7    8 function jdThickBoxclose() {   9     $(".thickclose").trigger("click")  10 }  11   12 function getparam() {  13     var a = "",  14         b = "";  15     new Object;  16     for (var c = location.search.substring(1), d = c.split("&"), e = 0; e < d.length; e++) {  17         var f = d[e].indexOf("="); - 1 != f && (d[e].substring(0, f), "sid" == d[e].substring(0, f) && (a = unescape(d[e].substring(f + 1))), "t" == d[e].substring(0, f) && (b = unescape(d[e].substring(f + 1))))  18     }  19     return "" != a || "" != b ? "&sid=" + escape(a) + "&t=" + escape(b) : ""  20 }  21   22 function mlazyload(a) {  23         var b = {  24             defObj: null,  25             defHeight: 0,  26             fn: null  27         };  28         b = $.extend(b, a || {});  29         var c = (b.defHeight, "object" == typeof b.defObj ? b.defObj : $(b.defObj));  30         if (!(c.length < 1)) {  31             var d = function() {  32                     var a = document,  33                         c = "ipad" == navigator.userAgent.toLowerCase().match(/iPad/i) ? window.pageYOffset : Math.max(a.documentElement.scrollTop, a.body.scrollTop);  34                     return a.documentElement.clientHeight + c - b.defHeight  35                 },  36                 e = function() {  37                     c.offset().top <= d() && !c.attr("load") && (c.attr("load", "true"), b.fn && b.fn())  38                 };  39             e(), $(window).bind("scroll", function() {  40                 e()  41             })  42         }  43     }! function() {  44         var a = document.getElementById("nav-dapeigou");  45         a && (a.innerHTML = ‘<a href="http://channel.jd.com/chaoshi.html">\u4eac\u4e1c\u8d85\u5e02</a>‘)  46     }(), "undefined" == typeof pageConfig.FN_getDomain && (pageConfig.FN_getDomain = function() {  47         var a = location.hostname;  48         return /360buy.com/.test(a) ? "360buy.com" : "jd.com"  49     }),  50     function() {  51         var a = $("#service-2013 a[href=http://www.mamicode.com/‘http://en.360buy.com/‘]");  52         a.length && a.attr("href", "http://help.en.360buy.com/help/question-2.html")  53     }(),  54     function() {  55         var a = $("#footer-2013 a[href=http://www.mamicode.com/‘http://about.58.com/fqz/index.html‘]");  56         a.length && a.attr("href", "http://www.bj.cyberpolice.cn/index.do")  57     }(), "object" != typeof JSON && (JSON = {}),  58     function() {  59         function f(a) {  60             return 10 > a ? "0" + a : a  61         }  62   63         function quote(a) {  64             return escapable.lastIndex = 0, escapable.test(a) ? ‘"‘ + a.replace(escapable, function(a) {  65                 var b = meta[a];  66                 return "string" == typeof b ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)  67             }) + ‘"‘ : ‘"‘ + a + ‘"‘  68         }  69   70         function str(a, b) {  71             var c, d, e, f, g, h = gap,  72                 i = b[a];  73             switch (i && "object" == typeof i && "function" == typeof i.toJSON && (i = i.toJSON(a)), "function" == typeof rep && (i = rep.call(b, a, i)), typeof i) {  74                 case "string":  75                     return quote(i);  76                 case "number":  77                     return isFinite(i) ? String(i) : "null";  78                 case "boolean":  79                 case "null":  80                     return String(i);  81                 case "object":  82                     if (!i) return "null";  83                     if (gap += indent, g = [], "[object Array]" === Object.prototype.toString.apply(i)) {  84                         for (f = i.length, c = 0; f > c; c += 1) g[c] = str(c, i) || "null";  85                         return e = 0 === g.length ? "[]" : gap ? "[\n" + gap + g.join(",\n" + gap) + "\n" + h + "]" : "[" + g.join(",") + "]", gap = h, e  86                     }  87                     if (rep && "object" == typeof rep)  88                         for (f = rep.length, c = 0; f > c; c += 1) "string" == typeof rep[c] && (d = rep[c], e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e));  89                     else  90                         for (d in i) Object.prototype.hasOwnProperty.call(i, d) && (e = str(d, i), e && g.push(quote(d) + (gap ? ": " : ":") + e));  91                     return e = 0 === g.length ? "{}" : gap ? "{\n" + gap + g.join(",\n" + gap) + "\n" + h + "}" : "{" + g.join(",") + "}", gap = h, e  92             }  93         }  94         "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {  95             return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null  96         }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {  97             return this.valueOf()  98         });  99         var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 100             escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 101             gap, indent, meta = { 102                 "\b": "\\b", 103                 "    ": "\\t", 104                 "\n": "\\n", 105                 "\f": "\\f", 106                 "\r": "\\r", 107                 ‘"‘: ‘\\"‘, 108                 "\\": "\\\\" 109             }, 110             rep; 111         "function" != typeof JSON.stringify && (JSON.stringify = function(a, b, c) { 112             var d; 113             if (gap = "", indent = "", "number" == typeof c) 114                 for (d = 0; c > d; d += 1) indent += " "; 115             else "string" == typeof c && (indent = c); if (rep = b, b && "function" != typeof b && ("object" != typeof b || "number" != typeof b.length)) throw new Error("JSON.stringify"); 116             return str("", { 117                 "": a 118             }) 119         }), "function" != typeof JSON.parse && (JSON.parse = function(text, reviver) { 120             function walk(a, b) { 121                 var c, d, e = a[b]; 122                 if (e && "object" == typeof e) 123                     for (c in e) Object.prototype.hasOwnProperty.call(e, c) && (d = walk(e, c), void 0 !== d ? e[c] = d : delete e[c]); 124                 return reviver.call(a, b, e) 125             } 126             var j; 127             if (text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx, function(a) { 128                 return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) 129             })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), "function" == typeof reviver ? walk({ 130                 "": j 131             }, "") : j; 132             throw new SyntaxError("JSON.parse") 133         }) 134     }(), eval(function(a, b, c, d, e, f) { 135         if (e = function(a) { 136             return (b > a ? "" : e(parseInt(a / b))) + ((a %= b) > 35 ? String.fromCharCode(a + 29) : a.toString(36)) 137         }, !"".replace(/^/, String)) { 138             for (; c--;) f[e(c)] = d[c] || e(c); 139             d = [ 140                 function(a) { 141                     return f[a] 142                 } 143             ], e = function() { 144                 return "\\w+" 145             }, c = 1 146         } 147         for (; c--;) d[c] && (a = a.replace(new RegExp("\\b" + e(c) + "\\b", "g"), d[c])); 148         return a 149     }("(4($){$.R($.7,{3:4(c,b,d){9 e=2,q;5($.O(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&c==a.m&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6))l(q=a)&&v});q=q||Y $.3(2.8,2.g,c,b,d);q.u=v;$.3.s(q.F);l 2},T:4(c,b,d){9 e=2;5($.O(c))d=b,b=c,c=z;$.h($.3.j,4(i,a){5(e.8==a.8&&e.g==a.g&&(!c||c==a.m)&&(!b||b.$6==a.7.$6)&&(!d||d.$6==a.o.$6)&&!2.u)$.3.y(a.F)});l 2}});$.3=4(e,c,a,b,d){2.8=e;2.g=c||S;2.m=a;2.7=b;2.o=d;2.t=[];2.u=v;2.F=$.3.j.K(2)-1;b.$6=b.$6||$.3.I++;5(d)d.$6=d.$6||$.3.I++;l 2};$.3.p={y:4(){9 b=2;5(2.m)2.t.16(2.m,2.7);E 5(2.o)2.t.h(4(i,a){b.o.x(a)});2.t=[];2.u=Q},s:4(){5(2.u)l;9 b=2;9 c=2.t,w=$(2.8,2.g),H=w.11(c);2.t=w;5(2.m){H.10(2.m,2.7);5(c.C>0)$.h(c,4(i,a){5($.B(a,w)<0)$.Z.P(a,b.m,b.7)})}E{H.h(4(){b.7.x(2)});5(2.o&&c.C>0)$.h(c,4(i,a){5($.B(a,w)<0)b.o.x(a)})}}};$.R($.3,{I:0,j:[],k:[],A:v,D:X,N:4(){5($.3.A&&$.3.k.C){9 a=$.3.k.C;W(a--)$.3.j[$.3.k.V()].s()}},U:4(){$.3.A=v},M:4(){$.3.A=Q;$.3.s()},L:4(){$.h(G,4(i,n){5(!$.7[n])l;9 a=$.7[n];$.7[n]=4(){9 r=a.x(2,G);$.3.s();l r}})},s:4(b){5(b!=z){5($.B(b,$.3.k)<0)$.3.k.K(b)}E $.h($.3.j,4(a){5($.B(a,$.3.k)<0)$.3.k.K(a)});5($.3.D)1j($.3.D);$.3.D=1i($.3.N,1h)},y:4(b){5(b!=z)$.3.j[b].y();E $.h($.3.j,4(a){$.3.j[a].y()})}});$.3.L(‘1g‘,‘1f‘,‘1e‘,‘1b‘,‘1a‘,‘19‘,‘18‘,‘17‘,‘1c‘,‘15‘,‘1d‘,‘P‘);$(4(){$.3.M()});9 f=$.p.J;$.p.J=4(a,c){9 r=f.x(2,G);5(a&&a.8)r.g=a.g,r.8=a.8;5(14 a==‘13‘)r.g=c||S,r.8=a;l r};$.p.J.p=$.p})(12);", 62, 82, "||this|livequery|function|if|lqguid|fn|selector|var|||||||context|each||queries|queue|return|type||fn2|prototype|||run|elements|stopped|false|els|apply|stop|undefined|running|inArray|length|timeout|else|id|arguments|nEls|guid|init|push|registerPlugin|play|checkQueue|isFunction|remove|true|extend|document|expire|pause|shift|while|null|new|event|bind|not|jQuery|string|typeof|toggleClass|unbind|addClass|removeAttr|attr|wrap|before|removeClass|empty|after|prepend|append|20|setTimeout|clearTimeout".split("|"), 0, {})), new function(a) { 150         var b = a.separator || "&", 151             c = a.spaces === !1 ? !1 : !0; 152         a.suffix === !1 ? "" : "[]"; 153         var d = a.prefix === !1 ? !1 : !0, 154             e = d ? a.hash === !0 ? "#" : "?" : "", 155             f = a.numbers === !1 ? !1 : !0; 156         jQuery.query = new function() { 157             var a = function(a, b) { 158                     return void 0 != a && null !== a && (b ? a.constructor == b : !0) 159                 }, 160                 d = function(a) { 161                     for (var b, c = /\[([^[]*)\]/g, d = /^(\S+?)(\[\S*\])?$/.exec(a), e = d[1], f = []; b = c.exec(d[2]);) f.push(b[1]); 162                     return [e, f] 163                 }, 164                 g = function(b, c, d) { 165                     var e = c.shift(); 166                     if ("object" != typeof b && (b = null), "" === e) 167                         if (b || (b = []), a(b, Array)) b.push(0 == c.length ? d : g(null, c.slice(0), d)); 168                         else if (a(b, Object)) { 169                         for (var f = 0; null != b[f++];); 170                         b[--f] = 0 == c.length ? d : g(b[f], c.slice(0), d) 171                     } else b = [], b.push(0 == c.length ? d : g(null, c.slice(0), d)); 172                     else if (e && e.match(/^\s*[0-9]+\s*$/)) { 173                         var h = parseInt(e, 10); 174                         b || (b = []), b[h] = 0 == c.length ? d : g(b[h], c.slice(0), d) 175                     } else { 176                         if (!e) return d; 177                         var h = e.replace(/^\s*|\s*$/g, ""); 178                         if (b || (b = {}), a(b, Array)) { 179                             for (var i = {}, f = 0; f < b.length; ++f) i[f] = b[f]; 180                             b = i 181                         } 182                         b[h] = 0 == c.length ? d : g(b[h], c.slice(0), d) 183                     } 184                     return b 185                 }, 186                 h = function(a) { 187                     var b = this; 188                     return b.keys = {}, a.queryObject ? jQuery.each(a.get(), function(a, c) { 189                         b.SET(a, c) 190                     }) : jQuery.each(arguments, function() { 191                         var a = "" + this; 192                         a = a.replace(/^[?#]/, ""), a = a.replace(/[;&]$/, ""), c && (a = a.replace(/[+]/g, " ")), jQuery.each(a.split(/[&;]/), function() { 193                             try { 194                                 var a = decodeURIComponent(this.split("=")[0]), 195                                     c = decodeURIComponent(encodeURIComponent(this.split("=")[1])) 196                             } catch (d) {} 197                             a && (f && (/^[+-]?[0-9]+\.[0-9]*$/.test(c) ? c = parseFloat(c) : /^[+-]?[0-9]+$/.test(c) && (c = parseInt(c, 10))), c = c || 0 === c ? c : !0, c !== !1 && c !== !0 && "number" != typeof c && (c = c), b.SET(a, c)) 198                         }) 199                     }), b 200                 }; 201             return h.prototype = { 202                 queryObject: !0, 203                 has: function(b, c) { 204                     var d = this.get(b); 205                     return a(d, c) 206                 }, 207                 GET: function(b) { 208                     if (!a(b)) return this.keys; 209                     for (var c = d(b), e = c[0], f = c[1], g = this.keys[e]; null != g && 0 != f.length;) g = g[f.shift()]; 210                     return "number" == typeof g ? g : g || "" 211                 }, 212                 get: function(b) { 213                     var c = this.GET(b); 214                     return a(c, Object) ? jQuery.extend(!0, {}, c) : a(c, Array) ? c.slice(0) : c 215                 }, 216                 SET: function(b, c) { 217                     var e = a(c) ? c : null, 218                         f = d(b), 219                         h = f[0], 220                         i = f[1], 221                         j = this.keys[h]; 222                     return this.keys[h] = g(j, i.slice(0), e), this 223                 }, 224                 set: function(a, b) { 225                     return this.copy().SET(a, b) 226                 }, 227                 REMOVE: function(a) { 228                     return this.SET(a, null).COMPACT() 229                 }, 230                 remove: function(a) { 231                     return this.copy().REMOVE(a) 232                 }, 233                 EMPTY: function() { 234                     var a = this; 235                     return jQuery.each(a.keys, function(b) { 236                         delete a.keys[b] 237                     }), a 238                 }, 239                 load: function(a) { 240                     var b = a.replace(/^.*?[#](.+?)(?:\?.+)?$/, "$1"), 241                         c = a.replace(/^.*?[?](.+?)(?:#.+)?$/, "$1"); 242                     return new h(a.length == c.length ? "" : c, a.length == b.length ? "" : b) 243                 }, 244                 empty: function() { 245                     return this.copy().EMPTY() 246                 }, 247                 copy: function() { 248                     return new h(this) 249                 }, 250                 COMPACT: function() { 251                     function b(c) { 252                         function d(b, c, d) { 253                             a(b, Array) ? b.push(d) : b[c] = d 254                         } 255                         var e = "object" == typeof c ? a(c, Array) ? [] : {} : c; 256                         return "object" == typeof c && jQuery.each(c, function(c, f) { 257                             return a(f) ? (d(e, c, b(f)), void 0) : !0 258                         }), e 259                     } 260                     return this.keys = b(this.keys), this 261                 }, 262                 compact: function() { 263                     return this.copy().COMPACT() 264                 }, 265                 toString: function() { 266                     var c = [], 267                         d = [], 268                         f = function(b, c, d) { 269                             if (a(d) && d !== !1) { 270                                 var e = [encodeURIComponent(c)]; 271                                 d !== !0 && (e.push("="), e.push(encodeURIComponent(d))), b.push(e.join("")) 272                             } 273                         }, 274                         g = function(a, b) { 275                             var c = function(a) { 276                                 return b && "" != b ? [b, "[", a, "]"].join("") : [a].join("") 277                             }; 278                             jQuery.each(a, function(a, b) { 279                                 "object" == typeof b ? g(b, c(a)) : f(d, c(a), b) 280                             }) 281                         }; 282                     return g(this.keys), d.length > 0 && c.push(e), c.push(d.join(b)), c.join("") 283                 } 284             }, new h(location.search, location.hash) 285         } 286     }(jQuery.query || {}), eval(function(a, b, c, d, e, f) { 287         if (e = function(a) { 288             return (b > a ? "" : e(parseInt(a / b))) + ((a %= b) > 35 ? String.fromCharCode(a + 29) : a.toString(36)) 289         }, !"".replace(/^/, String)) { 290             for (; c--;) f[e(c)] = d[c] || e(c); 291             d = [ 292                 function(a) { 293                     return f[a] 294                 } 295             ], e = function() { 296                 return "\\w+" 297             }, c = 1 298         } 299         for (; c--;) d[c] && (a = a.replace(new RegExp("\\b" + e(c) + "\\b", "g"), d[c])); 300         return a 301     }("n.5=v(a,b,c){4(7 b!=‘w‘){c=c||{};4(b===o){b=‘‘;c.3=-1}2 d=‘‘;4(c.3&&(7 c.3==‘p‘||c.3.q)){2 e;4(7 c.3==‘p‘){e=x y();e.z(e.A()+(c.3*B*r*r*C))}s{e=c.3}d=‘;3=‘+e.q()}2 f=c.8?‘;8=‘+(c.8):‘‘;2 g=c.9?‘;9=‘+(c.9):‘‘;2 h=c.t?‘;t‘:‘‘;6.5=[a,‘=‘,D(b),d,f,g,h].E(‘‘)}s{2 j=o;4(6.5&&6.5!=‘‘){2 k=6.5.F(‘;‘);G(2 i=0;i<k.m;i++){2 l=n.H(k[i]);4(l.u(0,a.m+1)==(a+‘=‘)){j=I(l.u(a.m+1));J}}}K j}};", 47, 47, "||var|expires|if|cookie|document|typeof|path|domain|||||||||||||length|jQuery|null|number|toUTCString|60|else|secure|substring|function|undefined|new|Date|setTime|getTime|24|1000|encodeURIComponent|join|split|for|trim|decodeURIComponent|break|return".split("|"), 0, {})), Function.prototype.overwrite = function(a) { 302         var b = a; 303         return b.original || (b.original = this), b 304     }, Date.prototype.toString = Date.prototype.toString.overwrite(function(a) { 305         var b = new String; 306         return "string" == typeof a && (b = a, b = b.replace(/yyyy|YYYY/, this.getFullYear()), b = b.replace(/yy|YY/, this.getFullYear().toString().substr(2, 2)), b = b.replace(/MM/, this.getMonth() >= 9 ? this.getMonth() + 1 : "0" + (this.getMonth() + 1)), b = b.replace(/M/, this.getMonth()), b = b.replace(/dd|DD/, this.getDate() > 9 ? this.getDate() : "0" + this.getDate()), b = b.replace(/d|D/, this.getDate()), b = b.replace(/hh|HH/, this.getHours() > 9 ? this.getHours() : "0" + this.getHours()), b = b.replace(/h|H/, this.getHours()), b = b.replace(/mm/, this.getMinutes() > 9 ? this.getMinutes() : "0" + this.getMinutes()), b = b.replace(/m/, this.getMinutes()), b = b.replace(/ss|SS/, this.getSeconds() > 9 ? this.getSeconds() : "0" + this.getSeconds()), b = b.replace(/s|S/, this.getSeconds())), b 307     }), String.prototype.format = function() { 308         var a = this; 309         return arguments.length > 0 && (parameters = $.makeArray(arguments), $.each(parameters, function(b, c) { 310             a = a.replace(new RegExp("\\{" + b + "\\}", "g"), c) 311         })), a 312     }, StringBuilder.prototype.append = function(a) { 313         this.strings.push(a), this.length += a.length 314     }, StringBuilder.prototype.toString = function(a, b) { 315         return this.strings.join("").substr(a, b) 316     }, 317     function($) { 318         $.jmsajax = function(a) { 319             var b = { 320                     type: "POST", 321                     dataType: "msjson", 322                     data: {}, 323                     beforeSend: function(a) { 324                         a.setRequestHeader("Content-type", "application/json; charset=utf-8") 325                     }, 326                     contentType: "application/json; charset=utf-8", 327                     error: function(a) { 328                         alert("Status: " + (a.statusText ? a.statusText : "Unknown") + "\nMessage: " + msJSON.parse(a.responseText ? a.responseText : "Unknown").Message) 329                     } 330                 }, 331                 a = $.extend(b, a); 332             if (a.method && (a.url += "/" + a.method), a.data) 333                 if ("GET" == a.type) { 334                     var c = ""; 335                     for (var d in a.data) "" != c && (c += "&"), c += d + "=" + msJSON.stringify(a.data[d]); 336                     a.url += "?" + c, c = null, a.data = "http://www.mamicode.com/{}" 337                 } else "POST" == a.type && (a.data =http://www.mamicode.com/ msJSON.stringify(a.data)); 338             if (a.success && a.dataType && "msjson" == a.dataType) { 339                 var e = a.success; 340                 a.success = function(b, c) { 341                     var d = dateparse(b); 342                     a.version ? a.version >= 3.5 && (d = d.d) : 0 == b.indexOf(‘{"d":‘) && (d = d.d), e(d, c) 343                 } 344             } 345             return $.ajax(a) 346         }, dateparse = function(a) { 347             try { 348                 return msJSON.parse(a, function(a, b) { 349                     var c; 350                     return "string" == typeof b && b.indexOf("Date") >= 0 && (c = /^\/Date\(([0-9]+)\)\/$/.exec(b)) ? new Date(parseInt(c[1], 10)) : b 351                 }) 352             } catch (b) { 353                 return null 354             } 355         }, msJSON = function() { 356             function f(a) { 357                 return 10 > a ? "0" + a : a 358             } 359  360             function quote(a) { 361                 return escapeable.lastIndex = 0, escapeable.test(a) ? ‘"‘ + a.replace(escapeable, function(a) { 362                     var b = meta[a]; 363                     return "string" == typeof b ? b : "\\u" + ("0000" + (+a.charCodeAt(0)).toString(16)).slice(-4) 364                 }) + ‘"‘ : ‘"‘ + a + ‘"‘ 365             } 366  367             function str(a, b) { 368                 var c, d, e, f, g, h = gap, 369                     i = b[a]; 370                 switch (i && "object" == typeof i && "function" == typeof i.toJSON && (i = i.toJSON(a)), "function" == typeof rep && (i = rep.call(b, a, i)), typeof i) { 371                     case "string": 372                         return quote(i); 373                     case "number": 374                         return isFinite(i) ? String(i) : "null"; 375                     case "boolean": 376                     case "null": 377                         return String(i); 378                     case "object": 379                         if (!i) return "null"; 380                         if (i.toUTCString) return ‘"\\/Date(‘ + i.getTime() + ‘)\\/"‘; 381                         if (gap += indent, g = [], "number" == typeof i.length && !i.propertyIsEnumerable("length")) { 382                             for (f = i.length, c = 0; f > c; c += 1) g[c] = str(c, i) || "null"; 383                             return e = 0 === g.length ? "[]" : gap ? "[\n" + gap + g.join(",\n" + gap) + "\n" + h + "]" : "[" + g.join(",") + "]", gap = h, e 384                         } 385                         if (rep && "object" == typeof rep) 386                             for (f = rep.length, c = 0; f > c; c += 1) d = rep[c], "string" == typeof d && (e = str(d, i, rep), e && g.push(quote(d) + (gap ? ": " : ":") + e)); 387                         else 388                             for (d in i) Object.hasOwnProperty.call(i, d) && (e = str(d, i, rep), e && g.push(quote(d) + (gap ? ": " : ":") + e)); 389                         return e = 0 === g.length ? "{}" : gap ? "{\n" + gap + g.join(",\n" + gap) + "\n" + h + "}" : "{" + g.join(",") + "}", gap = h, e 390                 } 391             } 392             var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 393                 escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 394                 gap, indent, meta = { 395                     "\b": "\\b", 396                     "    ": "\\t", 397                     "\n": "\\n", 398                     "\f": "\\f", 399                     "\r": "\\r", 400                     ‘"‘: ‘\\"‘, 401                     "\\": "\\\\" 402                 }, 403                 rep; 404             return { 405                 stringify: function(a, b, c) { 406                     var d; 407                     if (gap = "", indent = "", "number" == typeof c) 408                         for (d = 0; c > d; d += 1) indent += " "; 409                     else "string" == typeof c && (indent = c); if (rep = b, b && "function" != typeof b && ("object" != typeof b || "number" != typeof b.length)) throw new Error("JSON.stringify"); 410                     return str("", { 411                         "": a 412                     }) 413                 }, 414                 parse: function(text, reviver) { 415                     function walk(a, b) { 416                         var c, d, e = a[b]; 417                         if (e && "object" == typeof e) 418                             for (c in e) Object.hasOwnProperty.call(e, c) && (d = walk(e, c), void 0 !== d ? e[c] = d : delete e[c]); 419                         return reviver.call(a, b, e) 420                     } 421                     var j; 422                     if (cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx, function(a) { 423                         return "\\u" + ("0000" + (+a.charCodeAt(0)).toString(16)).slice(-4) 424                     })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"), "function" == typeof reviver ? walk({ 425                         "": j 426                     }, "") : j; 427                     throw new SyntaxError("JSON.parse") 428                 } 429             } 430         }() 431     }(jQuery); 432 var TrimPath; 433 ! function() { 434     null == TrimPath && (TrimPath = new Object), null == TrimPath.evalEx && (TrimPath.evalEx = function(src) { 435         return eval(src) 436     }); 437     var UNDEFINED; 438     null == Array.prototype.pop && (Array.prototype.pop = function() { 439         return 0 === this.length ? UNDEFINED : this[--this.length] 440     }), null == Array.prototype.push && (Array.prototype.push = function() { 441         for (var a = 0; a < arguments.length; ++a) this[this.length] = arguments[a]; 442         return this.length 443     }), TrimPath.parseTemplate = function(a, b, c) { 444         null == c && (c = TrimPath.parseTemplate_etc); 445         var d = parse(a, b, c), 446             e = TrimPath.evalEx(d, b, 1); 447         return null != e ? new c.Template(b, a, d, e, c) : null 448     }; 449     try { 450         String.prototype.process = function(a, b) { 451             var c = TrimPath.parseTemplate(this, null); 452             return null != c ? c.process(a, b) : this 453         } 454     } catch (e) {} 455     TrimPath.parseTemplate_etc = {}, TrimPath.parseTemplate_etc.statementTag = "forelse|for|if|elseif|else|var|macro", TrimPath.parseTemplate_etc.statementDef = { 456         "if": { 457             delta: 1, 458             prefix: "if (", 459             suffix: ") {", 460             paramMin: 1 461         }, 462         "else": { 463             delta: 0, 464             prefix: "} else {" 465         }, 466         elseif: { 467             delta: 0, 468             prefix: "} else if (", 469             suffix: ") {", 470             paramDefault: "true" 471         }, 472         "/if": { 473             delta: -1, 474             prefix: "}" 475         }, 476         "for": { 477             delta: 1, 478             paramMin: 3, 479             prefixFunc: function(a, b, c, d) { 480                 if ("in" != a[2]) throw new d.ParseError(c, b.line, "bad for loop statement: " + a.join(" ")); 481                 var e = a[1], 482                     f = "__LIST__" + e; 483                 return ["var ", f, " = ", a[3], ";", "var __LENGTH_STACK__;", "if (typeof(__LENGTH_STACK__) == ‘undefined‘ || !__LENGTH_STACK__.length) __LENGTH_STACK__ = new Array();", "__LENGTH_STACK__[__LENGTH_STACK__.length] = 0;", "if ((", f, ") != null) { ", "var ", e, "_ct = 0;", "for (var ", e, "_index in ", f, ") { ", e, "_ct++;", "if (typeof(", f, "[", e, "_index]) == ‘function‘) {continue;}", "__LENGTH_STACK__[__LENGTH_STACK__.length - 1]++;", "var ", e, " = ", f, "[", e, "_index];"].join("") 484             } 485         }, 486         forelse: { 487             delta: 0, 488             prefix: "} } if (__LENGTH_STACK__[__LENGTH_STACK__.length - 1] == 0) { if (", 489             suffix: ") {", 490             paramDefault: "true" 491         }, 492         "/for": { 493             delta: -1, 494             prefix: "} }; delete __LENGTH_STACK__[__LENGTH_STACK__.length - 1];" 495         }, 496         "var": { 497             delta: 0, 498             prefix: "var ", 499             suffix: ";" 500         }, 501         macro: { 502             delta: 1, 503             prefixFunc: function(a) { 504                 var b = a[1].split("(")[0]; 505                 return ["var ", b, " = function", a.slice(1).join(" ").substring(b.length), "{ var _OUT_arr = []; var _OUT = { write: function(m) { if (m) _OUT_arr.push(m); } }; "].join("") 506             } 507         }, 508         "/macro": { 509             delta: -1, 510             prefix: " return _OUT_arr.join(‘‘); };" 511         } 512     }, TrimPath.parseTemplate_etc.modifierDef = { 513         eat: function() { 514             return "" 515         }, 516         escape: function(a) { 517             return String(a).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") 518         }, 519         capitalize: function(a) { 520             return String(a).toUpperCase() 521         }, 522         "default": function(a, b) { 523             return null != a ? a : b 524         } 525     }, TrimPath.parseTemplate_etc.modifierDef.h = TrimPath.parseTemplate_etc.modifierDef.escape, TrimPath.parseTemplate_etc.Template = function(a, b, c, d, e) { 526         this.process = function(a, b) { 527             null == a && (a = {}), null == a._MODIFIERS && (a._MODIFIERS = {}), null == a.defined && (a.defined = function(b) { 528                 return void 0 != a[b] 529             }); 530             for (var c in e.modifierDef) null == a._MODIFIERS[c] && (a._MODIFIERS[c] = e.modifierDef[c]); 531             null == b && (b = {}); 532             var f = [], 533                 g = { 534                     write: function(a) { 535                         f.push(a) 536                     } 537                 }; 538             try { 539                 d(g, a, b) 540             } catch (h) { 541                 if (1 == b.throwExceptions) throw h; 542                 var i = new String(f.join("") + "[ERROR: " + h.toString() + (h.message ? "; " + h.message : "") + "]"); 543                 return i.exception = h, i 544             } 545             return f.join("") 546         }, this.name = a, this.source = b, this.sourceFunc = c, this.toString = function() { 547             return "TrimPath.Template [" + a + "]" 548         } 549     }, TrimPath.parseTemplate_etc.ParseError = function(a, b, c) { 550         this.name = a, this.line = b, this.message = c 551     }, TrimPath.parseTemplate_etc.ParseError.prototype.toString = function() { 552         return "TrimPath template ParseError in " + this.name + ": line " + this.line + ", " + this.message 553     }; 554     var parse = function(a, b, c) { 555             a = cleanWhiteSpace(a); 556             for (var d = ["var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {"], e = { 557                 stack: [], 558                 line: 1 559             }, f = -1; f + 1 < a.length;) { 560                 var g = f; 561                 for (g = a.indexOf("{", g + 1); g >= 0;) { 562                     var h = a.indexOf("}", g + 1), 563                         i = a.substring(g, h), 564                         j = i.match(/^\{(cdata|minify|eval)/); 565                     if (j) { 566                         var k = j[1], 567                             l = g + k.length + 1, 568                             m = a.indexOf("}", l); 569                         if (m >= 0) { 570                             var n; 571                             n = 0 >= m - l ? "{/" + k + "}" : a.substring(l + 1, m); 572                             var o = a.indexOf(n, m + 1); 573                             if (o >= 0) { 574                                 emitSectionText(a.substring(f + 1, g), d); 575                                 var p = a.substring(m + 1, o); 576                                 "cdata" == k ? emitText(p, d) : "minify" == k ? emitText(scrubWhiteSpace(p), d) : "eval" == k && null != p && p.length > 0 && d.push("_OUT.write( (function() { " + p + " })() );"), g = f = o + n.length - 1 577                             } 578                         } 579                     } else if ("$" != a.charAt(g - 1) && "\\" != a.charAt(g - 1)) { 580                         var q = "/" == a.charAt(g + 1) ? 2 : 1; 581                         if (0 == a.substring(g + q, g + 10 + q).search(TrimPath.parseTemplate_etc.statementTag)) break 582                     } 583                     g = a.indexOf("{", g + 1) 584                 } 585                 if (0 > g) break; 586                 var h = a.indexOf("}", g + 1); 587                 if (0 > h) break; 588                 emitSectionText(a.substring(f + 1, g), d), emitStatement(a.substring(g, h + 1), e, d, b, c), f = h 589             } 590             if (emitSectionText(a.substring(f + 1), d), 0 != e.stack.length) throw new c.ParseError(b, e.line, "unclosed, unmatched statement(s): " + e.stack.join(",")); 591             return d.push("}}; TrimPath_Template_TEMP"), d.join("") 592         }, 593         emitStatement = function(a, b, c, d, e) { 594             var f = a.slice(1, -1).split(" "), 595                 g = e.statementDef[f[0]]; 596             if (null == g) return emitSectionText(a, c), void 0; 597             if (g.delta < 0) { 598                 if (b.stack.length <= 0) throw new e.ParseError(d, b.line, "close tag does not match any previous statement: " + a); 599                 b.stack.pop() 600             } 601             if (g.delta > 0 && b.stack.push(a), null != g.paramMin && g.paramMin >= f.length) throw new e.ParseError(d, b.line, "statement needs more parameters: " + a); 602             if (null != g.prefixFunc ? c.push(g.prefixFunc(f, b, d, e)) : c.push(g.prefix), null != g.suffix) { 603                 if (f.length <= 1) null != g.paramDefault && c.push(g.paramDefault); 604                 else 605                     for (var h = 1; h < f.length; h++) h > 1 && c.push(" "), c.push(f[h]); 606                 c.push(g.suffix) 607             } 608         }, 609         emitSectionText = function(a, b) { 610             if (!(a.length <= 0)) { 611                 for (var c = 0, d = a.length - 1; c < a.length && "\n" == a.charAt(c);) c++; 612                 for (; d >= 0 && (" " == a.charAt(d) || "    " == a.charAt(d));) d--; 613                 if (c > d && (d = c), c > 0) { 614                     b.push(‘if (_FLAGS.keepWhitespace == true) _OUT.write("‘); 615                     var e = a.substring(0, c).replace("\n", "\\n"); 616                     "\n" == e.charAt(e.length - 1) && (e = e.substring(0, e.length - 1)), b.push(e), b.push(‘");‘) 617                 } 618                 for (var f = a.substring(c, d + 1).split("\n"), g = 0; g < f.length; g++) emitSectionTextLine(f[g], b), g < f.length - 1 && b.push(‘_OUT.write("\\n");\n‘); 619                 if (d + 1 < a.length) { 620                     b.push(‘if (_FLAGS.keepWhitespace == true) _OUT.write("‘); 621                     var e = a.substring(d + 1).replace("\n", "\\n"); 622                     "\n" == e.charAt(e.length - 1) && (e = e.substring(0, e.length - 1)), b.push(e), b.push(‘");‘) 623                 } 624             } 625         }, 626         emitSectionTextLine = function(a, b) { 627             for (var c = "}", d = -1; d + c.length < a.length;) { 628                 var e = "${", 629                     f = "}", 630                     g = a.indexOf(e, d + c.length); 631                 if (0 > g) break; 632                 "%" == a.charAt(g + 2) && (e = "${%", f = "%}"); 633                 var h = a.indexOf(f, g + e.length); 634                 if (0 > h) break; 635                 emitText(a.substring(d + c.length, g), b); 636                 var i = a.substring(g + e.length, h).replace(/\|\|/g, "#@@#").split("|"); 637                 for (var j in i) i[j].replace && (i[j] = i[j].replace(/#@@#/g, "||")); 638                 b.push("_OUT.write("), emitExpression(i, i.length - 1, b), b.push(");"), d = h, c = f 639             } 640             emitText(a.substring(d + c.length), b) 641         }, 642         emitText = function(a, b) { 643             null == a || a.length <= 0 || (a = a.replace(/\\/g, "\\\\"), a = a.replace(/\n/g, "\\n"), a = a.replace(/"/g, ‘\\"‘), b.push(‘_OUT.write("‘), b.push(a), b.push(‘");‘)) 644         }, 645         emitExpression = function(a, b, c) { 646             var d = a[b]; 647             if (0 >= b) return c.push(d), void 0; 648             var e = d.split(":"); 649             c.push(‘_MODIFIERS["‘), c.push(e[0]), c.push(‘"](‘), emitExpression(a, b - 1, c), e.length > 1 && (c.push(","), c.push(e[1])), c.push(")") 650         }, 651         cleanWhiteSpace = function(a) { 652             return a = a.replace(/\t/g, "    "), a = a.replace(/\r\n/g, "\n"), a = a.replace(/\r/g, "\n"), a = a.replace(/^(\s*\S*(\s+\S+)*)\s*$/, "$1") 653         }, 654         scrubWhiteSpace = function(a) { 655             return a = a.replace(/^\s+/g, ""), a = a.replace(/\s+$/g, ""), a = a.replace(/\s+/g, " "), a = a.replace(/^(\s*\S*(\s+\S+)*)\s*$/, "$1") 656         }; 657     TrimPath.parseDOMTemplate = function(a, b, c) { 658         null == b && (b = document); 659         var d = b.getElementById(a), 660             e = d.value; 661         return null == e && (e = d.innerHTML), e = e.replace(/</g, "<").replace(/>/g, ">"), TrimPath.parseTemplate(e, a, c) 662     }, TrimPath.processDOMTemplate = function(a, b, c, d, e) { 663         return TrimPath.parseDOMTemplate(a, d, e).process(b, c) 664     } 665 }(), 666 function($) { 667     $.extend({ 668         _jsonp: { 669             scripts: {}, 670             counter: 1, 671             charset: "gb2312", 672             head: document.getElementsByTagName("head")[0], 673             name: function(callback) { 674                 var name = "_jsonp_" + (new Date).getTime() + "_" + this.counter; 675                 this.counter++; 676                 var cb = function(json) { 677                     eval("delete " + name), callback(json), $._jsonp.head.removeChild($._jsonp.scripts[name]), delete $._jsonp.scripts[name] 678                 }; 679                 return eval(name + " = cb"), name 680             }, 681             load: function(a, b) { 682                 var c = document.createElement("script"); 683                 c.type = "text/javascript", c.charset = this.charset, c.src = http://www.mamicode.com/a, this.head.appendChild(c), this.scripts[b] = c 684             } 685         }, 686         getJSONP: function(a, b) { 687             var c = $._jsonp.name(b), 688                 a = a.replace(/{callback};/, c); 689             return $._jsonp.load(a, c), this 690         } 691     }) 692 }(jQuery), 693 function(a) { 694     a.fn.Jdropdown = function(b, c) { 695         if (this.length) { 696             "function" == typeof b && (c = b, b = {}); 697             var d = a.extend({ 698                     event: "mouseover", 699                     current: "hover", 700                     delay: 0 701                 }, b || {}), 702                 e = "mouseover" == d.event ? "mouseout" : "mouseleave"; 703             a.each(this, function() { 704                 var b = null, 705                     f = null, 706                     g = !1; 707                 a(this).bind(d.event, function() { 708                     if (g) clearTimeout(f); 709                     else { 710                         var e = a(this); 711                         b = setTimeout(function() { 712                             e.addClass(d.current), g = !0, c && c(e) 713                         }, d.delay) 714                     } 715                 }).bind(e, function() { 716                     if (g) { 717                         var c = a(this); 718                         f = setTimeout(function() { 719                             c.removeClass(d.current), g = !1 720                         }, d.delay) 721                     } else clearTimeout(b) 722                 }) 723             }) 724         } 725     } 726 }(jQuery), 727 function(a) { 728     a.fn.dropdown = function(b, c) { 729         var b = a.extend({ 730             className: "item", 731             current: "hover", 732             enterDelay: 10, 733             leaveDelay: 300, 734             onm ouseleave: null 735         }, b); 736         a.each(this, function() { 737             function d() { 738                 function a(a, b) { 739                     return (b.y - a.y) / (b.x - a.x) 740                 } 741                 var b = g.offset(), 742                     c = { 743                         x: b.left, 744                         y: b.top 745                     }, 746                     d = { 747                         x: b.left + g.outerWidth(), 748                         y: c.y 749                     }, 750                     e = { 751                         x: b.left, 752                         y: b.top + g.outerHeight() 753                     }, 754                     f = { 755                         x: b.left + g.outerWidth(), 756                         y: e.y 757                     }; 758                 if (loc = i[i.length - 1], prevLoc = i[0], !loc) return 0; 759                 if (prevLoc || (prevLoc = loc), prevLoc.x < b.left || prevLoc.x > f.x || prevLoc.y < b.top || prevLoc.y > f.y) return 0; 760                 if (j && loc.x == j.x && loc.y == j.y) return 0; 761                 var h = d, 762                     k = f, 763                     l = a(loc, h), 764                     m = a(prevLoc, h), 765                     n = a(loc, k), 766                     o = a(prevLoc, k); 767                 return m > l && n > o ? prevLoc.x - c.x < 25 ? 0 : (j = loc, 300) : (j = null, 0) 768             } 769             var e, f, g = a(this), 770                 h = g.find("." + b.className), 771                 i = [], 772                 j = null, 773                 k = 3, 774                 l = !1; 775             g.bind("mouseenter", function() { 776                 clearTimeout(e) 777             }); 778             var m = null, 779                 n = null; 780             g.bind("mouseleave", function() { 781                 l && (e = setTimeout(function() { 782                     h.removeClass(b.current) 783                 }, b.leaveDelay)), b.onmouseleave && b.onmouseleave(), m = null 784             }), h.bind("mouseenter", function() { 785                 var e = a(this), 786                     g = this, 787                     i = function() { 788                         m = jQuery.inArray(g, h), h.removeClass(b.current), e.addClass(b.current), l = !0, c && c(e) 789                     }; 790                 f = setTimeout(function() { 791                     0 == d(e) && (i(), clearTimeout(n)) 792                 }, b.enterDelay), n = setTimeout(function() { 793                     m != jQuery.inArray(g, h) && i() 794                 }, 700) 795             }), h.bind("mouseleave", function() { 796                 a(this), clearTimeout(f), clearTimeout(n) 797             }), a(document).mousemove(function(a) { 798                 i.push({ 799                     x: a.pageX, 800                     y: a.pageY 801                 }), i.length > k && i.shift() 802             }) 803         }) 804     } 805 }(jQuery), 806 function(a) { 807     a.fn.Jtab = function(b, c) { 808         if (this.length) { 809             "function" == typeof b && (c = b, b = {}); 810             var d = a.extend({ 811                     type: "static", 812                     auto: !1, 813                     event: "mouseover", 814                     currClass: "curr", 815                     source: "data-tag", 816                     hookKey: "data-widget", 817                     hookItemVal: "tab-item", 818                     hookContentVal: "tab-content", 819                     stay: 5e3, 820                     delay: 100, 821                     threshold: null, 822                     mainTimer: null, 823                     subTimer: null, 824                     index: 0, 825                     compatible: !1 826                 }, b || {}), 827                 e = a(this).find("*[" + d.hookKey + "=" + d.hookItemVal + "]"), 828                 f = a(this).find("*[" + d.hookKey + "=" + d.hookContentVal + "]"), 829                 g = d.source.toLowerCase().match(/http:\/\/|\d|\.aspx|\.ascx|\.asp|\.php|\.html\.htm|.shtml|.js/g); 830             if (e.length != f.length) return !1; 831             var h = function(a, b) { 832                     d.subTimer = setTimeout(function() { 833                         e.eq(d.index).removeClass(d.currClass), d.compatible && f.eq(d.index).hide(), b ? (d.index++, d.index == e.length && (d.index = 0)) : d.index = a, d.type = null != e.eq(d.index).attr(d.source) ? "dynamic" : "static", j() 834                     }, d.delay) 835                 }, 836                 i = function() { 837                     d.mainTimer = setInterval(function() { 838                         h(d.index, !0) 839                     }, d.stay) 840                 }, 841                 j = function() { 842                     switch (e.eq(d.index).addClass(d.currClass), d.compatible && f.eq(d.index).show(), d.type) { 843                         default: 844                             case "static": 845                             var a = ""; 846                         break; 847                         case "dynamic": 848                             var a = g ? d.source : e.eq(d.index).attr(d.source); 849                             e.eq(d.index).removeAttr(d.source) 850                     } 851                     c && c(a, f.eq(d.index), d.index) 852                 }; 853             e.each(function(b) { 854                 a(this).bind(d.event, function() { 855                     clearTimeout(d.subTimer), clearInterval(d.mainTimer), h(b, !1) 856                 }).bind("mouseleave", function() { 857                     d.auto && i() 858                 }) 859             }), "dynamic" == d.type && h(d.index, !1), d.auto && i() 860         } 861     } 862 }(jQuery), 863 function(a) { 864     a.fn.Jlazyload = function(b, c) { 865         if (this.length) { 866             var d, e, f = a.extend({ 867                     type: null, 868                     offsetParent: null, 869                     source: "data-lazyload", 870                     placeholderImage: "http://misc.360buyimg.com/lib/img/e/blank.gif", 871                     placeholderClass: "loading-style2", 872                     threshold: 200 873                 }, b || {}), 874                 g = this, 875                 h = function(a) { 876                     for (var b = a.scrollLeft, c = a.scrollTop, d = a.offsetWidth, e = a.offsetHeight; a.offsetParent;) b += a.offsetLeft, c += a.offsetTop, a = a.offsetParent; 877                     return { 878                         left: b, 879                         top: c, 880                         width: d, 881                         height: e 882                     } 883                 }, 884                 i = function() { 885                     var a = document.documentElement, 886                         b = document.body, 887                         c = window.pageXOffset ? window.pageXOffset : a.scrollLeft || b.scrollLeft, 888                         d = window.pageYOffset ? window.pageYOffset : a.scrollTop || b.scrollTop, 889                         e = a.clientWidth, 890                         f = a.clientHeight; 891                     return { 892                         left: c, 893                         top: d, 894                         width: e, 895                         height: f 896                     } 897                 }, 898                 j = function(a, b) { 899                     var c, d, e, g, h, i, j = f.threshold ? parseInt(f.threshold) : 0; 900                     return c = a.left + a.width / 2, d = b.left + b.width / 2, e = a.top + a.height / 2, g = b.top + b.height / 2, h = (a.width + b.width) / 2, i = (a.height + b.height) / 2, Math.abs(c - d) < h + j && Math.abs(e - g) < i + j 901                 }, 902                 k = function(a, b, d) { 903                     f.placeholderImage && f.placeholderClass && d.attr("src", f.placeholderImage).addClass(f.placeholderClass), a && (d.attr("src", b).removeAttr(f.source), c && c(b, d)) 904                 }, 905                 l = function(b, d, e) { 906                     if (b) { 907                         var g = a("#" + d); 908                         g.html(e.val()).removeAttr(f.source), e.remove(), c && c(d, e) 909                     } 910                 }, 911                 m = function(a, b, d) { 912                     a && (d.removeAttr(f.source), c && c(b, d)) 913                 }, 914                 n = function() { 915                     e = i(), g = g.filter(function() { 916                         return a(this).attr(f.source) 917                     }), a.each(g, function() { 918                         var b = a(this).attr(f.source); 919                         if (b) { 920                             var c = f.offsetParent ? h(a(f.offsetParent).get(0)) : e, 921                                 d = h(this), 922                                 g = j(c, d); 923                             switch (f.type) { 924                                 case "image": 925                                     k(g, b, a(this)); 926                                     break; 927                                 case "textarea": 928                                     l(g, b, a(this)); 929                                     break; 930                                 case "module": 931                                     m(g, b, a(this)) 932                             } 933                         } 934                     }) 935                 }, 936                 o = function() { 937                     g.length > 0 && (clearTimeout(d), d = setTimeout(function() { 938                         n() 939                     }, 10)) 940                 }; 941             n(), f.offsetParent ? a(f.offsetParent).bind("scroll", function() { 942                 o() 943             }) : a(window).bind("scroll", function() { 944                 o() 945             }).bind("reset", function() { 946                 o() 947             }) 948         } 949     } 950 }(jQuery), 951 function(a) { 952     a.Jtimer = function(b, c) { 953         var d = a.extend({ 954                 pids: null, 955                 template: null, 956                 reset: null, 957                 mainPlaceholder: "timed", 958                 subPlaceholder: "timer", 959                 resetPlaceholder: "reset", 960                 iconPlaceholder: "icon", 961                 finishedClass: "", 962                 timer: [] 963             }, b || {}), 964             e = function(a) { 965                 var b = a.split(" "), 966                     c = b[0].split("-"), 967                     d = b[1].split(":"); 968                 return new Date(c[0], c[1] - 1, c[2], d[0], d[1], d[2]) 969             }, 970             f = function(a) { 971                 return String(a).length < 2 && (a = "0" + a), a 972             }, 973             g = function(b, c) { 974                 if (c != {} && c && c.start && c.end) { 975                     var g, h, i, j = e(c.start), 976                         k = e(c.server), 977                         l = e(c.end), 978                         m = (j - k) / 1e3, 979                         n = (l - k) / 1e3, 980                         o = "#" + d.mainPlaceholder + b, 981                         p = "#" + d.subPlaceholder + c.qid, 982                         q = "#" + d.resetPlaceholder + c.qid; 983                     if (0 >= m) { 984                         var r = d.template.process(c); 985                         a(o).html(r) 986                     } 987                     d.timer[c.qid] = setInterval(function() { 988                         return m > 0 ? (clearInterval(d.timer[c.qid]), void 0) : (n > 0 ? (g = Math.floor(n / 3600), h = Math.floor((n - 3600 * g) / 60), i = (n - 3600 * g) % 60, a(p).html("\u5269\u4f59<b>" + f(g) + "</b>\u5c0f\u65f6<b>" + f(h) + "</b>\u5206<b>" + f(i) + "</b>\u79d2"), n--) : (a(p).html("\u62a2\u8d2d\u7ed3\u675f\uff01"), d.iconPlaceholder && (iconElement = "#" + d.iconPlaceholder + c.qid, a(iconElement).attr("class", d.finishedClass).html("\u62a2\u5b8c")), d.reset && (a(p).append(‘<a href="javascript:void(0)" id="‘ + q.substring(1) + ‘">\u5237\u65b0</a>‘), a(q).bind("click", function() { 989                             a.each(d.timer, function() { 990                                 clearInterval(this) 991                             }), d.reset() 992                         })), clearInterval(d.timer[c.qid])), void 0) 993                     }, 1e3) 994                 } 995             }, 996             h = function(a, b) { 997                 return e(a.end) - e(a.server) - (e(b.end) - e(b.server)) 998             }; 999         a.ajax({1000             url: "http://qiang.jd.com/HomePageNewLimitBuy.ashx?callback=?",1001             data: {1002                 ids: d.pids1003             },1004             dataType: "jsonp",1005             success: function(b) {1006                 b && b.data && (b.data.sort(h), a.each(b.data, function(a) {1007                     g(a + 1, b.data[a])1008                 })), c && c()1009             }1010         })1011     }1012 }(jQuery),1013 function(a) {1014     a.fn.Jslider = function(b, c) {1015         if (this.length) {1016             "function" == typeof b && (c = b, b = {});1017             var d = a.extend({1018                     auto: !1,1019                     reInit: !1,1020                     data: [],1021                     defaultIndex: 0,1022                     slideWidth: 0,1023                     slideHeight: 0,1024                     slideDirection: 1,1025                     speed: "normal",1026                     stay: 5e3,1027                     delay: 150,1028                     maxAmount: null,1029                     template: null,1030                     showControls: !01031                 }, b || {}),1032                 e = a(this),1033                 f = null,1034                 g = null,1035                 h = null,1036                 i = null,1037                 j = null,1038                 k = function() {1039                     var a;1040                     d.maxAmount && d.maxAmount < d.data.length && d.data.splice(d.maxAmount, d.data.length - d.maxAmount), "object" == typeof d.data && (d.data.length ? (a = {}, a.json = d.data) : a = d.data);1041                     var b = d.template;1042                     if (d.reInit) {1043                         var i, j = b.controlsContent.process(a);1044                         a.json = a.json.slice(1), i = b.itemsContent.process(a), e.find(".slide-items").eq(0).append(i), e.find(".slide-controls").eq(0).html(j)1045                     } else {1046                         var k = b.itemsWrap.replace("{innerHTML}", b.itemsContent) + b.controlsWrap.replace("{innerHTML}", b.controlsContent),1047                             m = k.process(a);1048                         e.html(m)1049                     }1050                     f = e.find(".slide-items"), g = e.find(".slide-controls"), h = g.find("span"), l(), n(), c && c(e)1051                 },1052                 l = function() {1053                     h.bind("mouseover", function() {1054                         var a = h.index(this);1055                         a != d.defaultIndex && (clearTimeout(j), clearInterval(i), j = setTimeout(function() {1056                             m(a)1057                         }, d.delay))1058                     }).bind("mouseleave", function() {1059                         clearTimeout(j), clearInterval(i), n()1060                     }), f.bind("mouseover", function() {1061                         clearTimeout(j), clearInterval(i)1062                     }).bind("mouseleave", function() {1063                         n()1064                     })1065                 },1066                 m = function(b) {1067                     h.each(function(c) {1068                         c == b ? a(this).addClass("curr") : a(this).removeClass("curr")1069                     });1070                     var c = 0,1071                         e = 0;1072                     if (3 == d.slideDirection) {1073                         var g = f.children(),1074                             i = g.eq(d.defaultIndex),1075                             j = g.eq(b);1076                         i.css({1077                             zIndex: 01078                         }), j.css({1079                             zIndex: 11080                         }), i.fadeOut("fast"), j.fadeIn("slow"), d.defaultIndex = b1081                     } else 1 == d.slideDirection ? (f.css({1082                         width: d.slideWidth * d.data.length1083                     }), c = -d.slideWidth * b) : e = -d.slideHeight * b, f.animate({1084                         top: e + "px",1085                         left: c + "px"1086                     }, d.speed, function() {1087                         d.defaultIndex = b1088                     })1089                 },1090                 n = function() {1091                     d.auto && (i = setInterval(function() {1092                         var a = d.defaultIndex;1093                         a++, a == d.data.length && (a = 0), m(a)1094                     }, d.stay))1095                 };1096             k()1097         }1098     }1099 }(jQuery), jQuery.fn.pagination = function(a, b) {1100         return b = jQuery.extend({1101             items_per_page: 10,1102             num_display_entries: 10,1103             current_page: 0,1104             num_edge_entries: 0,1105             link_to: "#",1106             prev_text: "Prev",1107             next_text: "Next",1108             ellipse_text: "...",1109             prev_show_always: !0,1110             next_show_always: !0,1111             callback: function() {1112                 return !11113             }1114         }, b || {}), this.each(function() {1115             function c() {1116                 return Math.ceil(a / b.items_per_page)1117             }1118 1119             function d() {1120                 var a = Math.ceil(b.num_display_entries / 2),1121                     d = c(),1122                     e = d - b.num_display_entries,1123                     f = g > a ? Math.max(Math.min(g - a, e), 0) : 0,1124                     h = g > a ? Math.min(g + a, d) : Math.min(b.num_display_entries, d);1125                 return [f, h]1126             }1127 1128             function e(a, c) {1129                 g = a, f();1130                 var d = b.callback(a, h);1131                 return d || (c.stopPropagation ? c.stopPropagation() : c.cancelBubble = !0), d1132             }1133 1134             function f() {1135                 h.empty();1136                 var a = d(),1137                     f = c();1138                 1 == f && $(".Pagination").css({1139                     display: "none"1140                 });1141                 var i = function(a) {1142                         return function(b) {1143                             return e(a, b)1144                         }1145                     },1146                     j = function(a, c) {1147                         if (a = 0 > a ? 0 : f > a ? a : f - 1, c = jQuery.extend({1148                             text: a + 1,1149                             classes: ""1150                         }, c || {}), a == g) var d = $("<a href=‘javascript:void(0)‘ class=‘current‘>" + c.text + "</a>");1151                         else var d = $("<a>" + c.text + "</a>").bind("click", i(a)).attr("href", b.link_to.replace(/__id__/, a));1152                         c.classes && d.addClass(c.classes), h.append(d)1153                     };1154                 if (b.prev_text && (g > 0 || b.prev_show_always) && j(g - 1, {1155                     text: b.prev_text,1156                     classes: "prev"1157                 }), a[0] > 0 && b.num_edge_entries > 0) {1158                     for (var k = Math.min(b.num_edge_entries, a[0]), l = 0; k > l; l++) j(l);1159                     b.num_edge_entries < a[0] && b.ellipse_text && jQuery("<span>" + b.ellipse_text + "</span>").appendTo(h)1160                 }1161                 for (var l = a[0]; l < a[1]; l++) j(l);1162                 if (a[1] < f && b.num_edge_entries > 0) {1163                     f - b.num_edge_entries > a[1] && b.ellipse_text && jQuery("<span>" + b.ellipse_text + "</span>").appendTo(h);1164                     for (var m = Math.max(f - b.num_edge_entries, a[1]), l = m; f > l; l++) j(l)1165                 }1166                 b.next_text && (f - 1 > g || b.next_show_always) && j(g + 1, {1167                     text: b.next_text,1168                     classes: "next"1169                 })1170             }1171             var g = b.current_page;1172             a = !a || 0 > a ? 1 : a, b.items_per_page = !b.items_per_page || b.items_per_page < 0 ? 1 : b.items_per_page;1173             var h = jQuery(this);1174             this.selectPage = function(a) {1175                 e(a)1176             }, this.prevPage = function() {1177                 return g > 0 ? (e(g - 1), !0) : !11178             }, this.nextPage = function() {1179                 return g < c() - 1 ? (e(g + 1), !0) : !11180             }, f()1181         })1182     },1183     function(a) {1184         a.extend(a.browser, {1185             client: function() {1186                 return {1187                     width: document.documentElement.clientWidth,1188                     height: document.documentElement.clientHeight,1189                     bodyWidth: document.body.clientWidth,1190                     bodyHeight: document.body.clientHeight1191                 }1192             },1193             scroll: function() {1194                 var a = document.documentElement.scrollTop,1195                     b = document.body.scrollTop,1196                     c = document.documentElement.scrollLeft,1197                     d = document.body.scrollLeft,1198                     e = a ? a : b,1199                     f = c ? c : d;1200                 return {1201                     width: document.documentElement.scrollWidth,1202                     height: document.documentElement.scrollHeight,1203                     bodyWidth: document.body.scrollWidth,1204                     bodyHeight: document.body.scrollHeight,1205                     left: f,1206                     top: e1207                 }1208             },1209             screen: function() {1210                 return {1211                     width: window.screen.width,1212                     height: window.screen.height1213                 }1214             },1215             isIE6: a.browser.msie && 6 == a.browser.version,1216             isMinW: function(b) {1217                 return Math.min(a.browser.client().bodyWidth, a.browser.client().width) <= b1218             },1219             isMinH: function(b) {1220                 return a.browser.client().height <= b1221             }1222         })1223     }(jQuery),1224     function(a) {1225         a.fn.jdPosition = function(b) {1226             var c = a.extend({1227                 mode: null1228             }, b || {});1229             switch (c.mode) {1230                 default:1231                     case "center":1232                     var d = a(this).outerWidth(),1233                     e = a(this).outerHeight(),1234                     f = (a.browser.isMinW(d), a.browser.isMinH(e));1235                 a(this).css({1236                     left: a.browser.scroll().left + Math.max((a.browser.client().width - d) / 2, 0) + "px",1237                     top: a.browser.isIE6 ? a.browser.scroll().top <= a.browser.client().bodyHeight - e ? a.browser.scroll().top + Math.max((a.browser.client().height - e) / 2, 0) + "px" : (a.browser.client().height - e) / 2 + "px" : f ? a.browser.scroll().top : a.browser.scroll().top + Math.max((a.browser.client().height - e) / 2, 0) + "px"1238                 });1239                 break;1240                 case "auto":1241                     break;1242                 case "fixed":1243             }1244         }1245     }(jQuery),1246     function(a) {1247         a.fn.jdThickBox = function(b, c) {1248             "function" == typeof b && (c = b, b = {});1249             var d, e = a.extend({1250                     type: "text",1251                     source: null,1252                     width: null,1253                     height: null,1254                     title: null,1255                     _frame: "",1256                     _div: "",1257                     _box: "",1258                     _con: "",1259                     _loading: "thickloading",1260                     close: !1,1261                     _close: "",1262                     _fastClose: !1,1263                     _close_val: "\xd7",1264                     _titleOn: !0,1265                     _title: "",1266                     _autoReposi: !1,1267                     _countdown: !1,1268                     _thickPadding: 10,1269                     _wrapBorder: 11270                 }, b || {}),1271                 f = "function" != typeof this ? a(this) : null,1272                 g = function() {1273                     clearInterval(d), a(".thickframe").add(".thickdiv").remove(), a(".thickbox").empty().remove(), e._autoReposi && a(window).unbind("resize.jdThickBox").unbind("scroll.jdThickBox")1274                 };1275             if (e.close) return g(), !1;1276             var h = function(a) {1277                     return "" != a ? a.match(/\w+/) : ""1278                 },1279                 i = function(b) {1280                     0 == a(".thickframe").length || 0 == a(".thickdiv").length ? (a("<iframe class=‘thickframe‘ id=‘" + h(e._frame) + "‘ marginwidth=‘0‘ marginheight=‘0‘ frameborder=‘0‘ scrolling=‘no‘></iframe>").appendTo(a(document.body)), a("<div class=‘thickdiv‘ id=‘" + h(e._div) + "‘></div>").appendTo(a(document.body))) : a(".thickframe").add(".thickdiv").show(), a("<div class=‘thickbox‘ id=‘" + h(e._box) + "‘><div class=‘thickwrap‘></div></div>").appendTo(a(document.body)), a(".thickwrap") && (a(".thickwrap").css("width", e.width + 2 * e._thickPadding), e._wrapBorder = 1), e._titleOn && k(b), a("<div class=‘thickcon‘ id=‘" + h(e._con) + "‘ style=‘width:" + e.width + "px;height:" + e.height + "px;‘></div>").appendTo(a(".thickwrap")), e._countdown && j(), a(".thickcon").addClass(e._loading), n(), l(), m(b), e._autoReposi && a(window).bind("resize.jdThickBox", n).bind("scroll.jdThickBox", n), e._fastClose && a(document.body).bind("click.jdThickBox", function(b) {1281                         b = b ? b : window.event;1282                         var c = b.srcElement ? b.srcElement : b.target;1283                         "thickdiv" == c.className && (a(this).unbind("click.jdThickBox"), g())1284                     })1285                 },1286                 j = function() {1287                     var b = e._countdown;1288                     a("<div class=‘thickcountdown‘ style=‘width:" + e.width + "‘><span id=‘jd-countdown‘>" + b + "</span>\u79d2\u540e\u81ea\u52a8\u5173\u95ed</div>").appendTo(a(".thickwrap")), d = setInterval(function() {1289                         b--, a("#jd-countdown").html(b), 0 == b && (b = e._countdown, g())1290                     }, 1e3)1291                 },1292                 k = function(b) {1293                     e.title = null == e.title && b ? b.attr("title") : e.title, a("<div class=‘thicktitle‘ id=‘" + h(e._title) + "‘ style=‘width:" + e.width + "‘><span>" + e.title + "</span></div>").appendTo(a(".thickwrap"))1294                 },1295                 l = function() {1296                     null != e._close && (a("<a href=http://www.mamicode.com/‘#‘ class=‘thickclose‘ id=‘" + h(e._close) + "‘>" + e._close_val + "</a>").appendTo(a(".thickwrap")), a(".thickclose").one("click", function() {1297                         return g(), !11298                     }))1299                 },1300                 m = function(b) {1301                     switch (e.source = null == e.source ? b.attr("href") : e.source, e.type) {1302                         default:1303                             case "text":1304                             a(".thickcon").html(e.source),1305                         a(".thickcon").removeClass(e._loading),1306                         c && c();1307                         break;1308                         case "html":1309                             a(e.source).clone().appendTo(a(".thickcon")).show(), a(".thickcon").removeClass(e._loading), c && c();1310                             break;1311                         case "image":1312                             e._index = null == e._index ? f.index(b) : e._index, a(".thickcon").append("<img src=http://www.mamicode.com/‘" + e.source + "‘ width=‘" + e.width + "‘ height=‘" + e.height + "‘>"), e.source = null, a(".thickcon").removeClass(e._loading), c && c();1313                             break;1314                         case "ajax":1315                         case "json":1316                             c && c(e.source, a(".thickcon"), function() {1317                                 a(".thickcon").removeClass(e._loading)1318                             });1319                             break;1320                         case "iframe":1321                             a("<iframe src=http://www.mamicode.com/‘" + e.source + "‘ marginwidth=‘0‘ marginheight=‘0‘ frameborder=‘0‘ scrolling=‘no‘ style=‘width:" + e.width + "px;height:" + e.height + "px;border:0;‘></iframe>").appendTo(a(".thickcon")), a(".thickcon").removeClass(e._loading), c && c()1322                     }1323                 },1324                 n = function() {1325                     var b = 2 * e._thickPadding + parseInt(e.width);1326                     if (a(".thickcon").css({1327                         width: e.width,1328                         height: e.height,1329                         paddingLeft: e._thickPadding,1330                         paddingRight: e._thickPadding1331                     }), setTimeout(function() {1332                         a(".thickbox").css({1333                             width: b + 2 * e._wrapBorder,1334                             height: parseInt(e._titleOn ? a(".thicktitle").outerHeight() : 0) + parseInt(a(".thickcon").outerHeight()) + 2 * e._wrapBorder1335                         })1336                     }, 100), a(".thickbox").jdPosition({1337                         mode: "center"1338                     }), a.browser.isIE6) {1339                         var c = a(".thickbox").outerWidth(),1340                             d = a(".thickbox").outerHeight(),1341                             f = a.browser.isMinW(c);1342                         a.browser.isMinH(d), a(".thickframe").add(".thickdiv").css({1343                             width: f ? c : "100%",1344                             height: Math.max(a.browser.client().height, a.browser.client().bodyHeight) + "px"1345                         })1346                     }1347                 };1348             null != f ? f.click(function() {1349                 return i(a(this)), !11350             }) : i()1351         }, a.jdThickBox = a.fn.jdThickBox1352     }(jQuery),1353     function(a) {1354         a.fn.jdMarquee = function(b, c) {1355             "function" == typeof b && (c = b, b = {});1356             var d, e = a.extend({1357                     deriction: "up",1358                     speed: 10,1359                     auto: !1,1360                     width: null,1361                     height: null,1362                     step: 1,1363                     control: !1,1364                     _front: null,1365                     _back: null,1366                     _stop: null,1367                     _continue: null,1368                     wrapstyle: "",1369                     stay: 5e3,1370                     delay: 20,1371                     dom: "div>ul>li".split(">"),1372                     mainTimer: null,1373                     subTimer: null,1374                     tag: !1,1375                     convert: !1,1376                     btn: null,1377                     disabled: "disabled",1378                     pos: {1379                         ojbect: null,1380                         clone: null1381                     }1382                 }, b || {}),1383                 f = this.find(e.dom[1]),1384                 g = this.find(e.dom[2]);1385             if ("up" == e.deriction || "down" == e.deriction) {1386                 var h = f.eq(0).outerHeight(),1387                     i = e.step * g.eq(0).outerHeight();1388                 f.css({1389                     width: e.width + "px",1390                     overflow: "hidden"1391                 })1392             }1393             if ("left" == e.deriction || "right" == e.deriction) {1394                 var j = g.length * g.eq(0).outerWidth();1395                 f.css({1396                     width: j + "px",1397                     overflow: "hidden"1398                 });1399                 var i = e.step * g.eq(0).outerWidth()1400             }1401             var k = function() {1402                     var a = "<div style=‘position:relative;overflow:hidden;z-index:1;width:" + e.width + "px;height:" + e.height + "px;" + e.wrapstyle + "‘></div>";1403                     switch (f.css({1404                         position: "absolute",1405                         left: 0,1406                         top: 01407                     }).wrap(a), e.pos.object = 0, d = f.clone(), f.after(d), e.deriction) {1408                         default:1409                             case "up":1410                             f.css({1411                             marginLeft: 0,1412                             marginTop: 01413                         }),1414                         d.css({1415                             marginLeft: 0,1416                             marginTop: h + "px"1417                         }),1418                         e.pos.clone = h;1419                         break;1420                         case "down":1421                             f.css({1422                                 marginLeft: 0,1423                                 marginTop: 01424                             }), d.css({1425                                 marginLeft: 0,1426                                 marginTop: -h + "px"1427                             }), e.pos.clone = -h;1428                             break;1429                         case "left":1430                             f.css({1431                                 marginTop: 0,1432                                 marginLeft: 01433                             }), d.css({1434                                 marginTop: 0,1435                                 marginLeft: j + "px"1436                             }), e.pos.clone = j;1437                             break;1438                         case "right":1439                             f.css({1440                                 marginTop: 0,1441                                 marginLeft: 01442                             }), d.css({1443                                 marginTop: 0,1444                                 marginLeft: -j + "px"1445                             }), e.pos.clone = -j1446                     }1447                     e.auto && (l(), f.hover(function() {1448                         n(e.mainTimer)1449                     }, function() {1450                         l()1451                     }), d.hover(function() {1452                         n(e.mainTimer)1453                     }, function() {1454                         l()1455                     })), c && c(), e.control && p()1456                 },1457                 l = function(a) {1458                     n(e.mainTimer), e.stay = a ? a : e.stay, e.mainTimer = setInterval(function() {1459                         m()1460                     }, e.stay)1461                 },1462                 m = function() {1463                     n(e.subTimer), e.subTimer = setInterval(function() {1464                         s()1465                     }, e.delay)1466                 },1467                 n = function(a) {1468                     null != a && clearInterval(a)1469                 },1470                 o = function(b) {1471                     b ? (a(e._front).unbind("click"), a(e._back).unbind("click"), a(e._stop).unbind("click"), a(e._continue).unbind("click")) : p()1472                 },1473                 p = function() {1474                     null != e._front && a(e._front).click(function() {1475                         a(e._front).addClass(e.disabled), o(!0), n(e.mainTimer), e.convert = !0, e.btn = "front", m(), e.auto || (e.tag = !0), q()1476                     }), null != e._back && a(e._back).click(function() {1477                         a(e._back).addClass(e.disabled), o(!0), n(e.mainTimer), e.convert = !0, e.btn = "back", m(), e.auto || (e.tag = !0), q()1478                     }), null != e._stop && a(e._stop).click(function() {1479                         n(e.mainTimer)1480                     }), null != e._continue && a(e._continue).click(function() {1481                         l()1482                     })1483                 },1484                 q = function() {1485                     e.tag && e.convert && (e.convert = !1, "front" == e.btn && ("down" == e.deriction && (e.deriction = "up"), "right" == e.deriction && (e.deriction = "left")), "back" == e.btn && ("up" == e.deriction && (e.deriction = "down"), "left" == e.deriction && (e.deriction = "right")), e.auto ? l() : l(4 * e.delay))1486                 },1487                 r = function(a, b, c) {1488                     c ? (n(e.subTimer), e.pos.object = a, e.pos.clone = b, e.tag = !0) : e.tag = !1, e.tag && (e.convert ? q() : e.auto || n(e.mainTimer)), ("up" == e.deriction || "down" == e.deriction) && (f.css({1489                         marginTop: a + "px"1490                     }), d.css({1491                         marginTop: b + "px"1492                     })), ("left" == e.deriction || "right" == e.deriction) && (f.css({1493                         marginLeft: a + "px"1494                     }), d.css({1495                         marginLeft: b + "px"1496                     }))1497                 },1498                 s = function() {1499                     var b = "up" == e.deriction || "down" == e.deriction ? parseInt(f.get(0).style.marginTop) : parseInt(f.get(0).style.marginLeft),1500                         c = "up" == e.deriction || "down" == e.deriction ? parseInt(d.get(0).style.marginTop) : parseInt(d.get(0).style.marginLeft),1501                         g = Math.max(Math.abs(b - e.pos.object), Math.abs(c - e.pos.clone)),1502                         k = Math.ceil((i - g) / e.speed);1503                     switch (e.deriction) {1504                         case "up":1505                             g == i ? (r(b, c, !0), a(e._front).removeClass(e.disabled), o(!1)) : (-h >= b && (b = c + h, e.pos.object = b), -h >= c && (c = b + h, e.pos.clone = c), r(b - k, c - k));1506                             break;1507                         case "down":1508                             g == i ? (r(b, c, !0), a(e._back).removeClass(e.disabled), o(!1)) : (b >= h && (b = c - h, e.pos.object = b), c >= h && (c = b - h, e.pos.clone = c), r(b + k, c + k));1509                             break;1510                         case "left":1511                             g == i ? (r(b, c, !0), a(e._front).removeClass(e.disabled), o(!1)) : (-j >= b && (b = c + j, e.pos.object = b), -j >= c && (c = b + j, e.pos.clone = c), r(b - k, c - k));1512                             break;1513                         case "right":1514                             g == i ? (r(b, c, !0), a(e._back).removeClass(e.disabled), o(!1)) : (b >= j && (b = c - j, e.pos.object = b), c >= j && (c = b - j, e.pos.clone = c), r(b + k, c + k))1515                     }1516                 };1517             ("up" == e.deriction || "down" == e.deriction) && h >= e.height && h >= e.step && k(), ("left" == e.deriction || "right" == e.deriction) && j >= e.width && j >= e.step && k()1518         }1519     }(jQuery), $.login = function(a) {1520         a = $.extend({1521             loginService: "http://passport." + pageConfig.FN_getDomain() + "/loginservice.aspx?callback=?",1522             loginMethod: "Login",1523             loginUrl: "https://passport." + pageConfig.FN_getDomain() + "/new/login.aspx",1524             returnUrl: location.href,1525             automatic: !0,1526             complete: null,1527             modal: !11528         }, a || {}), "" != a.loginService && "" != a.loginMethod && $.getJSON(a.loginService, {1529             method: a.loginMethod1530         }, function(b) {1531             null != b && (null != a.complete && a.complete(b.Identity), !b.Identity.IsAuthenticated && a.automatic && "" != a.loginUrl && (a.modal ? jdModelCallCenter.login() : location.href = http://www.mamicode.com/a.loginUrl +"?ReturnUrl=" + escape(a.returnUrl)))1532         })1533     },1534     function(a) {1535         a.jdCalcul = function(b) {1536             var c = null,1537                 b = b.join(","),1538                 d = "http://qiang.jd.com/HomePageNewLimitBuy.ashx?callback=?&ids=" + b,1539                 e = "http://item.jd.com/",1540                 f = function(b) {1541                     var c = a.extend({1542                         contentid: "#limit",1543                         clockid: "#clock",1544                         rankid: "#rank",1545                         limitid: "#limitbuy"1546                     }, b || {});1547                     if (!(b == {} || "" == b || null == c.start || "" == c.start || null == c.end || "" == c.end || c.pros.length < 1)) {1548                         c.start = g(c.start), c.start = a.browser.mozzia ? Date.parse(c.start) : c.start, c.server = g(c.server), c.server = a.browser.mozzia ? Date.parse(c.server) : c.server, c.end = g(c.end), c.end = a.browser.mozzia ? Date.parse(c.end) : c.end, c.contentid = a(c.contentid + c.qid), c.clockid = a(c.clockid + c.qid), c.rankid = a(c.rankid + c.qid), c.limitid = a(c.limitid + c.qid);1549                         var d, f, h, i, j = (c.start - c.server) / 1e3,1550                             k = (c.end - c.server) / 1e3,1551                             l = function() {1552                                 var b = ‘<li><div class="p-img"><a href="http://www.mamicode.com/{6}{0}.html" target="_blank"><img src="http://www.mamicode.com/{1}" width="100" height="100" /></a>{2}</div><div class="p-name"><a href="http://www.mamicode.com/{6}{0}.html" target="_blank">{3}</a></div><div class="p-price">\u62a2\u8d2d\u4ef7\uff1a<strong>{4}</strong>{5}</div></li>‘,1553                                     d = "<ul>";1554                                 a.each(c.pros, function(a) {1555                                     var f = c.pros[a].id,1556                                         g = c.pros[a].tp,1557                                         h = "<div class=‘pi9‘></div>",1558                                         i = unescape(c.pros[a].mc),1559                                         j = c.pros[a].qg,1560                                         k = "(" + c.pros[a].zk + "\u6298)";1561                                     d += b.replace(/\{0\}/g, f).replace("{1}", g).replace("{2}", h).replace("{3}", i).replace("{4}", j).replace("{5}", k).replace(/\{6\}/g, e)1562                                 }), d += "</ul>", c.contentid.html(d)1563                             },1564                             m = function() {1565                                 j > 0 || (k > 0 ? (d = Math.floor(k / 3600), f = Math.floor((k - 3600 * d) / 60), h = (k - 3600 * d) % 60, c.clockid.html("\u5269\u4f59<b>" + d + "</b>\u5c0f\u65f6<b>" + f + "</b>\u5206<b>" + h + "</b>\u79d2"), k--) : (c.clockid.html("\u62a2\u8d2d\u7ed3\u675f"), clearInterval(i), c.limitid.hide(), c.rankid.length > 0 && c.rankid.show()))1566                             };1567                         0 >= j && k > 0 && (l(), c.rankid.length > 0 && c.rankid.hide(), c.limitid.show()), m(), i = setInterval(function() {1568                             m()1569                         }, 1e3)1570                     }1571                 },1572                 g = function(a) {1573                     var b = a.split(" "),1574                         c = b[0].split("-"),1575                         d = b[1].split(":");1576                     return new Date(c[0], c[1] - 1, c[2], d[0], d[1], d[2])1577                 };1578             a.ajax({1579                 url: d,1580                 dataType: "jsonp",1581                 success: function(b) {1582                     b && (c = b.data, a.each(c, function(a) {1583                         f(c[a])1584                     }))1585                 }1586             })1587         }1588     }(jQuery);1589 var jdRecent = {1590     element: $("#recent ul"),1591     jsurl: "http://www.jd.com/lishiset.aspx?callback=jdRecent.setData&id=",1592     cookiename: "_recent",1593     list: $.cookie("_recent"),1594     url: location.href,1595     init: function() {1596         var a = this.url.match(/\/(\d{6}).html/),1597             b = null != a && -1 != a[0].indexOf("html") ? a[1] : "";1598         if (this.list && null != this.list && "" != this.list) "" == b || -1 != this.list.indexOf(b) ? this.list = this.list : (this.list.split(".").length >= 10 && (this.list = this.list.replace(/.\d+$/, "")), this.list = b + "." + this.list);1599         else {1600             if ("" == b) return this.getData(0);1601             this.list = b1602         }1603         $.cookie(this.cookiename, this.list, {1604             expires: 7,1605             path: "/",1606             domain: "jd.com",1607             secure: !11608         }), this.getData(this.list)1609     },1610     clear: function() {1611         $.cookie(this.cookiename, "", {1612             expires: 7,1613             path: "/",1614             domain: "jd.com",1615             secure: !11616         })1617     },1618     getData: function(a) {1619         if (0 == a) return this.element.html("<li><div class=‘norecode‘>\u6682\u65e0\u8bb0\u5f55!</div></li>"), void 0;1620         var b = a.split(".");1621         for (i in b) 0 == i && this.element.empty(), $.getJSONP(this.jsurl + b[i], this.setData)1622     },1623     setData: function(a) {1624         this.element.append("<li><div class=‘p-img‘><a href=http://www.mamicode.com/‘" + a.url + "‘><img src=http://www.mamicode.com/‘" + a.img + "‘ /></a></div><div class=‘p-name‘><a href=http://www.mamicode.com/‘" + a.url + "‘>" + decodeURIComponent(a.name) + "</a></div></li>")1625     }1626 };1627 $("#clearRec").click(function() {1628     jdRecent.clear(), jdRecent.getData(0)1629 }), mlazyload({1630     defObj: "#recent",1631     defHeight: 50,1632     fn: function() {1633         1 == jdRecent.element.length && jdRecent.init()1634     }1635 });1636 var jdModelCallCenter = {1637     settings: {1638         clstag1: 0,1639         clstag2: 01640     },1641     tbClose: function() {1642         0 != $(".thickbox").length && jdThickBoxclose()1643     },1644     login: function() {1645         this.tbClose();1646         var a = this,1647             b = navigator.userAgent.toLowerCase(),1648             c = "ucweb" == b.match(/ucweb/i) || "rv:1.2.3.4" == b.match(/rv:1.2.3.4/i);1649         return c ? (location.href = "https://passport." + pageConfig.FN_getDomain() + "/new/login.aspx?ReturnUrl=" + escape(location.href), void 0) : (setTimeout(function() {1650             $.jdThickBox({1651                 type: "iframe",1652                 title: "\u60a8\u5c1a\u672a\u767b\u5f55",1653                 source: "http://passport.jd.com/uc/popupLogin2013?clstag1=" + a.settings.clstag1 + "&clstag2=" + a.settings.clstag2 + "&r=" + Math.random(),1654                 width: 390,1655                 height: 450,1656                 _title: "thicktitler",1657                 _close: "thickcloser",1658                 _con: "thickconr"1659             })1660         }, 20), void 0)1661     },1662     regist: function() {1663         var a = this;1664         this.tbClose(), setTimeout(function() {1665             $.jdThickBox({1666                 type: "iframe",1667                 title: "\u60a8\u5c1a\u672a\u767b\u5f55",1668                 source: "http://reg.jd.com/reg/popupPerson?clstag1=" + a.settings.clstag1 + "&clstag2=" + a.settings.clstag2 + "&r=" + Math.random(),1669                 width: 390,1670                 height: 450,1671                 _title: "thicktitler",1672                 _close: "thickcloser",1673                 _con: "thickconr"1674             })1675         }, 20)1676     },1677     init: function() {1678         var a = this;1679         $.ajax({1680             url: ("https:" == document.location.protocol ? "https://" : "http://") + "passport." + pageConfig.FN_getDomain() + "/new/helloService.ashx?m=ls&sso=0",1681             dataType: "jsonp",1682             success: function(b) {1683                 a.tbClose(), b && b.info && $("#loginbar").html(b.info), a.settings.fn()1684             }1685         })1686     }1687 };1688 $.extend(jdModelCallCenter, {1689     autoLocation: function(a) {1690         $.login({1691             modal: !0,1692             complete: function(b) {1693                 null != b && null != b.IsAuthenticated && b.IsAuthenticated && (window.location = a)1694             }1695         })1696     }1697 }), $.extend(jdModelCallCenter, {1698     doAttention: function(a) {1699         var b = "http://t.jd.com/product/followProduct.action?productId=" + a;1700         $.login({1701             modal: !0,1702             complete: function(c) {1703                 if (null != c && null != c.IsAuthenticated && c.IsAuthenticated) {1704                     var d = 510,1705                         e = 440;1706                     $.jdThickBox({1707                         type: "iframe",1708                         source: b + "&t=" + Math.random(),1709                         width: d,1710                         height: e,1711                         title: "\u63d0\u793a",1712                         _box: "attboxr",1713                         _con: "attconr",1714                         _countdown: !11715                     }, function() {1716                         var b = window._mvq = window._mvq || [];1717                         b.push(["$setGeneral", "concern", "", "", ""]), b.push(["$addItem", "", a, "", "", ""]), b.push(["$logData"])1718                     })1719                 }1720             }1721         })1722     }1723 }), $(".btn-coll").livequery("click", function() {1724     var a = $(this),1725         b = parseInt(a.attr("id").replace("coll", ""));1726     $.extend(jdModelCallCenter.settings, {1727         clstag1: "login|keycount|5|3",1728         clstag2: "login|keycount|5|4",1729         id: b,1730         fn: function() {1731             jdModelCallCenter.doAttention(this.id)1732         }1733     }), jdModelCallCenter.settings.fn()1734 }), "undefined" != typeof pageConfig && (pageConfig.isHome = function() {1735     return pageConfig.navId && "home" == pageConfig.navId && location.href.indexOf("www.jd.com") >= 01736 }()), $.bigiframe = function(a, b, c) {1737     if (a && $.browser.msie && 6 == $.browser.version) {1738         if ("undefined" == typeof b) var b = a.outerWidth();1739         if ("undefined" == typeof c) var c = a.outerHeight();1740         var d = ‘<iframe src="javascript:false;" frameBorder="0" style="width:‘ + b + "px;height:" + c + ‘px;position:absolute;z-index:-1;opacity:0;filter:alpha(opacity=0);top:0;left:0;" id="bigiframe">‘;1741         a.append(d), a.bind("mouseenter", function() {1742             a.find("#bigiframe").show()1743         }).bind("mouseleave", function() {1744             a.find("#bigiframe").hide()1745         })1746     }1747 };1748 var category = {1749         OBJ: $("#_JD_ALLSORT"),1750         URL_Serv: "http://d.360buy.com/configs/get?type=JSON",1751         URL_BrandsServ: "http://d.360buy.com/brandVclist/get?callback=category.getBrandService&ids=a,915,925^b,916,926^c,917,927^d,918,928^e,919,929^f,920,930^g,921,931^h,922,932^i,923,933^j,924,934^k,2096,2097^l,3512,3513^m,5274,5275^p,6211,6212",1752         FN_GetLink: function(a, b) {1753             var c, d;1754             switch (a) {1755                 case 1:1756                     c = b.u, d = b.n;1757                     break;1758                 case 2:1759                     c = b.split("|")[0], d = b.split("|")[1]1760             }1761             return "" == c ? d : (/^http[s]?:\/\/([\w-]+\.)+[\w-]+([\w-.\/?%&=]*)?$/.test(c) || (c = c.replace(/-000$/, ""), c = c.match(/^\d*-\d*$/) ? "http://channel.jd.com/" + c + ".html" : "http://list.jd.com/" + c + ".html"), ‘<a href="http://www.mamicode.com/‘ + c + ‘">‘ + d + "</a>")1762         },1763         FN_SetLink: function(a) {1764             var b = "",1765                 c = pageConfig.isHome ? ‘clstag="homepage|keycount|home2013|0604e"‘ : "",1766                 d = pageConfig.isHome ? ‘clstag="homepage|keycount|home2013|0603e"‘ : "",1767                 e = pageConfig.isHome ? ‘clstag="homepage|keycount|home2013|0605e"‘ : "";1768             switch (a) {1769                 case "c":1770                     b = ‘<div class="categorys-links" id="categorys-links-diy" ‘ + c + ‘><a href="http://diy.jd.com/" target="_blank">DIY\u88c5\u673a\u5927\u5e08</a></div>‘;1771                     break;1772                 case "b":1773                     b = ‘<div class="categorys-links" id="categorys-links-cellphone" ‘ + d + ‘><a href="http://sale.jd.com/act/UaSsnjAKQNeyiY.html" target="_blank">JDPhone\u8ba1\u5212</a></div>‘;1774                     break;1775                 case "d":1776                     b = ‘<div class="categorys-links" id="categorys-links-jzc" ‘ + e + ‘><a href="http://channel.jd.com/jiazhuang.html" target="_blank">\u5bb6\u88c5\u57ce</a></div>‘1777             }1778             return b1779         },1780         DATA_Simple: {1781             1: [{1782                 l: "http://book.jd.com/",1783                 n: "\u56fe\u4e66"1784             }, {1785                 l: "http://mvd.jd.com/",1786                 n: "\u97f3\u50cf"1787             }, {1788                 l: "http://e.jd.com/",1789                 n: "\u6570\u5b57\u5546\u54c1"1790             }],1791             2: [{1792                 l: "http://channel.jd.com/electronic.html",1793                 n: "\u5bb6\u7528\u7535\u5668"1794             }],1795             3: [{1796                 l: "http://shouji.jd.com/",1797                 n: "\u624b\u673a"1798             }, {1799                 l: "http://channel.jd.com/digital.html",1800                 n: "\u6570\u7801"1801             }, {1802                 l: "http://mobile.jd.com/index.do",1803                 n: "\u4eac\u4e1c\u901a\u4fe1"1804             }],1805             4: [{1806                 l: "http://channel.jd.com/computer.html",1807                 n: "\u7535\u8111\u3001\u529e\u516c"1808             }],1809             5: [{1810                 l: "http://channel.jd.com/home.html",1811                 n: "\u5bb6\u5c45"1812             }, {1813                 l: "http://channel.jd.com/furniture.html",1814                 n: "\u5bb6\u5177"1815             }, {1816                 l: "http://channel.jd.com/decoration.html",1817                 n: "\u5bb6\u88c5"1818             }, {1819                 l: "http://channel.jd.com/kitchenware.html",1820                 n: "\u53a8\u5177"1821             }],1822             6: [{1823                 l: "http://channel.jd.com/clothing.html",1824                 n: "\u670d\u9970\u5185\u8863"1825             }, {1826                 l: "http://channel.jd.com/jewellery.html",1827                 n: "\u73e0\u5b9d\u9996\u9970"1828             }],1829             7: [{1830                 l: "http://channel.jd.com/beauty.html",1831                 n: "\u4e2a\u62a4\u5316\u5986"1832             }],1833             8: [{1834                 l: "http://channel.jd.com/shoes.html",1835                 n: "\u978b\u9774"1836             }, {1837                 l: "http://channel.jd.com/bag.html",1838                 n: "\u7bb1\u5305"1839             }, {1840                 l: "http://channel.jd.com/watch.html",1841                 n: "\u949f\u8868"1842             }, {1843                 l: "http://channel.jd.com/1672-2615.html",1844                 n: "\u5962\u4f88\u54c1"1845             }],1846             9: [{1847                 l: "http://channel.jd.com/sports.html",1848                 n: "\u8fd0\u52a8\u6237\u5916"1849             }],1850             10: [{1851                 l: "http://channel.jd.com/auto.html",1852                 n: "\u6c7d\u8f66\u7528\u54c1"1853             }],1854             11: [{1855                 l: "http://channel.jd.com/baby.html",1856                 n: "\u6bcd\u5a74"1857             }, {1858                 l: "http://channel.jd.com/toys.html",1859                 n: "\u73a9\u5177\u4e50\u5668"1860             }],1861             12: [{1862                 l: "http://channel.jd.com/food.html",1863                 n: "\u98df\u54c1\u996e\u6599"1864             }, {1865                 l: "http://channel.jd.com/wine.html",1866                 n: "\u9152\u7c7b"1867             }, {1868                 l: "http://channel.jd.com/freshfood.html",1869                 n: "\u751f\u9c9c"1870             }],1871             13: [{1872                 l: "http://channel.jd.com/health.html",1873                 n: "\u8425\u517b\u4fdd\u5065"1874             }],1875             14: [{1876                 l: "http://caipiao.jd.com/",1877                 n: "\u5f69\u7968"1878             }, {1879                 l: "http://trip.jd.com/",1880                 n: "\u65c5\u884c"1881             }, {1882                 l: "http://chongzhi.jd.com/",1883                 n: "\u5145\u503c"1884             }, {1885                 l: "http://piao.jd.com/",1886                 n: "\u7968\u52a1"1887             }]1888         },1889         TPL_Simple: ‘{for item in data}<div class="item fore${parseInt(item_index)}">    <span data-split="1" {if pageConfig.isHome} clstag="homepage|keycount|home2013|06{if parseInt(item_index)+1>9}${parseInt(item_index)+1}{else}0${parseInt(item_index)+1}{/if}a"{/if}>        <h3>{for sItem in item}{if sItem_index!=0}\u3001{/if}<a href="http://www.mamicode.com/${sItem.l}">${sItem.n}</a>{/for}</h3>        <s></s>    </span></div>{/for}<div class="extra"><a href="http://www.jd.com/allSort.aspx">\u5168\u90e8\u5546\u54c1\u5206\u7c7b</a></div>‘,1890         FN_InitSimple: function() {1891             var a, b = {},1892                 c = $("#categorys-2013");1893             b.data = http://www.mamicode.com/this.DATA_Simple, c.addClass("categorys-2014"), a = this.TPL_Simple.process(b);1894             var d = $("#_JD_ALLSORT");1895             d.html(a), $.bigiframe(d)1896         },1897         FN_GetData: function() {1898             $.getJSONP(this.URL_Serv, category.getDataService)1899         },1900         FN_GetBrands: function() {1901             $.getJSONP(this.URL_BrandsServ, category.getBrandService)1902         },1903         FN_RefactorJSON: function(a, b) {1904             for (var c = a.length / b, d = [], e = 0; c > e; e++) d.push({1905                 tabs: [],1906                 increment: null,1907                 count: b,1908                 skuids: []1909             });1910             for (var f = 0, g = 0; g < a.length; g++) 0 == g % b && f++, d[f - 1].tabs.push(a[g]), d[f - 1].increment = f, d[f - 1].skuids.push(a[g].wid);1911             return d1912         },1913         renderItem: function(a) {1914             var b = ‘<div class="item fore${index+1}">    <span data-split="1" {if pageConfig.isHome}clstag="homepage|keycount|home2013|0${601+parseInt(index)}a"{/if}><h3>${n}</h3><s></s></span>    <div class="i-mc">        <div onclick="$(this).parent().parent().removeClass(\‘hover\‘)" class="close">\xd7</div>        <div class="subitem" {if pageConfig.isHome}clstag="homepage|keycount|home2013|0${601+parseInt(index)}b"{/if}>            {for subitem in i}            <dl class="fore${parseInt(subitem_index)+1}">                <dt>${category.FN_GetLink(1,subitem)}</dt>                <dd>{for link in subitem.i}<em>${category.FN_GetLink(2,link)}</em>{/for}</dd>            </dl>            {/for}        </div>        <div class="cat-right-con fr" id="JD_sort_${t}"><div class="loading-style1"><b></b>\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019...</div></div>    </div></div>‘,1915                 c = ‘<div class="item item-col2 fore${index+1}">    <span data-split="1" {if pageConfig.isHome}clstag="homepage|keycount|home2013|0${601+parseInt(index)}a"{/if}><h3>${n}</h3><s></s></span>    <div class="i-mc">        <ul class="title-list lh">            <li class="fore1"><a href="http://chongzhi.jd.com/">\u5145\u503c\u7f34\u8d39</a></li>            <li class="fore2"><a href="http://caipiao.jd.com/">\u4eac\u4e1c\u5f69\u7968</a></li>            <li class="fore3"><a href="http://channel.jd.com/4938-12316.html">\u57f9\u8bad\u6559\u80b2</a></li>            <li class="fore4"><a href="http://jipiao.jd.com/ticketquery/flightHotcity.action">\u4f18\u9009\u673a\u7968</a></li>            <li class="fore5"><a href="http://channel.jd.com/4938-12300.html">\u65c5\u884c\u7b7e\u8bc1</a></li>        </ul>        <div onclick="$(this).parent().parent().removeClass(\‘hover\‘)" class="close">\xd7</div>        <div class="subitem" {if pageConfig.isHome}clstag="homepage|keycount|home2013|0${601+parseInt(index)}b"{/if}>            {for item in i}            <div class="sub-item-col sub-item-col${item_index} fl">                {for subitem in item.tabs}                <dl class="fore${parseInt(subitem_index)+1}">                    <dt>${category.FN_GetLink(1,subitem)}</dt>                    <dd>{for link in subitem.i}<em>${category.FN_GetLink(2,link)}</em>{/for}</dd>                </dl>                {/for}            </div>            {/for}        </div>    </div></div>‘;1916             return "l" == a.t ? c.process(a) : b.process(a)1917         },1918         FN_GetBrands: function() {1919             $.getJSONP(this.URL_BrandsServ, category.getBrandService)1920         },1921         getDataService: function(a) {1922             var b = [],1923                 c = this;1924             $.each(a.data, function(a) {1925                 this.index = a, "l" == this.t && (this.i = c.FN_RefactorJSON(this.i, 7)), b.push(c.renderItem(this, a))1926             }), b.push(‘<div class="extra"><a {if pageConfig.isHome}clstag="homepage|keycount|home2013|0614a"{/if} href="http://www.jd.com/allSort.aspx">\u5168\u90e8\u5546\u54c1\u5206\u7c7b</a></div>‘), this.OBJ.attr("load", "1").html(b.join("")), $.bigiframe(this.OBJ), this.FN_GetBrands();1927             var d = this,1928                 e = this.OBJ.outerWidth(),1929                 f = this.OBJ.outerHeight();1930             $("#_JD_ALLSORT").dropdown({1931                 delay: 0,1932                 onm ouseleave: function() {1933                     $("#_JD_ALLSORT .item").removeClass("hover")1934                 }1935             }, function(a) {1936                 var b, c, g = document.documentElement.scrollTop + document.body.scrollTop,1937                     h = $("#nav-2013").offset().top + 39;1938                 h >= g ? (c = a.hasClass("fore13") ? 3 : 3, g = c) : (b = a.offset().top, g = g > b - 5 ? b - h - 10 : Math.max(3, g - h));1939                 var i = a.find(".i-mc");1940                 if (i.css({1941                     top: g + "px"1942                 }), d.OBJ.find("iframe")) {1943                     var j = i.outerWidth() + e,1944                         k = i.outerHeight() > f ? i.outerHeight() : f;1945                     d.OBJ.find("iframe").css({1946                         width: j,1947                         height: k,1948                         top: g1949                     })1950                 }1951             })1952         },1953         getRightAreaTPL: function(a) {1954             var b = "",1955                 c = "",1956                 d = "",1957                 e = "";1958             return b = this.FN_SetLink(a), c = ‘{if p.length!=0}<dl class="categorys-promotions">    <dd>        <ul>            {for item in p}            <li>                <a href="http://www.mamicode.com/${item.u}" target="_blank">                {if item.i}                    <img src="http://www.mamicode.com/${item.i}" width="194" height="70" title="${item.n}" />                {else}                    ${item.n}                {/if}                </a>            </li>            {/for}        </ul>    </dd></dl>{/if}‘, d = ‘{if b.length!=0}<dl class="categorys-brands">    {if id=="k"}        <dt>\u63a8\u8350\u54c1\u724c\u51fa\u7248\u5546/\u4e66\u5e97</dt>    {else}        {if id=="l"}        <dt>\u63a8\u8350\u4ea7\u54c1</dt>        {else}        <dt>\u63a8\u8350\u54c1\u724c</dt>        {/if}    {/if}    <dd>        <ul>            {for item in b} <li><a href="http://www.mamicode.com/${item.u}" target="_blank">${item.n}</a></li> {/for}        </ul>    </dd></dl>{/if}‘, e = /c|b|d/.test(a) ? b + d + c : b + c + d1959         },1960         getBrandService: function(a) {1961             var b = this,1962                 c = a.data;1963             this.OBJ.attr("load", "2"), $.each(c, function() {1964                 var a = this.id,1965                     c = b.getRightAreaTPL(a);1966                 "l" !== a && $("#JD_sort_" + a).html(c.process(this))1967             }), $(".cat-right-con").each(function(a) {1968                 pageConfig.isHome && ($(this).find(".categorys-promotions").attr("clstag", "homepage|keycount|home2013|0" + (601 + a) + "c"), $(this).find(".categorys-brands").attr("clstag", "homepage|keycount|home2013|0" + (601 + a) + "d"))1969             })1970         },1971         FN_Init: function() {1972             if (this.OBJ.length) {1973                 this.OBJ.attr("load") || (window.pageConfig && 0 != window.pageConfig.pageId && this.FN_InitSimple(), $("#categorys").length ? $("#categorys").Jdropdown({1974                     delay: 2001975                 }) : $("#categorys-2013").Jdropdown({1976                     delay: 2001977                 }));1978                 var a = this;1979                 this.OBJ.one("mouseover", function() {1980                     var b = a.OBJ.attr("load");1981                     if (b) {1982                         if (1 != b) return;1983                         a.FN_GetBrands()1984                     } else a.FN_GetData()1985                 })1986             }1987         }1988     },1989     UC = {1990         DATA_Cookie: "aview",1991         TPL_UnRegist: ‘<div class="prompt">            <span class="fl">\u60a8\u597d\uff0c\u8bf7<a href="javascript:login()" clstag="homepage|keycount|home2013|04a">\u767b\u5f55</a></span>            <span class="fr"></span>        </div>‘,1992         TPL_Regist: ‘<div class="prompt">                <span class="fl"><strong>${Name}</strong></span>                <span class="fr"><a href="http://home.jd.com/">\u53bb\u6211\u7684\u4eac\u4e1c\u9996\u9875&nbsp;&gt;</a></span>            </div>‘,1993         TPL_OList: {1994             placeholder: ‘<div id="jduc-orderlist"></div>‘,1995             fragment: ‘<div class="orderlist">                <div class="smt">                    <h4>\u6700\u65b0\u8ba2\u5355\u72b6\u6001\uff1a</h4>                    <div class="extra"><a href="http://order.jd.com/center/list.action" target="_blank">\u67e5\u770b\u6240\u6709\u8ba2\u5355&nbsp;&gt;</a></div>                </div>                <div class="smc">                    <ul>                        {for item in orderList}                        <li class="fore${parseInt(item_index)+1}">                            <div class="p-img fl">                                {for image in item.OrderDetail}                                    {if image_index<2}                                        <a href="http://www.jd.com/product/${image.ProductId}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(image.ProductId)}n5/${image.ImgUrl}" width="50" height="50" alt="${image.ProductName}" /></a>                                    {/if}                                {/for}                                {if item.OrderDetail.length>2}                                    <a href="http://www.mamicode.com/${item.passKeyUrl}" target="_blank" class="more">\u66f4\u591a</a>                                {/if}                            </div>                            <div class="p-detail fr">                                \u8ba2\u5355\u53f7\uff1a${item.OrderId}<br />                                \u72b6\u3000\u6001\uff1a<span>${UC.FN_SetState(item.OrderState)}</span><br />                                \u3000\u3000\u3000\u3000<a href="http://www.mamicode.com/${item.passKeyUrl}">\u67e5\u770b\u8be6\u60c5</a>                            </div>                        </li>                        {/for}                    </ul>                </div>            </div>‘1996         },1997         TPL_UList: ‘<div class="uclist">                <ul class="fore1 fl">                    <li><a target="_blank" clstag="homepage|keycount|home2013|04b" href="http://order.jd.com/center/list.action">\u5f85\u5904\u7406\u8ba2\u5355<span id="num-unfinishedorder"></span></a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|04c" href="http://jd2008.jd.com/user_spzx.aspx">\u54a8\u8be2\u56de\u590d<span id="num-consultation"></span></a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|04d" href="http://t.jd.com/product/followProductList.action?isReduce=true">\u964d\u4ef7\u5546\u54c1<span id="num-reduction"></span></a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|shouhou" href="http://myjd.jd.com/repair/orderlist.action">\u8fd4\u4fee\u9000\u6362\u8d27</a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|04e" href="http://quan.jd.com/user_quan.action">\u4f18\u60e0\u5238<span id="num-ticket"></span></a></li>                </ul>                <ul class="fore2 fl">                    <li><a target="_blank" clstag="homepage|keycount|home2013|04i" href="http://t.jd.com/home/follow">\u6211\u7684\u5173\u6ce8&nbsp;&gt;</a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|04g" href="http://bean.jd.com/myJingBean/list">\u6211\u7684\u4eac\u8c46&nbsp;&gt;</a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|licai" href="http://trade.jr.jd.com/centre/browse.action">\u6211\u7684\u7406\u8d22&nbsp;&gt;</a></li>                    <li><a target="_blank" clstag="homepage|keycount|home2013|baitiao" href="http://baitiao.jd.com/creditUser/list">\u6211\u7684\u767d\u6761&nbsp;&gt;</a></li>                </ul>            </div>‘,1998         TPL_VList: {1999             placeholder: ‘<div class="viewlist">                <div class="smt" clstag="homepage|keycount|home2013|04k">                    <h4>\u6700\u8fd1\u6d4f\u89c8\u7684\u5546\u54c1\uff1a</h4>                    <div style="float:right;padding-right:9px;"><a style="border:0;color:#005EA7" href="http://my.jd.com/history/list.html" target="_blank">\u67e5\u770b\u6d4f\u89c8\u5386\u53f2&nbsp;&gt;</a></div>                </div>                <div class="smc" id="jduc-viewlist" clstag="homepage|keycount|home2013|04j">                    <div class="loading-style1"><b></b>\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u7a0d\u5019...</div>                    <ul class="lh hide"></ul>                </div>            </div>‘,2000             fragment: ‘{for item in list}<li><a href="http://item.jd.com/${item.wid}.html" target="_blank" title="${item.wname}"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(item.wid)}n5/${item.imgUrl}" width="50" height="50" alt="${item.wname}" /></a></li>{/for}‘2001         },2002         FN_SetState: function(a) {2003             var a = a;2004             return a.length > 4 && (a = "<span title=" + a + ">" + a.substr(0, 4) + "...</span>"), a2005         },2006         FN_InitNewVList: function(a) {2007             for (var b, c = a ? a.split("|") : [], d = c.length, e = [], f = 0; d > f;) e.push(c[f].split(".")[1]), f++;2008             b = e.join(","), $.getJSONP("http://my.jd.com/product/info.html?ids=" + b + "&jsoncallback=UC.FN_ShowVList")2009         },2010         FN_InitVList: function(a) {2011             for (var b = JSON.parse(a), c = b.length, d = ",", e = 0; c > e; e++) new RegExp(b[e].s).test(d) || (d += b[e].s + ",");2012             d = d.replace(/(^,*)|(,*$)/g, ""), $.getJSONP("http://my.jd.com/product/info.html?ids=" + d + "&jsoncallback=UC.FN_ShowVList")2013         },2014         FN_ShowVList: function(a) {2015             if (a) {2016                 var b = $("#jduc-viewlist").find(".loading-style1");2017                 a.length = a.length > 5 ? 5 : a.length;2018                 var c = {2019                     list: a2020                 };2021                 b.length > 0 && b.hide();2022                 var d = this.TPL_VList.fragment.process(c);2023                 $("#jduc-viewlist").find("ul").eq(0).html(d).show()2024             }2025         },2026         FN_setWords: function(a) {2027             var b = ‘<font style="color:{0}">({1})</font>‘,2028                 c = "";2029             return c = 0 == a ? "#ccc" : "#c00", pageConfig.FN_StringFormat(b, c, a)2030         },2031         FN_InitOList: function() {2032             $.ajax({2033                 url: "http://minijd.360buy.com/getOrderList",2034                 dataType: "jsonp",2035                 success: function(a) {2036                     if (a && 0 == a.error && a.orderList) {2037                         var b = UC.TPL_OList.fragment.process(a);2038                         $("#jduc-orderlist").html(b)2039                     }2040                 }2041             }), $.ajax({2042                 url: "http://minijd.360buy.com/getHomeCount",2043                 dataType: "jsonp",2044                 success: function(a) {2045                     a && 0 == a.error && $("#num-unfinishedorder").html(UC.FN_setWords(a.orderCount))2046                 }2047             }), $.ajax({2048                 url: "http://comm.360buy.com/index.php?mod=Consultation&action=havingReplyCount",2049                 dataType: "jsonp",2050                 success: function(a) {2051                     a && $("#num-consultation").html(UC.FN_setWords(a.cnt))2052                 }2053             }), $.ajax({2054                 url: "http://follow.soa.jd.com/product/queryForReduceProductCount.action?",2055                 dataType: "jsonp",2056                 success: function(a) {2057                     a && a.data > 0 && $("#num-reduction").html(UC.FN_setWords(a.data))2058                 }2059             }), $.ajax({2060                 url: "http://quan.jd.com/getcouponcount.action",2061                 dataType: "jsonp",2062                 success: function(a) {2063                     a && $("#num-ticket").html(UC.FN_setWords(a.CouponCount))2064                 }2065             })2066         }2067     },2068     MCART = {2069         DATA_Cookie: "cn",2070         DATA_Amount: readCookie("cn") || "0",2071         URL_Serv: "http://cart.jd.com/cart/miniCartServiceNew.action",2072         TPL_Iframe: ‘<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" id="settleup-iframe"></iframe>‘,2073         TPL_NoGoods: ‘<div class="prompt"><div class="nogoods"><b></b>\u8d2d\u7269\u8f66\u4e2d\u8fd8\u6ca1\u6709\u5546\u54c1\uff0c\u8d76\u7d27\u9009\u8d2d\u5427\uff01</div></div>‘,2074         TPL_List: {2075             wrap: ‘<div id="settleup-content"><div class="smt"><h4 class="fl">\u6700\u65b0\u52a0\u5165\u7684\u5546\u54c1</h4></div><div class="smc"></div><div class="smb ar">\u5171<b>${Num}</b>\u4ef6\u5546\u54c1\u3000\u5171\u8ba1<strong>\uffe5 ${TotalPromotionPrice.toFixed(2)}</strong><br><a href="http://cart.jd.com/cart/cart.html?r=${+new Date}" title="\u53bb\u8d2d\u7269\u8f66\u7ed3\u7b97" id="btn-payforgoods">\u53bb\u8d2d\u7269\u8f66\u7ed3\u7b97</a></div></div>‘,2076             sigle: ‘<ul id="mcart-sigle">{for list in TheSkus}  <li>      <div class="p-img fl"><a href="http://item.jd.com/${list.Id}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(list.Id)}n5/${list.ImgUrl}" width="50" height="50" ></a></div>      <div class="p-name fl"><a href="http://item.jd.com/${list.Id}.html" title="${list.Name}" target="_blank">${list.Name}</a></div>      <div class="p-detail fr ar">          <span class="p-price"><strong>\uffe5${list.PromotionPrice.toFixed(2)}</strong>\xd7${list.Num}</span>          <br>          {if parseInt(list.FanPrice)>0}          <span class="hl-green">\u8fd4\u73b0\uff1a\uffe5<em>${list.FanPrice}</em></span>          <br>          {/if}          {if parseInt(list.Score)>0}          <span class="hl-orange">\u9001\u4eac\u8c46\uff1a<em>${list.Score}</em></span>          <br>          {/if}          <a class="delete" data-id="${list.Id}" data-type="RemoveProduct" href="http://www.mamicode.com/#delete">\u5220\u9664</a>      </div>      {for jq in list.CouponAD}      <div class="gift-jq">[\u8d60\u5238] \u8d60\u9001${jq.Jing}\u4eac\u5238 ${jq.LimitAd}</a></div>      {/for}  </li>{/for}</ul>‘,2077             gift: ‘<ul id="mcart-gift">{for list in TheGifts}  <li>      <div class="p-img fl"><a href="http://item.jd.com/${list.MainSKU.Id}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(list.MainSKU.Id)}n5/${list.MainSKU.ImgUrl}" width="50" height="50" ></a></div>      <div class="p-name fl"><a href="http://item.jd.com/${list.MainSKU.Id}.html" title="${list.MainSKU.Name}" target="_blank">${list.MainSKU.Name}</a></div>      <div class="p-detail fr ar">          <span class="p-price"><strong>\uffe5${list.PromotionPrice.toFixed(2)}</strong>\xd7${list.Num}</span>          <br>          {if parseInt(list.FanPrice)>0}          <span class="hl-green">\u8fd4\u73b0\uff1a\uffe5<em>${list.FanPrice}</em></span>          <br>          {/if}          {if parseInt(list.Score)>0}          <span class="hl-orange">\u9001\u4eac\u8c46\uff1a<em>${list.Score}</em></span>          <br>          {/if}          <a class="delete" data-id="${list.MainSKU.Id}" data-type="RemoveProduct" href="http://www.mamicode.com/#delete">\u5220\u9664</a>      </div>      {for gift in list.Skus}      <div class="gift"><a href="http://item.jd.com/${gift.Id}.html" target="_blank">[{if gift.Type==2}\u8d60\u54c1{/if}{if gift.Type==1}\u9644\u4ef6{/if}] ${gift.Name}</a></div>      {/for}      {for jq in list.CouponAD}      <div class="gift-jq">[\u8d60\u5238] \u8d60\u9001${jq.Jing}\u5143\u4eac\u5238 ${jq.LimitAd}</a></div>      {/for}  </li>  {/for}</ul>‘,2078             suit: ‘{for suit in TheSuit}<ul id="mcart-suit">  <li class="dt">      <div class="fl"><span>[\u5957\u88c5]</span> ${suit.Name}</div>      <div class="fr"><em>\u5c0f\u8ba1\uff1a\uffe5${(suit.PromotionPrice*suit.Num).toFixed(2)}</em></div>      <div class="clr"></div>  </li>  {for list in suit.Skus}  <li>      <div class="p-img fl"><a href="http://item.jd.com/${list.Id}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(list.Id)}n5/${list.ImgUrl}" width="50" height="50" ></a></div>      <div class="p-name fl"><span></span><a href="http://item.jd.com/${list.Id}.html" title="${list.Name}" target="_blank">${list.Name}</a></div>      <div class="p-detail fr ar">          <span class="p-price"><strong>\uffe5${list.PromotionPrice.toFixed(2)}</strong>\xd7${list.Num}</span>          <br>          {if parseInt(list.FanPrice)>0}          <span class="hl-green">\u8fd4\u73b0\uff1a\uffe5<em>${list.FanPrice}</em></span>          <br>          {/if}          {if parseInt(list.Score)>0}          <span class="hl-orange">\u9001\u4eac\u8c46\uff1a<em>${list.Score}</em></span>          <br>          {/if}          <a class="delete" data-id="${list.Id}|${suit.Id}" data-type="RemoveSuit" href="http://www.mamicode.com/#delete">\u5220\u9664</a>      </div>      {for gift in list.Gifts}      <div class="gift"><a href="http://item.jd.com/${gift.Id}.html" target="_blank">[{if gift.Type==2}\u8d60\u54c1{/if}{if gift.Type==1}\u9644\u4ef6{/if}] ${gift.Name}</a></div>      {/for}      {for jq in list.CouponAD}      <div class="gift-jq">[\u8d60\u5238] \u8d60\u9001${jq.Jing}\u5143\u4eac\u5238 ${jq.LimitAd}</a></div>      {/for}  </li>  {/for}</ul>{/for}‘,2079             mj: ‘{for mj in ManJian}<ul id="mcart-mj">  <li class="dt">      <div class="fl"><span class="hl-green">\u6ee1\u51cf</span>{if mj.ManFlag} \u5df2\u8d2d\u6ee1{if mj.ManNum>0}${mj.ManNum}\u4ef6{else}${mj.ManPrice}\u5143{/if}\uff0c\u5df2\u51cf${mj.JianPrice}\u5143{else}\u8d2d\u6ee1{if mj.ManNum>0}${mj.ManNum}\u4ef6{else}${mj.ManPrice}\u5143{/if}\uff0c\u5373\u53ef\u4eab\u53d7\u6ee1\u51cf\u4f18\u60e0{/if}</div>      <div class="fr"><em>\u5c0f\u8ba1\uff1a\uffe5${(mj.PromotionPrice*mj.Num).toFixed(2)}</em></div>      <div class="clr"></div>  </li>  {for list in mj.Skus}  <li>      <div class="p-img fl"><a href="http://item.jd.com/${list.Id}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(list.Id)}n5/${list.ImgUrl}" width="50" height="50" ></a></div>      <div class="p-name fl"><span></span><a href="http://item.jd.com/${list.Id}.html" title="${list.Name}" target="_blank">${list.Name}</a></div>      <div class="p-detail fr ar">          <span class="p-price"><strong>\uffe5${list.PromotionPrice.toFixed(2)}</strong>\xd7${list.Num}</span>          <br>          {if parseInt(list.FanPrice)>0}          <span class="hl-green">\u8fd4\u73b0\uff1a\uffe5<em>${list.FanPrice}</em></span>          <br>          {/if}          {if parseInt(list.Score)>0}          <span class="hl-orange">\u9001\u4eac\u8c46\uff1a<em>${list.Score}</em></span>          <br>          {/if}          <a class="delete" data-id="${list.Id}|${mj.Id}" data-type="RemoveSuit" href="http://www.mamicode.com/#delete">\u5220\u9664</a>      </div>      {for gift in list.Gifts}      <div class="gift"><a href="http://item.jd.com/${gift.Id}.html" target="_blank">[{if gift.Type==2}\u8d60\u54c1{/if}{if gift.Type==1}\u9644\u4ef6{/if}] ${gift.Name}</a></div>      {/for}      {for jq in list.CouponAD}      <div class="gift-jq">[\u8d60\u5238] \u8d60\u9001${jq.Jing}\u5143\u4eac\u5238 ${jq.LimitAd}</a></div>      {/for}  </li>  {/for}</ul>{/for}‘,2080             mz: ‘{for mz in ManZeng}<ul id="mcart-mz">  <li class="dt">      <div class="fl"><span class="hl-orange">\u6ee1\u8d60</span>          {if mz.ManFlag}              \u5df2\u8d2d\u6ee1${mz.ManPrice}\u5143\uff0c\u60a8{if mz.ManGifts.length>0}\u5df2{else}\u53ef{/if}\u9886\u8d60\u54c1          {else}              \u8d2d\u6ee1${mz.ManPrice}\u5143\uff0c\u5373\u53ef\u9886\u53d6\u8d60\u54c1          {/if}      </div>      <div class="fr"><em>\u5c0f\u8ba1\uff1a\uffe5${(mz.PromotionPrice*mz.Num).toFixed(2)}</em></div>      <div class="clr"></div>  </li>  {for gift in mz.ManGifts}<li class="dt-mz"><a href="http://www.mamicode.com/${gift.Id}" target="_blank">[\u8d60\u54c1]${gift.Name}</a>\xd7${gift.Num}</li>{/for}  {for list in mz.Skus}  <li>      <div class="p-img fl"><a href="http://item.jd.com/${list.Id}.html" target="_blank"><img src="http://www.mamicode.com/${pageConfig.FN_GetImageDomain(list.Id)}n5/${list.ImgUrl}" width="50" height="50" ></a></div>      <div class="p-name fl"><span></span><a href="http://item.jd.com/${list.Id}.html" title="${list.Name}" target="_blank">${list.Name}</a></div>      <div class="p-detail fr ar">          <span class="p-price"><strong>\uffe5${list.PromotionPrice.toFixed(2)}</strong>\xd7${list.Num}</span>          <br>          {if parseInt(list.FanPrice)>0}          <span class="hl-green">\u8fd4\u73b0\uff1a\uffe5<em>${list.FanPrice}</em></span>          <br>          {/if}          {if parseInt(list.Score)>0}          <span class="hl-orange">\u9001\u4eac\u8c46\uff1a<em>${list.Score}</em></span>          <br>          {/if}          <a class="delete" data-id="${list.Id}|${mz.Id}" data-type="RemoveSuit" href="http://www.mamicode.com/#delete">\u5220\u9664</a>      </div>      {for gift in list.Gifts}      <div class="gift"><a href="http://item.jd.com/${gift.Id}.html" target="_blank">[{if gift.Type==2}\u8d60\u54c1{/if}{if gift.Type==1}\u9644\u4ef6{/if}] ${gift.Name}</a></div>      {/for}      {for jq in list.CouponAD}      <div class="gift-jq">[\u8d60\u5238] \u8d60\u9001${jq.Jing}\u5143\u4eac\u5238 ${jq.LimitAd}</a></div>      {/for}  </li>  {/for}</ul>{/for}‘2081         },2082         FN_BindEvents: function() {2083             var a = this;2084             $("#settleup-content .delete").bind("click", function() {2085                 var b = $(this).attr("data-id").split("|"),2086                     c = $(this).attr("data-type"),2087                     d = {2088                         method: c,2089                         cartId: b[0]2090                     };2091                 b && (b.length > 1 && b[1] && (d.targetId = b[1]), $.ajax({2092                     url: MCART.URL_Serv,2093                     data: d,2094                     dataType: "jsonp",2095                     success: function(b) {2096                         b.Result && a.FN_Refresh()2097                     }2098                 }))2099             })2100         },2101         FN_Refresh: function() {2102             var a = document.getElementById("settleup") ? $("#settleup dl") : $("#settleup-2013 dl"),2103                 b = a.find("dd").eq(0),2104                 c = function(a) {2105                     var c = a.Cart,2106                         d = c.TheSkus.length + c.TheSuit.length + c.TheGifts.length + c.ManJian.length + c.ManZeng.length,2107                         e = MCART.TPL_List.sigle.process(a.Cart),2108                         f = MCART.TPL_List.gift.process(a.Cart),2109                         g = MCART.TPL_List.suit.process(a.Cart),2110                         h = MCART.TPL_List.mz.process(a.Cart),2111                         i = MCART.TPL_List.mj.process(a.Cart);2112                     if (d > 0 ? (b.html(MCART.TPL_List.wrap.process(a.Cart)), b.find("#settleup-content .smc").html(e + f + g + i + h), $("#settleup-url").attr("href", "http://cart.jd.com/cart/cart.html?r=" + +new Date)) : b.html(MCART.TPL_NoGoods), $.browser.msie && 6 == $.browser.version) {2113                         var j = $("#settleup-content");2114                         j.before(MCART.TPL_Iframe);2115                         var k = $("#settleup-iframe");2116                         k.height(j.height())2117                     }2118                     MCART.FN_BindEvents()2119                 };2120             $.ajax({2121                 url: MCART.URL_Serv,2122                 data: {2123                     method: "GetCart"2124                 },2125                 dataType: "jsonp",2126                 success: function(a) {2127                     c(a)2128                 }2129             }), MCART.DATA_Amount = readCookie(MCART.DATA_Cookie), null != MCART.DATA_Amount && $("#shopping-amount").html(MCART.DATA_Amount).parent().show()2130         }2131     },2132     NotifyPop = {2133         _saleNotify: "http://skunotify." + pageConfig.FN_getDomain() + "/pricenotify.html?",2134         _stockNotify: "http://skunotify." + pageConfig.FN_getDomain() + "/storenotify.html?",2135         init: function(a) {2136             var b, c = this,2137                 d = this.serializeUrl(location.href),2138                 e = /from=weibo/.test(location.href) ? location.search.replace(/\?/, "") : "";2139             /from=weibo/.test(location.href) && (b = d.param.type, this.setThickBox(b, e)), a.livequery("click", function() {2140                 var a = ($(this).attr("id"), $(this).attr("data-type") || 2);2141                 return c.sku = $(this).attr("data-sku"), c.checkLogin(function(b) {2142                     b.IsAuthenticated ? (c._userPin = b.Name, c.setThickBox(a, e)) : (jdModelCallCenter.settings.fn = function() {2143                         c.checkLogin(function(b) {2144                             b.IsAuthenticated && (c._userPin = b.Name, c.setThickBox(a, e))2145                         })2146                     }, jdModelCallCenter.login())2147                 }), !12148             }).attr("href", "#none").removeAttr("target")2149         },2150         serializeUrl: function(a) {2151             var b, c, d, e, f = a.indexOf("?"),2152                 g = a.substr(0, f),2153                 h = a.substr(f + 1),2154                 i = h.split("&"),2155                 j = i.length,2156                 k = {};2157             for (b = 0; j > b; b++) c = i[b].split("="), d = c[0], e = c[1], k[d] = e;2158             return {2159                 url: g,2160                 param: k2161             }2162         },2163         checkLogin: function(a) {2164             "function" == typeof a && $.getJSON("http://passport." + pageConfig.FN_getDomain() + "/loginservice.aspx?method=Login&callback=?", function(b) {2165                 b.Identity && a(b.Identity)2166             })2167         },2168         setThickBox: function(a, b) {2169             var c, d, e, f = {2170                     skuId: this.sku,2171                     pin: this._userPin,2172                     webSite: 1,2173                     origin: 1,2174                     source: 12175                 },2176                 g = this.serializeUrl(location.href);2177             /blogPin/.test(location.href) && (f.blogPin = g.param.blogPin), 1 == a && (c = "\u964d\u4ef7\u901a\u77e5", d = this._saleNotify, e = 250), 2 == a && (c = "\u5230\u8d27\u901a\u77e5", d = this._stockNotify, e = 210, f.storeAddressId = readCookie("ipLoc-djd") || "0-0-0"), d += b ? b : $.param(f), $.jdThickBox({2178                 type: "iframe",2179                 source: decodeURIComponent(d) + "&nocache=" + +new Date,2180                 width: 500,2181                 height: e,2182                 title: c,2183                 _box: "notify_box",2184                 _con: "notify_con",2185                 _title: "notify_title"2186             })2187         }2188     };2189 ! function() {2190     pageConfig.FN_ImgError(document), $("img[data-lazyload]").Jlazyload({2191         type: "image",2192         placeholderClass: "err-product"2193     }), category.FN_Init(), document.getElementById("shortcut") ? $("#shortcut .menu").Jdropdown({2194         delay: 502195     }) : ($("#biz-service").Jdropdown({2196         delay: 502197     }, function() {2198         $.ajax({2199             url: "http://www.jd.com/hotwords.aspx?position=new-index-002",2200             dataType: "script",2201             scriptCharset: "gb2312",2202             cache: !02203         })2204     }), $("#site-nav").Jdropdown({2205         delay: 502206     }, function() {2207         $.ajax({2208             url: "http://www.jd.com/hotwords.aspx?position=new-index-003",2209             dataType: "script",2210             scriptCharset: "gb2312",2211             cache: !02212         })2213     })), document.getElementById("navitems") ? $("#navitems li").Jdropdown() : $("#navitems-2013 li").Jdropdown(), $.ajax({2214         url: ("https:" == document.location.protocol ? "https://" : "http://") + "passport." + pageConfig.FN_getDomain() + "/new/helloService.ashx?m=ls",2215         dataType: "jsonp",2216         scriptCharset: "gb2312",2217         success: function(a) {2218             a && a.info && $("#loginbar").html(a.info), a && a.sso && $.each(a.sso, function() {2219                 $.getJSON(this)2220             })2221         }2222     }), document.getElementById("settleup") ? (null != MCART.DATA_Amount && ($("#settleup s").eq(0).addClass("shopping"), $("#shopping-amount").html(MCART.DATA_Amount)), $("#settleup dl").Jdropdown({2223         delay: 2002224     }, function() {2225         MCART.FN_Refresh(), $("#settleup-url").attr("href", "http://cart.jd.com/cart/cart.html?r=" + +new Date)2226     })) : (null != MCART.DATA_Amount && $("#shopping-amount").html(MCART.DATA_Amount), $("#settleup-2013 dl").Jdropdown({2227         delay: 2002228     }, function() {2229         MCART.FN_Refresh(), $("#settleup-url").attr("href", "http://cart.jd.com/cart/cart.html?r=" + +new Date)2230     }));2231     var a = document.getElementById("my360buy") ? $("#my360buy") : $("#my360buy-2013");2232     a.find("dl").Jdropdown({2233         delay: 1002234     }, function(a) {2235         a.attr("load") || $.login({2236             automatic: !1,2237             complete: function(b) {2238                 if (b) {2239                     var c = a.find("dd").eq(0),2240                         d = "",2241                         e = readCookie(UC.DATA_Cookie);2242                     b.IsAuthenticated ? (d += UC.TPL_Regist.process(b), d += UC.TPL_OList.placeholder, d += UC.TPL_UList) : (d += UC.TPL_UnRegist, d += UC.TPL_UList), e && (d += UC.TPL_VList.placeholder), c.html(d), a.attr("load", "1"), setTimeout(function() {2243                         a.removeAttr("load")2244                     }, 6e4), /\[\{/.test(e) ? UC.FN_InitVList(e) : UC.FN_InitNewVList(e), UC.FN_InitOList()2245                 }2246             }2247         })2248     }), document.onkeyup = function(a) {2249         var b = document.activeElement.tagName.toLowerCase();2250         if ("input" != b && "textarea" != b) {2251             var a = a ? a : window.event,2252                 c = a.keyCode || a.which;2253             switch (c) {2254                 case 68:2255                     window.pageConfig.clientViewTop || (window.pageConfig.clientViewTop = 0), window.pageConfig.clientViewTop += document.documentElement.clientHeight, window.scrollTo(0, pageConfig.clientViewTop);2256                     break;2257                 case 83:2258                     window.scrollTo(0, 0), window.pageConfig.clientViewTop = 0, document.getElementById("key").focus();2259                     break;2260                 case 84:2261                     window.scrollTo(0, 0), window.pageConfig.clientViewTop = 02262             }2263         }2264     }2265 }();2266 var $o = function() {2267     function a() {2268         this.length = 0, this.index = -1, this.iLastModified = 0, this.lastKeyword = !12269     }2270     var b = {};2271     b.replace = function(a, b) {2272         return a.replace(/#{(.*?)}/g, function() {2273             var a = arguments[1];2274             return "undefined" != typeof b[a] ? b[a] : arguments[0]2275         })2276     }, String.prototype.isEmpty = function() {2277         return 0 == this.length2278     };2279     var c = ‘<a style="color:#005AA0" onclick="$o.del(event)">\u5220\u9664</a>‘,2280         d = "\u641c\u7d22\u5386\u53f2",2281         e = ‘<li id="d_#{id}" suggest-pos="#{suggest_pos}" title="#{title}" onclick="$o.clickItem(this)" history="1"><div class="search-item" style="color:#005AA0">#{keyword}</div><div class="search-count">‘ + d + "</div></li>",2282         f = ‘<li id="d_#{id}" suggest-pos="#{suggest_pos}" title="#{title}" onclick="$o.clickItem(this)"><div class="search-item">#{keyword}</div><div class="search-count">\u7ea6#{amount}\u4e2a\u5546\u54c1</div></li>‘,2283         g = ‘<div id="d_#{id}" suggest-pos="#{suggest_pos}" class="#{className}" title="#{title}" cid="#{cid}" cLevel="#{cLevel}" onclick="$o.clickItem(this)"><div class="search-item">\u5728<strong>#{cname}</strong>\u5206\u7c7b\u4e2d\u641c\u7d22</div><div class="search-count">\u7ea6#{amount}\u4e2a\u5546\u54c1</div></div>#{categorys}‘,2284         h = ‘<li class="fore1"><div id="d_#{id}" suggest-pos="#{suggest_pos}" class="fore1" title="#{title}" onclick="$o.clickItem(this)"><div class="search-item">#{keyword}</div><div class="search-count" #{style}>\u7ea6#{amount}\u4e2a\u5546\u54c1</div></div>#{categorys}</li>‘,2285         i = "http://dd.search.jd.com/?key=#{keyword}",2286         j = "#FFDFC6",2287         k = "#FFF",2288         l = $("#key"),2289         m = $("#shelper");2290     a.prototype.init = function() {2291         this.length = 0, this.index = -1, this.click = !12292     }, a.prototype.hideTip = function() {2293         this.init(), this.lastKeyword = !1, m.html("").hide()2294     }, a.prototype.clickItem = function(a) {2295         var b = a.getAttribute("cid");2296         search.cid = null != b && "" != b ? b : null;2297         var c = a.getAttribute("cLevel");2298         search.cLevel = null != c && "" != c ? c : null;2299         var d = a.getAttribute("ev_val");2300         search.ev_val = null == d || $.trim(d).isEmpty() ? null : d;2301         var e = a.getAttribute("title");2302         null == e || $.trim(e).isEmpty() || l.val(e), search.additinal = "&suggest=" + a.getAttribute("suggest-pos"), this.click = a.id.substr(2) - m.find("li[history=‘1‘]").length, search("key")2303     }, a.prototype.mouseenter = function(a) {2304         var a = $(a);2305         a.attr("history") && a.find(".search-count").html(c), a.css("background", j);2306         var b = a.attr("id").split("_"),2307             e = parseInt(b[1], 10);2308         if (e != this.index) {2309             if (this.index > -1) {2310                 var f = $("#d_" + this.index);2311                 f.css("background", k), f.attr("history") && f.find(".search-count").html(d)2312             }2313             this.index = e2314         }2315     }, a.prototype.mouseleave = function(a) {2316         a.css("background", k), a.attr("history") && a.find(".search-count").html(d)2317     }, a.prototype.selectItemNode = function(a) {2318         var b = this,2319             e = $("#d_" + b.index + ":visible");2320         e.css("background-color", k), e.attr("history") && e.find(".search-count").html(d), -1 == b.index && -1 == a && (a = 0), b.index = (b.length + b.index + a) % b.length;2321         var f = $("#d_" + b.index);2322         if (f.length > 0) {2323             f.attr("history") && f.find(".search-count").html(c), f.css("background-color", j);2324             var g = f.attr("title");2325             null == g || $.trim(g).isEmpty() || l.val(g);2326             var h = f.attr("cid");2327             search.cid = null != h && "" != h ? h : null;2328             var i = f.attr("cLevel");2329             search.cLevel = null != i && "" != i ? i : null, search.ev_val = null, search.additinal = "&suggest=" + f.attr("suggest-pos"), b.click = b.index - m.find("li[history=‘1‘]").length2330         }2331     }, a.prototype.input = function() {2332         var a = this;2333         a.timeoutId && clearTimeout(a.timeoutId), a.timeoutId = setTimeout(function() {2334             var c = $.trim(l.val());2335             if (c === a.lastKeyword || !(c || readCookie("pin") || readCookie("_tp"))) return !1;2336             a.lastKeyword = c;2337             var d = b.replace(i, {2338                 keyword: encodeURIComponent(c)2339             });2340             $.ajax({2341                 url: d,2342                 dataType: "jsonp",2343                 scriptCharset: "utf-8",2344                 jsonp: "callback",2345                 success: function(b) {2346                     return function(c) {2347                         a.iLastModified > b || (a.iLastModified = b, a.onloadItems(c))2348                     }2349                 }((new Date).getTime())2350             })2351         }, 150)2352     }, a.prototype.keydown_up = function(a) {2353         var b = this,2354             c = a || window.event;2355         0 == l.length && (l = $("#key")), 0 == m.length && (m = $("tie"));2356         var d = c.keyCode;2357         switch (d) {2358             case 38:2359                 b.selectItemNode(-1);2360                 break;2361             case 40:2362                 b.selectItemNode(1);2363                 break;2364             case 27:2365                 b.hideTip();2366                 break;2367             case 37:2368                 break;2369             case 39:2370                 break;2371             default:2372                 $.browser.mozilla || b.input()2373         }2374     }, a.prototype.onloadItems = function(a) {2375         if (0 == a.length) return this.hideTip(), void 0;2376         var c = this;2377         c.init();2378         var d = "",2379             i = 0;2380         window.pageConfig && window.pageConfig.searchType && (i = window.pageConfig.searchType);2381         for (var j = 0, k = "", n = !1, o = 0, p = $.trim(l.val()), q = 0, r = a.length; r > q; q++) {2382             var s = a[q];2383             if (s) {2384                 var t = $.trim(s.keyword),2385                     u = t.toLowerCase().indexOf(p.toLowerCase()),2386                     v = t;2387                 if (0 == u && (v = p + "<strong>" + t.substring(u + p.length) + "</strong>"), "string" != typeof s.cid || $.trim(s.cid).isEmpty()) {2388                     var w = "";2389                     k += 0 == s.amount ? b.replace(e, {2390                         id: o,2391                         title: s.keyword,2392                         keyword: v,2393                         amount: s.amount,2394                         suggest_pos: j2395                     }) : b.replace(f, {2396                         id: o,2397                         title: s.keyword,2398                         keyword: v,2399                         amount: s.amount,2400                         suggest_pos: j,2401                         style: w2402                     }), o++, j++2403                 } else {2404                     if (0 == n) {2405                         n = !0;2406                         var w = ‘style="visibility:hidden"‘,2407                             x = 0;2408                         s.oamount && s.oamount > 0 && (x = s.oamount, w = ""), k += b.replace(h, {2409                             id: o,2410                             title: s.keyword,2411                             keyword: v,2412                             amount: x,2413                             suggest_pos: j,2414                             style: w2415                         }), o++, j++2416                     }2417                     if ("string" == typeof s.cname && $.trim(s.cname).isEmpty()) continue;2418                     var y = s.level;2419                     if (!y) continue;2420                     if (0 == i) {2421                         if ("string" == typeof y && /^[1-8]4$/.test(y)) continue2422                     } else if (5 == i) {2423                         if ("string" == typeof y && !/^[5-8]2$/.test(y)) continue2424                     } else if (1 == i || 2 == i || 3 == i || 4 == i) continue;2425                     var z = "item1",2426                         A = b.replace(g, {2427                             id: o,2428                             title: s.keyword,2429                             cid: s.cid,2430                             cLevel: s.level,2431                             className: z,2432                             cname: s.cname,2433                             amount: s.amount,2434                             suggest_pos: j - 12435                         });2436                     k = b.replace(k, {2437                         categorys: A2438                     }), o++2439                 }2440             }2441         }2442         c.length = o, d = b.replace(k, {2443             categorys: ""2444         }), "" != d ? (d += ‘<li class="close" onclick="$o.hideTip()">\u5173\u95ed</li>‘, m.html(d).show(), m.find(‘[id^="d_"]‘).bind("mouseleave", function() {2445             c.mouseleave($(this))2446         }).bind("mouseenter", function() {2447             c.mouseenter($(this))2448         })) : m.html("").hide()2449     }, a.prototype.bind_input = function() {2450         $.browser.mozilla ? (l.bind("keydown", function(a) {2451             n.keydown_up(a)2452         }), l.bind("input", function(a) {2453             n.input(a)2454         })) : l.bind("keyup", function(a) {2455             n.keydown_up(a)2456         }), l.focus(function() {2457             setTimeout(function() {2458                 n.input()2459             }, 10)2460         }), m.parent().bind("mouseenter", function() {2461             n.e_position = !0, n.timeoutId && clearTimeout(n.timeoutId)2462         }).bind("mouseleave", function() {2463             n.e_position = !1, n.timeoutId = setTimeout(function() {2464                 n.hideTip()2465             }, 500)2466         }), $(document).click(function() {2467             n.e_position || n.hideTip()2468         })2469     }, a.prototype.del = function(a) {2470         var b = this;2471         a = a ? a : window.event, window.event ? (a.cancelBubble = !0, a.returnValue = http://www.mamicode.com/!1) : (a.stopPropagation(), a.preventDefault());2472         var c = $(a.srcElement ? a.srcElement : a.target),2473             d = c.parent().parent().attr("title");2474         $.ajax({2475             url: "http://search.jd.com/suggest.php?op=del&callback=?&key=" + encodeURIComponent(d),2476             dataType: "jsonp",2477             scriptCharset: "utf-8",2478             beforeSend: function() {2479                 c.parent().parent().hide()2480             },2481             success: function() {2482                 b.lastKeyword = !1, l.focus()2483             }2484         })2485     };2486     var n = new a;2487     return n.bind_input(), n2488 }();2489 pageConfig.FN_InitSidebar = function() {2490     $("#toppanel").length || $(document.body).prepend(‘<div class="w ld" id="toppanel"></div>‘), $("#toppanel").append(‘<div id="sidepanel" class="hide"></div>‘);2491     var a = $("#sidepanel");2492     this.scroll = function() {2493         var b = this;2494         $(window).bind("scroll", function() {2495             var b = document.body.scrollTop || document.documentElement.scrollTop;2496             0 == b ? a.hide() : a.show()2497         }), b.initCss(), $(window).bind("resize", function() {2498             b.initCss()2499         })2500     }, this.initCss = function() {2501         var b, c = pageConfig.compatible ? 1210 : 990;2502         screen.width >= 1210 && (b = $.browser.msie && $.browser.version <= 6 ? {2503             right: "-26px"2504         } : {2505             right: (document.documentElement.clientWidth - c) / 2 - 26 + "px"2506         }, a.css(b))2507     }, this.addCss = function(b) {2508         a.css(b)2509     }, this.addItem = function(b) {2510         a.append(b)2511     }, this.setTop = function() {2512         this.addItem("<a href=http://www.mamicode.com/‘#‘ class=‘gotop‘ title=‘/u4f7f/u7528/u5feb/u6377/u952eT/u4e5f/u53ef/u8fd4/u56de/u9876/u90e8/u54e6/uff01‘>/u8fd4/u56de/u9876/u90e8")2513     }2514 }, pageConfig.FN_InitContrast = function(a, b, c) {2515     var a = a || "_contrast",2516         c = c || "list",2517         b = b || "http://misc.360buyimg.com/contrast/js/contrast.js?ver=" + +new Date,2518         d = readCookie(a + "_status");2519     return pageConfig.isInitContrast ? !1 : ("show" != d && "side" != d || 1 != !!readCookie(a) ? $(".btn-compare").bind("click", function() {2520         var d = this.getAttribute("skuid");2521         $.getScript(b, function() {2522             Contrast && Contrast.init(c, a).showPopWin(d)2523         })2524     }) : $.getScript(b, function() {2525         Contrast && Contrast.init(c, a)2526     }), pageConfig.isInitContrast = 1, void 0)2527 }, /debug=global/.test(location.href) || $.ajax({2528     url: "http://fa.360buy.com/loadFa_toJson.js?aid=2_601_5095",2529     dataType: "script",2530     scriptCharset: "gbk",2531     cache: !02532 });