Add domready event to init function