!function(e, t, i) {
t.config({
enable_ozma: true
});
i("module/ad/adSlide", ["tui/event"], function(t) {
var i = t.extend({
initialize: function(t) {
var n = this;
n.box = t;
n.panel = t.find(".panel");
n.$items = n.panel.find(".yk-col4");
n.perWidth = n.$items.eq(0).width() + 20;
n.isAnimate = false;
i.superClass.initialize.apply(n, arguments);
n.current = 0;
n.reset();
t.delegate(".mbtn a", "click", function(t) {
t.preventDefault();
var i = e(this).closest(".mbtn").hasClass("next");
if (!n.isAnimate)
var a = i ? n.turn("right") : n.turn("left")
});
t.hover(function() {
n.clearTimer()
}, function() {
n.setTimer()
});
e(window).bind("resize", function() {
setTimeout(function() {
if (n.panel.is(":visible"))
n.reset()
}, 200)
})
},
reset: function() {
var e = this;
e.panel.css("left", 0);
e.current = 0;
e.clearTimer();
e.setTurn();
if (e.$items.length * this.perWidth > e.box.width() + 20)
e.box.find(".prev, .next").show();
else
e.box.find(".prev, .next").hide()
},
setTurn: function() {
var t = this
, i = t.$items.length;
if (t.$items.length == t.panel.children().length) {
t.panel.css("width", 3 * t.perWidth * i);
var n = (navigator.userAgent.toLowerCase().match(/msie[\s|\/]([\d.]+)/) || ["", "0"])[1];
if (n <= 8) {
var a = ""
, s = "";
a = t.panel[0].cloneNode(true).children;
s = t.panel[0].cloneNode(true).children;
t.panel.append(a).append(s)
} else
t.panel.append(t.$items.clone()).append(t.$items.clone());
setTimeout(function() {
t.limitPos = e(t.panel.children()[i]).position().left
}, 100)
}
t.setTimer()
},
turn: function(e) {
var t = this.panel.position().left
, i = this.$items.length
, n = this
, a = n.perWidth;
n.isAnimate = true;
if (0 == n.current || n.current == 2 * i) {
t = -n.limitPos;
n.panel.css("left", t);
n.current = i
}
if ("left" == e)
n.current--;
else {
a = -n.perWidth;
n.current++
}
this.panel.animate({
left: parseInt(t) + a
}, 300, function() {
n.isAnimate = false
})
},
setTimer: function() {
var e = this;
if (e.$items.length * e.perWidth > e.box.width() + 20)
e.timer = setInterval(function() {
e.turn("right")
}, 5e3)
},
clearTimer: function() {
if (this.timer)
clearInterval(this.timer)
}
});
var n = {};
return function(t) {
var t = t || e(document);
var a = e(".modPSlide2", t);
var s;
if (a[0])
a.each(function(t, a) {
s = e(a).attr("id");
if (n[s])
n[s].reset();
else
n[s] = new i(e("#" + s))
})
}
});
i("module/ad/ad", ["tui/browser", "tui/net", "tui/event", "module/stat/combo-stat", "tui/cookie", "module/ad/adSlide", "module/global", "module/ad/util"], function(t, i, n, a, s, o, r, d) {
var u = {
OST: {},
seedCookie: {},
seedVideo: [],
showID: [],
time: 0,
init: function() {
u.getAD(e("body"));
u.getShowAD();
u.seedVideoInit();
window.TUI = window.TUI || {};
TUI.event = new n;
TUI.event.bind("ad:loaded", function() {
if (0 != u.time)
return;
u.getShowADData();
o();
if (t.isMobile) {
e(".yk-AD-tong .mod > object").parent().css("display", "none");
if (0 != e("#ab_625").length && 0 == e("#ab_625 object").length && e("#ab_625").html())
e(".yk-logo").html(e("#ab_625").html());
setTimeout(function() {
e(".yk-AD-adfocus >.ad-inner").html("")
}, 300)
}
u.time++
})
},
getAD: function(i) {
if (!i)
return;
var n = e(i).find("div[data-adid]")
, a = "";
n.each(function(t, i) {
a += e(i).data("adid") + ","
});
if ("true" == window.logoAD) {
var s = t.isMobile ? e("body").append("
") : e(".yk-logo").attr("id", "ab_625");
a += "625"
}
var o = u.getShowAD();
if (o) {
a += "," + o.id;
u.requestAD({
id: a,
s: o.s
})
} else
u.requestAD({
id: a
})
},
requestAD: function(n) {
if (!n.id)
return;
var s = {};
if ("undefined" != typeof PageConfig)
s = PageConfig;
var o = {
p: n.id,
s: n.s || s.showid || "",
sid: a.pvid || "",
aw: "w",
k: s.showid_en || "",
rst: d.getAdRst()
};
var r = navigator.userAgent.toLowerCase();
var u = !!t.iOS || r.indexOf("mac") !== -1 || false;
if (t.isPad || t.isPhone)
o.bt = t.isPad ? "pad" : "phone";
if (u || !!t.android)
o.ios = u ? "ios" : "Android";
i.getScript("//html.atm.youku.com/html?" + e.param(o), {
charset: "gbk"
})
},
getShowAD: function() {
var t = window.adShowIds || "";
if (!t)
return false;
var i = "ab_101556";
if (0 == e("#" + i).length)
e("body").append("");
return {
id: 101556,
s: t
}
},
getShowADData: function() {
if (u.showID.length)
return;
var t = e("#ab_101556")
, i = t.html();
if (0 == t.length || !i)
return false;
try {
var n = {}
, a = JSON.parse(i);
u.showID = a.shows;
u.appendShowAD(e("body"))
} catch (s) {}
},
appendShowAD: function(t) {
if (!u.showID)
return;
for (var i = 0, n = u.showID.length; i < n; i++) {
var a = t.find("div[_showid='" + u.showID[i].id + "']");
if (0 == a.length)
continue;
var s = '';
a.each(function(t, i) {
e(i).append(s)
})
}
},
seedVideoInit: function() {
var t = e("div[data-advid]");
try {
var i = JSON.parse(s("advideo"));
if ("object" == typeof i && i)
this.seedCookie = i
} catch (n) {
return
}
this.getSeedVideo(t);
this.sendSeedClickLog()
},
getSeedVideo: function(t) {
if (0 == t.length)
return;
var i = [];
var n = e(t[0]).data("advid");
t.each(function(a, s) {
s = e(s).data("advid");
if (n != s) {
n = s;
u.setSeedVideo(i[0], i.length);
i = [s]
} else
i.push(s);
if (a == t.length - 1)
u.setSeedVideo(i[0], i.length)
})
},
setSeedVideo: function(t, i) {
var n = e("#" + t + "_1")
, a = e("[data-advid='" + t + "']");
if (!n || 0 == i)
return;
var s = n.parents(".tab_c");
if (0 != s.length && !s.is(":visible"))
return;
this.seedCookie[t] = !this.seedCookie[t] ? Math.floor(i * Math.random() + 1) : this.seedCookie[t] % i + 1;
a.addClass("hide").eq(this.seedCookie[t] - 1).removeClass("hide");
this.saveSeedVideo();
this.sendSeedShowLog(a[this.seedCookie[t] - 1])
},
saveSeedVideo: function() {
s("advideo", JSON.stringify(this.seedCookie))
},
sendSeedShowLog: function(t) {
if (!e(t).data("sdshow"))
return;
var n = "//val.atm.youku.com/sdshow?" + e(t).data("sdshow");
i.getRequest(n)
},
sendSeedClickLog: function() {
e(document).on("mousedown", "div[data-advid]", function(t) {
var n = t.target || t.srcElement
, a = "//val.atm.youku.com/sdclick?";
if (!e(this).data("sdclick"))
return;
if ("A" == n.tagName ? true : "A" == n.parentNode.tagName)
i.getRequest(a + e(this).data("sdclick"))
})
},
tabInit: function(e) {
u.getSeedVideo(e.find("div[data-advid]"));
u.appendShowAD(e)
}
};
return {
init: u.init,
getAD: u.getAD,
tabInit: u.tabInit
}
});
i("tui/encrypt/macmd5", [], function() {
function e(e, t) {
var i = (65535 & e) + (65535 & t)
, n = (e >> 16) + (t >> 16) + (i >> 16);
return n << 16 | 65535 & i
}
function t(e, t) {
return e << t | e >>> 32 - t
}
function i(i, n, a, s, o, r) {
return e(t(e(e(n, i), e(s, r)), o), a)
}
function n(e, t, n, a, s, o, r) {
return i(t & n | ~t & a, e, t, s, o, r)
}
function a(e, t, n, a, s, o, r) {
return i(t & a | n & ~a, e, t, s, o, r)
}
function s(e, t, n, a, s, o, r) {
return i(t ^ n ^ a, e, t, s, o, r)
}
function o(e, t, n, a, s, o, r) {
return i(n ^ (t | ~a), e, t, s, o, r)
}
function r(t, i) {
t[i >> 5] |= 128 << i % 32,
t[(i + 64 >>> 9 << 4) + 14] = i;
var r, d, u, l, c, f = 1732584193, h = -271733879, g = -1732584194, m = 271733878;
for (r = 0; r < t.length; r += 16)
d = f,
u = h,
l = g,
c = m,
f = n(f, h, g, m, t[r], 7, -680876936),
m = n(m, f, h, g, t[r + 1], 12, -389564586),
g = n(g, m, f, h, t[r + 2], 17, 606105819),
h = n(h, g, m, f, t[r + 3], 22, -1044525330),
f = n(f, h, g, m, t[r + 4], 7, -176418897),
m = n(m, f, h, g, t[r + 5], 12, 1200080426),
g = n(g, m, f, h, t[r + 6], 17, -1473231341),
h = n(h, g, m, f, t[r + 7], 22, -45705983),
f = n(f, h, g, m, t[r + 8], 7, 1770035416),
m = n(m, f, h, g, t[r + 9], 12, -1958414417),
g = n(g, m, f, h, t[r + 10], 17, -42063),
h = n(h, g, m, f, t[r + 11], 22, -1990404162),
f = n(f, h, g, m, t[r + 12], 7, 1804603682),
m = n(m, f, h, g, t[r + 13], 12, -40341101),
g = n(g, m, f, h, t[r + 14], 17, -1502002290),
h = n(h, g, m, f, t[r + 15], 22, 1236535329),
f = a(f, h, g, m, t[r + 1], 5, -165796510),
m = a(m, f, h, g, t[r + 6], 9, -1069501632),
g = a(g, m, f, h, t[r + 11], 14, 643717713),
h = a(h, g, m, f, t[r], 20, -373897302),
f = a(f, h, g, m, t[r + 5], 5, -701558691),
m = a(m, f, h, g, t[r + 10], 9, 38016083),
g = a(g, m, f, h, t[r + 15], 14, -660478335),
h = a(h, g, m, f, t[r + 4], 20, -405537848),
f = a(f, h, g, m, t[r + 9], 5, 568446438),
m = a(m, f, h, g, t[r + 14], 9, -1019803690),
g = a(g, m, f, h, t[r + 3], 14, -187363961),
h = a(h, g, m, f, t[r + 8], 20, 1163531501),
f = a(f, h, g, m, t[r + 13], 5, -1444681467),
m = a(m, f, h, g, t[r + 2], 9, -51403784),
g = a(g, m, f, h, t[r + 7], 14, 1735328473),
h = a(h, g, m, f, t[r + 12], 20, -1926607734),
f = s(f, h, g, m, t[r + 5], 4, -378558),
m = s(m, f, h, g, t[r + 8], 11, -2022574463),
g = s(g, m, f, h, t[r + 11], 16, 1839030562),
h = s(h, g, m, f, t[r + 14], 23, -35309556),
f = s(f, h, g, m, t[r + 1], 4, -1530992060),
m = s(m, f, h, g, t[r + 4], 11, 1272893353),
g = s(g, m, f, h, t[r + 7], 16, -155497632),
h = s(h, g, m, f, t[r + 10], 23, -1094730640),
f = s(f, h, g, m, t[r + 13], 4, 681279174),
m = s(m, f, h, g, t[r], 11, -358537222),
g = s(g, m, f, h, t[r + 3], 16, -722521979),
h = s(h, g, m, f, t[r + 6], 23, 76029189),
f = s(f, h, g, m, t[r + 9], 4, -640364487),
m = s(m, f, h, g, t[r + 12], 11, -421815835),
g = s(g, m, f, h, t[r + 15], 16, 530742520),
h = s(h, g, m, f, t[r + 2], 23, -995338651),
f = o(f, h, g, m, t[r], 6, -198630844),
m = o(m, f, h, g, t[r + 7], 10, 1126891415),
g = o(g, m, f, h, t[r + 14], 15, -1416354905),
h = o(h, g, m, f, t[r + 5], 21, -57434055),
f = o(f, h, g, m, t[r + 12], 6, 1700485571),
m = o(m, f, h, g, t[r + 3], 10, -1894986606),
g = o(g, m, f, h, t[r + 10], 15, -1051523),
h = o(h, g, m, f, t[r + 1], 21, -2054922799),
f = o(f, h, g, m, t[r + 8], 6, 1873313359),
m = o(m, f, h, g, t[r + 15], 10, -30611744),
g = o(g, m, f, h, t[r + 6], 15, -1560198380),
h = o(h, g, m, f, t[r + 13], 21, 1309151649),
f = o(f, h, g, m, t[r + 4], 6, -145523070),
m = o(m, f, h, g, t[r + 11], 10, -1120210379),
g = o(g, m, f, h, t[r + 2], 15, 718787259),
h = o(h, g, m, f, t[r + 9], 21, -343485551),
f = e(f, d),
h = e(h, u),
g = e(g, l),
m = e(m, c);
return [f, h, g, m]
}
function d(e) {
var t, i = "";
for (t = 0; t < 32 * e.length; t += 8)
i += String.fromCharCode(255 & e[t >> 5] >>> t % 32);
return i
}
function u(e) {
var t, i = [];
for (i[(e.length >> 2) - 1] = void 0,
t = 0; t < i.length; t += 1)
i[t] = 0;
for (t = 0; t < 8 * e.length; t += 8)
i[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32;
return i
}
function l(e) {
return d(r(u(e), 8 * e.length))
}
function c(e, t) {
var i, n, a = u(e), s = [], o = [];
for (s[15] = o[15] = void 0,
a.length > 16 && (a = r(a, 8 * e.length)),
i = 0; 16 > i; i += 1)
s[i] = 909522486 ^ a[i],
o[i] = 1549556828 ^ a[i];
return n = r(s.concat(u(t)), 512 + 8 * t.length),
d(r(o.concat(n), 640))
}
function f(e) {
var t, i, n = "0123456789abcdef", a = "";
for (i = 0; i < e.length; i += 1)
t = e.charCodeAt(i),
a += n.charAt(15 & t >>> 4) + n.charAt(15 & t);
return a
}
function h(e) {
return unescape(encodeURIComponent(e))
}
function g(e) {
return l(h(e))
}
function m(e) {
return f(g(e))
}
function p(e, t) {
return c(h(e), h(t))
}
function v(e, t) {
return f(p(e, t))
}
function b(e, t, i) {
return t ? i ? p(t, e) : v(t, e) : i ? g(e) : m(e)
}
return b
});
i("module/subscribe/curve-motion", [], function() {
var t = .0017;
var i = function(i, n, a) {
if (!e.isArray(i))
return;
if (e.isFunction(n)) {
a = n;
n = {}
}
this.options = n || (n = {});
if (n.easing)
this._easing = n.easing;
if (n.gravity)
t = n.gravity;
this.originX = i[0];
this.originY = i[1];
this.targetX = i[2];
this.targetY = i[3];
this.absX = Math.abs(this.targetX - this.originX);
this.absY = Math.abs(this.targetY - this.originY);
this.upward = this.targetY - this.originY < 0;
this.angle = 180 * Math.atan(this.absY / this.absX) / Math.PI;
this.angle += Math.cos(this.angle * Math.PI / 180) * (n.elevationAngle || 0);
this.rad = this.angle * Math.PI / 180;
this.speed = Math.sqrt(t * this.absX * this.absX / (2 * (this.absX * Math.tan(this.rad) - this.absY)), 2) / Math.cos(this.rad);
this.duration = this.absX / (this.speed * Math.cos(this.rad));
this.draw = this.draw.bind(this);
this._completeCallback = e.isFunction(a) && a || function() {}
};
i.prototype = {
draw: function() {
var e = +new Date - this.startTime;
e = Math.min(e / this.duration, 1);
e = this._easing(e);
if (e < 1 && !this._paused)
a(this.draw);
var t = this._calcX(this.originX, this.targetX, e);
var i = this._calcY(Math.abs(this.upward ? t - this.originX : this.targetX - t));
if (this._frameTimer)
clearTimeout(this._frameTimer);
var n = this;
n._frameTimer = setTimeout(function() {
if (n._useTransform)
n._updateCallback(t - n.originX, n.upward ? -i : n.absY - i);
else
n._updateCallback(t, n.upward ? n.originY - i : n.targetY - i);
if (1 == e)
n._completeCallback(t, i)
}, 0)
},
start: function() {
this._paused = false;
this.startTime = +new Date;
this.draw()
},
pause: function() {
this._paused = true
},
updateFrame: function(e, t) {
this._updateCallback = e;
this._useTransform = !!t
},
_calcX: function(e, t, i) {
return e + (t - e) * i
},
_calcY: function(e) {
return e * Math.tan(this.rad) - t * e * e / (2 * Math.pow(this.speed * Math.cos(this.rad), 2))
},
_easing: function(e) {
return e * e * (3 - 2 * e)
}
};
var n = !!(window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame);
var a = window.requestAnimationFrame || function() {
var e = 0;
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(t) {
var i = (new Date).getTime(), n;
n = Math.max(0, 16 - (i - e));
e = i + n;
return setTimeout(function() {
t(i + n)
}, n)
}
}();
i.supportCSSTransform = n;
return i
});
i("tui/view", ["tui/event"], function(t) {
var i = "ontouchstart"in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
var n = 0;
var a;
var s = ".delegateEvents";
var o = function(i) {
this.clsid = n++;
this._configure(i || {});
this._ensureElement();
this.initialize.apply(this, arguments);
this.delegateEvents();
e.extend(this, new t)
};
var r = {};
var d = ["el", "id", "attrs", "className", "tagName", "model"];
var u = /^(\S+)\s*(.*)$/;
e.extend(o.prototype, {
tagName: "div",
initialize: function() {},
render: function() {
return this
},
get: function(e) {
return r[e] || null
},
find: function(e) {
return this.$el.find(e)
},
remove: function() {
this.$el.remove();
this.undelegateEvents();
this.unbind();
return this
},
create: function(t, i, n) {
var a = document.createElement(t);
if (i)
e(a).attr(i);
if (n)
e(a).html(n);
return a
},
setElement: function(t, i) {
if (this.$el)
this.undelegateEvents();
this.$el = t instanceof e ? t : e(t);
this.el = this.$el[0];
if (false !== i)
this.delegateEvents();
return this
},
delegateEvents: function(t) {
if (!(t || (t = this.events)))
return;
this.undelegateEvents();
for (var i in t) {
var n = t[i];
if (!e.isFunction(n))
n = this[t[i]];
if (!n)
continue;
var a = i.match(u);
var o = a[1]
, r = a[2];
n = n.bind(this);
o = this._ensureTouch(o, r);
o += s + this.clsid;
if ("" === r)
this.$el.on(o, n);
else
this.$el.on(o, r, n)
}
return this
},
undelegateEvents: function(e, t) {
var e = e ? this._ensureTouch(e) : "";
this.$el.off(e + s + this.clsid, t);
return this
},
modelEvents: function(t, i) {
i = "{" + (e.trim(i) || "mod") + "} ";
for (var n in this)
if (0 === n.indexOf(i))
t.bind(n.slice(i.length), this[n], this)
},
_configure: function(t) {
if (this.options)
t = e.extend({}, this.options, t);
for (var i = 0, n = d.length; i < n; i++) {
var a = d[i];
if (t[a])
this[a] = t[a]
}
this.options = t
},
_ensureElement: function() {
if (this.el)
this.setElement(this.el, false);
else {
var e = this.attrs || {};
if (this.id)
e.id = this.id;
if (this.className)
e["class"] = this.className;
this.setElement(this.create(this.tagName, e), false)
}
},
_ensureTouch: function(e, t) {
if (i && window.tudouClickStat) {
if (("click" == e || "tap" == e || "singleTap" == e) && "" !== t) {
var n = e + s + this.clsid;
this.$el.on(n, t, function(e) {
if (!tudouClickStat.getStatTarget(e.target)) {
if (void 0 === e.pageX)
e.pageX = e.pageY = 0;
if (a)
clearTimeout(a);
a = setTimeout(function() {
tudouClickStat.send(e, {}, function() {}, true)
}, 10)
}
})
}
return e
}
switch (e) {
case "tap":
case "singleTap":
return "click";
case "doubleTap":
return "dblclick"
}
return e
},
_clearTimer: function() {
var e = arguments;
for (var t = 0, i = e.length; t < i; t++) {
var n = e[t];
if (n) {
clearTimeout(n);
clearInterval(n)
}
}
return null
}
});
o.create = function(e, t) {
if (e && !r[e])
return r[e] = new this(t);
return new this(t)
}
;
o.instance = function(e, t) {
if (e && !r[e])
return r[e] = t;
return r[e] || null
}
;
o.destroy = function(e) {
if (e) {
if (r[e]) {
r[e].remove();
delete r[e]
}
} else
for (var t in r)
arguments.callee(t)
}
;
o.extend = function(t, i) {
var n = this;
var a = function() {
n.apply(this, arguments)
};
e.extend(a, n, i);
var s = function() {
this.constructor = a
};
s.prototype = n.prototype;
a.prototype = new s;
e.extend(a.prototype, t);
a.superClass = n.prototype;
return a
}
;
return o
});
i("module/subscribe/curvefly", ["tui/view", "module/subscribe/curve-motion"], function(t, i) {
var n;
var a = t.extend({
initialize: function() {
this._coords = this.options.coords;
this._picurl = this.options.picurl || null;
this._motion = new i(this._coords,{
elevationAngle: this.options.elevationAngle || 33
},this._complete.bind(this));
this._motion.updateFrame(this._update.bind(this), i.supportCSSTransform);
this.render()
},
remove: function() {
a.superClass.remove.call(this)
},
render: function() {
var t = this._picurl;
if (!(t && t.indexOf("") !== -1)) {
t = this._picurl ? '' : '';
var i = e('' + t + "
")
} else
var i = e('' + t + "
");
i.css({
left: this._coords[0],
top: this._coords[1]
});
e(document.body).append(i);
this.setElement(i)
},
start: function() {
this.$el.show();
this._motion.start()
},
pause: function() {
this._motion.pause()
},
_update: function(e, t) {
if (i.supportCSSTransform)
this.$el.get(0).style[s + "Transform"] = "translate3d(" + e + "px, " + t + "px, 0)";
else
this.$el.css({
left: e,
top: t
})
},
_complete: function() {
var e = this.$el;
if (i.supportCSSTransform)
e.get(0).style[s + "Transform"] = "none";
e.css({
left: this._coords[2],
top: this._coords[3]
}).fadeOut(300)
}
});
a.create = function(e, t, i, s, o, r) {
a.destory();
n = new a({
coords: [e, t, i, s],
picurl: o,
elevationAngle: r
});
return n
}
;
a.destory = function() {
if (n) {
n.remove();
n = null
}
}
;
var s = "";
var o = document.createElement("div");
e.each({
Webkit: "webkit",
Moz: "moz",
O: "o",
ms: "ms"
}, function(e, t) {
if (void 0 !== o.style[e + "TransitionProperty"]) {
s = e;
return false
}
});
return a
});
i("module/subscribe/subscribe", ["tui/event", "module/login/login", "tui/net", "module/subscribe/curvefly", "tui/encrypt/macmd5"], function(t, i, n, a, s) {
var o = t.extend({
option: {
selector: ".sub-action",
txt: "订阅",
txtDone: "已订阅"
},
initialize: function(t) {
this.className = {
loading: "sub-done-loading",
done: "sub-done",
doneHover: "sub-done-hover",
addHover: "sub-add-hover"
};
var n = this;
o.superClass.initialize.call(n);
var a = e.extend(n.option, t);
var s = this.className;
n.loading = false;
n.status = "";
if (!a.box)
return;
if (a.prefix)
e.each(s, function(e, t) {
s[e] = a.prefix + t
});
n.CACHE = {};
i.checkLogin(function() {
n.checkSub(a.box)
});
e(document).bind("login", function() {
n.checkSub(a.box)
});
if (a.cSub)
n.bind("sub:sucess", a.cSub.bind(n));
if (a.update)
n.bind("update:sucess", a.update.bind(n));
e(a.selector, a.box).bind("click", function(t) {
t.preventDefault();
if (n.loading)
return;
n.loading = true;
var a = e(this)
, o = a.attr("data-id")
, r = a.attr("data-log")
, d = a.attr("data-img")
, u = {
addtion: r
}
, l = n.CACHE[o];
i.login(function() {
if (a.hasClass(s.done)) {
a.addClass(s.loading).text("取消中");
u.subStatus = false
} else {
if (d)
n.animate(d, a);
u.subStatus = true
}
u.follow = o;
n.sub.apply(n, [a, u])
});
if (!i.isLogin())
n.loading = false
});
e(a.selector, a.box).hover(function() {
var t = e(this);
if (t.hasClass(s.done) && !t.hasClass(s.loading))
t.addClass(s.doneHover).text("取消订阅")
}, function() {
var t = e(this);
if (t.hasClass(s.done) && !t.hasClass(s.loading))
t.removeClass(s.doneHover).text("已订阅");
else if (!t.hasClass(s.loading))
t.removeClass(s.doneHover).removeClass(s.addHover).html(a.txt)
})
},
animate: function(t, i) {
var n = e("#qheader_sub_num").parent().offset();
var s = n.left + 8;
var o = n.top;
var r = i.offset();
var d = r.left + 8;
var u = r.top - 4;
a.create(d, u, s, o, t, 18).start()
},
checkSub: function(t) {
var a = this;
var s = target_array_uid = [];
var o = {};
var r = i.uid();
return;
if (!r)
return;
e(t).find(a.option.selector).each(function(t, i) {
var n = e(i).attr("data-id")
, s = CHUDA.Common.encodeUid(n);
target_array_uid.push('"' + s + '"');
if (a.CACHE[s])
a.CACHE[s].el.push(i);
else
a.CACHE[s] = {
follow: n,
encodeUid: s,
el: [i]
}
});
if (!target_array_uid.length)
return;
url = "//yws.youku.com/friendships/js_show.json?source_uid=" + CHUDA.Common.encodeUid(r) + "&target_array_uid=[" + target_array_uid.join(",") + "]&t=" + 1 * new Date;
n.getJSON(url, {}, function(t) {
if (1 == t.error)
e(t.target).each(function(e, t) {
var i = a.CACHE[t.id];
if (!i.el)
return;
if (t.followed)
a.subed(i.el);
else
a.unsubed(i.el)
})
}, {
callbackName: "callback",
traditional: true
})
},
update: function(t) {
var i = this;
e(t).each(function(t, n) {
if (e(n).hasClass(i.className.done))
i.unsubed(n);
else
i.subed(n);
i.trigger("update:sucess", [e(n)])
})
},
subed: function(t) {
var i = this.className;
this.status = "subed";
e(t).removeClass(i.addHover).addClass(i.done).html(this.option.txtDone);
this.trigger("subed:update", [e(t)])
},
unsubed: function(t) {
var i = this.className;
this.status = "unsubed";
e(t).removeClass(i.done).removeClass(i.loading).addClass(i.addHover).html(this.option.txt)
},
sub: function(t, i) {
var a = this, s;
var o = this.className;
var r = {
friend_uid: i.follow,
user_type: 0,
addtion: i.addtion
};
var d = this.getSign(r);
r.sign = d;
if (i.subStatus)
s = "//ding.youku.com/u/friendshipsCreateV2";
else
s = "//ding.youku.com/u/friendshipsDestroyV2";
n.getJSON(s, r, function(i) {
if (0 == i.error_code || i.error_code == -302) {
a.update(t);
a.trigger("sub:sucess", [t]);
if (e(t).hasClass(o.done))
e(t).removeClass(o.doneHover)
}
a.loading = false
}, {
callbackName: "callback",
charset: "utf-8"
})
},
getSign: function(e) {
var t = "6T7;!dATxQNnVz1R"
, i = this.sortData(e)
, n = []
, a = "";
for (var o in i)
i.hasOwnProperty(o) && "undefined" != typeof i[o] && null !== i[o] && "" !== i[o] && n.push(o + "=" + i[o]);
var r = n.join("&");
return a = s(String(r), t)
},
sortData: function(e) {
var t, i = {}, n = [];
for (t in e)
e.hasOwnProperty(t) && n.push(t);
for (n.sort(),
t = 0; t < n.length; t++)
i[n[t]] = e[n[t]];
return i
}
});
return o
});
i("tui/scrollLoader", [], function() {
var t = e(window)
, i = t.height()
, n = []
, a = {
node: function(t, i) {
t = e(t);
return this.y(t.offset() ? t.offset().top : 0, i ? t.outerHeight(true) : void 0)
},
y: function(e, t) {
this._y = e;
this._s = t || 0;
return this
},
threshold: function(e) {
this._th = e;
return this
},
size: function(e) {
this._s = e;
return this
},
delay: function(e) {
this._d = e;
return this
},
time: function(e) {
var t = this;
t._t = e;
setTimeout(function() {
t.start()
}, e);
return t
},
load: function() {
this._cb = this._cb.concat(Array.prototype.slice.call(arguments, 0));
this._no && n.push(this);
this._no = false;
this._f && this.fire();
this._f = false;
return this
},
start: function() {
this._enable && this._cb.forEach(function(e) {
e()
});
return this.cancel()
},
cancel: function() {
this.disable();
for (var e = 0, t = n.length; e < t; e++)
if (n[e] == this) {
n.splice(e, 1);
break
}
},
enable: function() {
this._enable = true;
return this
},
disable: function() {
this._enable = false;
return this
},
fire: function(e, n) {
e = e || t.scrollTop();
n = n || i;
var a = this;
if (a._s) {
clearTimeout(a._timeout);
a._timeout = setTimeout(function() {
if (a._enable && a._y <= e + n + a._th && a._y + a._s >= e - a._th)
s()
}, a._d)
} else if (this._enable && this._y <= e + n + this._th)
s();
function s() {
a._cb.forEach(function(e) {
e()
});
a.cancel()
}
return this
}
}
, s = function() {
this._y = 0;
this._th = 0;
this._d = 0;
this._s = 0;
this._cb = [];
this._no = true;
this._enable = true;
this._timeout = null;
this._f = true
}
, o = {};
s.prototype = a;
function r() {
var e = t.scrollTop();
n.concat().forEach(function(t) {
t.fire(e, i)
})
}
t.bind("resize", function() {
i = t.height();
r()
});
t.bind("scroll", r);
for (var d in a)
!function(e) {
o[e] = function() {
var t = new s;
return t[e].apply(t, Array.prototype.slice.call(arguments, 0))
}
}(d);
return o
});
i("tui/lazyImageLoader", ["tui/scrollLoader"], function(t) {
var i, n, a, s = {};
function o(s) {
s = s || {};
n = s.size || 300;
a = s.attr || "alt";
i = s.imgs || e("img.lazyImg");
var o = [];
i.each(function() {
var t = e(this)
, i = t.offset()
, n = i.top > 0 ? i.top : t.parents(":visible") && t.parents(":visible").offset() ? t.parents(":visible").offset().top : 0;
r(n, this, o)
});
for (var d in o)
if (o.hasOwnProperty(d)) {
var u = e(o[d]);
u.each(function() {
var i = this;
t.y(d).threshold(n).load(function() {
var t = e(i);
t.attr("src", t.attr(a));
t.removeAttr(a);
if (t[0].className.indexOf("lazyImg") !== -1)
t.removeClass("lazyImg")
})
})
}
}
function r(e, t, i) {
e -= e % n;
i[e] = i[e] || [];
i[e].push(t)
}
return o
});
i("tui/slide2", ["tui/event", "tui/browser", "tui/lazyImageLoader"], function(t, i) {
var n = t.extend({
initialize: function(t, o, r) {
var d = this;
d.box = t;
this.opt = o || {};
this.opt.patchWidth = this.opt.patchWidth || 20;
d.panel = t.find(".panel");
n.superClass.initialize.apply(d, arguments);
d.current = r ? r : 0;
d.position = this.opt.position || 0;
var u = d.box.find(".lazyContent");
if (u[0]) {
d.box.eq(0).html(u.val());
i({
imgs: d.box.find(".lazyImg")
})
}
setTimeout(function() {
d.setPos()
}, 100);
t.delegate(".mbtn a", "click", function(t) {
t.preventDefault();
d.setPos();
var i = e(this).closest(".mbtn").hasClass("next");
var n = i ? d.current >= d.step ? d.step : ++d.current : d.current <= 0 ? 0 : --d.current;
s(d.panel, d.pos[n]);
d.resetBtn();
a(d.panel)
});
d.box.bind("slider:show", function() {
this.setPos()
}
.bind(d));
e(window).bind("resize", function() {
setTimeout(function() {
if (d.panel.is(":visible")) {
d.reload();
d.setPos();
if (d.current > 0) {
s(d.panel, d.pos[d.current]);
d.resetBtn()
}
}
}, 300)
})
},
resetBtn: function() {
var e = this;
var t = e.box.find(".prev, .next");
switch (e.current) {
case 0:
t.eq(1).show();
t.eq(0).hide();
break;
case e.step - 1:
t.eq(0).show();
t.eq(1).hide();
break;
default:
t.show()
}
},
setPos: function() {
var t = this;
var i = t.box;
var n = t.box.width();
var a = 0, s;
var o = 0;
var r = 0;
t.$item = t.panel.children();
t.pos = [0];
var d = t.box.attr("id");
t.panel.css({
width: 5e4
});
e.each(t.$item, function(i) {
var d = e(this);
o = d.width();
r = d.outerWidth(true);
a = d.position().left + o;
s = t.pos.length > 0 ? t.pos[t.pos.length - 1] : 0;
if (d.position().left + o > n + s)
t.pos.push(d.position().left);
if (i == t.$item.length - 1 && a - n > 0) {
var u = t.pos.length;
if (1 == u)
t.pos.push(a - n);
else {
t.pos[u - 1] = a - n;
if (t.pos[u - 1] == t.pos[u - 2])
t.pos.pop()
}
}
});
if (1 == t.pos.length) {
i.find(".prev, .next").hide();
if (0 != t.panel[0].offsetLeft) {
t.panel.css("left", "0");
t.current = 0
}
}
if (a < 400)
a = 5e4;
else
a += t.opt.patchWidth;
t.panel.css({
width: a
});
t.step = t.pos.length;
if (t.current > 0) {
t.panel.css("left", -1 * r * t.position);
t.resetBtn()
}
},
reload: function() {
var e = this;
e.panel.css({
left: 0
});
e.resetBtn()
}
});
function a(t) {
var i = t.find("img.lazyLoad");
var n;
i.each(function(t, i) {
n = e(i);
n.attr("src", n.attr("alt"));
n.removeAttr("alt").removeClass("lazyLoad")
})
}
function s(e, t) {
e.animate({
left: -t
}, 300)
}
var o = {};
return function(t, i, a) {
var t = t || e(document);
var s = e(".modPSlide", t);
var r;
if (s[0])
s.each(function(t, s) {
r = e(s).attr("id");
if (o[r])
o[r].reload();
else
o[r] = new n(e("#" + r),i,a)
})
}
});
i("module/ui/switchtab", ["tui/lazyImageLoader", "tui/event"], function(t, i) {
jQuery.easing["jswing"] = jQuery.easing["swing"];
jQuery.extend(jQuery.easing, {
easeInOutQuad: function(e, t, i, n, a) {
if ((t /= a / 2) < 1)
return n / 2 * t * t * t + i;
return n / 2 * ((t -= 2) * t * t + 2) + i
}
});
function n(t) {
if (t && t.tagName) {
var i = "a" == t.tagName.toLowerCase() ? e(t) : e(t).find("a");
i = i.length ? i : e(t);
return (i.attr("rel") || i.attr("href").replace(/.*#(\d+)$/, "$1") || 1) - 1
} else
return 0
}
function a(e) {
var t = arguments;
for (var i = 0, n = t.length; i < n; i++) {
var e = t[i];
if (e)
clearTimeout(e)
}
return null
}
var s = i.extend({
initialize: function(i) {
var o = this;
s.superClass.initialize.apply(o, arguments);
o.op = i || {};
o.op.slide = i.slide || false;
o.op.linktab = i.linktab || false;
o.op.clicktab = i.clicktab || false;
o.op.lazyContent = i.lazyContent || window.gLazyContent || false;
var r = o.box = e(i.box);
var d = o.tab = e(i.tab || ".tab li", r);
var u = o.panel = e(i.panel || ".c", r);
o.size = d.length || u.length;
o.loop = i.loop || 0;
o.current = n(d.filter(".current")[0]);
if (o.op.slide) {
o.scroll = u.parent().parent();
o.scroll.scrollLeft(0);
t({
imgs: u.eq(o.current).find(".lazyImg")
});
u.parent().append(u.eq(0).clone());
o.panel = e(i.panel || ".c", r);
o.width = u.width();
o.delay = i.delay || 700;
o.loop = (o.loop || 5e3) + o.delay;
o.anilock = false
}
if (o.size < 2)
return;
if (o.op.clicktab)
d.click(function(e) {
e.preventDefault();
o.go(n(this))
});
else {
if (!o.op.linktab)
d.click(function(e) {
e.preventDefault()
});
d.mouseenter(function() {
a(o.timer, o.looptimer);
var e = this;
o.timer = setTimeout(function() {
o.go(n(e))
}, 30)
}).mouseleave(function() {
a(o.timer, o.looptimer);
o.start()
})
}
if (o.loop) {
o.check(o.op.clicktab ? d : null);
o.start()
}
d.parent().on("click", "a", function(t) {
var i = e(this).attr("href");
if (!i || "#" == i || i.length < 5)
t.preventDefault()
})
},
on: function(e, t) {
this.box.eventProxy(e, t);
return this
},
go: function(e, t) {
var i = this;
if (i.current == e)
return;
e = t ? e : Math.min(Math.max(e, 0), i.size - 1);
i.trigger("before", [i.current, e, i]);
if (i.op.slide) {
if (i.anilock) {
i.nextstep = function() {
i.animate(e, t)
}
;
return
}
i.animate(e, t)
} else {
var n = i.current;
i.current = e % i.size;
i.trigger("change", [i.current, i]);
i.tab.removeClass("current").eq(i.current).addClass("current");
var a = i.op.fade;
var s = i.panel;
a ? s.eq(n).stop().fadeOut(100) : s.hide();
s.eq(i.current)[a ? "fadeIn" : "show"](i.op.duration ? i.op.duration : 0);
i.trigger("after", [i.current, i])
}
return this
},
setSize: function(e) {
if (e <= this.panel.length)
this.size = e;
return this
},
prev: function(e) {
this.go(this.current - 1, e)
},
next: function(e) {
this.go(this.current + 1, e)
},
start: function(e) {
var t = this;
if (t.loop) {
a(t.looptimer);
if (e)
t.start();
t.looptimer = setTimeout(function() {
t.start();
t.next(true)
}, t.loop)
}
},
stop: function() {
a(this.looptimer)
},
check: function(e) {
var t = this;
(e || t.panel).mouseenter(function() {
a(t.looptimer)
}).mouseleave(function() {
a(t.looptimer);
t.start()
})
},
animate: function(e, i) {
var n = this;
var s = n.current;
if (n.anilock || s == e)
return;
a(n.looptimer);
var o = n.size
, r = n.width
, d = n.panel
, u = n.scroll;
var l = s > e ? 0 : r;
var c = s > e ? r : 0;
e %= i ? o + 1 : o;
t({
imgs: d.eq(e).show().find(".lazyImg")
});
u.scrollLeft(c);
n.tab.removeClass("current").eq(e % o).addClass("current");
u.animate({
scrollLeft: l
}, n.delay, "easeInOutQuad", function() {
d.eq(s).hide();
if (i && e == o) {
e %= o;
t({
imgs: d.eq(0).show().find(".lazyImg")
});
d.eq(o).hide()
}
u.scrollLeft(0);
n.current = e;
n.anilock = false;
n.trigger("after", [n.current, n]);
if (n.nextstep) {
n.nextstep();
n.nextstep = null
}
if (i)
n.start()
});
n.anilock = true
}
});
return s
});
i("page/find/main/switchtab", ["module/ui/switchtab", "tui/lazyImageLoader", "tui/slide2", "module/subscribe/subscribe", "tui/event", "module/ad/ad"], function(t, i, n, a, s, o) {
return function() {
var s = e(".modSwitch");
s.delegate("a", "click", function(t) {
var i = e(this).attr("href");
if (!i || "#" == i)
t.preventDefault()
});
if (s[0])
s.each(function(s, r) {
var d = new t({
box: r,
tab: ".t_tab li",
panel: ".tab-c",
linktab: true
});
d.bind("change", function(t) {
var s = d.panel.eq(t);
var r = s.children().eq(0);
if (r.hasClass("lazyContent")) {
s.html(r.val());
i({
imgs: s.find(".lazyImg")
});
o.tabInit(s);
setTimeout(function() {
n(s);
new a({
box: s,
cSub: function(t) {
var i = t.data("id");
var n = t.attr("class");
e(".sub-action[data-id=" + i + "]").each(function(i, a) {
if (a == t[0])
return;
else
e(a).removeClass().addClass(n).html(t.html())
})
}
});
e(document).trigger("tab:changed");
e(document).trigger("domChanged")
}, 200)
}
})
})
}
});
i("module/rightSideBar/rightSidebar", ["tui/view", "tui/net", "tui/cookie"], function(t, i, n) {
if (true === window.NO_RIGHTSIDEBAR)
return;
var a = 0
, s = e(document.body)
, o = e(window);
var r = t.extend({
initialize: function() {
var t = this;
t.appObj = {};
s.append(t.$el);
t.winResize();
o.bind("cresize", function() {
t.winResize()
});
o.bind("cscroll", function() {
t.winScroll()
});
this.$el = e("#sideBar");
setTimeout(function() {
t.getActivity()
}, 1e3);
setInterval(function() {
t.getActivity()
}, 2e4)
},
events: {
"click .activity .activity_img": "clickActivity",
"click .activity .activity-close-icon": "closeActivity"
},
winResize: function() {
var t = this
, i = t.appObj
, n = o.width();
for (var a in i) {
var s = i[a].resize;
if (e.isFunction(s))
s.call(i[a], n)
}
},
winScroll: function() {
var t = this
, i = t.appObj
, n = o.height()
, a = o.scrollTop();
for (var s in i) {
var r = i[s].scroll;
if (e.isFunction(r))
r.call(i[s], a, n)
}
},
add: function(t, i) {
var n = this;
if (n.appObj[t])
return;
n.appObj[t] = i;
var a = i.$el = e(i.el);
if (i.click)
a.click(function(e) {
e.preventDefault();
i.click.call(i)
});
n.$el[i.method ? i.method : "prepend"](a);
return i
},
ShowLog: function(e, t, n) {
var a = "show" == e ? "//gm.mmstat.com/yt/show.index.module" : "//gm.mmstat.com/yt/click.index.module";
if ("show" == e)
a += "?mid=" + t + "&mname=" + n + "&etime=" + (new Date).getTime();
else
a += "?mid=" + t + "&mname=" + n + "&etime=" + (new Date).getTime();
i.getRequest(a)
},
getActivity: function() {
var t = this;
var a = 1 * new Date;
var s = this.ShowLog;
if (!e("#sideBar .activity").length)
i.getJSON("//hudong.alicdn.com/api/data/v2/0a3ffc1f4a8b455a9d7421d6d90ecefb.js?t=" + 1 * new Date, {}, function(t) {
if (t.isShow)
if (t.data)
if (a >= t.data[0].start && a <= t.data[0].end)
if (!n("ActivityStatus")) {
var i = '';
s("show", "1015", "homepop");
e("#sideBar").prepend(i)
}
}, {
callbackName: "callback",
charset: "utf-8",
callback: "hangMarkCallkack"
})
},
closeActivity: function() {
this.ShowLog("click", "1016", "homepopclose");
e(".activity-close-icon").parent().hide();
n("ActivityStatus", 1, {
expires: this.getCookieTime()
})
},
clickActivity: function(e) {
this.ShowLog("click", "1015", "homepop")
},
getCookieTime: function() {
var e = 1 * new Date;
var e = e - e % (24 * 60 * 1e3 * 60) + 24 * 60 * 1e3 * 60;
return new Date(e)
},
getConfig: function(e) {
return this.appObj[e] || this.appObj
}
});
var d = new r({
id: "sideBar",
className: "side-bar"
});
function u(t, i) {
if (t > 300)
e("#goTop").fadeIn();
else
e("#goTop").fadeOut()
}
d.add("goTop", {
el: '',
scroll: u,
click: function() {
e("body,html").animate({
scrollTop: 0
}, 800)
}
});
d.add("feedback", {
el: ''
});
return d
});
i("module/stat/cmslog", ["tui/net", "module/global", "module/stat/common", "module/login/login"], function(t, i, n, a) {
var s = {
vReg: /^\/\/v\.youku\.com\/v_show\/id_([^\.]+?)(?:_\w*)?\.html/i,
sReg: /\/\/www\.youku\.com\/show_page\/id_z([^\.]+)\.html/,
uReg: /\/\/(i|u)\.youku\.com\/(u|user_show)\/(id_)?([^\.\?]+)/,
repLogIds: {},
asyModuleIds: [],
logUrl: "//gm.mmstat.com/yt/show.index.module",
clickLogUrl: "//gm.mmstat.com/yt/click.index.module",
logParams: "",
init: function() {
var t = this, i;
e.merge(e("#personList"), e(".cmsmod")).each(function(i, n) {
t.asyModuleIds.push(e(n).closest("[name=m_pos]").attr("id"))
});
t.initParam();
t.mshow();
e(window).scroll(function() {
i && clearTimeout(i);
i = setTimeout(function() {
t.mshow()
}, 300)
});
e(document.body).on("click", function(e) {
var i = e.target || e.srcElement;
t.reportClickLog(i)
});
e(document).on("domChanged", function() {
t.mshow()
})
},
initParam: function() {
var e = []
, t = this._getSpm();
e.push("pvid=" + i.pvid);
e.push("did=" + this._getUa());
t && e.push("SPM=" + t);
this.logParams = e.join("&")
},
mshow: function() {
var t = this;
e(".yk-content").find("div[name=m_pos][modshow!=1]").each(function(i, n) {
var n = e(n);
if (!t.checkPosition(n))
return;
if (0 != n.find(".modSwitch").length) {
n = n.attr("modshow", 1).find("[name=m_pos]:visible");
if ("1" == n.attr("modshow"))
return;
var a = n.attr("id")
} else
var a = n.attr("id");
if (!a)
return true;
s.getDataIds(a)
})
},
checkPosition: function(t) {
if (!t.is(":visible") || t.attr("modshow") || !t.height() || e(window).height() + e(document).scrollTop() < t.offset().top + t.height() / 2)
return false;
return true
},
getDataIds: function(t) {
var i = []
, n = this
, a = e("#" + t);
if (0 != a.find("div[name='m_pos']").length) {
n.reportShowLog(t, i, a);
return false
}
var s = 0 != a.find(".user-list").length ? a.find(".user-vertical dt a") : a.find(".yk-pack .p-thumb> a");
if (s.length <= 0 && e.inArray(t, n.asyModuleIds) != -1)
return false;
else {
i = n.makeParam(s);
n.reportShowLog(t, i, a)
}
},
makeParam: function(t) {
var i = [], n = [], a = [], s = [], o, r, d = this;
t.each(function(e, t) {
if (t && t.href)
if ((r = t.href.match(d.vReg)) && r[1]) {
if (o = d._decodeVid(r[1]))
n.push(o)
} else if ((r = t.href.match(d.sReg)) && r[1])
a.push(r[1]);
else if ((r = t.href.match(d.uReg)) && r[r.length - 1])
if (o = d._decodeVid(r[r.length - 1]))
s.push(o)
});
if ((n = e.unique(n)) && n.length > 0)
i.push("vids=" + n.join(","));
if ((a = e.unique(a)) && a.length > 0)
i.push("sids=" + a.join(","));
if ((s = e.unique(s)) && s.length > 0)
i.push("uids=" + s.join(","));
return i
},
reportShowLog: function(t, i, n) {
n.attr("modshow", "1");
if (this.repLogIds[t])
return;
this.repLogIds[t] = 1;
var a = e.inArray(t, this.asyModuleIds);
if (n.data("cmsext"))
i.push("ext=" + n.data("cmsext"));
var s = i.join("&");
this.reportLog(t.substr(2), "show", s)
},
reportClickLog: function(t) {
var i = this, n, a, s, o = [], r, d;
var u = e(t).closest("[name=m_pos]").attr("id");
var l = {
A: 1,
INPUT: 1,
BUTTON: 1
};
if (!u)
return false;
if (l[t.tagName] ? l[t.tagName] : l[t.parentNode.tagName]) {
if (l[t.parentNode.tagName])
t = t.parentNode;
if (e(t).attr("data-id"))
s = e(t).attr("data-id");
if ((r = t.href.match(i.vReg)) && (d = i._decodeVid(r[1])))
n = d;
else if ((r = t.href.match(i.sReg)) && r[1])
a = r[1];
else if ((r = t.href.match(i.uReg)) && (d = i._decodeVid(r[r.length - 1])))
s = d
} else
return;
if (n)
o.push("vid=" + n);
if (a)
o.push("sid=" + a);
if (s)
o.push("uid=" + s);
var c = "";
if (o.length > 0)
c += o.join("&");
this.reportLog(u.substr(2), "click", c)
},
reportLog: function(e, i, n) {
if (!e)
return;
var a = "click" == i ? this.clickLogUrl : this.logUrl;
var s = this._getModuleName(e);
if (s)
a += "?mid=" + e + "&" + this.logParams + "&mname=" + s + "&etime=" + (new Date).getTime();
else
a += "?mid=" + e + "&" + this.logParams + "&etime=" + (new Date).getTime();
n = n || 0;
if (n)
a += "&" + n;
t.getRequest(a)
},
_getUa: function() {
if (navigator.userAgent.indexOf("iPad") > 0)
return 2;
else
return 1
},
_getSpm: function() {
if ("undefined" !== typeof pageIdNum)
return e("[name=data-spm]").attr("content") + "." + (2e7 + parseInt(pageIdNum));
else
return ""
},
_getModuleName: function(t) {
var i = e("#m_" + t)
, n = i.parent();
if (n.hasClass("tab-c"))
return this._getTabTitle(n);
else
return this._getModuleTitle(i)
},
_getTabTitle: function(t) {
var i = t.index()
, n = e(".t_tab", t.parent().prev())
, a = e("a", n);
return a.eq(i).html()
},
_getModuleTitle: function(t) {
var i = e("h3", t).eq(0)
, n = e("h2", t).eq(0);
if (!(i.length || n.length))
return "";
var a = i.length ? i : n;
if (a.closest("[name=m_pos]").attr("id") != t.attr("id"))
return "";
var s = e("a", a)
, o = e("img", a);
if (o.length)
return o.attr("title");
if (s.length)
return s.html();
return a.html()
},
_decodeVid: function(e) {
var t = this;
if (!e)
return false;
return t._decode64(e.toString().substr(1)) >> 2
},
_decode64: function(e) {
if (!e)
return "";
var t = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "=";
var i = "";
var n, a, s;
var o, r, d, u;
var l = 0;
e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
o = t.indexOf(e.charAt(l++));
r = t.indexOf(e.charAt(l++));
d = t.indexOf(e.charAt(l++));
u = t.indexOf(e.charAt(l++));
n = o << 2 | r >> 4;
a = (15 & r) << 4 | d >> 2;
s = (3 & d) << 6 | u;
i += String.fromCharCode(n);
if (64 !== d)
i += String.fromCharCode(a);
if (64 !== u)
i += String.fromCharCode(s)
} while (l < e.length);return this._U8_16(i)
},
_U8_16: function(e) {
var t, i, n;
var a, s;
var o = [];
i = e.length;
t = 0;
while (t < i) {
n = e.charCodeAt(t++);
switch (n >> 4) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
o.push(e.charAt(t - 1));
break;
case 12:
case 13:
a = e.charCodeAt(t++);
o.push(String.fromCharCode((31 & n) << 6 | 63 & a));
break;
case 14:
a = e.charCodeAt(t++);
s = e.charCodeAt(t++);
o.push(String.fromCharCode((15 & n) << 12 | (63 & a) << 6 | (63 & s) << 0))
}
}
return o.join("")
}
};
return s
});
i("page/find/footer/footer", ["tui/cookie"], function(t, i, n) {
n.init = function() {
e(".ikuDownLoad").on("click", function(t) {
if (window.ikuDownloadIng)
return false;
var i = t.target || t.srcElement;
if (!i)
return false;
var n;
if (window.navigator && navigator.platform && 0 === navigator.platform.indexOf("Mac"))
n = e(i).attr("data-down-mac");
else
n = e(i).attr("data-down-href");
if (!n || window.ikuDownloadIng)
return false;
window.ikuDownloadIng = true;
var a = document.createElement("iframe");
a.width = 0;
a.height = 0;
a.src = n;
document.body.appendChild(a);
setTimeout(function() {
document.body.removeChild(a);
window.ikuDownloadIng = false
}, 2e3);
return false
});
if (window.navigator && navigator.platform && 0 === navigator.platform.indexOf("Mac"))
e(".ikuDownLoad").each(function(t, i) {
e(i).html(e(i).html().replace("PC", "Mac"))
});
var i = t("stt")
, n = e("#sttrans")
, a = {
ss: function() {
return "万与丑专业丛东丝丢两严丧个丬丰临为丽举么义乌乐乔习乡书买乱争于亏云亘亚产亩亲亵亸亿仅从仑仓仪们价众优伙会伛伞伟传伤伥伦伧伪伫体余佣佥侠侣侥侦侧侨侩侪侬俣俦俨俩俪俭债倾偬偻偾偿傥傧储傩儿兑兖党兰关兴兹养兽冁内冈册写军农冢冯冲决况冻净凄凉凌减凑凛几凤凫凭凯击凼凿刍划刘则刚创删别刬刭刽刿剀剂剐剑剥剧劝办务劢动励劲劳势勋勐勚匀匦匮区医华协单卖卢卤卧卫却卺厂厅历厉压厌厍厕厢厣厦厨厩厮县参叆叇双发变叙叠叶号叹叽吁后吓吕吗吣吨听启吴呒呓呕呖呗员呙呛呜咏咔咙咛咝咤咴咸哌响哑哒哓哔哕哗哙哜哝哟唛唝唠唡唢唣唤唿啧啬啭啮啰啴啸喷喽喾嗫呵嗳嘘嘤嘱噜噼嚣嚯团园囱围囵国图圆圣圹场坂坏块坚坛坜坝坞坟坠垄垅垆垒垦垧垩垫垭垯垱垲垴埘埙埚埝埯堑堕塆墙壮声壳壶壸处备复够头夸夹夺奁奂奋奖奥妆妇妈妩妪妫姗姜娄娅娆娇娈娱娲娴婳婴婵婶媪嫒嫔嫱嬷孙学孪宁宝实宠审宪宫宽宾寝对寻导寿将尔尘尧尴尸尽层屃屉届属屡屦屿岁岂岖岗岘岙岚岛岭岳岽岿峃峄峡峣峤峥峦崂崃崄崭嵘嵚嵛嵝嵴巅巩巯币帅师帏帐帘帜带帧帮帱帻帼幂幞干并广庄庆庐庑库应庙庞废庼廪开异弃张弥弪弯弹强归当录彟彦彻径徕御忆忏忧忾怀态怂怃怄怅怆怜总怼怿恋恳恶恸恹恺恻恼恽悦悫悬悭悯惊惧惨惩惫惬惭惮惯愍愠愤愦愿慑慭憷懑懒懔戆戋戏戗战戬户扎扑扦执扩扪扫扬扰抚抛抟抠抡抢护报担拟拢拣拥拦拧拨择挂挚挛挜挝挞挟挠挡挢挣挤挥挦捞损捡换捣据捻掳掴掷掸掺掼揸揽揿搀搁搂搅携摄摅摆摇摈摊撄撑撵撷撸撺擞攒敌敛数斋斓斗斩断无旧时旷旸昙昼昽显晋晒晓晔晕晖暂暧札术朴机杀杂权条来杨杩杰极构枞枢枣枥枧枨枪枫枭柜柠柽栀栅标栈栉栊栋栌栎栏树栖样栾桊桠桡桢档桤桥桦桧桨桩梦梼梾检棂椁椟椠椤椭楼榄榇榈榉槚槛槟槠横樯樱橥橱橹橼檐檩欢欤欧歼殁殇残殒殓殚殡殴毁毂毕毙毡毵氇气氢氩氲汇汉污汤汹沓沟没沣沤沥沦沧沨沩沪沵泞泪泶泷泸泺泻泼泽泾洁洒洼浃浅浆浇浈浉浊测浍济浏浐浑浒浓浔浕涂涌涛涝涞涟涠涡涢涣涤润涧涨涩淀渊渌渍渎渐渑渔渖渗温游湾湿溃溅溆溇滗滚滞滟滠满滢滤滥滦滨滩滪漤潆潇潋潍潜潴澜濑濒灏灭灯灵灾灿炀炉炖炜炝点炼炽烁烂烃烛烟烦烧烨烩烫烬热焕焖焘煅煳熘爱爷牍牦牵牺犊犟状犷犸犹狈狍狝狞独狭狮狯狰狱狲猃猎猕猡猪猫猬献獭玑玙玚玛玮环现玱玺珉珏珐珑珰珲琎琏琐琼瑶瑷璇璎瓒瓮瓯电画畅畲畴疖疗疟疠疡疬疮疯疱疴痈痉痒痖痨痪痫痴瘅瘆瘗瘘瘪瘫瘾瘿癞癣癫癯皑皱皲盏盐监盖盗盘眍眦眬着睁睐睑瞒瞩矫矶矾矿砀码砖砗砚砜砺砻砾础硁硅硕硖硗硙硚确硷碍碛碜碱碹磙礼祎祢祯祷祸禀禄禅离秃秆种积称秽秾稆税稣稳穑穷窃窍窑窜窝窥窦窭竖竞笃笋笔笕笺笼笾筑筚筛筜筝筹签简箓箦箧箨箩箪箫篑篓篮篱簖籁籴类籼粜粝粤粪粮糁糇紧絷纟纠纡红纣纤纥约级纨纩纪纫纬纭纮纯纰纱纲纳纴纵纶纷纸纹纺纻纼纽纾线绀绁绂练组绅细织终绉绊绋绌绍绎经绐绑绒结绔绕绖绗绘给绚绛络绝绞统绠绡绢绣绤绥绦继绨绩绪绫绬续绮绯绰绱绲绳维绵绶绷绸绹绺绻综绽绾绿缀缁缂缃缄缅缆缇缈缉缊缋缌缍缎缏缐缑缒缓缔缕编缗缘缙缚缛缜缝缞缟缠缡缢缣缤缥缦缧缨缩缪缫缬缭缮缯缰缱缲缳缴缵罂网罗罚罢罴羁羟羡翘翙翚耢耧耸耻聂聋职聍联聩聪肃肠肤肷肾肿胀胁胆胜胧胨胪胫胶脉脍脏脐脑脓脔脚脱脶脸腊腌腘腭腻腼腽腾膑臜舆舣舰舱舻艰艳艹艺节芈芗芜芦苁苇苈苋苌苍苎苏苘苹茎茏茑茔茕茧荆荐荙荚荛荜荞荟荠荡荣荤荥荦荧荨荩荪荫荬荭荮药莅莜莱莲莳莴莶获莸莹莺莼萚萝萤营萦萧萨葱蒇蒉蒋蒌蓝蓟蓠蓣蓥蓦蔷蔹蔺蔼蕲蕴薮藁藓虏虑虚虫虬虮虽虾虿蚀蚁蚂蚕蚝蚬蛊蛎蛏蛮蛰蛱蛲蛳蛴蜕蜗蜡蝇蝈蝉蝎蝼蝾螀螨蟏衅衔补衬衮袄袅袆袜袭袯装裆裈裢裣裤裥褛褴襁襕见观觃规觅视觇览觉觊觋觌觍觎觏觐觑觞触觯詟誉誊讠计订讣认讥讦讧讨让讪讫训议讯记讱讲讳讴讵讶讷许讹论讻讼讽设访诀证诂诃评诅识诇诈诉诊诋诌词诎诏诐译诒诓诔试诖诗诘诙诚诛诜话诞诟诠诡询诣诤该详诧诨诩诪诫诬语诮误诰诱诲诳说诵诶请诸诹诺读诼诽课诿谀谁谂调谄谅谆谇谈谊谋谌谍谎谏谐谑谒谓谔谕谖谗谘谙谚谛谜谝谞谟谠谡谢谣谤谥谦谧谨谩谪谫谬谭谮谯谰谱谲谳谴谵谶谷豮贝贞负贠贡财责贤败账货质贩贪贫贬购贮贯贰贱贲贳贴贵贶贷贸费贺贻贼贽贾贿赀赁赂赃资赅赆赇赈赉赊赋赌赍赎赏赐赑赒赓赔赕赖赗赘赙赚赛赜赝赞赟赠赡赢赣赪赵赶趋趱趸跃跄跖跞践跶跷跸跹跻踊踌踪踬踯蹑蹒蹰蹿躏躜躯车轧轨轩轪轫转轭轮软轰轱轲轳轴轵轶轷轸轹轺轻轼载轾轿辀辁辂较辄辅辆辇辈辉辊辋辌辍辎辏辐辑辒输辔辕辖辗辘辙辚辞辩辫边辽达迁过迈运还这进远违连迟迩迳迹适选逊递逦逻遗遥邓邝邬邮邹邺邻郁郄郏郐郑郓郦郧郸酝酦酱酽酾酿释里鉅鉴銮錾钆钇针钉钊钋钌钍钎钏钐钑钒钓钔钕钖钗钘钙钚钛钝钞钟钠钡钢钣钤钥钦钧钨钩钪钫钬钭钮钯钰钱钲钳钴钵钶钷钸钹钺钻钼钽钾钿铀铁铂铃铄铅铆铈铉铊铋铍铎铏铐铑铒铕铗铘铙铚铛铜铝铞铟铠铡铢铣铤铥铦铧铨铪铫铬铭铮铯铰铱铲铳铴铵银铷铸铹铺铻铼铽链铿销锁锂锃锄锅锆锇锈锉锊锋锌锍锎锏锐锑锒锓锔锕锖锗错锚锜锞锟锠锡锢锣锤锥锦锨锩锫锬锭键锯锰锱锲锳锴锵锶锷锸锹锺锻锼锽锾锿镀镁镂镃镆镇镈镉镊镌镍镎镏镐镑镒镕镖镗镙镚镛镜镝镞镟镠镡镢镣镤镥镦镧镨镩镪镫镬镭镮镯镰镱镲镳镴镶长门闩闪闫闬闭问闯闰闱闲闳间闵闶闷闸闹闺闻闼闽闾闿阀阁阂阃阄阅阆阇阈阉阊阋阌阍阎阏阐阑阒阓阔阕阖阗阘阙阚阛队阳阴阵阶际陆陇陈陉陕陧陨险随隐隶隽难雏雠雳雾霁霉霭靓静靥鞑鞒鞯鞴韦韧韨韩韪韫韬韵页顶顷顸项顺须顼顽顾顿颀颁颂颃预颅领颇颈颉颊颋颌颍颎颏颐频颒颓颔颕颖颗题颙颚颛颜额颞颟颠颡颢颣颤颥颦颧风飏飐飑飒飓飔飕飖飗飘飙飚飞飨餍饤饥饦饧饨饩饪饫饬饭饮饯饰饱饲饳饴饵饶饷饸饹饺饻饼饽饾饿馀馁馂馃馄馅馆馇馈馉馊馋馌馍馎馏馐馑馒馓馔馕马驭驮驯驰驱驲驳驴驵驶驷驸驹驺驻驼驽驾驿骀骁骂骃骄骅骆骇骈骉骊骋验骍骎骏骐骑骒骓骔骕骖骗骘骙骚骛骜骝骞骟骠骡骢骣骤骥骦骧髅髋髌鬓魇魉鱼鱽鱾鱿鲀鲁鲂鲄鲅鲆鲇鲈鲉鲊鲋鲌鲍鲎鲏鲐鲑鲒鲓鲔鲕鲖鲗鲘鲙鲚鲛鲜鲝鲞鲟鲠鲡鲢鲣鲤鲥鲦鲧鲨鲩鲪鲫鲬鲭鲮鲯鲰鲱鲲鲳鲴鲵鲶鲷鲸鲹鲺鲻鲼鲽鲾鲿鳀鳁鳂鳃鳄鳅鳆鳇鳈鳉鳊鳋鳌鳍鳎鳏鳐鳑鳒鳓鳔鳕鳖鳗鳘鳙鳛鳜鳝鳞鳟鳠鳡鳢鳣鸟鸠鸡鸢鸣鸤鸥鸦鸧鸨鸩鸪鸫鸬鸭鸮鸯鸰鸱鸲鸳鸴鸵鸶鸷鸸鸹鸺鸻鸼鸽鸾鸿鹀鹁鹂鹃鹄鹅鹆鹇鹈鹉鹊鹋鹌鹍鹎鹏鹐鹑鹒鹓鹔鹕鹖鹗鹘鹚鹛鹜鹝鹞鹟鹠鹡鹢鹣鹤鹥鹦鹧鹨鹩鹪鹫鹬鹭鹯鹰鹱鹲鹳鹴鹾麦麸黄黉黡黩黪黾鼋鼌鼍鼗鼹齄齐齑齿龀龁龂龃龄龅龆龇龈龉龊龋龌龙龚龛龟志制咨只里系范松没尝尝闹面准钟别闲干尽脏拼"
},
ts: function() {
return "萬與醜專業叢東絲丟兩嚴喪個爿豐臨為麗舉麼義烏樂喬習鄉書買亂爭於虧雲亙亞產畝親褻嚲億僅從侖倉儀們價眾優夥會傴傘偉傳傷倀倫傖偽佇體餘傭僉俠侶僥偵側僑儈儕儂俁儔儼倆儷儉債傾傯僂僨償儻儐儲儺兒兌兗黨蘭關興茲養獸囅內岡冊寫軍農塚馮衝決況凍淨淒涼淩減湊凜幾鳳鳧憑凱擊氹鑿芻劃劉則剛創刪別剗剄劊劌剴劑剮劍剝劇勸辦務勱動勵勁勞勢勳猛勩勻匭匱區醫華協單賣盧鹵臥衛卻巹廠廳曆厲壓厭厙廁廂厴廈廚廄廝縣參靉靆雙發變敘疊葉號歎嘰籲後嚇呂嗎唚噸聽啟吳嘸囈嘔嚦唄員咼嗆嗚詠哢嚨嚀噝吒噅鹹呱響啞噠嘵嗶噦嘩噲嚌噥喲嘜嗊嘮啢嗩唕喚呼嘖嗇囀齧囉嘽嘯噴嘍嚳囁嗬噯噓嚶囑嚕劈囂謔團園囪圍圇國圖圓聖壙場阪壞塊堅壇壢壩塢墳墜壟壟壚壘墾坰堊墊埡墶壋塏堖塒塤堝墊垵塹墮壪牆壯聲殼壺壼處備複夠頭誇夾奪奩奐奮獎奧妝婦媽嫵嫗媯姍薑婁婭嬈嬌孌娛媧嫻嫿嬰嬋嬸媼嬡嬪嬙嬤孫學孿寧寶實寵審憲宮寬賓寢對尋導壽將爾塵堯尷屍盡層屭屜屆屬屢屨嶼歲豈嶇崗峴嶴嵐島嶺嶽崠巋嶨嶧峽嶢嶠崢巒嶗崍嶮嶄嶸嶔崳嶁脊巔鞏巰幣帥師幃帳簾幟帶幀幫幬幘幗冪襆幹並廣莊慶廬廡庫應廟龐廢廎廩開異棄張彌弳彎彈強歸當錄彠彥徹徑徠禦憶懺憂愾懷態慫憮慪悵愴憐總懟懌戀懇惡慟懨愷惻惱惲悅愨懸慳憫驚懼慘懲憊愜慚憚慣湣慍憤憒願懾憖怵懣懶懍戇戔戲戧戰戩戶紮撲扡執擴捫掃揚擾撫拋摶摳掄搶護報擔擬攏揀擁攔擰撥擇掛摯攣掗撾撻挾撓擋撟掙擠揮撏撈損撿換搗據撚擄摑擲撣摻摜摣攬撳攙擱摟攪攜攝攄擺搖擯攤攖撐攆擷擼攛擻攢敵斂數齋斕鬥斬斷無舊時曠暘曇晝曨顯晉曬曉曄暈暉暫曖劄術樸機殺雜權條來楊榪傑極構樅樞棗櫪梘棖槍楓梟櫃檸檉梔柵標棧櫛櫳棟櫨櫟欄樹棲樣欒棬椏橈楨檔榿橋樺檜槳樁夢檮棶檢欞槨櫝槧欏橢樓欖櫬櫚櫸檟檻檳櫧橫檣櫻櫫櫥櫓櫞簷檁歡歟歐殲歿殤殘殞殮殫殯毆毀轂畢斃氈毿氌氣氫氬氳彙漢汙湯洶遝溝沒灃漚瀝淪滄渢溈滬濔濘淚澩瀧瀘濼瀉潑澤涇潔灑窪浹淺漿澆湞溮濁測澮濟瀏滻渾滸濃潯濜塗湧濤澇淶漣潿渦溳渙滌潤澗漲澀澱淵淥漬瀆漸澠漁瀋滲溫遊灣濕潰濺漵漊潷滾滯灩灄滿瀅濾濫灤濱灘澦濫瀠瀟瀲濰潛瀦瀾瀨瀕灝滅燈靈災燦煬爐燉煒熗點煉熾爍爛烴燭煙煩燒燁燴燙燼熱煥燜燾煆糊溜愛爺牘犛牽犧犢強狀獷獁猶狽麅獮獰獨狹獅獪猙獄猻獫獵獼玀豬貓蝟獻獺璣璵瑒瑪瑋環現瑲璽瑉玨琺瓏璫琿璡璉瑣瓊瑤璦璿瓔瓚甕甌電畫暢佘疇癤療瘧癘瘍鬁瘡瘋皰屙癰痙癢瘂癆瘓癇癡癉瘮瘞瘺癟癱癮癭癩癬癲臒皚皺皸盞鹽監蓋盜盤瞘眥矓著睜睞瞼瞞矚矯磯礬礦碭碼磚硨硯碸礪礱礫礎硜矽碩硤磽磑礄確鹼礙磧磣堿镟滾禮禕禰禎禱禍稟祿禪離禿稈種積稱穢穠穭稅穌穩穡窮竊竅窯竄窩窺竇窶豎競篤筍筆筧箋籠籩築篳篩簹箏籌簽簡籙簀篋籜籮簞簫簣簍籃籬籪籟糴類秈糶糲粵糞糧糝餱緊縶糸糾紆紅紂纖紇約級紈纊紀紉緯紜紘純紕紗綱納紝縱綸紛紙紋紡紵紖紐紓線紺絏紱練組紳細織終縐絆紼絀紹繹經紿綁絨結絝繞絰絎繪給絢絳絡絕絞統綆綃絹繡綌綏絛繼綈績緒綾緓續綺緋綽緔緄繩維綿綬繃綢綯綹綣綜綻綰綠綴緇緙緗緘緬纜緹緲緝縕繢緦綞緞緶線緱縋緩締縷編緡緣縉縛縟縝縫縗縞纏縭縊縑繽縹縵縲纓縮繆繅纈繚繕繒韁繾繰繯繳纘罌網羅罰罷羆羈羥羨翹翽翬耮耬聳恥聶聾職聹聯聵聰肅腸膚膁腎腫脹脅膽勝朧腖臚脛膠脈膾髒臍腦膿臠腳脫腡臉臘醃膕齶膩靦膃騰臏臢輿艤艦艙艫艱豔艸藝節羋薌蕪蘆蓯葦藶莧萇蒼苧蘇檾蘋莖蘢蔦塋煢繭荊薦薘莢蕘蓽蕎薈薺蕩榮葷滎犖熒蕁藎蓀蔭蕒葒葤藥蒞蓧萊蓮蒔萵薟獲蕕瑩鶯蓴蘀蘿螢營縈蕭薩蔥蕆蕢蔣蔞藍薊蘺蕷鎣驀薔蘞藺藹蘄蘊藪槁蘚虜慮虛蟲虯蟣雖蝦蠆蝕蟻螞蠶蠔蜆蠱蠣蟶蠻蟄蛺蟯螄蠐蛻蝸蠟蠅蟈蟬蠍螻蠑螿蟎蠨釁銜補襯袞襖嫋褘襪襲襏裝襠褌褳襝褲襇褸襤繈襴見觀覎規覓視覘覽覺覬覡覿覥覦覯覲覷觴觸觶讋譽謄訁計訂訃認譏訐訌討讓訕訖訓議訊記訒講諱謳詎訝訥許訛論訩訟諷設訪訣證詁訶評詛識詗詐訴診詆謅詞詘詔詖譯詒誆誄試詿詩詰詼誠誅詵話誕詬詮詭詢詣諍該詳詫諢詡譸誡誣語誚誤誥誘誨誑說誦誒請諸諏諾讀諑誹課諉諛誰諗調諂諒諄誶談誼謀諶諜謊諫諧謔謁謂諤諭諼讒諮諳諺諦謎諞諝謨讜謖謝謠謗諡謙謐謹謾謫譾謬譚譖譙讕譜譎讞譴譫讖穀豶貝貞負貟貢財責賢敗賬貨質販貪貧貶購貯貫貳賤賁貰貼貴貺貸貿費賀貽賊贄賈賄貲賃賂贓資賅贐賕賑賚賒賦賭齎贖賞賜贔賙賡賠賧賴賵贅賻賺賽賾贗讚贇贈贍贏贛赬趙趕趨趲躉躍蹌蹠躒踐躂蹺蹕躚躋踴躊蹤躓躑躡蹣躕躥躪躦軀車軋軌軒軑軔轉軛輪軟轟軲軻轤軸軹軼軤軫轢軺輕軾載輊轎輈輇輅較輒輔輛輦輩輝輥輞輬輟輜輳輻輯轀輸轡轅轄輾轆轍轔辭辯辮邊遼達遷過邁運還這進遠違連遲邇逕跡適選遜遞邐邏遺遙鄧鄺鄔郵鄒鄴鄰鬱郤郟鄶鄭鄆酈鄖鄲醞醱醬釅釃釀釋裏钜鑒鑾鏨釓釔針釘釗釙釕釷釺釧釤鈒釩釣鍆釹鍚釵鈃鈣鈈鈦鈍鈔鍾鈉鋇鋼鈑鈐鑰欽鈞鎢鉤鈧鈁鈥鈄鈕鈀鈺錢鉦鉗鈷缽鈳鉕鈽鈸鉞鑽鉬鉭鉀鈿鈾鐵鉑鈴鑠鉛鉚鈰鉉鉈鉍鈹鐸鉶銬銠鉺銪鋏鋣鐃銍鐺銅鋁銱銦鎧鍘銖銑鋌銩銛鏵銓鉿銚鉻銘錚銫鉸銥鏟銃鐋銨銀銣鑄鐒鋪鋙錸鋱鏈鏗銷鎖鋰鋥鋤鍋鋯鋨鏽銼鋝鋒鋅鋶鐦鐧銳銻鋃鋟鋦錒錆鍺錯錨錡錁錕錩錫錮鑼錘錐錦鍁錈錇錟錠鍵鋸錳錙鍥鍈鍇鏘鍶鍔鍤鍬鍾鍛鎪鍠鍰鎄鍍鎂鏤鎡鏌鎮鎛鎘鑷鐫鎳鎿鎦鎬鎊鎰鎔鏢鏜鏍鏰鏞鏡鏑鏃鏇鏐鐔钁鐐鏷鑥鐓鑭鐠鑹鏹鐙鑊鐳鐶鐲鐮鐿鑔鑣鑞鑲長門閂閃閆閈閉問闖閏闈閑閎間閔閌悶閘鬧閨聞闥閩閭闓閥閣閡閫鬮閱閬闍閾閹閶鬩閿閽閻閼闡闌闃闠闊闋闔闐闒闕闞闤隊陽陰陣階際陸隴陳陘陝隉隕險隨隱隸雋難雛讎靂霧霽黴靄靚靜靨韃鞽韉韝韋韌韍韓韙韞韜韻頁頂頃頇項順須頊頑顧頓頎頒頌頏預顱領頗頸頡頰頲頜潁熲頦頤頻頮頹頷頴穎顆題顒顎顓顏額顳顢顛顙顥纇顫顬顰顴風颺颭颮颯颶颸颼颻飀飄飆飆飛饗饜飣饑飥餳飩餼飪飫飭飯飲餞飾飽飼飿飴餌饒餉餄餎餃餏餅餑餖餓餘餒餕餜餛餡館餷饋餶餿饞饁饃餺餾饈饉饅饊饌饢馬馭馱馴馳驅馹駁驢駔駛駟駙駒騶駐駝駑駕驛駘驍罵駰驕驊駱駭駢驫驪騁驗騂駸駿騏騎騍騅騌驌驂騙騭騤騷騖驁騮騫騸驃騾驄驏驟驥驦驤髏髖髕鬢魘魎魚魛魢魷魨魯魴魺鮁鮃鯰鱸鮋鮓鮒鮊鮑鱟鮍鮐鮭鮚鮳鮪鮞鮦鰂鮜鱠鱭鮫鮮鮺鯗鱘鯁鱺鰱鰹鯉鰣鰷鯀鯊鯇鮶鯽鯒鯖鯪鯕鯫鯡鯤鯧鯝鯢鯰鯛鯨鯵鯴鯔鱝鰈鰏鱨鯷鰮鰃鰓鱷鰍鰒鰉鰁鱂鯿鰠鼇鰭鰨鰥鰩鰟鰜鰳鰾鱈鱉鰻鰵鱅鰼鱖鱔鱗鱒鱯鱤鱧鱣鳥鳩雞鳶鳴鳲鷗鴉鶬鴇鴆鴣鶇鸕鴨鴞鴦鴒鴟鴝鴛鴬鴕鷥鷙鴯鴰鵂鴴鵃鴿鸞鴻鵐鵓鸝鵑鵠鵝鵒鷳鵜鵡鵲鶓鵪鶤鵯鵬鵮鶉鶊鵷鷫鶘鶡鶚鶻鶿鶥鶩鷊鷂鶲鶹鶺鷁鶼鶴鷖鸚鷓鷚鷯鷦鷲鷸鷺鸇鷹鸌鸏鸛鸘鹺麥麩黃黌黶黷黲黽黿鼂鼉鞀鼴齇齊齏齒齔齕齗齟齡齙齠齜齦齬齪齲齷龍龔龕龜誌製谘隻裡係範鬆冇嚐嘗鬨麵準鐘彆閒乾儘臟拚"
},
convert: function(e, t) {
var i = []
, n = a.ss()
, s = a.ts();
for (var o = 0, r = e.length; o < r; o++) {
var d = e.charAt(o)
, u = e.charCodeAt(o);
if (t)
g = s.indexOf(d);
else
g = n.indexOf(d);
if (u > 19968 && u < 40869 && g != -1)
if (t)
i.push(n.charAt(g));
else
i.push(s.charAt(g));
else
i.push(d)
}
return i.join("")
},
travel: function(e, t) {
if (!t)
return;
for (var i = 0, n = t.length; i < n; ++i)
if (3 === t[i].nodeType)
t[i].data = a.convert(t[i].data, e);
else if (1 === t[i].nodeType && "SCRIPT" != t[i].nodeName)
a.travel(e, t[i].childNodes)
},
trans: function(e, t) {
a.travel(e, t || document.body.childNodes)
}
};
var s = function(e) {
var n = a.trans;
if (i) {
n();
if (e)
e.html("简体版")
} else if (null === i && "undefined" !== typeof window.countryCode && "CN" !== window.countryCode) {
n();
e.html("简体版");
t("stt", 1, 10, {
domain: "youku.com"
})
}
if (!e)
return;
var s = function() {
if (t("stt")) {
n(true);
e.html("繁體版");
t("stt", "", -1, {
domain: "youku.com"
})
} else {
n();
e.html("简体版");
t("stt", 1, 10, {
domain: "youku.com"
})
}
}
.bind(e);
e.bind("click", s)
};
if (n.length)
s(n);
else
e(function() {
var t = e("#sttrans");
s(t)
})
}
});
i("tui/util/throttle", [], function(e, t) {
var i = function(e, t) {
var i = e;
var n;
var a = true;
return function() {
var e = arguments;
var s = this;
if (a) {
i.apply(s, e);
return a = false
}
if (n)
return false;
n = setTimeout(function() {
clearTimeout(n);
n = null;
i.apply(s, e)
}, t || 500)
}
};
return i
});
i("page/find/revision/header/notice", ["tui/view", "tui/net", "tui/cookie", "module/login/login"], function(t, i, n, a) {
window.QheaderModule = {
initUnloginMessage: function(e) {
if (e && e.length > 0) {
var t = Math.round((new Date).getTime() / 1e3);
for (var a = 0; a < e.length; a++) {
if ("undefined" != typeof e[a]["access_time"] && !isNaN(parseInt(e[a]["access_time"])) && t < parseInt(e[a]["access_time"]))
continue;
if ("undefined" != typeof e[a]["expire_time"] && !isNaN(parseInt(e[a]["expire_time"])) && t > parseInt(e[a]["expire_time"]))
continue;
var s = "msgid_" + e[a]["msgid"];
if (!n(s)) {
window.QheaderModule.renderMessage(e[a]);
n(s, e[a]["msgid"]);
i.getRequest("//msg.youku.com/api/push/read_unlogin_msg?msgid=" + e[a]["msgid"]);
break
}
}
}
},
renderMessage: function(t) {
var i = t.content, n = window.uid ? 1 : 0, a = e("#qnotice"), s;
var o = i.link ? "" + i.btnname + "" : "";
var r = "" + i.title + "
" + (i.ifo.length > 59 ? i.ifo.substr(0, 59) + "..." : i.ifo) + "
";
a.html(r).show();
s && clearTimeout(s);
if (t.fade) {
var d = 1e3 * parseInt(t.fade);
s = setTimeout(function() {
a.hide()
}, d)
}
}
};
var s = t.extend({
events: {
"click #closeNotice": "handleCloseNotice",
"click .mbtn": "reportClickLog"
},
initialize: function() {
var t = this
, i = e(window);
if (0 == e(".g-header").length)
return;
e(".g-header").after(t.$el);
t.getNotice();
t.responseNotice();
i.bind("cresize", function() {
t.responseNotice()
});
e(document).bind("login", function(i) {
if (0 == e("#qnotice").length)
return;
t.getNotice()
})
},
responseNotice: function() {
if (e(window).width() < 1080)
this.$el.addClass("qsmall");
else
this.$el.removeClass("qsmall")
},
getNotice: function() {
var e = this;
var t = a.uid();
if (t) {
var n = "//msg.youku.com/api/push/getpopupmsg?" + CHUDA.API.getApiSignature(t);
this.logurl = "//msg.youku.com/api/push/updatemsgstatus?" + CHUDA.API.getApiSignature(t);
i.getJSON(n, {}, function(t) {
if (void 0 === t.errno || 0 != t.errno)
return;
var n = t.data;
if (n && n.msgs && n.msgs.length > 0) {
window.QheaderModule.renderMessage(n.msgs[0]);
i.getRequest(e.logurl + "&msgid=" + n.msgs[0].msgid + "&status=1")
}
}, {
callbackName: "callback",
charset: "utf-8"
})
} else {
var n = "//dl-oss-wanju.youku.com/msg/chuda_message.js";
i.getScript(n)
}
},
reportClickLog: function() {
var e = this.$el.children("div")
, t = e.attr("loginstatus")
, n = e.data("msgid");
if (0 == t) {
var a = "//msg.youku.com/api/push/click_unlogin_msg?msgid=" + n;
i.getRequest(a)
} else if (this.logurl)
i.getRequest(this.logurl + "&msgid=" + n + "&status=2")
},
handleCloseNotice: function() {
this.$el.hide()
}
});
return s
});
i("module/mobile/applink", ["tui/net", "tui/util/url", "tui/browser", "module/global"], function(e, t, i, n) {
var a = "//mobile.youku.com/";
var s, o;
var r = t.params().from || "";
var d = "wifiwnys" == r;
var u = "jubaoping" == r;
var l = navigator.userAgent.toLowerCase();
var c = l.indexOf("chrome") > -1 && l.match(/(?:chrome|crios)\/([\d\.]+)/);
var f = l.match(/version\/[\d+\.]+\s*chrome/);
var h = i.android && c && !f;
var g = i.android && !!l.match(/samsung/i) && i.android > "4.3" && i.android < "4.5";
var m = 0;
if (i.wechat)
l = "wechat";
else if (i.safari)
l = "safari";
else if (l.indexOf("ucbrowser") > -1)
l = "uc";
else if (l.indexOf("weibo") > -1)
l = "weibo";
else
l = "other";
if (i.iOS && i.isPad) {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "https://itunes.apple.com/cn/app/id394075284?l=cn&mt=8"
} else if (i.iOS && !i.isPad) {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "https://itunes.apple.com/cn/app/id336141475?l=cn&mt=8"
} else if (i.android && i.isPad) {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "//dl.m.youku.com/android/phone/Youku_Android_tudouh5daoliu.apk"
} else if (i.android && !i.isPad) {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "//dl.m.youku.com/android/phone/Youku_Android_tudouh5daoliu.apk"
} else {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "//mobile.tudou.com/"
}
if ("wechat" == l) {
s = "//mobile.youku.com/index/pcuniversalpredownlo";
o = "//a.app.qq.com/o/simple.jsp?pkgname=com.youku.phone&g_f=999054"
}
function p() {
return s
}
function v() {
t.openURL(s)
}
function b() {
t.openURL(o)
}
function w(e, t, n) {
document.addEventListener("visibilitychange", function r() {
document.removeEventListener("visibilitychange", r, false);
m = 0;
if (n)
n()
}, false);
C(e);
var a = _(e);
if (i.youku || i.youkuHD)
window.location = a;
else if (i.iOS && i.iOSVersion[0] > 8)
window.location = y(e);
else if (h || g) {
window.location.href = a;
o()
} else if ("wechat" == l)
b();
else {
var s = document.getElementById("GLaunchApp");
if (!s) {
s = document.createElement("iframe");
s.id = "GLaunchApp";
s.style.cssText = "width:0px;height:0px;position:fixed;top:0;left:0;border:0";
document.body.appendChild(s)
}
s.src = a;
o()
}
function o() {
m = +new Date;
setTimeout(function() {
var e = document.hidden || document.webkitHidden;
if (!e && +new Date - m < 1200)
if (t)
t();
else
b()
}, 1e3)
}
}
function k(e) {
e || (e = {});
var t = [];
var n = "tudou://";
if (e.icode) {
if (i.iOS)
n += "play/?1=1&";
t.push("itemcode=" + e.icode)
}
if (e.aid)
t.push("albumid=" + e.aid);
if (e.lcode)
t.push("playlistCode=" + e.lcode);
if (e.st)
t.push("st=" + e.st);
if (e.language)
t.push("language=" + e.language);
if (e.fullscreen)
t.push("Fullscreen=" + e.fullscreen ? 1 : 0);
if (e.quality)
t.push("quality=" + e.quality);
if (e.download)
t.push("action=download");
if (e.panoramic)
t.push("panoramic_view=" + e.panoramic ? 1 : 0);
n += t.join("&");
return n
}
function _(e) {
e || (e = {});
var t = [];
var a = "youku://";
if ("ipad" == i.iOS)
a = "youkuhd://";
else if (h || g)
a = "intent://";
if (i.iOS && i.youku && i.youkuVersion > "5.10.1")
a += "jsb";
else if (i.iOS && i.youkuHD && i.youkuVersion >= "4.8.1")
a = "youku://jsb";
else if (i.android && i.youku)
a = "youku://";
if (e.vcode) {
a += "play?";
t.push("vid=" + e.vcode)
}
if (e.liveid)
if (i.iOS && i.youkuHD) {
a += "play?";
t.push("liveid=" + e.liveid)
} else {
a += "playlive?";
t.push("id=" + e.liveid)
}
if (0 == t.length)
a += "splash?";
t.push("source=" + (e.source || "pc-h5"));
t.push("refer=" + (e.refer || "pc-h5"));
t.push("ua=" + l);
t.push("cookieid=" + n.juid);
a += t.join("&");
if (h || g)
a += "#Intent;scheme=youku;package=com.youku.phone;end";
return a
}
function y(e) {
e || (e = {});
var t = [];
var a = "//link-jump.youku.com/a/b/";
if ("ipad" == i.iOS)
a = "//iosport.youku.com/ipad/ulink";
if (e.vcode) {
if ("ipad" == i.iOS)
a += "?";
else {
a += "play?";
t.push("action=play")
}
t.push("vid=" + e.vcode)
}
if (e.liveid)
if ("ipad" == i.iOS) {
a += "?";
t.push("liveid=" + e.liveid)
} else {
a += "?";
t.push("action=playlive");
t.push("id=" + e.liveid)
}
t.push("source=" + (e.source || "pc-h5"));
t.push("refer=" + (e.refer || "pc-h5"));
t.push("ua=" + l);
t.push("cookieid=" + n.juid);
if ("ipad" != i.iOS) {
if (e.vcode)
var s = "vid=" + e.vcode;
else if (e.liveid)
var s = "liveid=" + e.liveid;
t.push("fua=" + encodeURIComponent(l))
}
a += t.join("&");
return a
}
function C(t) {
var a = {
pid: i.android ? "0d7c3ff41d42fcd9" : "69b81504767483cf",
guid: n.juid,
idfa: "",
ouid: "",
source: t.source || "pc-h5",
ua: l,
ver: "",
datetime: Math.floor(+new Date / 1e3),
pagetype: t.type || 1,
refer: t.refer || "pc-h5",
cookieid: n.juid,
tuid: 0,
special: 0,
sender: 1
};
e.getRequest("//statis.api.3g.youku.com/openapi-wireless/statis/recall_app_service", a)
}
return {
BD_WIFIWNYS: d,
BD_JUBAOPING: u,
getURL: p,
download: v,
downloadYoukuApp: b,
getTudouAppSchema: k,
getYoukuAppSchema: _,
getYoukuUniversalLinks: y,
launchApp: w,
appDownLink: s
}
});
i("page/find/revision/header/model", ["tui/event", "tui/net", "module/login/login"], function(t, i, n) {
var a = t.extend({
initialize: function() {
var e = this;
a.superClass.initialize.call(e);
e.op = {
callbackName: "callback",
charset: "utf-8"
};
e.msgNum = -1;
e.subNum = -1
},
getUserInfo: function() {
var t = this;
var a = "//lv.youku.com/api/grade/get_uinfo?from=web";
var s = "//vip.youku.com/member/show_valid_member.jsonp?version=2";
var o = "//lvip.youku.com/api/user/get_user_info?";
i.getJSON(a, {}, function(a) {
var r = a.data;
r.encodeUid = r.uid_encode;
r.score_hour = (r.score / 60).toFixed(1);
r.upgrade_score_hour = (r.upgrade_score / 60).toFixed(1);
r.percent = r.today_score > r.today_max_score ? "100%" : 100 * (r.today_score / r.today_max_score).toFixed(2) + "%";
if (0 == a.errno)
i.getJSON(s, {}, function(a) {
if (2e4 == a.code) {
r = e.extend(r, a.result);
i.getJSON(o + CHUDA.API.getApiSignature(n.uid()), {}, function(i) {
if (0 == i.errno) {
r = e.extend(r, i.data);
t.getSigned();
t.getPoint();
t.getTask();
t.trigger("userInfo:success", [r]);
window.XloginEvent && window.XloginEvent.trigger("login:userInfo", [r])
}
}, t.op)
} else
t.trigger("userInfo:error", [])
}, t.op);
else
t.trigger("userInfo:error", [])
}, t.op)
},
getRecord: function() {
var e = this;
var t = "//cmstool.youku.com/cms/playlog/get";
i.getJSON(t, {}, function(t) {
var i = ["a", "b", "c", "d"]
, n = [];
if (t.playtag)
for (var a = 0; a < i.length; a++) {
var s = t.playtag[i[a]];
n.push(s)
}
e.trigger("record:success", [n])
}, e.op)
},
getSigned: function() {
var e = "//actives.youku.com/task/show/user_is_sign";
var t = this;
var a = false;
var s = n.uid();
if (s)
i.getJSON(e, {
uid: s
}, function(e) {
if (0 == e.errno && 1 == e.data.is_sign)
a = true;
t.trigger("signned:success", [a])
}, t.op);
else
t.trigger("signned:success", [a])
},
getPoint: function() {
var e = "//lv.youku.com/api/grade/get_grade_point";
var t = this;
i.getJSON(e, {}, function(e) {
if (0 == e.errno)
t.trigger("pointed:success", e.data.point)
}, t.op)
},
getTask: function() {
var e = "//task.youku.com/task/task/get_my_task";
var t = this;
i.getJSON(e, {}, function(e) {
if (0 == e.errno && e.data)
t.trigger("task:success", e.data.user_task);
else
t.trigger("task:success", false)
}, t.op)
},
getMsgList: function() {
var e = this;
var t = n.uid();
var a = "//msg.youku.com/api/push/get_msg_box_list?" + CHUDA.API.getApiSignature(t);
if (t)
i.getJSON(a, {
page: 1,
page_size: 4
}, function(t) {
var i = t.data.msg_list;
if (0 == t.errno)
e.trigger("msg:success", [i])
}, e.op)
},
getNotice: function() {
var e = this;
var t = "//msg.youku.com/api/notify/countweb";
i.getJSON(t, {
uid: n.uid()
}, function(t) {
if (0 == t.errno) {
var i = t.data.unreadcount;
if (i > 0)
e.trigger("message:change", [i])
}
}, e.op)
},
readAllMsg: function() {
var e = this;
var t = "//msg.youku.com/api/notify/clearweb";
i.getJSON(t, {
uid: n.uid()
}, function(t) {
if (0 == t.errno)
e.trigger("message:clear", [])
}, e.op)
}
});
return a
});
i("page/find/revision/header/ucenter", ["tui/view", "tui/art", "tui/browser", "module/login/login", "page/find/revision/header/model", "tui/net", "tui/util/date"], function(t, i, n, a, s, o, r) {
return t.extend({
el: e("#uerCenter"),
events: {
"click #qheader_login,#qheader_reg,.record-login a": "loginin",
"mouseenter .dropdown": "dropdown",
"mouseleave .dropdown": "dropup",
"mouseenter .panel": "panelShow",
"click .ikuDownload": "download",
"click .singout": "loginout",
"click .msg-list li a": "clickMsgLog",
"click #msg-allread": "readAllMsgLog",
"click .u-notice .handle,.u-bottom .fr": "clearMsg"
},
initialize: function() {
var t = this;
this.$before = this.find(".login-before");
this.$after = this.find(".login-after");
this.$panel = this.find(".panel");
this.model = new s;
this.model.bind("userInfo:success", this.renderUser.bind(this));
this.model.bind("userInfo:error", this.loginerror.bind(this));
this.model.bind("record:success", this.initRecord.bind(this));
this.model.bind("msg:success", this.renderMsg.bind(this));
this.model.bind("message:change", this.initMsg.bind(this));
this.model.bind("pointed:success", this.initPointed.bind(this));
this.model.bind("message:show", this.showMsgLog.bind(this));
this.find(".u-notice").removeClass("unload");
setTimeout(function() {
e(document).bind("logchange", function() {
t.status()
})
}, 500);
this.status();
this.sloganFn();
this.initDowmload()
},
loginin: function(t) {
var i = this;
var n = {};
if ("qheader_reg" == e(t.target).attr("id"))
n.regist = true;
a.login(n, function() {
e(document).trigger("header:login")
});
return false
},
loginout: function() {
a.logout();
e(document).trigger("header:loginout");
return false
},
loginerror: function() {},
status: function() {
var e = this;
a.checkLogin(function(t) {
if (a.isLogin()) {
e.renderAvator();
e.model.getUserInfo();
e.$before.css("display", "none");
e.$after.css("display", "block")
} else {
e.$after.css("display", "none");
e.$before.css("display", "block")
}
e.model.getRecord()
})
},
renderAvator: function() {
var e = a.getUserInfo();
this.find(".avatar").attr({
src: e.avatar["large"],
title: e.username
}).parent().attr("href", "//i.youku.com/i/" + e.encodeUid)
},
renderUser: function(t) {
var t = e.extend(a.getUserInfo(), t)
, n = ' <%var level,leveltxt,isVip,emailDone,phoneDone,levelurl;%>\n<%levelurl=\'//cps.youku.com/redirect.html?id=000145de\'%>\n<%if(data.is_vip){%>\n<%levelClass = \'level-vip\'+data.vip_grade%>\n<%leveltxt = \'优酷土豆黄金会员\'%>\n<%isVip = true%>\n<%}else if(data.is_lvip){%>\n<%levelClass = \'level-lvip\'+data.vip_grade%>\n<%levelurl=\'//cps.youku.com/redirect.html?id=000145dd\'%>\n<%leveltxt = \'优酷土豆白银会员\'%>\n<%isVip = true%>\n<%}else{%>\n<%levelClass = \'level-expired\'+data.vip_grade%>\n<%leveltxt = \'会员已过期\'%>\n<%}%>\n<%if (data.is_verify_email==0){%>\n<%emailDone=\'ico-valid-email-done\'%>\n<%}%>\n<%if (data.is_verify_mobile){%>\n<%phoneDone=\'ico-valid-phone-done\'%>\n<%}%>\n \n
\n
\n
\n
\n
\n<%if (data.vip_grade!=0){%>\n
\n\n\n<%}%>\n
\n\n\n<%if (data.isverified){%>\n
\n<%}%>\n
\n
\n
\n
\n
\n
\n
\n
'
, s = i.compile(n)({
data: t
});
this.find(".u-panel .content").html(s);
var o = e(".u-profile .vip-level-icon")
, r = e(".u-login .login-after >a span");
if (0 != o.length) {
r[0].className = o[0].className;
r[0].style.backgroundImage = o[0].style.backgroundImage;
r[0].style.height = o[0].style.height
}
this.$after.removeClass("unload")
},
initSigned: function(e) {
if (e)
this.find(".u-sign").html("已签到")
},
initPointed: function(e) {
if (e)
this.find(".u-point >a em").html(e).parents(".u-point").show()
},
initTask: function(e) {
if (false == e)
this.find(".task-info >p").html("获取数据失败");
else if (0 != e.length) {
var t = "- ' + e.name + "" + e.desc + '
\n<%if(!isLogin){%>\n\n<%}%>\n\n<% data.forEach(function(d, t){ %>\n<% d.forEach(function(r, i){ %>\n<% if (num < max && !r.isdelete){%>\n<%if(i==0){%>\n- <%=time[t]%>
\n<%}%> \n<% num++; %>\n<%var prrcent=(r.play_percent==\'0%\'?\'1%\':r.play_percent)%>\n- \n<%=r.title%> \n\n \n看到<%if (r.watchStage){%><%=r.watchStage%> \n<%}%><%=prrcent%>\n\n
\n<%}%>\n<% }); %> \n<% }); %> \n
\n<% if(num>0){%>\n\n<%}else{%>\n\n<%}%>'
, n = i.compile(t)({
data: e,
isLogin: a.isLogin()
});
this.find(".u-record .content").html(n)
},
renderMsg: function(t) {
var n = '\n<% if(data.length==0){%>\n- 您最近没有收到新的消息
\n<%}else{%>\n<% data.forEach(function(t, i){ %>\n- data-status=<%=t.status%> class="red"<%}%> >\n
\n- \n\n\n
\n- <%=t.fromuid.name%><%=t.content.ifo%>
\n- <%=sec(1e3*t.access_time)%>
\n
\n \n<% }); %>\n<%}%>\n
'
, a = i.compile(n)({
data: t,
sec: r.release
});
this.find(".u-notice").addClass("loaded").find(".content").html(a);
if (t.length)
this.find(".u-notice .panel").removeClass("no-msg");
else
this.find(".u-notice .panel").addClass("no-msg");
if (0 == e("#msg-allread").length && this.find("msg-list>li.red").length)
this.find(".u-notice .u-bottom a").before("全部标记已读");
this.model.trigger("message:show")
},
initDowmload: function() {
var e = '\n'
, t = i.compile(e);
this.find(".u-app .content").html(t)
},
sloganFn: function() {
var t = "优酷mac客户端,看片免广告!";
if (n.isPad)
e("#uerCenter .u-upload .dropdown .u-bottom").html(t);
else if (n.isPhone)
e("#uerCenter .u-upload .dropdown .u-bottom").html(t);
else if (n.mac)
e("#uerCenter .u-upload .dropdown .u-bottom").html('立即下载优酷mac客户端,看片免广告!')
},
showMsgLog: function() {
var t = e(".u-notice [data-status='0']")
, i = ""
, n = this;
if (!t.length)
return;
t.each(function(t, n) {
i += e(n).data("msgid") + ",";
e(n).attr("data-status", "1")
});
i = i.substr(0, i.length - 1);
n.sendMsgLog(1, i)
},
clickMsgLog: function(t) {
var i = e(t.currentTarget).parents("li")
, n = i.data("msgid");
if (i.attr("data-status") && "2" != i.attr("data-status")) {
i.attr("data-status", "2").removeClass("red");
this.sendMsgLog(2, n);
if (0 == this.$el.find(".msg-list>li.red").length)
this.readAllMsgLog()
}
},
readAllMsgLog: function() {
this.model.one("message:clear", this.initReadAllMsg.bind(this));
this.model.readAllMsg()
},
clearMsg: function() {
this.model.readAllMsg();
e("#qheader_notice_num").hide()
},
sendMsgLog: function(e, t) {
var i = "//msg.youku.com/api/push/updatemsgstatusbatch?" + CHUDA.API.getApiSignature(a.uid());
o.getRequest(i + "&msgid=" + t + "&status=" + e)
},
dropdown: function(t) {
var i = e(t.currentTarget)
, n = this;
if (i.hasClass("unload") || i.parent().hasClass("unload"))
return;
if (a.isLogin() || i.parents(".u-upload,.u-record, .u-app").length) {
this.$panel.removeClass("dropdown-open");
i.addClass("dropdown-open")
}
if (i.parents(".u-app").length) {
this.$panel.removeClass("dropdown-open");
i.addClass("dropdown-open")
}
if (i.parents(".u-notice").length && !i.parents(".u-notice").hasClass("loaded"))
this.model.getMsgList()
},
dropup: function(t) {
var i = e(t.currentTarget);
if (a.isLogin() || i.parents(".u-upload, .u-record, .u-app").length)
e(t.currentTarget).removeClass("dropdown-open");
if (i.parents(".u-app").length)
e(t.currentTarget).removeClass("dropdown-open")
},
panelShow: function() {
clearTimeout(this.dropupHandle)
},
download: function(t) {
if (this.ikuDownloadIng)
return false;
var i = t.target || t.srcElement;
if (!i)
return false;
var n = e(i).data("url");
if (!n || this.ikuDownloadIng)
return false;
this.ikuDownloadIng = true;
var a = document.createElement("iframe");
a.width = 0;
a.height = 0;
a.src = n;
document.body.appendChild(a);
setTimeout(function() {
document.body.removeChild(a);
this.ikuDownloadIng = false
}, 2e3);
return false
}
})
});
i("page/find/revision/header/nav", ["tui/event", "page/find/revision/header/ucenter", "module/login/login", "tui/browser", "module/mobile/applink", "page/find/revision/header/notice", "tui/util/throttle"], function(t, i, n, a, s, o, r) {
var d = t.extend({
initialize: function() {
var t = this;
var s = new i;
t.$nav = e("#topNav");
d.superClass.initialize.call(t);
n.one("checklogin", function() {
var e = new o({
id: "qnotice",
className: "notice-wrap"
})
});
e.getScript("//static.youku.com/v2.0.5/soku/giantstar/js/sk-box-open.js", function() {
XBox.init({
site: 14,
css: "//static.youku.com/v2.0.4/soku/giantstar/css/s_kubox.css"
});
var t = e("#qheader_search");
if (t) {
var i = t.find("button");
if (i)
e(i).bind("click", function() {
if ("object" == typeof ykQHeader)
ykQHeader.doSearch()
});
var n = navigator.userAgent.toLowerCase();
if ((n.match(/ipad/) || [])[0]) {
var a = e("#qheader .g-header-container");
e("#headq").focus(function() {
e("body,html").animate({
scrollTop: 0
}, 600);
a.css({
position: "absolute"
})
}).blur(function() {
a.css({
position: "fixed"
})
})
}
}
});
if (t.$nav.length) {
if (a.isPad)
e("body").addClass("pad-view");
this.fixnav()
}
try {
if (!a.mac)
if ("undefined" == typeof window.getP2PStateFromIku) {
var r = "";
if ("undefined" != typeof version)
r = version;
e.getScript("//js.ykimg.com/youku/dist/js/lib/ikuAdapterNew.js", function() {
window.getP2PStateFromIku("web_category")
})
} else
window.getP2PStateFromIku("web_category")
} catch (u) {}
},
adPad: function() {
e("#qheader").addClass("yk-has-adpad");
e("#topNav").after('')
},
responsedNav: function(t) {
if (!this.$nav.length)
return;
var i = e(".response-nav", this.$nav)
, n = e(".top-nav-main", this.$nav)
, a = e(".top-nav-more ul", this.$nav);
if (t)
n.append(i);
else
a.prepend(i)
},
fixnav: function() {
var t = e(window);
var i = e("#qheader");
var n;
function a() {
var e = t.scrollTop();
if (e > 560)
i.addClass("white");
else
i.removeClass("white")
}
a();
t.bind("scroll", r(a, 300))
}
});
return d
});
i("page/find/header/notice", ["tui/view", "tui/net", "tui/cookie", "module/login/login"], function(t, i, n, a) {
window.QheaderModule = {
initUnloginMessage: function(e) {
if (e && e.length > 0) {
var t = Math.round((new Date).getTime() / 1e3);
for (var a = 0; a < e.length; a++) {
if ("undefined" != typeof e[a]["access_time"] && !isNaN(parseInt(e[a]["access_time"])) && t < parseInt(e[a]["access_time"]))
continue;
if ("undefined" != typeof e[a]["expire_time"] && !isNaN(parseInt(e[a]["expire_time"])) && t > parseInt(e[a]["expire_time"]))
continue;
var s = "msgid_" + e[a]["msgid"];
if (!n(s)) {
window.QheaderModule.renderMessage(e[a]);
n(s, e[a]["msgid"]);
i.getRequest("//msg.youku.com/api/push/read_unlogin_msg?msgid=" + e[a]["msgid"]);
break
}
}
}
},
renderMessage: function(t) {
var i = t.content, n = window.uid ? 1 : 0, a = e("#qnotice"), s;
var o = i.link ? "" + i.btnname + "" : "";
var r = "" + i.title + "
" + (i.ifo.length > 59 ? i.ifo.substr(0, 59) + "..." : i.ifo) + "
";
a.html(r).show();
s && clearTimeout(s);
if (t.fade) {
var d = 1e3 * parseInt(t.fade);
s = setTimeout(function() {
a.hide()
}, d)
}
}
};
var s = t.extend({
events: {
"click #closeNotice": "handleCloseNotice",
"click .mbtn": "reportClickLog"
},
initialize: function() {
var t = this
, i = e(window);
if (0 == e(".g-header").length)
return;
e(".g-header").after(t.$el);
t.getNotice();
t.responseNotice();
i.bind("cresize", function() {
t.responseNotice()
});
e(document).bind("login", function(i) {
if (0 == e("#qnotice").length)
return;
t.getNotice()
})
},
responseNotice: function() {
if (e(window).width() < 1080)
this.$el.addClass("qsmall");
else
this.$el.removeClass("qsmall")
},
getNotice: function() {
var e = this;
var t = a.uid();
if (t) {
var n = "//msg.youku.com/api/push/getpopupmsg?" + CHUDA.API.getApiSignature(t);
this.logurl = "//msg.youku.com/api/push/updatemsgstatus?" + CHUDA.API.getApiSignature(t);
i.getJSON(n, {}, function(t) {
if (void 0 === t.errno || 0 != t.errno)
return;
var n = t.data;
if (n && n.msgs && n.msgs.length > 0) {
window.QheaderModule.renderMessage(n.msgs[0]);
i.getRequest(e.logurl + "&msgid=" + n.msgs[0].msgid + "&status=1")
}
}, {
callbackName: "callback",
charset: "utf-8"
})
} else {
var n = "//dl-oss-wanju.youku.com/msg/chuda_message.js";
i.getScript(n)
}
},
reportClickLog: function() {
var e = this.$el.children("div")
, t = e.attr("loginstatus")
, n = e.data("msgid");
if (0 == t) {
var a = "//msg.youku.com/api/push/click_unlogin_msg?msgid=" + n;
i.getRequest(a)
} else if (this.logurl)
i.getRequest(this.logurl + "&msgid=" + n + "&status=2")
},
handleCloseNotice: function() {
this.$el.hide()
}
});
return s
});
i("page/find/header/model", ["tui/event", "tui/net", "module/login/login"], function(t, i, n) {
var a = t.extend({
initialize: function() {
var e = this;
a.superClass.initialize.call(e);
e.op = {
callbackName: "callback",
charset: "utf-8"
};
e.msgNum = -1;
e.subNum = -1
},
getUserInfo: function() {
var t = this;
var a = "//lv.youku.com/api/grade/get_uinfo?from=web";
var s = "//vip.youku.com/member/show_valid_member.jsonp?version=2";
var o = "//lvip.youku.com/api/user/get_user_info?";
var r = 1 * new Date, d;
i.getJSON(a, {}, function(a) {
var u = a.data;
u.encodeUid = u.uid_encode;
u.score_hour = (u.score / 60).toFixed(1);
u.upgrade_score_hour = (u.upgrade_score / 60).toFixed(1);
u.percent = u.today_score > u.today_max_score ? "100%" : 100 * (u.today_score / u.today_max_score).toFixed(2) + "%";
if (0 == a.errno)
i.getJSON(s, {}, function(a) {
if (2e4 == a.code) {
u = e.extend(u, a.result);
i.getJSON(o + CHUDA.API.getApiSignature(n.uid()), {}, function(i) {
if (0 == i.errno) {
u = e.extend(u, i.data);
t.getSigned();
t.getPoint();
t.getTask();
t.trigger("userInfo:success", [u]);
window.XloginEvent && window.XloginEvent.trigger("login:userInfo", [u]);
d = 1 * new Date - r;
if (d > 3e3)
(window.goldlog_queue || (window.goldlog_queue = [])).push({
action: "goldlog.record",
arguments: ["/youku-login.login_status.login_info_loadtime", "EXP", "loadtime=" + d, "H1541524339"]
})
}
}, t.op)
} else
t.trigger("userInfo:error", [])
}, t.op);
else
t.trigger("userInfo:error", [])
}, t.op)
},
getRecord: function() {
var e = this;
var t = "//cmstool.youku.com/cms/playlog/get";
i.getJSON(t, {}, function(t) {
var i = ["a", "b", "c", "d"]
, n = [];
if (t.playtag)
for (var a = 0; a < i.length; a++) {
var s = t.playtag[i[a]];
n.push(s)
}
e.trigger("record:success", [n])
}, e.op)
},
getSigned: function() {
var e = "//actives.youku.com/task/show/user_is_sign";
var t = this;
var a = false;
var s = n.uid();
if (s)
i.getJSON(e, {
uid: s
}, function(e) {
if (0 == e.errno && 1 == e.data.is_sign)
a = true;
t.trigger("signned:success", [a])
}, t.op);
else
t.trigger("signned:success", [a])
},
getPoint: function() {
var e = "//lv.youku.com/api/grade/get_grade_point";
var t = this;
i.getJSON(e, {}, function(e) {
if (0 == e.errno)
t.trigger("pointed:success", e.data.point)
}, t.op)
},
getTask: function() {
var e = "//task.youku.com/task/task/get_my_task";
var t = this;
i.getJSON(e, {}, function(e) {
if (0 == e.errno && e.data)
t.trigger("task:success", e.data.user_task);
else
t.trigger("task:success", false)
}, t.op)
},
getMsgList: function() {
var e = this;
var t = n.uid();
var a = "//msg.youku.com/api/push/get_msg_box_list?" + CHUDA.API.getApiSignature(t);
if (t)
i.getJSON(a, {
page: 1,
page_size: 4
}, function(t) {
var i = t.data.msg_list;
if (0 == t.errno)
e.trigger("msg:success", [i])
}, e.op)
},
getNotice: function() {
var e = this;
var t = "//msg.youku.com/api/notify/countweb";
i.getJSON(t, {
uid: n.uid()
}, function(t) {
if (0 == t.errno) {
var i = t.data.unreadcount;
if (i > 0)
e.trigger("message:change", [i])
}
}, e.op)
},
readAllMsg: function() {
var e = this;
var t = "//msg.youku.com/api/notify/clearweb";
i.getJSON(t, {
uid: n.uid()
}, function(t) {
if (0 == t.errno)
e.trigger("message:clear", [])
}, e.op)
}
});
return a
});
i("page/find/header/ucenter", ["tui/view", "tui/art", "tui/browser", "module/login/login", "page/find/header/model", "tui/net", "tui/util/date"], function(t, i, n, a, s, o, r) {
return t.extend({
el: e("#uerCenter"),
events: {
"click #qheader_login,#qheader_reg,.record-login a": "loginin",
"mouseenter .dropdown": "dropdown",
"mouseleave .dropdown": "dropup",
"mouseenter .panel": "panelShow",
"click .ikuDownload": "download",
"click .singout": "loginout",
"click .msg-list li a": "clickMsgLog",
"click #msg-allread": "readAllMsgLog",
"click .u-notice .handle,.u-bottom .fr": "clearMsg"
},
initialize: function() {
var t = this;
this.$before = this.find(".login-before");
this.$after = this.find(".login-after");
this.$panel = this.find(".panel");
this.model = new s;
this.model.bind("userInfo:success", this.renderUser.bind(this));
this.model.bind("userInfo:error", this.loginerror.bind(this));
this.model.bind("record:success", this.initRecord.bind(this));
this.model.bind("msg:success", this.renderMsg.bind(this));
this.model.bind("message:change", this.initMsg.bind(this));
this.model.bind("signned:success", this.initSigned.bind(this));
this.model.bind("pointed:success", this.initPointed.bind(this));
this.model.bind("task:success", this.initTask.bind(this));
this.model.bind("message:show", this.showMsgLog.bind(this));
this.find(".u-notice").removeClass("unload");
e(document).bind("logchange", function() {
t.status()
});
this.status();
this.sloganFn()
},
loginin: function(t) {
var i = this;
var n = {};
if ("qheader_reg" == e(t.target).attr("id"))
n.regist = true;
a.login(n, function() {
e(document).trigger("header:login")
});
return false
},
loginout: function() {
a.logout();
e(document).trigger("header:loginout");
return false
},
loginerror: function() {},
status: function() {
var e = this;
a.checkLogin(function(t) {
if (a.isLogin()) {
e.renderAvator();
e.model.getUserInfo();
e.$before.hide();
e.$after.show()
} else {
e.$after.hide();
e.$before.show()
}
e.model.getRecord()
})
},
renderAvator: function() {
var e = a.getUserInfo();
this.find(".avatar").attr({
src: e.avatar["large"],
title: e.username
}).parent().attr("href", "//i.youku.com/i/" + e.encodeUid)
},
renderUser: function(t) {
var t = e.extend(a.getUserInfo(), t)
, n = ' <%var level,leveltxt,isVip,emailDone,phoneDone,levelurl;%>\n<%levelurl=\'//cps.youku.com/redirect.html?id=000145de\'%>\n<%if(data.is_vip){%>\n<%levelClass = \'level-vip\'+data.vip_grade%>\n<%leveltxt = \'优酷土豆黄金会员\'%>\n<%isVip = true%>\n<%}else if(data.is_lvip){%>\n<%levelClass = \'level-lvip\'+data.vip_grade%>\n<%levelurl=\'//cps.youku.com/redirect.html?id=000145dd\'%>\n<%leveltxt = \'优酷土豆白银会员\'%>\n<%isVip = true%>\n<%}else{%>\n<%levelClass = \'level-expired\'+data.vip_grade%>\n<%leveltxt = \'会员已过期\'%>\n<%}%>\n<%if (data.is_verify_email==0){%>\n<%emailDone=\'ico-valid-email-done\'%>\n<%}%>\n<%if (data.is_verify_mobile){%>\n<%phoneDone=\'ico-valid-phone-done\'%>\n<%}%>\n\n \n \n
\n
\n
\n
\n
\n<%if (data.vip_grade!=0){%>\n
\n\n\n<%}%>\n
\n\n\n<%if (data.isverified){%>\n
\n<%}%>\n
\n
\n
\n
\n
\n
\n
\n\n
\n'
, s = i.compile(n)({
data: t
});
this.find(".u-panel .content").html(s);
var o = e(".u-profile .vip-level-icon")
, r = e(".u-login .login-after >a span");
if (0 != o.length) {
r[0].className = o[0].className;
r[0].style.background = o[0].style.background;
r[0].style.height = o[0].style.height
}
this.$after.removeClass("unload")
},
initSigned: function(e) {
if (e)
this.find(".u-sign").html("已签到")
},
initPointed: function(e) {
if (e)
this.find(".u-point >a em").html(e).parents(".u-point").show()
},
initTask: function(e) {
if (false == e)
this.find(".task-info >p").html("获取数据失败");
else if (0 != e.length) {
var t = "- ' + e.name + "" + e.desc + '
\n<%if(!isLogin){%>\n\n<%}%>\n\n<% data.forEach(function(d, t){ %>\n<% d.forEach(function(r, i){ %>\n<% if (num < max && !r.isdelete){%>\n<%if(i==0){%>\n- <%=time[t]%>
\n<%}%> \n<% num++; %>\n<%var prrcent=(r.play_percent==\'0%\'?\'1%\':r.play_percent)%>\n- \n<%=r.title%> \n\n \n看到<%if (r.watchStage){%><%=r.watchStage%> \n<%}%><%=prrcent%>\n\n
\n<%}%>\n<% }); %> \n<% }); %> \n
\n<% if(num>0){%>\n\n<%}else{%>\n\n<%}%>'
, n = i.compile(t)({
data: e,
isLogin: a.isLogin()
});
this.find(".u-record .content").html(n)
},
renderMsg: function(t) {
var n = '\n<% if(data.length==0){%>\n- 您最近没有收到新的消息
\n<%}else{%>\n<% data.forEach(function(t, i){ %>\n- data-status=<%=t.status%> class="red"<%}%> >\n
\n- \n\n\n
\n- <%=t.fromuid.name%><%=t.content.ifo%>
\n- <%=sec(1e3*t.access_time)%>
\n
\n \n<% }); %>\n<%}%>\n
'
, a = i.compile(n)({
data: t,
sec: r.release
});
this.find(".u-notice").addClass("loaded").find(".content").html(a);
if (t.length)
this.find(".u-notice .panel").removeClass("no-msg");
else
this.find(".u-notice .panel").addClass("no-msg");
if (0 == e("#msg-allread").length && this.find("msg-list>li.red").length)
this.find(".u-notice .u-bottom a").before("全部标记已读");
this.model.trigger("message:show")
},
sloganFn: function() {
var t = '立即下载优酷mac客户端,看片免广告!';
if (n.mac)
e("#uerCenter .u-upload .dropdown .u-bottom").html(t)
},
showMsgLog: function() {
var t = e(".u-notice [data-status='0']")
, i = ""
, n = this;
if (!t.length)
return;
t.each(function(t, n) {
i += e(n).data("msgid") + ",";
e(n).attr("data-status", "1")
});
i = i.substr(0, i.length - 1);
n.sendMsgLog(1, i)
},
clickMsgLog: function(t) {
var i = e(t.currentTarget).parents("li")
, n = i.data("msgid");
if (i.attr("data-status") && "2" != i.attr("data-status")) {
i.attr("data-status", "2").removeClass("red");
this.sendMsgLog(2, n);
if (0 == this.$el.find(".msg-list>li.red").length)
this.readAllMsgLog()
}
},
readAllMsgLog: function() {
this.model.one("message:clear", this.initReadAllMsg.bind(this));
this.model.readAllMsg()
},
clearMsg: function() {
this.model.readAllMsg();
e("#qheader_notice_num").hide()
},
sendMsgLog: function(e, t) {
var i = "//msg.youku.com/api/push/updatemsgstatusbatch?" + CHUDA.API.getApiSignature(a.uid());
o.getRequest(i + "&msgid=" + t + "&status=" + e)
},
dropdown: function(t) {
var i = e(t.currentTarget)
, n = this;
if (i.hasClass("unload") || i.parent().hasClass("unload"))
return;
if (a.isLogin() || i.parents(".u-upload,.u-record").length) {
this.$panel.removeClass("dropdown-open");
i.addClass("dropdown-open")
}
if (i.parents(".u-notice").length && !i.parents(".u-notice").hasClass("loaded"))
this.model.getMsgList()
},
dropup: function(t) {
var i = e(t.currentTarget);
if (a.isLogin() || i.parents(".u-upload,.u-record").length)
e(t.currentTarget).removeClass("dropdown-open")
},
panelShow: function() {
clearTimeout(this.dropupHandle)
},
download: function(t) {
if (this.ikuDownloadIng)
return false;
var i = t.target || t.srcElement;
if (!i)
return false;
var n = e(i).data("url");
if (!n || this.ikuDownloadIng)
return false;
this.ikuDownloadIng = true;
var a = document.createElement("iframe");
a.width = 0;
a.height = 0;
a.src = n;
document.body.appendChild(a);
setTimeout(function() {
document.body.removeChild(a);
this.ikuDownloadIng = false
}, 2e3);
return false
}
})
});
i("page/find/header/nav", ["tui/event", "page/find/header/ucenter", "module/login/login", "tui/browser", "module/mobile/applink", "page/find/header/notice"], function(t, i, n, a, s, o) {
var r = t.extend({
initialize: function() {
var t = this;
var s = new i;
t.$nav = e("#topNav");
r.superClass.initialize.call(t);
n.one("checklogin", function() {
var e = new o({
id: "qnotice",
className: "notice-wrap"
})
});
e.getScript("//static.youku.com/v2.0.5/soku/giantstar/js/sk-box-open.js", function() {
XBox.init({
site: 14,
css: "//static.youku.com/v2.0.4/soku/giantstar/css/s_kubox.css"
});
var t = e("#qheader_search");
if (t) {
var i = t.find("button");
if (i)
e(i).bind("click", function() {
if ("object" == typeof ykQHeader)
ykQHeader.doSearch()
});
var n = navigator.userAgent.toLowerCase();
if ((n.match(/ipad/) || [])[0]) {
var a = e("#qheader .g-header-container");
e("#headq").focus(function() {
e("body,html").animate({
scrollTop: 0
}, 600);
a.css({
position: "absolute"
})
}).blur(function() {
a.css({
position: "fixed"
})
})
}
}
});
if (t.$nav.length) {
if (a.isPad) {
e("body").addClass("pad-view");
this.adPad()
}
this.fixnav()
}
try {
if (!a.mac)
if ("undefined" == typeof window.getP2PStateFromIku) {
var d = "";
if ("undefined" != typeof version)
d = version;
e.getScript("//js.ykimg.com/youku/dist/js/lib/ikuAdapterNew.js", function() {
window.getP2PStateFromIku("web_category")
})
} else
window.getP2PStateFromIku("web_category")
} catch (u) {}
},
adPad: function() {
e("#qheader").addClass("yk-has-adpad");
e("#topNav").after('')
},
responsedNav: function(t) {
if (!this.$nav.length)
return;
var i = e(".response-nav", this.$nav)
, n = e(".top-nav-main", this.$nav)
, a = e(".top-nav-more ul", this.$nav);
if (t)
n.append(i);
else
a.prepend(i)
},
fixnav: function() {
var t = e(window);
var i = e("#qheader");
var n;
var a = t.scrollTop();
t.bind("scroll", function() {
var s = t.scrollTop();
if (s > a && a > 150) {
i.addClass("hide-top-nav");
if (!n && e(".g-adpad").is(":visible"))
n = setTimeout(function() {
n = null;
e(".g-adpad").fadeOut()
}, 3e3)
} else if (s < a) {
i.removeClass("hide-top-nav");
if (s <= 300) {
clearTimeout(n);
n = null;
e(".g-adpad").fadeIn()
}
}
a = s
})
}
});
return r
});
i("module/commonEvent", [], function(t, i) {
var n = e(window)
, a = 0;
n.bind("resize", function() {
var t = n.width();
if (a == t)
return;
a = t;
e(document).trigger("cresize")
});
n.bind("scroll", function() {
e(document).trigger("cscroll")
})
});
i("module/responsive", ["tui/event"], function(t) {
var i = null;
var n = e(window);
var a = "responsed";
var s = "resize";
var o = null;
var r = t.extend({
initialize: function(e) {
var t = this;
r.superClass.initialize.call(t)
},
init: function(e) {
var t = this;
t.divide = e;
var i;
n.resize(function() {
i && clearTimeout(i);
i = setTimeout(function() {
t.check()
}, 100)
});
return t
},
check: function() {
var t = this;
var i = t.viewPort();
var n = i.width;
if (o && n >= o.s[0] && n < o.s[1]) {
t.fire(s, [n, i.height, o.v]);
return
}
o = t._getCurRes();
var r = e("body")[0];
r.className = r.className.replace(/((\s+w)|^w)\d+/g, "") + " w" + o.v;
t.fire(s, [n, i.height, o.v]);
t.fire(a, [o.v])
},
_getCurRes: function() {
var t = this;
var i = t.viewPort().width;
var n;
e.each(t.divide, function(e, t) {
var a = t.s[0];
var s = t.s[1];
if (i >= a && i < s) {
n = t;
return false
}
});
return n
},
getCurWidth: function() {
var e = this._getCurRes();
return e.v
},
viewPort: function() {
var e = window
, t = "inner";
var i = this.padding || 0;
if (!("innerWidth"in window)) {
t = "client";
e = document.documentElement || document.body
}
return {
width: e[t + "Width"] - i,
height: e[t + "Height"]
}
}
});
r.getInstance = function() {
if (i)
return i;
else
return i = new r
}
;
return r.getInstance()
});
i("module/responsivepad", ["tui/browser", "module/responsive"], function(e, t) {
return function(i) {
if (e.isPad)
t.init([{
s: [0, 1e10],
v: i || "1080"
}])
}
});
i("page/find/g", ["g", "module/responsive", "module/responsivepad", "module/commonEvent", "page/find/header/nav", "page/find/revision/header/nav", "page/find/footer/footer", "tui/lazyImageLoader", "module/stat/cmslog", "module/ad/ad", "module/rightSideBar/rightSidebar", "page/find/main/switchtab"], function(t, i, n, a, s, o, r, d, u, l, c, f, h, g) {
t.init();
u.init();
l.init();
r.init();
f();
g.init = function() {
var t;
if (window.pageIdNum && "27244" == window.pageIdNum || e("#qheader .g-nav-app-intro").length || e(".player-container #playerBox").length) {
var a = new o;
t = [{
s: [0, 1292],
v: "1058"
}, {
s: [1292, 1580],
v: "1202"
}, {
s: [1580, 1830],
v: "1490"
}, {
s: [1830, 1e10],
v: "1740"
}];
i.bind("responsed", function(e) {
var t = "1740" == e ? true : false;
a.responsedNav(t)
});
i.init(t).check();
n("1058");
e(".u-upload .up-cnt-2 a").removeClass("a-cnt")
} else {
var a = new s;
if (/\/v_show\//.test(location.href))
t = [{
s: [0, 1360],
v: "1080"
}, {
s: [1360, 1e10],
v: "1300"
}];
else
t = [{
s: [0, 1330],
v: "1080"
}, {
s: [1330, 1e10],
v: "1300"
}];
i.bind("responsed", function(e) {
var t = "1300" == e ? true : false;
a.responsedNav(t)
});
i.init(t).check();
n("1080")
}
d();
e("body").removeClass("on-loading")
}
});
t(["page/find/g"], function() {})
}(window.jQuery, window.oz.require, window.oz.define);
;