(function($){
	$.fn.spoiler=function(options){
		var defaults={showText:'[+]more',hideText:'[-]less'};
		var opts=$.extend({},defaults,options);
		var more=$('<a href="">'+opts.showText+'</a>')
		more.toggle(function(){
			$(this).text(opts.hideText);
			$(this).parent('div.spoiler').find('p').show();
		},function(){
			$(this).text(opts.showText);
			$(this).parent('div.spoiler').find('p').hide();
		});
		more.insertBefore($(this).find('p'));
		$(this).find('h1').css('display','inline');
		//$(this).find('h1').append(more);
	}
})(jQuery);
