diff --git a/sites/all/modules/contrib/panels/panels.install b/sites/all/modules/contrib/panels/panels.install
index 1bae347..37c7db5 100755
--- a/sites/all/modules/contrib/panels/panels.install
+++ b/sites/all/modules/contrib/panels/panels.install
@@ -202,6 +202,11 @@ function panels_schema_3() {
         'size' => 'small',
         'default' => 0,
       ),
+      'weight' => array(
+        'type' => 'int',
+        'size' => 'small',
+        'default' => 0,
+      ),
     ),
     'primary key' => array('pid'),
     'indexes' => array(
@@ -321,3 +326,6 @@ function panels_schema_3() {
   return $schema;
 }
 
+function panels_update_7001() {
+  db_add_field('panels_pane', 'weight', array('type' => 'int', 'size' => 'small', 'default' => 0, 'description' => 'Rendering weight.'));
+}
diff --git a/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php b/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php
index 6073d46..910072d 100755
--- a/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php
+++ b/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_editor.class.php
@@ -330,6 +330,34 @@ class panels_renderer_editor extends panels_renderer_standard {
       'html' => TRUE,
     );
 
+    if (isset($pane->weight)) {
+      $weight_links[] = array(
+        'title' => t('Weight:') . $pane->weight,
+        'attributes' => array('class' => array('panels-text')),
+      );
+    }
+    else {
+      $weight_links[] = array(
+        'title' => t('Default'),
+        'attributes' => array('class' => array('panels-text')),
+      );
+    }
+    $weight_links[] = array(
+      'title' => t('Set weight'),
+      'href' => $this->get_url('pane-weight', $pane->pid),
+      'attributes' => array('class' => array('ctools-use-modal')),
+    );
+    $links[] = array(
+      'title' => '<span class="dropdown-header">' . t('Render order') . '</span>' . theme_links(array('links' => $weight_links, 'attributes' => array(), 'heading' => array())),
+      'html' => TRUE,
+      'attributes' => array('class' => array('panels-sub-menu')),
+    );
+
+    $links[] = array(
+      'title' => '<hr />',
+      'html' => TRUE,
+    );
+
     $style_links = $this->get_style_links('pane', $pane->pid);
 
     $links[] = array(
@@ -1059,6 +1087,38 @@ class panels_renderer_editor extends panels_renderer_standard {
   }
 
   /**
+   * AJAX entry point to configure weight for a pane.
+   *
+   * @param $pid
+   *   The pane id to edit.
+   */
+  function ajax_pane_weight($pid = NULL) {
+    if (empty($this->display->content[$pid])) {
+      ctools_modal_render(t('Error'), t('Invalid pane id.'));
+    }
+
+    $pane = &$this->display->content[$pid];
+    $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
+
+    $form_state = array(
+      'display' => &$this->display,
+      'pane' => &$pane,
+      'ajax' => TRUE,
+      'title' => t('Configure Weight on !subtype_title', array('!subtype_title' => $subtype['title'])),
+    );
+
+    $output = ctools_modal_form_wrapper('panels_edit_configure_pane_weight_form', $form_state);
+    if (empty($form_state['executed'])) {
+      $this->commands = $output;
+      return;
+    }
+
+    panels_edit_cache_set($this->cache);
+    $this->command_update_pane($pid);
+    $this->commands[] = ctools_modal_command_dismiss();
+  }
+
+  /**
    * Get the appropriate style from the panel in the cache.
    *
    * Since we have styles for regions, panes and the display itself, and
@@ -1888,3 +1948,42 @@ function panels_edit_configure_access_test_form_submit(&$form, &$form_state) {
   $form_state['test']['not'] = !empty($form_state['values']['not']);
 }
 
+
+
+
+
+/**
+ * Configure CSS on a pane form.
+ */
+function panels_edit_configure_pane_weight_form($form, &$form_state) {
+  $display = &$form_state['display'];
+  $pane = &$form_state['pane'];
+
+  $form['weight'] = array(
+    '#type' => 'weight',
+    '#title' => t('Weight'),
+    '#default_value' => isset($pane->weight) ? $pane->weight : '',
+    '#delta' => 10,
+    '#description' => t('Optional. Heavier panes are rendered later.'),
+  );
+
+  $form['next'] = array(
+    '#type' => 'submit',
+    '#value' => t('Save'),
+  );
+
+  return $form;
+}
+
+/**
+ * FAPI submission function for the CSS configure form.
+ *
+ * All this does is set up $pane properly. The caller is responsible for
+ * actually storing this somewhere.
+ */
+function panels_edit_configure_pane_weight_form_submit($form, &$form_state) {
+  $pane = &$form_state['pane'];
+  $display = $form_state['display'];
+
+  $pane->weight = $form_state['values']['weight'];
+}
\ No newline at end of file
diff --git a/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php b/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php
index ae3bba5..a845817 100755
--- a/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php
+++ b/sites/all/modules/contrib/panels/plugins/display_renderers/panels_renderer_standard.class.php
@@ -221,6 +221,8 @@ class panels_renderer_standard {
     // Use local variables as writing to them is very slightly faster
     $first = $normal = $last = array();
 
+    uasort($panes , 'panels_panes_sort');
+
     // Prepare the list of panes to be rendered
     foreach ($panes as $pid => $pane) {
       if (empty($this->admin)) {
@@ -615,3 +617,12 @@ class panels_renderer_standard {
     return theme($style['render region'], array('display' => $this->display, 'owner_id' => $owner_id, 'panes' => $panes, 'settings' => $style_settings, 'region_id' => $region_id, 'style' => $style));
   }
 }
+
+function panels_panes_sort($a, $b) {
+  $a_weight = (is_object($a) && isset($a->weight)) ? $a->weight : 0;
+  $b_weight = (is_object($b) && isset($b->weight)) ? $b->weight : 0;
+  if ($a_weight == $b_weight) {
+    return 0;
+  }
+  return ($a_weight < $b_weight) ? -1 : 1;
+}
\ No newline at end of file
