<?php       
/*
Template Name: Blog Page
*/
?>

<?php get_header(); ?>
	<div id="container">
		<div id="top_content">
			<div id="logo">
				<a href="<?php bloginfo('home'); ?>"><img src="<?php echo get_option('covecreek_logo'); ?>"/></a>
			</div><!-- end logo -->

			<div id="head-nav">
				<ul id="nav">
					<?php wp_nav_menu( array('menu' => 'mainmenu' )); ?>
				</ul><!-- end nav -->
				<div class="clear"></div>
			</div><!-- end head-nav -->
			
			<div id="thanks_content">
				<div id="blog_post_wrapper">
					<?php if(have_posts()) : ?>
					<?php
					$temp = $wp_query;
					$wp_query= null;
					$wp_query = new WP_Query();
					$wp_query->query('showposts=5'.'&paged='.$paged);
					while ($wp_query->have_posts()) : $wp_query->the_post();
					?>

					<div class="cc_blog_post" id="post-<?php the_ID(); ?>"<?php if (is_sticky()) {echo " class=\"sticky\"";} ?>>
						
						<h2><a class="blog_titles" href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
						
						<div class="entry">
							<div class="excerpt-pic">
								<?php the_post_thumbnail(); ?>
							</div>
							<?php the_excerpt(); ?>
						</div>
						<div class="post-meta">Posted in <?php the_category(', ') ?> by <?php the_author(); ?> - <?php the_time('j F Y') ?></div>
						
							
						<?php wp_link_pages(array('before' => '<p class="page-link"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number', 'pagelink' => '<span>%</span>')); ?>
					</div>
					<div class="clear"></div>
					<?php endwhile; ?>
		
					<?php endif; ?>
				</div>
			</div>

		</div>
			
			
			
	
	
	
		<div class="clear"></div>

		<div id="footer_box_container">
			<div id="footer_box_one">
				<div id="ftr_bx_one_image">
					<img src="<?php echo get_option('covecreek_ftr_bx_one_image'); ?>" />
				</div>
				<div id="ftr_bx_one_title">
					<?php echo get_option('covecreek_ftr_bx_one_title'); ?>
				</div>
				<div id="ftr_bx_one_content">
					<?php echo get_option('covecreek_ftr_bx_one_content'); ?>
				</div>
				<div id="ftr_bx_one_button">	
					<a class="button_behavior" href="<?php echo get_option('cove_creek_footerlink_viewgallery'); ?>"><img src="<?php echo bloginfo('template_directory').'/images/viewgallery.png';?>"/></a>
				</div>
			</div>

			<div id="footer_box_two">
				<div id="ftr_bx_two_image">
					<img src="<?php echo get_option('covecreek_ftr_bx_two_image'); ?>" />
				</div>
				<div id="ftr_bx_two_title">
					<?php echo get_option('covecreek_ftr_bx_two_title'); ?>
				</div>
				<div id="ftr_bx_two_content">
					<?php echo get_option('covecreek_ftr_bx_two_content'); ?>
				</div>
				<div id="ftr_bx_two_button">	
					<a class="button_behavior" href="<?php echo get_option('cove_creek_footerlink_goexploring'); ?>"><img src="<?php echo bloginfo('template_directory').'/images/goexploring.png';?>"/></a>
				</div>
			</div>
			
			<div id="footer_box_three">
				<div id="ftr_bx_three_image">
					<img src="<?php echo get_option('covecreek_ftr_bx_three_image'); ?>" />
				</div>
				<div id="ftr_bx_three_title">
					<?php echo get_option('covecreek_ftr_bx_three_title'); ?>
				</div>
				<div id="ftr_bx_three_content">
					<?php echo get_option('covecreek_ftr_bx_three_content'); ?>
				</div>
				<div id="ftr_bx_three_button">	
					<a class="button_behavior" href="<?php echo get_option('cove_creek_footerlink_planavisit'); ?>"><img src="<?php echo bloginfo('template_directory').'/images/takeatour.png';?>"/></a>
				</div>
			</div>
		</div><!-- end footer -->
	

<?php get_footer(); ?>