WIP: fix conditional insertion of jquery