and same answer :)

one my initial idea was to read the href to decide what to do; but in the end using the classes was easier...