Fix IE8 compatibility issues with checkout.js and products.js

IE8 has a weird bug where function definitions outside of a ready statement were not being acknowledged