$(function() {
	if ( ! $('div.rss-feed') ) {
		return;
	}

	var i = 0;
	$('div.rss-feed').each( function() {
		$(this).attr( 'id' , 'rss-feed-id-' + i );
		i ++;
	} );

	var currentId = $('div.rss-feed:first').attr('id');

	$('div.feed-title').click(function() {
		var myId = $(this).parent('div.rss-feed').attr('id');
		if ( myId == currentId ) {
			return;
		}
		$('#' + currentId + ' div.feed-container').slideUp('fast');
		$('#' + myId + ' div.feed-container').slideDown('fast');
		currentId = myId;
	}).each(function() {
		var myId = $(this).parent('div.rss-feed').attr('id');
		if ( myId != currentId ) {
			$('#' + myId + ' div.feed-container').hide();
		}
	});
}); 

