this.activeChild = 0; 
Set Configuration
@param {object} options Configuration


@callback callback responseCallback
@param {boolean} complete
@public
480133
function(options) {

        //Starting app.
        self.appName        = options.bundle;

        self.env            = options.env;
        self.version        = options.version;
        local.router        = new Router(self.env);

        //True => multiple bundles sharing the same server (port).
        self.isStandalone   = options.isStandalone;
        self.executionPath  = options.executionPath;
        self.bundles        = options.bundles;

        if (!self.isStandalone) {
            //Only load the related conf / env.
            self.conf[self.appName] = {};
            self.conf[self.appName][self.env] = options.conf[self.appName][self.env];
            self.conf[self.appName][self.env].bundlesPath = options.conf[self.appName][self.env].bundlesPath;
            self.conf[self.appName][self.env].modelsPath =  options.conf[self.appName][self.env].modelsPath;
            if (!self.conf[self.appName][self.env].server.request) {
                self.conf[self.appName][self.env].server.request = {
                    isXMLRequest: false
                }
            }
        } else {

            //console.log("Running mode not handled yet..", self.appName, " VS ", self.bundles);
            //Load all conf for the related apps & env.
            var apps = self.bundles;
            for (var i=0; i<apps.length; ++i) {
                self.conf[apps[i]] = {};
                self.conf[apps[i]][self.env] = options.conf[apps[i]][self.env];
                self.conf[apps[i]][self.env].bundlesPath = options.conf[apps[i]][self.env].bundlesPath;
                self.conf[apps[i]][self.env].modelsPath = options.conf[apps[i]][self.env].modelsPath;
                if (!self.conf[apps[i]][self.env].server.request) {
                    self.conf[apps[i]][self.env].server.request = {
                        isXMLRequest: false
                    }
                }
            }
        }

        // getting server core config
        var statusCodes = null
            , mime      = null;

        try {
            //var corePath = getPath('gina.core');
            var corePath = getPath('gina').core;
            statusCodes = fs.readFileSync( _( corePath + '/status.codes') ).toString();
            statusCodes = JSON.parse(statusCodes);
            if ( typeof(statusCodes['_comment']) != 'undefined' )
                delete statusCodes['_comment'];

            mime  = fs.readFileSync(corePath + '/mime.types').toString();
            mime  = JSON.parse(mime);
            if ( typeof(mime['_comment']) != 'undefined' )
                delete mime['_comment'];

            self.conf.core.statusCodes  = statusCodes;
            self.conf.core.mime         = mime

        } catch(err) {
            console.error(err.stack||err.message);
            process.exit(1)
        }

        self.emit('configured', false, express(), express, self.conf[self.appName][self.env]);
    }
513191
function(options) {
      options = options || {};
      var changing = this._changing;
      this._changing = true;

      // Silent changes become pending changes.
      var self = this;
      Parse._objectEach(this._silent, function(attr) {
        self._pending[attr] = true;
      });

      // Silent changes are triggered.
      var changes = _.extend({}, options.changes, this._silent);
      this._silent = {};
      Parse._objectEach(changes, function(unused_value, attr) {
        self.trigger('change:' + attr, self, self.get(attr), options);
      });
      if (changing) {
        return this;
      }

      // This is to get around lint not letting us make a function in a loop.
      var deleteChanged = function(value, attr) {
        if (!self._pending[attr] && !self._silent[attr]) {
          delete self.changed[attr];
        }
      };

      // Continue firing `"change"` events while there are pending changes.
      while (!_.isEmpty(this._pending)) {
        this._pending = {};
        this.trigger('change', this, options);
        // Pending and silent changes still remain.
        Parse._objectEach(this.changed, deleteChanged);
        self._previousAttributes = _.clone(this.attributes);
      }

      this._changing = false;
      return this;
    }
417533
function(options) {
      inputEx.MultiAutoComplete.superclass.setOptions.call(this, options);
      
      // Method to format the ddlist item labels
      this.options.returnLabel = options.returnLabel;
   }
736159
function(options) {
		
		var selectFieldConfig = this.generateSelectConfig(options.availableFields);
	
		var newOptions = {
			fields: [
				selectFieldConfig,
				this.nameIndex[options.availableFields[0].name]
			]
		};
		
		YAHOO.lang.augmentObject(newOptions, options);
		
		inputEx.KeyValueField.superclass.setOptions.call(this, newOptions);
	}
