<?php global $_opt; ?>
            </div><!-- /#content -->
        
        <?php $page_shadow = cloudfw_get_custom_skin_attr( cloudfw_get_the_skin_id(), 'page-shadow'); if ( !$page_shadow === true ) : ?>
        <div id="page-shadow"></div>
        <?php endif; ?>
    
        <div id="footer" class="the-page">
        
        <?php if (_isOnOff($_opt[PFIX.'_footer']['enable'])): ?>


            <div id="footer-widgets">
                           
		<?php
		
			$loop = $_opt[PFIX.'_footer']['widget_number'];
			
			for ($footer_widget_number = 1; $footer_widget_number <= $loop; $footer_widget_number++) {
			?>
	            
	                <div class="cl <?php echo cloudfw_find_gridclass($loop,$footer_widget_number);?>">
	                     
	                        <?php if ( is_active_sidebar( 'footer-widget-area-'.$footer_widget_number ) ) : ?>
	                            
	                                <?php dynamic_sidebar( 'footer-widget-area-'.$footer_widget_number ); ?>
	                            
	                        <?php else: ?>
	                        
							<?php //if ($footer_widget_number == 1)
								
								the_widget(
									'WP_Widget_Text', 
								   array(
									'title' => 'Footer Widget #'.$footer_widget_number,
									'text' => '<a href="'.get_admin_url().'widgets.php">Edit This Area</a>' ),
								   array(
									'before_widget' => '<div id="%1$s" class="widget %2$s">',
									'after_widget' => '</div>',
									'before_title' => '<h3 class="footer-widget-title">',
									'after_title' => '</h3>',
								));
	                            
							?>
	                            
	                        <?php endif; ?>
	        
	                </div>
						
						
			<?php } //end of for: footer_widget_number ?>


                <div class="cf"></div>
            
            </div><!-- /#footer-widgets -->

            <?php endif; ?>

            <div id="footer-text">
                <!--<?php echo get_num_queries(); ?> queries, <?php timer_stop(1); ?> seconds-->
                <?php echo __translate($_opt[PFIX.'_footer']['bottom_text'], 'cloudfw_fix', 'footer_text'); ?>
                
            </div><!-- /#footer-text -->
            <div class="cf"></div>
            
            &nbsp;
                    
        </div><!-- /#footer -->

	</div><!-- /#body-pattern -->
<?php
/**********************/
// Get Footer
wp_footer();
/**********************/
?>
<?php echo $_opt[PFIX."_custom_codes"]["footer"];?>
<?php cloudfw_google_analytics_tracking($_opt[PFIX.'_custom_codes']['tracking']); ?>

<div id="cloudfw-loading"></div>

<div class="cf"></div>

</body>
</html>