

$(document).ready(function(){
// Mobile menu 
  $(".menu-toggle").click(function () {
        console.log( "click" );
         $('body').toggleClass( "menu-show" );
      });

  /*$(".menu-toggle").unbind('click').bind('click',function(){
    $('body').toggleClass( "menu-show" );
  });*/


// Cat
  $('.sub-cat-1').click(
    function(e) {
        e.preventDefault(); // prevent the default action
        e.stopPropagation(); // stop the click from bubbling
        $(this).parent().toggleClass('selected');
});


  $('.sub-cat-2').click(
    function(e) {
        e.preventDefault(); // prevent the default action
        e.stopPropagation(); // stop the click from bubbling
        $(this).parent().toggleClass('selected');
});

  $('.sub-cat-3').click(
    function(e) {
        e.preventDefault(); // prevent the default action
        e.stopPropagation(); // stop the click from bubbling
        $(this).parent().toggleClass('selected');
});

$('#products_grid_before .nav li.active').parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().parent().parent().parent().parent().addClass('selected');
$('#products_grid_before .nav li.active').parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().addClass('selected');

});


$(document).ready(function() {
    $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".mega-menu");
    $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".navbar-nav ul.mega-menu > .column > .js_usermenu");
    $("<span class='mob_sub'><span data-icon-name='plus'></span></span>").insertBefore(".navbar-nav ul.mega-menu > .column ul > li > ul");
    $('.mob_sub').click(
        function(e) {
            e.preventDefault(); // prevent the default action
            e.stopPropagation(); // stop the click from bubbling
            $(this).parent().toggleClass('selected');
            $(this).toggleClass('mob_sub_open');
        });

});