			$(function()
			{
				// this initialises the demo scollpanes on the page.
				$('#content2').jScrollPane();
 
				reinitialiseScrollPane = (function()
				{
					$('#content2').jScrollPane();
				});


				$('#add-home').bind(
					'click',
					function()
					{
						$('#content2').load('index.php', '', reinitialiseScrollPane);
					}
				);	

				$('#add-bio').bind(
					'click',
					function()
					{
						$('#content2').load('bio/', '', reinitialiseScrollPane);
					}
				);

				$('#add-tour').bind(
					'click',
					function()
					{
						$('#content2').load('tour/', '', reinitialiseScrollPane);
					}
				);	

				$('#add-gallery').bind(
					'click',
					function()
					{
						$('#content2').load('gallery/', '', reinitialiseScrollPane);
					}
				);

				$('#add-media').bind(
					'click',
					function()
					{
						$('#content2').load('media/', '', reinitialiseScrollPane);
					}
				);			
				
				$('#add-contact').bind(
					'click',
					function()
					{
						$('#content2').load('contact/', '', reinitialiseScrollPane);
					}
				);		
							
				// and this allows you to click the link to reduce the amount of content in
				// #pane1 and reinitialise the scrollbars.
				$('#remove-content').bind(
					'click',
					function()
					{
						$('#content2').empty().append($('<p>Nothing to see here</p>')).jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
					}
				);
			});
