<?php get_header(); ?>

		<div id="home">
			<div class="content">
			
				<?php if(is_home()) { require_once (get_template_directory() . '/includes/slider-content.php'); } ?>
				
				<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
										$skill_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 $skill_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
										$application_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 $application_img[0]; ?>" alt="<?php the_title(); ?>" width="<?php echo $application_img[1]; ?>" height="<?php echo $application_img[2]; ?>" />
											<?php } ?>	
									</li>
									<?php endforeach; ?>									
									<?php } ?>											
									
								</ul>
							</div>
						</div>
					</div>
				</div><!-- /.application -->
			</div><!-- /.content -->
		</div><!-- /#home -->
		<div id="about">
		
<?php
$pagename = 'about-us';

//get about us page
	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">
							
								<div class="about-post">
									<?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">
								<div class="member-list">
									<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>No entry</p>
							</div>
						</div>
					</div>			
<?php } ?>				
			
		</div><!-- /#about -->
		
		<?php// if(is_home()) { require_once (get_template_directory() . '/includes/portfolio.php'); } ?>
		<?php if(is_home()) { require_once (get_template_directory() . '/includes/portfolio.php'); } ?>
		
		<div id="services">	
			<div class="content">
				<div class="title-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<h2>Services</h2>
							</div>
						</div>
					</div>
				</div>
				<div class="tagline-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<p>Check out the great features of the theme and purchase <span>Awesome now</span>....</p>
							</div>
						</div>
					</div>
				</div>
				<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
										$service_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>Aenean lacinia bibendum nulla sed consectetur. Cras mattis consectetur purus sit 
												amet fermentum.</p>
										</div>
										<?php if ( has_post_thumbnail() ) { ?>
											<img src="<?php echo $service_img[0]; ?>" alt="<?php the_title(); ?>" />
										<?php } ?>	
									</li>
									<?php endforeach; ?>
									<?php } ?>
									
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div><!-- /.content -->	
		</div><!-- /#services -->
		
		<?php // Blog Posts

			get_template_part('home-blog'); 

		?>
		
		<div id="features">
<?php
$pagename = 'features';

//get about us page
	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 require_once (get_template_directory() . '/includes/price-table.php'); ?>
							
							</div>
							
						</div><!-- /.row -->
					</div>
				</div>
			</div><!-- /.content -->
<?php endforeach; ?>									
<?php } else {?>			
					<div class="container">
						<div class="row">
							<div class="span8">
								<p>No entry</p>
							</div>
						</div>
					</div>		
<?php } ?>					
		</div><!-- /#features -->
		
		<div id="contact">
			<div class="content">
				<div class="title-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<h2>Contact</h2>
							</div>
						</div>
					</div>
				</div>
				<div class="tagline-content">
					<div class="container">
						<div class="row">
							<div class="span12">
								<p>Check out the great features of the theme and purchase <span>Awesome now</span>....</p>
							</div>
						</div>
					</div>
				</div>
				<div class="main">
					<div class="container">
						<div class="row">
							<div class="contact-information">
								<div class="span8">
									<div class="contact-main">
										<h3>Contact Details</h3>
										<p>
											Although starting a prototype on a computer is sometimes easier, it's not the 
											best way to visually problem-solve. When you need to ideate website layouts or 
											mobile applications or to storyboard workflows and context scenarios, sketching 
											is much more efficient.
										</p>
										<div class="company-address">
											<h4>Company Name</h4>
											<p>Address will be appear here, address will be</p>
											<p>appear here, some details here, details</p>
											<p>State Name, Country Name</p>
										</div>
									</div>
									<div class="contact-info">
										<div class="contact-number">
											<p>(111) 123-4567</p>
											<p>(123) 345-6789</p>
										</div>
										<div class="contact-email">
											<p>Info@awesometheme.com</p>
											<p>sales@awesome.com</p>
										</div>
									</div>
								</div>
								<div class="span4">
									<div class="contact-maps">
										<img src="<?php echo get_template_directory_uri(); ?>/images/map.jpg" alt="map" />
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="span12">
							
								<div class="quick-contact">
									<h3>Quick Contact</h3>
									
									<?php require_once (get_template_directory() . '/includes/contact-form.php'); ?>
									
								</div><!-- /.quick-contact -->
								
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="footer">
			<div class="container">
				<div class="row">
					<div class="span12">
						<p>
							<?php if ( (of_get_option('aw_fcredit')) !='' ) { ?>
									<?php echo of_get_option('aw_aw_fcredit', '' ); ?>
							<?php } else {?>
							Designed by Sunil Joshi &amp; Developed by PuriWP
							<?php } ?>
						</p>
					</div>
				</div>
			</div>
		</div>

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