<?php
/**
 * @  Photo Nexus Theme theme by Mondre for Themeforest
 */
get_header();
?>

<?php // Get the user choices for the theme.
global $options;
foreach ($options as $value) {
	if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}

$image_quality="72";  //HIGH QUALITY IMAGE SETTING
if ($phonx_image_quality=="Maximum Quality") {$image_quality="100";}

?>

<!-- Used for Main page slide -->
<script type="text/javascript">
$(document).ready( 
	function(){ 
		$('#portfolioslides').innerfade({
			animationtype: '<?php echo $phonx_featured_slide; ?>',
			speed: 'slow', 
			timeout: 6000, 
			type: '<?php echo $phonx_featured_slideshow; ?>', 
			containerheight: '550' 
		});
	} 
);	
</script> 

<?php
$key="image"; // Define that $key mean image, it is the Custom Key
?>


<div id="feature">

<ul id="portfolioslides">
			<?php $my_query = new WP_Query('category_name=featured&showposts=10');?><!-- Start Featured Post Search... -->
			<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
			<!-- Get the image url and store -->
			<?php $image=get_post_meta($post->ID, $key, true); ?>
			<li>
			<!-- Resize and Reuse image. The h=550 and w=730 is the value to resize. Q is quality. ZC is how you want it cropped -->
			<img src="<?php bloginfo('stylesheet_directory'); ?>/phpThumb.php?src=<?php echo $image; ?>&amp;h=550&amp;w=730&amp;zc=0&amp;q=<?php echo $image_quality; ?>" alt="<?php the_title(); ?>" />
			</li>
			<?php endwhile; ?>
</ul>

</div>

<?php get_footer(); ?>
