First he finds all the elements a(links).
He sets his actions by clicking on a function that:
checks if this link currently has a yyCSS class .
If it is not, then it disables the class yyfor everything that has it, and switches xxto those used for the class yy.
After that it switches the classes yyand xxthe link that was clicked.