This codes works perfekt..allmost.
Everything works great in FireFox (as usuall), but not so great in IE (have only tried in IE 7). When I navigate throw the Ajax-links in both browsers it works great (both back and forward button), but when I click on a "real" link and then the back button it only works in FF. It is like the code does not trigger when you return to the page with the ajax links in IE.
I have tried to run diffrent tests but the only thing I can see is that the history-function does not run when returning to the ajax page.
Does anyone have a solution for this? Please get back to me here (will check page often).