/*
*
*	Name:	jquery.cutter.js
*
*	Author:	Paolo Dodet
*
*	Date:	april, 2nd, 2010
*
*	email:	paolo.dodet@gmail.com
*
*	site:	http://www.napontadalingua.pro.br
*
*/

(function($) {

	$.fn.cutter	=	function(options) {

		var defaults = {
			more:		'Mas Informaciones',
			less:		'Menos Informaciones',
		};

		var options	=	$.extend(defaults, options);

		return this.each(function(){
			$('#info').each(function(){
				$(this).addClass('hide');
				$(this).before('<h3><a id="show" href="#">' + options.more + '</a></h3>');
			});
			$('#show').click(function(e){
				var info = $('#info').attr('class');
				if(info == 'hide'){
					$('#info').removeClass('hide').addClass('show');
					$('#opt').removeClass('show').addClass('hide');
					$(this).text(options.less);
				} else {
					$('#info').removeClass('show').addClass('hide');
					$('#opt').removeClass('hide').addClass('show');
					$(this).text(options.more);
				}
				e.preventDefault();
			});
		});
	};
})(jQuery);

