Changed the way of adding the alarm html to using jquery and a global jquery function