<?php
/*
Theme Designed By: S O R O U S H M A R K E T
Email: info@soroushmarket.ir
Demo Website: soroushmarket.ir
Author Website: soroushmarket.ir
*/
?>
<div class="container-fluid footer">
   <div role="complementary" class="container fwcontainer">
      <div class="col-lg-4 col-md-4 f-widget">
         <?php if ( is_active_sidebar( 'footer-1' ) ) :
            dynamic_sidebar('footer-1'); 
            endif;?>
      </div>
      <div class="col-lg-4 col-md-4 f-widget">
         <?php if ( is_active_sidebar( 'footer-2' ) ) :
            dynamic_sidebar('footer-2'); 
            endif;?>
      </div>
      <div class="col-lg-4 col-md-4 f-widget">
         <?php if ( is_active_sidebar( 'footer-3' ) ) :
            dynamic_sidebar('footer-3');
            endif;?>
      </div>
   </div>
</div>
<div role="contentinfo" class="container-fluid copyright">
   <div class="container">
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
         <div class="footer-text"><?php global $data; echo $data['footer_text']; ?></div>
      </div>
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
         <ul class="social">
            <?php if ($data['so_facebook'] == 1) { ?>
            <li><a href="<?php echo $data['so_facebook_link']; ?>" target="_blank"  class="fa fa-facebook"></a></li>
            <?php } ?>
            <?php if ($data['so_google'] == 1) { ?>
            <li><a href="<?php echo $data['so_google_link']; ?>" target="_blank" class="fa fa-google-plus"></a></li>
            <?php } ?>
            <?php if ($data['so_twitter'] == 1) { ?>
            <li><a href="<?php echo $data['so_twitter_link']; ?>" target="_blank" class="fa fa-twitter"></a></li>
            <?php } ?>
            <?php if ($data['so_youtube'] == 1) { ?>
            <li><a href="<?php echo $data['so_youtube_link']; ?>" target="_blank" class="fa fa-youtube"></a></li>
            <?php } ?>
            <?php if ($data['so_dribble'] == 1) { ?>
            <li><a href="<?php echo $data['so_dribbble_link']; ?>" target="_blank" class="fa fa-dribbble"></a></li>
            <?php } ?>
            <?php if ($data['so_linkedin'] == 1) { ?>
            <li><a href="<?php echo $data['so_linkedin_link']; ?>" target="_blank" class="fa fa-linkedin"></a></li>
            <?php } ?>
            <?php if ($data['so_instagram'] == 1) { ?>
            <li><a href="<?php echo $data['so_instagram_link']; ?>" target="_blank" class="fa fa-instagram"></a></li>
            <?php } ?>
            <?php if ($data['so_cloob'] == 1) { ?>
            <li><a href="<?php echo $data['so_cloob_link']; ?>" target="_blank" class="ico-cloob"></a></li>
            <?php } ?>
            <?php if ($data['so_telegram'] == 1) { ?>
            <li><a href="<?php echo $data['so_telegram_link']; ?>" target="_blank" class="ico-telegram"></a></li>
            <?php } ?>
            <?php if ($data['so_aparat'] == 1) { ?>
            <li><a href="<?php echo $data['so_aparat_link']; ?>" target="_blank" class="ico-aparat"></a></li>
            <?php } ?>
         </ul>
      </div>
   </div>
</div>
<!-- Modal -->
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
   <div class="modal-dialog modal-sm" role="document">
      <div class="modal-content">
         <form name="loginform" id="loginform" action="<?php echo esc_url( home_url() ); ?>/wp-login.php" method="post">
            <div class="modal-header">
               <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="badge">×</span></button>
               <h4 class="modal-title" id="myModalLabel">ورود به سایت</h4>
            </div>
            <div class="modal-body">
               <div class="form-group">
                  <div class="input-group">
                     <span class="input-group-addon" id="basic-addon1">
                     <span class="fa fa-user"></span>
                     </span>
                     <input name="log" type="text" class="form-control" id="exampleInputEmail1" placeholder="نام کاربری" />
                  </div>
               </div>
               <div class="form-group">
                  <div class="input-group">
                     <span class="input-group-addon" id="basic-addon2">
                     <span class="fa fa-key"></span>
                     </span>
                     <input name="pwd" type="password" class="form-control" id="exampleInputPassword1" placeholder="کلمه عبور" />
                  </div>
               </div>
               <span style="display:none;"><input name="rememberme" type="checkbox" id="rememberme" checked="checked" value="forever" /></span>
            </div>
            <div class="modal-footer">
               <?php
                  $Path="//".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
                  ?> <input type="hidden" name="redirect_to" value="<?php echo $Path; ?>" />
               <button type="submit" class="btn btn-primary" id="btn-login">
               <span class="fa fa-sign-in"></span>&nbsp;&nbsp;ورود
               </button>
            </div>
         </form>
      </div>
   </div>
