<?php
$number_photos = -1; 		// -1 to display all
$photo_width = 920;		// Width of photo
$photo_height = 613;		// Width of photo
$themeurl = get_template_directory_uri();

$attachments = get_children( array(
'post_parent' => $post->ID,
'numberposts' => $number_photos,
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC', 
'orderby' => 'menu_order date')
);

$counter = 0;

if ( !empty($attachments) ) :	
	$photo_output = '';
	$thumb_output = '';	
	foreach ( $attachments as $att_id => $attachment ) {
		$counter++;
		
		# Caption
		$caption = "";
		if ($attachment->post_excerpt) {
			$caption = '<div class="postcaption"><p>' . $attachment->post_excerpt . '</p></div>';
		}
	
		# Large photo
		$src = wp_get_attachment_image_src($attachment->ID, 'qs-innerslide', true);
		$full = wp_get_attachment_image_src($attachment->ID, 'large', true);
		
		$photo_output .= '<div class="bigpicture"><img style="width:'.$photo_width.'px;height:'.$photo_height.';display:block;" src="'. $src[0] .'" alt="" />'. $caption .'</div>';
	}  
endif; 

echo $photo_output;