Addressing MySQL error relating to parent-cat grouping option.
Additional changes to handle navigation according parent or child categories.