$(function() {
/**
* Mobile Nav
*
* Hubspot Standard Toggle Menu
*/
$('.custom-menu-primary').addClass('js-enabled');
/* Mobile button with three lines icon */
$('.custom-menu-primary .hs-menu-wrapper').before('
');
/* Uncomment for mobile button that says 'MENU'
$('.custom-menu-primary .hs-menu-wrapper').before('MENU
');
*/
$('.custom-menu-primary .flyouts .hs-item-has-children > a').after('
');
$('.mobile-trigger').click(function() {
$(this).next('.custom-menu-primary .hs-menu-wrapper').slideToggle(250);
$('body').toggleClass('mobile-open');
$('.child-trigger').removeClass('child-open');
$('.hs-menu-children-wrapper').slideUp(250);
return false;
});
$('.child-trigger').click(function() {
$(this).parent().siblings('.hs-item-has-children').find('.child-trigger').removeClass('child-open');
$(this).parent().siblings('.hs-item-has-children').find('.hs-menu-children-wrapper').slideUp(250);
$(this).next('.hs-menu-children-wrapper').slideToggle(250);
$(this).next('.hs-menu-children-wrapper').children('.hs-item-has-children').find('.hs-menu-children-wrapper').slideUp(250);
$(this).next('.hs-menu-children-wrapper').children('.hs-item-has-children').find('.child-trigger').removeClass('child-open');
$(this).toggleClass('child-open');
return false;
});
});