<?php get_header(); ?>

		<div id="home">
			<div class="content">
			
				<?php if(is_home()) { get_template_part('home', 'slider'); } ?>
				
				<div class="skill">
					<div class="container">
						<div class="row">
							<div class="span12">
							
								<ul class="skill-lists">
								
									<?php
										//Get skill post type
										global $post;
										$args = array(
											'post_type' =>'skill',
											'numberposts' => '-1'
										);
										$skill_posts = get_posts($args);
									?>
									<?php if($skill_posts) { ?> 
									<?php
										$count=0;
										foreach($skill_posts as $post) : setup_postdata($post);
										$count++;
										//Get skill image
										$get_img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full-size');
									?>													
									
									<li>
										<div class="skill-image">
											<?php if ( has_post_thumbnail() ) { ?>
												<img src="<?php echo $get_img[0]; ?>" alt="<?php the_title(); ?>" />
											<?php } ?>	
										</div>
										<p><?php the_title(); ?></p>
									</li>
									
									<?php endforeach; ?>									
									<?php } ?>									
									
								</ul>
								
								<div class="motto">
									<h3>
										<?php echo of_get_option('aw_motto'); ?> 
									</h3>
								</div>
							</div>
						</div>
					</div>
				</div><!-- /.skill -->
				<div class="purchase">
					<div class="container">
						<div class="row">
							<div class="span12">
								<div class="purchase-teaser">
									<h3><?php echo of_get_option('aw_purchase_hteaser'); ?></h3>
									<p><?php echo of_get_option('aw_purchase_cteaser'); ?></p>
								</div>
								<?php if ( of_get_option('aw_purchase_url') && of_get_option('aw_purchase_btn') ) { ?>							
								<a class="purchase-btn" href="<?php echo of_get_option('aw_purchase_url'); ?>"><?php echo of_get_option('aw_purchase_btn'); ?></a>
								<?php } ?>						
								
							</div>
						</div>
					</div>
				</div><!-- /.purchase -->
				<div class="application">
					<div class="container">
						<div class="row">
							<div class="span12">
								<ul class="apps-list">
								
									<?php
										//Get application post type
										global $post;
										$args = array(
											'post_type' =>'application',
											'numberposts' => '-1'
										);
										$application_posts = get_posts($args);
									?>
									<?php if($application_posts) { ?> 
									<?php
										$count=0;
										foreach($application_posts as $post) : setup_postdata($post);
										$count++;
										//Get application image
										$get_img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full-size');
									?>
								
									<li id="post-<?php the_ID(); ?>">
										<div class="app-detail">
											<h4><?php the_title(); ?></h4>
											<p><?php the_content(); ?></p>
										</div>
											<?php if ( has_post_thumbnail() ) { ?>
												<img src="<?php echo $get_img[0]; ?>" alt="<?php the_title(); ?>" width="<?php echo $get_img[1]; ?>" height="<?php echo $get_img[2]; ?>" />
											<?php } ?>	
									</li>
									<?php endforeach; ?>									
									<?php } ?>											
									
								</ul>
							</div>
						</div>
					</div>
				</div><!-- /.application -->
			</div><!-- /.content -->
		</div><!-- /#home -->
		
		<?php 
		$defineslugabout = of_get_option('aw_sg_about', ''); $show = of_get_option('sh_about', '');  
		if($show == 'show' && $defineslugabout ) {  
		?>		
		
		<div id="<?php if(of_get_option('aw_sg_about', '')) { ?><?php echo of_get_option('aw_sg_about', ''); } else {?>about<?php } ?>">
		
			<?php if(of_get_option('aw_sg_about', '')) { ?>
				<div class="spacer-section" style="height:160px;"></div>
			<?php } ?>
		
		<?php
			//Get about us page
			$pageslug = of_get_option('aw_sg_about', ''); 			
			$pagename = $pageslug;
			global $post;
			$args = array(
				'post_type' =>'page',
				'pagename' => $pagename
			);
			$page_posts = get_posts($args);
		?>
		<?php if($page_posts) { ?> 
		<?php
			$count=0;
			foreach($page_posts as $post) : setup_postdata($post);
			$count++;
		?>
		
			<div class="content">
				<div class="title-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<h2><?php the_title(); ?></h2>
							</div>
						</div>
					</div>
				</div>
				<?php $p_tagline = get_post_meta($post->ID, 'pt_tagline', true); if ($p_tagline) { ?>						
				<div class="tagline-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<p><?php echo $p_tagline; ?></p>
							</div>
						</div>
					</div>
				</div>
				<?php } ?>				
				<div class="about-main">
					<div class="container">
						<div class="row">
							<div class="span8 clearfix">
							
								<div class="about-post clearfix">
									<?php the_content(); ?>
								</div>
								
								<?php if ( (of_get_option('aw_ctagline')) !='' ) { ?>
								<h3 class="about-title">
									<?php echo of_get_option('aw_ctagline'); ?>
								</h3>
								<?php } ?>
								<div class="about-more">
									<img src="<?php if ( (of_get_option('aw_cimg')) !='' ) { echo of_get_option('aw_cimg'); ?>" alt="<?php bloginfo('name'); } ?>" />
									
									<?php if ( (of_get_option('aw_cdesc')) !='' ) { ?>
									<p>
										<?php echo of_get_option('aw_cdesc'); ?>
									</p>
									<?php } ?>
									
									<a href="<?php the_permalink(); ?>" class="read-more">Read more</a>
								</div>
								
							</div>
							<div class="span4 clearfix">
								<div class="member-list clearfix">
									<div class="title-member">Our <span>Team</span></div>
									<div class="member">

										<div class="member-desc">
										
										<?php if ( (of_get_option('aw_t_pp1')) !='' ) { ?>
											<img src="<?php echo of_get_option('aw_t_pp1'); ?>" alt="team member" />
										<?php } else { ?>
											<span>No picture.</span>	
										<?php } ?>
											
											<h3><?php echo of_get_option('aw_t_name1'); ?></h3>
											<p class="member-roles"><?php echo of_get_option('aw_t_position1'); ?> <span><?php echo of_get_option('aw_t_phone1'); ?></span></p>
											<p><?php echo of_get_option('aw_t_bio1'); ?></p>
												
										</div>
										<div class="member-links">
											<span>Follow Me</span>
											<a href="<?php echo of_get_option('aw_t_twitter1'); ?>" class="tw">Twitter</a>
											<a href="<?php echo of_get_option('aw_t_fb1'); ?>" class="fb">Facebook</a>
											<a href="<?php echo of_get_option('aw_t_fr1'); ?>" class="sc3">share</a>
										</div>
									</div>
									<div class="member">
										<div class="member-desc">
										<?php if ( (of_get_option('aw_t_pp2')) !='' ) { ?>
											<img src="<?php echo of_get_option('aw_t_pp2'); ?>" alt="team member" />
										<?php } else { ?>
											<span>No picture.</span>	
										<?php } ?>
											<h3><?php echo of_get_option('aw_t_name2'); ?></h3>
											<p class="member-roles"><?php echo of_get_option('aw_t_position2'); ?> <span><?php echo of_get_option('aw_t_phone2'); ?></span></p>
											<p><?php echo of_get_option('aw_t_bio2'); ?></p>
										</div>
										<div class="member-links">
											<span>Follow Me</span>
											<a href="<?php echo of_get_option('aw_t_twitter2'); ?>" class="tw">Twitter</a>
											<a href="<?php echo of_get_option('aw_t_fb2'); ?>" class="fb">Facebook</a>
											<a href="<?php echo of_get_option('aw_t_fr2'); ?>" class="sc3">share</a>
										</div>
									</div>
									<div class="member">
										<div class="member-desc">
										<?php if ( (of_get_option('aw_t_pp3')) !='' ) { ?>
											<img src="<?php echo of_get_option('aw_t_pp3'); ?>" alt="team member" />
										<?php } else { ?>
											<span>No picture.</span>	
										<?php } ?>
											<h3><?php echo of_get_option('aw_t_name3'); ?></h3>
											<p class="member-roles"><?php echo of_get_option('aw_t_position3'); ?> <span><?php echo of_get_option('aw_t_phone3'); ?></span></p>
											<p><?php echo of_get_option('aw_t_bio3'); ?></p>
										</div>
										<div class="member-links">
											<span>Follow Me</span>
											<a href="<?php echo of_get_option('aw_t_twitter3'); ?>" class="tw">Twitter</a>
											<a href="<?php echo of_get_option('aw_t_fb3'); ?>" class="fb">Facebook</a>
											<a href="<?php echo of_get_option('aw_t_fr3'); ?>" class="sc3">share</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div><!-- /.content -->	
			
		<?php endforeach; ?>									
		<?php } else {?>
					<div class="container">
						<div class="row">
							<div class="span8">
								<p><?php _e('No entry', 'awesome'); ?></p>
							</div>
						</div>
					</div>			
		<?php } ?>				
			
		</div><!-- /#about -->
		
	<?php } ?>				

	<?php 
	$defineslug = of_get_option('aw_sg_portfolio', ''); $show = of_get_option('sh_portfolio', '');  
	if($show == 'show' && $defineslug ) { if(is_home()) { get_template_part('home', 'portfolio'); } }
	?>			
	
	
	<?php $defineslug = of_get_option('aw_sg_services', ''); $show = of_get_option('sh_servies', ''); if($show == 'show' && $defineslug ) { ?>		
	
		<div id="<?php if(of_get_option('aw_sg_services', '')) { ?><?php echo of_get_option('aw_sg_services', ''); } else {?>services<?php } ?>">	
		<?php if(of_get_option('aw_sg_services', '')) { ?>
			<div class="spacer-section" style="height:0;"></div>
		<?php } ?>				
		
		
		<?php
			//Get about us page
			$pageslug = of_get_option('aw_sg_services', ''); 			
			$pagename = $pageslug;
			global $post;
			$args = array(
				'post_type' =>'page',
				'pagename' => $pagename
			);
			$page_posts = get_posts($args);
		?>
		<?php if($page_posts) { ?> 
		<?php
			$count=0;
			foreach($page_posts as $post) : setup_postdata($post);
			$count++;
		?>
		
			<div class="content">
				<div class="title-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<h2><?php the_title(); ?></h2>
							</div>
						</div>
					</div>
				</div>
				<?php $p_tagline = get_post_meta($post->ID, 'pt_tagline', true); if ($p_tagline) { ?>						
				<div class="tagline-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<p><?php echo $p_tagline; ?></p>
							</div>
						</div>
					</div>
				</div>
				<?php } ?>	
				<div class="about-main">
					<div class="container">
						<div class="row">
							<div class="span12">
								<ul class="apps-list">

									<?php
										//Get service post type
										global $post;
										$args = array(
											'post_type' =>'service',
											'numberposts' => '-1'
										);
										$service_posts = get_posts($args);
									?>
									<?php if($service_posts) { ?> 
									<?php
										$count=0;
										foreach($service_posts as $post) : setup_postdata($post);
										$count++;
										//Get service image
										$get_img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full-size');	
									?>									
									<li id="post-<?php the_ID(); ?>">
										<div class="app-detail">
											<h4><?php the_title(); ?></h4>
											<?php the_content(); ?>
										</div>
										<?php if ( has_post_thumbnail() ) { ?>
											<img src="<?php echo $get_img[0]; ?>" alt="<?php the_title(); ?>" />
										<?php } ?>	
									</li>
									<?php endforeach; ?>
									<?php } ?>
									
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div><!-- /.content -->	
			
		<?php endforeach; ?>									
		<?php } else {?>
					<div class="container">
						<div class="row">
							<div class="span8">
								<p><?php _e('No entry', 'awesome'); ?></p>
							</div>
						</div>
					</div>			
		<?php } ?>				
			
		</div><!-- /#services -->
	<?php } ?>		
		
		
	<?php $defineslugblog = of_get_option('aw_sg_blog', ''); $show = of_get_option('sh_blog', '');
	if($show == 'show' && $defineslugblog ) {  get_template_part('home-blog'); }
	?>						
		
	<?php $defineslugfeatures = of_get_option('aw_sg_features', ''); $show = of_get_option('sh_features', ''); if($show == 'show' && $defineslugfeatures ) { ?>	
	
		<div id="<?php if(of_get_option('aw_sg_features', '')) { ?><?php echo of_get_option('aw_sg_features', ''); } else {?>features<?php } ?>">
		
		<?php if(of_get_option('aw_sg_features', '')) { ?>
			<div class="spacer-section" style="height:0;"></div>
		<?php } ?>		
		
		<?php
			//Get features page
			$pageslug = of_get_option('aw_sg_features', ''); 	
			$pagename = $pageslug;
			global $post;
			$args = array(
				'post_type' =>'page',
				'pagename' => $pagename
			);
			$page_posts = get_posts($args);
		?>
		<?php if($page_posts) { ?> 
		<?php
			$count=0;
			foreach($page_posts as $post) : setup_postdata($post);
			$count++;
		?>	
			<div class="content">
				<div class="title-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<h2><?php the_title(); ?></h2>
							</div>
						</div>
					</div>
				</div>
				<?php $p_tagline = get_post_meta($post->ID, 'pt_tagline', true); if ($p_tagline) { ?>						
				<div class="tagline-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<p><?php echo $p_tagline; ?>
							</div>
						</div>
					</div>
				</div>
				<?php } ?>
				<div class="main">
					<div class="container">
						<div class="row">
							
							<div class="span12">
							
								<?php the_content(); ?>
							
								<?php get_template_part('includes/price', 'table'); ?>
							
							</div>
							
						</div><!-- /.row -->
					</div>
				</div>
			</div><!-- /.content -->
			<?php endforeach; ?>									
			<?php } else {?>			
			<div class="container">
				<div class="row">
					<div class="span8">
						<p><?php _e('No entry', 'awesome'); ?></p>
					</div>
				</div>
			</div>		
			<?php } ?>					
		</div><!-- /#features -->
	<?php } ?>		
		
		
<?php 
$defineslugcontact = of_get_option('aw_sg_contact', ''); $show = of_get_option('sh_contact', '');  
if($show == 'show' && $defineslugcontact ) {  get_template_part('home', 'contact'); } ?>		
		
<?php get_footer(); ?>