$('#tweets').cycle({
	fx: 'scrollHorz',
	prev:   '#prevTweet',
	next:   '#nextTweet',
	nowrap:  1,
	timeout: 0,
	before: onBefore,
	after: onAfter,
	cleartype:  1,
	cleartypeNoBg:  true
});

function onAfter(curr, prev) {
	$(this).parent().animate({height: $(this).height()});
}

function onBefore(curr, next) {
	if ( $(this).height() > $(curr).height() ) {
		$(this).parent().animate({height: $(this).height()});
	}
}

$('#flicks').cycle({
	fx: 'scrollHorz',
	prev:   '#prevFlickr',
	next:   '#nextFlickr',
	nowrap:  1,
	timeout: 0,
	cleartypeNoBg:  true
});

function flickr(i) {
	$('.fullimage.active').slideUp().removeClass('active').addClass('hidden');
	$('#image'+i).slideDown().addClass('active').removeClass('hidden');
}

$('#tumbls').cycle({
	fx: 'scrollHorz',
	prev:   '#prevTumbl',
	next:   '#nextTumbl',
	nowrap:  1,
	timeout: 0,
	before: onBefore,
	after: onAfter,
	cleartypeNoBg:  true
});
