// JavaScript Document

function bindLeftSideNavEvents(){
			$(function()
			{
				// this initialises scollpanes on the page.
				$('#pane1').jScrollPane();

				reinitialiseScrollPane = function()
				{
					$('#pane1').jScrollPane({scrollbarWidth:10, scrollbarMargin:10, showArrows:true});
				}

				$('#add-content1').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/what-is-depression.html', '', reinitialiseScrollPane);
						window.location = "depression.aspx";
					}
				);
				$('#add-content2').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/symptoms-of-depression.html', '', reinitialiseScrollPane);
						window.location = "depression-symptoms-of-depression.aspx";
					}
				);
				$('#add-content3').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/who-gets-depression.html', '', reinitialiseScrollPane);
						window.location = "depression-who-gets-depression.aspx";
					}
				);
				$('#add-content4').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/marijuana-and-depression.html', '', reinitialiseScrollPane);
						window.location = "depression-marijuana-and-depression.aspx";
					}
				);
				$('#add-content5').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/know-when-to-get-help.html', '', reinitialiseScrollPane);
						window.location = "depression-know-when-to-get-help.aspx";
					}
				);
				$('#add-content6').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/you-can-help-a-friend.html', '', reinitialiseScrollPane);
						window.location = "depression-you-can-help-a-friend.aspx";
					}
				);
				$('#btnSource').bind(
					'click',
					function()
					{
						//$('#pane1').load('fragments_depression/sources.html', '', reinitialiseScrollPane);
						window.location = "depression-sources.aspx";
						
						
					}
				);
				
				// 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()
					{
						$('#pane1').empty().append($('<p>content removed</p>')).jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
					}
				);
			});
			}