$(function () { /*头部搜索滑倒对应位置展开*/ $("#header .search-t .menst").mouseover(function () { $("#header form").stop().slidedown(); }).mouseleave(function () { $("#header form").stop().slideup(); }); /*新闻月份转换*/ setmonthword(".month"); /*导航hover展开子菜单*/ $("#header .nav-li").hover(function () { $(this).find(".nav_down").stop().slidedown(300); }, function () { $(this).find(".nav_down").stop().slideup(300); }); }) //处理月份短 function setmonthword(obj) { jquery(obj).each(function () { if (jquery(this).text() == "01" || jquery(this).text() == "1") jquery(this).text("jan"); else if (jquery(this).text() == "02" || jquery(this).text() == "2") jquery(this).text("feb"); else if (jquery(this).text() == "03" || jquery(this).text() == "3") jquery(this).text("mar"); else if (jquery(this).text() == "04" || jquery(this).text() == "4") jquery(this).text("apr"); else if (jquery(this).text() == "05" || jquery(this).text() == "5") jquery(this).text("may"); else if (jquery(this).text() == "06" || jquery(this).text() == "6") jquery(this).text("jun"); else if (jquery(this).text() == "07" || jquery(this).text() == "7") jquery(this).text("jul"); else if (jquery(this).text() == "08" || jquery(this).text() == "8") jquery(this).text("aug"); else if (jquery(this).text() == "09" || jquery(this).text() == "9") jquery(this).text("sep"); else if (jquery(this).text() == "10") jquery(this).text("oct"); else if (jquery(this).text() == "11") jquery(this).text("nov"); else if (jquery(this).text() == "12") jquery(this).text("dec"); }); }