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

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

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

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

  // return response object
  return response;
  }
);
