$(function(){ // 导航 $(".m-nav li.nli").hover(function(){ $(this).find(".sub").show(); },function(){ $(this).find(".sub").hide(); }); $(".m-nav li.nki").hover(function(){ $(this).find(".sli").show(); },function(){ $(this).find(".sli").hide(); }); }); //设为首页 function sethome(url){ if (document.all) { document.body.style.behavior='url(#default#homepage)'; document.body.sethomepage(url); }else{ alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!"); } } //加入收藏 function addfavorite(surl, stitle) { surl = encodeuri(surl); try{ window.external.addfavorite(surl, stitle); }catch(e) { try{ window.sidebar.addpanel(stitle, surl, ""); }catch (e) { alert("加入收藏失败,请使用ctrl+d进行添加,或手动在浏览器里进行设置."); } } } //导航栏 /*$(function(){ $(".m-nav li").mouseover(function() { var i=$(this).index(); var l=28; if(i==2){ l=6; } for(var n=1; n<=i;n++){ l=l+$(".m-nav li").eq(n).width(); } $(".nav-box").animate({"background-position-x":l},300); }); $(".nav-box ul").mouseleave(function(){ $(".nav-box").animate({"background-position-x":"28px"},200); }) });*/ //title提示 /* jquery(document).ready(function($) { var sweettitles = { x: 10, y: 20, tipelements: "a", notitle: false, init: function() { var notitle = this.notitle; $(this.tipelements).each(function() { $(this).mouseover(function(e) { if (notitle) { istitle = true; } else { istitle = $.trim(this.title) != ''; } if (istitle) { this.mytitle = this.title; this.title = ""; var tooltip = "