$(document).ready(function () {
$.goup({
trigger: 100,
bottomOffset: 150,
locationOffset: 100,
title: ' ',
titleAsText: true
});
});
$(function() {
$(".banner .flexslider").flexslider({
animation: 'fade',
easing: 'swing',
controlNav: false,
slideshowSpeed: 5000, //展示时间间隔ms
animationSpeed: 500, //滚动时间ms
touch: true, //是否支持触屏滑动
before: function (slider) { //滑动后是否自动轮播
slider.pause();
slider.play();
}
});
$('.banner .flexslider .flex-direction-nav a').each(function(e){
var $this =$(this);
$this.addClass('iconfont');
$this.text('');
if($this.hasClass('flex-prev')){
$(this).addClass('icon-zuo')
}else if($this.hasClass('flex-next')){
$(this).addClass('icon-you')
}
});
// 首页延迟显示
$(window).scroll(function(){
$(".effect").each(function(index, element) {
var e=$(this);
var fix=parseInt(e.attr("fix"));
if(!fix && fix!=0){fix=$(window).height()*9*0.1;}
else{fix=$(window).height()*fix*0.1;}
//var h=$(window).height()-$(e).height()>0?$(window).height()-$(e).height():0;
if($(window).scrollTop()>=$(e).offset().top-fix){
if(!$(e).hasClass("isView")){
$(e).addClass("isView");
}
}
else{
if($(e).hasClass("isView")){
$(e).removeClass("isView");
if($(e).hasClass("part1")){
$(".home9 .part1").removeClass("s");
}
}
}
});
});
// 新闻动态767以下变成轮播
});
$(function () {
$(".loader").fadeOut();
new Swiper(".in-banner", {
speed: 1e3,
loop: !0,
spaceBetween: 0,
autoplay: { delay: 5e3, stopOnLastSlide: !1, disableOnInteraction: !1 },
pagination: {
el: ".in-banner .swiper-pagination",
clickable: !0,
renderBullet: function (a, b) {
return '0' + (a + 1) + "";
},
},
navigation: {
nextEl: ".main-banner .swiper-button-next",
prevEl: ".main-banner .swiper-button-prev",
},
on: { slideChangeTransitionStart: function () {} },
});
var c = new Swiper(".aslide", {
speed: 800,
spaceBetween: 0,
effect: "fade",
fadeEffect: { crossFade: !0 },
});
new Swiper(".topSlides", {
speed: 800,
spaceBetween: 0,
autoplay: { delay: 4e3, stopOnLastSlide: !1, disableOnInteraction: !1 },
thumbs: { swiper: c },
navigation: {
nextEl: ".homea-b .aleft .next",
prevEl: ".homea-b .aleft .prev",
},
});
var d = new Swiper(".nSlides", {
speed: 800,
spaceBetween: 0,
effect: "fade",
fadeEffect: { crossFade: !0 },
on: {
slideChangeTransitionStart: function () {
$(" .homea-b .aright .tabtit span")
.eq(this.realIndex)
.addClass("cur")
.siblings("span")
.removeClass("cur");
$(".homea-b .aright .ctit .more a")
.eq(this.realIndex)
.show()
.siblings("a")
.hide();
},
},
});
$(".homea-b .aright .ctit .more a").eq(0).show();
$(" .homea-b .aright .tabtit span").on("click", function (a) {
a.preventDefault();
$(this).addClass("cur").siblings("span").removeClass("cur");
$(".homea-b .aright .ctit .more a")
.eq($(this).index())
.show()
.siblings("a")
.hide();
d.slideTo($(this).index());
});
new Swiper(".homea-a .icoList", {
slidesPerView: 3,
pagination: { el: ".homea-a .icoList .swiper-pagination", clickable: !0 },
watchOverflow: !0,
breakpoints: {
640: { slidesPerView: 4 },
1024: { slidesPerView:7 },
1360: { slidesPerView: 9 },
1440: { slidesPerView: 9 },
},
});
new Swiper(".homec .tzggList", {
slidesPerView: 1,
spaceBetween: 10,
pagination: { el: ".homec .swiper-pagination", clickable: !0 },
navigation: { nextEl: ".homec .sbtn .next", prevEl: ".homec .sbtn .prev" },
autoplay: { delay: 4e3, stopOnLastSlide: !1, disableOnInteraction: !1 },
breakpoints: {
640: { slidesPerView: 1, spaceBetween: 10 },
768: { slidesPerView: 2, spaceBetween: 10 },
1280: { slidesPerView: 4, spaceBetween: 10 },
1367: { slidesPerView: 5, spaceBetween: 10 },
},
});
new Swiper(".homed .jsList", {
slidesPerView: 5,
slidesPerGroup : 5,
spaceBetween: 0,
speed: 1000,
autoplay: {
delay: 4e3,
stopOnLastSlide: !1,
disableOnInteraction: !1,
},
pagination: { el: ".homed .jsList .swiper-pagination", clickable: !0 },
breakpoints: {
320: { slidesPerView: 3, slidesPerGroup: 3 },
480: { slidesPerView: 3,slidesPerGroup : 3 },
640: { slidesPerView: 3,slidesPerGroup : 3 },
768: { slidesPerView: 4 ,slidesPerGroup : 4,},
1024: { slidesPerView: 4, slidesPerGroup : 4, },
1600: { slidesPerView: 5, slidesPerGroup : 5, },
},
});
// new Swiper(".dslide", {
// speed: 800,
// spaceBetween: 0,
// autoplay: { delay: 4e3, stopOnLastSlide: !1, disableOnInteraction: !1 },
// });
c = new Swiper(".gallery-thumbs", {
spaceBetween: 20,
slidesPerView: 2,
watchSlidesVisibility: !0,
watchSlidesProgress: !0,
breakpoints: {
640: { slidesPerView: 2, spaceBetween: 10 },
768: { slidesPerView: 3, spaceBetween: 20 },
1280: {
slidesPerView: 4,
spaceBetween: 28,
},
},
});
new Swiper(".gallery-top", {
spaceBetween: 0,
speed: 800,
autoplay: { delay: 4e3, stopOnLastSlide: !1, disableOnInteraction: !1 },
effect: "fade",
fadeEffect: { crossFade: !0 },
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
thumbs: { swiper: c, autoScrollOffset: 1 },
});
var iframeHeight=0;
if ($("8").is(".Uani")) {
new WOW({
boxClass: "Uani",
animateClass: "animated",
offset: 0,
mobile: !1,
live: !0,
}).init();
}
});
var mySwiperBanner = new Swiper ('#banner-swiper', {
direction: 'horizontal',
loop: true,
effect : 'fade',
fade: {
crossFade: false,
},
autoplay : 5000,
speed: 1000,
pagination: '.swiper-pagination',
paginationClickable: true,
paginationBulletRender: function (swiper, index, className) {
return '' + '';
},
bulletClass: 'chanpin-bullet',
bulletActiveClass: 'chanpin-bullet-active',
});
var mySwiperNews = new Swiper('#news-swiper', {
autoplay: 4000,
speed: 1000,
loop: true,
pagination: '.swiper-pagination',
paginationClickable: true,
})
var myActivity = new Swiper('#activity-swiper', {
direction: 'horizontal',
autoplay: 6000,
speed: 1500,
loop: true,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
})
var myFriendly = new Swiper('#friendly-link-swiper', {
slidesPerView: 6,
paginationClickable: true,
spaceBetween: 30,
loop: true,
autoplay : 3000,
prevButton:'.swiper-button-prev',
nextButton:'.swiper-button-next',
});
$(".menu").css("top","0");
$(".bottom-bg").css("bottom","0");
$(".qimiao").css("opacity","1");
$(".qimiao").css("right","20%");
$("#gooey-v").gooeymenu({
bgColor: "#52965c",
contentColor: "white",
style: "vertical",
horizontal: {
menuItemPosition: "glue"
},
vertical: {
menuItemPosition: "spaced",
direction: "up"
},
circle: {
radius: 90
},
margin: "small",
size: 60,
bounce: true,
bounceLength: "small",
transitionStep: 100,
hover: "#68d099"
});
window.onload = function() {
$(".searbtn,.searcht").hover(function(){
$(".searcht").css("width","180px");
$(".searcht").css("opacity","1");
$(".navftwo a").css("margin-right","4px");
},function(){
$(".searcht").css("width","0");
$(".searcht").css("opacity","0");
$(".navftwo a").css("margin-right","34px");
});
};
$(function() {
var sectionHeight = document.getElementById('newsLeftWrap').getBoundingClientRect().top;
var activitySketchTop = document.getElementById('activitySketch').getBoundingClientRect().top;
var interContertTop = document.getElementById('interContert').getBoundingClientRect().top;
var specialActivityTop = document.getElementById('specialActivity').getBoundingClientRect().top;
var screenHeight = $(window).height();
if (sectionHeight < 650 || screenHeight - sectionHeight > 200) {
$('.news-left-wrap').animate({ opacity: 1, marginLeft: 0 }, 800);
$('.news-right-wrap').animate({ opacity: 1, marginRight: 0 }, 800);
}
if (sectionHeight < 650 || screenHeight - activitySketchTop > 200) {
$('.activity-slide-wrap-item').animate({ opacity: 1, marginTop: 0 }, 800);
$('.activity-slide-wrap-item').animate({ opacity: 1, marginTop: 0 }, 800);
}
if (interContertTop < 650 || screenHeight - interContertTop > 200) {
$('.inter-contert-itemt').animate({ opacity: 1, marginTop: 20 }, 800);
// $('.inter-contert-item:nth-child(2)').animate({ opacity: 1, marginTop: '50px' }, 800);
// $('.inter-contert-item:nth-child(4)').animate({ opacity: 1, marginTop: 0 }, 800);
// $('.inter-contert-item:nth-child(6)').animate({ opacity: 1, marginTop: 0 }, 800);
// $('.inter-contert-item:nth-child(8)').animate({ opacity: 1, marginTop: 0 }, 800);
}
if (specialActivityTop < 650 || screenHeight - specialActivityTop > 200) {
$('.special-activity-content-item').animate({ opacity: 1, marginTop: 0 }, 800);
}
var scrollFunc = function(e) {
sectionHeight = document.getElementById('newsLeftWrap').getBoundingClientRect().top;
activitySketchTop = document.getElementById('activitySketch').getBoundingClientRect().top;
interContertTop = document.getElementById('interContert').getBoundingClientRect().top;
specialActivityTop = document.getElementById('specialActivity').getBoundingClientRect().top;
var scrollTop = $(window).scrollTop();
console.log(scrollTop);
if (scrollTop > 500) {
$(".go-back-top").css("opacity","1");
} else {
$(".go-back-top").css("opacity","0");
}
ee = e || window.event;
if (e.wheelDelta) {//IE/Opera/Chrome
sectionHeight = parseInt(sectionHeight)
if (screenHeight - sectionHeight > 200) {
$('.news-left-wrap').animate({ opacity: 1, marginLeft: 0 }, 800);
$('.news-right-wrap').animate({ opacity: 1, marginRight: 0 }, 800);
}
if (screenHeight - activitySketchTop > 200) {
$('.activity-slide-wrap-item').animate({ opacity: 1, marginTop: 0 }, 800);
}
if (screenHeight - interContertTop > 200) {
$('.inter-contert-itemt').animate({ opacity: 1, marginTop: 20 }, 800);
// $('.inter-contert-item:nth-of-type(odd)').animate({ opacity: 1, marginTop: 0 }, 800);
// $('.inter-contert-item:nth-child(2)').animate({ opacity: 1, marginTop: '50px' }, 800);
// $('.inter-contert-item:nth-child(4)').animate({ opacity: 1, marginTop: 0 }, 800);
// $('.inter-contert-item:nth-child(6)').animate({ opacity: 1, marginTop: 0 }, 800);
// $('.inter-contert-item:nth-child(8)').animate({ opacity: 1, marginTop: 0 }, 800);
}
if (screenHeight - specialActivityTop > 200) {
$('.special-activity-content-item').animate({ opacity: 1, marginTop: 0 }, 800);
}
} else if (e.detail) {//Firefox
}
}
/*注册事件*/
if (document.addEventListener) {
document.addEventListener('DOMMouseScroll', scrollFunc, false);
}//W3C
window.onmousewheel = document.onmousewheel = scrollFunc;//IE/Opera/Chrome
})
function gotoTPoint(){
$("html,body").animate({scrollTop:0},500);
$(".go-back-top").css("opacity","0");
}