function panopta_theme_navigation_menu()
{
    global $ashfordtheme;
    $display_drop_down_menu = $ashfordtheme->option['display_drop_down_menu'];
    $display_display_home = $ashfordtheme->option['display_home'];
    $display_search_box = $ashfordtheme->option['display_search_box'];
    $ashford_mega_tab1 = $ashfordtheme->option['ashford_mega_tab1'];
    $ashford_mega_tab2 = $ashfordtheme->option['ashford_mega_tab2'];
    $ashford_mega_tab3 = $ashfordtheme->option['ashford_mega_tab3'];
    $ashford_mega_tab4 = $ashfordtheme->option['ashford_mega_tab4'];
    $ashford_mega_tab5 = $ashfordtheme->option['ashford_mega_tab5'];
    $ashford_mega_tab6 = $ashfordtheme->option['ashford_mega_tab6'];
    $ashford_mega_tab7 = $ashfordtheme->option['ashford_mega_tab7'];
    $ashford_mega_tab8 = $ashfordtheme->option['ashford_mega_tab8'];
    $ashford_mega_tab1_num = $ashfordtheme->option['ashford_mega_tab1_num'];
    $ashford_mega_tab2_num = $ashfordtheme->option['ashford_mega_tab2_num'];
    $ashford_mega_tab3_num = $ashfordtheme->option['ashford_mega_tab3_num'];
    $ashford_mega_tab4_num = $ashfordtheme->option['ashford_mega_tab4_num'];
    $ashford_mega_tab5_num = $ashfordtheme->option['ashford_mega_tab5_num'];
    $ashford_mega_tab6_num = $ashfordtheme->option['ashford_mega_tab6_num'];
    $ashford_mega_tab7_num = $ashfordtheme->option['ashford_mega_tab7_num'];
    $ashford_mega_tab8_num = $ashfordtheme->option['ashford_mega_tab8_num'];
    if (IS_MOBI == 'false') {
        if ($display_drop_down_menu == 'menu') {
            if (function_exists('wp_nav_menu')) {
                echo '<div id="navigation">';
                echo '<!-- menu -->';
                wp_nav_menu(array('menu' => 'Navigation', 'container' => '', 'menu_id' => 'nav', 'menu_class' => 'sf-menu sf-js-enabled', 'fallback_cb' => 'ashford_theme_header_display_drop_down_menu'));
                ashford_display_search_box();
                echo '</div>';
            } else {
                ashford_theme_header_display_drop_down_menu();
            }
        }
    } else {
        if (function_exists('wp_nav_menu')) {
            echo '<div class="grid_16 alpha omega" id="navigation">';
            echo '<!-- mobile -->';
            wp_nav_menu(array('menu' => 'Mobile', 'container' => '', 'menu_id' => 'nav', 'menu_class' => 'sf-menu sf-js-enabled', 'fallback_cb' => 'ashford_theme_header_display_drop_down_menu'));
            //ashford_display_search_box();
            echo '</div>';
        }
    }
}
/**
 * Handles navigation based on Theme Options choice
 *
 * v2.0 - mobi always gets mobile custom menu
 * v2.0 - mega menu only available to pro themes
 * 
 * @author Tim Bednar 
 * @version v2.0
 * @since v0.01
*/
function ashford_theme_navigation_menu()
{
    global $ashfordtheme;
    $display_drop_down_menu = $ashfordtheme->option['display_drop_down_menu'];
    $display_display_home = $ashfordtheme->option['display_home'];
    $display_search_box = $ashfordtheme->option['display_search_box'];
    $ashford_mega_tab1 = $ashfordtheme->option['ashford_mega_tab1'];
    $ashford_mega_tab2 = $ashfordtheme->option['ashford_mega_tab2'];
    $ashford_mega_tab3 = $ashfordtheme->option['ashford_mega_tab3'];
    $ashford_mega_tab4 = $ashfordtheme->option['ashford_mega_tab4'];
    $ashford_mega_tab5 = $ashfordtheme->option['ashford_mega_tab5'];
    $ashford_mega_tab6 = $ashfordtheme->option['ashford_mega_tab6'];
    $ashford_mega_tab7 = $ashfordtheme->option['ashford_mega_tab7'];
    $ashford_mega_tab8 = $ashfordtheme->option['ashford_mega_tab8'];
    $ashford_mega_tab1_num = $ashfordtheme->option['ashford_mega_tab1_num'];
    $ashford_mega_tab2_num = $ashfordtheme->option['ashford_mega_tab2_num'];
    $ashford_mega_tab3_num = $ashfordtheme->option['ashford_mega_tab3_num'];
    $ashford_mega_tab4_num = $ashfordtheme->option['ashford_mega_tab4_num'];
    $ashford_mega_tab5_num = $ashfordtheme->option['ashford_mega_tab5_num'];
    $ashford_mega_tab6_num = $ashfordtheme->option['ashford_mega_tab6_num'];
    $ashford_mega_tab7_num = $ashfordtheme->option['ashford_mega_tab7_num'];
    $ashford_mega_tab8_num = $ashfordtheme->option['ashford_mega_tab8_num'];
    if (IS_MOBI == 'false') {
        if ($display_drop_down_menu == 'menu') {
            if (function_exists('wp_nav_menu')) {
                echo '<div class="grid_10 alpha omega" id="navigation">';
                echo '<!-- menu -->';
                wp_nav_menu(array('menu' => 'Navigation', 'container' => '', 'menu_id' => 'nav', 'menu_class' => 'sf-menu sf-js-enabled', 'fallback_cb' => 'ashford_theme_header_display_drop_down_menu'));
                ashford_display_search_box();
                echo '</div>';
            } else {
                ashford_theme_header_display_drop_down_menu();
            }
        } elseif ($display_drop_down_menu == 'mega' && IS_CHILD_THEME == 'true') {
            if ($display_display_home != 'homeoff') {
                echo '<div class="grid_16 alpha omega" id="navigation"><ul class="ashford_mega_menu display_home" id="mega_nav">';
            } else {
                echo '<div class="grid_16 alpha omega" id="navigation"><ul class="ashford_mega_menu" id="mega_nav">';
            }
            echo '<!-- mega -->';
            if ($display_display_home != 'homeoff') {
                if ($ashford_mega_tab1 == '') {
                    $add_omega = ' omega';
                }
                if (is_front_page()) {
                    echo '<li id="mega_tab-0" class="mega_tab_item mega_tab_current grid_2 alpha' . $add_omega . '"><div class="mega_tab_item_title"><a title="Home" href="' . get_option('home') . '"><span>Home</span></a></div></li>';
                } else {
                    echo '<li id="mega_tab-0" class="mega_tab_item grid_2 alpha' . $add_omega . '"><div class="mega_tab_item_title"><a title="Home" href="' . get_option('home') . '"><span>Home</span></a></div></li>';
                }
            }
            if ($ashford_mega_tab1 != '') {
                if ($ashford_mega_tab2 == '') {
                    $add_omega = ' omega';
                }
                if ($display_display_home == 'homeoff') {
                    $add_alpha = ' alpha';
                }
                echo '<li id="mega_tab-1" class="mega_tab_item grid_2' . $add_alpha . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab1 . '</div>';
                if (is_sidebar_active('mega_tab-1')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab1_num . '">';
                    dynamic_sidebar('mega_tab-1');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab2 != '') {
                if ($ashford_mega_tab3 == '') {
                    $add_omega = ' omega';
                }
                echo '<li id="mega_tab-2"  class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab2 . '</div>';
                if (is_sidebar_active('mega_tab-2')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab2_num . '">';
                    dynamic_sidebar('mega_tab-2');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab3 != '') {
                if ($ashford_mega_tab4 == '') {
                    $add_omega = ' omega';
                }
                echo '<li id="mega_tab-3"  class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab3 . '</div>';
                if (is_sidebar_active('mega_tab-3')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab3_num . '">';
                    dynamic_sidebar('mega_tab-3');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab4 != '') {
                if ($ashford_mega_tab5 == '') {
                    $add_omega = ' omega';
                }
                echo '<li id="mega_tab-4"  class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab4 . '</div>';
                if (is_sidebar_active('mega_tab-4')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab4_num . '">';
                    dynamic_sidebar('mega_tab-4');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab5 != '') {
                if ($ashford_mega_tab6 == '') {
                    $add_omega = ' omega';
                }
                if ($display_display_home != 'homeoff' && $display_search_box != 'searchoff') {
                    $add_omega = ' omega';
                }
                echo '<li  id="mega_tab-5" class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab5 . '</div>';
                if (is_sidebar_active('mega_tab-5')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab5_num . '">';
                    dynamic_sidebar('mega_tab-5');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab6 != '' && ($display_search_box != 'searchon' || $display_display_home != 'homeon')) {
                if ($ashford_mega_tab7 == '') {
                    $add_omega = ' omega';
                }
                if ($display_search_box == 'searchon' && $display_display_home != 'homeon') {
                    $add_omega = ' omega';
                }
                if ($display_display_home != 'homeoff' && $ashford_mega_tab7 == '') {
                    $add_omega = ' omega';
                }
                echo '<li id="mega_tab-6"  class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab6 . '</div>';
                if (is_sidebar_active('mega_tab-6')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab6_num . '">';
                    dynamic_sidebar('mega_tab-6');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab7 != '' && $display_search_box == 'searchoff') {
                if ($ashford_mega_tab8 == '') {
                    $add_omega = ' omega';
                }
                if ($display_display_home != 'homeoff') {
                    $add_omega = ' omega';
                }
                echo '<li  id="mega_tab-7" class="mega_tab_item grid_2' . $add_omega . '"><div class="mega_tab_item_title">' . $ashford_mega_tab7 . '</div>';
                if (is_sidebar_active('mega_tab-7')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab7_num . '">';
                    dynamic_sidebar('mega_tab-7');
                    echo '</div>';
                }
                echo '</li>';
            }
            if ($ashford_mega_tab8 != '' && $display_display_home == 'homeoff' && $display_search_box == 'searchoff') {
                echo '<li  id="mega_tab-8" class="mega_tab_item grid_2 omega"><div class="mega_tab_item_title">' . $ashford_mega_tab8 . '</div>';
                if (is_sidebar_active('mega_tab-8')) {
                    echo '<div class="mega_tab_box mega_tab_col' . $ashford_mega_tab8_num . '">';
                    dynamic_sidebar('mega_tab-8');
                    echo '</div>';
                }
                echo '</li>';
            }
            ashford_theme_display_rss_subscribe();
            echo '</ul>';
            ashford_display_search_box();
            echo '</div>';
        } else {
            ashford_theme_header_display_drop_down_menu();
        }
    } else {
        if (function_exists('wp_nav_menu')) {
            echo '<div class="grid_16 alpha omega" id="navigation">';
            echo '<!-- mobile -->';
            wp_nav_menu(array('menu' => 'Mobile', 'container' => '', 'menu_id' => 'nav', 'menu_class' => 'sf-menu sf-js-enabled', 'fallback_cb' => 'ashford_theme_header_display_drop_down_menu'));
            //ashford_display_search_box();
            echo '</div>';
        }
    }
}