 /**
   * The file for Custom Script.
   *
   *
   * @package   bpm128 WordPress Theme
   * @copyright Copyright (C) 2016, OrdaSoft
   * @license    http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author      AUTHOR <www.ordasoft.com>
   * bpm128 is distributed under the terms of the GNU GPL
   */
//////////////////////////////////////////
( function( jQuery ) {
  var body    = jQuery( 'body' ),
    _window = jQuery( window );


  // Enable menu toggle for small screens.
  ( function() {
    var nav = jQuery( '#site-navigation' ), button, menu;
    if ( ! nav ) {
      return;
    }

    button = nav.find( '.menu-toggle' );
    if ( ! button ) {
      return;
    }

    // Hide button if menu is missing or empty.
    menu = nav.find( '#main-menu' );
    if ( ! menu || ! menu.children().length ) {
      button.hide();
      return;
    }

    jQuery( '.menu-toggle' ).on( 'click.bpm128', function() {
      nav.toggleClass( 'toggled-on' );
    } );
  } )();
} )( jQuery );

