﻿document.observe("dom:loaded", function () {
    $$('img.mr', '.fckEdit img').each(function (el) {
        el.onload = function () {
            var d = document.createElement('div');
            d.style.width = this.width + 'px';
            d.style.height = this.height + 'px';
            d.style.background = 'url(\'' + this.src + '\') no-repeat 0 0';
            d.style.display = 'none';
            var s = this.className.replace(/\smr/g, "")
            d.className = 'imgwb ' + s;
            this.parentNode.insertBefore(d, this);
            this.style.display = 'none';
            d.style.display = 'block';
        }
    });
});
