$(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 = "
" + this.mytitle + "
"; $('body').append(tooltip); $('.tooltip').css({ "top": (e.pagey + 20) + "px", "left": (e.pagex - 20) + "px" }).show('fast'); } }).mouseout(function() { if (this.mytitle != null) { this.title = this.mytitle; $('.tooltip').remove(); } }).mousemove(function(e) { $('.tooltip').css({ "top": (e.pagey + 20) + "px", "left": (e.pagex - 20) + "px" }); }); }); } }; $(function() { sweettitles.init(); }); }); */ // function geturlparam(name) { // var reg = new regexp("(^|&)" + name + "=([^&]*)(&|$)"); // var r = window.location.search.substr(1).match(reg); // if (r != null) return unescape(r[2]); return null; // } // var reurl = geturlparam('reurl'); // var timestamp = date.parse(new date()); // if (timestamp > 1515126172000 && timestamp < 1586015999000 || reurl == 'ishang') { // var navstr = navigator.useragent.tolowercase(); // if (navstr.indexof("msie 10.0") !== -1 || navstr.indexof("rv:11.0") !== -1) { // grayscale(document.body); // grayscale(document.getelementsbytagname("img")); // } // $("html").addclass("site-gray"); // $("body").css({ 'background': '#e2e2e2' }); // } //友情链接 $(function () { $(".friendlink-top ul li").hover(function () { $(this).addclass('active'); $(".friendlink-box div").eq($(this).index()).show(); }, function () { $(this).removeclass('active'); $(".friendlink-box div").eq($(this).index()).hide(); }); $(".linkbox").hover(function () { $(this).show(); }, function () { $(this).hide(); }); }); function opendialog(title, actionurl, querystr, windowwidth, windowheight, btnmaxmin, params) { if (querystr === undefined || querystr === "" || querystr === null) { querystr = ""; } else { actionurl = actionurl + "?" + querystr; } if (params) { actionurl = actionurl + $.param(params); } if (windowwidth === undefined || windowwidth === "") { windowwidth = '500px'; } if (windowheight === undefined || windowheight === "") { windowheight = '450px'; } if (btnmaxmin === undefined || btnmaxmin === "") { btnmaxmin = true; } layer.open({ type: 2, title: title, area: [windowwidth, windowheight], fixed: false, //不固定 maxmin: btnmaxmin, content: actionurl }); return false; }