Changed $.on("ready") function to $(fuction) function [from Larry]