make search.js work with jQuery >=1.8
*.txt -> *.rst
Fixed merge issues with changes from master