// zizhi (function(e) { function u(u) { function c() { function h(e) { e.show(); n.removeclass("loading") } var t = e(this), r = parseint(n.css("borderleftwidth")), i = s - r * 2, u = o - r * 2, a = t.width(), f = t.height(); if (a == n.width() && a <= i && f == n.height() && f <= u) { h(t); return } if (a > i || f > u) { var l = u < f ? u : f, c = i < a ? i : a; if (l / f <= c / a) { t.width(a * l / f); t.height(l) } else { t.width(c); t.height(f * c / a) } } n.animate({ width: t.width(), height: t.height(), margintop: -(t.height() / 2) - r, marginleft: -(t.width() / 2) - r }, 200, function() { h(t) }) } if (u) u.preventdefault(); var a = e(this), f = a.attr("href"); img_title = a.attr("title"); if (!f) return; var l = e(new image).hide(); e("#zoom .previous, #zoom .next").show(); if (a.hasclass("zoom")) e("#zoom .previous, #zoom .next").hide(); if (!r) { r = true; t.show(); e("body").addclass("zoomed") } n.html(l).delay(500).addclass("loading"); l.load(c).attr("src", f); l.load(c).attr("title", img_title); l.load(function(){ $("#img_title").text(img_title); }); i = a } function a() { var t = i.parent("li").prev(); if (t.length == 0) t = e(".gallery li:last-child"); t.find("a").trigger("click") } function f() { var t = i.parent("li").next(); if (t.length == 0) t = e(".gallery li:first-child"); t.children("a").trigger("click") } function l(s) { if (s) s.preventdefault(); r = false; i = null; t.hide(); e("body").removeclass("zoomed"); n.empty() } function c() { s = e(window).width(); o = e(window).height() } e("body").append('
'); var t = e("#zoom").hide(), n = e("#zoom .content"), r = false, i = null, s = e(window).width(), o = e(window).height(); (function() { t.on("click", function(t) { t.preventdefault(); if (e(t.target).attr("id") == "zoom") l() }); e("#zoom .close").on("click", l); e("#zoom .previous").on("click", a); e("#zoom .next").on("click", f); e(document).keydown(function(e) { if (!i) return; if (e.which == 38 || e.which == 40) e.preventdefault(); if (e.which == 27) l(); if (e.which == 37 && !i.hasclass("zoom")) a(); if (e.which == 39 && !i.hasclass("zoom")) f() }); if (e(".gallery li a").length == 1) e(".gallery li a")[0].addclass("zoom"); e(".zoom, .gallery li a").on("click", u) })(); (function() { e(window).on("resize", c) })(); (function() { e(window).on("mousewheel dommousescroll", function(e) { if (!i) return; e.stoppropagation(); e.preventdefault(); e.cancelbubble = false }) })() })(jquery); (function(a) { a.fn.db_tabmotionbanner = function(b) { var c = { key: "", autorollingtime: 3000, bgspeed: 100, motion: "" }; a.extend(c, b); return this.each(function() { var h = a(this); var k = h.find(".db_imgset"); var r = h.find(".db_imgset li"); var i = h.find(".db_menuset"); var m = h.find(".db_menuset li"); var e = h.find(".banner_bg li"); var q = h.find(".db_next"); var g = h.find(".db_prev"); var f = r.length; var p = 0; var j = 0; s(); function s() { l(); d(); t(); o() } function l() { k.css({ position: "relative" }); r.css({ position: "absolute" }); for (var y = 0; y < f; y++) { if (y == p) { r.eq(y).show() } else { r.eq(y).hide() } } for (var y = 0; y < r.length; y++) { var x = r.eq(y).find("img"); for (var w = 0; w < x.length; w++) { var a = x.eq(w); var v = c.motion[a.attr("class")]; if (v != null) { var z = number(a.css("left").split("px")[0]); var b = number(a.css("top").split("px")[0]); a.data({ x2: z, y2: b, x1: z + v.left, y1: b + v.top, opacity: v.opacity, speed: v.speed, delay: v.delay == null ? 0 : v.delay }) } } } } function d() { h.bind("mouseenter", function() { clearinterval(j); q.show(); g.show() }); h.bind("mouseleave", function() { t(); q.hide(); g.hide() }); m.bind("click", function() { if (a(this).index() != p) { p = a(this).index(); o() } }); m.bind("mouseenter", function() { n(a(this).find("img"), "src", "_off", "_on") }); m.bind("mouseleave", function() { if (p != a(this).index()) { n(a(this).find("img"), "src", "_on", "_off") } }); q.bind("click", function() { u() }); g.bind("click", function() { p--; if (p == -1) { p = f - 1 } o() }) } function u() { p = ++p % f; o() } function t() { j = setinterval(u, c.autorollingtime) } function o() { for (var z = 0; z < r.length; z++) { var a = r.eq(z); var y = e.eq(z); if (p == z) { a.show(); var x = a.find("img"); for (var w = 0; w < x.length; w++) { var a = x.eq(w); var v = c.motion[a.attr("class")]; if (v != null) { if (a.attr("src").indexof(".png") > 0 && a.browser.msie && a.browser.version < 9) { a.css({ left: a.data("x1"), top: a.data("y1"), opacity: 1, display: "none" }) } else { a.css({ left: a.data("x1"), top: a.data("y1"), opacity: a.data("opacity") }) } a.stop().delay(a.data("delay")).queue(function() { a(this).css("display", "block"); a(this).dequeue() }).animate({ left: a.data("x2"), top: a.data("y2"), opacity: 1 }, a.data("speed")) } } n(m.eq(z).find("img"), "src", "_off", "_on"); m.eq(z).addclass("select"); y.stop(true, true).fadein(c.bgspeed) } else { a.hide(); n(m.eq(z).find("img"), "src", "_on", "_off"); m.eq(z).removeclass("select"); y.stop(true, true).fadeout(c.bgspeed) } } } function n(w, z, v, x) { var y = w.attr(z); if (string(y).search(v) != -1) { w.attr(z, y.replace(v, x)) } } }) } })(jquery);