<?php   
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package peccular Premium
 */

?>
<footer class="footer-area" id="footer">
		<div class="footer-bg"></div>

	
	<?php if(is_active_sidebar('peccular-footer1') || is_active_sidebar('peccular-footer2') || is_active_sidebar('peccular-footer3') || is_active_sidebar('peccular-footer4') ){ ?>
		
		<div class="top-area">
			<div class="<?php if(get_theme_mod('peccular_footer_section_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('peccular_footer_section_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>">	
				<div class="row row-eq-height md-1">
				<div class="s-footer col-lg-4 col-md-6 col-sm-12 col-xs-12 single-footer-1 <?php echo esc_attr(get_theme_mod('peccular_footer_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('peccular_footer_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('peccular_footer_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('peccular_footer_box_align','Right') == 'Right'){ ?> right <?php } ?> ">
					<div class="single-footer wow zoomIn" data-wow-duration="1s" >
						<?php if(is_active_sidebar('peccular-footer1')): 
							dynamic_sidebar('peccular-footer1');
						endif;
						?>	
					</div>
				</div>

				<div class="s-footer col-lg-2 col-md-6 col-sm-12 col-xs-12 single-footer-2 <?php echo esc_attr(get_theme_mod('peccular_footer_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('peccular_footer_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('peccular_footer_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('peccular_footer_box_align','Right') == 'Right'){ ?> right <?php } ?> ">
					<div class="single-footer wow zoomIn" data-wow-duration="1.5s" >
						<?php if(is_active_sidebar('peccular-footer2')): 
							dynamic_sidebar('peccular-footer2');
						endif;
						?>	
						</div>
					</div>

				<div class="s-footer col-lg-3 col-md-6 col-sm-12 col-xs-12 single-footer-3 <?php echo esc_attr(get_theme_mod('peccular_footer_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('peccular_footer_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('peccular_footer_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('peccular_footer_box_align','Right') == 'Right'){ ?> right <?php } ?> ">
					<div class="single-footer wow zoomIn"  data-wow-duration="2s" >
						<?php if(is_active_sidebar('peccular-footer3')): 
							dynamic_sidebar('peccular-footer3');
						endif;
						?>	
					</div>
				</div>

				<div class="s-footer col-lg-3 col-md-6 col-sm-12 col-xs-12 single-footer-4 <?php echo esc_attr(get_theme_mod('peccular_footer_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('peccular_footer_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('peccular_footer_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('peccular_footer_box_align','Right') == 'Right'){ ?> right <?php } ?> ">
					<div class="single-footer wow zoomIn" data-wow-duration="2.5s" >
						<?php if(is_active_sidebar('peccular-footer4')): 
							dynamic_sidebar('peccular-footer4');
						endif;
						?>	
					</div>
				</div>

			<div class="clearfix"></div>
		</div>
	</div>
		<div class="clearfix"></div>
		</div>
	<?php } ?>

	<div class="clearfix"></div>
			<?php 
		// Prevent direct access
		if ( ! defined( 'ABSPATH' ) ) {
			exit; // Exit if accessed directly
		}

		$footercopyright = '';
		if (function_exists('custom_theme_copyright')) {
			$footercopyright = custom_theme_copyright();
		}
 
	?>
		<?php if($footercopyright){ ?>
		<div class="bottom-area wow zoomIn">
			<div class="<?php if(get_theme_mod('peccular_footer_section_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('peccular_footer_section_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>">	
			
				<div class="footer-text  <?php echo esc_attr(get_theme_mod('peccular_footer_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('peccular_footer_copyright_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('peccular_footer_copyright_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('peccular_footer_copyright_align','Right') == 'Right'){ ?> right <?php } ?> ">
					
						<?php echo $footercopyright;?>
					
				</div>
			</div>
		</div>
		<?php } ?>	

</footer><!-- #colophon -->
<script type="text/javascript">
	if(jQuery(window).width() >= 1170){
		new WOW().init();
	}
</script>
<script>
	$(window).scroll(function() {
		var height = $(window).scrollTop();
		if (height > 100) {
			$('#back2Top').fadeIn();
		} else {
			$('#back2Top').fadeOut();
		}
	});
	$(document).ready(function() {
		$("#back2Top").click(function(event) {
			event.preventDefault();
			$("html, body").animate({ scrollTop: 0 }, "slow");
			return false;
		});

	});
</script>
 <script src="<?php echo get_template_directory_uri(); ?>/js/gallery/lightgallery.js" type="text/javascript"  ></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/gallery/lg-autoplay.js" type="text/javascript"  ></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/gallery/lg-fullscreen.js" type="text/javascript"  ></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/gallery/lg-thumbnail.js" type="text/javascript"  ></script>
    <script type="text/javascript">
        lightGallery(document.getElementById('products-austrak'), {
            subHtmlSelectorRelative: true,
            thumbnail:true
        });
        lightGallery(document.getElementById('products-sherings'), {
            subHtmlSelectorRelative: true
        }); 
        lightGallery(document.getElementById('products-austmark'), {
            subHtmlSelectorRelative: true
        }); 
    </script>   


<?php wp_footer(); ?>
   <?php
    if(get_theme_mod('back_top_btn_on_off') != 'on' ){
  ?>
<a id="back2Top" title="Back to top" href="#"> &#10148; </a>
 <?php } ?> 
</body>
</html>