
jQuery(document).ready(function($) {

if($(".m2abt_hisSwiper").length){
    $('.m2abt_hisSwiper').slick({
        autoplay: true, 
        arrows: false,
        dots:false,
        infinite: true,
        speed: 500,
        autoplaySpeed: 5000,
        pauseOnHover: false,
        fade: true,
        asNavFor: '.m2abtc4Bom',
    });
	$('.m2abtc4Bom').slick({
        autoplay: true, 
        arrows: true,
        dots:false,
        infinite: true,
        speed: 500,
        autoplaySpeed: 5000,
        pauseOnHover: false,
        slidesToShow: 7,
        slidesToScroll: 1,
        asNavFor: '.m2abt_hisSwiper',
        focusOnSelect: true, 
		centerMode: true,
        centerPadding: '0px', 
        responsive: [
          {
            breakpoint: 992,
            settings: {
              slidesToShow: 5,
            }
          },
		  {
            breakpoint: 767,
            settings: {
              slidesToShow: 3,
            }
          }
        ]
    });
}


$('.m2abt_hisSwiper').on('afterChange', function(event, slick, direction){
    $(".m2abt_c3rimg img").hide();
    $(".m2abt_c3rimg ."+$(".m2abtc4Bom .slick-slide[data-slick-index='"+direction+"'] span").html()).show();
  // left
});

if($(".m2htl_c3swiper").length){
    $('.m2htl_c3swiper').slick({
        autoplay: true, 
        arrows: false,
        dots:false,
        infinite: true,
        speed: 500,
        autoplaySpeed: 3000,
        pauseOnHover: false,
        slidesToShow: 3,
        slidesToScroll: 1,
		centerMode: true, 
        responsive: [
          {
            breakpoint: 992,
            settings: {
              dots: true
            }
          },
		  {
            breakpoint: 767,
            settings: {
              dots: true,
			  slidesToShow: 1,
			  centerPadding: '0px',
            }
          }
        ]
    });
    $('.m2htl_c3swiperWpr .prev').click(function(){
      $('.m2htl_c3swiper').slick('slickPrev')
    })
    $('.m2htl_c3swiperWpr .next').click(function(){
      $('.m2htl_c3swiper').slick('slickNext');
    });
    $('.m2htl_c3swiper').on('afterChange',function(slick,currentSlide){
		$(".m2htl_tags a").removeClass("on");
		$(".m2htl_tags a").eq($('.m2htl_c3swiper .slick-current').find(".m2htl_c2aBox").attr("data-inx")).addClass("on");
    })
	$(".m2htl_tags a").click(function(){
		$(".m2htl_tags a").removeClass("on");
		$(this).addClass("on");
		$('.m2htl_c3swiper').slick('slickGoTo',$(this).index());
		});
}


});