Tengo un inconveniente con un plugin jquery que hice sobre XHR leve 2.
 
el plugin en cuestion:    
Código Javascript
:
Ver original(function($){
        
        
        $.AjaxPrepare = function(option){
                
                // Definiendo opciones
                options = $.extend($.AjaxPrepare.default,option);
                
                // Instanciando
                var ajax        = new XMLHttpRequest();
                var form        = new FormData();
                
                // Condicionales
                var swiTch      = false;
                var GET         = null;
                
                // Definiendo metodo
                if(options.method=='' || !options.method){
                        
                        options.method='POST';
                        
                }
                
                // Insertando datos pasados por post.
                if(options.insert.length>0 && options.method=='POST'){
                        
                        for(var i=0;i<options.insert.length;i++){
                                
                                form.append(options.insert[i][0],options.insert[i][1]);
                                
                        }
                        
                }
                
                // Parseando datos ingresados por get.
                if(options.insert.length>0 && options.method=='GET'){
                        
                        GET='?';
                        
                        for(var i=0;i<options.insert.length;i++){
                                
                                GET += options.insert[i][0]+'='+options.insert[i][1];
                                
                                if((i+1)!==options.insert.length){
                                        
                                        GET+='&';
                                
                                }
                        }
                        swiTch=true;
                }
                
                // Definiendo forma de abrir
                if(swiTch && GET!==null){
                        
                        ajax.open(options.method,options.url+GET,true);
                
                }else{
                        
                        ajax.open(options.method,options.url,true);
                        
                }
                
                // Estados
                ajax.onreadystatechange = function(){
                        
                        if(ajax.readyState==1 || ajax.readyState==2 || ajax.readyState==3){
                                
                                alert(options.onLoad());
                                options.onLoad();
                                
                        }
                        
                        if(ajax.readyState==4 && ajax.status==200){
                                
                                alert(options.onLoaded(ajax.response));
                                options.onLoaded(ajax.response);
                                
                        }
                        
                        if(ajax.readyState==4 && ajax.status==404){
                                
                                options.onError();
                        
                        }
                
                };
                
                // Progreso de peticion
                ajax.upload.onprogress = function(e){
                        
                        if(e.lengthComputable){
                                
                                var porcentaje=Math.ceil((e.loaded/e.total)*100);
                                
                                options.onProgress(porcentaje);
                        
                        }
                        
                };
                
                // Forma de envio
                if(swiTch && GET!==null){
                        
                        ajax.send(null);
                        
                }else{
                        
                        ajax.send(form);
                        
                }
                
        }
        
        // Opciones por default
        $.AjaxPrepare.default = {
                
                insert          : [],                                   // [ ['name',value],['name','value'] ] name: nombre con el que identificas desde php. value: valor que obtendras en php [string | int | file]. 
                url                     : String,                               // Url php, etc... procesador de informacion. [String].
                method          : String,                               // Metodo a emplear para la peticion ['POST' | 'GET'].
 
                onLoad          : function(){},                 // onLoad(){}           Funcion equivalente a readyState[1,2,3].
                onLoaded        : function(response){}, // onLoaded(){}         Funcion equivalente a readyState[4] y Status[200].
                onProgress      : function(progress){}, // onProgress(){}       Funcion que devuelve el procentaje de avance de la peticion.
                onError         : function(){},                 // onError(){}          Equivalente a readyState[4] y Status[404]
                
        }
        
        
        
})(jQuery);
  
       
En Uso     
Código Javascript
:
Ver originalfunction handleFileSelect(evt){
                
        // ---- Prevencion
        evt.stopPropagation();
        evt.preventDefault();
 
        // ---- Datos
        var content             = $('article.Photos');
        var category    = $('article.Photos').attr('id');
        var files               = evt.dataTransfer.files; // FileList object.
        
        // Bucle for
        for(var i = 0; i<files.length; i++){
                
                
                $.AjaxPrepare({
                        
                        insert  : [['category',category],['photo',files[i]]],
                        url             : 'http://localhost/Nayla2/admin/UploadPhotos',
                        method  : "POST",
                        
                        // Cargando...
                        onLoad  : (function(){
                                
                                var html = '<div class="Foto Uploading" id="Foto_'+i+'"><img src=""><span id="Process_'+i+'"></span></div>';
                                content.append(html);
                                
                        }),
                        
                        // Terminado...
                        onLoaded: (function(response){
                                
                                // Datos Json
                                var json = eval("("+response+")");
                                
                                // Reemplazando el progress by el delete button
                                $('span#Process_'+i).replaceWith('<input type="button" value="X" class="delete_image" id="'+json.id+'">');
        
                                // Reemplazando la imagen en base64 by image true
                                $('div#Foto_'+i+' > img').replaceWith('<img src="'+json.image+'">');
                                
                                // Eliminando clase uploading
                                $('div#Foto_'+i).removeClass('Uploading');
                                
                        }),
                        
                        // Error...
                        onError : (function(){
                                
                                $('#Foto_'+i).remove();
                                alert('No se pudo subir: '+files[i].name);
                                
                        }),
                        
                        // Progreso...
                        onProgress: (function(result){
                                
                                var result = (100-result);
                                
                                $('span#Process_'+i).css('height',result+'%');
                                                                
                        })
                        
                });
                
                // ----- Prevista
                $.ImagePreview({
                        
                        file    : files[i],
                        onLoad  : function(image){
                                
                                $('div#Foto_'+i+' > img').attr('src',image);
                                
                        }
                        
                });
                                                
                
        }
        
}
  
    
Error del uso: 
Uncaught TypeError: Object #<Object> has no method 'onProgress' PluginAjaxXhr2.js
Uncaught TypeError: Object #<Object> has no method 'onLoaded'   
como puedo hacer para que me tome como metodos las funciones y no como objetos el plugin? o como puedo solucionar el error xD