    $.Boxer = function(options) {
        // Class initializer.  Both options and data are optional.
        
        this.options = $.extend({}, $.Boxer.options, options || {});
        
        this.options.selectors = {};
        $.extend(this.options.selectors, $.Boxer.selectors, options !== undefined ? options.selectors : {});
        
        $(this.options.html).attr('class', this.options.cls).appendTo('body').hide();
        $(this.options.selectors.close).click(this.close);
    };
    
    // Default settings.
    $.Boxer.options = {
        cls: 'boxer',
        opacity: 0.75, // obscura target opacity
        duration: 1500, // animation duration
        html: '<div id="boxer"><div class="boxer-obscura"><!-- IE --></div><div class="boxer-body"><img src="/static/img/lightbox/widget_close.png" class="boxer-close" /><div class="boxer-content"></div></div></div>'
    };
    
    // Override these if you use your own custom HTML.
    $.Boxer.selectors = {
        boxer: '#boxer',
        body: '#boxer .boxer-body',
        content: '#boxer .boxer-content',
        obscura: '#boxer .boxer-obscura',
        close: '#boxer .boxer-close, #boxer .boxer-obscura'
    };
    
    $.extend($.Boxer.prototype, {
        
        reveal: function(data) {
            $(this.options.selectors.content).empty().append(data);
            
            $(this.options.selectors.obscura).css('opacity', 0).animate({opacity: this.options.opacity}, this.options.duration);
            $(this.options.selectors.body).css('opacity', 0).animate({opacity: 1}, this.options.duration).find(this.options.selectors.content).css('opacity', 1);
            $(this.options.selectors.boxer).show();
        },
        
        close: function() {
            var instance = $('body').data('boxer');
            $(instance.options.selectors.boxer).animate({opacity: 0}, instance.options.duration, function() { $(this).hide(); });
        }
        
    });
    
    $.boxer = function(data, options) {
        if ( $('body').data('boxer') == undefined ) {
            $('body').data('boxer', new $.Boxer(options));
        }
        
        var instance = $('body').data('boxer');
        
        instance.reveal(data);
    }

