moves doc ready function to bottom of script to make ie9 happy and content