To create a div with 2 buttons and some text, having it hidden from start and then showing it you dont need a plugin for. Thats very little code.
But triggering it when leaving the page if a change has happened... well...
You can trigger on a post, but if you use the back buttons or the close box its not up to the page but the browser and you will only get a very very late event telling you that you are leaving. Not what you clicked ot my knowledge. And the box showing up is very controlled by the browser and only a small text in the middle can be altered. Its very much a hack to do anything useful with it. And if the user clicks the browsers main close mark (not the tabs) it wont even ask at all.
heres a link to a hack:
sorry
Hope that helps.