Ver original$('.second_level_categories:not(:has(li))').addClass("active");
Ver original$('.second_level_categories:empty').addClass('active');