porting over to jQuery