working javascript events and new css