$('document').ready(function(){
	$('#slideshow').cycle({ 
	'timeout': 5000,
	'prev':'#prev',
	'next':'#next',
	'autostop': 1
	});
	
// Initially set opacity on thumbs and add
// additional styling for hover effect on thumbs

	var onMouseOutOpacity = .8;
	$('.thumbImg').opacityrollover({
		mouseOutOpacity:   onMouseOutOpacity,
		mouseOverOpacity:  1.0,
		fadeSpeed:         'fast',
		exemptionSelector: '.selected'
	});

// swap image on hover

	$('.thumbImg').hover(
		function() {
			var swapImg = 'http://changechevron.org/wp-content/themes/chevron/images/board-' + this.id + '_on.gif';
			$(this).attr('src',swapImg);
		},
		function() {
			var origImg = 'http://changechevron.org/wp-content/themes/chevron/images/board-' + this.id + '.gif';
			$(this).attr('src',origImg);
	});

// when .thumbImg is clicked, grab the id and replace the contents of default with div#profile-[[id]]

	$('.thumbImg').click(
		function(event) {
			var profile = '#profile-' + this.id;
			var next = $(profile).html();
			$('#default').html(next);
		}
	);
	
});
