//特色园博鼠标效果
function featureListEvent(){
$("#featureList a").hover(function(){
$('.con',this).stop().animate({bottom:'0'},'fast')
},function(){
$('.con',this).stop().animate({bottom:'-100%'},'normal')
});
}
//微人物鼠标效果
function microMan(){
$("#J_micro1 li").hover(function(){
if($(this).hasClass('a')){
$('.con',this).stop().animate({bottom:'0'},'fast')
}else{
$('.con',this).stop().animate({top:'0'},'fast')
}
},function(){
if($(this).hasClass('a')){
$('.con',this).stop().animate({bottom:'-100%'},'normal')
}else{
$('.con',this).stop().animate({top:'-100%'},'normal')
}
});
$("#J_micro2 a").hover(function(){
$('.con',this).css('bottom','0')
},function(){
$('.con',this).css('bottom','-36px')
});
}
//园博活动轮播图
function moduleSlider(){
var moduleSliderSwiper = new Swiper ('#moduleSlider .swiper-container', {
direction: 'horizontal',
loop: true,
pagination : '#moduleSlider .swiper-pagination',
paginationClickable :true
});
}
//园博活动轮播图
function actPageTopSwiperFn(){
var actLi = $("#J_actList li");
var titLi = $("#J_titList li");
var actListLength = actLi.length;
console.log(actListLength)
var actPageTopSwiper = new Swiper ('#actPageTopSwiper .swiper-container', {
direction: 'horizontal',
loop: true,
pagination : '#actPageTopSwiper .swiper-pagination',
paginationClickable :true,
nextButton: '#actPageTopSwiper .swiper-button-next',
prevButton: '#actPageTopSwiper .swiper-button-prev',
onSlideChangeStart: function(swiper){
var index = swiper.activeIndex;
if(index > actListLength){index = 1}
if(0 == index){index = actListLength}
actLi.eq(index - 1).addClass('cur').siblings().removeClass('cur');
titLi.eq(index - 1).addClass('cur').siblings().removeClass('cur');
}
});
actLi.mouseenter(function(){
var index = $(this).index();
actPageTopSwiper.slideTo(index+1, 500, false);
});
}
//图说园博-城市展园
function showBigImg(){
var ul = $("#J_showList");
var lia = $("#J_showList a");
var bigImg = $("#J_showBigImg");
var ww = $(window).width();
var curImg = ul.find('.cur').children('a').attr('data-img');
var curUrl = ul.find('.cur').children('a').attr('href');
bigImg.attr({
'href':curUrl,
'style':"background-image:url("+curImg+")"
}).html("");
lia.click(function(){
$(this).parent().addClass('cur').siblings().removeClass('cur');
var curImg = $(this).attr('data-img');
var curUrl = $(this).attr('href');
bigImg.attr({
'href':curUrl,
'style':"background-image:url("+curImg+")"
}).html("
");
return false;
});
}
//回到顶部
function goTop(){
$('body,html').animate({scrollTop: 0}, 400);
return false;
}
//小导航展开
function smallTopNav(){
var list = $("#header .mainNav").html();
var html = '