Embedding friendheads

Simple config

To add a friendhead automatically to your page, just add these script tags:
<script src="http://www.friendheads.com/js/embed.js"></script><script>document.addEventListener("DOMContentLoaded",function(){(new Friendheads('hill')).add();})</script>
View demo

Advanced config

Just add the single script tag
<script src="http://www.friendheads.com/js/embed.js"></script>
Then add and remove your heads later with js
var friendheads = new Friendheads('hill'); // 'hill' is your head's id

friendheads.add(); // add one head
friendheads.add(7); // add 7 head
friendheads.add(-2); // remove 2 heads

friendheads.count(); // get head count
friendheads.count(5); // set head count

friendheads.destroy(); // remove instance from dom
View demo

More advanced config

You can easily get and set the opacity of the heads
friendheads.opacity(); // get opacity
friendheads.opacity(.6); // set opacity (some float from 0 to 1)
Or initialize with an opacity
var options = { opacity: .7 };
var friendheads = new Friendheads('hill', options);
Add heads to a node other than the body
var element = document.getElementById('my-friendheads-container'); // positioned HTMLElement or jQuery object
var options = { container: element };
var friendheads = new Friendheads('hill', options);
Of course there is nothing stopping you from having many friendheads at once
var ariHeads = new Friendheads('ari');
var meHeads = new Friendheads('hill');
View demo