﻿$.include(['javascript/jquery.floatDiv.js']);
$(function() {
    var $notice = $("#notice li")
    var $noticeNav = $("#noticeNav li");
    $noticeNav.mouseover(function() {
        var i = parseInt($(this).text()) - 1;
        $notice.filter(".over").removeClass("over").end().eq(i).addClass("over");
        $noticeNav.filter(".over").removeClass("over").end().eq(i).addClass("over");
    });
    $noticeNav.eq(0).addClass("over")
    $notice.eq(0).addClass("over");
    var $pics = $("#pics");
    var funcPic = function() { $pics.append($pics.children(":first")) }
    var t = setInterval(funcPic, 2000)
    $pics.hover(function() { clearInterval(t) }, function() { t = setInterval(funcPic, 1000) });
    $("#divfloat").floatdiv({ right: "40px", top: "95px" });
    //新发布的文章加new.gif
    var month = (new Date()).getMonth() + 1 + "";
    if (month.length == 1) month = "0" + month;
    $("#main ul").each(function(i, o) {
        var $o;
        $o = $("li:first", o);
        if ($o.find("span").text().substring(0, 3) == "[" + month) $o.addClass("new");
        $o = $o.next();
        if ($o.find("span").text().substring(0, 3) == "[" + month) $o.addClass("new");
        $o = $o.next();
        if ($o.find("span").text().substring(0, 3) == "[" + month) $o.addClass("new");
    });
});

