This Javascipt is unnecessary thanks to the wonders of the flexbox module.