/* -- Simple slideshow ---*/

$(function(){
	$('.slide_show').hide().fadeIn(1000);	 
	
	/* -- check to see if there is more than 1 slide --*/
	if ( $('.slide_show').children('div').size() > 1 ) {
		
		var interval = $('.slide_show').attr('data-interval');
		
		$('.slide_show div:gt(0)').hide();
		setInterval(function(){
			$('.slide_show div:first-child').fadeOut(750)
			.next('div').fadeIn(0)
			.end().appendTo('.slide_show');}, 
			interval);
	}
	else {
		return false;
	}
	
	
});




/* -- 2nd instance on same page -- */
$(function(){
	$('.slide_show2').hide().fadeIn(1000);	 
	
	/* -- check to see if there is more than 1 slide --*/
	if ( $('.slide_show2').children('div').size() > 1 ) {
		
		var interval = $('.slide_show2').attr('data-interval');
		
		$('.slide_show2 div:gt(0)').hide();
		setInterval(function(){
			$('.slide_show2 div:first-child').fadeOut(750)
			.next('div').fadeIn(0)
			.end().appendTo('.slide_show2');}, 
			interval);
	}
	else {
		return false;
	}
	
	
});




/* -- 3nd instance on same page -- */
$(function(){
	$('.slide_show3').hide().fadeIn(1000);	 
	
	/* -- check to see if there is more than 1 slide --*/
	if ( $('.slide_show3').children('div').size() > 1 ) {
		
		var interval3 = $('.slide_show3').attr('data-interval');
		
		$('.slide_show3 div:gt(0)').hide();
		setInterval(function(){
			$('.slide_show3 div:first-child').fadeOut(750)
			.next('div').fadeIn(0)
			.end().appendTo('.slide_show3');}, 
			interval3);
	}
	else {
		return false;
	}
	
	
});

