How is the «Add to Compare» link implemented of a frontend product page?

See also: