<?php
    global $config, $url, $loader, $registry, $load;

    $store_id = $config->get('config_store_id');
$lang = $config->get('config_language_id');

$buyshop_general = $config->get('buyshop_general');
$buyshop_social = $config->get('buyshop_social');

if (isset($buyshop_social['twitter'][$store_id])) {
$twitter_account_name = $buyshop_social['twitter'][$store_id];
} else {
$twitter_account_name = '';
}
if (isset($buyshop_social['facebook'][$store_id])) {
$facebook = $buyshop_social['facebook'][$store_id];
} else {
$facebook = '';
}




?>
<div class="container">
    <div id="footer_higher">
        <div id="footer_higher_content">
            <div class="eight columns alpha">
                <?php echo $loader->controller('common/content_footer'); ?>
                <?php if (isset($buyshop_general[$lang]["customblock_html"][$store_id]) && $buyshop_general[$lang]["customblock_html"][$store_id] != '<p><br></p') : ?>

                <div class="four columns omega" id="contact">
                    <?php echo html_entity_decode($buyshop_general[$lang]["customblock_html"][$store_id], ENT_QUOTES, 'UTF-8'); ?>
                </div>
                <?php endif; ?>
            </div>
            <?php if (isset($twitter_account_name) && $twitter_account_name != '') : ?>
            <div class="eight columns">
                <!--Twitter-->
                <div id="twitter" class="four columns alpha">
                    <h3><?php echo (isset($buyshop_social[$lang]["twitter_title"][$store_id]) ? $buyshop_social[$lang]["twitter_title"][$store_id] : 'TWITTER FEEDS'); ?></h3>

                    <?php
                        if (isset($buyshop_general['themecolor'][$store_id])) {
                            $color = $buyshop_general['themecolor'][$store_id];
                        } else {
                            $color = '#FF0000';
                        }
                    ?>
                    <a class="twitter-timeline" data-widget-id="375593032344563712"
                       height="300"
                       data-dnt="true"
                       data-screen-name="<?php echo $twitter_account_name; ?>"
                       data-link-color="<?php echo $color; ?>"
                       data-aria-polite="assertive"
                       data-chrome="noheader nofooter noborders noscrollbar transparent">
                        &nbsp;
                    </a>
                    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
                </div>
                <?php endif; ?>
                <!--end Twitter-->

                <!--Facebook-->
                <?php if (isset($facebook) && $facebook != '') : ?>
                <div id="facebook" class="four columns omega">
                    <h3><?php echo (isset($buyshop_social[$lang]["facebook_title"][$store_id]) ? $buyshop_social[$lang]["facebook_title"][$store_id] : 'FACEBOOK'); ?></h3>
                    <div class="fb-like-box" data-href="https://www.facebook.com/<?php echo $facebook; ?>" data-width="292" data-height="335" data-show-faces="true" data-stream="false" data-show-border="false" data-header="false"></div>
                </div>
                <script>(function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) return;
                    js = d.createElement(s); js.id = id;
                    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                    fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));</script>
                <?php endif; ?>
                <!--end Facebook-->

            </div>
        </div>
    </div>
</div>

