<?php 
/**
 * The Footer for SKT Education Lite
 *
 * Displays the footer area of the template.
 *
 * @package SKT Education Lite
 * 
 * @since SKT Education Lite 1.0
 */
global $complete;?>
<?php /*To Top Button */?>

<a class="to_top"><i class="fa-angle-up fa-2x"></i></a> 
<!--Footer Start-->
<div class="footer_wrap layer_wrapper <?php if(!empty($complete['hide_mob_footwdgt'])){ echo 'mobile_hide_footer';} ?>">
  <div id="footer">
    <div class="container">
      <div class="footer-inner">
        <div class="footer-left">
          <div class="bottom">
            <p><?php echo get_field('address','option' ); ?> </p>
            <p>T: <a href="tel:<?php echo get_field('phone','option' ); ?>"><?php echo get_field('phone','option' );?></a> | E: <a href="mailto:<?php echo get_field('email','option' ); ?>"><?php echo get_field('email','option' ); ?></a></p>
          </div>
        </div>
        <div class="footer-middle">
          <a class="logoimga" title="<?php bloginfo('name') ;?>" href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php $logo = $complete['logo_image_id']; echo $logo['url']; ?>" /></a>
        </div>

        <div class="footer-right">
        <div class="social-icon">
        <ul>
        <?php while( have_rows('social_media','option') ): the_row(); ?>
        <?php $facebook= get_sub_field('facebook' ); ?>
        <?php $instagram= get_sub_field('instagram' ); ?>
        <?php $twitter= get_sub_field('twitter' ); ?>
        <?php $youtube= get_sub_field('youtube' ); ?>
        <?php endwhile; ?>
        <?php if(!empty($facebook)){?><li><a href="<?php echo $facebook;?>"><i class="fa fa-facebook-official"></i> </a> </li><?php } ?>
        <?php if(!empty($instagram)){?><li><a href="<?php echo $instagram;?>"><i class="fa fa-instagram"></i> </a> </li><?php } ?>
        <?php if(!empty($twitter)){?><li><a href="<?php echo $twitter;?>"><i class="fa fa-twitter"></i> </a> </li><?php } ?>
        <?php if(!empty($youtube)){?><li><a href="<?php echo $youtube;?>"><i class="fa fa-youtube"></i> </a> </li><?php } ?>

        <li><a href="<?php echo site_url();?>/app"><img src="<?php echo bloginfo('template_url');?>/images/app-icon.png" alt="" style="display:inline-block; vertical-align:middle;" /> <span>Aip - App</span> </a> </li>
        </ul>
        </div>

        </div>
      </div>
      
		<div id="copyright" class="copyright-txt">
      <div class="col-rgt">
			<div class="copytext"><?php //$copyrightcntnt = $complete['footer_text_id']; //echo do_shortcode($copyrightcntnt); ?>
			<?php echo get_field('copyright_text','option' ); ?>
      </div>
      
				<?php wp_nav_menu( array( 'theme_location' => 'footer' ) ); ?>
		  </div>
			<div class="copyright-right">Design By <span><a href="https://uniqueschools.ie/">UniqueSchools</a></span></div>     
		</div>
   
  </div>
  <!--Footer END--> 
</div>
<!--layer_wrapper class END-->

<?php if(!(isset($_COOKIE['cookieConsentOK']) && $_COOKIE['cookieConsentOK']=='1')){?>
<div id="gdpr-cookie-message" style="display: none;">
<h4>Accept Cookies &amp; Privacy Policy?</h4>
<p>By continuing to use this website, you consent to the use of cookies in accordance with our <a class="footer_cookie" href="<?php echo site_url();?>/cookie-policy">Cookie Policy</a>.</p>

<p><button id="gdpr-cookie-accept" class="cookieConsentOK" type="button">Accept Cookies</button></p></div>


<?php } ?>

<?php wp_footer(); ?>
<script type="text/javascript">
$(document).ready(function(){

  $(window).load(function(){
    $('.sidr-class-mega-menu-item-has-children > a').after("<a href='#' class='menu-right'></a>");
	
	
	
	
$("a.menu-right").click(function(){	   
if ($(this).next(".sidr-class-mega-sub-menu").is(':visible')) 

{
$(this).next(".sidr-class-mega-sub-menu").slideUp(500);
$("a.menu-right").removeClass("active");	

} 

else{
$(".sidr-class-mega-sub-menu").slideUp();
$("a.menu-right").removeClass("active");
$(this).next(".sidr-class-mega-sub-menu").slideDown();
$(this).addClass("active");	 
		
}

});
	
	
  });
    

  
  });
    $(document).ready(function(){   
		<?php if(!(isset($_COOKIE['cookieConsentOK']) && $_COOKIE['cookieConsentOK']=='1')){?> 
    setTimeout(function () {
        $("#gdpr-cookie-message").fadeIn(200);
     }, 4000);
     <?php } ?>
    $("#gdpr-cookie-message, .cookieConsentOK").click(function() {
		var d = new Date();
		d.setTime(d.getTime() + (1*24*60*60*1000));
		var expires = "expires="+ d.toUTCString();
		document.cookie = "cookieConsentOK=1;" + expires + ";path=/";
        $("#gdpr-cookie-message").fadeOut(200);
        
		
    }); 
});
$(document).ready( function() {
      $('#search-btn').click(function(){
        $('#search-bx').toggle();
        //$('.search-fade').toggle();
      });
      $('#search-close').click(function(){
        $('#search-bx').toggle();
        //$('.search-fade').toggle();
      });
      
    });

 $("a[href^='#']").on('click', function(e) {
     e.preventDefault();
     var hash = this.hash;
     $('html, body').animate({
         scrollTop: $(hash).offset().top
       }, 1000, function(){

         window.location.hash = hash;
       });

  });
</script>

</body></html>
