<?php
/**
 * The template for displaying the footer widgets.
 *
 * @package Claydell Media
 */
 
	if ( ! is_active_sidebar( 'footer-sidebar-1' ) 
		&& ! is_active_sidebar( 'footer-sidebar-2' ) 
		&& ! is_active_sidebar( 'footer-sidebar-3' ) )
	return;
?>

	<div id="footer-widget" class="secondary">
		<?php if ( is_active_sidebar( 'footer-sidebar-1' ) ) : ?>
		<div class="footer-widget-container">
		<div id="footer-widget-1">
			<?php dynamic_sidebar('footer-sidebar-1'); ?>
		</div><!-- #footer-widget-1 -->
		<?php endif; ?>
		
		<?php if ( is_active_sidebar( 'footer-sidebar-2' ) ) : ?>
		<div id="footer-widget-2">
			<?php dynamic_sidebar('footer-sidebar-2'); ?>
		</div><!-- #footer-widget-2 -->
		<?php endif; ?>
		
		<?php if ( is_active_sidebar( 'footer-sidebar-3' ) ) : ?>
		<div id="footer-widget-3">
			<?php dynamic_sidebar('footer-sidebar-3'); ?>

			<aside id="meta" class="widget">
				<h3 class="widget-title"><?php _e( 'Social Media', 'claydell-media' ); ?></h3>
				<div class="social-media">
					<?php get_template_part( 'inc/socialmedia' ); ?>
				</div>
			</aside><!-- .social-media-->

			<aside id="meta" class="widget">
				<h3 class="widget-title"><?php _e( 'Meta', 'claydell-media' ); ?></h3>
				<ul>
					<?php wp_register(); ?>
					<li><?php wp_loginout(); ?></li>
					<?php wp_meta(); ?>
				</ul>
			</aside><!-- #meta .widget-->
		</div><!-- #footer-widget-3 -->
		</div><!-- .footer-widget-container -->
		<?php endif; ?>
	</div><!--  #footer-widget .secondary -->