Fixed jQuery-UI location
Refactored to run entirely on client side