<?php
/**
 * @version    $Id$
 * @package    IT_Theme_Framework
 * @author     InnoThemes Team <support@innothemes.com>
 * @copyright  Copyright (C) 2012 InnoThemes.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.innothemes.com
 */

if ( post_password_required() ) {
	return;
}
?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
	<h2 class="comments-title">
		<?php
		printf(
			_n( 'One comment on &ldquo;%2$s&rdquo;', '%1$s comments on &ldquo;%2$s&rdquo;', get_comments_number() ),
			number_format_i18n( get_comments_number() ),
			'<span>' . get_the_title() . '</span>'
		);
		?>
	</h2>

	<ol class="commentlist">
		<?php
		wp_list_comments(
			array(
				'callback' => array( 'IT_Theme_Render', 'comment' ),
				'style'    => 'ol',
			)
		);
		?>
	</ol><!--End .commentlist -->

	<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
	<nav id="comment-nav-below" class="navigation" role="navigation">
		<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', IT_THEME_TEXTDOMAIN ); ?></h1>
		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', IT_THEME_TEXTDOMAIN ) ); ?></div>
		<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', IT_THEME_TEXTDOMAIN ) ); ?></div>
	</nav>
	<?php endif; ?>

	<?php if ( ! comments_open() && get_comments_number() ) : ?>
	<p class="nocomments">
		<?php _e( 'Comments are closed.', IT_THEME_TEXTDOMAIN ); ?>
	</p><!--End .nocomments-->
	<?php endif; ?>
<?php
endif;

comment_form();
?>
</div><!--End #comments .comments-area-->
