//var ws=$(".rolls").width()/2;
$(function(){
/*鍏抽棴*/
$(".closes5").click(function(){$(".kf-right").hide();});
/*璐拱浜у搧浣撻獙棣嗗垏鎹?/
var tygroll = new Swiper('.md-innertyg .swiper-container', {
slidesPerView:1,
autoplayDisableOnInteraction: false,
autoplay: false,
loop: true
});
$(".tyg-bt .bt-l").click(function(){ tygroll.swipePrev();})
$(".tyg-bt .bt-r").click(function(){ tygroll.swipeNext();})
/*缁忛攢涓撳崠搴?/
if($(".spec-stores").size()>0&&$(window).width()>480){
$(".spec-stores").mCustomScrollbar({
mouseWheelPixels: 300,
theme: "minimal"
/* horizontalScroll:true,
advanced:{
autoExpandHorizontalScroll:true}
*/
});
}
/*棣栭〉鏂伴椈婊氬姩*/
var rollnews = new Swiper('#rollnews-1 .swiper-rollnews', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 'auto' : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$("#rollnews-1 .cbt-l").click(function(){ rollnews.swipePrev();})
$("#rollnews-1 .cbt-r").click(function(){ rollnews.swipeNext();})
var rollnews2 = new Swiper('#rollnews-2 .swiper-rollnews', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 'auto' : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$("#rollnews-2 .cbt-l").click(function(){ rollnews2.swipePrev();})
$("#rollnews-2 .cbt-r").click(function(){ rollnews2.swipeNext();})
var rollnews3 = new Swiper('#rollnews-3 .swiper-rollnews', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 'auto' : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$("#rollnews-3 .cbt-l").click(function(){ rollnews3.swipePrev();})
$("#rollnews-3 .cbt-r").click(function(){ rollnews3.swipeNext();})
$(".new-tabs a").hover(function(){
$(".new-tabs a").removeClass("active");
$(this).addClass("active");
$(".mod-news-18").removeClass("actives-shows");
$(".mod-news-18:eq("+$(this).index()+")").addClass("actives-shows");
});
/*棣栭〉浜у搧鍙充晶婊氬姩*/
var proadroll = new Swiper('.proad-roll .swiper-container', {
slidesPerView: 1,
autoplayDisableOnInteraction: false,
autoplay: 4000,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: true
//calculateHeight:true,
//paginationClickable: true
});
$(".proad-roll .cbt-l").click(function(){ proadroll.swipePrev();})
$(".proad-roll .cbt-r").click(function(){ proadroll.swipeNext();})
$(".wl-tab a").hover(function(){
$(".wl-tab a").removeClass("active");
$(this).addClass("active");
$(".wl-info").removeClass("wl-active");
$(".wl-info:eq("+$(this).index()+")").addClass("wl-active");
});
$(".kf-right ul li:last,.folds-1").click(function(){
$(".kf-right").toggleClass("kf2");
});
var hgroll = new Swiper('.swiper-roll-hg', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 3 : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: true
//calculateHeight:true,
//paginationClickable: true
});
$(".history-backwrap .vbt-l").click(function(){ hgroll.swipePrev();})
$(".history-backwrap .vbt-r").click(function(){ hgroll.swipeNext();})
/*鎵嬪唽*/
var qkroll = new Swiper('.qk-roll', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 2 : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$('.qk-bt-1').on('click', function(e){
e.preventDefault()
qkroll.swipePrev()
});
$('.qk-bt-2').on('click', function(e){
e.preventDefault()
qkroll.swipeNext()
});
$(".mod-serch-l").each(function(){
$(this).click(function(event){
event.stopPropagation();
$(this).find("ul").show();
});
$(this).find("li").click(function(event){
// event.stopPropagation();
$(this).parent().parent().find("span").text($(this).text());
$(this).parent("ul").hide();
// event.stopPropagation();
});
});
$(document).click(function(){$(".mod-serch-l ul").hide();});
/*鎵嬫満绔皟鎹綅缃?/
if($(window).width()<=480){
if($(".travel-r").size()>0)
{ $(".travel-r .item-5").html(); $(".travel-r").prepend("
"+$(".travel-r .item-5").html()+"
"); $(".travel-r .item-cell:last").remove(); }
}
$(".res-more").click(function(){$(this).toggleClass("res-more2"); });
$(".head-icons a.icon-shouye").click(function(){ $(".m-codes").toggle();});
$(".focus-us span").each(function(){
var mysthis=$(this)
$(this).click(function(){mysthis.siblings().find("cite").hide(); mysthis.find("cite").toggle()})
});
/*鑽h獕*/
var hornorroll = new Swiper('.hornor-roll-1', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 3 : 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$(".hor-roll .vbt-l").click(function(){ hornorroll.swipePrev();})
$(".hor-roll .vbt-r").click(function(){ hornorroll.swipeNext();})
/*澶т簨璁?/
var eventroll = new Swiper('.event-roll-1', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 5 : 2,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$('.year-bt1').on('click', function(e){
e.preventDefault()
eventroll.swipePrev();
if($(".event-roll-1 li").index($(".event-roll-1 li.active"))>0) $(".event-roll-1 li.active").removeClass("active").prev().addClass("active");
});
$('.year-bt2').on('click', function(e){
e.preventDefault()
eventroll.swipeNext();
console.log($(".event-roll-1 li").index($(".event-roll-1 li.active")));
console.log($(".event-roll-1 li").size()-1);
if($(".event-roll-1 li").index($(".event-roll-1 li.active"))<($(".event-roll-1 li").size()-1)) $(".event-roll-1 li.active").removeClass("active").next().addClass("active");
});
$(".event-roll-1 li").click(function(){
$(".event-roll-1 li").removeClass("active");
$(this).addClass("active");
});
$(".event-roll-1 li,.year-bt2,.year-bt1").click(function(){
console.log($('.event-roll-1 li').index($('.event-roll-1 li.active')));
$(".events-cnts .event-info").hide();
$(".events-cnts .event-info:eq("+$('.event-roll-1 li').index($('.event-roll-1 li.active'))+")").show();
});
/*鏅烘収浜虹墿婊氬姩*/
if($(window).width()<=480&&$(window).width()>=350){$(".single").css({left:-(730-$(".news-rolls").width())/2});
if($(".pre20").size()>0) $(".pre20").css({left:$(".single li.active").offset().left-30});
if($(".next20").size()>0) $(".next20").css({left:$(".single li.active").offset().left+330-45});
}
if($(window).width()<350){$(".single").css({left:-(710-$(".news-rolls").width())/2});
if($(".pre20").size()>0) $(".pre20").css({left:$(".single li.active").offset().left-35});
if($(".next20").size()>0) $(".next20").css({left:$(".single li.active").offset().left+300-35});
}
if($(window).width()>480){
var peosonerroll = new Swiper('.peosoner-roll', {
slidesPerView: 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.art-roll .swiper-pagination',
//onSlideChangeStart: function(swiper199){
//$(".nums cite").text(artroll.activeLoopIndex+1);
//},
loop: true
//calculateHeight:true,
//paginationClickable: true
});
$('.md-videosroll .vbt-l').on('click', function(e){
e.preventDefault()
peosonerroll.swipePrev()
});
$('.md-videosroll .vbt-r').on('click', function(e){
e.preventDefault()
peosonerroll.swipeNext()
});
}
/*鑹烘湳浣滃搧*/
var artroll = new Swiper('.art-roll', {
slidesPerView: 1,
autoplayDisableOnInteraction: false,
autoplay: 3000,
pagination: '.art-roll .swiper-pagination',
onSlideChangeStart: function(swiper199){
$(".nums cite").text(artroll.activeLoopIndex+1);
},
loop: true
//calculateHeight:true,
//paginationClickable: true
});
$('.btn-l0').on('click', function(e){
e.preventDefault()
artroll.swipePrev()
});
$('.btn-r0').on('click', function(e){
e.preventDefault()
artroll.swipeNext()
});
/*浜у搧鏈€缁堝鑸?/
var navroll = new Swiper('.swiper-roll-navs', {
slidesPerView: 'auto',
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false
//calculateHeight:true,
//paginationClickable: true
});
$(".pro-bt-l").click(function(){
navroll.swipePrev();
});
$(".pro-bt-r").click(function(){
navroll.swipeNext();
});
if($('.swiper-roll-navs').size()>0){navroll.swipeTo($(".swiper-roll-navs li").index($(".swiper-roll-navs li.cr")),0);}
/*婊氬姩鑱氱劍*/
if($(".top-menucur ul").size()>0) $(".top-menucur ul").scrollLeft($(".top-menucur .cr").offset().left-10);
/*浜у搧鏈€缁堝垏鎹?/
var proroll = new Swiper('.pro-roll-1', {
slidesPerView: 1,
autoplayDisableOnInteraction: false,
autoplay: false,
//pagination: '.swiper-roll-1 .swiper-pagination',
loop: false,
onSlideChangeEnd: function(proroll){
$(".produ-tab li").removeClass("cr");
$(".produ-tab li:eq("+proroll.activeIndex+")").addClass("cr");
}
//calculateHeight:true,
//paginationClickable: true
});
$(".pbtn-l").click(function(){
proroll.swipePrev();
});
$(".pbtn-r").click(function(){
proroll.swipeNext();
});
$(".produ-tab li").click(function(){
$(".produ-tab li").removeClass("cr");
$(this).addClass("cr");
proroll.swipeTo($(".produ-tab li").index($(".produ-tab li.cr")));
});
/*婊戣繃鍑虹幇浜岀淮鐮?/
$("#mycode1,#code1").hover(function(event){
event.stopPropagation();
var sthis=$(this);
$("#mycode1").addClass("moveEvent");
setTimeout(function(){
if($("#mycode1").hasClass("moveEvent")){
$("#mycode1").addClass("hovers");
$("#code1").show();
}
},200);
},function(event){
event.stopPropagation();
var sthis=$(this);
$("#mycode1").removeClass("moveEvent");
setTimeout(function(){
if(!$("#mycode1").hasClass("moveEvent")){
$("#mycode1").removeClass("hovers");
$("#code1").hide();
}
},200);
//setTimeout(function(){},1000);
});
var swiper1 = new Swiper('.swiper-roll-1', {
slidesPerView: 1,
autoplayDisableOnInteraction: false,
autoplay: 3000,
pagination: '.swiper-roll-1 .swiper-pagination',
loop: true,
calculateHeight:true,
paginationClickable: true
});
$(".btn-l").click(function(){
swiper1.swipePrev();
});
$(".btn-r").click(function(){
swiper1.swipeNext();
});
/*鏂伴椈鍒囨崲*/
$(".com-tit span").hover(function(){
$(".com-tit span").removeClass("active");
$(this).addClass("active");
$(".mod-news-1").hide();
$(".mod-news-1:eq("+$(this).index()+")").show();
$(".com-tit a").hide();
$(".com-tit a:eq("+$(this).index()+")").show();
});
/*棣栭〉浜у搧鍒囨崲*/
$(".pro-tabs li").hover(function(){
$(".pro-tabs li").removeClass("active");
$(this).addClass("active");
$(".newproinfo").hide();
$(".newproinfo:eq("+$(this).index()+")").show();
$(".md-pro-cell").removeClass("active");
$(".md-pro-cell:eq("+$(this).index()+")").addClass("active");
});
/*浜у搧妯悜婊氬姩鏉?/
if($(".rem-proinner").size()>0&&$(window).width()>480) {
$(".rem-proinner").mCustomScrollbar({
horizontalScroll:true,
advanced:{
autoExpandHorizontalScroll:true
}
});
}
if($(window).width()>480) {
$("#map1,#mdata1").hover(function(event){
event.stopPropagation();
var sthis=$(this);
$("#map1").addClass("moveEvent");
setTimeout(function(){
if($("#map1").hasClass("moveEvent")){
$("#map1").addClass("hovers");
$("#mdata1,#pic1").show();
}
},200);
},function(event){
event.stopPropagation();
var sthis=$(this);
$("#map1").removeClass("moveEvent");
setTimeout(function(){
if(!$("#map1").hasClass("moveEvent")){
$("#map1").removeClass("hovers");
$("#mdata1,#pic1").hide();
}
},200);
//setTimeout(function(){},1000);
});
$("#map2,#mdata2").hover(function(event){
event.stopPropagation();
var sthis=$(this);
$("#map2").addClass("moveEvent");
setTimeout(function(){
if($("#map2").hasClass("moveEvent")){
$("#map2").addClass("hovers");
$("#mdata2,#pic2").show();
}
},200);
},function(event){
event.stopPropagation();
var sthis=$(this);
$("#map2").removeClass("moveEvent");
setTimeout(function(){
if(!$("#map2").hasClass("moveEvent")){
$("#map2").removeClass("hovers");
$("#mdata2,#pic2").hide();
}
},200);
//setTimeout(function(){},1000);
});
}
if($(window).width()<480) {
$("#map1").click(function(event){
event.stopPropagation();
$("#mdata1,#pic1").show();
$("#mdata2,#pic2").hide();
});
$("#img2").click(function(event){
event.stopPropagation();
$("#mdata2,#pic2").show();
$("#mdata1,#pic1").hide();
});
}
/*楂樼骇鎼滅储*/
$(".adv-search").click(function(){
$(this).toggleClass("adv-cr");
$(".searchkey-words").toggle();
});
//$(".changeBox_a1").height($(window).width()*862/1920);
//
//$(window).resize(function(){
//$(".changeBox_a1").height($(window).width()*862/1920);
//
//});
//
//
//$('.changeBox_a1 .a_bigImg').soChange({
// thumbObj: '.ul_change_a2 li',
// //瀵艰埅涓烘暟瀛楀舰寮忥紝閫夋嫨鍣ㄦ寚鍚戝寘鍚暟瀛楃殑span瀵硅薄
// thumbNowClass: 'on',
// //鑷畾涔夊鑸璞″綋鍓峜lass涓簅n
// changeTime: 4000,
// overStop:false,
// callback:function(){
//
// }
// //鑷畾涔夊垏鎹㈡椂闂翠负4000ms 涓
// //botPrev:'#btnL', // 鎸夐挳锛屼笂涓€涓
// // botNext:'#btnR' // 鎸夐挳锛屼笅涓€涓
//});
//
/*鎼滅储妗?/
$(".t-search").click(function(){
$(".in-search").slideToggle();
});
$(".in-search em").click(function(){
$(".in-search").slideToggle();
});
/*瀵艰埅*/
var navH = new Array();
$(".navMenu>li").each(function (i) {
navH[i] = $(this).find(".sub-menus").height();
});
$(".sub-menus").css({
"height": 0
});
$(".navMenu>li").hover(function () {
//$(this).find(".sub-menus").slideDown();
$(this).find(".sub-menus").height(navH[$(this).index()]);
}, function () {
$(this).find(".sub-menus").height(0); //$(this).find(".sub-menus").slideUp();
});
/*$(window).scroll(function(){
if($(window).scrollTop()>0){
$(".mod-headers").addClass("mod-cr");
$(".mod-news").addClass("wow fadeInUpBig animated");
}
else{$(".mod-headers").removeClass("mod-cr");}
});*/
if($(window).width()<480){$(".leader-tit1").addClass("wow bounceInLeft animated animated");
$(".leader-per1").addClass("wow bounceInRight animated animated");}
var eventRoll = new Swiper('.swiper-roll-2', {
slidesPerView: (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 6 : 2,
//slidesPerGroup : (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 5 : 2,
autoplayDisableOnInteraction : false,
autoplay :false,
loop:false,
//slidesPerGroup:(window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 5 : 1,
// pagination: '.swiper-roll-1 .swiper-pagination',
grabCursor: true,
spaceBetween :0,
paginationClickable: true
});
if($(".swiper-roll-2 .item-cell").size()>0){
eventRoll.swipeTo($(".swiper-roll-2 .item-cell").index($(".swiper-roll-2 .cr")), 0, false);
};
$('.event-btl').on('click', function(e){
e.preventDefault()
eventRoll.swipePrev()
});
$('.event-btr').on('click', function(e){
e.preventDefault()
eventRoll.swipeNext()
});
$(".project-wrap .item-pic").hover(function(){swiper1.stopAutoplay();},function(){swiper1.startAutoplay();})
// var swiper1 = new Swiper('.swiper-roll-1', {
// slidesPerView: 1,
// //slidesPerGroup : (window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 5 : 2,
// autoplayDisableOnInteraction : false,
// autoplay :4000,
// //slidesPerGroup:(window.innerWidth >= 480 || document.documentElement.clientWidth >= 480) ? 5 : 1,
// pagination: '.swiper-roll-1 .swiper-pagination',
// loop:true,
// grabCursor: true,
// spaceBetween :0,
// paginationClickable: true
//
// });
/*棣栭〉杞挱鎻掍欢*/
// $('.changeBox_a1 .a_bigImg').soChange({
// thumbObj: '.ul_change_a2 li',
// //瀵艰埅涓烘暟瀛楀舰寮忥紝閫夋嫨鍣ㄦ寚鍚戝寘鍚暟瀛楃殑span瀵硅薄
// thumbNowClass: 'on',
// //鑷畾涔夊鑸璞″綋鍓峜lass涓簅n
// changeTime: 4000,
// overStop:false,
// callback:function(){
//
// }
// //鑷畾涔夊垏鎹㈡椂闂翠负4000ms 涓
// //botPrev:'#btnL', // 鎸夐挳锛屼笂涓€涓
// // botNext:'#btnR' // 鎸夐挳锛屼笅涓€涓
// });
$(".s-close").click(function () {
$(".mobile-search").hide();
});
$(".search-mobile").click(function () {
$(".mobile-search").show();
});
/*鎵嬫満瀵艰埅鑿滃崟*/
var isfir = 1;
var isfir1 = 1;
$(".menus-mobiles").click(function () {
$(".menus-mobiles").toggleClass("menus-ani1");
if (isfir) {
$(".mobile-menucss:eq(0)").addClass("menu-active");
isfir1 = 1
$(".mobile-menucss:eq(1)").removeClass("menu-hide menu-active");
// $(".menus").addClass("menus-close");
isfir = 0;
} else {
if (isfir == 0) {
$(".mobile-menucss:eq(0)").toggleClass("menu-active");
$(".mobile-menucss:eq(0)").toggleClass("menu-hide");
isfir1 = 1
$(".mobile-menucss:eq(1)").removeClass("menu-hide menu-active");
//$(".menus").toggleClass("menus-close");
}
}
});
$(".head-icons .icon-shouye").click(function () {
if (isfir1) {
$(".mobile-menucss:eq(1)").addClass("menu-active");
isfir = 1
$(".mobile-menucss:eq(0)").removeClass("menu-hide menu-active");
// $(".menus").addClass("menus-close");
isfir1 = 0;
} else {
if (isfir1 == 0) {
$(".mobile-menucss:eq(1)").toggleClass("menu-active");
$(".mobile-menucss:eq(1)").toggleClass("menu-hide");
isfir = 1
$(".mobile-menucss:eq(0)").removeClass("menu-hide menu-active");
//$(".menus").toggleClass("menus-close");
}
}
});
})