/**
 * @package WordPress
 * @subpackage Next Saturday
 */
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('post');
?>
>

	<?php 
next_saturday_entry_date();
?>

	<div class="entry-container">

		<header class="entry-header">
			<h1 class="post-title"><a href="<?php 
the_permalink();
?>
" title="<?php 
printf(esc_attr__('Permalink to %s', 'next-saturday'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php 
the_title();
?>
</a></h1>
<?php
/**
 * @package WordPress
 * @subpackage Next Saturday
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>

	<?php next_saturday_entry_date(); ?>

	<div class="entry-container">

		<!-- Grab the first link and put an elevated box behind it -->
			<div class="highlight-box">
				<header class="entry-header">
					<?php
						// Let's get all the post content
						$link_content = $post->post_content;

						// And let's find the first url in the post content
						$link_url = next_saturday_themes_url_grabber();

						// Let's make the title a link if there's a link in this link post
						if ( ! empty( $link_url ) ) :
					?>
					<h1 class="post-title"><a href="<?php echo $link_url; ?>"><?php the_title(); ?></a> <?php _e( '&rarr;', 'next-saturday'); ?></h1>
					<?php else : ?>
					<h1 class="post-title"><?php the_title(); ?></h1>
					<?php endif; ?>