//captionize
    RPCI.captionize = function(args){       
        //members
        
        this.img = $(args.obj); 
        this.side = args.side || 'left';
        try{
            if(!this.img || (this.img.nodeName != 'IMG') )return false;               
        }catch(e){return false}
        
        //we need an alt tag to do this
        if(this.img.alt.trim() != '' )
        {this.shuffle();}else{ return false;};
        
    };
    
    
    RPCI.captionize.prototype = {
        shuffle:function(){
            var cName = (this.side)?(this.side == 'left')?'imgcapl':'imgcapr':this.img.className.split(' ')[0].trim();
                   
            //make it's new friends
            this.span = new sc.element({nodeName : 'SPAN', id : this.img.id + '_wrap', className : cName});
            this.cap = new sc.element({nodeName : 'P', id : this.img.id + '_caption', className : 'caption'});
            this.img.className = '';
            
            //resize and fill
            this.span.style.width = this.img.offsetWidth;
            this.cap.appendChild(txt(this.img.alt.trim()));  
           
            //shuffle the deck
            replace(this.img, this.span);        
            this.span.appendChild(this.img);  
            this.span.appendChild(this.cap);   
                      
        } 

    }

    //initialization for 'captionize'   
    RPCI.captionize.validClass = ['imgcapl', 'imgcapr']; //class name limit list
    RPCI.captionize.init = function(){
        var aCappies = (RPCI.editable)?s$(RPCI.editable, 'IMG'):$('img');
                
        if(aCappies.length >= 1){          
          RPCI.autobay['captionize'] = [];
          aCappies.forEach(function(v){                
                if(RPCI.captionize.validClass.inArray(v.className))
                RPCI.autobay['captionize'].push(new RPCI.captionize(v.id));
          });
          
        }
        
        
    }