<?php 
    $GLOBALS['img'] = 'ini';
    $GLOBALS['ini'] = 1;    
    get_header();
    the_post();
?>
   
    <?php 
        if(of_get_option('show_home_top')){
            $cant = 0;
            $arr_services = '';
            $arr_tow = array();
            for($i=1; $i<=of_get_option('service_one_num'); $i++){
                if(of_get_option('home_service_one_title'.$i) == 1){
                    $arr_services[] = $i;
                } 
            }     
            $cant = count($arr_services);
            for($i=1; $i<=$cant; $i++){
                if($i==1){echo '<div class="row-fluid top">';}
    ?>
	
    <div class="span6">
          
        <div class="features">
            
            <div class="row-fluid">

                <div class="span3">
                
                    <img src="<?php echo of_get_option('service_one_img'.$arr_services[$i-1]);?>" class="animated bounceInLeft" alt="">
                  
                </div>

                <div class="span9">
                
                    <h3 <?php echo colors('h3');?> ><?php echo of_get_option('service_one_title'.$arr_services[$i-1]);?></h3>
                  
                    <span <?php echo colors('h1s');?> ><i><?php echo of_get_option('service_one_detail'.$arr_services[$i-1]);?></i></span>
                  
                    <p <?php echo colors('p');?> ><?php echo of_get_option('service_one_desc'.$arr_services[$i-1]); ?></p>
                  
                </div>

            </div>

        </div>
            
    </div>
	
    <?php 
        if($i%2==0 ){ 
        echo '</div>';
            if($i+1<=$cant){
                echo '<div class="row-fluid">';
            }
            }elseif($i==$cant){
                echo '</div>';
            }
                
            }
        }
    ?>
	
    <?php
        if(of_get_option('show_home_plan')){
    ?>
	
    <div class="central_title top">
    
        <h2 <?php echo colors('h2');?> ><?php echo of_get_option('home_plan_title');?></h2>
        
        <span <?php echo colors('h1s');?> >~ <?php echo of_get_option('home_plan_detail');?> ~</span>
        
    </div>

    <?php
        for($i=1; $i<=of_get_option('home_plan_num'); $i++){     
        if($i==1){echo '<div class="row-fluid top">';}
    ?>
    
	<div class="span3">

        <div class="planes">
          
            <div class="prices">
          
                <p <?php echo colors('p');?> >$<?php echo of_get_option('home_plan_price'.$i);?><span <?php echo colors('h1s');?> >/<?php echo of_get_option('home_plan_frec'.$i);?></span></p>
             
            </div> 

            <a <?php echo colors('a');?>  href="#">
          
                <img src="<?php echo of_get_option('home_plan_img'.$i);?>" alt=""> 
            
            </a>
			
            <div class="planes_title" <?php echo colors('plan1');?>>                              
            
                <h1 <?php echo colors('h1');?> ><?php echo of_get_option('home_plan_title'.$i);?></h1>
              
                <span <?php echo colors('h1s');?> ><?php echo of_get_option('home_plan_detail'.$i);?></span>            
              
                <p <?php echo colors('p');?> ><?php echo of_get_option('home_plan_desc'.$i);?></p>
               
            </div>  

            <div class="footer_table" <?php echo colors('plan');?>>
            
                <a <?php echo colors('a');?>  href="<?php echo of_get_option('home_plan_btn_link'.$i);?>"><?php echo of_get_option('home_plan_btn'.$i);?></a>                   
              
            </div>

        </div>
        
    </div>
	
    <?php 
        if($i%4==0){ 
            echo '</div>';
            if($i+1<=of_get_option('home_plan_num')){
                echo '<div class="row-fluid top">';
            }
        }elseif($i==of_get_option('home_plan_num')){
            echo '</div>';
        }
        
        }
    }
    ?>
    
    <div class="clearfix"></div>
	
    <?php
        if(of_get_option('show_home_spon')){
    ?>
	
    <div class="sponsors top">

        <?php
            for($i=1; $i<=of_get_option('home_spon_num'); $i++){   
            if($i==1){echo '<div class="row-fluid">';}
        ?>
        
        <div class="span2">
          
            <a href="<?php echo of_get_option('home_spon_link'.$i);?>"><img src="<?php echo of_get_option('home_spon_img'.$i);?>" alt="sponsors"></a> 
                     
        </div>
		
        <?php 
            if($i%6==0){ 
            echo '</div>';
            if($i+1<=of_get_option('home_spon_num')){
                echo '<div class="row-fluid top">';
            }
            }elseif($i==of_get_option('home_spon_num')){
            echo '</div>';
            }
            }
        ?>

    </div>
      
    <?php } ?>
	
    <?php
        if(of_get_option('show_home_standar')){ 
    ?>
	
    <div class="about top" <?php echo colors('std');?>>
    
        <div class="row-fluid">
      
            <?php 
                $img_float = '<img src="'.of_get_option('support_but_img').'" alt="">'; 
                if(of_get_option('support_but_img_pos')=='1'){echo $img_float;}
            ?>
      
        <div class="span8" style="<?php if(of_get_option('support_but_img_pos')=='1'){echo 'float:right;';}else{echo 'float:left;';}?>"> 
        
            <h3 <?php echo colors('h3');?> ><?php echo of_get_option('support_but_title');?></h3>
          
            <p <?php echo colors('p');?> ><?php echo of_get_option('support_but_desc');?></p>
          
        </div>

        <?php if(of_get_option('support_but_img_pos')=='2'){echo $img_float;}?>
        
    </div>
       
    </div>
    
    <?php } ?>
	
</div>
  
<?php get_footer(); ?>