<?php
$show_social_network  = ot_get_option('show_social_network', true);
if ($show_social_network  == 'on') :
if (ot_get_option('social_top_footer')):
?>
<div class="social_bott_footer">
    <div class="container">
        <div class="row">
        <div class="col-12">
        <div class="sbi_images social_footer">
			<a class="btn-instagram" href="<?php echo ot_get_option('social_network_link'); ?>">
				<?php echo ot_get_option('social_network_name'); ?>
			</a>
            <?php
            if (function_exists('ot_get_option')) {
            $slides = ot_get_option('social_top_footer', array());
            if (!empty($slides)) {
                foreach ($slides as $slide) {
                $class = uniqid('a-class-');
            ?>
                <div class="sbi_item">
                    <div class="sbi_photo_wrap">
                    <a href="<?php echo $slide['social_link']; ?>" class="<?php echo $class; ?>">
                        <img src="<?php echo $slide['social_images']; ?> ">
                        <i class="fab fa-<?php echo $slide['social_icon']; ?> "></i>
                    </a>
                    </div>
                </div>
            <?php
                }
            }
            }
            ?>
		</div>
        </div>
    </div>
    </div>
</div>
<?php endif; endif; ?>
<footer class="footer">
    <div class="container bottom_border">
        <div class="row">
            <div class="col-sm-3  col-12 col headin5_amrc">
                <?php dynamic_sidebar('footerone'); ?>
            </div>
            <div class="col-sm-3  col-12 col headin5_amrc">
                <?php dynamic_sidebar('footertwo'); ?>
            </div>
            <div class="col-sm-3  col-12 col headin5_amrc">
                <?php dynamic_sidebar('footerthree'); ?>
            </div>
            <div class="col-sm-3  col-12 col headin5_amrc">
                <?php dynamic_sidebar('footerfour'); ?>
            </div>
        </div>
    </div>
    <div class="container">
        <ul class="foote_bottom_ul_amrc">
        <?php if ( has_nav_menu( 'footer-menu' ) ) : ?>
            <?php wp_nav_menu(array('theme_location' => 'footer-menu')); ?>
        <?php endif; ?>
        </ul>
        <!--foote_bottom_ul_amrc ends here-->
        <p class="text-center copy_right"><?php echo ot_get_option('copyright_text'); ?></p>
        <?php
            $display_share_back  = ot_get_option('display_social', false);
            if ($display_share_back  == 'on') :
                if (function_exists('ot_get_option')) {
                    $social_media_channels = array(
                        "facebook"      => "fab fa-facebook-f",
                        "twitter"      => "fa-brands fa-x-twitter",
                        "instagram"     => "fab fa-instagram",
                        "google+"       => "fab fa-google-plus-g",
                        "linkedin"      => "fab fa-linkedin-in",
                        "pinterest"     => "fab fa-pinterest",
                        "youtube"       => "fab fa-youtube",
                        "dribbble"      => "fal fa-digging",
                        "github"        => "fab fa-github",
                        "forrst"        => "fal fa-tree",
                        "digg"          => "fab fa-digg",
                        "delicious"     => "fab fa-delicious",
                        "tumblr"        => "fab fa-tumblr",
                        "skype"         => "fab fa-skype",
                        "soundCloud"    => "fab fa-soundcloud",
                        "vimeo"         => "fab fa-vimeo-v",
                        "flickr"        => "fab fa-flickr",
                        "vk"        => "fab fa-vk",
                        "telegram"      => "fab fa-telegram",
                        "apple"         => "fab fa-apple",
                        "android"       => "fab fa-android",
                    );
                    $social_media_icons = ot_get_option('social_links');
                };
        ?>
        <?php if ($social_media_icons) { ?>
            <ul class="social_footer_ul">
                <?php
                foreach ($social_media_icons as $key => $icon) {
                    if ($social_media_channels[$icon['name']]) {
                        echo "<li class='social-media-icon'><a target='_blank' href='" . $icon['href'] . "'><i class='" . $social_media_channels[$icon['name']] . "'></i></a></li>";
                    }
                }
                ?>
            </ul>
        <?php }
        endif; ?>
    </div>
</footer>
<script>  
$(document).ready(function() {
  $('.tab-title:first-of-type').addClass('active');
  $('.tab-content:first-of-type').addClass('active');
  $('.tab-title').click(function() {
    var tab_id = $(this).attr('data-tab');
    $('.tab-title').removeClass('active');
    $('.tab-content').removeClass('active');
    $(this).addClass('active');
    $('.tab-content[data-tab="'+tab_id+'"]').addClass('active');
  });
});

jQuery(document).ready(function (e) {
    e(".product-serchform-wc .search-wrapper input").focus(function () {
        e(".search-results-product ,.them-mask").addClass("focus")
    }), e(".them-mask").click(function () {
        e(".search-results-product,.them-mask").removeClass("focus")
    })
});
jQuery(document).ready(function() {
    jQuery('.content-fix, .sidebar').theiaStickySidebar({
      // Settings
      additionalMarginTop: 50
    });
  });
    $(document).ready(function() {
        $('#scroll').click(function() {
            $("html, body").animate({
                scrollTop: 0
            }, 600);
            return false;
        });
    });
    var hid = $('#back-to-topd');
    $(window).scroll(function() {
        if ($(window).scrollTop() > 350) {
            hid.addClass('show');
        } else {
            hid.removeClass('show');
        }
    });
    var prev = 0;
    var $window = $(window);
    var nav = $('.back_to_top');
    $window.on('scroll', function() {
        var scrollTop = $window.scrollTop();
        nav.toggleClass('hidden', scrollTop > prev);
        prev = scrollTop;
    });
</script>