define([
    'text!index.html!strip'
  , 'css!index'
  ],
  function (source) {
    var response = {}, def;

    response.data = source;
    response.callback = function (self) {
      if (window.App === undefined) {
        def = new $.Deferred;

        def.done(function(gadget) {
          // prefix instance-ids, pass JSON
          window.App.renderGadgets(gadget);
        });

        window.fallbackLoader.deferreds.push(def);
        window.fallbackLoader.args.push(self);
      } else {
        // prefix instance-ids, pass JSON
        window.App.renderGadgets(self);
      }
    };

  // return response object
  return response;
  }
);
