Second attempt with modified (hopefully more optimized) jQuery/javascript...