$(function() {
  (function() {
    var $tabTitles = $('.tab-titles >.item');
    var $tabContents = $('.tab-contents >.item');
    $tabTitles.hover(function(){
      var me = $(this);
      if (me.hasClass('active')) return;
      var index = $tabTitles.index(me);
      me.addClass('active').siblings().removeClass('active');
      $tabContents.eq(index).show().siblings('.item').hide();
    })
    // 轮播图
    var swiper = new Swiper('.swiper', {
      loop: true,
      centeredSlides: true,
      autoplay: 3000,
      autoplayDisableOnInteraction: false
    });
  })();
});
