implemented fix for issue #1 (jsmad) - updates for latest jquery