Updated to use jQuery instead of javaScript