Added fn.ONREADY for checking and adding to the onready array.