

// Clicking on toggler3 will make hiddenstuff3 appear/disappear
// You can place any number after the element ids of toggler and hiddenstuff
$(document).ready(function() {

	// Initialize the coda-slider
	$('#coda-slider-1').codaSlider();

	// $("[id^='hiddenstuff']").hide();
	
	$("[id^='toggler']").click(function() {
		remember_me = this;
		$("[id^='toggler']").each( function() {
			if ( this != remember_me ) {
				$('#' + this.id.replace(/toggler/,'hiddenstuff')).slideUp('slow');
			}
		});
		$('#' + this.id.replace(/toggler/,'hiddenstuff')).slideToggle('slow');
		return false;
	});
	$("[id^='hoverer']").hover( function() {
		remember_me = this;
		$("[id^='hoverer']").each( function() {
			if ( this != remember_me ) {
				$('#' + this.id.replace(/hoverer/,'hiddenstuff')).slideUp('slow');
			}
		});
		$('#' + this.id.replace(/hoverer/,'hiddenstuff')).slideDown('slow');
		return false;
	});

	$(".pikagallery").each( function() {
		$('#'+this.id).PikaChoose({
			show_captions: true,
			slide_enabled: true,
			auto_play: false,
			show_prev_next: false,
			slide_speed: 5000,
			thumb_width: 50,
			thumb_height: 50,
			buttons_text: { play: "", stop: "", previous: "Previous", next: "Next" },
			delay_caption: false,
			user_thumbs: false
		});
	});




	$('.addthis_toolbox').hover(
		function() {
			$('.lightbox').fadeIn('fast');
			return false;
		},
		function() {
			$('.lightbox').fadeOut('fast');
			return false;
		}
	);

	
});

function start_carousel( which, transition_speed, flip_speed  )
{
	$('ul#carousel'+which).innerfade({
		speed: transition_speed,
		timeout: flip_speed,
		type: 'sequence',
		containerheight: '200px'
	});

	$('ul#carousel'+which+' li').css('list-style', 'none');
	$('ul#carousel'+which+' li').css('margin-left', '-5px');
	$('ul#carousel'+which+' li').css('padding-left', '0');
	$('ul#carousel'+which+' li img').css('border', '1px solid #ccc');
	$('ul#carousel'+which+' li img').css('padding', '4px');
}


