firefox whined

apparently Google Chrome can handle function calls being made before the definition of the function, whereas firefox can't. moving the calls fixed it for firefox!