

/**
 * Readmore
 * 
 * @author Marcin Gil <mg@ovos.at>
 */
(function($)
{
	$.fn.readmore = function(options)
	{
		var opts = $.extend({}, $.fn.readmore.defaults, options);
		
		return this.each
		(
			function()
			{
				var self = this;
				var $this = $(this);
				
				var content = $(opts.content, $this);
				var button = $(opts.more, $this);
				
				content.hide();
				$(opts.more, $this).click(function()
				{
					content.fadeIn();
					button.hide();
					
					return false;
				});
			}
		);
	}
	
	$.fn.readmore.defaults =
	{
		more: 'a.more',
		content: 'div'
	};
})(jQuery);