Wrap IE specific code in an anonymous function