</div>
<!-- END Modal -->
<?php if ( is_singular( 'download' ) ) {?>
<script type="text/javascript">
   $(window).load(function() {
     $('.sp-wrap').smoothproducts();
   });
</script>
<?php } ?>
<script type="text/javascript">
   $(document).ready(function(){
    $(function () {
      $('[data-toggle="tooltip"]').tooltip()
      $("#submit").addClass("btn btn-primary");
      $("#commentform").addClass("form-group");
      $("#author").addClass("form-control");
      $("#email").addClass("form-control");
      $("#url").addClass("form-control");
      $("#comment").addClass("form-control");
      $("#wp-calendar").addClass("table table-striped table-condensed");
      $("#edd_purchase_receipt").addClass("table table-striped table-condensed");
      $("#searchform div").before('<input type="hidden" name="post_type" value="download" />');
      $("#searchform div").addClass("input-group");
      $("#s").addClass("form-control");
      $(".edd_submit").addClass("btn btn-primary");
      $("#searchsubmit").remove();
      $("#s").after('<span class="input-group-btn"><input type="submit" id="searchsubmit" value="بگرد" class="btn btn-success" /></span>'); 
      $("div.wid-content > ul.edd-taxonomy-widget > li").has('.children').addClass('li-parent closee');
      $('div.wid-content > ul.edd-taxonomy-widget > li > .children').addClass('child');
      $('.children li> .children').addClass('sub-child');
      $('.child').hide();
      $(".li-parent").has('.child').click(function(){
      $(this).toggleClass('closee');
      $(this).toggleClass('opene');
      $('.child',this).slideToggle();
        });
      $(".dropdown-menu li > .dropdown-menu").addClass("submenu");
      $(".dropdown-menu li> a > span.caret").addClass("left");
    });
    $(function () {
          $("#slider").responsiveSlides({
          auto: true,
          pager: false,
          nav: true,
          speed: 500,
          namespace: "slider",
        });
      });
   <?php if ($data['show_return_top'] == 1) { ?>
      // hide #back-top first
      $("#back-top").hide();
      // fade in #back-top
      $(function () {
          $(window).scroll(function () {
              if ($(this).scrollTop() > 100) {
                  $('#back-top').fadeIn();
              } else {
                  $('#back-top').fadeOut();
              }
          });
          // scroll body to 0px on click
          $('#back-top a').click(function () {
              $('body,html').animate({
                  scrollTop: 0
              }, 800);
              return false;
          });
      });
   <?php } ?>
<?php if ($data['fixed_head_top'] == 1) { ?>
       
    $(window).scroll(function(){
      if ($('.s-bar').length) {var sbar = $('.s-bar').height();} else {sbar=0;}
       if ($(".header").length) {var header = $('.header').height();} else {header=0;}
    $('#nav-row').affix({
    offset: {
      top: sbar + header,
    }
   })
      var y = $(window).scrollTop(); 
      if( y > (sbar + header) ){ 
        $(".main").css('padding-top', $('#nav-row').height());
      } 
      else 
      {
        $(".main").css('padding-top','0px');
      }
    });
<?php } ?>
   });
</script>

<?php if ($data['show_return_top'] == 1) { ?>
<div id="back-top" class="hidden-sm hidden-xs">
   <a href="#top"><span class="fa fa-chevron-up"></span></a>
</div>
<?php } ?>

<?php if ($data['show_cart_btn'] == 1) { ?>
<div id="cart-btn" style="display: block;">
   <a href="<?php echo edd_get_checkout_uri(); ?>">
     <span class="fa fa-shopping-cart shop-icon" data-toggle="tooltip" data-placement="right" title="سبد خرید"></span>
     <span class="header-cart edd-cart-quantity badge"><?php echo edd_get_cart_quantity(); ?></span>
   </a>
</div>
<?php } ?>

<?php global $data; echo $data['footer_codes']."\n"; ?>
<?php wp_footer(); ?>

<?php if ($data['show_loading_bar'] == 1) { ?>
         <script type="text/javascript">
          NProgress.start();
          setTimeout(function() { NProgress.done(); $('.fade').removeClass('out'); }, 1000);
      </script>
      <?php } ?>
</body>
</html>