function inchilds2(parent) {
    var temp = 0;
    $(parent).children("a").each(function() {
        if ($(this).hasClass("active")==1) {
        temp = 1;
        }
    });
    $(parent).children("ul").each(function() {
        $(this).children("li").each(function() {
            $(this).children("a").each(function() {
                if ($(this).hasClass("active")==1) {
                temp = 1;
                }
            });
        });
    });
    return temp;
}