added jquery dialogs rather than using the built in js alert messages