settings.prototype.Main = function () {
  var dfd_Settings_main = jQuery.Deferred();
  start_progress();
  $.when(this.load_left(), this.load_right()).then(function () {
    stop_progress();
    debug_print('AJAX complete');
    dfd_Settings_main.resolve("ajax_complete");
  });
  return dfd_Settings_main.promise();
};

settings.prototype.load_left = function (callback) {
  var dfd_SettingsLeft = jQuery.Deferred();
  $("#main-container-left-body").addClass("loading");
  $("main-container-left-footer").html('&nbsp;&nbsp;'); /* keep padding while loading */
  var atldhf = ajax_loader({tab: this.tab}, "app/tenants/tenants-left-header.php", "main-container-left-header");
  progress();
  var atldff = ajax_loader({tab: this.tab}, "app/tenants/tenants-left-footer.php", "main-container-left-footer");
  progress();
  var atldbf = ajax_loader({tab: this.tab}, "app/settings/settings-left-body.php", "main-container-left-body");
  progress();
  $.when(atldhf, atldff, atldbf).then(function () {
    progress();
    $("#main-container-left-body").removeClass("loading");
    debug_print('Left');
    if (typeof callback !== 'undefined' && cloneObject[callback]) {
      cloneObject[callback]();
    }
    dfd_SettingsLeft.resolve("ajax_done_left");
  });
  return dfd_SettingsLeft.promise();
};

settings.prototype.load_right = function () {
  var dfd_SettingsRight = jQuery.Deferred();
  $("#main-container-right-body").addClass("loading");
  var atrdhf = ajax_loader({id: this.id, tab: this.tab}, "app/tenants/tenants-right-header-dash.php", "main-container-right-header");
  progress();
  var atrdff = ajax_loader({id: this.id, tab: this.tab}, "app/tenants/tenants-right-footer-dash.php", "main-container-right-footer");
  progress();
  var atrdbf = ajax_loader({id: this.id, tab: this.tab}, "app/settings/settings-right-body-dash.php", "main-container-right-body");
  $.when(atrdhf, atrdff, atrdbf).then(function () {
    /* Slide out right Effect for clicked profiles */
//    $('.rightSlide').css('opacity', '1');
//    $('.rightSlide')
//            .transition('fade right', '0ms')
//            .transition('fade right', '300ms');
    progress();
    $("#main-container-right-body").removeClass("loading");
    debug_print('Right');
    dfd_SettingsRight.resolve("ajax_done_right");
  });
  return dfd_SettingsRight.promise();
};

settings.prototype.start_up = function () {
  var filter = this.filter; /* This defines the filter for HASH navigate */
    debug_print('start_up');
    done_loading();
    $('.dropdown').dropdown(drop_effect);
};