/**
 * @file
 * Custom scripts for theme.
 */
(function ($) {
  Drupal.behaviors.bigw_radix_dropdown = {
    attach: function (context, setting) {
      // Detach mouse hover events for bootstrap dropdown
      $('.dropdown.dropdown-nohover').off('mouseenter.radix.dropdown')
        .off('mouseleave.radix.dropdown')
        .off('focusin.radix.dropdown');
      $('.user-basic-menu').on('mouseenter', function(e) {
        $('.dropdown-toggle').click();
        e.stopPropagation();
      });

      $('.front-read-more').on('click', function() {
        let top = $(".front.how").offset().top - 15;
        $('html, body').animate({
          scrollTop: top
        }, 1000);
      })
    }
  }
})(jQuery);
