jQuery(".slide1").slide({mainCell:".slide1images .uls",autoPlay:true,vis:1,effect:"fade"});
jQuery(".slide2").slide({mainCell:".slide2images .uls",titCell:".slide2hd .uls li",autoPlay:true,vis:1,effect:"fade"});

jQuery(".slide3").slide({mainCell:".slide3images .uls",autoPlay:true,vis:1,effect:"fade"});
jQuery(".slide4").slide({mainCell:".slide4images .uls",titCell:".slide4hd .uls li",autoPlay:true,vis:1,effect:"leftLoop"});
jQuery(".slide5").slide({mainCell:".slide5images .uls",autoPlay:true,vis:1,effect:"fade"});



var myVid=document.getElementById("Music");

//

function ToggleMusic(){
	if(myVid.paused){
		$("#MusicToggleButton").html('点击暂停音乐');
		myVid.play();
	}else{
		$("#MusicToggleButton").html('点击播放音乐');
		myVid.pause();
	}
}

var swiper = new Swiper('.sw', {
  slidesPerView: 3,
  spaceBetween:9,
  centeredSlides: true,
  loop: true,
  autoplay:true,
  navigation: {
	nextEl: '.swiper-button-nextx',
	prevEl: '.swiper-button-prevx',
  },
});


var featureSwiper = new Swiper('.feature-swiper',{
        loop: true,
        speed: 1000,
        autoplay: 3000,
        effect: 'coverflow',
        slidesPerView: 'auto',
        centeredSlides: true,
		slideToClickedSlide: true,
		prevButton:'.prev',
		nextButton:'.next',
		navigation: {
			nextEl: '.next',
			prevEl: '.prev',
	    },
        coverflow: {
            rotate: -10,
            stretch: 0,
            depth: 100,
            modifier: 2,
            slideShadows: false
        }
    });




var swiper = new Swiper('.sx', {
	slidesPerView: 3,
	spaceBetween: 10,
	centeredSlides: true,
	loop: true,
	  autoplay:true,
	  delay: 100,
	pagination: {
	el: '.swiper-pagination',
	clickable: true,
	},
	navigation: {
	nextEl: '.swiper-button-nexty',
	prevEl: '.swiper-button-prevy',
	},
});


$(document).ready(function() {

	if ($("#playbanner").length>0)
	{
			$("#playbanner").ZHYslider({
					fullscreen	:false,
					arrow		:false,		
					speed: 500, 
					space: 2000,
					auto: true, //自动滚动
					affect:'scrollx',
					ctag: '.Slide_'
			})
		
		
	}


	$(".tsBox li").hover(function() {
		$(this).addClass("on").siblings().removeClass("on")
	})



	$("#backtop").on("click",function(){$("html,body").animate({scrollTop:0},1000);})
		window.onscroll=function(){
		var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;
		var pH=document.documentElement.clientHeight;
		var mb=$("#backtop")
		if(scrollTop>=pH){
			mb.show()
		}else{
			mb.hide()
		}
		
	};	
	$("#backtop").bind("click",function(){
	$("html,body").animate({scrollTop:0},500)
		return false; 
	});


	$(".pos-1").bind("click",function(){
		$(".hero-item").removeClass("heroshow").addClass("herono");
		$(".hero1").removeClass("herono").addClass("heroshow");
		$(".hero-nav__item").removeClass("is-crt");
		$(".pos-1").addClass("is-crt");
	});

	$(".pos-2").bind("click",function(){
		$(".hero-item").removeClass("heroshow").addClass("herono");
		$(".hero2").removeClass("herono").addClass("heroshow");
		$(".hero-nav__item").removeClass("is-crt");
		$(".pos-2").addClass("is-crt");
	});

	$(".pos-3").bind("click",function(){
		$(".hero-item").removeClass("heroshow").addClass("herono");
		$(".hero3").removeClass("herono").addClass("heroshow");
		$(".hero-nav__item").removeClass("is-crt");
		$(".pos-3").addClass("is-crt");
	});

	$(".pos-4").bind("click",function(){
		$(".hero-item").removeClass("heroshow").addClass("herono");
		$(".hero4").removeClass("herono").addClass("heroshow");
		$(".hero-nav__item").removeClass("is-crt");
		$(".pos-4").addClass("is-crt");
	});

	$(".pos-5").bind("click",function(){
		$(".hero-item").removeClass("heroshow").addClass("herono");
		$(".hero5").removeClass("herono").addClass("heroshow");
		$(".hero-nav__item").removeClass("is-crt");
		$(".pos-5").addClass("is-crt");
	});





	
	$('.photoshow2').roundabout({
		btnNext: '#ZhiYe2 .move_rights',
	btnNextCallback:function(){
		var indexs	=	$(this).find(".roundabout-in-focus").index()
		$(".photoshow_select2").find("a:eq("+indexs+")").addClass("change").siblings().removeClass("change")
	},
	autoplay: true,
	autoplayDuration: 2000,
	autoplayPauseOnHover: true,
	autoplayCallback: function() {
		var indexs	=	$(this).find(".roundabout-in-focus").index()
		$(".photoshow_select2").find("a:eq("+indexs+")").addClass("change").siblings().removeClass("change")
	},
	btnPrev: '#ZhiYe2 .move_lefts',
	btnPrevCallback:function(){
		var indexs	=	$(this).find(".roundabout-in-focus").index()
		$(".photoshow_select2").find("a:eq("+indexs+")").addClass("change").siblings().removeClass("change")
		
	},
	duration:300});



})