<?php require(ghostpool_inc . 'options.php'); ?>

		</div>
		<!--End Content Wrapper-->
		
		<!--Begin Footer Widgets-->		
		<?php if($theme_footer_widgets == "All Pages" OR ($theme_footer_widgets == "Homepage" && is_home())) { ?>
		
			<div class="footer-widgets-border-left"></div>
			<div class="footer-widgets-border-right"></div>
				
			<div id="footer-widgets">
				
				<?php if(is_active_sidebar('footer-1') OR is_active_sidebar('footer-2') OR is_active_sidebar('footer-3') OR is_active_sidebar('footer-4')) { ?>
					
					<?php
					if(is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3') && is_active_sidebar('footer-4')) { 
						$footer_widgets = "footer-fourth";
					}
					elseif(is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3')) {
						$footer_widgets = "footer-third";
					}
					elseif(is_active_sidebar('footer-1') && is_active_sidebar('footer-2')) {
						$footer_widgets = "footer-half";	
					}
					elseif(is_active_sidebar('footer-1')) {
						$footer_widgets = "footer-whole";
					}
					?>
					
					<?php if(is_active_sidebar('footer-1')) { ?>
						<div class="footer-widget-outer <?php echo($footer_widgets); ?>">
							<?php dynamic_sidebar('footer-1'); ?>
						</div>
					<?php } ?>
				
					<?php if(is_active_sidebar('footer-2')) { ?>
						<div class="footer-widget-outer <?php echo($footer_widgets); ?>">
							<?php dynamic_sidebar('footer-2'); ?>
						</div>
					<?php } ?>
					
					<?php if(is_active_sidebar('footer-3')) { ?>
						<div class="footer-widget-outer <?php echo($footer_widgets); ?>">
							<?php dynamic_sidebar('footer-3'); ?>
						</div>
					<?php } ?>
					
					<?php if(is_active_sidebar('footer-4')) { ?>
						<div class="footer-widget-outer <?php echo($footer_widgets); ?>">
							<?php dynamic_sidebar('footer-4'); ?>
						</div>
					<?php } ?>
					
				<?php } ?>
				
			</div>
		<?php } ?>
		<!--End Footer Widgets-->
			
		<!--Begin Footer Bottom-->
		<?php if($theme_footer_content) { ?>
			<div id="footer-bottom">	
				<?php echo do_shortcode(stripslashes($theme_footer_content)); ?>							
			</div>
		<?php } ?>
		<!--End Footer Bottom-->
		
		<div class="clear"></div>

	</div>
	<!--End Page Shadow-->

</div>
<!--End Page Wrapper-->

<div class="clear"></div>

<?php wp_footer(); ?>

</body>
</html>