diff --git a/menu_minipanels.module b/menu_minipanels.module
index 6c87b50..d7e9748 100755
--- a/menu_minipanels.module
+++ b/menu_minipanels.module
@@ -320,7 +320,7 @@ function _menu_minipanels_include($minipanel_name, $menu_config) {
   // Early betas did not have this value and the menu settings need to be
   // re-saved in order to be compatible.
   if (!isset($menu_config['mlid'])) {
-    // Leave a warning message for the 
+    // Leave a warning message for the
     static $logged_warning = FALSE;
     if (!$logged_warning) {
       watchdog('Menu MiniPanels', t('Recent changes to the Menu MiniPanels module require that any menus with attached MiniPanels have their configuration re-saved.'), array(), WATCHDOG_WARNING, l('Menu configuration', 'admin/structure/menu'));
@@ -331,7 +331,7 @@ function _menu_minipanels_include($minipanel_name, $menu_config) {
 
   $mlid = $menu_config['mlid'];
   unset($menu_config['mlid']);
-  
+
   // The same panel/mlid may be added multiple times, if the same menu is added
   // to a page more than once, i.e. the primary links, plus primary links also
   // added as a block.
@@ -468,6 +468,21 @@ function menu_minipanels_page_alter(&$page) {
     menu_minipanels_prepare_links(menu_secondary_menu());
   }
 
+  // If Panels Everywhere is overriding the page system then we'll have to check
+  // if the menus are used in a different manner
+  if (module_exists('panels_everywhere') && variable_get('panels_everywhere_site_template_enabled', FALSE)){
+    if($page['#theme'] === 'panels_everywhere_page'){
+      foreach($page['#handler']->conf['display']->content as $content_pane){
+        if($content_pane->subtype === 'system-main-menu'){
+          menu_minipanels_prepare_links(menu_main_menu());
+        }
+        else if($content_pane->subtype === 'menu-menu-secondary-menu'){
+          menu_minipanels_prepare_links(menu_secondary_menu());
+        }
+      }
+    }
+  }
+
   // Compile the output of each of the requested MiniPanels.
   $output = '';
   foreach (menu_minipanels_panels(NULL, NULL) as $mlid => $minipanel_name) {
