We have made schanges to the way ajax is used.

THe besst way to explain what we did is to show you, the example below is
quite simple. We need a class, the factory pattern, to be called - how ever
we need to call a static method, called create to creat a class based on a set of dependencies else where in the system.

From this we need to tell it what class to load, in this case its the AisisCore_Template_Builder class in AisisCore.

From there were now telling ajax that we want to render a remplate, this template is called boxes. In the system its called boxes.phtml, AisisCore's template builder knows how to find and load the template.

From there we pass some data (which is never used) to the function in question.

After which we then state what to do with the data returned from ajax, in this case in a fucntion called 'load_data' we log it to the console.  We then pass this to the class along with the data object, method (GET or POST) and the action we want WP to do, in this case render_template.

What we get back is the console spitting out our template's html.

(function($){
    $(document).ready(function() {
	var data_object = {
	    class : 'AisisCore_Factory_Pattern',
	    method : {
	        static : true,
	        name : 'create',
	        params : ['AisisCore_Template_Builder']
	    },
	    render_template : {
	        name : 'boxes'
	    },
	    data : {
	        someattr: 'attr'
	    }
	};

        function log_data(result){
            console.log(result);
	}

	(new AA.Aisis_Ajax(data_object, 'POST', 'render_template', log_data)).init();
    });
})(jQuery);