
var banner_ani = gsap.timeline({
  scrollTrigger: {
    trigger: "#banner",
    scroller: ".smooth-scroll",
    scrub: true,
    pin: false,
    start: "top bottom",
    end: "+=200%"
  }
});

banner_ani.to("#banner-content", 0.5, {y: '150'}, 0.2);
banner_ani.to("#farmhouse_img", 0.5, {y: '60%'}, 0.2);


var inspiration_main = gsap.timeline({
  scrollTrigger: {
    trigger: "#inspiration_main",
    scroller: ".smooth-scroll",
    scrub: true,
    pin: false,
    start: "top bottom",
    end: "+=200%"
  }
});

inspiration_main.to("#inspiration_1", 0.5, {y: '250'}, 0.2);
// inspiration_main.to("#farmhouse_img", 0.5, {y: '60%'}, 0.2);

// // product_2
// var product = gsap.timeline({
//   scrollTrigger: {
//     trigger: "#product_bg",
//     scroller: ".smooth-scroll",
//     scrub: true,
//     pin: true,
//     start: "top top",
//     end: "+=200%"
//   }
// });

// product.from("#product_2", 0.3, {y: '200%'}, 0.1);
// product.to("#product_1", 0.3, {filter:"blur(5px)"}, 0.1);
// product.to("#product_1", 0.3, {backgroundColor:"#fff"}, 0.1);
// product.from("#fog_img", 0.3, {opacity:"0"}, 0.1);

var about_us = gsap.timeline({
  scrollTrigger: {
    trigger: "#about_us",
    scroller: ".smooth-scroll",
    scrub: true,
    pin: false,
    start: "top 120%",
    end: "top -30%"
  }
});
about_us.from("#about_us_img_1", 0.5, {rotate: '-30deg', y: '100'}, 0.2);
about_us.from("#about_us_img_2", 0.5, {rotate: '30deg', y: '150'}, 0.2);

var why_choose_us = gsap.timeline({
  scrollTrigger: {
    trigger: "#why_choose_us",
    scroller: ".smooth-scroll",
    scrub: true,
    pin: false,
    start: "top 120%",
    end: "top -30%"
  }
});

why_choose_us.from("#why_choose_us_img_1", 0.5, {rotate: '-30deg', y: '100'}, 0.2);
why_choose_us.from("#why_choose_us_img_2", 0.5, {rotate: '30deg', y: '150'}, 0.2);


$('.showcase-slider').slick({
  autoplay: true,
  speed: 3000,
  lazyLoad: 'progressive',
  arrows: true,
  pauseOnHover: false,
  pauseOnDotsHover: false,
  dots: false,
  cssEase: 'cubic-bezier(0.77, 0, 0.18, 1)',
  prevArrow: '<button type="button" class="slick-prev"><i class="fas fa-angle-left"></i></button>',
  nextArrow: '<button type="button" class="slick-next"><i class="fas fa-angle-right"></i></button>',
});

if ($('.tms-showcase-items').length) {
  $('.tms-showcase-items').find('.tms-showcase-item:first-child').addClass('hover');
}
$('.tms-showcase-item').mouseenter(function(){
  var obj = $(this);
  obj.closest('.tms-showcase-items').find('.tms-showcase-item').removeClass('hover');
  obj.addClass('hover');
});

// gsap.from(".counter h3", {
//   textContent: 0,
//   duration: 2,
//   ease: Power1.easeIn,
//   snap: { textContent: 1 },
//   stagger: 0,
//   scrollTrigger: {
//     trigger: '.counter h3',
//     start: 'top 95%',
//     scroller: ".smooth-scroll",
//     // toggleActions: 'restart pause',
//     // markers: true
//   }
//   // markers: true
//   // onUpdate: textContent.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
// });

// $('.gallery_slider').slick({
//   autoplay: true,
//   speed: 1000,
//   lazyLoad: 'progressive',
//   arrows: true,
//   pauseOnHover: false,
//   pauseOnDotsHover: false,
//   dots: false,
//   prevArrow: '<button type="button" class="slick-prev"><i class="fas fa-angle-left"></i></button>',
//   nextArrow: '<button type="button" class="slick-next"><i class="fas fa-angle-right"></i></button>',
// });

// $('.testimonial_slider').slick({
//   slidesToShow: 3,
//   slidesToScroll: 1,
//   autoplay: true,
//   speed: 1200,
//   autoplaySpeed: 2000,
//   lazyLoad: 'progressive',
//   arrows: true,
//   dots: false,
//   prevArrow: '<button type="button" class="slick-prev"><i class="fas fa-angle-left"></i></button>',
//   nextArrow: '<button type="button" class="slick-next"><i class="fas fa-angle-right"></i></button>',
//   appendArrows: '.testimonial_slider_arrows',
//   responsive: [
//       {
//         breakpoint: 991,
//         settings: {
//           slidesToShow: 2,
//         }
//       },
//       {
//         breakpoint: 768,
//         settings: {
//           slidesToShow: 1,
//         }
//       }
//   ]
// });


