$(function () { if (typeof Swiper != 'undefined') { // function showItem(index) { // $('.banner .swiper-slide').find('.bannerSm-img img').removeClass('show'); // $('.banner .swiper-slide').eq(index).find('.bannerSm-img img').addClass('show'); // } var Bannerswiper = new Swiper('.banner .swiper-container', { centeredSlides: true, autoplay: true, autoplay: { delay: 6000, }, pagination: { el: '.banner .swiper-pagination', clickable: true, }, on: { slideChangeTransitionStart: function () { // var num=this.activeIndex; // showItem(num) }, }, // navigation: { // //nextEl: '.swiper-button-next', // // prevEl: '.swiper-button-prev', // el: '.swiper-pagination', // clickable: true, // }, }); var teamSwiper = new Swiper('.team-swiper .swiper-container', { slidesPerView: 7, navigation: { nextEl: '.team-swiper .swiper-button-next', prevEl: '.team-swiper .swiper-button-prev', }, breakpoints: { 991: { slidesPerView: 5, centeredSlides: false, }, 640: { slidesPerView: 3, centeredSlides: false, }, } }); var questionSwiper = new Swiper('.question-show .swiper-container', { autoplay: true, observer: true, observeParents: true, slidesPerView: 3, spaceBetween: 30, autoplay: { delay: 6000, }, pagination: { el: ' .question-show .swiper-pagination', clickable: true, }, breakpoints: { 991: { slidesPerView: 2, centeredSlides: false, }, 640: { slidesPerView: 1, centeredSlides: false, }, } }); var guestswiper = new Swiper('.guest-swiper .swiper-container', { slidesPerView: 1, speed: 1000, loop: true, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { el: '.guest-swiper .in-dot', nextEl: '.guest-swiper .swiper-next', prevEl: '.guest-swiper .swiper-prev', }, breakpoints: { 767: { slidesPerView: 2, spaceBetween: 30, }, 500: { slidesPerView: 1, } } }); var _honorsSw = new Swiper('.honors-sw-hook', { observer: true, observeParents: true, slidesPerView: 5, centeredSlides: true, loop: true, preventLinksPropagation: true, slidePrevClass: 'my-slide-left', slideNextClass: 'my-slide-right', spaceBetween: 25, navigation: { nextEl: '.honor-next', prevEl: '.honor-prev', }, pagination: { el: '.honors-sw-hook .swiper-pagination', clickable: true, }, breakpoints: { 991: { slidesPerView: 4, centeredSlides: false, }, 640: { slidesPerView: 2, centeredSlides: false, }, } }); //专家团队 var perswiper = new Swiper('.mobile-swiper', { paginationClickable: true, loop: true, speed: 1200, autoplay: { delay: 5000 }, pagination: { el: '.mobile-swiper .in-dot', clickable: true, }, autoplayDisableOnInteraction: false, simulateTouch: false, }); } var winW = $(window).width(); var winH = $(window).height(); //数字滚动 function numscroll(_this) { var Current = _this.offset().top; var bolExec = _this.attr("bolExec"); if ($(document).scrollTop() > Current - winH * 2 / 3 && bolExec == "false") { var line = _this; function Animate() { var a = 0, v = _this.attr("rel") - 0, _time = 100, vLen = (v + "").length; var t = setInterval(function () { a += 1; var pi = parseInt(v / 100 * a); var text = ""; for (var j = 0; j < vLen - (pi + "").length; j++) text += 0; _this.text(text + pi); if (a >= _time) clearInterval(t); }, 1); } Animate(); _this.attr("bolExec", true); } } if ($(".indexnum").length > 0) { $(".indexnum").each(function () { var _this = $(this); _this.attr("bolExec", false); numscroll(_this); }) $(window).scroll(function () { $(".indexnum").each(function () { var _this = $(this); numscroll(_this); }) }) } $('.choose .indexNews-nav').find('a').hover(function () { $(this).addClass('cur').siblings().removeClass('cur'); $('.choose-wrap').find('.choose-item').eq($(this).index()).show().siblings().hide(); }) judescreen(); $(window).resize(function() { judescreen(); }); function judescreen() { var winW = $(window).width(); var overscroll = window.innerWidth - document.body.clientWidth; //banner var winheight = $(window).height(); if (winW + overscroll > 1023) { //首页产品 $(".wqpexpert-info ul li:eq(0)").show(); $(".wqpexpert-person li").each(function (index) { $(this).hover(function () { $(this).addClass("cur").siblings().removeClass("cur"); $(".wqpexpert-info ul li").eq(index).show().siblings().hide(); }); if ($(window).width() < 1260) { $(this).off('hover').bind('click', function () { $(this).addClass("cur").siblings().removeClass("cur"); $(".wqpexpert-info ul li").eq(index).show().siblings().hide(); }) } }); } else { //首页产品 teamMove(); function teamMove() { if (typeof Swiper != 'undefined') { var wqpexpertswiper = new Swiper('.wqpexpert-info', { observer: true, observeParents: true, paginationClickable: true, loop: true, speed: 1200, autoplay: { delay: 5000 }, pagination: { el: '.wqpexpert-info .in-dot', paginationClickable:true, }, autoplayDisableOnInteraction: false, simulateTouch: false, }); } } } } function navClick() { if ($(window).width() > 1024) { $('.footer-nav dt').off('click'); $('.footer .footer-nav dl dd').show(); } else { $('.footer .footer-nav dl dd').hide(); $('.footer-nav dt').off('click').bind('click', function () { if($(this).parent().find('dd').is(':hidden')){ $(this).addClass('cur').parent().siblings().find('dt').removeClass('cur'); $(this).parent().siblings().find('dd').stop().slideUp(); $(this).parent().find('dd').stop().slideDown(); }else{ $(this).removeClass('cur'); $(this).parent().find('dd').stop().slideUp(); } }) } // 头部导航 $(window).scroll(function () { var scroll = $(window).scrollTop() if (scroll > 0) { $('.header').addClass('addbg'); } else { $('.header').removeClass('addbg'); } }) } navClick(); $(window).resize(function () { navClick(); }); $(".jobList li:eq(0)").addClass("cur"); $(".jobList li:eq(0)").find('.job-cont').show(); $(document).on("click", ".jobList li", function () { if ($(this).find('.job-cont').is(':hidden')) { $(this).addClass('cur').siblings().removeClass('cur'); $(this).find('.job-cont').stop().slideDown().end().siblings() .find('.job-cont').stop().slideUp(); } else { $(this).removeClass('cur'); $(this).find('.job-cont').stop().slideUp(); } }) if ($(window).width() > 1023) { var dd = $('.sub-navBar').find('dd'); dd.each(function () { if ($(this).parents('li').find('.nav-first').html() == '更多服务') { $(this).off('hover'); } $(this).hover(function () { if ($(this).find('.sm-navBar').length != 0) { $(this).find('.sm-navBar').show(); } }, function () { $(this).find('.sm-navBar').hide(); }) }) $('.sm-navBar').find('a').hover(function () { $(this).addClass('cur').siblings().removeClass('cur'); }) } $('.ser-imgShow').find('li').hover(function () { $(this).addClass('cur').siblings().removeClass('cur'); }) $('.news .indexNews-nav').find('a').hover(function () { $(this).addClass('cur').siblings().removeClass('cur'); $('.news-wrap').find('.indexnews-item').eq($(this).index()).show().siblings().hide(); }) var parH = $('.partner-list').find('li').outerHeight(true); var len = $('.partner-list').find('li').length; var allH = parseInt(len / 4 )* parH; var clickON = true; $('.part-more').click(function () { if (clickON) { $('.partner-list').animate({ height: allH }, 500); } else { $('.partner-list').animate({ height: parH }, 500); } clickON = !clickON; }) $('.expert-person').find('li').click(function () { $('.expert-info').find('.expert-item').eq($(this).index()).show().siblings().hide(); }) if ($(window).width() > 1023) { var navOffTop = 0; $(window).load(function () { if ($('.index-nav').length != 0) { // $('.header').css('position', 'absolute'); var indexNavHeight = parseInt($('.index-nav').offset().top); } navOffTop = indexNavHeight; }) if ($('.index-nav').length != 0) { $(window).scroll(function () { var scrollNav = $(window).scrollTop(); if (scrollNav > navOffTop) { $('.index-nav').addClass('fixed'); $('.header').hide(); } else { $('.index-nav').removeClass('fixed'); $('.header').show(); } }) } } $('.lanuage').bind('click', function (event) { $('.header .search-area1').fadeOut(); $('a.mobnav-btn').removeClass('g_close'); $('div.index-nav').removeClass('fixed'); //$('.nav').slideUp(); if ($('.lan-list').is(':hidden')) { $('.lan-list').stop().slideDown(); } else { $('.lan-list').stop().slideUp(); } event.stopPropagation(); }) if ($(window).width() < 1024) { $(document).bind('click', function () { $('.header .search-area1').fadeOut(); $('.lanuage .lan-list').fadeOut(); //$('.nav').slideUp(); }) } $('.header .search1, .header .search-text1, .header .search-button,.lanuage,.mobnav-btn').bind('click', function (event) { event.stopPropagation(); }) $('.search').bind('click', function (event) { $('.header .lanuage .lan-list').fadeOut(); $('.header .search-area1').fadeToggle(); $('div.index-nav').removeClass('fixed'); event.stopPropagation(); }) $('.nav-show').find('li').click(function () { $(this).addClass('cur').siblings().removeClass('cur'); var Index = $(this).index() + 1; var scrollTp = $('.index-' + Index).offset().top - 140; $('body,html').animate({ scrollTop: scrollTp }, 500); }) $(".rightfix .wechat").hover(function () { $(this).find(".qrcode").stop().show(300); }, function () { $(this).find(".qrcode").stop().hide(300); }); $(".rightfix .tel").hover(function () { $(this).find(".telcont").stop().show(300); }, function () { $(this).find(".telcont").stop().hide(300); }); $(".rightfix li").hover(function () { if ($(this).find(".right_qq_wrap").length > 0) { $(this).parent().find(".right_qq_wrap").stop().show(300); } }, function () { if ($(this).find(".right_qq_wrap").length > 0) { $(this).parent().find(".right_qq_wrap").stop().hide(300); } }); $(".backtop").click(function () { $("body,html").animate({ "scrollTop": 0 }, 500); }); $('.wechat').hover(function () { $(this).find('.weixin-img').show(); }, function () { $(this).find('.weixin-img').hide(); }) if ($(window).width() < 1025) { $('a.nav-first.hasSmnav').attr('href', 'javascript:;'); $('.sub-navBar dd.hasSmnav a').attr('href', 'javascript:;'); } var teamBtn = $('.team-swiper').find('.swiper-slide'); teamBtn.each(function () { $(this).click(function () { $('.pc-expert').find('.person-box').eq($(this).index()).show().siblings().hide(); }) }) function person(obj) { var $W = $(window).width(); if ($W < 1024) { var arrPerson = []; var aLi = $(obj).find('li'); // var aLi = $('.person-wrap').find('li'); aLi.each(function () { // arrPerson.push($(this).find('.person-info').outerHeight(true)); arrPerson.push($(this).outerHeight(true)); }) var maxHeight = Math.max.apply(null, arrPerson); arrPerson = []; aLi.each(function () { $(this).height(maxHeight); }) } } person('.person-wrap'); $(window).resize(function () { person('.person-wrap'); }); //function person1(obj) { // var $W = $(window).width(); // if ($W < 1024) { // var arrPerson = []; // var aLi = $(obj).find('li'); // // var aLi = $('.person-wrap').find('li'); // aLi.each(function () { // // arrPerson.push($(this).find('.person-info').outerHeight(true)); // arrPerson.push($(this).outerHeight(true)); // }) // var maxHeight = Math.max.apply(null, arrPerson); // aLi.each(function () { // $(this).height(maxHeight); // }) // } //} //$('.indexNews-nav a').eq(1).click(function () { // setTimeout(function () { // person1('.wqpexpert-info'); // },1000) //}) if ($(window).width() < 768) { $('.bus-proce .proce-list li').find('br').remove(); } })