// AddThis drop down menu values
	
	var addthis_config = {
		services_compact: 'email, digg, delicious, facebook, google, linkedin, live, myaol, myspace, reddit, stumbleupon, twitter, yahoobkm',
		services_exclude: 'print',
		data_use_flash: 'false',
		data_use_cookies: 'false'
	}

// Only show video and image thumbnail navigation if javascript is enabled.

	$(document).ready(function() {
		$('div#gallery').toggleClass("scrollable");
		$('a#browse-left').toggleClass("browse");
		$('a#browse-right').toggleClass("browse");
		$('div#video-gallery').toggleClass("scrollable");
		$('a#browse-video-left').toggleClass("browse");
		$('a#browse-video-right').toggleClass("browse");
	});

// Cycle through the style sheets.

	$(function() {
		$.stylesheetInit();		// Call stylesheet init so that all stylesheet changing functions will work.
		$('#toggler').bind(		// This code loops through the stylesheets when you click the link with an ID of "toggler" below.
			'click',
			function(e)	{
				$.stylesheetToggle();
				return false;
			}
		);
		
		$('.styleswitch').bind(		// When one of the styleswitch links is clicked then switch the stylesheet to the one matching the value of that links rel attribute.
			'click',
			function(e) {
				$.stylesheetSwitch(this.getAttribute('rel'));
				return false;
				}
			);
		}
	);

// Add share and print icons

	$(document).ready(function() {
		fontResizer('0.9em','1.0em','1.2em');
		$('ul#share-icons').prepend('<li><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;pub=peoplesmillions" title="Share"><img src="/assets/gfx/navigation/share.gif" width="23" height="22" alt="Share" /></a></li>');
		$('ul#share-icons').prepend('<li class="print"><a href="#print" title="Print"><img src="/assets/gfx/navigation/print.gif" width="23" height="22" alt="Print" /></a></li>');
		$('ul#share-icons li.print a').click(function() {
		window.print();
		return false;
		});
	});


// Video and Image thumbnail scrolling
	
	$(document).ready(function() {	
		if ( $("div.scrollable").length > 0 )
			{
				$("div.scrollable").scrollable();
			}
	});

// Add coloured scroll bars

//	$(document).ready(function() {
//		$('.fixed-height-scroll-450px').jScrollPane({scrollbarWidth:15, scrollbarMargin:5, showArrows:false});
//		$('.scroll-logged-in').jScrollPane({scrollbarWidth:15, scrollbarMargin:5, showArrows:false});
//		$('.scroll-not-logged-in').jScrollPane({scrollbarWidth:15, scrollbarMargin:5, showArrows:false});
//		$('.scroll-with-error').jScrollPane({scrollbarWidth:15, scrollbarMargin:5, showArrows:false});
//	});

// Video and Image thumbnail linking (simple gotoUrl function)

function gotoUrl($url) {
	location.href=$url;
}