function mmm_keep_open () {
/*
			function_selector = '.mega_main_menu .menu-item *';
			jQuery( function_selector ).unbind();
			jQuery( function_selector ).on( 'focus', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).addClass( 'keep_open' );
			})
			jQuery( function_selector ).on( 'hover', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).removeClass( 'keep_open' );
			})
			jQuery( function_selector ).on( 'blur', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).removeClass( 'keep_open' );
			})
*/
			click_item_2 = false;
/*
			if( true != /iphone|ipad|ipod|android|webos|blackberry|iemobile|opera mini/i.test( navigator.userAgent.toLowerCase() ) ) 
			{
			}
*/
			jQuery( 'body' ).on( 'click', function ( body_el ) {
				menu_item_class = jQuery( body_el.target ).closest( '.menu-item' ).attr( 'class' );
				if ( ( click_item_2 != menu_item_class ) && ( typeof jQuery( body_el.target ).closest( '.mega_main_menu.dropdowns_trigger-click .menu-item:has(.mega_dropdown)' ).attr( 'class' ) != 'undefined' )/* && ( typeof jQuery( body_el.target ).closest( '.mega_main_menu.dropdowns_trigger-click .menu-item:not(.multicolumn_dropdown)' ).attr( 'class' ) == 'undefined' )*/ ) {
					if ( jQuery( body_el.target ).closest( '.menu-item' ).find( '.mega_dropdown' ).length ) {
						body_el.preventDefault();
					}
					jQuery( '.mega_main_menu .keep_open' ).removeClass( 'keep_open' );
					jQuery( body_el.target ).parents( '.menu-item' ).addClass( 'keep_open' );
					click_item_2 = jQuery( body_el.target ).closest( '.menu-item' ).attr( 'class' );
				} else if ( jQuery( body_el.target ).is( '.mega_main_menu .mega_dropdown form *:focus' ) ) {
					jQuery( '.mega_main_menu .keep_open' ).removeClass( 'keep_open' );
					jQuery( body_el.target ).parents( '.menu-item' ).addClass( 'keep_open' );
				} else if ( ( click_item_2 == menu_item_class ) ) {
					jQuery( body_el.target ).closest( '.menu-item' ).removeClass( 'keep_open' );
					click_item_2 = false;
				} else {
					jQuery( '.menu-item' ).removeClass( 'keep_open' );
					click_item_2 = false;
				}
			});
		}
/* 
		 * Keep dropdown open if some inner element has a :focus.
		 */
Keep dropdown open if some inner element has a :focus.
Keep dropdown open if some inner element has a : focus .
function mmm_keep_open () {
			click_item_2 = false;
			jQuery( 'body' ).on( 'click', function ( body_el ) {
				menu_item_class = jQuery( body_el.target ).closest( '.menu-item' ).attr( 'class' );
				if ( ( click_item_2 != menu_item_class ) && ( typeof jQuery( body_el.target ).closest( '.mega_main_menu.dropdowns_trigger-click .menu-item:has(.mega_dropdown)' ).attr( 'class' ) != 'undefined' ) ) {
					if ( jQuery( body_el.target ).closest( '.menu-item' ).find( '.mega_dropdown' ).length ) {
						body_el.preventDefault();
					}
					jQuery( '.mega_main_menu .keep_open' ).removeClass( 'keep_open' );
					jQuery( body_el.target ).parents( '.menu-item' ).addClass( 'keep_open' );
					click_item_2 = jQuery( body_el.target ).closest( '.menu-item' ).attr( 'class' );
				} else if ( jQuery( body_el.target ).is( '.mega_main_menu .mega_dropdown form *:focus' ) ) {
					jQuery( '.mega_main_menu .keep_open' ).removeClass( 'keep_open' );
					jQuery( body_el.target ).parents( '.menu-item' ).addClass( 'keep_open' );
				} else if ( ( click_item_2 == menu_item_class ) ) {
					jQuery( body_el.target ).closest( '.menu-item' ).removeClass( 'keep_open' );
					click_item_2 = false;
				} else {
					jQuery( '.menu-item' ).removeClass( 'keep_open' );
					click_item_2 = false;
				}
			});
		}
function mmm_keep_open ( ) { click_item_2 = false ; jQuery ( 'body' ) . on ( 'click' , function ( body_el ) { menu_item_class = jQuery ( body_el . target ) . closest ( '.menu-item' ) . attr ( 'class' ) ; if ( ( click_item_2 != menu_item_class ) && ( typeof jQuery ( body_el . target ) . closest ( '.mega_main_menu.dropdowns_trigger-click .menu-item:has(.mega_dropdown)' ) . attr ( 'class' ) != 'undefined' ) ) { if ( jQuery ( body_el . target ) . closest ( '.menu-item' ) . find ( '.mega_dropdown' ) . length ) { body_el . preventDefault ( ) ; } jQuery ( '.mega_main_menu .keep_open' ) . removeClass ( 'keep_open' ) ; jQuery ( body_el . target ) . parents ( '.menu-item' ) . addClass ( 'keep_open' ) ; click_item_2 = jQuery ( body_el . target ) . closest ( '.menu-item' ) . attr ( 'class' ) ; } else if ( jQuery ( body_el . target ) . is ( '.mega_main_menu .mega_dropdown form *:focus' ) ) { jQuery ( '.mega_main_menu .keep_open' ) . removeClass ( 'keep_open' ) ; jQuery ( body_el . target ) . parents ( '.menu-item' ) . addClass ( 'keep_open' ) ; } else if ( ( click_item_2 == menu_item_class ) ) { jQuery ( body_el . target ) . closest ( '.menu-item' ) . removeClass ( 'keep_open' ) ; click_item_2 = false ; } else { jQuery ( '.menu-item' ) . removeClass ( 'keep_open' ) ; click_item_2 = false ; } } ) ; }
Keep dropdown open if some inner element has a :focus.
Keep dropdown open if some inner element has a : focus .
/*
			function_selector = '.mega_main_menu .menu-item *';
			jQuery( function_selector ).unbind();
			jQuery( function_selector ).on( 'focus', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).addClass( 'keep_open' );
			})
			jQuery( function_selector ).on( 'hover', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).removeClass( 'keep_open' );
			})
			jQuery( function_selector ).on( 'blur', function( index ){
				jQuery( this ).parents( '.menu-item, .post_item' ).removeClass( 'keep_open' );
			})
*/ /*
			if( true != /iphone|ipad|ipod|android|webos|blackberry|iemobile|opera mini/i.test( navigator.userAgent.toLowerCase() ) ) 
			{
			}
*/ /* && ( typeof jQuery( body_el.target ).closest( '.mega_main_menu.dropdowns_trigger-click .menu-item:not(.multicolumn_dropdown)' ).attr( 'class' ) == 'undefined' )*/