$(document).ready(function(){
	
	// Get height of all dds before hide() occurs. Store height in heightArray, indexed based on the dd's position.
	heightArray = new Array();
	$('.category-release-notes .main .entry-content').each(function(i) {
		theHeight = $(this).height();
		heightArray[i] = theHeight;
	});
	
	// hide all content areas
	$('.category-release-notes .main .entry-content:not(:first)').hide();
	
	
	$('.category-release-notes .main .entry-title a').click(function(){
		
		// reasign height
		var all_notes = $('.main .entry-content');
		var target_note = $(this).closest('.entry').find('.entry-content');
		$(target_note).css({height: heightArray[$(all_notes).index(target_note)]}); 
		
		// toggle visibility
		$(this).closest('.entry').find('.entry-content').slideToggle('normal');
		
		// return false so the link href isn't activated
		return false;
		
	});

	
});