/*
item.jd.com Compressed by uglify
Author:keelii
Date: 2014-10-21 5:57:53 [PM]
*/
function insertScript(t, e) {
var i = document.getElementsByTagName("head")[0], s = document.createElement("script");
if (s.setAttribute("type", "text/javascript"), e)
for (var a in e)
e.hasOwnProperty(a) && s.setAttribute(a, e[a]);
s.setAttribute("src", t), i.appendChild(s)
}
function onNumChange() {
var t = Number($("#buy-num").val()), e = $("#gift-tips a"), i = e.attr("href");
e.length && e.attr("href", i.replace(/pcount=\d+/, "pcount=" + t))
}
function sendRequest(t) {
var e = new Image;
e.setAttribute("src", t), e = null
}
function strtotime(t, e) {
function i(t, e, i) {
var s, a = c[e];
a !== void 0 && (s = a - r.getDay(), 0 === s ? s = 7 * i : s > 0 && "last" === t ? s -= 7 : 0 > s && "next" === t && (s += 7), r.setDate(r.getDate() + s))
}
function s(t) {
var e = t.split(" "), s = e[0], a = e[1].substring(0, 3), n = /\d+/.test(s), o = "ago" === e[2], c = ("last" === s ? -1 : 1) * (o ? -1 : 1);
if (n && (c *= parseInt(s, 10)), l.hasOwnProperty(a) && !e[1].match(/^mon(day|\.)?$/i))
return r["set" + l[a]](r["get" + l[a]]() + c);
if ("wee" === a)
return r.setDate(r.getDate() + 7 * c);
if ("next" === s || "last" === s)
i(s, a, c);
else if (!n)
return !1;
return !0
}
var a, n, o, r, c, l, d, p, m, u;
if (!t)
return null;
if (t = t.replace(/\s{2,}/g, " ").replace(/[\t\r\n]/g, "").toLowerCase(), "now" === t)
return null === e || isNaN(e) ? 0 | (new Date).getTime() / 1e3 : 0 | e;
if (!isNaN(a = Date.parse(t)))
return 0 | a / 1e3;
if ("now" === t)
return (new Date).getTime() / 1e3;
if (!isNaN(a = Date.parse(t)))
return a / 1e3;
if (n = t.match(/^(\d{2,4})-(\d{2})-(\d{2})(?:\s(\d{1,2}):(\d{2})(?::\d{2})?)?(?:\.(\d+)?)?$/))
return o = n[1] >= 0 && 69 >= n[1] ? +n[1] + 2e3 : n[1], new Date(o, parseInt(n[2], 10) - 1, n[3], n[4] || 0, n[5] || 0, n[6] || 0, n[7] || 0) / 1e3;
if (r = e ? new Date(1e3 * e) : new Date, c = {sun: 0,mon: 1,tue: 2,wed: 3,thu: 4,fri: 5,sat: 6}, l = {yea: "FullYear",mon: "Month",day: "Date",hou: "Hours",min: "Minutes",sec: "Seconds"}, p = "(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)", m = "([+-]?\\d+\\s" + p + "|" + "(last|next)\\s" + p + ")(\\sago)?", n = t.match(RegExp(m, "gi")), !n)
return !1;
for (u = 0, d = n.length; d > u; u++)
if (!s(n[u]))
return !1;
return r.getTime() / 1e3
}
function mktime() {
var t = new Date, e = arguments, i = 0, s = ["Hours", "Minutes", "Seconds", "Month", "Date", "FullYear"];
for (i = 0; s.length > i; i++)
if (e[i] === void 0)
e[i] = t["get" + s[i]](), e[i] += 3 === i;
else if (e[i] = parseInt(e[i], 10), isNaN(e[i]))
return !1;
return e[5] += e[5] >= 0 ? 69 >= e[5] ? 2e3 : 100 >= e[5] ? 1900 : 0 : 0, t.setFullYear(e[5], e[3] - 1, e[4]), t.setHours(e[0], e[1], e[2]), (t.getTime() / 1e3 >> 0) - (0 > t.getTime())
}
function monthDay(t, e) {
var i, s, a, n = new Date(1e3 * t), o = new Date(1e3 * e), r = n.getFullYear(), c = n.getMonth() + 1, l = n.getDate(), d = o.getFullYear(), p = o.getMonth() + 1, m = o.getDate(), u = "", h = 12 * (d - r) + p - c;
return i = Math.floor(h / 12), s = h % 12, s = 0 === s - Math.floor(s) ? s + 1 : s, a = (mktime(0, 0, 0, p, m, d) - mktime(0, 0, 0, p, l, d)) / 86400, 0 > a && (s -= 1), 0 > s && (i -= 1), i > 0 && (u += i + "\u5e74"), s > 0 && (u += s + "\u4e2a\u6708"), u
}
function el_top_middle(t, e, i) {
var s = t.outerWidth(), a = t.outerHeight();
e && (s = e), i && (a = i);
var n = function() {
};
n.doc = function() {
return "BackCompat" == document.compatMode ? document.body : document.documentElement
}, n.clientWidth = function() {
return n.doc().clientWidth
}, n.clientHeight = function() {
return n.doc().clientHeight
}, n.docWidth = function() {
return Math.max(n.doc().clientWidth, n.doc().scrollWidth)
}, n.docHeight = function() {
return Math.max(n.doc().clientHeight, n.doc().scrollHeight)
};
var o = n.docHeight() != n.clientHeight() ? 16 : 0, r = $(document).scrollTop(), c = (n.clientHeight() - a) / 2 + r, l = (n.clientWidth() - o - s) / 2;
t.css({left: l,top: c})
}
function showBaitiaoFq() {
// var t = document.getElementById("Fqfk_Tip");
// $("#InitCartUrl").attr("href"), t.style.width = "500px";
// var e = 502, i = 358, s = ' <div id="Fqfk_Tip" class="Tip360" style="width:auto;"> <div class="Tip_Title"> <em> <img src="' + fq_serverSite + 'skin/images/tip_close.jpg" class="Tip_Close"/> </em>\u767d\u6761/\u5206\u671f </div> <div class="Tip_Content" id="Tip_fq0"> <div id="baitiaofenqi" style="position:relative;width:482px;height:330px;"> </div> </div> </div>', a = ("<div id='c04tip' class='clearfix' style='z-index:20000;position:absolute;width:" + (e + 5) + "px;height:" + (i + 5) + "px;'><div style='position:absolute;margin:5px 0 0 5px;width:" + e + "px;height:" + i + "px;z-index:20001;'>{HTML}</div></div>").replace("{HTML}", s), n = $(a);
// n.append(s), $(document.body).prepend(n), $("#Fqfk_Tip").show(), el_top_middle($("#c04tip"), 502, 358), $.ajax({url: "http://nfa.jd.com/loadFa.js?aid=2_163_5702",dataType: "script",cache: !0}), $(".Tip_Close").click(function() {
// $("#c04tip").remove()
// })
}
function showNaBaitiao() {
// var t = 502, e = 358, i = $("<div id='c04tip' class='clearfix' style='z-index:20000;position:absolute;width:" + (t + 5) + "px;height:" + (e + 5) + "px;'><div style='position:absolute;margin:5px 0 0 5px;width:" + t + "px;height:" + e + "px;z-index:20001;'></div></div>"), s = ' <div id="Fqfk_Tip" class="Tip360" style="width:auto;width:500px;height:310px;"> <div class="Tip_Title"> <em><img src="http://jd2008.jd.com/purchase/skin/images/tip_close.jpg" class="Tip_Close"></em> \u62ff\u767d\u6761 </div> <div class="Tip_Content" id="nabaitiao"></div> </div>';
// i.append(s), $(document.body).prepend(i), $("#Fqfk_Tip").show(), el_top_middle($("#c04tip"), 502, 358), $(".Tip_Close").click(function() {
// $("#c04tip").remove()
// }), $.ajax({url: "http://nfa.jd.com/loadFa.js?aid=2_163_5480",dataType: "script",cache: !0})
}
function showTip100(proobj) {
var TipDivW = $(proobj).width(), TipDivH = $(proobj).height();
TipDivW = 502, TipDivH = 358;
var TipDiv = $("<div id='c04tip' class='clearfix' style='z-index:20000;position:absolute;width:" + eval(TipDivW + 5) + "px;height:" + eval(TipDivH + 5) + "px;'><div style='position:absolute;margin:5px 0 0 5px;width:" + TipDivW + "px;height:" + TipDivH + "px;z-index:20001;'></div></div>");
fq_returnData && fq_formatData(fq_returnData), TipDiv.append($(proobj)), 0 == $("#c04tip").length && $(document.body).prepend(TipDiv), $(proobj).show(), el_top_middle($("#c04tip"), 502, 358), $("#Tip_apply,#Tip_continue,.Tip_Close").click(function() {
$("#c04tip").remove(), $("#choose-btn-coll").after('<div id="Fqfk_Tip" class="Tip360"></div>')
})
}
function fq_showFq_html(t) {
if (null != t) {
if (0 == t.json.length)
return;
if (0 == t.json.length)
return;
if (null != t.json[0].error)
return;
document.getElementById(fq_btnPanel).innerHTML = '<a href="javascript:;" class="btn-divide" onclick="showTip100(\'#Fqfk_Tip\')">\u5206\u671