(function($){
 $.fn.textup = function(speed) {
	 
	 if(speed == undefined) {
	 	speed = 300; //default speed
 	 }
	 
	 var summaryheight = $(this).find(".textup-summary:first").height();
	 var detailsheight = $(this).find(".textup-details:first").height();	 
	 var expandtoheight = summaryheight + detailsheight;
	 
	 $(this).hover( function() {		
		  $(this).find(".textup-details:first").animate({
			    height: expandtoheight + "px"
			  }, speed, function() {
				  // Animation complete
				  $(this).find(".textup-summary:first").fadeIn(100);
			  }
		  	);
	 },	function() {		
		 
		 $(this).find(".textup-summary:first").hide(); //needs to be done twice 
		 
		 $(this).find(".textup-details:first").animate({
			    height: detailsheight + "px"			    			    
			  }, speed, function() {
				    // Animation complete.			
				  $(this).find(".textup-summary:first").hide(); //needs to be done twice 
			  }
		  	)
		}
		
	 );	 
	 
	 
	 
	 
	 
 };
 
})(jQuery);
