floorBox = $merge(simpleBox);
floorBox.relValue = 'pic';
floorBox.contentWidth = 840;
floorBox.contentHeight = 566;

floorBox.onLoadPhoto = function() {
    this.image.src = this.preload.src;
}

floorBox.onOpen = function(link){
    this.image.src = '';
    this.holder.className = 'picholder-d';
    this.preload = new Image();
    this.preload.onload = this.onLoadPhoto.bind(this);
    this.preload.src = link;
    return false;
}

floorBox.onClose = function() {
    this.image.src = '';
    this.holder.className = 'picholder-d';
}


floorBox.makeContainer = function(){
    this.holder = new Element('div', {'class': 'picholder'}).injectInside(this.center);

    var close = new Element('a', {'href': '#'}).injectInside(this.holder);
    

    
    close.onclick = this.overlay.onclick = this.close.bind(this);
    new Element('div', {'class': 'f-close'}).injectInside(this.holder).onclick = this.overlay.onclick = this.close.bind(this);
//    new Element('div', {'class': 'f-close'}).injectInside(close);
    
    this.preload = new Image();
//    this.preload.src = '/defa/images/indicator.gif';
    this.image = new Element('img', {style: 'border 1px solid red;'}).injectInside(new Element('span').injectInside(this.holder));

    new Element('div', {'class': 'f-top'}).injectInside(this.center);
    new Element('div', {'class': 'f-left'}).injectInside(this.center);
    new Element('div', {'class': 'f-right'}).injectInside(this.center);
    new Element('div', {'class': 'f-bot'}).injectInside(this.center);

    return this.holder;
}

window.addEvent('domready', floorBox.init.bind(floorBox));
