Added condition to links default selector

Added condition to links default selector so if there's no previous item
it will select the links contained in an item with the class .tabs