Updated JS to use jQuery