$(function() {

	// 轮播图
	var swiper1 = new Swiper('.slide1', {
		autoplay: {
			delay: 5000, //5秒切换一次
		},
		effect: 'fade',
		loop: true,
		pagination: {
			el: '.swiper-pagination',
			clickable: true,
			renderBullet: function(index, className) {
				return '<span class="' + className + '">' + '0' + (index + 1) + '</span>';
			},
		},
		navigation: {
			nextEl: '.button-next',
			prevEl: '.button-prev',
		},
	});

	// 手风琴
	$('.item_num_top').mouseenter(function() {
		$('.item_num_top').removeClass('active');
		$(this).addClass('active');
	})

	$('.item_img').mouseover(function() {
		$(this).children('img').css('transform', 'scale(1.1)');
		$(this).mouseout(function() {
			$(this).children('img').css('transform', 'scale(1)');
		})
	})

	// 通知要闻标签
	$('.tabs-op li').mouseover(function() {
		$('.tabs-op li').removeClass('active-tabs');
		$(this).addClass('active-tabs');
		$('.subContent>div').eq($(this).index()).css('display', 'block').siblings().css('display', 'none')
	})

	// 顶部菜单
	$('.navBox div').mouseover(function() {
		$(this).find('ul').css('display', 'block');
		$(this).mouseout(function() {
			$(this).find('ul').css('display', 'none');
		})
	})

	$('.navBox>div').click(function() {
		$('.navBox>div>span').removeClass('active-nav');
		$(this).children('span').addClass('active-nav');
	})

	// 图标菜单部分
	$('.top-right-Box li a').mouseover(function() {
		$(this).children('div').css('backgroundImage', 'url(http://qlyy.e23.cn/statics/qlyy/img/icon-bg-g.png)');
		$(this).children('span').css('color', '#018353');
		var srcStr = $(this).find('img').attr('src');
		srcStr = srcStr.replace('-g', "-w");
		$(this).find('img').attr('src', srcStr);
		// console.log(srcStr);
		$(this).mouseout(function() {
			$(this).children('span').css('color', '	#787878');
			$(this).children('div').css('backgroundImage', 'url(http://qlyy.e23.cn/statics/qlyy/img/icon-bg.png)');
			srcStr = srcStr.replace('-w', "-g");
			$(this).find('img').attr('src', srcStr);
		})
	})

	// 图标菜单部分
	$('.zt-content a').mouseover(function() {
		$(this).find('p').css('transform', 'scale(1.1)');
		// $(this).children('span').css('color', '#018353').css('transform', 'scale(1.05)');
		$(this).mouseout(function() {
			// $(this).children('span').css('color', '	#787878').css('transform', 'scale(1)');
			$(this).find('p').css('transform', 'scale(1)');
		})
	})


	var swiper2 = new Swiper('.slide2', {
		direction: 'horizontal',
		slidesPerView: 5,
			autoplay:true,
		spaceBetween: 30,
		// slidesPerGroup: 3,
		loop: true,
		// loopFillGroupWithBlank: true,
		navigation: {
			nextEl: '.arrow-next',
			prevEl: '.arrow-prev',
		},
	});

	// 首页新闻轮播
	var swiper3 = new Swiper('.newsSwiper', {
		loop: true,
		autoplay: {
			delay: 2000, //5秒切换一次
		},
		pagination: {
			el: '.swiper-pagination',
			clickable: true,
		},
		navigation: {
			nextEl: '.arrow-right',
			prevEl: '.arrow-left',
		},
	});

	new WOW().init();
})


