Many changes

css display changed to css visibility, so setTimeout doesn't need
Added webkit transition prefix to animationend
webkit transition prefix in css