Dynamic change of links depending on the areas if they are collapsed or not