(function ($) { $("div[data-scro='controler'] b,div[data-scro='controler2'] a").mouseover(function () { var t = $(this); if (t.attr("class") == "down") return false; j2rolling_animation.st({ findobject: t, main: t.parent().parent().find("div[data-scro='list']"), pagsource: t.parent().parent().find("div[data-scro='controler'] b"), classname: "down", duration: "slow", on: $(this)[0].tagname == "a" ? true : false }); return false; }); var j2settime = "", j2time = true, j2rolling_animation = { init: function () { this.start(); this.time(); }, st: function (o) { if (j2time) { this.animate(o.findobject, o.main, o.classname, o.duration, o.pagsource, o.on); j2time = false; } }, animate: function (t, m, c, s, p, o) { var _prevdown = o ? p.parent().find("*[class='" + c + "']") : t.parent().find(t[0].tagname + "[class='" + c + "']"), _previndex = _prevdown.index(), _thisindex = o ? (t.attr("class") == "next" ? _previndex + 1 : _previndex - 1) : t.index(), _list = m.find(".item"), p2n = 1; _prevdown.removeclass(c); if (o) { if (_thisindex == -1) _thisindex = _list.size() - 1; if (_thisindex == _list.size()) _thisindex = 0; p.eq(_thisindex).addclass(c); } else { t.addclass(c); } if (t.attr("class") == "prev" || _thisindex < _previndex) p2n = false; if ((t.attr("class") == "next" || _thisindex > _previndex) && t.attr("class") != "prev") p2n = true; !p2n ? _list.eq(_thisindex).css("left", -m.width()) : ''; _list.eq(_previndex).animate({ left: p2n ? -m.width() : m.width() }, s, function () { $(this).removeattr("style"); j2time = true; }); _list.eq(_thisindex).animate({ left: "0px" }, s); }, start: function () { $("#imgnews div[data-scro='controler'] b,#imgnews div[data-scro='controler2'] a").mouseover(function () { window.clearinterval(j2settime); }).mouseout(function () { j2rolling_animation.time(); }); }, time: function () { j2settime = window.setinterval(function () { var num = $("#imgnews div[data-scro='controler'] b[class='down']").index(), _list = $("#imgnews div[data-scro='list'] li"); _list.eq(num).animate({left:-$("#imgnews div[data-scro='list'] ul li:first").width()},"fast", function () { $(this).removeattr("style"); $("#imgnews div[data-scro='controler'] b").removeclass("down").eq(num).addclass("down"); }); num++; if (num == _list.size()) { num = 0; } _list.eq(num).animate({left:"0px"},"fast"); }, 5000); } }; $("a").click(function () { $(this).blur(); }); j2rolling_animation.init(); })(this.jquery); var dh = $(document).height(); var wh = $(window).height(); if (dh > wh) { $('.footer').css({ 'position': 'static' }) } else { $('.footer').css({ 'position': 'absolute' }) } $(".els-login-tab>ul>li>a").click(function () { var ind = $(this).parent("li").index(); $(this).addclass("active").parent("li").siblings("li").find("a").removeclass("active"); $(this).parents(".els-login-inputarea").find(".infoload").eq(ind).show().siblings(".infoload").hide(); }) $('.els-filedown-con li a').hover(function () { $(this).children('span').css('background-color', '#46b0ca'); $(this).children('span.els-filedown-name').css('background-color', '#fff'); }, function () { $(this).children('span').css('background-color', '#fff'); $(this).children('span.els-filedown-name').css('background-color', '#f1f1f1'); })