Restoring proper use of '$' in XSL (replaced with 'jQuery')

These are old problems resulting from hasty subsitution for jQuery, but they clobbered valid XSL variables and (in some cases) jQuery selectors.