function initInsertFunc( responseText, textStatus, XMLHttpRequest )
{
	// enable hover effect via jQuery so that it works in IE (and all other browsers) without having to specify the HREF attribute of the tab anchors
	$("a.expandCollapse").hover(
	  function () {
	    $(this).addClass("linkHovered");
	  },
	  function () {
	    $(this).removeClass("linkHovered");
	  }
	);
	
	var articleBodies = $('.articleBody2');
	var heights = new Array;
	articleBodies.each( function(){ /*console.log( "height[%d] = %d", heights.length, $(this).height() );*/ heights[ heights.length ] = $(this).height(); });
	$('.articleBody2').css( {height : 0} ).hide();
//	alert( $('.articleBody2').height() );

    $('a.expandCollapse').click(function () {
		if( !$('.articleBody2:animated').length )
		{
			$thisArticle = $(this).closest("div.article");
			$thisArticleBody = $('div.articleBody2', $thisArticle);
			
			$('img', $thisArticle).toggleClass("collapse");

			// based on http://jqueryfordesigners.com/slidedown-animation-jump-revisited
			if( $thisArticleBody.is(':visible') )
			{
				var speed = heights[ articleBodies.index( $thisArticleBody ) ] * 4;
				$thisArticleBody.animate({ "height" : 0 }, {
					duration: speed,
					complete: function(){
						$thisArticleBody.hide();
					}
				});
			}
			else {
				var origHeight = heights[ articleBodies.index( $thisArticleBody ) ];
				var speed = origHeight * 4;
				$thisArticleBody.show().animate({ "height" : origHeight }, {
					duration: speed 
				});			
			}
		}

        return false;
    });
}
