Added support for $.confirm instead of $("element").confirm

I had to make these changes for my specific implementation, it may be useful for others.