﻿function InitializeTextEditing(textEditingUrl) {

    $("div.editable").each(function() {
        // Cached the div element so we can refer to it in the content of the "enclosure" below.  (Once we
        // get into the enclosure, $(this) refers to fancybox.
        var editedDiv = $(this);
        $(this).addClass("highlightforedit")
                        .fancybox({
                            'hideOnContentClick': false,
                            'overlayShow': true,
                            'autoscale': true,
                            'href': textEditingUrl + '?textCode=' + editedDiv.attr("id")
                        });
    });
}
