<?php
	echo '<div id="comments">';
	if ( post_password_required() ) {
		echo '<p class="nopassword">';
		echo( 'This post is password protected. Enter the password to view any comments.');
		echo '</p>';
		echo '</div>';
		return;
	}
	
	if ( have_comments() ) {
		echo '<h3 id="comments-title">';
		printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'arebee'),
			number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>');
		echo '</h3>';
		
		if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) {
			echo '<div>';
			echo '<div>';
			previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'arebee' ) );
			echo '</div>';
			echo '<div>';
			next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'arebee' ) );
			echo '</div>';
			echo '</div>'; 
		}
		echo '<ol>';
		wp_list_comments( array( 'callback' => 'arebee_comment' ) );
		echo '</ol>';
		
		if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) {
			echo '<div>';
			echo '<div>';
			previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'arebee') ); 
			echo '</div>';
			echo '<div>';
			next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'arebee') ); 
			echo '</div>';
			echo '</div>';
		} else { 
			if ( ! comments_open() ) {
				echo '<p class="nocomments">';
				echo ( 'Comments are closed.' );
				echo '</p>';
			}
		}
	}
	comment_form(); 

	echo '</div>';
