In a multi-page layout, you can just load your scripts once and it gets used by all the pages in side that layout.
You can programically include your scripts/library on a hyperlink click in the page.
Opinions differ on the way this can be implemented.
<script>
$(document).ready(function() {
$('#link').bind('click', function(event) {
$.get('path/script.js').success(function(html) {
//process
});
});
});
</script>