function Core_GroupNavigation_SetMenuItems(container, isParent, parentContainer) {
    $(parentContainer).html("");
    
    $('.navigation-item.entry', $(container)).css("display", "none");
    
    var totalWidth = $(container).width() - $('#MoreLink', $(container)).outerWidth();

    if (isParent)
        totalWidth = totalWidth - 50;
    else {
        var leading = $(container + ' .leading-child');
        if (leading)
            totalWidth = totalWidth - leading.outerWidth(true);
            
        totalWidth = totalWidth - 100;
    }
    var currentWidth = 0;

    var hasMore = false;

    $(container + ' .entry').each(function() {
        var thisWidth = $(this).outerWidth(true);

        if (currentWidth + thisWidth < totalWidth) {
            $(this).show();

            currentWidth = currentWidth + thisWidth;
        }
        else {
            hasMore = true;

            $(parentContainer).append($(this).clone().show());
        }
    });

    if (hasMore) {
        $('#MoreLink', $(container)).show();
    }
    else
        $('#MoreLink', $(container)).hide();
}