(function(e) { e.fn.om_hdp = function(t) { function v() { u == e("li", s).length - 1 ? e("li:eq(0)", s).mouseover() : e("li", s).eq(u).next("li").mouseover() } var n = { delay: 0, time: 0, title: 0, type: 0 }, r = e.extend({}, n, t), s = e(this), o = "", u = 0, a = s.css("width"), f = s.css("height"); r.type == 0 && (l = e("img", s).length, e("img", s).css({ width: a, height: f, left: "0px", top: "0px", border: "none", display: "none", position: "absolute" })); if (r.type == 1) { e("img", s).css({ width: a, height: f, "float": "left", display: "block", border: "none" }), _content = s.html(), s.html("
" + _content + "
" + _content + "
"); var l = e("img", s).length / 2, c = parseint(a) * l, p = 0; e(".pic_scroll").css({ width: c * 2 + "px", height: f, position: "relative" }), e(".cont").css({ width: c + "px", height: f, "float": "left" }) } if (r.type == 2) { e("img", s).css({ width: a, height: f, display: "block", border: "none" }), _content = s.html(), s.html("
" + _content + "
" + _content + "
"); var l = e("img", s).length / 2, d = parseint(f) * l, p = 0; e(".pic_scroll").css({ width: a, height: d * 2 + "px", position: "relative" }), e(".cont").css({ width: a, height: d + "px" }) } s.append(""); for (i = 1; i < l + 1; i++) o += "
  • " + i + "
  • "; e("ul", s).html(o), e("ul", s).css({ position: "absolute", padding: "6px 5px 5px 5px", margin: "0px", bottom: "12px", right: "0", "z-index": 999 }), e("li", s).css({ "float": "left", liststyletype: "none", color: "#fff", display: "inline", textalign: "center", width: "7px", height: "7px", margintop: "0px", marginright: "3px", marginbottom: "0px", marginleft: "3px", lineheight: "7px", backgroundcolor: "#b60202", cursor: "pointer", borderradius:"50%", fontsize:"0" }), r.title == 1 && (s.append("
    "), s.append("
    "), e(".hdp_bg").css({ position: "absolute", width: 80+ "px", height: "20px", bottom: "0px", right: "0px", backgroundcolor: "none", opacity: .5, borderradius:"10px 0 0 10px", "z-index": 50 }), e(".hdp_title").css({ position: "absolute", width: parseint(s.css("width")) - e("ul", s).width() - 80 + "px", height: "30px", bottom: "0px", left: "0px", lineheight: "30px", paddingleft: "20px", overflow: "hidden", color: "#fcd998", "z-index": 50 })), e("li", s).live("mouseover", function() { u = e("li", s).index(this), a_curr = e(".con0").find("a").eq(u), r.type == 0 && (a_curr = e("a", s).eq(u), e("img", s).is(":animated") && e("img", s).stop(), a_curr.find("img").fadein(r.delay), a_curr.siblings("a").find("img").fadeout(r.delay)), r.type == 1 && (e(".pic_scroll").is(":animated") && (abs(parseint(e(".pic_scroll").css("left")) % parseint(a)) >= parseint(a) / 2 ? e(".pic_scroll").animate({ left: "-=" + parseint(a) - abs(parseint(e(".pic_scroll").css("left")) % parseint(a)) }, r.delay) : e(".pic_scroll").animate({ left: "-=" + parseint(a) + abs(parseint(e(".pic_scroll").css("left")) % parseint(a)) }, r.delay), e(".pic_scroll").stop()), e(".pic_scroll").css("left") == "-" + c + "px" && e(".pic_scroll").css("left", "0px"), e(".pic_scroll").animate({ left: "-=" + parseint(a) * (u - p) }, r.delay), p = u), r.type == 2 && (e(".pic_scroll").is(":animated") && (abs(parseint(e(".pic_scroll").css("top")) % parseint(f)) >= parseint(f) / 2 ? e(".pic_scroll").animate({ top: "-=" + parseint(f) - abs(parseint(e(".pic_scroll").css("top")) % parseint(f)) }, r.delay) : e(".pic_scroll").animate({ top: "-=" + parseint(f) + abs(parseint(e(".pic_scroll").css("top")) % parseint(f)) }, r.delay), e(".pic_scroll").stop()), e(".pic_scroll").css("top") == "-" + d + "px" && e(".pic_scroll").css("top", "0px"), e(".pic_scroll").animate({ top: "-=" + parseint(f) * (u - p) }, r.delay), p = u), e(this).addclass("icon_hover").css({ color: "#fb7600", backgroundcolor: "#fff", fontweight: "bold" }).siblings().removeclass("icon_hover").css({ color: "#fff", backgroundcolor: "#b60202", fontweight: "bold" }), r.title == 1 && (atitle = a_curr.attr("title") == "undefined" ? "": a_curr.attr("title"), e(".hdp_title").text(atitle)), clearinterval(h), h = setinterval(v, r.time) }), e("img", s).hover(function() { clearinterval(h) }, function() { h = setinterval(v, r.time) }), h = setinterval(v, r.time), e("li:eq(0)", s).mouseover() } })(jquery)