Added documentation to headjs.js