text: (function(){
  /**
   * Standalone jQuery.ajax API and enhanced getJSON, and so on
   *
   * using AMD (Asynchronous Module Definition) API with OzJS
   * see http://ozjs.org for details
   *
   * Copyright (C) 2010-2012, Dexter.Yy, MIT License
   * vim: et:ts=4:sw=4:sts=4
   */
  var _ = require('./lang');
  var exports = require('./network/ajax');
  
      var window = this,
          uuid4jsonp = 1;
  
      exports.getScript = function(url, op){
          var doc = _.isWindow(this) ? this.document : document,
              s = doc.createElement("script");
          s.type = "text/javascript";
          s.async = "async"; //for firefox3.6
          if (!op)
              op = {};
          else if (_.isFunction(op))
              op = { callback: op };
          if (op.charset)
              s.charset = op.charset;
          s.src = url;
          var h = doc.getElementsByTagName("head")[0];
          s.onload = s.onreadystatechange = function(__, isAbort){
              if ( isAbort || !s.readyState || /loaded|complete/.test(s.readyState) ) {
                  s.onload = s.onreadystatechange = null;
                  if (h && s.parentNode) {
                      h.removeChild(s);
                  }
                  s = undefined;
                  if (!isAbort && op.callback) {
                      op.callback();
                  }
              }
          };
          h.insertBefore(s, h.firstChild);
      };
  
      exports.getStyle = function(url){
          var doc = this.document || document,
              s = doc.createElement("link");
          s.setAttribute('type', 'text/css');
          s.setAttribute('rel', 'stylesheet');
          s.setAttribute('href', url);
          var h = doc.getElementsByTagName("head")[0];
          h.appendChild(s);
      };
  
      var RE_DOMAIN = /https?\:\/\/(.+?)\//;
      exports.getJSON = function(url, data, fn, op){
          var domain = url.match(RE_DOMAIN);
          if (!data || _.isFunction(data)) {
              op = fn;
              fn = data;
              data = {};
          }
          if (fn) {
              if ((!op || !op.isScript) && (!domain || domain[1] === window.location.host)) {
                  exports.ajax({
                      url: url,
                      data: data,
                      success: fn,
                      error: op && op.error,
                      dataType: "json"
                  });
                  return true;
              }
          }
          op = _.mix({
              charset: "utf-8",
              callback: "__oz_jsonp" + (++uuid4jsonp)
          }, op || {});
          if (op.random) {
              data[op.random] = +new Date();
          }
          var cbName = op.callbackName || 'jsoncallback';
          data[cbName] = op.callback;
          url = [url, /\?/.test(url) ? "&" : "?", exports.params(data)].join("");
          if (fn) {
              _.ns(op.callback, fn);
          }
          delete op.callback;
          exports.getScript(url, op);
      };
  
      exports.getRequest = function(url, params){
          var img = new Image();
          img.onload = function(){ img = null; }; //阻止IE下的自动垃圾回收引起的请求未发出状况
          img.src = !params ? url : [url, /\?/.test(url) ? "&" : "?", typeof params == "string" ? params : exports.params(params)].join('');
      };
  
      exports.parseJSON = function(json){
          json = json
              .replace(/^[\w(<\/*!\s]*?\{/, '{')
              .replace(/[^\}]*$/, '');
          try {
              json = window.JSON ? window.JSON.parse(json) : eval(json);
          } catch(ex) {
              json = false;
          }
          return json;
      };
  
      exports.httpParam = exports.params; // deprecated
  
      module.exports = exports;
  
  
  
  })();