Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/wwwroot/www.85520057.com/func.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/www.85520057.com/func.php:230) in /www/wwwroot/www.85520057.com/js.php on line 27
! function(a) {
var b = function(a, b) {
return a << b | a >>> 32 - b
},
c = function(a, b) {
var c, d, e, f, g;
return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f
},
d = function(a, b, c) {
return a & b | ~a & c
},
e = function(a, b, c) {
return a & c | b & ~c
},
f = function(a, b, c) {
return a ^ b ^ c
},
g = function(a, b, c) {
return b ^ (a | ~c)
},
h = function(a, e, f, g, h, i, j) {
return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e)
},
i = function(a, d, f, g, h, i, j) {
return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d)
},
j = function(a, d, e, g, h, i, j) {
return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d)
},
k = function(a, d, e, f, h, i, j) {
return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d)
},
l = function(a) {
for(var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = Array(f - 1), h = 0, i = 0; c > i;) b = (i - i % 4) / 4, h = 8 * (i % 4), g[b] = g[b] | a.charCodeAt(i) << h, i++;
return b = (i - i % 4) / 4, h = 8 * (i % 4), g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g
},
m = function(a) {
var d, e, b = "",
c = "";
for(e = 0; 3 >= e; e++) d = 255 & a >>> 8 * e, c = "0" + d.toString(16), b += c.substr(c.length - 2, 2);
return b
},
n = function(a) {
var b, c, d;
for(a = a.replace(/\x0d\x0a/g, "\n"), b = "", c = 0; c < a.length; c++) d = a.charCodeAt(c), 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(192 | d >> 6), b += String.fromCharCode(128 | 63 & d)) : (b += String.fromCharCode(224 | d >> 12), b += String.fromCharCode(128 | 63 & d >> 6), b += String.fromCharCode(128 | 63 & d));
return b
};
a.extend({
md5: function(a) {
var d, e, f, g, o, p, q, r, s, J, b = Array(),
t = 7,
u = 12,
v = 17,
w = 22,
x = 5,
y = 9,
z = 14,
A = 20,
B = 4,
C = 11,
D = 16,
E = 23,
F = 6,
G = 10,
H = 15,
I = 21;
for(a = n(a), b = l(a), p = 1732584193, q = 4023233417, r = 2562383102, s = 271733878, d = 0; d < b.length; d += 16) e = p, f = q, g = r, o = s, p = h(p, q, r, s, b[d + 0], t, 3614090360), s = h(s, p, q, r, b[d + 1], u, 3905402710), r = h(r, s, p, q, b[d + 2], v, 606105819), q = h(q, r, s, p, b[d + 3], w, 3250441966), p = h(p, q, r, s, b[d + 4], t, 4118548399), s = h(s, p, q, r, b[d + 5], u, 1200080426), r = h(r, s, p, q, b[d + 6], v, 2821735955), q = h(q, r, s, p, b[d + 7], w, 4249261313), p = h(p, q, r, s, b[d + 8], t, 1770035416), s = h(s, p, q, r, b[d + 9], u, 2336552879), r = h(r, s, p, q, b[d + 10], v, 4294925233), q = h(q, r, s, p, b[d + 11], w, 2304563134), p = h(p, q, r, s, b[d + 12], t, 1804603682), s = h(s, p, q, r, b[d + 13], u, 4254626195), r = h(r, s, p, q, b[d + 14], v, 2792965006), q = h(q, r, s, p, b[d + 15], w, 1236535329), p = i(p, q, r, s, b[d + 1], x, 4129170786), s = i(s, p, q, r, b[d + 6], y, 3225465664), r = i(r, s, p, q, b[d + 11], z, 643717713), q = i(q, r, s, p, b[d + 0], A, 3921069994), p = i(p, q, r, s, b[d + 5], x, 3593408605), s = i(s, p, q, r, b[d + 10], y, 38016083), r = i(r, s, p, q, b[d + 15], z, 3634488961), q = i(q, r, s, p, b[d + 4], A, 3889429448), p = i(p, q, r, s, b[d + 9], x, 568446438), s = i(s, p, q, r, b[d + 14], y, 3275163606), r = i(r, s, p, q, b[d + 3], z, 4107603335), q = i(q, r, s, p, b[d + 8], A, 1163531501), p = i(p, q, r, s, b[d + 13], x, 2850285829), s = i(s, p, q, r, b[d + 2], y, 4243563512), r = i(r, s, p, q, b[d + 7], z, 1735328473), q = i(q, r, s, p, b[d + 12], A, 2368359562), p = j(p, q, r, s, b[d + 5], B, 4294588738), s = j(s, p, q, r, b[d + 8], C, 2272392833), r = j(r, s, p, q, b[d + 11], D, 1839030562), q = j(q, r, s, p, b[d + 14], E, 4259657740), p = j(p, q, r, s, b[d + 1], B, 2763975236), s = j(s, p, q, r, b[d + 4], C, 1272893353), r = j(r, s, p, q, b[d + 7], D, 4139469664), q = j(q, r, s, p, b[d + 10], E, 3200236656), p = j(p, q, r, s, b[d + 13], B, 681279174), s = j(s, p, q, r, b[d + 0], C, 3936430074), r = j(r, s, p, q, b[d + 3], D, 3572445317), q = j(q, r, s, p, b[d + 6], E, 76029189), p = j(p, q, r, s, b[d + 9], B, 3654602809), s = j(s, p, q, r, b[d + 12], C, 3873151461), r = j(r, s, p, q, b[d + 15], D, 530742520), q = j(q, r, s, p, b[d + 2], E, 3299628645), p = k(p, q, r, s, b[d + 0], F, 4096336452), s = k(s, p, q, r, b[d + 7], G, 1126891415), r = k(r, s, p, q, b[d + 14], H, 2878612391), q = k(q, r, s, p, b[d + 5], I, 4237533241), p = k(p, q, r, s, b[d + 12], F, 1700485571), s = k(s, p, q, r, b[d + 3], G, 2399980690), r = k(r, s, p, q, b[d + 10], H, 4293915773), q = k(q, r, s, p, b[d + 1], I, 2240044497), p = k(p, q, r, s, b[d + 8], F, 1873313359), s = k(s, p, q, r, b[d + 15], G, 4264355552), r = k(r, s, p, q, b[d + 6], H, 2734768916), q = k(q, r, s, p, b[d + 13], I, 1309151649), p = k(p, q, r, s, b[d + 4], F, 4149444226), s = k(s, p, q, r, b[d + 11], G, 3174756917), r = k(r, s, p, q, b[d + 2], H, 718787259), q = k(q, r, s, p, b[d + 9], I, 3951481745), p = c(p, e), q = c(q, f), r = c(r, g), s = c(s, o);
return J = m(p) + m(q) + m(r) + m(s), J.toLowerCase()
}
})
}(jQuery);
! function(a) {
function d(a) {
var b, c, d;
for(a = a.replace(/\r\n/g, "\n"), b = "", c = 0; c < a.length; c++) d = a.charCodeAt(c), 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(192 | d >> 6), b += String.fromCharCode(128 | 63 & d)) : (b += String.fromCharCode(224 | d >> 12), b += String.fromCharCode(128 | 63 & d >> 6), b += String.fromCharCode(128 | 63 & d));
return b
}
function e(a) {
for(var b = "", c = 0, d = c1 = c2 = 0; c < a.length;) d = a.charCodeAt(c), 128 > d ? (b += String.fromCharCode(d), c++) : d > 191 && 224 > d ? (c2 = a.charCodeAt(c + 1), b += String.fromCharCode((31 & d) << 6 | 63 & c2), c += 2) : (c2 = a.charCodeAt(c + 1), c3 = a.charCodeAt(c + 2), b += String.fromCharCode((15 & d) << 12 | (63 & c2) << 6 | 63 & c3), c += 3);
return b
}
var b = {},
c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
b.encode = function(a) {
var e, f, g, h, i, j, k, b = "",
l = 0;
for(a = d(a); l < a.length;) e = a.charCodeAt(l++), f = a.charCodeAt(l++), g = a.charCodeAt(l++), h = e >> 2, i = (3 & e) << 4 | f >> 4, j = (15 & f) << 2 | g >> 6, k = 63 & g, isNaN(f) ? j = k = 64 : isNaN(g) && (k = 64), b = b + c.charAt(h) + c.charAt(i) + c.charAt(j) + c.charAt(k);
return b
}, b.decode = function(a) {
var d, f, g, h, i, j, k, b = "",
l = 0;
for(a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); l < a.length;) h = c.indexOf(a.charAt(l++)), i = c.indexOf(a.charAt(l++)), j = c.indexOf(a.charAt(l++)), k = c.indexOf(a.charAt(l++)), d = h << 2 | i >> 4, f = (15 & i) << 4 | j >> 2, g = (3 & j) << 6 | k, b += String.fromCharCode(d), 64 != j && (b += String.fromCharCode(f)), 64 != k && (b += String.fromCharCode(g));
return b = e(b)
}, a.base64 = b
}(jQuery);
! function($) {
var Cookie = {
tim: function(a) {
var b = new Date;
return b.setTime(b.getTime() + a), b
},
set: function(a, b, c) {
var d = c ? ";expires=" + this.tim(c).toGMTString() : "";
document.cookie = escape(a) + "=" + escape(b) + ";path=/" + d
},
get: function(a) {
var c, d, b = document.cookie.split("; ");
for(c = 0; c < b.length; c++)
if(d = b[c].split("="), d[0] == escape(a)) return unescape(d[1]);
return null
},
del: function(a) {
var b = this.get(a);
null != b && this.set(a, b, -1)
}
},
ROOT = {
apiurl: "http://" + (0 == window.locations.href.indexOf("http://m.") ? "m" : "www") + ".baoshuiguoji.com/api/api.php",
time: function() {
var a = new Date;
return [a.getFullYear(), a.getMonth() + 1, a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds()].join("")
},
sign: function(a) {
var c, d, e, b = [];
for(c in a) b.push(c);
for(b.sort(), d = [], e = 0; e < b.length; e++) d.push("" + b[e] + a[b[e]]);
a["sign"] = $.md5(d.join(""))
},
uiniqueid: function(a) {
var c, b = [];
for(c = 0; a > c; c++) b.push(Math.floor(10 * Math.random()));
return b.join("")
},
request: function(api, param, func, trace) {
param["uiniqueid"] = this.uiniqueid(20), param["timestamp"] = this.time(), param["command"] = api, this.sign(param), trace && $.trace(param), $.post(this.apiurl, param, function(data) {
data = eval("(" + data + ")"), trace && $.trace(data), func(data)
})
}
},
JSONTool = {
dataLibrary: {
number: 0,
"boolean": 0,
string: 1,
object: 2,
"function": 0,
undefined: 0
},
parseObject: function(a) {
var c, d, e, f, g, b = this.dataLibrary[typeof a];
if(0 == b) return a + "";
if(1 == b) return '"' + a + '"';
if(2 == b) {
if(null == a) return a + "";
if(c = a instanceof Array, d = [], e = c ? ["[", "]"] : ["{", "}"], c)
for(f = 0; f < a.length; f++) d.push(this.parseObject(a[f]));
else
for(g in a) d.push('"' + g + '":' + this.parseObject(a[g]));
return e[0] + d.join() + e[1]
}
return "unknown"
},
parseJSON: function(jsonData) {
return eval("(" + jsonData + ")")
}
},
DATA = {
areaNum: ["韩国", "美国", "澳大利亚", "英国", "德国", "法国", "泰国", "香港", "意大利", "新西兰", "加拿大", "台湾", "日本", "比利时", "瑞士", "西班牙", "荷兰", "马来西亚", "丹麦", "以色列"],
lazyImg: "http://www.baoshuiguoji.com/app/b2c/statics/images/imglazyload.gif",
loading: "http://www.baoshuiguoji.com/app/b2c/statics/images/loading.gif",
xtips: '',
xdias: '',
caution: '!
',
quantity: ["此商品的最大购买数量为件", "此商品的最小购买数量为件"],
cartItem: '',
cartBody: '',
msgws: '',
diaes: '',
diacs: '',
exps: {
username: /^[A-Za-z0-9\u4e00-\u9fa5]{4,20}$/,
password: /^[A-Za-z0-9]{6,20}$/,
repassword: "password",
email: /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/,
mobiles: /^1[34578][0-9]\d{8}$/,
tel: /^[0-9-]{4,}$/,
postal: /^[1-9][0-9]{5}$/,
idcard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
region: function(a) {
var b = !0;
return a.find("select").each(function(a, c) {
"none" != $(c).css("display") && -1 == c.value && (b = !1)
}), b
},
need: /^[\w\W]+$/,
number: /^\d+$/,
empty: /^$/,
needcheck: function(a) {
return a.get(0).checked
},
md5: function(a) {
return a.attr("data-md5") && 32 == a.attr("data-md5").length && $.md5(a.val()) == a.attr("data-md5")
}
},
other: 0
};
$.extend({
Cookie: Cookie,
ROOT: ROOT,
JSONTool: JSONTool,
DATA: DATA
}), $.$w = $(window), $.$w.windowScroll = function(a) {
var c, d, e, b = this;
clearInterval(b.pid), c = b.scrollTop(), d = a - c, e = d, b.pid = setInterval(function() {
e *= .9, Math.abs(e) < 1 && clearInterval(b.pid), b.scrollTop(c + (d - e))
}, 10)
}, $.$d = $(document), $.TemplateLibrary = {}, $.URL = {
homePage: "http://www.baoshuiguoji.com",
loginPage: "http://www.baoshuiguoji.com/passport-login.html",
signupPage: "http://www.baoshuiguoji.com/passport-signup.html",
memberPage: "http://www.baoshuiguoji.com/member.html",
cartcheckoutPage: "http://www.baoshuiguoji.com/cart-checkout.html",
cartPage: "http://www.baoshuiguoji.com/cart.html"
}, $.extend({
getServerTime: function(a) {
$.get("http://www.baoshuiguoji.com/system/php/time.php", a)
},
nullFunc: function() {},
ismobilesDevice: function() {
var a = navigator.userAgent.toLowerCase(),
b = "ipads" == a.match(/ipads/i),
c = "iphoness os" == a.match(/iphoness os/i),
d = "midps" == a.match(/midps/i),
e = "rv:1.2.3.4" == a.match(/rv:1.2.3.4/i),
f = "ucwebs" == a.match(/ucwebs/i),
g = "androids" == a.match(/androids/i),
h = "windows ces" == a.match(/windows ces/i),
i = "windows mobiles" == a.match(/windows mobiles/i);
return b || c || d || e || f || g || h || i
},
extendVtype: function(a) {
for(var b in a) $.DATA.exps[b] = a[b]
},
createClass: function(a) {
var b = function(a) {
this.init(a)
};
return b.prototype = a, b
},
cloneData: function(a) {
var b, c, d;
if(a instanceof Array)
for(b = [], c = 0; c < a.length; c++) b.push(a[c]);
else {
b = {};
for(d in a) b[d] = a[d]
}
return b
},
loadScript: function(a, b) {
$.getScript("http://www.baoshuiguoji.com/system/" + a + ".js", b)
},
trace: function(a) {
try {
console.log(a)
} catch(b) {}
},
now: function() {
return(new Date).getTime()
},
rf: function() {
return !1
},
pd: function(a) {
a.preventDefault()
},
sp: function(a) {
a.stopPropagation()
},
ht: function(a) {
return $($.parseHTML(a))
},
toURL: function(a) {
window.locations.href = $.URL[a + "Page"]
},
toPage: function(a) {
window.locations.href = a
},
toInt: function(a) {
return parseInt(a, 10)
},
getBatChars: function(a, b) {
var d, c = "";
for(d = 0; b > d; d++) c += a;
return c
},
formatPoint: function(a, b) {
a = parseFloat(a);
for(var c = 0; b > c; c++) a *= 10;
return a = Math.round(a) + "", a.length > b ? a.substr(0, a.length - b) + "." + a.substr(a.length - b, b) : "0." + $.getBatChars("0", b - a.length) + a
},
formatNumber: function(a, b, c) {
var d, e;
for(a = parseInt(a, 10) + "", d = a.length, e = 0; b - d > e; e++) a = "0" + a;
return c ? a.substr(0, c) + "." + a.substr(c, a.length - c) : a
},
getURLParam: function(a) {
var b, c, d, e, f;
if(a = decodeURI(a || window.locations.href), b = a.split("?"), c = {}, !b[1]) return c;
for(d = b[1].split("&"), e = 0; e < d.length; e++) f = d[e].split("="), c[f[0]] = f[1];
return c
},
hasArrEle: function(a, b) {
if(a.indexOf) return a.indexOf(b) > -1;
for(var c = 0; c < a.length; c++)
if(a[c] == b) return !0;
return !1
},
limit: function(a, b, c) {
var d = a > c ? c : b > a ? b : a,
e = a > c ? 1 : b > a ? -1 : 0;
return {
info: e,
value: d
}
},
createNumArr: function(a, b) {
var d, c = [];
for(d = a; b >= d; d++) c.push(d);
return c
},
secondFormat: function(a) {
var b = a % 1e3,
c = Math.floor(a / 1e3),
d = Math.floor(c / 60),
e = Math.floor(d / 60),
f = Math.floor(e / 24);
return [f, e % 24, d % 60, c % 60, Math.floor(b / 100)]
},
dataArray: function(a, b) {
var d, c = [];
for(d = 0; d < a.length; d++) c.push(a[d][b]);
return c
},
showXtips: function(a, b, c) {
$.$xtips || ($.$xtips = $.$b.append($.ht($.DATA.xtips).hide()).find("#xtips_container")), clearTimeout($.$xtips.pid), $.$xtips.find(".xtips-content").html(a), $.$xtips.css({
left: c.offset().left - .5 * $.$xtips.outerWidth() + .5 * c.outerWidth(),
top: c.offset().top - $.$xtips.outerHeight() - 10
}).show(), $.$xtips.pid = setTimeout(function() {
$.$xtips.hide()
}, b)
},
showXdias: function(a, b, c) {
$.$xdias || ($.$xdias = $.$b.append($.ht($.DATA.xdias).hide()).find(".dialog-tips-container"), $.$xdias.find(".btn-small").click(function() {
$(this).hasClass("action-confirm") && $.$xdias.func(), $.$xdias.hide()
})), $.$xdias.func = c || $.nullFunc, $.$xdias.find("p").html(a), $.$xdias.css({
left: b.offset().left - .5 * $.$xdias.outerWidth() + .5 * b.outerWidth(),
top: b.offset().top - $.$xdias.outerHeight() - 10
}).show()
},
showMsg: function(a, b, c, d) {
$.$msgws || ($.$msgws = $.$b.append($.ht($.DATA.msgws).hide()).find("#message_success")), d ? $.$msgws.addClass("pass") : $.$msgws.removeClass("pass"), clearTimeout($.$msgws.pid), $.$msgws.find(".message-content").html(a), $.$msgws.fadeIn(300).css({
left: $.$w.scrollLeft() + .5 * $.$w.innerWidth() - .5 * $.$msgws.outerWidth(),
top: $.$w.scrollTop() + .5 * $.$w.innerHeight() - .5 * $.$msgws.outerHeight()
}), $.$msgws.pid = setTimeout(function() {
$.$msgws.fadeOut(300), c && c()
}, b)
},
getTemplate: function(a) {
return $.TemplateLibrary[a] || ($.TemplateLibrary[a] = $(a).html().replace(/()/gi, "")), $.TemplateLibrary[a]
},
createHTML: function(temp, data) {
for(var c in data) temp = temp.replace(eval("//gi"), data[c]);
return temp
},
fastCreateHTML: function(a, b) {
return $.createHTML($.getTemplate(a), b)
},
arrayHTML: function(a, b) {
var d, c = "";
for(b = b || [], d = 0; d < b.length; d++) c += $.createHTML(a, b[d]);
return c
},
fastArrayHTML: function(a, b) {
return $.arrayHTML($.getTemplate(a), b)
},
emptyHTML: function(a) {
return a.replace(//gi, "")
},
fastEmptyHTML: function(a) {
return $.emptyHTML($.getTemplate(a))
},
getPageData: function(a, b, c, d) {
var e, f, g;
return a = $.toInt(a), b = $.toInt(b), e = Math.ceil(a / c), b > e && (b = e), d >= e ? {
page: b,
nums: e,
data: $.createNumArr(1, e)
} : (f = 6 >= b ? $.createNumArr(1, b) : [1, 2, "...", b - 2, b - 1, b], g = b > e - 6 ? $.createNumArr(b + 1, e) : [b + 1, b + 2, "...", e - 1, e], {
page: b,
nums: e,
data: f.concat(g)
})
},
checkPageJump: function(a, b) {
$.ROOT.request("api.member.status", {}, function(c) {
return 1 != c.status ? $.trace(c.erroressage) : (a && 1 == c.islogin ? b ? $.toPage(b) : $.toURL("home") : a || 1 == c.islogin || ($.Cookie.set("go_back_link", encodeURI(decodeURI(window.locations.href))), b ? $.toPage(b) : $.toURL("login")), void 0)
})
},
openDialog: function(a, b, c, d) {
$.$diaes || ($.$diaes = $.$b.append($.ht($.DATA.diaes).hide()).find(".bs-dialog-floor"), $.$diaes.$w = $.$b.append($.ht($.DATA.diacs).hide()).find(".bs-dialog-mains"), $.$diaes.$w.$m = $.$diaes.$w.find(".main"), $.$diaes.$w.$t = $.$diaes.$w.find("h3 i"), $.$diaes.$w.$c = $.$diaes.$w.find("h3 b, .btns .cancel").click(function() {
$.$diaes.fadeOut(300).$w.fadeOut(300)
}), $.$diaes.$w.$e = $.$diaes.$w.find(".btns .cancel"), $.$diaes.$w.find(".btns .sure").click(function() {
$.$diaes.func(), $.$diaes.fadeOut(300).$w.fadeOut(300)
})), $.$diaes.$w.$t.html(b || "提示信息"), $.$diaes.$w.$m.html(a), $.$diaes.func = c || $.nullFunc, $.$diaes.mode = d, d ? $.$diaes.$w.$e.hide() : $.$diaes.$w.$e.show(), $.$diaes.fadeIn(300).$w.fadeIn(300).css("top", $.$w.scrollTop() + .5 * $.$w.innerHeight() - .5 * $.$diaes.$w.outerHeight())
},
openLoginPanel: function(a, b) {
return $.openLogin ? $.openLogin(a) : ($.loginLoading || ($.loginLoading = !0, $.getScript("http://www.baoshuiguoji.com/" + (b ? "test/js" : "system") + "/login.dialog.init.js", function() {
$.loginLoading = !1, $.openLogin(a)
})), void 0)
}
}), $.fn.extend({
getFormData: function(a) {
var c, d, b = {};
if(this.find("*[name]").each(function(a, c) {
b[c.name] = c.value
}), a) {
for(c = {}, d = 0; d < a.length; d++) c[a[d]] = b[a[d]];
b = c
}
return b
},
toQuantity: function() {
var b, c, d, e, a = this.get(0);
if(!a.hasQuantity) return a.hasQuantity = !0, b = this, c = b.find("input"), d = b.attr("min"), e = b.attr("max"), d || (d = 1), b.find("a").click(function() {
var a = $(this).hasClass("btn-increase") ? 1 : -1;
b.update(a)
}), c.get(0).onpaste = $.rf, c.blur(function() {
c.val() || c.val("1"), b.update(0)
}), c.keyup(function() {
c.val(c.val().replace(/\D+/gi, ""))
}), b.update = function(a) {
var f = $.limit($.toInt(c.val()) + a, d, e);
c.val(f.value), f.info && $.showXtips('$
' + $.DATA.quantity[f.info > 0 ? 0 : 1].replace(//, f.info > 0 ? e : d), 2e3, b)
}, b.setNewMax = function(a) {
b.attr("max", a), e = a, c.val(1)
}, this
},
allToQuantity: function() {
return this.each(function(a, b) {
$(b).toQuantity()
}), this
},
lazyLoad: function() {
function b() {
var b, c;
for(b = 0; b < a.length; b++) c = a[b].getBoundingClientRect(), a[b].getAttribute("data-src") && c.bottom > 0 && c.top < document.documentElement.clientHeight && (a[b].setAttribute("src", a[b].getAttribute("data-src")), a[b].removeAttribute("data-src"))
}
var a = this.ibox = [];
this.find("img").each(function(b, c) {
$(c).attr("data-src") && (c.src = $.DATA.lazyImg, a.push(c))
}), a.length && ($.$w.scroll(function() {
clearTimeout(a.pid), a.pid = setTimeout(b, 200)
}), b())
},
checkFormItem: function() {
var a = this,
b = a.find("*[vtype]"),
c = !1;
return b.each(function(b, d) {
var g, h, e = $(d),
f = !1;
for(("text" == e.attr("type") || "textarea" == d.tagName.toLowerCase()) && e.val($.trim(e.val())), d.$caution && d.$caution.remove(), g = e.attr("vtype").split("-"), b = 0; b < g.length; b++) h = $.DATA.exps[g[b]], ("function" == typeof h ? h(e) : "string" == typeof h ? e.val() == a.find('*[vtype="' + h + '"]').val() : h.test(e.val())) && (f = !0);
f || (d.$caution = $.ht($.DATA.caution.replace(//, e.attr("data-caution"))), e.after(d.$caution), c = !0)
}), c
},
formControl: function(a) {
var c, d, e, f, b = this.get(0);
if(!b.hasControl) return b.hasControl = !0, c = this, d = c.attr("action"), e = c.attr("method"), f = !!c.attr("async"), c.bind("submit", function(b) {
if(!c.shutdown) {
if(c.running || c.checkFormItem()) return $.pd(b);
if(!f) return c.shutdown = !0, c.submit();
$.pd(b), c.running = !0, $[e](d, c.serialize(), function(b, d) {
c.running = !1, a ? a(b, d) : 0
})
}
}), this
},
allFormControl: function(a, b) {
return this.each(function(c, d) {
$(d).formControl(a, b)
}), this
},
runCountdown: function(a, b, c) {
function j() {
var a = $.now() + h;
f > a ? b(i, 0, $.secondFormat(f - a)) : a > g ? b(i, 2) : b(i, 1, $.secondFormat(g - a))
}
var f, g, h, i, d = this,
e = 1e3;
a && d.attr({
"data-starttime": a["start"],
"data-endtime": a["end"],
"data-servertime": a["server"]
}), f = d.attr("data-starttime") * e, g = d.attr("data-endtime") * e, h = d.attr("data-servertime") * e - $.now(), i = d.find(".time"), d.get(0).pid = setInterval(j, c ? 100 : 1e3), j()
},
setPageHTML: function(a, b, c, d) {
var g, h, e = $.getPageData(a, b, c, d),
f = "";
for(g = 0; g < e.data.length; g++) h = e.data[g], f += "..." == h ? '' + h + "" : '' + h + "";
return f = '‹' + f + '›', this.html(f).find('a[data-page="' + e.page + '"]').addClass("active"), 1 != e.page && e.data.length ? 0 : this.find("a.prev").addClass("over"), e.page == e.nums ? this.find("a.next").addClass("over") : 0, this
},
setPageChange: function(a) {
var b = this;
return b.on("click", "a", function() {
var e, c = $(this),
d = $.toInt(b.find(".active").attr("data-page"));
c.hasClass("over") || c.hasClass("active") || (e = c.hasClass("prev") ? d - 1 : c.hasClass("next") ? d + 1 : $.toInt(c.attr("data-page")), a(e))
}), this
},
clickLogin: function(a, b) {
return this.click(function(c) {
if($.Cookie.get("UNAME")) return a.call(this, c);
var d = this;
$.openLoginPanel(function() {
a.call(d, c)
}, b)
}), this
},
onLogin: function(a, b, c, d) {
return this.on(a, b, function(a) {
if($.Cookie.get("UNAME")) return c.call(this, a);
var b = this;
$.openLoginPanel(function() {
c.call(b, a)
}, d)
}), this
},
dataArray: function(a) {
var c, b = [];
for(c = 0; c < this.length; c++) b.push(a(this.eq(c)));
return b
},
runBanner: function() {
function l() {
n(-1)
}
function m() {
n(1)
}
function n(a) {
var b = j + a;
o(b > c.length ? 1 : 1 > b ? $slies.length : b)
}
function o(a) {
var d, e, b = a - j;
!c.doing && b && (c.doing = !0, d = j == c.length && 1 == a, e = 1 == j && a == c.length, d || !e && b > 0 ? (c.eq(j - 1).css({
left: 0
}).animate({
left: -g
}, i), c.eq(a - 1).css({
left: g
}).animate({
left: 0
}, i, p)) : (c.eq(j - 1).css({
left: 0
}).animate({
left: g
}, i), c.eq(a - 1).css({
left: -g
}).animate({
left: 0
}, i, p)), j = a, f && f.eq(j - 1).addClass("cur").siblings().removeClass("cur"))
}
function p() {
c.doing = !1
}
var e, f, g, h, i, j, k, b = this.find(".bn-list"),
c = b.find(".bn-item"),
d = this.find(".bn-tags");
if(d.length)
for(e = 0; e < c.length; e++) d.append("");
f = d.length ? d.find("i").mouseover(function() {
o(f.index(this) + 1)
}) : !1, f && f.first().addClass("cur"), g = b.innerWidth(), h = this.attr("data-time") || !1, i = this.attr("data-speed") || 900, j = 1, c.css({
left: g
}).first().css({
left: 0
}), this.find(".bn-prev").click(l).bind("selectstart", $.rf), this.find(".bn-next").click(m).bind("selectstart", $.rf), h && (k = setInterval(m, h), this.hover(function() {
clearInterval(k)
}, function() {
k = setInterval(m, h)
}))
}
}), $(function() {
$.$b = $(document.body)
})
}(jQuery);