/* * @Author: hanke * @Date: 2018-12-17 11:38:18 * @Last Modified by: hanke * @Last Modified time: 2018-12-28 22:11:47 */ // 检测浏览器版本 不低于ie7 // 用户行为 var _vaq = _vaq || []; _vaq.push(["setCookieDomain", ".mysite.cn"]); _vaq.push(['setPingTime', 3000]); _vaq.push(['enableHeat']); _vaq.push(['trackPageView']); (function () { _vaq.push(['setSiteId', 5054]); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.type = 'text/javascript'; g.defer = true; g.async = true; g.src = 'http://rizhi.capcloud.com.cn/vas.js'; s.parentNode.insertBefore(g, s); })(); $(function () { if (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE", "")) < 8) { alert("您的浏览器版本过低,为了更好视觉效果,请下载IE8以上版本"); } }); // 首页时间显示 getTime(); function getTime() { var dateObj = new Date(); var year = dateObj.getFullYear(); //年 var month = dateObj.getMonth() + 1; //月 (注意:月份+1) var date = dateObj.getDate(); //日 var day = dateObj.getDay(); var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; var week = weeks[day]; //根据day值,获取星期数组中的星期数。 var hours = dateObj.getHours(); //小时 var minutes = dateObj.getMinutes(); //分钟 var seconds = dateObj.getSeconds(); //秒 if (month < 10) { month = "0" + month; } if (date < 10) { date = "0" + date; } if (hours < 10) { hours = "0" + hours; } if (minutes < 10) { minutes = "0" + minutes; } if (seconds < 10) { seconds = "0" + seconds; } var newDate = year + "年" + month + "月" + date + "日" + "   " + week; document.getElementById("date1").innerHTML = newDate; //在div中写入时间 //每隔500ms执行一次getTime() } setInterval('getTime()', 1000); // 导航 $(function () { $('.menus0 li').each(function () { if ($(this).find("a")[0].innerText == $.trim($(".light")[0].innerText)) { console.log(123) var ind = $(this).index(); var index = ind; $('.menus0 .bg').show(); $('.menus0 .bg').css('left', (index - 1) * 12.5 + '%'); $('.menus0 li').mouseenter(function () { index = $(this).index(); $('.menus0 .bg').css('left', (index - 1) * 12.5 + '%'); }); $('.menus0 li').mouseleave(function () { $('.menus0 .bg').show(); $('.menus0 .bg').css('left', (ind - 1) * 12.5 + '%'); }); // console.log(1); } }); }); // 左侧高亮 $(function () { $(".overview-left > ul li").each(function () { if ($(this).find("a")[0].innerText == $.trim($(".gaoliang").text())) { $(this).addClass("on"); } }); }); // 导航 // 导航栏定位 $(function () { $(window).scroll(function () { var intElemScrollTop = $(this).scrollTop(); if (intElemScrollTop >= 285) { $('#nav').addClass('fixd'); } else { $("#nav").removeClass('fixd'); } }); }); // 加入收藏 == 设为首页 function SetHome(obj, vrl) { try { obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl); } catch (e) { if (window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (e) { alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。"); } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage', vrl); } else { alert("您的浏览器不支持,请按照下面步骤操作:1.打开浏览器设置。2.点击设置网页。3.输入:" + vrl + "点击确定。"); } } } // 加入收藏 兼容360和IE6 function shoucang(sTitle, sURL) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("请使用Ctrl+D进行添加"); } } } // 导航栏定位 $(function () { $(window).scroll(function () { var intElemScrollTop = $(this).scrollTop(); if (intElemScrollTop >= 285) { $('#nav').addClass('fixd'); } else { $("#nav").removeClass('fixd'); } }); }); // 进度条 $(function () { $.QianLoad = { PageLoading: function (options) { var defaults = { delayTime: 500, sleep: 0, css: '' }; options = $.extend(defaults, options); $('head').append(defaults.css); var _LoadingHtml = '
' + '' + '
'; $("body").append(_LoadingHtml); document.onreadystatechange = PageLoaded; function PageLoaded() { var loadingMask = $('#pre-load'); $({ property: 0 }).animate({ property: 98 }, { duration: 1000, step: function () { var percentage = Math.round(this.property); loadingMask.css('width', percentage + "%"); if (document.readyState == "complete") { loadingMask.css('width', 100 + "%"); setTimeout(function () { loadingMask.animate({ "opacity": 0 }, options.delayTime, function () { $(this).remove(); }); }, options.sleep); } } }); } } }; //调用 $.QianLoad.PageLoading({ sleep: 1000 }); }); //底部波浪 // $(function () { // var marqueeScroll = function (id1, id2, id3, timer) { // var $parent = $("#" + id1); // var $goal = $("#" + id2); // var $closegoal = $("#" + id3); // $closegoal.html($goal.html()); // function Marquee() { // if (parseInt($parent.scrollLeft()) - $closegoal.width() >= 0) { // $parent.scrollLeft(parseInt($parent.scrollLeft()) - $goal.width()); // } else { // $parent.scrollLeft($parent.scrollLeft() + 1); // } // } // setInterval(Marquee, timer); // } // var marqueeScroll1 = new marqueeScroll("marquee-box", "wave-list-box1", "wave-list-box2", 20); // var marqueeScroll2 = new marqueeScroll("marquee-box3", "wave-list-box4", "wave-list-box5", 40); // }); // 概览页分割 $(function () { var liNum = $('.public_list_team >ul li').length; for (var i = 0; i < liNum; i++) { if (i % 5 == 4) { $('.public_list_team >ul li').eq(i).css({ borderBottom: 'dashed 1px #999', paddingBottom: '10px', marginBottom: '10px', backgroundPositionY: '14px' }); } } }); $(function () { var txt = $(".list").html(); if (txt != "") { $(".news").css("display", "block"); } var fujiantxt = $(".fujiantxt").html(); if (fujiantxt != "") { $(".fujian").css("display", "block"); } $(".size span").each(function (i) { $(this).hover(function () { $(this).parent().find(".tips").addClass("hover"); $(this).parent().addClass("lihover"); }, function () { $(this).parent().find(".tips").removeClass("hover"); $(this).parent().removeClass("lihover"); }); }); }); //文字大小更改 function changeSize(size) { document.getElementById('div_zhengwen').style.fontSize = size + 'px'; } // 轮播 jQuery(".whTopSlide").slide({ mainCell: ".bd ul", effect: "leftLoop", trigger: "click", delayTime: 1000, autoPlay: true }); jQuery(".picScroll-left").slide({ mainCell: ".bd ul", effect: "leftLoop", autoPlay: true, vis: 3, delayTime: 700, trigger: "click" }); jQuery(".slideTxtBox").slide({ titCell: ".tab-title span", effect: "fade", trigger: "click" }); // // 左侧高亮 // $(function () { // $(".overview-left > ul > li").each(function () { // if ($(this).find("a")[0].innerText == $(".overview-right >h3 > span")[0].innerText) { // $(this).addClass("on"); // }else { // return true; // } // }); // }); $('.overview-left ul').on('click', 'li', function () { $(this).children('.sub-list').slideToggle(500); }) // 高亮 $(function () { var H = $(".overview").height(); $('.overview-left').css("min-height", H + "px"); }); // if($("#ldactive > li").length == 0 ){ // $(".tab-title").hide(); // }