<a href="<?php 
echo get_post_meta($post->ID, '_job_website', true);
?>
" target="_blank">
	<figure id="post-<?php 
the_ID();
?>
" class="job">
		<?php 
// get the image or create the default image //
if (function_exists('aw_get_image_url')) {
    $args = array('w' => '350', 'h' => '350', 'default' => 'image-default.jpg');
    $thumbnail = aw_get_image_url($post->ID, $args);
    echo "<img src='{$thumbnail}' class='post-thum-hs' alt='' />";
}
?>
		<div class="overlay">
			<h3><?php 
echo get_post_meta($post->ID, '_job_title', true);
?>
</h3>
			<p><?php 
echo get_post_meta($post->ID, '_job_company', true);
?>
</p>
		</div>
	</figure>
</a>
<figure class="media">
	<?php 
$mediurl = get_post_meta($post->ID, '_media_url', true);
if (function_exists('aw_get_image_url')) {
    $args = array('w' => '350', 'h' => '350', 'default' => 'image-default.jpg');
    $thumbnail = aw_get_image_url($post->ID, $args);
    $thumbnail = "<img src='" . aw_get_image_url($post->ID, $args) . "' class='post-thum-hs' alt='' />";
}
if ($mediurl != '') {
    echo '<a href="' . $mediurl . '">' . $thumbnail . '</a>';
} elseif (get_post_meta($post->ID, '_media_video', true) == '1') {
    if (get_post_meta($post->ID, '_media_youtube_id', true)) {
        $youtubeid = get_post_meta($post->ID, '_media_youtube_id', true);
        echo '<a class="youtube" href="http://www.youtube.com/embed/' . $youtubeid . '?rel=0&amp;wmode=transparent">' . $thumbnail . '</a>';
    } else {
        $videourl = get_post_meta($post->ID, '_media_video_url', true);
        echo '<a class="youtube" href="' . $videourl . '">' . $thumbnail . '</a>';
    }
} else {
}
?>
	
</figure>