// JavaScript Document

$(function()
			{
				
				// this initialises the demo scollpanes on the page - each with different
				// animation characteristics.
				$('#pane1').jScrollPane({animateTo:true, animateInterval:50, animateStep:5});
				$('#pane2').jScrollPane({animateTo:true, animateInterval:50, animateStep:3});
				$('#pane3').jScrollPane({animateTo:true, animateInterval:150, animateStep:5});
				$('#pane4').jScrollPane({animateTo:true, animateInterval:150, animateStep:3});
				$('#pane5').jScrollPane({animateTo:true, animateInterval:150, animateStep:5});
				$('#pane6').jScrollPane({animateTo:true, animateInterval:150, animateStep:3});
				$('#pane7').jScrollPane({animateTo:true, animateInterval:150, animateStep:5});
				$('#pane8').jScrollPane({animateTo:true, animateInterval:150, animateStep:3});
				$('#pane9').jScrollPane({animateTo:false});
				// set up the links
				$('a.scroll-to-element-demo').bind(
					'click',
					function()
					{
						$this = $(this);
						var destinationSelector = $(this).attr('rel');
						$('.scroll-pane', $this.parent().parent().parent()).each(
							function()
							{
								this.scrollTo(destinationSelector);
							}
						);
						return false;
					}
				);
			});
