jQuery().ready(function()
{
	$('.downloads_content .project').each(function()
	{
		var height = $(this).height();
		$(this).prepend($('<a href="#">' + $(this).children('strong.name').html() + '</a>').addClass('name'));
		$(this).children('strong.name').remove();
		if($(this).hasClass('closed'))
		{
			$(this).css({ height: $(this).children('.name').height() + 1, 'margin-bottom': '5px' });
		}
		$(this).children('.name').click(function()
		{
			if($(this).parent().hasClass('opened'))
			{
				$(this).parent().removeClass('opened').addClass('closed').stop().animate({ height: $(this).height() + 1, 'margin-bottom': 5 }, 300);
			}
			else
			{
				$(this).parent().removeClass('closed').addClass('opened').stop().animate({ height: height, 'margin-bottom': 22 }, 300);
			}
			return false;
		});
	});
});
