$(function () {
//顶部轮播
// var bannerswiper = new swiper('#bannerswiper', {
// loop: true,
// autoplay: 3000,
// speed: 500,
// calculateheight: true,
// pagination: '#bannerswiper-pagination',
// paginationclickable: true,
// oninit: function(bannerswiper) {
// //swiper.swipeprev();
// $('#bannerswiper-right').click(function() {
// bannerswiper.swipenext();
// });
// $('#bannerswiper-left').click(function() {
// bannerswiper.swipeprev();
// })
// }
// });
if(document.getelementbyid('bannerswiper')){
var bannerswiper = new swiper('#bannerswiper', {
calculateheight: true,
paginationclickable: true,
oninit: function (bannerswiper) {
//swiper.swipeprev();
$('#bannerswiper-right').click(function () {
bannerswiper.swipenext();
});
$('#bannerswiper-left').click(function () {
bannerswiper.swipeprev();
})
}
});
}
$('.footer').html('
'+
'
'+
'
'+
'爱施德官方微信'+
'
'+
'
'+
'
'+
'
深圳总部'+
'
'+
'地址:深圳市南山区科发路83号南山金融大厦18层
'+
'
'+
'电话:0755-21519888
'+
'
'+
'传真:0755-83890101
'+
'
'+
'
'+
'
北京总部'+
'
'+
'地址:北京市朝阳区百子湾西里302号楼'+
'
'+
'
'+
'电话:010-87957222
'+
'
'+
'传真:010-57330642
'+
'
'+
'
'+
'
'+
'
'+
'
')
//轮播翻页箭头交互
$("#bannerswiper").hover(function () {
$(this).find(".swiper-button-prev").animate({ left: '60px' }, 200);
$(this).find(".swiper-button-next").animate({ right: '60px' }, 200);
}, function () {
$(this).find(".swiper-button-prev").animate({ left: '-130px' }, 200);
$(this).find(".swiper-button-next").animate({ right: '-130px' }, 200);
})
//标签切换
$(".tab >*").hover(function () {
var i = $(this).index();
$(this).addclass('act').siblings().removeclass('act');
$(this).parent().next(".tabcontent").children("div").eq(i).addclass('act').siblings().removeclass('act');
return false
});
var scrollend = true;
window.onscroll = function () {
if (scrollend) {
scrollend = false;
var sy = window.scrolly || window.pageyoffset || document.documentelement.scrolltop;
var hasgotopdiv = !!document.getelementbyid('gotop');
if (hasgotopdiv) {
if (sy > 720) {
document.getelementbyid('gotop').style.display = 'block';
} else {
document.getelementbyid('gotop').style.display = 'none';
}
$("#gotop").on('click', function (event) {
window.scrollto(0, 0);
document.getelementbyid('gotop').style.display = 'none';
});
} else {
var gtdiv = document.createelement('div');
gtdiv.id = 'gotop';
document.body.appendchild(gtdiv);
}
settimeout(function () {
scrollend = true;
}, 100)
}
}
getnav();
});
function urlparam(param) {
var val = decodeuricomponent((new regexp('[?|&]' + param + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ""])[1].replace(/\+/g, '%20')) || null;
return val;
}
function getnav() {
$('.topsrch').html('