$(function() {
	
	// $('.fancybox').fancybox();
	
	var in_banner_swiper = new Swiper('.in_banner_swiper',{
		pagination: '.in_banner_pa',
		loop:true,
		grabCursor: true,
		autoplay : 3500,
		autoplayDisableOnInteraction : false,
		speed: 1000,
		paginationClickable: true
	});

	$(window).scroll(function(){
		var scrollTop = $(document).scrollTop();
		if(scrollTop > 0) {
			$(".header_w").addClass("scroll");
		}else {
			$(".header_w").removeClass("scroll");
		}
	})
	
	var in_customer_swiper = new Swiper('.in_customer_swiper',{
		paginationClickable: true,
    slidesPerView: 5,
    loop: true,
		autoplay: 3000,
		autoplayDisableOnInteraction : false,
  });
	$('.in_customer_ctrl.left').on('click', function(e){
		console.log(e)
		e.preventDefault();
		in_customer_swiper.swipePrev();
	})
	$('.in_customer_ctrl.right').on('click', function(e){
		console.log(1)
		e.preventDefault();
		in_customer_swiper.swipeNext();
	})

	$("#side ul .li").hover(function(){
		$(this).find(".sidebox").stop().animate({"width":"180px"}).css({"opacity":"1","filter":"Alpha(opacity=100)"});
	},function(){
		$(this).find(".sidebox").stop().animate({"width":"54px"}).css({"opacity":"0.8","filter":"Alpha(opacity=80)"});
	});

	$("#side ul .code").hover(function() {
		//setTimeout(function() {
			$("#side .code_img").stop().fadeIn();
		//}, 100)
	}, function() {
		$("#side .code_img").stop().fadeOut();
	})

	$("#side .sidetop").click(function(){
		$('html,body').animate({'scrollTop':0},300);
	});
	
}); 