header-brokerlanding.php 6.99 KB
<?php include 'staging-lock.php'; ?>
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes() ?>><![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" <?php language_attributes() ?>><![endif]-->
<!--[if IE 8]>
<style>
<html class="no-js lt-ie9" <?php language_attributes() ?>><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" <?php language_attributes() ?>>
<!--<![endif]-->

<head>
    <meta charset="<?php bloginfo('charset') ?>">
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!--[if IE 9]>
    <style>
    .peopleOpen {
        margin-right:220px !important;
    }
    </style>
    <![endif]-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width" />
    <meta name="facebook-domain-verification" content="yvu0p7s5ycmx5htkiw6wn8hmyb2rbo" />
    <title><?php wp_title(' » ', true, 'right'); ?>The Commonwell</title>
    <script>
        dataLayer = [{
            'userId': '<?php echo get_current_user_id(); ?>'
        }];
    </script>
    <script>
        (function(w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime(),
                event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0],
                j = d.createElement(s),
                dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src =
                '//www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', 'GTM-MWQJ2F');
    </script>
    <link rel="shortcut icon" type="image/x-icon" href="<?php bloginfo('url'); ?>/favicon.ico">
    <link rel="apple-touch-icon" href="<?php bloginfo('url'); ?>/apple-touch-icon.png">
    <?php wp_head() ?>
    <script>
        window.isBrokerPage = true;
    </script>
</head>

<body <?php body_class() ?>>
    <!-- Google Tag Manager -->
    <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-MWQJ2F" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager -->
    <!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
    your browser</a> to improve your experience.</p>
<![endif]-->
    <?php $current_user = wp_get_current_user(); ?>
    <div id="content-wrap">
        <?php
        if (function_exists(clean_custom_moblie_menus())) clean_custom_moblie_menus();
        ?>
        <style>
            @media screen and (max-device-width: 480px) {
                body {
                    -webkit-text-size-adjust: 100%;
                }
            }
        </style>

        <header id="page-header-landing">
            <div id="other-header">
                <div class="row">
                    <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                        <div id="page-logo">
                            <a href="<?php bloginfo('url') ?>" title="<?php bloginfo('name') ?> - <?php bloginfo('description') ?>">
                                <img id="otherpage-logo" src="<?php bloginfo('template_directory') ?>/images/Commonwell-logo.svg" alt="Commonwell Mutual Insurance Group logo" />
                            </a>
                        </div>
                    </div>
                    <div class="col-xs-9 col-sm-9 col-md-9 col-md-9">
                        <div class="row">
                            <div id='header'>
                                <?php wp_nav_menu(
                                    array(
                                        'theme_location' => 'broker-header',
                                        'container'      => 'nav',
                                        'container_id'   => 'broker-header',
                                    )
                                );

                                echo do_shortcode(
                                    '[searchwp_search_form target="' . get_option('home') . '/search-results/"  engine="default" var="searchvar" ]'
                                ); ?>
                            </div>
                        </div>
                        <div class="row">
                            <div class="broker_hello">
                                <span class="username" style="text-transform:uppercase;">HI <?php echo esc_html($current_user->user_firstname); ?>
                                </span>
                                <span class="greating"> - How can we help?
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </header>
    </div>
    <script>
        function showSearch() {
            jQuery(document).ready(function($) {
                $("#seacrh_mobile").slideToggle();

                if ($(".mobile_collapse").css('display') == 'block') {
                    $(".mobile_collapse").slideToggle();

                }
                if ($(".people_span").css('display') == 'block') {
                    // $(".people_span").css('margin-top',' 20px')
                }
                if ($(".people_span").css('display') != 'block') {
                    $(".people_span").delay(500).animate({
                        'width': 'toggle'
                    });
                }
                if ($("#seacrh_mobile").css('display') != 'block') {
                    //	  $(".people_span").css('margin-top',' -5%')
                }

            });

        }

        function toggle_mobile_menu() {
            jQuery(document).ready(
                function($) {
                    $(".mobile_collapse").slideToggle(300);

                    $("#mySidenav").removeClass('mySidenavOpen');
                    $(".people_span").removeClass('peopleOpen');

                    if ($("#seacrh_mobile").css('display') == 'block') {
                        $("#seacrh_mobile").slideToggle();
                    }
                }
            );
        }

        // Using jQuery.
        jQuery(document).ready(
            function($) {
                $(function() {
                    $('.searchform').each(
                        function() {
                            $(this).find('input').keypress(
                                function(e) {
                                    // Enter pressed?
                                    if (e.which == 10 || e.which == 13) {
                                        this.form.submit();
                                    }
                                }
                            );
                            $(this).find('input[type=text]').attr("placeholder", "Search keyword");

                            // Why??
                            //                     $(this).find('input[type=submit]').hide();
                        }
                    );
                });
            }
        );
    </script>