move trials page javascript out of mason and into js file