Extracting function from .ready()