Load local jquery and jqueryui only for mw versions prior to 1.17.
declare global wgVersion
Merge pull request #47 from christi3k/master

Fix js error that breaks table sorting (bug 858844) 
Merging per IRC request from @superawesome