Groups function

I have found your extension very usefull, so later I will need to suggest several kind of results, and so on I have extended your system to support this.

I'm not js expert so forgive my mistakes if there :smile: also I didn't touch test and other stuff that I don't know.

This is the result
![image](https://f.cloud.github.com/assets/1714476/647776/d742427a-d411-11e2-8e70-1edd84bc1f8c.png)

I hope this is usefull for you, it is for me :tada: