improved plugin definition (wait until jq is loaded)