Fix to support 1.7.2+ jQuery UI version, $.ui.contains replaced with $.contains