// 阻止浏览器橡皮筋效果
document.addEventListener('touchmove', function (e) {
e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
}, {passive: false}); //passive 参数不能省略,用来兼容ios和android
// 阻止body冒泡
document.body.addEventListener('touchmove', function (e) {
e.stopPropagation();
});
// 加载动画元素父级设置相对定位,溢出隐藏
$('.blackInOut,.blackOut,.whiteOut').parent().css({"position":"relative","overflow":"hidden"});
//pullpage翻屏
var second_p1weight = $('.second_p1').width();//得到手机图层的width
var sp1weight = $('.second_nei1').width();//得到手机图层的移动层的 width
var lert = $('.center-wrap').width() - sp1weight//算出他们的差
var $mlNav = $('.zbtopnav');
$('#dowebok').fullpage({
verticalCentered: !0,
navigation: !0,
scrollingSpeed: 800,
afterRender: function () {
$('.second_p1').delay(0).animate({
bottom: '0'
}, 500, 'easeInOutCirc');
$('.second_nei1').delay(500).animate({
left: lert,
opacity: 1,
}, 500, 'easeInOutCirc');
$('.section .help-block').click(function () {
$.fn.fullpage.moveSectionDown();
});
},
afterLoad: function (anchorLink, index) {
if(index==2){
$('.about .boxnum').removeClass('fadeOut').addClass('fadeInLeft');
$('.about .move1').removeClass('fadeOut').addClass('fadeInUp');
$('.case-box').removeClass('fadeOut').addClass('fadeInRight');
setTimeout(function(){
$('.about .icon-box').removeClass('fadeOut').addClass('fadeInUp');
},500);
setTimeout(function(){
$('.case-box').removeClass('fadeOut').addClass('fadeInLeft');
},100);
}else if(index == 3){
$('.product .pro-ys').removeClass('fadeOut').addClass('fadeInUp');
$('.product .pro-pic').removeClass('fadeOut').addClass('fadeInUp');
}else if(index == 4){
$('.case .about-box').removeClass('fadeOut').addClass('fadeInUp');
$('.case .ys-num').removeClass('fadeOut').addClass('fadeInUp');
$('.case .about-block').removeClass('fadeOut').addClass('fadeInUp');
var windSize = $(window).width();
if (windSize > 768) {
var options = {
useEasing: false,
useGrouping: false,
separator: ',',
decimal: '.',
};
var demo1 = new CountUp("num1",1,2005,0,1.5,options);
var demo2 = new CountUp("num2",1,1300,0,1.5,options);
demo1.start();
demo2.start();
}
}else if(index == 5){
var h = $("#c-header");
$('.news .c-container').removeClass('fadeOut').addClass('fadeInUp');
}else if(index == 6){
$('.part .part-block').removeClass('fadeOut').addClass('fadeInUp');
}
},
// onLeave: function (index, nextIndex, direction) {
// if (index == 1) {
// var h = $("#c-header");
// h.removeClass("c-head-hide");
// }
// if (index == 4) {
// var h = $("#c-header");
// h.removeClass("c-head-hide");
// }else if (index == 5) {
// var h = $("#c-header");
// h.removeClass("c-head-hide");
// }else if(index == 6){
// var hs = $("#c-header");
// hs.removeClass("c-head-hide");
// // hs.addClass("c-head-hide");
// hs.css("background-color","rgba(255,255,255,0)");
// }else if (index == 7) {
// var h = $("#c-header");
// h.removeClass("c-head-hide");
// }
// }
});
headHover();
// 鼠标移入导航效果
function headHover(){
var h = $("#c-header");
var aLi = $("#c-header .c-nav li");
var aItem1 = $("#c-header .c-nav li .c-list1 .c-item");
var aItem2 = $("#c-header .c-nav li .c-list2 .c-item");
var num = 0;
// h.hover(function(){
// $(this).addClass("c-head-hide");
// },function(){
// if($(window).scrollTop()<50 && $("#c-placeholder").length==0){
// $(this).removeClass("c-head-hide");
// }
// });
aLi.hover(function(){
$(this).find(".c-list-box").css({"display":"block","opacity":"0"});
$(this).find(".c-list-box").stop().animate({"top":"93px","opacity":"1"},500);
},function(){
if($("#c-placeholder").length==0 && $(window).scrollTop()<50){
$(this).find(".c-list-box").stop().animate({"top":"100px","opacity":"0"},500,function(){
$(this).css({"display":"none"});
});
}else{
$(this).find(".c-list-box").stop().animate({"top":"93px","opacity":"0"},500,function(){
$(this).css({"display":"none"});
});
}
});
fn1();
aItem1.hover(function(){
num = $(this).index();
fn1();
});
function fn1(){
aItem1.removeClass("active");
aItem1.eq(num).addClass("active");
aItem2.removeClass("active");
aItem2.eq(num).addClass("active");
}
};
/*abouts*/
$("#c-about .boxnum .nums").mouseover(function(){
$(this).addClass("active").siblings().removeClass("active");
})
$(".mypower ul li").mouseover(function(){
$(this).addClass("active").siblings().removeClass("active");
})
/*products*/
proslist();
function proslist(){
var swiper = new Swiper('.productsinfo', {
slidesPerView: 3,
slidesPerGroup : 5,
spaceBetween: 25,
autoplay: true,
pagination: {
el: '.navtiagn .swiper-pagination',
clickable :true,
},
navigation: {
nextEl: '.navtiagn .swiper-button-next',
prevEl: '.navtiagn .swiper-button-prev',
},
breakpoints: {
500:{
slidesPerView: 2,
slidesPerGroup : 2,
},
768:{
slidesPerView: 2,
slidesPerGroup : 4,
}
}
});
}
// 导航
cNav();
function cNav(){
var oBody = $("body");
var oNav = $("#c-header .c-nav");
var oBtn = $("#c-header .c-switch");
var oL = $("#c-header .c-nav li");
var oA = $("#c-header .c-nav2 a");
var num = 0;
oBtn.click(function(){
oBody.toggleClass('c-open');
});
$(window).resize(function(){
if ($("#c-header .c-nav").css("display") == "block") {
oBody.removeClass("c-open");
}
});
oL.hover(function(){
$(this).children("ul").stop().slideToggle();
},function(){
$(this).children("ul").stop().slideToggle();
});
oA.click(function(){
$(this).next().slideToggle();
});
oL.each(function(){
if($(this).hasClass("active")){
num = $(this).index();
}
$(this).hover(function(){
oL.eq(num).removeClass("active");
},
function(){
oL.eq(num).addClass("active");
});
});
}
// 顶部语言、搜索
topMove();
function topMove(){
var oBtn1 = $("#c-header .c-nav .c-language>a");
var oBtn2 = $("#c-header .c-nav .c-search-box>a");
var oList1 = $("#c-header .c-nav .c-language .c-list");
var oList2 = $("#c-header .c-nav .c-search-box form");
var oButton = $("#c-header .c-nav .c-search-box form button");
oBtn1.click(function(e){
e.stopPropagation();
oList1.stop().fadeToggle();
oList2.stop().fadeOut();
});
oBtn2.click(function(e){
e.stopPropagation();
oList2.stop().fadeToggle();
oList1.stop().fadeOut();
});
oList2.click(function(e){
e.stopPropagation();
});
$("html,body").click(function(){
oList2.stop().fadeOut();
oList1.stop().fadeOut();
});
}
// 首页轮播
banner1();
function banner1(){
var swiper = new Swiper('.c-banner1', {
speed:1000,
autoplay : {
delay:4000,
disableOnInteraction: false,
},
effect : 'fade',
pagination: {
el: '.c-banner1 .swiper-pagination',
clickable :true,
// renderBullet: function (index, className) {
// return '
';
// },
renderBullet: function (index, className) {
return '' + '0' + (index + 1) + '';
},
},
on:{
init: function(){
swiperAnimate(this); //初始化完成开始动画
},
slideChangeTransitionEnd: function(){
swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
}
}
});
}
//abouts
$('.c-img-box li').mouseover(function(){
let ins = $(this).index();
$(".c-img-box li").eq(ins).addClass("act").siblings().removeClass("act");
})
$(".tabs span").on('touchstart mousedown', function(e) {
e.preventDefault()
$(".tabs .active").removeClass('active');
$(this).addClass('active');
galleryThumbsuls.slideTo($(this).index(),1000, false);
});
$(".tabs span").click(function(e) {
e.preventDefault();
});
/*goods*/
var galleryThumbs = new Swiper('#c-top-bg .gallery-thumbs', {
spaceBetween: 23,
slidesPerView: 4,
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
});
var galleryTop = new Swiper('#c-top-bg .gallery-top', {
spaceBetween: 10,
navigation: {
nextEl: '#c-top-bg .swiper-button-next',
prevEl: '#c-top-bg .swiper-button-prev',
},
thumbs: {
swiper: galleryThumbs
}
});
/*news*/
$(".newcard .col-md-6").mousemove(function(){
$(this).find(".imgbox").addClass("active");
$(this).siblings().find(".imgbox").removeClass("active");
})
/* cbuilds*/
$(".news-slider__wrp .news-slider__item").mousemove(function(){
$(this).addClass("on");
$(this).siblings().removeClass("on");
})
/*c_yw*/
$(".ywadvs ul li").mousemove(function(){
$(this).addClass("on");
$(this).siblings().removeClass("on");
})
// 伙伴轮播
banner2();
function banner2(){
var swiper = new Swiper('.case-swiper', {
autoplay: true,
loop:true,
pagination: {
el: '.swiper-pagination',
type: 'fraction',
},
navigation: {
nextEl: '.case-right-bt',
prevEl: '.case-left-bt',
},
});
}
// 伙伴轮播
banner3();
function banner3(){
var swiper = new Swiper('.c-banner3', {
slidesPerView: 3,
autoplay: true,
breakpoints: {
700:{
slidesPerView: 1,
slidesPerGroup : 1,
},
992:{
slidesPerView: 2,
slidesPerGroup : 2,
}
}
});
}
// 领导致辞
banner4();
function banner4(){
var swiper = new Swiper('.c-banner4', {
slidesPerView: 1,
loop:true,
navigation: {
nextEl: '.c-banner4 .swiper-button-next',
prevEl: '.c-banner4 .swiper-button-prev',
},
});
}
profile2();
function profile2(){
var swiper = new Swiper('#c-profile2 .c-text', {
direction: 'vertical',
slidesPerView: 'auto',
freeMode: true,
scrollbar: {
el: '#c-profile2 .c-text .swiper-scrollbar',
},
mousewheel: true,
});
}
// 公司简介
profile1();
function profile1(){
var swiper = new Swiper('#c-profile1 .swiper-container', {
direction: 'vertical',
slidesPerView: 'auto',
freeMode: true,
scrollbar: {
el: '#c-profile1 .swiper-scrollbar',
},
mousewheel: true,
});
}
/* 历史 */
banner5();
function banner5(){
var banner5 = new Swiper('.c-banner5', {
speed:2000,
autoplay : {
delay:4000
},
slidesPerView: 2,
autoplay: true,
breakpoints: {
700:{
slidesPerView: 1,
},
992:{
slidesPerView: 2,
}
},
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
});
var banner5Img = new Swiper('.c-banner5-img', {
speed:2000,
autoplay : {
delay:4000
},
effect : 'fade',
autoplay: true,
thumbs: {
swiper: banner5
}
});
}
banner6();
function banner6(){
var banner6Bottom = new Swiper('.c-banner6-bottom', {
loop:true,
autoplay:true,
slidesPerView: 11,
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
breakpoints: {
700:{
slidesPerView: 4,
},
}
});
var banner6Top = new Swiper('.c-banner6-top', {
loop:true,
autoplay:true,
thumbs: {
swiper: banner6Bottom
},
navigation: {
nextEl: '.c-banner6-top .swiper-button-next',
prevEl: '.c-banner6-top .swiper-button-prev',
},
});
}
// 荣誉
banner7();
function banner7(){
var swiper = new Swiper('.c-banner7', {
spaceBetween: 30,
autoplay:true,
loop:true,
slidesPerView: 3,
navigation: {
nextEl: '.c-banner7 .swiper-button-next',
prevEl: '.c-banner7 .swiper-button-prev',
},
breakpoints: {
500:{
slidesPerView: 1,
},
768:{
slidesPerView: 2,
}
}
});
}
// 生产范围
banner8();
function banner8(){
var swiper = new Swiper('.c-banner8', {
spaceBetween: 15,
autoplay:true,
slidesPerView: 4,
navigation: {
nextEl: '.c-banner8-wrap .swiper-button-next',
prevEl: '.c-banner8-wrap .swiper-button-prev',
},
breakpoints: {
768:{
slidesPerView: 2,
}
}
});
}
// 薪酬福利
banner9();
function banner9(){
var swiper = new Swiper('.c-banner9', {
spaceBetween: 15,
autoplay:true,
loop:true,
slidesPerView: 4,
pagination: {
el: '.c-banner9 .swiper-pagination',
},
breakpoints: {
500:{
slidesPerView: 1,
},
768:{
slidesPerView: 2,
}
}
});
}
// 薪酬福利
banner10();
function banner10(){
var swiper = new Swiper('.c-banner10', {
spaceBetween: 15,
autoplay:true,
loop:true,
slidesPerView: 2,
navigation: {
nextEl: '.c-banner10-wrap .swiper-button-next',
prevEl: '.c-banner10-wrap .swiper-button-prev',
},
breakpoints: {
500:{
slidesPerView: 1,
},
768:{
slidesPerView: 2,
}
}
});
}
// 可视化数据滚动
visualData($(".c-vData"));
function visualData(obj){
$(window).load(function(){
obj.each(function(){
var h = Number($(this).html());
var t = "";
var n = Math.ceil(h/20);
var a = true;
var This = $(this);
if($(this).length!=0){
t = $(this).offset().top;
}
This.html(0);
fn1();
$(window).scroll(function(){
fn1();
});
function fn1(){
var wT = $(window).scrollTop();
if(wT>t-$(window).height()+50 && wT=h) {
y = h;
clearInterval(timer2);
}
This.html(y);
y+=n;
},100);
}
}
});
});
}
// 导航显示
navFade();
function navFade(){
var i = $(window).scrollTop();
var obj = $("#c-header");
$(window).scroll(function(){
if($(this).scrollTop()>i && $(this).scrollTop()>50){
i = $(this).scrollTop();
// obj.addClass("c-head-move");
$(".goodsboxsize.down").css({"marginTop":"0px"});
}else{
i = $(this).scrollTop();
// obj.removeClass("c-head-move");
$(".goodsboxsize.down").css({"marginTop":"80px"});
}
});
}
// 页面滚动隐藏导航
//去掉了
isScroll();
function isScroll(){
var i = $(window).scrollTop();
var obj = $("#c-header");
if($("#c-placeholder").length!=0){
obj.addClass("c-head-hide");
}else{
fn1();
$(window).scroll(function(){
i = $(this).scrollTop();
fn1();
});
}
function fn1(){
if(i>50){
obj.addClass("c-head-hides");
}else{
obj.removeClass("c-head-hides");
}
}
}
/* cx */
var galleryThumbs = new Swiper('.cxbox .gallery-thumbs', {
spaceBetween: 10,
slidesPerView: 5,
freeMode: true,
watchSlidesVisibility: true,
watchSlidesProgress: true,
});
var galleryTop = new Swiper('.cxbox .gallery-top', {
effect:'fade',
initialSlide: 2,
spaceBetween: 10,
navigation: {
nextEl: '.cxbox .swiper-button-next',
prevEl: '.cxbox .swiper-button-prev',
},
thumbs: {
swiper: galleryThumbs
}
});
/*ywfg*/
var idnums=9;
var is=0,ser=0;
var s1=setInterval(function(){
is++;
if(is==idnums){
is=1;
}
$(".lottery-unit-"+ this.is).addClass("on").parents('li').siblings().find('a').removeClass("on");
},2200);
var sernums=6;
var s2=setInterval(function(){
ser++;
if(ser==sernums){
ser=0;
}
$(".serinfo ul li").eq(ser).addClass("on").siblings().removeClass("on");
},2200);
/*sjcase*/
var swiper = new Swiper('.sjcaselist .swiper-container', {
slidesPerView: 3,
spaceBetween: 50,
pagination: {
el: '.sjcaselist .swiper-pagination',
clickable: 'true',
},
breakpoints: {
500:{
slidesPerView: 1,
},
992:{
slidesPerView: 2,
spaceBetween: 15,
},
1599:{
slidesPerView: 3,
spaceBetween: 50,
}
}
});
// 视频播放
videoPlay();
function videoPlay(){
var oV1 = $("#c-about .c-right-box .c-video1");
var oPlay = $("#c-about .c-right-box .c-play");
var oV2 = $("#c-video-box .c-video2");
var oClose = $("#c-video-box .c-btn");
var oVbox = $("#c-video-box");
var sUrl = oV1.attr("src");
var vT = null;
oV1.delay(10).attr("src",sUrl);
if(oV1.length!=0){
vT = oV1.offset().top;
}
$(window).scroll(function(){
if($(this).scrollTop()>vT-$(window).height()*0.5 && $(this).scrollTop()vT-$(window).height()*0.5 && $(this).scrollTop()li");
if($(window).width()<=500){
aLi.each(function(){
var This = $(this);
$(this).find(".c-title-box").click(function(){
This.toggleClass("active");
This.find(".c-list").stop().slideToggle();
});
});
}
}
// 点击底部微信弹出二维码
weixin();
function weixin(){
var b = $("#c-footer .c-wx-btn");
var w = $("#c-footer .c-weixin");
var d = w.find(".c-img-box");
b.click(function(){
w.stop().fadeToggle();
});
d.click(function(){
return false;
});
w.click(function(){
w.stop().fadeToggle();
});
}
// 产品下拉动画
productSlide();
function productSlide(){
var aLi = $("#c-product4 .c-left-box .c-list li");
aLi.each(function(){
if($(this).hasClass("active")){
$(this).children("ul").stop().slideDown();
}
});
aLi.click(function(e){
e.stopPropagation();
$(this).children("ul").stop().slideToggle();
$(this).toggleClass("active");
})
}
// 联系我们表单
formTab();
function formTab(){
var ali1 = $("#c-contact .c-list1>li");
var ali2 = $("#c-contact .c-list2>li");
var i = 0;
fn1();
ali1.click(function(){
i = $(this).index();
fn1();
});
function fn1(){
ali1.removeClass("active");
ali1.eq(i).addClass("active");
ali2.removeClass("active");
ali2.eq(i).addClass("active");
}
}
// 地图切换
mapTab();
function mapTab(){
var ali1 = $("#c-contact2 .c-list1>li");
var ali2 = $("#c-contact2 .c-list2>li");
var i = 0;
fn1();
ali1.click(function(){
i = $(this).index();
fn1();
});
function fn1(){
ali1.removeClass("active");
ali1.eq(i).addClass("active");
ali2.removeClass("active");
ali2.eq(i).addClass("active");
}
ali2.each(function(){
var aP = $(this).find(".c-left-box .c-link p");
var aT = $(this).find(".c-left-box .c-text-box .c-item");
var aM = $(this).find(".c-right-box .c-map");
var a = 0;
fn2();
aP.click(function(){
a = $(this).index();
fn2();
});
function fn2(){
aP.removeClass("active");
aP.eq(a).addClass("active");
aT.removeClass("active");
aT.eq(a).addClass("active");
aM.removeClass("active");
aM.eq(a).addClass("active");
}
});
}
// 招聘
join();
function join(){
var aLi = $("#c-join3 .c-list2>li");
aLi.each(function(){
var This = $(this);
$(this).find(".c-title-box").click(function(){
This.toggleClass("active");
This.find(".c-text-wrap").stop().slideToggle();
});
});
}
function go1(){
$("html,body").animate({"scrollTop":$("#c-join").offset().top-40});
}
function go2(){
$("html,body").animate({"scrollTop":$("#c-join3").offset().top});
}
function go3(){
$("html,body").animate({"scrollTop":$("#c-join4").offset().top});
}
// 侧边栏回到顶部
goTop();
function goTop(){
var aTop = $(".backtop");
aTop.click(function(){
$('html,body').animate({scrollTop:0},500);
});
$(window).scroll(function(){
var i = $(this).scrollTop();
if (i > $('html').outerHeight()-$(this).height()-$(this).height()*0.5) {
aTop.fadeIn(500);
}else{
aTop.fadeOut(500);
}
});
}
// 文件选择
function showFile (e, ele) {
var fullFileName = e.target.value;
fullFileName = fullFileName.split('\\');
fileName = fullFileName[fullFileName.length-1];
$(ele).parent().find(".c-text").text("已选择:" + fileName);
$(ele).parents("form").find("[name='fileSubmit']").show();
}
// 简历弹窗
function fixedPop(str){
$("#category4").val(str);
$("#c-fixed-pop").stop().fadeIn();
}
$("#c-fixed-pop .c-close").click(function(event){
event.stopPropagation();
$("#c-fixed-pop").stop().fadeOut();
});
$("#c-fixed-pop").click(function(){
$("#c-fixed-pop").stop().fadeOut();
});
$("#c-fixed-pop form").click(function(event){
event.stopPropagation();
});
// 页面进入动画
(function($) {
function wow() {
var t = .1,
e = !0,
wow = new WOW({
boxClass: "wow",
animateClass: "animated",
offset: 0,
callback: function(e) {
(e = $(e)).css("animation-delay", t.toFixed(1) + "s"),
t += .1;
}
});
$(window).scroll(function() {
e && (t = .2, setTimeout(function() {
e = !0
}, 150), e = !1)
}),
wow.init();
}
wow();
}(jQuery));
/*cbuilding*/
var newswiper = new Swiper('.news-slider', {
slidesPerView: 5,
spaceBetween: 20,
pagination: {
el: '.news-slider__pagination',
},
breakpoints: {
500:{
slidesPerView: 2,
spaceBetween: 10,
autoplay:true,
loop:true,
speed:3000,
},
992:{
slidesPerView: 3,
spaceBetween: 15,
autoplay:true,
loop:true,
speed:3000,
},
1280:{
slidesPerView: 4,
spaceBetween: 20,
}
},
});
// 运动曲线
$.extend(jQuery.easing , {
easeIn: function(x,t, b, c, d){ //加速曲线
return c*(t/=d)*t + b; },
easeOut: function(x,t, b, c, d){ //减速曲线
return -c *(t/=d)*(t-2) + b; },
easeBoth: function(x,t, b, c, d){ //加速减速曲线
if ((t/=d/2) < 1) { return c/2*t*t + b; } return -c/2 * ((--t)*(t-2) - 1) + b; },
easeInStrong: function(x,t, b, c, d){ //加加速曲线
return c*(t/=d)*t*t*t + b; },
easeOutStrong: function(x,t, b, c, d){ //减减速曲线
return -c * ((t=t/d-1)*t*t*t - 1) + b; },
easeBothStrong: function(x,t, b, c, d){ //加加速减减速曲线
if ((t/=d/2) < 1) { return c/2*t*t*t*t + b; } return -c/2 * ((t-=2)*t*t*t - 2) + b; },
elasticIn: function(x,t, b, c, d, a, p){ //正弦衰减曲线(弹动渐入)
if (t === 0) { return b; } if ( (t /= d) == 1 ) { return b+c; } if (!p) { p=d*0.3; } if (!a || a < Math.abs(c)) { a = c; var s = p/4; } else { var s = p/(2*Math.PI) * Math.asin (c/a); } return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; },
elasticOut: function(x,t, b, c, d, a, p){ //正弦增强曲线(弹动渐出
if (t === 0) { return b; } if ( (t /= d) == 1 ) { return b+c; } if (!p) { p=d*0.3; } if (!a || a < Math.abs(c)) { a = c; var s = p / 4; } else { var s = p/(2*Math.PI) * Math.asin (c/a); } return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; },
elasticBoth: function(x,t, b, c, d, a, p){ if (t === 0) { return b; } if ( (t /= d/2) == 2 ) { return b+c; } if (!p) { p = d*(0.3*1.5); } if ( !a || a < Math.abs(c) ) { a = c; var s = p/4; } else { var s = p/(2*Math.PI) * Math.asin (c/a); } if (t < 1) { return - 0.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; } return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*0.5 + c + b; },
backIn: function(x,t, b, c, d, s){ //回退加速(回退渐入)
if (typeof s == 'undefined') { s = 1.70158; } return c*(t/=d)*t*((s+1)*t - s) + b; },
backOut: function(x,t, b, c, d, s){ if (typeof s == 'undefined') { s = 3.70158; //回缩的距离
} return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; },
backBoth: function(x,t, b, c, d, s){ if (typeof s == 'undefined') { s = 1.70158; } if ((t /= d/2 ) < 1) { return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; } return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; },
bounceIn: function(x,t, b, c, d){ //弹球减振(弹球渐出)
return c - this['bounceOut'](x,d-t, 0, c, d) + b; },
bounceOut: function(x,t, b, c, d){ if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + 0.75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + 0.9375) + b; } return c*(7.5625*(t-=(2.625/2.75))*t + 0.984375) + b; },
bounceBoth: function(x,t, b, c, d){ if (t < d/2) { return this['bounceIn'](x,t*2, 0, c, d) * 0.5 + b; } return this['bounceOut'](x,t*2-d, 0, c, d) * 0.5 + c*0.5 + b; }
});