function tan(a) { $(".cai0").hide(); $("#tan" + a).show(); } function tanf(a) { $(".cai0").hide(); $("#tan" + a).show(); } function set1(a, b) { var bb2 = document.getElementsByClassName("bb2")[0], newScript = document.createElement('script'), str; $(".bb0").show(); $(".bg0").show(); newScript.type = 'text/javascript'; newScript.src = a; bb2.appendChild(newScript); str = '

' + b + '

'; $(".bb3").html(str); } $(".xd102 ul li").mouseover(function() { //$(this).children('.xxxd2').show(); var oo = $(this).offset().top + $(this).height() - $("#aaaaa").offset().top; $('.xxxd2').css({ 'top': oo }); }); var height1 = $(window).height(); var width1 = $(window).width(); if (width1 > 900) { $ggd = $("#swiper-one ul li.active").index(); $ggd1 = $("#swiper-one ul li").width(); $gg3 = $ggd * $ggd1; if ($ggd < 3) { $(".trdss").css('padding-left', $gg3); } else { $(".trdss").css('padding-left', '100px'); } } $("#goTop,.scrolltop,#goTop1,.overview_backtop").click(function() { $('body,html').animate({ scrollTop: 0 }, 1000); return false; }); $(window).scroll(function() { if ($(window).scrollTop() > 50) { $("#goTop1").fadeIn(200); } else { $("#goTop1").fadeOut(200); } }); $(function() { var lko = $("#xing1 li").length; var yff = (100 - 0.2 * (lko - 1)) / lko; $("#xing1 li").css('width', yff + '%'); if ($('.swiper-container9 .swiper-slide').length > 1) { var swiper9 = new Swiper('.swiper-container9', { loop: true, lazy: { loadPrevNext: true }, autoHeight: true, autoplay: { delay: 2500, }, pagination: { el: '.swiper-pagination9', clickable: true, }, navigation: { nextEl: '.swiper-button-next9', prevEl: '.swiper-button-prev9', }, on: { init: function() { this.update(); // 鏇存柊 Swiper } } }); } else { $(".swiper-pagination9").hide(); } if ($('.swiper-container91 .swiper-slide').length > 1) { var swiper91 = new Swiper('.swiper-container91', { loop: true, lazy: { loadPrevNext: true }, autoHeight: true, autoplay: { delay: 2500, }, pagination: { el: '.swiper-pagination91', clickable: true, }, navigation: { nextEl: '.swiper-button-next91', prevEl: '.swiper-button-prev91', }, on: { init: function() { this.update(); // 鏇存柊 Swiper } } }); } // 澶勭悊picture绗竴甯у浘鐗囧鑷磗wiper楂樺害鑾峰彇涓嶅埌闂 var pictureElement = $('.swiper-container91 picture img'); if (pictureElement != null && pictureElement != '' && pictureElement != undefined) { $(pictureElement).on('load', function() { swiper91.update(); // 鍥剧墖鍔犺浇瀹屾垚鍚庢洿鏂 Swiper }); } var pictureElement_2 = $('.swiper-container9 picture img'); if (pictureElement_2 != null && pictureElement_2 != '' && pictureElement_2 != undefined) { $(pictureElement_2).on('load', function() { swiper9.update(); // 鍥剧墖鍔犺浇瀹屾垚鍚庢洿鏂 Swiper }); } // $("#nav1").click(function() { // if ($("#nav11").css('display') == 'block') { // $("#nav11").slideUp(1000); // // $('.nav2').hide(); // $(".nav2").removeAttr("style"); // } else { // $("#nav11").slideDown(1000); // $("#nav21").hide(); // $('.nav2').hide(); // } // }); $(".part3 ul li h2").click(function() { if ($(this).siblings().css('display') == 'block') { $(this).siblings().slideUp(); } else { $(this).siblings().slideDown(); $(this).parent().siblings().find('dl').hide(); } }); // $("#nav2").click(function() { // if ($("#nav21").css('display') == 'block') { // $("#nav21").slideUp(1000); // // $('.nav2').hide(); // $(".nav2").removeAttr("style"); // } else { // $("#nav21").slideDown(1000); // $("#nav11").hide(); // $('.nav2').hide(); // } // }); $(".sli").click(function() { if ($(this).hasClass('on')) { $(this).removeClass('on'); } else { $(this).addClass('on'); $(this).siblings().removeClass('on'); } }); $(".selected4 h2 span").click(function() { if ($(this).hasClass('on')) { $(this).removeClass('on'); $(this).parent().siblings('.selectedBox5').show(); } else { $(this).addClass('on'); $(this).parent().siblings('.selectedBox5').hide(); } }); $(".xing1").click(function() { $("#xing1").show(); $("#selected").hide(); }); $(".xing2").click(function() { $("#xing1").hide(); $("#selected").show(); }); $(".head52").click(function() { for(let i=0; i<$(".new_head_sp_menu img").length; i++) { $('.new_head_sp_menu img').eq(i).attr('src', $('.new_head_sp_menu img').eq(i).data('src')); } $("#tan0").show(); }); // 闅愯棌鎼滅储鏀惧ぇ闀 $("#MF_form_phrase").focus(function() { $(this).addClass("getfocus").parents("div").siblings(".search_but").hide() }) $("#MF_form_phrase").blur(function() { if ($(this).val() == "") { $(this).parents("div").siblings(".search_but").show() } }); $(".cai1b").click(function() { $(".cai0").hide(); $(".bg0").hide(); $(".bb0").hide(); $(".bb2").html(''); }); $(".xing1").click(function() { $(".kai0").hide(); $("#kai1").show(); }); $(".xing2").click(function() { $(".kai0").hide(); $("#kai2").show(); }); $(".kai32").click(function() { $(".kai0").hide(); $(".listUl-new").css("height","auto"); }); $(".kai31").click(function() { $(".kai0").hide(); $(".listUl-new").css("height","100vh"); }); var height = $(window).height(); var width = $(window).width(); if (width < 900) { $(".kai28").css('height', height * 0.9); } if (width > 900) { /* var bbnb=$(".xc4").height(); $(".xc41").height(bbnb); */ /* var bbnb1=$(".xc3").height(); $(".xc31").height(bbnb1); */ } if (width < 900) { var bbnb = $(".xc41a1").height(); $(".xc411").height(bbnb); var bbnb2 = $(".xc41b1").height(); $(".xc412").height(bbnb2); } /*swiper婊戝姩*/ var swiper = new Swiper('#swiper-two', { loop: false, loopedSlides: 1, spaceBetween: 0, centeredSlides: false, slidesPerView: 4, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?000 1200: { slidesPerView: 3, }, 975: { slidesPerView: 2, }, 300: { slidesPerView: 2, } }, pagination: { el: '.swiper-pagination', clickable: true, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, }); /*swiper婊戝姩2*/ var swiperTwo = new Swiper('#swiper-one', { slidesPerView: 6, navigation: { nextEl: '.swiper-button-next16', prevEl: '.swiper-button-prev16', }, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?000 1000: { slidesPerView: 3, }, 400: { slidesPerView: 2, } } }); /*swiper婊戝姩3*/ var swiperTwo = new Swiper('#swiper-three', { slidesPerView: 9, navigation: { nextEl: '.swiper-button-next1', prevEl: '.swiper-button-prev1', }, breakpoints: { //褰撳搴﹀皬浜庣瓑浜?000 1400: { slidesPerView: 9, }, 1000: { slidesPerView: 3, }, 800: { slidesPerView: 3, }, 500: { slidesPerView: 3, } } }); $("#location-five").click(function() { $("#location-six").fadeToggle(500); }); $(".listLi-contrast>div").click(function() { if ($(this).hasClass("gds")) { $(this).removeClass("gds"); } else { $(this).addClass("gds"); } }) function isPhone(){ try { if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { return 'phone' } else if (/iPad/i.test(navigator.userAgent)) { return 'pc' } else { return 'pc' } } catch (e) {} } if ( isPhone() !== 'pc') { //var origin = document.location.origin; // 绉诲姩绔叆鍙e湴鍧€ var origin; if (!document.location.origin) { origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); } else { origin = document.location.origin; } var search_urls = origin + '/Public/search/#/search?pageType=official'; $('.search #MF_form_phrase').keydown(function(e) { // 鍏煎FF鍜孖E鍜孫pera var theEvent = e || window.event; var code = theEvent.keyCode || theEvent.which || theEvent.charCode; // 鍥炶溅 if (code == 13) { e.preventDefault(); // console.log('浣犺緭鍏ョ殑鍊兼槸: ', $(this).val()); if (!$(this).val()) {return;} window.location.href = search_urls + '&query=' + $(this).val(); } }); } })