fixing bug #839

The method that was used seems to be deprecated after jQuery UI 1.8