$.fn.extend({
	expandingDefinitions: function(term_type, definition_type)
	{
		var cur = $(this);
  		cur.find('dt').wrapInner('<div class="title"><div>').prepend('<div class="type">' + term_type + '</div>');
    	cur.find('dd').hide().wrapInner('<div class="text"></div>').prepend('<div class="type">' + definition_type + '</div>');
    	cur.find('dt').click(
    		function()
    		{
    			$(this).find('~ dd:first').slideToggle();
    		});
   	}
});