added support for safari 5, 6, and 7