<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>

			<p><?php _e('This post is password protected. Enter the password to view comments.',woothemes); ?><p>

			<?php
			return;
		}
	}

	/* This variable is for alternating comment background */
	$oddcomment = 'comment';
?>

<!-- You can start editing here. -->

<?php if ($comments) : ?>

<div id="comments_wrap">
	
	<span class="heading"><?php comments_number(__('No Responses',woothemes), __('One Response',woothemes), __('% Responses',woothemes) );?> <?php _e('to',woothemes); ?> &#8220;<?php the_title(); ?>&#8221;</span>

	<ol class="commentlist">
		
		<?php foreach ($comments as $comment) : ?>
	
		<li class="comment " id="comment-<?php comment_ID() ?>">

			<div class="text">
				<?php comment_text() ?>
				<?php if ($comment->comment_approved == '0') : ?>
					<p><em><?php _e('Your comment is awaiting moderation.',woothemes); ?></em></p>
				<?php endif; ?>
			</div><!-- /text -->
			<div class="gravatar">
				<img src="<?php gravatar('X', '50'); ?>" alt="<?php //_e('Gravatar'); ?>" />
			</div><!-- /gravatar -->
			<div class="meta">
				<p><?php comment_author_link() ?><br /> <?php _e('on',woothemes); ?> <?php comment_date('d. M, Y'); ?></p>
			</div><!-- /meta -->

		</li>
		
		<?php /* Changes every other comment to a different class */
		if ('comment' == $oddcomment) $oddcomment = 'alt';
		else $oddcomment = 'comment';
		?>
		
		<?php endforeach; /* end for each comment */ ?>
		
	</ol>
	
</div> <!-- end #comments_wrap -->

<?php else : // this is displayed if there are no comments so far ?>

	<?php if ('open' == $post->comment_status) : ?>
		<!-- If comments are open, but there are no comments. -->

	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<!--<p class="nocomments">Comments are closed.</p>-->

	<?php endif; ?>
<?php endif; ?>
 

<?php if ('open' == $post->comment_status) : ?>

<div id="respond">
<div id="form_wrap">

<span class="heading"><?php _e('Leave a Reply',woothemes); ?></span>

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
	<h3><?php _e('You must be',woothemes); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>"><?php _e('logged in',woothemes); ?></a> <?php _e('to post a comment',woothemes); ?>.</h3>
<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" onsubmit="if (url.value == '<?php _e('Website (optional)',woothemes); ?>') {url.value = '';}">

<?php if ( $user_ID ) : ?>

<p><?php _e('Logged in as',woothemes); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account',woothemes); ?>"><?php _e('Logout',woothemes); ?></a></p>

<div class="textarea">
	<textarea rows="10" cols="50" name="comment" tabindex="4" onfocus="if (this.value == '<?php _e('Type your comment here...',woothemes); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Type your comment here...',woothemes); ?>';}"><?php _e('Type your comment here...',woothemes); ?></textarea>
</div><!-- /textarea -->

<div class="details">
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /></p>
</div><!-- /.details -->
<?php else : ?>

<div class="textarea">
	<textarea rows="10" cols="50" name="comment" tabindex="4" onfocus="if (this.value == '<?php _e('Type your comment here...',woothemes); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Type your comment here...',woothemes); ?>';}"><?php _e('Type your comment here...',woothemes); ?></textarea>
</div><!-- /textarea -->

<div class="details">
										
<p>
	<input class="txt" type="text" name="author" id="author" tabindex="1" value="<?php _e('Name',woothemes); ?> <?php if ($req) echo  __('(required)',woothemes); ?>" onfocus="if (this.value == '<?php _e('Name (required)',woothemes); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Name (required)',woothemes); ?>';}" />
	<label for="author"><?php _e('Name',woothemes); ?></label>
</p>

<p>
	<input class="txt" type="text" name="email" id="email" tabindex="2" value="<?php _e('Email',woothemes); ?> <?php if ($req) echo  __('(required)',woothemes); ?>" onfocus="if (this.value == '<?php _e('Email (required)',woothemes); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Email (required)',woothemes); ?>';}" />
	<label for="email"><?php _e('Email',woothemes); ?></label>
</p>

<p>
	<input class="txt" type="text" name="url" id="url" tabindex="3" value="<?php _e('Website (optional)',woothemes); ?>" onfocus="if (this.value == '<?php _e('Website (optional)',woothemes); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Website (optional)',woothemes); ?>';}" />
	<label for="url"><?php _e('Website',woothemes); ?></label>
</p>
								
<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment',woothemes); ?>" /></p>

</div><!-- /details -->

<?php endif; // If logged in ?>

<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

<?php do_action('comment_form', $post->ID); ?>

</form>

<?php endif; // If registration required and not logged in ?>


<?php endif; // if you delete this the sky will fall on your head ?>
<div class="clear"></div>
</div> <!-- end #form_wrap -->
</div> <!-- end #respond -->