;(function($) {
$.fn.firstWord = function(options)
{ 
	return this.each(function() {
		var $this = $(this);

		var str = $this.text();//le o texto
		if(!str.length) return;//desistesem texto

		//acha o 1o espaco
		var k=0;
		while(str.charAt(k).match(/\s/)) { k++; }
		//corta fora o texto seguinte
		var idx = str.replace(/^\s+/,'').indexOf(' ');
		//Tira fora o texto inicial do elemento
		if(idx==-1) idx=0;
		if(idx > 0)
		{
			idx+=k;
			$this.text(str.substring(idx,str.length));
			str = str.substring(0,idx);
		}
		else 
		{
			$this.text('');
		}

		var str2 = $this.text();
		$this.html('<span class="firstWord">' + str + '</span> ' + str2);
        });
};


})(jQuery); 