154081
function(options) {
        if (this.response && !(options && options.noAbort === true)) {
            this.layer.protocol.abort(this.response);
            this.layer.events.triggerEvent("loadend");
        }
        var evt = {filter: this.createFilter()};
        this.layer.events.triggerEvent("loadstart", evt);
        this.response = this.layer.protocol.read(
            OpenLayers.Util.applyDefaults({
                filter: evt.filter,
                callback: this.merge,
                scope: this
        }, options));
    }
864905
function (options, callback) {
            options = options || {};

            if (options.limit || options.offset) {
                this.$offset = options.offset || 0;
                this.$limit = options.limit || this.$limit;
            }

            var self = this;

            function pageFetchedComplete(err, page, originalCallback) {
                var callback = function (err, page) {
                    if (originalCallback) {
                        originalCallback(err, page, options);
                    }
                };


                if (options.fetchModels || options.fetchSubModels) {

                    // TODO: introduce poolSize parameter for par, and parEach

                    flow()
                        .parEach(page.$items, function (model, cb) {
                            model.fetch({
                                fetchSubModels: options.fetchSubModels
                            }, cb);
                        })
                        .exec(function (err) {
                            callback(err, page);
                        });

                } else {
                    callback(err, page);
                }

            }

            if (this._fetch.state === State.LOADING) {
                // currently fetching -> register callback
                this._fetch.callbacks.push(function (err, page) {
                    pageFetchedComplete(err, page, callback);
                });
            } else if (this._fetch.state == State.LOADED) {
                // completed loaded -> execute
                pageFetchedComplete(null, this, callback);
            } else {
                // set state and start loading
                self._fetch.state = State.LOADING;

                this.$collection.$context.$dataSource.loadCollectionPage(this, options, function (err, page) {
                    self._fetch.state = err ? State.ERROR : State.LOADED;

                    // execute callbacks
                    pageFetchedComplete(err, page, callback);

                    _.each(self._fetch.callbacks, function (cb) {
                        cb(err, page);
                    });
                });
            }
        }
233445
function configure(options, finishedBootstrap) {
		var ControllerRouter = require('./rhapsody/router/controllerRouter'),
			ModelRouter = require('./rhapsody/router/modelRouter'),
			_this = this;

		this.app = this.libs.express();

		this.router = {
			controllerRouter: new ControllerRouter(this),
			modelRouter: new ModelRouter(this)
		};

		this.callbacks = {
			bootstrap: require(path.join(this.root, '/app/config/bootstrap')),
			socket: require(path.join(this.root, '/app/config/socket'))
		};

		this.log = require('./rhapsody/logger')(this.config.log);

		this.servers = {};
		this.sockets = {};

		//Configures the HTTP server
		this.servers.http = require('http').createServer(this.app);

		this.servers.http.on('close', function() {
			Logger.warn('HTTP server closed');
		});

		//Configures the HTTPS server
		if(this.config.https.enabled) {
			this.servers.https = require('https').createServer(this.config.httpsOptions, this.app);

			this.servers.https.on('close', function() {
				Logger.warn('HTTPS server closed');
			});
		}

		this.models = {};

		//If database is enabled, configure it
		if(this.config.database.enabled) {

			//Saves all the adapters
			this.config.adapters = require(path.join(this.root, '/app/config/db-adapters'));

			//Create the models and put it on this.models
			this.Model.generateModels(this);
		}

		//Set the layouts folder
		this.app.set('views', path.join(this.root, '/app/layouts'));

		//Configure express
		this.app.disable('x-powered-by'); //Disables the 'X-Powered-By: Express' on the HTTP header

		//Configures the global Express middlewares
		this.setupMiddlewares();

		//Configure the controller routes
		this.router.controllerRouter.route();

		//Configure the RESTful API routes
		if(this.config.routes.allowREST) {
			this.router.modelRouter.route();
		}

		//Serve the /app/public file as the public folder
		this.app.use(this.libs.express.static(this.root + '/app/public'));

		//Logs the error
		this.app.use(function errorLogger(err, req, res, next) {
			_this.log.error(err);
			next(err);
		});

		//Configure the handlers defined by the user
		this.app.use(this.config.error.error404Handler);
		this.app.use(this.config.error.error500Handler);

		this.callbacks.bootstrap(this, finishedBootstrap);

		this.config.globals = this.config.globals || {};

		//Set the models as globals if enabled
		if(this.config.globals.models) {
			for(var m in this.models) {
				if(this.models.hasOwnProperty(m)) {
					global[m] = this.models[m].serverModel;
				}
			}
		}

	}
