Steal Luke Melia's JQuery UI mixin