made html parsing jquery 1.8+ compatible