584241
function Amperize(options) {
    this.config = _.merge({}, DEFAULTS, options || {});
    this.emits = emits;

    this.htmlParser = new html.Parser(
        new html.DomHandler(this.emits('read'))
    );
}
589027
function setOptions(object, options) {
      options = object.options = _.assign({}, cloneDeep(object.constructor.options), cloneDeep(options));

      _.forOwn(options, function(value, key) {
        if (value != null) {
          // Add event listeners.
          if (/^on[A-Z]/.test(key)) {
            _.each(key.split(' '), function(key) {
              object.on(key.slice(2).toLowerCase(), value);
            });
          } else if (!_.has(object, key)) {
            object[key] = cloneDeep(value);
          }
        }
      });
    }
911675
function(options) 
	{
		this.addEventListener(conbo.ConboEvent.CHANGE, this.__changeHandler, this, 999);
		
		var listOptions = ['itemClass'];
		
		conbo.assign(this, conbo.pick(options, listOptions));
		
		this.source = options.source || [];
	}
965666
function(status, xhr, settings) {
		settings.complete.call(settings.context, xhr, status);
	}
631490
function( options ){
			var nodes = modules.domUtils.getDOMContext( options );
			this.rootNode = nodes.rootNode;
			this.document = nodes.document;
		}
555632
function (options, callback) {

                if (options instanceof Function) {
                    callback = options;
                    options = {};
                }

                if (this.initialized) {
                    callback && callback(null, this);
                    return;
                }
                var self = this;

                flow()
                    .seq(function (cb) {
                        if (self.isNew()) {
                            cb();
                        } else {
                            self.fetch(null, cb);
                        }
                    })
                    .seq(function (cb) {
                        var productType = self.$.productType;
                        productType.fetch(null, cb);
                    })
                    .seq(function () {
                        var productType = self.$.productType;

                        var appearance;

                        if (self.$.appearance) {
                            appearance = productType.getAppearanceById(self.$.appearance.$.id);
                        }

                        appearance = appearance || productType.getDefaultAppearance();

                        self.set({
                            appearance: appearance,
                            view: self.$.view || productType.getViewById(self.get("defaultValues.defaultView.id")) || productType.getDefaultView()
                        });
                    })
                    .seq(function (cb) {
                        flow()
                            .parEach(self.$.configurations.$items, function (configuration, cb) {
                                self._setUpConfiguration(configuration);
                                options.isExample = self.get('restrictions.example');
                                configuration.init(options, cb);
                            })
                            .exec(function (err) {
                                cb(err);
                            });
                    })
                    .exec(function (err) {
                        self.trigger("productInitialized");
                        self.trigger("priceChanged");

                        if (err) {
                            callback && callback(err);
                        } else {
                            self.initialized = true;
                            callback && callback(null, self);
                        }
                    });
            }
468856
function() {
      if (this.xhr) {
        this.xhr.abort();
      } else if (this.config) {
        this.config.complete.call(this, this.xhr, 'abort');
      }

      // Cleanup leftover state.
      if (this.xhr) {
        this.xhr = undefined;
        delete this.xhr;
      }
      if (this.config) {
        this.config = undefined;
        delete this.config;
      }

      return this;
    }
712356
void setComplete() {
    this.complete = true;
    try {
      // If we haven't gotten any results back, make sure to create an
      // empty one
      if (this.states.size() == 0) {
        this.states.put(new WorldState());
      }
      // Special WorldState to indicate that the request has completed and
      // interrupt
      // any blocking threads
      else {
        this.states.put(RESPONSE_COMPLETE);
      }
    } catch (InterruptedException e) {
      log.error("Interrupted trying to indicate a completed condition.", e);
    }
  }
259592
function setActive() {
      for (var i = 0; i < this._n.length; i++) {
        this.addClass(this._n[i].children);
      }
    }
508036
function( jsonConfig, callback, jQuery ) {
        if ( jsonConfig instanceof Array ) {
            jsonConfig = JSONconfig.make( jsonConfig );
        }

        // optional
        if ( jQuery ) {
            $ = jQuery;
        }

        this.tree = TreeStore.createTree( jsonConfig );
        this.tree.positionTree( callback );
    }