<div class="footer_bg_color">
    <div id="footer_container_w">
        <div class="container">
            <div class="sixteen columns">
                <div id="footer_button" class="footer_button_down" title="see more"></div>
            </div>
        </div>
    </div>
    <div id="back-top"><a href="#top"></a></div>

    <div id="footer">
        <div class="container">

            <?php if ($informations) { ?>
                <div class="four columns footer_information alpha">
                    <h3><?php echo $text_information; ?></h3>
                    <nav>
                        <ul>
                            <?php foreach ($informations as $information) { ?>
                                <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
                            <?php } ?>
                        </ul>
                    </nav>
                </div>
            <?php } ?>

            <div class="four columns footer_customer_service">
                <h3><?php echo $text_service; ?></h3>
                <nav>
                    <ul>
                        <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
                        <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
                        <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
                        <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>
                    </ul>
                </nav>
            </div>
            <div class="four columns footer_my_account">
                <h3><?php echo $text_account; ?></h3>
                <nav>
                    <ul>
                        <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
                        <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
                        <li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>
                        <li><a href="<?php echo $newsletter; ?>"><?php echo $text_newsletter; ?></a></li>
                    </ul>
                </nav>
            </div>
            <div class="four columns">
                <div class="social_icons">
                    <a href="<?php echo $socials_title_6; ?>"><i class="icon-facebook-sign"></i></a>
                    <a href="<?php echo $socials_title_5; ?>"><i class="icon-twitter-sign"></i></a>
                    <a href="<?php echo $socials_title_4; ?>"><i class="icon-youtube-sign"></i></a>
                    <a href="<?php echo $socials_title_3; ?>"><i class="icon-google-plus-sign"></i></a>
                    <a href="<?php echo $socials_title_2; ?>"><i class="icon-linkedin-sign"></i></a>
                    <a href="<?php echo $socials_title_1; ?>"><i class="icon-pinterest-sign "></i></a>
                </div>


                <!--newsletter-->
                <?php if (isset($buyshop_social["newsletter_status"]) && $buyshop_social["newsletter_status"] != 0) : ?>
                <div class="newsletter_footer">

                            <!-- Begin MailChimp Signup Form -->
                            <?php
                            $your_apikey = $buyshop_social["apikey"][$store_id];
                            $my_list_unique_id = $buyshop_social["list_unique_id"][$store_id];

                            if (isset($buyshop_social["apikey"][$store_id]) && isset($buyshop_social["list_unique_id"][$store_id]) && $buyshop_social["apikey"][$store_id] != '' && $buyshop_social["list_unique_id"][$store_id] != '') {


                            if (!isset($buyshop_social[$lang]["newsletter_placeholder"][$store_id])) {
                                $newsletter_placeholder = 'NEWSLETTER SIGNUP';
                            } else {
                                if ($buyshop_social[$lang]["newsletter_placeholder"][$store_id] != '') {
                                    $newsletter_placeholder = $buyshop_social[$lang]["newsletter_placeholder"][$store_id];
                                } else {$newsletter_placeholder = '';}
                            }
                         ?>
                            <form class="form-inline" id="signup" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
                                <div class="wrapper">
                                    <button name="submit" type="submit" class="newsletter_button pull-right"><span class="icon-envelop"></span></button>

                                    <input name="email" id="email" type="text" class="pull-right" value="<?php echo $newsletter_placeholder; ?>" onblur="if (this.value == '') {this.value = '<?php echo $newsletter_placeholder; ?>';}" onfocus="if(this.value == '<?php echo $newsletter_placeholder; ?>') {this.value = '';}" >
                                    <input name="apikey" id="apikey" type="hidden" class="form-control" value="<?php echo $your_apikey; ?>" >
                                    <input name="listid" id="listid" type="hidden" class="form-control" value="<?php echo $my_list_unique_id; ?>" >
                                <span id="response">
                                </span>
                                </div>
                            </form>
                            <?php } else { ?>
                            <h3 class="mailchimp_error">Enter API key and List ID for your Mailchimp account!</h3>
                            <?php } ?>

                            <!--End mc_embed_signup-->

                </div>
                <?php endif; ?>

                <!--end newsletter-->

                <div id="powered">
                    <?php echo (isset($buyshop_general[$lang]["footer_copyright"][$store_id]) ? html_entity_decode($buyshop_general[$lang]["footer_copyright"][$store_id], ENT_QUOTES, 'UTF-8') : $powered); ?>
                </div>

                <div id="payment_services">
                    <div class="wrapper">
                        <span class="icon_5"> </span>
                        <span class="icon_4"> </span>
                        <span class="icon_3"> </span>
                        <span class="icon_2"> </span>
                        <span class="icon_1"> </span>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
</div>

<?php if(!empty($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
</div>
<?php } ?>


</body>
</html>