window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
jQuery(document).ready(function($) {
var PC = $(window).width() > 1024,
winWidth = $(window).width(),
winHeight = $(window).height();
$('.count').length && $('.count').countUp();
$(window).load(function () {
$('html').addClass('dom-loaded');
})
// header
if(PC){
$(window).scroll(function(){
$(window).scrollTop() > 10 ? $('.header.index').addClass('down') : $('.header.index').removeClass('down')
})
$('.header li').hover(function(){
if($(this).find('.drop').length){
$(this).addClass('drop'), $('.nav-bg').addClass('active')
}
}, function(){
if($(this).find('.drop').length){
$(this).removeClass('drop'), $('.nav-bg').removeClass('active');
}
})
$('.header .nav li .drop-2 .box').hover(function(){
if($(this).find('.link a').length){
$(this).find(".link").stop(true,true).slideDown();
}
},function(){
$(this).find(".link").stop(true,true).hide();
});
}else{
$('.header li').each(function(){
if($(this).find('.drop').length){
$(this).find('a.single').after('')
}
})
$('.header li i').click(function(){
$(this).parent('li').siblings().find('.drop').slideUp(), $(this).parent('li').find('.drop').slideToggle();
})
$('.header').append(
'
'
);
$('.mNavBtn').click(function () {
$(this).toggleClass('active');
$('.header .nav').toggleClass('active');
});
}
function videoPopups(){
$('.video-btn').click(function () {
var _url = $(this).attr('data-url')
$('.video-pop video').attr('src', _url)
$('.video-pop video')[0].play();
$('.video-pop').fadeIn(400);
$('body').addClass('hidden');
})
$('.video-pop .close,.video-pop .bg'/*tpa=http://www.aeonmed.com/static/home/js/.video-pop .close,.video-pop .bg*/).click(function () {
$('.video-pop').fadeOut(400);
$('body').removeClass('hidden');
})
}
$('.video-pop').length && videoPopups();
function indexInit(){
if(!PC){
$('.index-s1 .item.white').remove();
}
// section1
var a = $('.index-s1 .swiper-slide').length;
for (var i = 0; i < a; i++) {
$('.index-s1 .ope ul').append('')
}
lock = false;
var bannerSwiper = new Swiper('.index-s1 .swiper-container', {
speed: 800,
parallax : true,
navigation: {
prevEl: '.button-prev',
nextEl: '.button-next',
},
allowTouchMove: false,
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
on: {
transitionStart: function() {
lock = true;
},
transitionEnd: function() {
lock = false;
$('.index-s1 .ope li').eq(this.activeIndex).addClass('active').siblings().removeClass('active');
},
init: function() {
this.emit('transitionEnd'); //鍦ㄥ垵濮嬪寲鏃惰Е鍙戜竴娆ransitionEnd浜嬩欢
}
}
});
bannerSwiper.$el.find('.ope li').on('click',function(){
if(!lock){
bannerSwiper.slideTo($(this).index(), 1000, false);
}
})
bannerSwiper.$el.find('.ope a').on('click',function(){
if(!lock){
$(this).hasClass('play') ? $(this).removeClass('play') : $(this).addClass('play')
$(this).hasClass('play') ? bannerSwiper.autoplay.stop() : bannerSwiper.autoplay.start()
}
})
}
$('.index-main').length && indexInit();
function aboutIndexInit(){
// section3
var aboutIndexSwiper2 = new Swiper('.about-index-s3 .line-box', {
speed: 500,
//allowTouchMove: false,
slidesPerView: 5,
watchSlidesProgress: true,
breakpoints: {
640: {
slidesPerView: 3,
allowTouchMove: true,
}
}
});
var aboutIndexSwiper1 = new Swiper('.about-index-s3 .cont-box', {
speed: 800,
allowTouchMove: false,
navigation: {
prevEl: '.about-index-s3 .button-prev',
nextEl: '.about-index-s3 .button-next',
},
thumbs: {
swiper: aboutIndexSwiper2
},
breakpoints: {
640: {
speed: 500,
allowTouchMove: true,
}
},
on: {
transitionStart: function() {
var yeartxt = aboutIndexSwiper2.slides.eq(this.activeIndex).find('h3').text();
$('.about-index-s3 .year-box').text(yeartxt);
}
}
});
// section4
$('.about-index-s4 .world .dot'/*tpa=http://www.aeonmed.com/static/home/js/.about-index-s4 .world .dot*/).hover(function(){
$(this).addClass('active').siblings().removeClass('active')
}, function(){
$('.about-index-s4 .world .dot:eq(3)').addClass('active').siblings().removeClass('active')
})
}
$('.about-index').length && aboutIndexInit();
function aboutIntroInit(){
$('.about-intro-s2 .tab-tit .item').click(function(){
$(this).addClass('active').siblings().removeClass('active'), $('.about-intro-s2 .tab-cont .child').eq($(this).index()).addClass('active').siblings().removeClass('active')
})
}
$('.about-intro').length && aboutIntroInit();
function aboutHistoryInit(){
if(PC){
var arr = [],
b = $('.about-history-s1 .item'/*tpa=http://www.aeonmed.com/static/home/js/.about-history-s1 .item*/),
c = $('.about-history-s1 .line-box .line'/*tpa=http://www.aeonmed.com/static/home/js/.about-history-s1 .line-box .line*/),
d = $('.about-history-s1 .line-box'),
z;
b.each(function(){
var t = $(this).offset().top;
arr.push(t);
})
$(window).scroll(function(){
z = $(window).scrollTop();
z > winHeight/2 ? d.fadeIn() : d.fadeOut()
var key =0;
var flag = true;
for(var i =0; i= arr[arr.length-key] - winHeight/2){
var index = arr.length-key;
flag = false;
}else{
flag=true;
}
}
}
c.eq(index).addClass('active').siblings().removeClass('active');
})
c.click(function(){
var e = $(this).index();
$('html,body').animate({
'scrollTop': b.eq(e).offset().top - winHeight/3
}, 500)
})
}
}
$('.about-history').length && aboutHistoryInit();
function contactInit(){
$('.comm-crumbs .right-box a').click(function(){
$(this).addClass('active').siblings().removeClass('active');
})
// section1
var f = $('.contact-s1 .item'/*tpa=http://www.aeonmed.com/static/home/js/.contact-s1 .item*/),
g = $('.contact-s1 .tab-tit span')
f.mouseenter(function(){
$(this).addClass('active').siblings().removeClass('active'), g.eq($(this).index()).addClass('active').siblings().removeClass('active')
})
g.click(function(){
$(this).addClass('active').siblings().removeClass('active'), f.eq($(this).index()).addClass('active').siblings().removeClass('active')
})
// section2
var h = $('.contact-s2 .right-box .child');
$('.contact-s2 .select li').click(function(){
var text = $(this).text();
$(this).parents('.select').find('input').attr('value',text);
h.eq($(this).index()).addClass('active').siblings().removeClass('active')
})
// section3
$('.contact-s3 form .box input, .contact-s3 form .box textarea').focus(function(){
$(this).parents('.box').addClass('active').find('span').hide();
})
$('.contact-s3 form .box input, .contact-s3 form .box textarea').blur(function(){
if($.trim($(this).val()) == ''){
$(this).parents('.box').removeClass('active').find('span').show();
}
})
}
$('.contact-page').length && contactInit();
function recruitInit(){
$('.comm-crumbs .right-box a').click(function(){
var ind = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
if(ind == 0 || ind == 1){
$('.recruit-s2 .tab-tit span').eq(ind).addClass('active').siblings().removeClass('active'), $('.recruit-s2 .tab-cont .child').eq(ind).addClass('active').siblings().removeClass('active')
}
})
// section1
if(PC){
$('.recruit-s1 .item'/*tpa=http://www.aeonmed.com/static/home/js/.recruit-s1 .item*/).eq(0).addClass('active')
$('.recruit-s1 .item'/*tpa=http://www.aeonmed.com/static/home/js/.recruit-s1 .item*/).mouseenter(function(){
$(this).addClass('active').siblings().removeClass('active')
})
}
// section2
$('.recruit-s2 .tab-tit span').click(function(){
$(this).addClass('active').siblings().removeClass('active'), $('.recruit-s2 .tab-cont .child').eq($(this).index()).addClass('active').siblings().removeClass('active')
})
$('.recruit-s2 .item .show'/*tpa=http://www.aeonmed.com/static/home/js/.recruit-s2 .item .show*/).click(function(){
var _par = $(this).parent();
if(!_par.hasClass('active')){
_par.addClass('active').siblings().removeClass('active'), _par.siblings().find('.hide').slideUp(), _par.find('.hide').slideDown();
}else{
_par.removeClass('active').find('.hide').slideUp();
}
})
$('.recruit-s2 .item .close').click(function(){
$(this).parents('.item').removeClass('active').find('.hide').slideUp();
})
// section3
$('.recruit-s3 .tab-tit span').click(function(){
$(this).addClass('active').siblings().removeClass('active'), $('.recruit-s3 .tab-cont .child').eq($(this).index()).addClass('active').siblings().removeClass('active')
})
$('.recruit-s3 .tab-cont .child').each(function(){
var $this = $(this)
var recruitSwiper = new Swiper($this.find('.items'), {
speed: 500,
// allowTouchMove: false,
slidesPerView: 4,
slidesPerGroup: 4,
slidesPerColumn: 2,
spaceBetween: 24,
slidesPerColumnFill : 'row',
navigation: {
prevEl: $this.find('.button-prev'),
nextEl: $this.find('.button-next'),
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 2,
slidesPerGroup: 2,
spaceBetween: 10,
}
},
});
})
}
$('.recruit-page').length && recruitInit();
function museumInit(){
// section1
var museumSwiper1 = new Swiper('.museum-s1 .items', {
speed: 500,
// allowTouchMove: false,
slidesPerView: 4,
slidesPerGroup: 4,
navigation: {
prevEl: $('.museum-s1 .button-prev'),
nextEl: $('.museum-s1 .button-next'),
},
scrollbar: {
el: '.museum-s1 .swiper-scrollbar',
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 2,
slidesPerGroup: 2,
}
},
});
// section3
var museumSwiper3 = new Swiper('.museum-s3 .bot-box .items', {
speed: 500,
// allowTouchMove: false,
slidesPerView: 4,
spaceBetween: 24,
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 3,
spaceBetween: 10,
}
},
});
var museumSwiper2 = new Swiper('.museum-s3 .right-box', {
speed: 500,
navigation: {
prevEl: '.museum-s3 .button-prev',
nextEl: '.museum-s3 .button-next',
},
thumbs: {
swiper: museumSwiper3
}
});
// section4
$('.museum-s4 .item'/*tpa=http://www.aeonmed.com/static/home/js/.museum-s4 .item*/).eq(0).addClass('active')
$('.museum-s4 .item'/*tpa=http://www.aeonmed.com/static/home/js/.museum-s4 .item*/).mouseenter(function(){
$(this).addClass('active').siblings().removeClass('active')
})
}
$('.museum-page').length && museumInit();
function aboutResearchInit(){
$('.about-research-s4 .block').liMarquee({
direction: 'up',
runshort: false,
hoverstop: true,
});
}
$('.about-research').length && aboutResearchInit();
function solutionDetail(){
var solutionSwiper1 = new Swiper('.solution-detail-s2 .items', {
speed: 500,
spaceBetween: winWidth * 0.03,
slidesPerView: 4,
slidesPerGroup: 4,
scrollbar: {
el: '.solution-detail-s2 .swiper-scrollbar',
},
breakpoints: {
1024: {
spaceBetween: 20
},
768: {
slidesPerView: 3,
slidesPerGroup: 3,
},
640: {
slidesPerView: 2,
slidesPerGroup: 2,
spaceBetween: 10
}
},
});
}
$('.solution-detail').length && solutionDetail();
function solutionInit(){
var l = $('.solution-s1 .bg-box'),
m = $('.solution-s1 .item.active').find('img').attr('src');
l.css('background-image', 'url(' + m + ')')
$('.solution-s1 .item'/*tpa=http://www.aeonmed.com/static/home/js/.solution-s1 .item*/).mouseenter(function(){
var src = $(this).find('img').attr('src');
l.css('background-image', 'url(' + src + ')')
$(this).addClass('active').siblings().removeClass('active')
})
if(PC){
// particlesJS
particlesJS('particles-js', {
"particles": {
"number": {
"value": 10,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": ["#ffffff", "#18b9d2", "#fe9553", "#64d7be"]
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"nb_sides": 5
},
"image": {
"src": "img/github.svg"/*tpa=http://www.aeonmed.com/static/home/js/img/github.svg*/,
"width": 100,
"height": 100
}
},
"opacity": {
"value": 1,
"random": true,
"anim": {
"enable": true,
"speed": 1,
"opacity_min": 0,
"sync": false
}
},
"size": {
"value": 12,
"random": true,
"anim": {
"enable": false,
"speed": 4,
"size_min": 0.3,
"sync": false
}
},
"line_linked": {
"enable": false,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
"width": 1
},
"move": {
"enable": true,
"speed": 1,
"direction": "none",
"random": true,
"straight": false,
"out_mode": "out",
"bounce": false,
"attract": {
"enable": false,
"rotateX": 600,
"rotateY": 600
}
}
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": false,
"mode": "bubble"
},
"onclick": {
"enable": false,
"mode": "repulse"
},
"resize": true
},
"modes": {
"grab": {
"distance": 400,
"line_linked": {
"opacity": 1
}
},
"bubble": {
"distance": 250,
"size": 0,
"duration": 2,
"opacity": 0,
"speed": 3
},
"repulse": {
"distance": 400,
"duration": 0.4
},
"push": {
"particles_nb": 4
},
"remove": {
"particles_nb": 2
}
}
},
"retina_detect": true
});
// line
var unit = 150;
var canvas, context, canvas2, context2, height, width, xAxis, yAxis;
canvas = document.getElementById("sineCanvas");
canvas.width = winWidth + 20;
canvas.height = winHeight;
context = canvas.getContext("2d");
height = canvas.height;
width = canvas.width;
xAxis = Math.floor(height / 2);
yAxis = 0;
draw();
function draw() {
context.clearRect(0, 0, width, height);
drawWave('#ffffff', .2, 3, 0);
drawWave('#ffffff', .2, 3, 5);
drawWave('#ffffff', 1, 8, 2);
draw.seconds = draw.seconds + .006;
draw.t = draw.seconds * Math.PI;
setTimeout(draw, 35);
};
draw.seconds = 0;
draw.t = 0;
function drawWave(fillcolor, alpha, zoom, delay) {
context.fillStyle = fillcolor;
context.globalAlpha = alpha;
context.beginPath();
drawSine(draw.t / 0.5, zoom, delay);
context.lineTo(width + 10, height);
context.lineTo(0, height);
context.closePath();
context.strokeStyle = fillcolor;
context.stroke();
}
function drawSine(t, zoom, delay) {
var x = t;
var y = Math.sin(x) / zoom;
context.moveTo(yAxis, unit * y + xAxis);
for (i = yAxis; i <= width + 10; i += 10) {
x = t + (-yAxis + i) / unit / zoom;
y = Math.sin(x - delay) / 3;
context.lineTo(i, unit * y + xAxis);
}
}
}
}
$('.solution-page').length && solutionInit();
})