        $(function(){

       $("div.resultListContainer").each(function(){
    var totalList = $(this).children("ul.resultsList").length;
    var totalNoResults = $(this).children("ul").children("span.noSearchResults").length;
 
if(totalList == totalNoResults){
$(this).hide();
}
 
}); 
 
var totalNoResults = $(".noSearchResults").length;
 
if(totalNoResults == 4){
    $(".noSearchResults, h2.searchResults").hide();
    $(".noSearchResults:last").show().parent("ul").show().parent("div.resultListContainer").show();
}


    });

    
