Ok, I see what you're saying. It is technically possible to run two different versions at the same time, but I would recommend sorting out the issue and choosing two plugins that can interact with the most current version.
At any rate, that link you've posted basically explains it; you'll want to call
jQuery.noConflict(), having reassigned the jQuery variable to something else prior to use, e.g.
Code:
<script src="js/jquery-1.2.6.js"></script>
<script>
$j_126= $.noConflict(true);
</script>
<script src="js/jquery-ui.js"></script>
<script src="js/jquery.js"></script>
<script src="js/prettyPhoto.js"></script>
Note in the jquery-ui script, the jQuery object must be referred to as '$j_126' (or whatever you decide to name it). This will entail changing the last line of the UI script, e.g.
The newly reference $j_126 version will be passed into the anonymous function and used inside as '$' like normal. You won't have to alter any other parts of the script.