function annotate(selection, callback) {
    function apply(jq) {
        var title = jq.attr('alt');
        jq.wrap("<div class=\"annotated\"><div class=\"image\"></div><div class=\"background\"><div class=\"title\">"+title+"</div></div></div>");
        if (callback) {
            var parent = jq.parents('.annotated');
            callback(parent, jq, parent.find('.title'));
        }
    }

    selection.each(function (intIndex) {
        apply($(this));
    });
    $('.annotated .background').css("opacity", "0.7");
}
