Small improvements in alerts.html

- Add "fade out" effect on dismissing an alert
- JS code for adding "x" button isn't now sent until any alert is actually going to display