Method on was introduced in jQuery version 1.7.
I think you have to upgrade your jQuery library to the newest version.
Otherwise, you can use bind:
$( ".ui-widget-overlay" ).bind( "click", function(e) {
$('#myRateSettingsPopup').dialog('close');
e.stopPropagation();
});