Moved js into document ready