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

I have modified to support latest version of jQuery ui(1.10.2). Please review and merge.