jQuery(document).ready(function() {
jQuery("img").lazyload({
effect : "fadeIn"
});
/*璇█涓嬫媺*/
$(".first-lang").click(function(){
$(".oth-lang").slideToggle("slow");
$(this).find(".img2").toggleClass( "xz" );
});
/*鎼滅储妗?/
$(".search").click(function(){
$(".topsearch").animate({top: "100%"})
});
$(".topsearch .search-close").click(function(){
$(".topsearch").animate({top: "-100vh"})
});
$(window).scroll(function() {
if ($(window).scrollTop() > 0) {
$(".header").addClass("header-small");
$(".head-nav").addClass("head-block");
} else {
$(".header").removeClass("header-small");
$(".head-nav").removeClass("head-block");
}
});
$(".fx-top").click(function() {
return $("body,html").animate({
scrollTop: 0
},
500),
!1
});
$(window).scroll(function() {
if ($(this).scrollTop() >= 400) {
$(".fx-top").fadeIn(500);
} else {
$(".fx-top").hide();
}
});
$('.header .nav').find('li').mouseenter(function(event) {
$(this).find('.nav_layer').stop().slideDown(400);
}).mouseleave(function(event) {
$(this).find('.nav_layer').stop().slideUp(400);
});
/*绉诲姩绔鑸?/
$(".phone-nav").click(function(){
$(this).toggleClass( "active" )
if ($(this).hasClass('active')) {
$(".phone-nav-mn").animate({top: "0px"});
} else {
$(".phone-nav-mn").animate({top: "-10000%"});
}
});
$('.phone-nav-mn .navs').click(function () {
$(this).find(".img").toggleClass("xz");
$(this).parents().siblings().find(".img").removeClass("xz");
$(this).parents().find("dl").stop().slideUp();
$(this).siblings("dl").stop().slideToggle();
});
/*鍐呴〉浜岀骇瀵艰埅*/
$('.menuLink1 .menu').hide();
$('.menuLink1 .open').on('click', function() {
$(this).next('.menuLink1 .menu').slideToggle();
$('.menuLink1 .menu').hide();
$(this).next().show();
$(this).find(".img").toggleClass( "xz" );
});
/*浜烘墠鎷涜仒*/
/*$(".btn").click(function(){
$(this).parent().toggleClass('active');
});*/
$('.sq-main .close').click(function () {
$(".sq-main ").fadeOut();
});
$('.zwsq').click(function () {
$(".sq-main ").fadeIn();
});
$('.dj1').click(function () {
$(".xf4").fadeIn();
swiper18.init();
});
$('.dj2').click(function () {
$(".xf5").fadeIn();
swiper19.init();
});
/*鎶曡祫鍏崇郴*/
function time() {
var date = new Date();
var n = date.getFullYear();
var y = date.getMonth()+1;
var t = date.getDate();
var h = date.getHours();
var m = date.getMinutes();
$('.time span').eq(0).html(n);
$('.time span').eq(1).html(y);
$('.time span').eq(2).html(t);
$('.time span').eq(3).html(h);
$('.time span').eq(4).html(m);
}
time();
setInterval(time, 1000);
/*鍙戝睍鎶ュ憡*/
/*$(".cxfz-warp2 li .main").click(function(){
$(this).find(".bottom").slideToggle("slow");
$(this).find(".jia").toggleClass('active');
});*/
/*pcbanner*/
var swiper3 = new Swiper('#swiper3', {
slidesPerView :'1',
spaceBetween: 0,
effect : 'fade',
speed:1000,
autoplay: {
delay:9000,
disableOnInteraction: false,
},
autoHeight: true,
pagination: {
el: '#swiper3 .swiper-pagination',
clickable: true,
},
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
},
});
var swiper31 = new Swiper('#swiper31', {
observer:true,
observeParents:true,
slidesPerView :'1',
spaceBetween: 0,
effect : 'fade',
speed:1000,
autoplay: {
delay:9000,
disableOnInteraction: false,
},
pagination: {
el: '#swiper31 .swiper-pagination',
clickable: true,
},
});
/*棣栭〉鏂伴椈*/
var swiper4 = new Swiper('#swiper4', {
slidesPerView :1,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
pagination: {
el: '#swiper4 .swiper-pagination',
clickable: true,
},
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
},
});
/*棣栭〉浜т笟甯冨眬*/
var Swiper5 = new Swiper('#swiper5', {
speed: 1000,
effect:'fade',
touchStartForcePreventDefault : true,
slidesPerView: 1,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
navigation: {
nextEl: '#swiper5 .page-b .more-r',
prevEl: '#swiper5 .page-b .more-l',
},
on: {
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
slideChangeTransitionStart: function(){
$('.page-h .on').removeClass('on');
$('.page-h li').eq(Swiper5.activeIndex).addClass('on');
},
},
});
$('.page-h li').hover(function(){
var _ = $(this);
_.addClass('on').siblings().removeClass('on');
Swiper5.slideTo(_.index());
return false;
});
/*棣栭〉鍙寔缁彂灞?/
var swiper6 = new Swiper('#swiper6', {
slidesPerView :1,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
noSwiping : true,
navigation: {
nextEl: '.page .more-r',
prevEl: '.page .more-l',
},
on:{
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
init: function() {
swiperAnimateCache(this);
swiperAnimate(this);
numList = '
';
for (p = 1; p <= (this.slides.length - 0); p++) {
numList += '- ' + '0' + p + '
';
}
numList += '
';
this.$el.find(' .swiper-pagination').html(numList + '' + '0' + (this.slides.length ) + '');
//paginationRender浼氭瘡娆℃洿鏂癲om锛屾棤娉曚骇鐢熷姩鐢绘晥鏋?鎵€浠ヤ娇鐢╤tml()鐢熸垚pagination
this.emit('transitionStart');
},
transitionStart: function() {
realIndex = this.realIndex;
speed = this.params.speed;
bullets = this.$el.find(' .swiper-pagination li');
sldieLength = bullets.length;
for (i = 0; i < sldieLength; i++) {
if ((i - realIndex) > Math.floor(sldieLength/2)) {
difference = i - sldieLength - realIndex;
} else if ((i - realIndex) < -Math.floor(sldieLength/2)) {
difference = i + sldieLength - realIndex;
} else {
difference = i - realIndex;
}
bullets.eq(i).transition(speed);
bullets.eq(i).transform('rotateX(' + difference * 30 + 'deg) translate3d(0, ' + difference * 30 + 'px, 0)') ;
bullets.eq(i).css('opacity', 1 - Math.abs(difference));
}
}
},
});
/*搴曢儴鍦板潃鍒囨崲*/
var swiper7 = new Swiper('#swiper7', {
speed: 1000,
slidesPerView: 1,
spaceBetween:20,
on: {
slideChangeTransitionStart: function(){
$('.foot-con .on').removeClass('on');
$('.foot-con li').eq(swiper7.activeIndex).addClass('on');
},
},
});
$('.foot-con li').hover(function(){
var _ = $(this);
_.addClass('on').siblings().removeClass('on');
swiper7.slideTo(_.index());
return false;
});
/*浼佷笟绠€浠?/
var swiper8 = new Swiper('#swiper8', {
slidesPerView :'1',
spaceBetween: 0,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
navigation: {
nextEl: '.r .next',
prevEl: '.r .prev',
},
loop:true,
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
},
});
/*鑱旂郴鏂瑰紡*/
var swiper9 = new Swiper('#swiper9', {
slidesPerView :'1',
spaceBetween: 10,
navigation: {
nextEl: '#swiper9 .more-r',
prevEl: '#swiper9 .more-l',
},
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
slideChangeTransitionStart: function(){
$('.bot .on').removeClass('on');
$('.bot li').eq(swiper9.activeIndex).addClass('on');
},
},
});
$('.bot li').on('touchstart mousedown', function() {
var _ = $(this);
_.addClass('on').siblings().removeClass('on');
swiper9.slideTo(_.index());
return false;
});
var swiper10 = new Swiper('#swiper10', {
slidesPerView :1,
spaceBetween: 10,
navigation: {
nextEl: '#swiper10 .more-r',
prevEl: '#swiper10 .more-l',
},
});
var swiper11 = new Swiper('#swiper11', {
slidesPerView :1,
breakpoints: {
940:{
slidesPerView: 3,
spaceBetween: 10,
},
768:{
slidesPerView: 2,
spaceBetween: 0,
},
},
});
/*骞哥涔呯珛*/
var swiper12 = new Swiper('#swiper12', {
slidesPerView :1,
spaceBetween: 10,
effect : 'fade',
speed:1000,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
loop:true,
pagination: {
el: '#swiper12 .swiper-pagination',
clickable :true,
},
navigation: {
nextEl: '#swiper12 .swiper-button-next',
prevEl: '#swiper12 .swiper-button-prev',
},
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
},
});
var swiper13 = new Swiper('#swiper13', {
slidesPerView :1,
spaceBetween: 63,
freeMode: true,
navigation: {
nextEl: '.xfjl-warp3 .swiper-button-next',
prevEl: '.xfjl-warp3 .swiper-button-prev',
},
breakpoints: {
410:{
slidesPerView :'auto',
spaceBetween: 63,
},
},
});
/*鎺ㄨ崘瑙嗛*/
var swiper14 = new Swiper('#swiper14', {
slidesPerView :'1',
spaceBetween: 10,
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
slideChangeTransitionStart: function(){
$('.page-video .on').removeClass('on');
$('.page-video li').eq(swiper14.activeIndex).addClass('on');
},
},
});
$('.page-video li').on('touchstart mousedown', function() {
var _ = $(this);
_.addClass('on').siblings().removeClass('on');
swiper14.slideTo(_.index());
return false;
});
/*琛屼笟*/
var swiper15 = new Swiper('#swiper15', {
slidesPerView :'1',
spaceBetween: 10,
effect : 'fade',
fadeEffect: {
crossFade: true,
},
speed:1000,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
on:{
init: function(){
swiperAnimateCache(this);
swiperAnimate(this);
},
slideChangeTransitionEnd: function(){
swiperAnimate(this);
},
slideChangeTransitionStart: function(){
$('.hy-page .on').removeClass('on');
$('.hy-page li').eq(swiper15.activeIndex).addClass('on');
},
},
});
$('.hy-page li').hover(function(){
var _ = $(this);
_.addClass('on').siblings().removeClass('on');
swiper15.slideTo(_.index());
return false;
});
/*绉诲姩鐮斿垱鏂?/
var swiper16 = new Swiper('#swiper16', {
slidesPerView :2,
spaceBetween: 10,
navigation: {
nextEl: '#swiper16 .swiper-button-next',
prevEl: '#swiper16 .swiper-button-prev',
},
speed:1000,
autoplay: {
delay:5000,
disableOnInteraction: false,
},
breakpoints: {
500:{
slidesPerView :3,
spaceBetween: 10,
},
},
});
var swiper17 = new Swiper('#swiper17', {
slidesPerView :1,
spaceBetween: 10,
speed:1000,
pagination :{
el: '#swiper17 .swiper-pagination',
clickable :true,
}
});
var swiper18 = new Swiper('#swiper18', {
slidesPerView :1,
spaceBetween: 10,
navigation: {
nextEl: '#swiper18 .swiper-button-next',
prevEl: '#swiper18 .swiper-button-prev',
},
loop:true,
speed:1000,
observer:true,
observeParents:true,
lazy: {
loadPrevNext: true,
},
on: {
init: function(swiper){
//Swiper鍒濆鍖栦簡
},
},
});
var swiper19 = new Swiper('#swiper19', {
slidesPerView :1,
spaceBetween: 10,
navigation: {
nextEl: '#swiper19 .swiper-button-next',
prevEl: '#swiper19 .swiper-button-prev',
},
speed:1000,
loop:true,
observer:true,
observeParents:true,
lazy: {
loadPrevNext: true,
},
on: {
init: function(swiper){
//Swiper鍒濆鍖栦簡
},
},
});
});