( function( $ ) { var debounce = function( func, wait ) { var timeout, args, context, timestamp; return function() { context = this; args = [].slice.call( arguments, 0 ); timestamp = new Date(); var later = function() { var last = ( new Date() ) - timestamp; if ( last < wait ) { timeout = setTimeout( later, wait - last ); } else { timeout = null; func.apply( context, args ); } }; if ( ! timeout ) { timeout = setTimeout( later, wait ); } }; }; function menuDropdownToggle() { $( '.main-navigation .page_item_has_children > a, .main-navigation .menu-item-has-children > a, .widget_nav_menu .page_item_has_children > a, .widget_nav_menu .menu-item-has-children > a' ).each( function() { if ( ! $( this ).find( '.dropdown-toggle' ).length ) { $( this ).append( '