<?php do_action('azoom_before_footer'); ?>
<?php if(!defined('RPB_FULL_SHORTCODE')) : ?>
        </div>
    </div>
<?php endif; ?>

<div class="clear"></div>
<div id="footer" class="footer">
	<?php if(xr_get_option('footer_large_top_shadow', true) === true): ?>
    <div class="relative-container">
        <?php echo azoom_image_shadow_up(); ?>
    </div>
    <?php endif; ?>
    
    <?php

	$rockthemes_advanced_details = array();
	if(isset($post)){
		$rockthemes_advanced_details = get_post_meta($post->ID,'advanced_post_details',true);	
	}
		
	$display_footer_large = true;
	if(isset($rockthemes_advanced_details['display_footer_large_area']) && !empty($rockthemes_advanced_details['display_footer_large_area'])){
		$display_footer_large = $rockthemes_advanced_details['display_footer_large_area'] === 'true' ? true : false;
	}elseif(xr_get_option('display_footer_large_area', false)){
		$display_footer_large = xr_get_option('display_footer_large_area', false) === 'true' ? true : false;	
	}
	
	
	if($display_footer_large):
	?>
	<div class="footer-large">
        <div class="row">
        	<?php
				$total_fls = 0;//Total Footer Large Sidebars
				$fl_cols = intval(xr_get_option('large_footer_columns',3));//Footer Large Columns
				$total_fls = (int)(12 / $fl_cols);
				
				for($i=0; $i<$total_fls; $i++){
					echo '<div class="large-'.$fl_cols.' medium-'.$fl_cols.' small-12 columns">';
					if(dynamic_sidebar('Footer Large '.(int)($i+1)));
					echo '</div>';
				}
			?>
        </div>
	</div>
    <?php endif; ?>
    
    <?php 
	$display_bottom_large = true;
	if(isset($rockthemes_advanced_details['display_footer_bottom_area']) && !empty($rockthemes_advanced_details['display_footer_bottom_area'])){
		$display_bottom_large = $rockthemes_advanced_details['display_footer_bottom_area'] === 'true' ? true : false;
	}elseif(xr_get_option('display_footer_bottom_area', false)){
		$display_bottom_large = xr_get_option('display_footer_bottom_area', false) === 'true' ? true : false;	
	}
	
	
	if($display_bottom_large):
	?>
    <div class="footer-bottom">
    	<div class="row">
        <?php 
		$footer_bottom_columns = intval(xr_get_option('footer_bottom_columns',12));
		switch($footer_bottom_columns):
			case 6:	
			?>
        	<div class="large-6 medium-6 columns footer-bottom-left centered-text-responsive-small">
            	<span>
            	<?php echo xr_get_option('footer_copyright'); ?>
                </span>
            </div>
            <div class="large-6 medium-6 columns right-text centered-text-responsive-small">
            	<?php if(dynamic_sidebar('Footer Bottom')); ?>
            </div>
                
            <?php
            break;
            
            case 12:
			?>
        	<div class="large-12 medium-12 columns footer-bottom-left center-text centered-text-responsive-small">
            	<span>
            	<?php echo xr_get_option('footer_copyright'); ?>
                </span>
            </div>
            <?php
            break;
		
		endswitch;
		
		?>
        </div>
    </div>
    <?php
	endif;
	?>
<!-- footer class-->
</div>
<!-- .main-container -->
</div>

<?php if( xr_get_option('use_boxed_layout',false)): ?>
</div>
<!-- #main-canvas -->
<?php endif; ?>

<?php
	/* Always have wp_footer() just before the closing </body>
	 * tag of your theme, or you will break many plugins, which
	 * generally use this hook to reference JavaScript files.
	 */

	wp_footer();
?>
</body>
</html>