<?php
/**
 * The Footer: widgets area, logo, footer menu and socials
 *
 * @package WordPress
 * @subpackage JACK_WELL
 * @since JACK_WELL 1.0
 */

						// Widgets area inside page content
						jack_well_create_widgets_area('widgets_below_content');
						?>				
					</div><!-- </.content> -->

					<?php
					// Show main sidebar
					get_sidebar();

					// Widgets area below page content
					jack_well_create_widgets_area('widgets_below_page');

					$jack_well_body_style = jack_well_get_theme_option('body_style');
					if ($jack_well_body_style != 'fullscreen') {
						?></div><!-- </.content_wrap> --><?php
					}
					?>
			</div><!-- </.page_content_wrap> -->

			<?php
			// Footer
			$jack_well_footer_type = jack_well_get_theme_option("footer_type");
			if ($jack_well_footer_type == 'custom' && !jack_well_is_layouts_available())
				$jack_well_footer_type = 'default';
			get_template_part( "templates/footer-{$jack_well_footer_type}");
			?>

		</div><!-- /.page_wrap -->

	</div><!-- /.body_wrap -->



	<?php
	$custom_on = jack_well_get_theme_option('custom_sections_1');
/*	$custom_hide = jack_well_get_theme_option('custom_sections_boxed_hide');*/
	$custom_text = jack_well_get_theme_option('custom_sections_title');
	$custom_link = jack_well_get_theme_option('custom_sections_link');
	$custom_link2 = jack_well_get_theme_option('custom_sections_link2');
	$custom_url = jack_well_get_theme_option('custom_sections_url');
	$custom_url2 = jack_well_get_theme_option('custom_sections_url2');
	$body_style = jack_well_get_theme_option('body_style') == 'wide extra' ? true : false;

		if ($body_style && (jack_well_is_on($custom_on) && ((!empty($custom_link)  && !empty($custom_url))))) { ?>
			<div class="custom_section custom_section_left">
				<div class="custom_section_container">
					<div class="custom_section_content">
						<?php
						if (!empty($custom_link)  && !empty($custom_url))  {  ?>
							<a href="<?php echo esc_url($custom_url); ?>" target="_blank"><?php jack_well_show_layout($custom_link); ?></a>
						<?php } ?>
					</div>
				</div>
			</div>
		<?php } ?>

		<?php
		if (jack_well_is_on($custom_on) && ((!empty($custom_link2)  && !empty($custom_url2)))) { ?>
		<div class="custom_section custom_section_right">
			<div class="custom_section_container">
				<div class="custom_section_content">
					<?php
					if (!empty($custom_link2)  && !empty($custom_url2))  {  ?>
						<a href="<?php echo esc_url($custom_url2); ?>"  target="_blank"><?php jack_well_show_layout($custom_link2); ?></a>
					<?php } ?>
				</div>
			</div>
		</div>
	<?php } ?>

	<?php if (jack_well_is_on(jack_well_get_theme_option('debug_mode')) && jack_well_get_file_dir('images/makeup.jpg')!='') { ?>
		<img src="<?php echo esc_url(jack_well_get_file_url('images/makeup.jpg')); ?>" id="makeup">
	<?php } ?>

	<?php wp_footer(); ?>

</body>
</html>