Added variable and eventlistener so that 24 hour option element is not looked for every second.