Fixed search if no string is specified
Conditionally define the jquery resource.  Requires latest SWI-Prolog