<?php
/*
 * tz-header
 * */

function tzinteriart_header($atts)
{
    $tz_header_option = $tz_header_type = $tz_slide = $tz_logo_type = $tz_logo_image = $tz_logo_text = $tz_color_logo_text = $tz_location_menu = $tz_position = '';
    extract(shortcode_atts(array(
        'tz_header_option' => '1',
        'tz_header_type' => '1',
        'tz_slide' => '',
        'tz_logo_type' => '',
        'tz_logo_image' => '',
        'tz_logo_text' => '',
        'tz_color_logo_text' => '',
        'tz_location_menu' => 'primary',
        'tz_position' => '1',
    ), $atts));
    ob_start();
    $tz_header_position = '';
    if ($tz_header_option == '1'):
        get_template_part('template_inc/inc', 'header');
    else:
        wp_enqueue_script('nav');
        wp_enqueue_script('one_page');

        $tz_class_admin = '';
        if (is_admin_bar_showing()) {
            $tz_class_admin = 'tzAdmin_bar';
        }

        $tzinteriart_header_class = '';
        if ($tz_header_type == '1') {
            $tzinteriart_header_class = 'tz-header-type-1';
        } elseif ($tz_header_type == '2') {
            $tzinteriart_header_class = 'tz-header-type-2';
        } elseif ($tz_header_type == '3') {
            $tzinteriart_header_class = 'tz-header-type-3';
        } elseif ($tz_header_type == '4') {
            $tzinteriart_header_class = 'tz-header-type-4';
        } elseif ($tz_header_type == '5') {
            $tzinteriart_header_class = 'tz-header-type-5';
        } elseif ($tz_header_type == '6') {
            $tzinteriart_header_class = 'tz-header-type-6';
        } elseif ($tz_header_type == '7') {
            $tzinteriart_header_class = 'tz-header-type-7';
        } elseif ($tz_header_type == '8') {
            $tzinteriart_header_class = 'tz-header-type-8';
        } elseif ($tz_header_type == '9') {
            $tzinteriart_header_class = 'tz-header-type-9';
        } elseif ($tz_header_type == '10') {
            $tzinteriart_header_class = 'tz-header-type-10';
        } elseif ($tz_header_type == '11') {
            $tzinteriart_header_class = 'tz-header-type-11';
            if ($tz_position == '1'):
                $tz_header_position = 'tz_header_absolute';

            elseif ($tz_position == '2'):
                $tz_header_position = 'tz_header_reletive';
            endif;
        } elseif ($tz_header_type == '12') {
            $tzinteriart_header_class = 'tz-header-type-12';
        }


        $tzinteriart_language = ot_get_option('interiart_TzHeaderTop_Language', 'show');
        $tzinteriart_marker = ot_get_option('interiart_TzHeaderTop_Marker');
        $tzinteriart_email = ot_get_option('interiart_TzHeaderTop_Email');
        $tzinteriart_phone = ot_get_option('interiart_TzHeaderTop_Phone');
        $tzinteriart_search = ot_get_option('TzHeader_Search', 'show');
        $tzinteriart_cart = ot_get_option('TzHeader_Cart', 'show');
        $tzinteriart_facebook = ot_get_option('interiart_TzHeaderTop_facebook');
        $tzinteriart_twitter = ot_get_option('interiart_TzHeaderTop_twitter');
        $interiart_instagram = ot_get_option('interiart_TzHeaderTop_instagram');
        $tzinteriart_tumblr = ot_get_option('interiart_TzHeaderTop_tumblr');
        $tzinteriart_linkedin = ot_get_option('interiart_TzHeaderTop_linkedin');
        $tzinteriart_youtube = ot_get_option('interiart_TzHeaderTop_youtube');
        $tzinteriart_dribbble = ot_get_option('interiart_TzHeaderTop_dribbble');
        $tzinteriart_behance = ot_get_option('interiart_TzHeaderTop_behance');
        $tzinteriart_skype = ot_get_option('interiart_TzHeaderTop_skype');
        $tzinteriart_pinterest = ot_get_option('interiart_TzHeaderTop_pinterest');
        $tzinteriart_google_plus = ot_get_option('interiart_TzHeaderTop_google_plus');

        $tzinteriart_max_mega_menu_class = '';
        if (function_exists('max_mega_menu_is_enabled') && max_mega_menu_is_enabled($tz_location_menu)) :
            $tzinteriart_max_mega_menu_class = 'tz-max-mega-menu';
        endif;


        ?>

        <header class="tz-header <?php echo esc_attr($tz_header_position); ?> <?php echo esc_attr($tzinteriart_header_class); ?>">
            <?php
            if ($tz_header_type == '1' || $tz_header_type == '2' || $tz_header_type == '6') {
                ?>
                <div class="tz-headerTop">
                    <div class="container">
                        <div class="tz-headerTop-box">
                            <div class="tz-headerLeft pull-left">
                                <div class="tzheader_support">
                                    <?php
                                    if ($tzinteriart_language == 'show') {
                                        ?>
                                        <div class="tzheader_wpml">
                                            <?php
                                            if (function_exists('icl_object_id')) {
                                                ?>
                                                <?php do_action('icl_language_selector'); ?>
                                                <?php
                                            } else {
                                                ?>
                                                <div id="lang_sel">
                                                    <ul>
                                                        <li>
                                                            <a class="lang_sel_sel icl-en" href="#">
                                                                <i class="fa fa-globe"></i><?php echo esc_html_e('Choose Your Languages', 'tz-interiart'); ?>
                                                            </a>
                                                            <ul>
                                                                <li class="icl-vi">
                                                                    <a href="#">
                                                                        <img width="18" height="12" alt="ru"
                                                                             src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/vn.png"/>
                                                                        <?php echo esc_html_e('Viet Nam', 'tz-interiart'); ?>
                                                                    </a>
                                                                    <a href="#">
                                                                        <img width="18" height="12" alt="en"
                                                                             src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/en.png"/>
                                                                        <?php echo esc_html_e('English', 'tz-interiart'); ?>
                                                                    </a>
                                                                </li>
                                                            </ul>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <?php
                                            }
                                            ?>
                                        </div>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_language == 'show' && $tzinteriart_marker != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    }
                                    ?>

                                    <?php
                                    if ($tzinteriart_marker != '') {
                                        ?>
                                        <div class="tzheader_site">
                                            <i class="fa fa-map-marker"></i>
                                            <?php echo esc_html($tzinteriart_marker); ?>
                                        </div>
                                        <?php
                                    }
                                    ?>

                                    <?php
                                    if ($tzinteriart_language == 'show' && $tzinteriart_email != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    } elseif ($tzinteriart_language == 'hide' && $tzinteriart_marker != '' && $tzinteriart_email != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_email != '') {
                                        ?>
                                        <div class="tzheader_site">
                                            <a href="mailto:<?php echo esc_html($tzinteriart_email); ?>">
                                                <i class="fa fa-envelope-o"></i>
                                                <?php echo esc_html($tzinteriart_email); ?>
                                            </a>
                                        </div>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_language == 'show' && $tzinteriart_phone != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    } elseif ($tzinteriart_language == 'hide' && $tzinteriart_email != '' && $tzinteriart_phone != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    } elseif ($tzinteriart_language == 'hide' && $tzinteriart_marker != '' && $tzinteriart_phone != '') {
                                        ?>
                                        <span class="tzheader_line">|</span>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_phone != '') {
                                        ?>
                                        <div class="tzheader_site">
                                            <a href="tel:<?php echo esc_html($tzinteriart_phone) ?>">
                                                <i class="fa fa-phone" aria-hidden="true"></i>
                                                <?php echo esc_html($tzinteriart_phone); ?>
                                            </a>
                                        </div>
                                        <?php
                                    }
                                    ?>

                                </div>
                            </div>

                            <div class="tz-headerRight pull-right">
                                <ul class="tzheader_social">
                                    <?php
                                    if ($tzinteriart_facebook != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_facebook); ?>"><i
                                                        class="fa fa-facebook"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_twitter != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_twitter); ?>"><i
                                                        class="fa fa-twitter"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_tumblr != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_tumblr); ?>"><i
                                                        class="fa fa-tumblr"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_linkedin != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_linkedin); ?>"><i
                                                        class="fa fa-linkedin"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($interiart_instagram != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($interiart_instagram); ?>"><i
                                                        class="fa fa-instagram"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_youtube != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_youtube); ?>"><i
                                                        class="fa fa-youtube-play"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_dribbble != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_dribbble); ?>"><i
                                                        class="fa fa-dribbble"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_behance != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_behance); ?>"><i
                                                        class="fa fa-behance"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_skype != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_skype); ?>"><i
                                                        class="fa fa-skype"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_pinterest != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_pinterest); ?>"><i
                                                        class="fa fa-pinterest-p"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                    <?php
                                    if ($tzinteriart_google_plus != '') {
                                        ?>
                                        <li>
                                            <a href="<?php echo esc_url($tzinteriart_google_plus); ?>"><i
                                                        class="fa fa-google-plus"></i></a>
                                        </li>
                                        <?php
                                    }
                                    ?>
                                </ul>
                            </div>
                        </div>
                    </div><!--end class container-->
                </div>
                <?php
            }
            ?>
            <?php
            if ($tz_header_type == '4') {
                ?>
                <div class="tz-header-slide">
                    <?php
                    if ($tz_slide != ''):
                        putRevSlider($tz_slide);
                    endif;
                    ?>
                </div>
            <?php } ?>


            <div class="tz-headerBottom <?php echo esc_attr($tzinteriart_max_mega_menu_class); ?>">

                <?php if ($tz_header_type != '6' && $tz_header_type != '7' && $tz_header_type != '8' && $tz_header_type != '11' && $tz_header_type != '12' ): ?>
                <div class="container">
                    <?php endif;
                    ?>

                    <?php if ($tz_header_type == '6'): ?>
                    <div class="tz-header-logo">
                        <div class="container">
                            <?php endif;
                            ?>

                            <a class="pull-left tz_logo" href="<?php echo get_home_url(); ?>"
                               title="<?php bloginfo('name'); ?>" <?php
                            if ($tz_logo_type == 'text' && $tz_logo_text != '') {
                                echo 'style="color:' . esc_attr($tz_color_logo_text) . '"';
                            }
                            ?>>
                                <?php
                                $tz_logo_url = wp_get_attachment_url($tz_logo_image);
                                $tz_width_img = '';
                                $tz_height_img = '';
                                $tz_images_info = wp_get_attachment_image_src($tz_logo_image, $size = 'full');
                                if (isset($tz_images_info) && !empty($tz_images_info)) {
                                    $tz_width_img = $tz_images_info[1];
                                    $tz_height_img = $tz_images_info[2];
                                }
                                if ($tz_logo_type == 'text') {
                                    echo esc_html($tz_logo_text);
                                } else {
                                    echo '<img class="logo_lager" width ="' . esc_attr($tz_width_img) . '" height ="' . esc_attr($tz_height_img) . '" src="' . esc_url($tz_logo_url) . '" alt="' . get_bloginfo('title') . '" />';
                                }
                                ?>
                            </a>

                            <?php if ($tz_header_type == '6'): ?>
                        </div>
                    </div>

                    <div class="tz-header-menu">
                        <div class="container">
                            <?php endif;
                            ?>

                            <?php
                            if ($tz_header_type != '7' && class_exists('WooCommerce')):
                                if ($tz_header_type != '10' && class_exists('WooCommerce')) {
                                    ?>
                                    <?php if($tzinteriart_cart == 'show'): ?>
                                    <div class="tz-header-cart pull-right">
                                        <span aria-hidden="true" class="icon_cart_alt"></span>
                                        <?php
                                        if (class_exists('interiart_WC_Widget_Cart')) {
                                            the_widget('interiart_WC_Widget_Cart');
                                        }
                                        ?>
                                    </div>
                                    <?php endif; ?>
                                    <?php
                                } elseif ($tz_header_type == '10' && class_exists('WooCommerce')) {
                                    ?>
                                    <?php if($tzinteriart_cart == 'show'): ?>
                                    <div class="tz-header-cart pull-right">
                                        <span aria-hidden="true" class="icon_cart_alt"></span>
                                        <?php
                                        if (class_exists('interiart_WC_Widget_Cart')) {
                                            the_widget('interiart_WC_Widget_Cart');
                                        }
                                        ?>
                                    </div>
                                    <?php endif; ?>
                                    <?php
                                }
                            endif;
                            ?>

                            <?php
                            if ($tz_header_type != '7'):
                                ?>
                                <?php if ($tzinteriart_search == 'show') : ?>
                                <div class="tz-header-search pull-right">
                                    <span aria-hidden='true' class='icon_search tz_icon_search'></span>
                                    <span aria-hidden='true' class='icon_close tz_icon_close'></span>
                                    <div class="tz-header-search-form">
                                        <?php get_search_form(); ?>
                                    </div>
                                </div>
                            <?php endif; ?>
                            <?php endif; ?>
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                                    data-target="#tz-navbar-collapse">
                                <i class="fa fa-bars"></i>
                            </button>
                            <nav class="pull-right <?php if($tz_header_type == '12') : echo 'container'; endif; ?>">
                                <?php
                                if ($tz_location_menu != '' && has_nav_menu($tz_location_menu)) :
                                    wp_nav_menu(array(
                                        'theme_location' => $tz_location_menu,
                                        'menu_class' => 'nav navbar-nav collapse navbar-collapse pull-left tz-nav',
                                        'menu_id' => 'tz-navbar-collapse',
                                        'container' => false
                                    ));
                                endif;
                                ?>
                            </nav>
                            <?php if ($tz_header_type == '6'): ?>
                                <div class="tz-header-menu-space"></div>
                            <?php endif; ?>

                            <?php if ($tz_header_type == '6'): ?>
                        </div>
                    </div>

                <?php endif;
                ?>
                    <?php if ($tz_header_type != '6' && $tz_header_type != '7' && $tz_header_type != '8' && $tz_header_type != '11' && $tz_header_type != '12' ): ?>
                </div><!--end class container-->
            <?php endif; ?>

                <?php if ($tz_header_type == '11' && ($tzinteriart_facebook != '' || $tzinteriart_twitter != '' || $tzinteriart_tumblr != '' || $tzinteriart_linkedin != '' || $tzinteriart_youtube != '' || $tzinteriart_dribbble != '' || $tzinteriart_behance != '' || $tzinteriart_skype != '' || $tzinteriart_pinterest != '' || $tzinteriart_google_plus != '' || $interiart_instagram != '')): ?>
                    <div class="tz-header-social">
                        <ul>
                            <?php
                            if ($tzinteriart_facebook != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_facebook); ?>"><i
                                                class="fa fa-facebook"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_twitter != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_twitter); ?>"><i class="fa fa-twitter"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($interiart_instagram != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($interiart_instagram); ?>"><i
                                                class="fa fa-instagram"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_tumblr != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_tumblr); ?>"><i
                                                class="fa fa-tumblr"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_linkedin != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_linkedin); ?>"><i
                                                class="fa fa-linkedin"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_youtube != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_youtube); ?>"><i
                                                class="fa fa-youtube-play"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_dribbble != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_dribbble); ?>"><i
                                                class="fa fa-dribbble"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_behance != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_behance); ?>"><i class="fa fa-behance"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_skype != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_skype); ?>"><i class="fa fa-skype"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_pinterest != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_pinterest); ?>"><i
                                                class="fa fa-pinterest-p"></i></a>
                                </li>
                                <?php
                            }
                            ?>
                            <?php
                            if ($tzinteriart_google_plus != '') {
                                ?>
                                <li>
                                    <a href="<?php echo esc_url($tzinteriart_google_plus); ?>"><i
                                                class="fa fa-google-plus"></i></a>
                                </li>
                                <?php
                            }
                            ?>

                        </ul>
                    </div>
                <?php endif; ?>
                <?php if ($tzinteriart_language == 'show' && ($tz_header_type == '11' || $tz_header_type == '12')) { ?>
                    <div class="tzheader_wpml">
                        <?php
                        if (function_exists('icl_object_id')) {
                            ?>
                            <?php do_action('icl_language_selector'); ?>
                            <?php
                        } else {
                            ?>
                            <ul>
                                <li>
                                    <a class="lang_sel_sel icl-en" href="#">
                                        <?php echo esc_html_e('Eng', 'tz-interiart'); ?>
                                    </a>
                                    <ul class="wpml_ls_sub_menu">
                                        <li class="icl-vi">
                                            <a href="?lang=ger">
                                                <img width="18" height="12" alt="ru"
                                                     src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/gm.png">
                                                <?php echo esc_html_e('Germany', 'tz-interiart'); ?>
                                            </a>
                                        </li>
                                        <li class="icl-vi">
                                            <a href="?lang=ger">
                                                <img width="18" height="12" alt="ru"
                                                     src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/vn.png">
                                                <?php echo esc_html_e('Viet Nam', 'tz-interiart'); ?>
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                            <?php
                        }
                        ?>
                    </div>
                <?php } ?>

            </div>

            <?php if ($tz_header_type == '7' && ($tzinteriart_facebook != '' || $tzinteriart_twitter != '' || $tzinteriart_tumblr != '' || $tzinteriart_linkedin != '' || $tzinteriart_youtube != '' || $tzinteriart_dribbble != '' || $tzinteriart_behance != '' || $tzinteriart_skype != '' || $tzinteriart_pinterest != '' || $tzinteriart_google_plus != '')): ?>
                <div class="tz-header-social">
                    <span><?php echo esc_html__('Follow Us On', 'tz-interiart') ?></span>
                    <ul>
                        <?php
                        if ($tzinteriart_facebook != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_facebook); ?>"><i
                                            class="fa fa-facebook"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_twitter != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_twitter); ?>"><i class="fa fa-twitter"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_tumblr != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_tumblr); ?>"><i class="fa fa-tumblr"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_linkedin != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_linkedin); ?>"><i
                                            class="fa fa-linkedin"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_youtube != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_youtube); ?>"><i
                                            class="fa fa-youtube-play"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_dribbble != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_dribbble); ?>"><i
                                            class="fa fa-dribbble"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_behance != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_behance); ?>"><i class="fa fa-behance"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_skype != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_skype); ?>"><i class="fa fa-skype"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_pinterest != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_pinterest); ?>"><i
                                            class="fa fa-pinterest-p"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                        <?php
                        if ($tzinteriart_google_plus != '') {
                            ?>
                            <li>
                                <a href="<?php echo esc_url($tzinteriart_google_plus); ?>"><i
                                            class="fa fa-google-plus"></i></a>
                            </li>
                            <?php
                        }
                        ?>
                    </ul>
                </div>
            <?php endif; ?>

        </header>
        <?php
        if ($tz_header_type != '3' && $tz_header_type != '7') {
            ?>
            <div class="tz-header <?php echo esc_attr($tz_header_position); ?> <?php echo esc_attr($tzinteriart_header_class); ?> scroll">
                <div class="tz-headerBottom <?php echo esc_attr($tzinteriart_max_mega_menu_class); ?>">
                    <?php if ($tz_header_type != '6' && $tz_header_type != '11' && $tz_header_type != '12'): ?>
                    <div class="container">
                        <?php endif;
                        ?>

                        <?php if ($tz_header_type == '6'): ?>
                        <div class="tz-header-logo">
                            <div class="container">
                                <?php endif;
                                ?>

                                <a class="pull-left tz_logo" href="<?php echo get_home_url(); ?>"
                                   title="<?php bloginfo('name'); ?>" <?php
                                if ($tz_logo_type == 'text' && $tz_logo_text != '') {
                                    echo 'style="color:' . esc_attr($tz_color_logo_text) . '"';
                                }
                                ?>>
                                    <?php
                                    $tz_logo_url = wp_get_attachment_url($tz_logo_image);
                                    $tz_width_img = '';
                                    $tz_height_img = '';
                                    $tz_images_info = wp_get_attachment_image_src($tz_logo_image, $size = 'full');
                                    if (isset($tz_images_info) && !empty($tz_images_info)) {
                                        $tz_width_img = $tz_images_info[1];
                                        $tz_height_img = $tz_images_info[2];
                                    }
                                    if ($tz_logo_type == 'text') {
                                        echo esc_html($tz_logo_text);
                                    } else {
                                        echo '<img class="logo_lager" width ="' . esc_attr($tz_width_img) . '" height ="' . esc_attr($tz_height_img) . '" src="' . esc_url($tz_logo_url) . '" alt="' . get_bloginfo('title') . '" />';
                                    }
                                    ?>
                                </a>

                                <?php if ($tz_header_type == '6'): ?>
                            </div> <!--end class container-->
                        </div>

                        <div class="tz-header-menu">
                            <div class="container">
                                <?php endif;
                                ?>

                                <?php
                                if (class_exists('WooCommerce')):
                                    ?>
                                <?php if($tzinteriart_cart == 'show'): ?>
                                    <div class="tz-header-cart pull-right">
                                        <span aria-hidden="true" class="icon_cart_alt"></span>
                                        <?php
                                        if (class_exists('interiart_WC_Widget_Cart')) {
                                            the_widget('interiart_WC_Widget_Cart');
                                        }
                                        ?>
                                    </div>
                                <?php endif; ?>
                                <?php
                                endif;
                                ?>
                                <?php if ($tzinteriart_search == 'show') : ?>
                                    <div class="tz-header-search pull-right">
                                        <span aria-hidden='true' class='icon_search tz_icon_search'></span>
                                        <span aria-hidden='true' class='icon_close tz_icon_close'></span>
                                        <div class="tz-header-search-form">
                                            <?php get_search_form(); ?>
                                        </div>
                                    </div>
                                <?php endif; ?>
                                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                                        data-target="#tz-navbar-collapse">
                                    <i class="fa fa-bars"></i>
                                </button>
                                <nav class="pull-right <?php if($tz_header_type == '12') : echo 'container'; endif; ?>">
                                    <?php
                                    if ($tz_location_menu != '' && has_nav_menu($tz_location_menu)) :
                                        wp_nav_menu(array(
                                            'theme_location' => $tz_location_menu,
                                            'menu_class' => 'nav navbar-nav collapse navbar-collapse pull-left tz-nav',
                                            'menu_id' => 'tz-navbar-collapse',
                                            'container' => false
                                        ));
                                    endif;
                                    ?>
                                </nav>
                                <?php if ($tz_header_type == '6'): ?>
                                    <div class="tz-header-menu-space"></div>
                                <?php endif; ?>

                                <?php if ($tz_header_type == '6'): ?>
                            </div>
                        </div>
                    <?php endif;
                    ?>
                        <?php if ($tz_header_type != '6' && $tz_header_type != '11' && $tz_header_type != '12'): ?>
                    </div><!--end class container-->
                <?php endif;
                ?>
                    <?php if ($tz_header_type == '11' && ($tzinteriart_facebook != '' || $tzinteriart_twitter != '' || $tzinteriart_tumblr != '' || $tzinteriart_linkedin != '' || $tzinteriart_youtube != '' || $tzinteriart_dribbble != '' || $tzinteriart_behance != '' || $tzinteriart_skype != '' || $tzinteriart_pinterest != '' || $tzinteriart_google_plus != '' || $interiart_instagram != '')): ?>
                        <div class="tz-header-social">
                            <ul>
                                <?php
                                if ($tzinteriart_facebook != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_facebook); ?>"><i
                                                    class="fa fa-facebook"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_twitter != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_twitter); ?>"><i
                                                    class="fa fa-twitter"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($interiart_instagram != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($interiart_instagram); ?>"><i
                                                    class="fa fa-instagram"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_tumblr != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_tumblr); ?>"><i
                                                    class="fa fa-tumblr"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_linkedin != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_linkedin); ?>"><i
                                                    class="fa fa-linkedin"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_youtube != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_youtube); ?>"><i
                                                    class="fa fa-youtube-play"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_dribbble != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_dribbble); ?>"><i
                                                    class="fa fa-dribbble"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_behance != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_behance); ?>"><i
                                                    class="fa fa-behance"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_skype != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_skype); ?>"><i class="fa fa-skype"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_pinterest != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_pinterest); ?>"><i
                                                    class="fa fa-pinterest-p"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>
                                <?php
                                if ($tzinteriart_google_plus != '') {
                                    ?>
                                    <li>
                                        <a href="<?php echo esc_url($tzinteriart_google_plus); ?>"><i
                                                    class="fa fa-google-plus"></i></a>
                                    </li>
                                    <?php
                                }
                                ?>

                            </ul>
                        </div>
                    <?php endif; ?>
                    <?php
                    if ($tzinteriart_language == 'show' && ($tz_header_type == '11' || $tz_header_type == '12')) {
                        ?>
                        <div class="tzheader_wpml">
                            <?php
                            if (function_exists('icl_object_id')) {
                                ?>
                                <?php do_action('icl_language_selector'); ?>
                                <?php
                            } else {
                                ?>
                                <ul>
                                    <li>
                                        <a class="lang_sel_sel icl-en" href="#">
                                            <?php echo esc_html_e('Eng', 'tz-interiart'); ?>
                                        </a>
                                        <ul class="wpml_ls_sub_menu">
                                            <li class="icl-vi">
                                                <a href="?lang=ger">
                                                    <img width="18" height="12" alt="ru"
                                                         src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/gm.png">
                                                    <?php echo esc_html_e('GERMANY', 'tz-interiart'); ?>
                                                </a>
                                            </li>
                                            <li class="icl-vi">
                                                <a href="?lang=ger">
                                                    <img width="18" height="12" alt="ru"
                                                         src="http://d2salfytceyqoe.cloudfront.net/wp-content/plugins/wpml/res/flags/vn.png">
                                                    <?php echo esc_html_e('VIET NAM', 'tz-interiart'); ?>
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                                <?php
                            }
                            ?>
                        </div>
                        <?php
                    }
                    ?>
                </div>
            </div>
            <?php
        }
        ?>

        <?php
        if ($tz_header_type == '7') {
            ?>
            <script type="text/javascript">
                jQuery(document).ready(function () {
                    "use strict";
                    if (jQuery('.tz-header-type-7').length) {
                        jQuery('body').addClass('tz-header-left');
                    }
                    ;
                });
            </script>
            <?php
        }
        ?>

    <?php
    endif;
    return ob_get_clean();
}

add_shortcode('tz-header', 'tzinteriart_header');
?>