JQuery Dialog Box and Sorting the leads' list