function move1() {
var tgt = $("#main .section06 .imgBox.pc .img01 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.06;
tgt.radianX = 3.14;
tgt.distX = 20;
tgt.speedY = 0.05;
tgt.radianY = 0;
tgt.distY = 10;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move2() {
var tgt = $("#main .section06 .imgBox.pc .img02");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.03;
tgt.radianX = 3.14;
tgt.distX = 30;
tgt.speedY = 0.05;
tgt.radianY = 0;
tgt.distY = 20;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move3() {
var tgt = $("#main .section06 .imgBox.pc .img03");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.04;
tgt.radianX = 3.14;
tgt.distX = 15;
tgt.speedY = 0.04;
tgt.radianY = 0;
tgt.distY = 15;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move4() {
var tgt = $("#main .section06 .imgBox.pc .img04");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.05;
tgt.radianX = 3.14;
tgt.distX = 20;
tgt.speedY = 0.04;
tgt.radianY = 0;
tgt.distY = 10;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move5() {
var tgt = $("#main .section06 .imgBox.pc .img05 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.02;
tgt.radianX = 3.14;
tgt.distX = 15;
tgt.speedY = 0.03;
tgt.radianY = 0;
tgt.distY = 20;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move6() {
var tgt = $("#main .section06 .imgBox.pc .img06 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.04;
tgt.radianX = 3.14;
tgt.distX = 25;
tgt.speedY = 0.03;
tgt.radianY = 0;
tgt.distY = 12;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move7() {
var tgt = $("#main .section06 .imgBox.pc .img07 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.05;
tgt.radianX = 3.14;
tgt.distX = 20;
tgt.speedY = 0.05;
tgt.radianY = 0;
tgt.distY = 15;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move8() {
var tgt = $("#main .section06 .imgBox.pc .img08 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.04;
tgt.radianX = 3.14;
tgt.distX = 22;
tgt.speedY = 0.05;
tgt.radianY = 0;
tgt.distY = 20;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move9() {
var tgt = $("#main .section06 .imgBox.pc .img09 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.03;
tgt.radianX = 3.14;
tgt.distX = 30;
tgt.speedY = 0.05;
tgt.radianY = 0;
tgt.distY = 20;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function move10() {
var tgt = $("#main .section06 .imgBox.pc .img10 img");
tgt.x0 = $(tgt).position().left;
tgt.y0 = $(tgt).position().top;
tgt.speedX = 0.04;
tgt.radianX = 3.14;
tgt.distX = 25;
tgt.speedY = 0.04;
tgt.radianY = 0;
tgt.distY = 15;
tgt.inte = setInterval(function () {
$(tgt).css({ left: tgt.x0 + tgt.distX * Math.sin(tgt.radianX) })
$(tgt).css({ top: tgt.y0 + tgt.distY * Math.sin(tgt.radianY) })
tgt.radianX += tgt.speedX;
tgt.radianY += tgt.speedY;
}, 1000 / 30);
}
function randomsort(a, b) {
return Math.random() > .5 ? -1 : 1;
}
$(window).load(function () {
});
$(function () {
var demoFi1 = new CountUp("num1", 0, $("#num1").data("num"), 0, 3);
var demoFi2 = new CountUp("num2", 0, $("#num2").data("num"), 0, 2);
var demoFi3 = new CountUp("num3", 0, $("#num3").data("num"), 0, 4);
//if ($(window).scrollTop()<1024) {
// setTimeout(function () {
// demoFi1.start();
// demoFi2.start();
// demoFi3.start();
// },1300);
//}
$(window).scroll(function () {
if ($(window).scrollTop() > $(window).height() * 0.3) {
demoFi1.start();
demoFi2.start();
demoFi3.start();
}
if ($(window).scrollTop() > $('#main .section02').offset().top - $(window).height() * 0.7) {
$('#main .section02').addClass('active');
}
if ($(window).scrollTop() > $('#main .section03 .title').offset().top - $(window).height() * 0.7) {
$('#main .section03 .title').addClass('active');
}
});
});
$(function () {
/* $('.bannerBox.pc .banner').height($(window).height() - $('#header').height());
$(window).resize(function () {
$('.bannerBox.pc .banner').height($(window).height() - $('#header').height());
});*/
/* $('.bannerBox.pc .slider').slick({
autoplay: true,
pauseOnHover: false,
autoplaySpeed: 5000,
speed: 800,
prevArrow: '.bannerBox.pc .prev',
nextArrow: '.bannerBox.pc .next'
});
*/
/******************************首页Banner轮播位******************************/
/*var mySwiper = new Swiper('.swiper-container', {
loop: true,
autoplay: {
delay: 10000,
disableOnInteraction: false
},
speed: 800,
navigation: {
nextEl: '.bannerBox.pc .next',
prevEl: '.bannerBox.pc .prev',
}
});*/
var swiper = new Swiper('.ban-swiper', {
pagination: '.ban-span',
paginationClickable: true,
nextButton: '.ban-butrt',
prevButton: '.ban-butlt',
loop: true,
autoplay: 5000,
speed: 800,
effect: 'fade'
});
mySwiper.on('slideChangeTransitionStart', function () {
var q = mySwiper.activeIndex;
var s;
if (q == 3) {
s = 0;
} else if (q == 0) {
s = 1;
} else {
s = mySwiper.activeIndex - 1;
}
$('.bannerBox.pc .pages p span').text(s + 1);
$('.bannerBox.pc .pages .line span').stop(true, true).animate({ width: 0 }, 1);
});
mySwiper.on('slideChangeTransitionEnd', function () {
$('.bannerBox.pc .pages .line span').animate({ width: 160 }, 10000, 'linear');
var q = mySwiper.activeIndex;
var s;
if (q == 6) {
s = 1;
} else if (q == 0) {
s = 5;
} else {
s = mySwiper.activeIndex;
}
$('.bannerBox.pc .banner').each(function () {
if ($(this).attr('data-id') == s) {
$(this).addClass('active');
} else {
$(this).removeClass('active');
}
});
});
/********************************************************************************************/
$(function () {
setTimeout(function () {
$('.bannerBox.pc .banner05').addClass('active');
}, 1600);
$("#main .section03 .ttl ul li a").on('click', function () {
$("#main .section03 li .sydh").hide();
});
});
$('.bannerBox.pc .pages .line span').animate({ width: 160 }, 10000, 'linear');
/* $('.bannerBox.pc .slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){
$('.bannerBox.pc .pages p span').text(nextSlide+1);
$('.bannerBox.pc .pages .line span').stop(true,true).animate({width:0},1);
});
$('.bannerBox.pc .slider').on('afterChange', function(event, slick, currentSlide, nextSlide){
$('.bannerBox.pc .pages .line span').animate({width:160},5000,'linear');
});
*/
$('.bannerBox.sp .slider').slick({
autoplay: true,
pauseOnHover: false,
autoplaySpeed: 5000,
speed: 800,
arrows: false
});
$('.bannerBox.sp .pages .line span').animate({ width: 60 }, 5000, 'linear');
$('.bannerBox.sp .slider').on('beforeChange', function (event, slick, currentSlide, nextSlide) {
$('.bannerBox.sp .pages p span').text(nextSlide + 1);
$('.bannerBox.sp .pages .line span').stop(true, true).animate({ width: 0 }, 1);
});
$('.bannerBox.sp .slider').on('afterChange', function (event, slick, currentSlide, nextSlide) {
$('.bannerBox.sp .pages .line span').animate({ width: 60 }, 5000, 'linear');
});
$('#main .section03 .tabPanel').each(function () {
$(this).find('.slide').slick({
autoplay: true,
pauseOnHover: false,
arrows: false,
dots: true
});
$(this).find('.slide').slick('slickPause');
});
$(window).scroll(function () {
// if ($(window).scrollTop() > $('#main .section03 .tabPanel.show').offset().top - $(window).height() * 0.7) {
$('.section03 .slide').slick('slickPlay');
//}
});
$('#main .section04 .sliderBox').slick({
autoplay: true,
pauseOnHover: false,
arrows: false,
dots: true
});
$('#main .section04 .sliderBox').slick('slickPause');
$(window).scroll(function () {
if ($(window).scrollTop() > $('#main .section04 .sliderBox').offset().top - $(window).height() * 0.7) {
$('#main .section04 .sliderBox').slick('slickPlay');
}
});
$('#main .section05 ul.sp').slick({
autoplay: false,
pauseOnHover: false,
arrows: false,
dots: true
});
$('#main .section05 ul.sp').slick('slickPause');
$(window).scroll(function () {
if ($(window).scrollTop() > $('#main .section05 ul.sp').offset().top - $(window).height() * 0.7) {
$('#main .section05 ul.sp').slick('slickPlay');
}
});
var ww = $('#main .section03 .ttl .tabNavi li.on').width();
var left = $('#main .section03 .ttl .tabNavi li.on a').position().left;
$('#main .section03 .ttl .tabNavi li.line').css({ width: ww, left: left });
$(window).resize(function () {
var ww = $('#main .section03 .ttl .tabNavi li.on').width();
var left = $('#main .section03 .ttl .tabNavi li.on a').position().left;
$('#main .section03 .ttl .tabNavi li.line').css({ width: ww, left: left });
});
$('#main .section03 .ttl .tabNavi li:not(.line)').hover(function () {
var ww = $(this).width();
var left = $(this).children('a').position().left;
$('#main .section03 .ttl .tabNavi li.line').css({ width: ww, left: left });
}, function () {
var ww = $('#main .section03 .ttl .tabNavi li.on').width();
var left = $('#main .section03 .ttl .tabNavi li.on a').position().left;
$('#main .section03 .ttl .tabNavi li.line').css({ width: ww, left: left });
});
});
$(window).load(function () {
$('#main .section03 .tabPanel ul.pc').masonry({
itemSelector: 'li',
isFitWidth: true,
columnWidth: function (containerWidth) {
return containerWidth / 3;
}
});
$('.tabPanel').eq(0).addClass('show');
var boxh = $("#main .section03 .tanbox .show").height();
$("#main .section03 .tanbox").height(boxh);
var ind = 0;
/* $('.tabNavi li a').on('click', function (e) {
ind = $(this).parent('li').index();
ind2 = $(this).parent('li').index() + 1;
$(".tabNavi li:nth-child(" + ind2 + ")").addClass('on').siblings().removeClass('on');
$("#main .section03 li .sydh").hide();
$("#main .section03 li ").addClass('act');
if (!$(window).width() < 1200) {
e.preventDefault();
}
tan_show();
});*/
$(window).resize(function () {
tan_show();
});
function tan_show() {
setTimeout(function () {
wow = new WOW({
boxClass: 'wow2',
animateClass: 'animated',
offset: 0,
});
wow.init();
$('.tabPanel:eq(' + ind + ')').addClass('show').siblings('.tabPanel').removeClass('show');
$("#main .section03 li ").removeClass('act');
var boxh2 = $("#main .section03 .tanbox .show").height();
$("#main .section03 .tanbox").height(boxh2);
}, 600);
return false;
}
/*$('.tabNavi li a').click(function(){
setTimeout(function () {
$('.tabPanel:eq('+ind+')').addClass('show').siblings('.tabPanel').removeClass('show');
$("#main .section03 li ").removeClass('act');
var boxh2=$("#main .section03 .tanbox .show").height();
$("#main .section03 .tanbox").height(boxh2);
}, 600);
return false;
});*/
$('#main .section02 > ul > li').click(function () {
$(this).toggleClass('on').siblings('li').removeClass('on');
//return false;
});
});
/*滚动*/
if ($(window).width() > 768) {
$(window).scroll(function () {
/*
var tp = $("#main .section03 .ttl .tabNavim").offset().top - $(window).scrollTop();
var tp2 = $("#main .section04").offset().top - $(window).scrollTop();
if (tp <= 50) {
$("#main .section03 .ttl .tabNavim2").stop(true, false).addClass('act');
} else {
$("#main .section03 .ttl .tabNavim2").stop(true, false).removeClass('act');
}
if (tp2 <= 150) {
$("#main .section03 .ttl .tabNavim2").stop(true, false).removeClass('act');
}
*/
});
}