added better event detection; reworked styles; more error handling
added ie hack--would be nice to do feature detection for this...