Fix ripples.js to allow multiple elements using ripples

There was a problem with the last update when two or more elements of the page used the ripple effect. This is fixed with this commit.