<?php
/**
 * Template Name: Front Page
 */

get_header(); 
?>

	<?php
    if( of_get_option('numsection', true) > 0 ) { 
        $numSections = esc_attr( of_get_option('numsection', true) );
        for( $s=1; $s<=$numSections; $s++ ){ 
            $title 			= ( of_get_option('sectiontitle'.$s, true) != '' ) ? esc_html( of_get_option('sectiontitle'.$s, true) ) : '';
            $class			= ( of_get_option('sectionclass'.$s, true) != '' ) ? esc_html( of_get_option('sectionclass'.$s, true) ) : '';
            $content		= ( of_get_option('sectioncontent'.$s, true) != '' ) ? of_get_option('sectioncontent'.$s, true) : ''; 
            $outerclass		= ( of_get_option('outerclass'.$s, true) != '' ) ? of_get_option('outerclass'.$s, true) : '';
            ?>
            <section id="section<?php echo $s;?>" class="<?php echo ( of_get_option('menutitle'.$s, true) != '' ) ? 'menu_page' : '';?> <?php if( $outerclass ) {  echo $outerclass;} ?>">
                    <div class="<?php echo ( ($s>22) && $class=='') ? 'top-grey-box' : $class; ?> middle-align">
                        <?php if( $title != '' ) { ?>
                        <h1><?php echo $title; ?></h1>
                    <?php } ?>
                    <?php skt_iamone_the_content_format( $content ); ?>
                     </div><!-- middle-align -->
                    <div class="clear"></div>
            </section><div class="clear"></div>
            <?php if($class == 'top-grey-box') { ?>
                <div class="bottom-shape"></div>
                <?php } ?>
            <?php 
        }
    }
    ?>

<?php get_footer(); ?>