/* staff bio toggle */
$(document).ready(function() { 
	
	/* show more */
	function bioMore(tog){
		var txt = $(tog).prev('.bioContent').children('.bioText');
		$(txt).children('.ellipsis').remove();
		$(txt).children().show();
		$(tog).removeClass('bioMore').addClass('bioLess').html('- Show Less');
	}
	
	/* show less */
	function bioLess(tog){
		var txt = $(tog).prev('.bioContent').children('.bioText');
		$(txt).children().not('.theExcerpt').hide();
		$(txt).children('.theExcerpt').after('<span class="ellipsis">&hellip;</span>');
		$(tog).removeClass('bioLess').addClass('bioMore').html('+ Show More');
	}

	/* initialize */
	/* -- append and activate toggle */
	$('.bio').append('<div class="bioToggle">&nbsp;</div>');
	$('.bioToggle').each(function(){
		
		bioLess($(this));
		
		$(this).click(function(){ 
			if($(this).hasClass('bioMore')){
				 bioMore($(this));
				 return;
			}
			bioLess($(this));
		});
		
	});
	
}); 
