function expand( el ) {
	var opt_height = el.attr("m_height");
	var curr_height = el.height();
	var time = Math.abs( opt_height - curr_height )/0.3;
	el.attr( "m_status", "expanding" );
	el.stop().animate( {height:opt_height+"px"}, time, "linear", function() {
		$(this).attr( "m_status", "expanded" );
	} );
}

function collapse( el ) {
	var opt_height = 0;
	var curr_height = el.height();
	var time = Math.abs( opt_height - curr_height )/0.5;
	el.attr( "m_status", "collapsing" );
	el.stop().animate( {height:opt_height+"px"}, time, "linear", function() {
		$(this).attr( "m_status", "collapsed" );
	} );
}

$(document).ready( function() {
	$(".good_list").each( function() {
		$(this)
			.attr( "m_height", $(this).height() );
		if( ! $(this).hasClass("no_collapse") ) {
			$(this)
				.attr( "m_status", "collapsed" )
				.css( "height", "0px" );
		}
	} );
	$(".cont_lmn .plus_minus").bind("click", function() {
		var el = $(this).parent().children(".good_list");
		var status = el.attr("m_status");
		if( status=="collapsed" || status=="collapsing" ) {
			$(".good_list").each( function() { collapse($(this)); } );
			expand( el );
		} else {
			collapse( el );
		}
	} );
} );
