introduced a delay paramter

which can be added to make sure, the DOM has really rendered before
starting the animations