Transition effects

what im interested is in the ability to do things for ex like…

ive noticed that say someone has a certain effect for a menu and when the user clicks on a button, the action doesnt just happen, it does an animation first, THEN the action takes place. but they have this for every button so, i know that they dont have an animation for everysingle button so how is iit that its done

if youre confused, let me give an example:

if you look at this site, youll see that everytime you click on a button the animation acts accordingly before the next section loads in…as oppose to a site that when you click on a butt the part just comes up

any ideas as to how to achieve this