[*] On document ready, execute a function that searches the DOM for internal links (e.g. all links that don’t start with http://)
[*] For each of these links, create a new DIV whose ID is the link href target and whose content is the linked page’s content. You probably only want to load a part of the linked page, for example the main div (#content or whatever).
[*] Bind a function to these links, that executes when they are clicked. Instead of following the link, this function swaps the content of the main container (#content) with the content of the container whose ID matches the href of the link we just clicked.
Be aware that this example is simplified and probably doesn’t work out very good if you have lots of dynamic content. I mainly used it for static pages.