<?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
 */

// Get theme options
global $it_options;
?>
<div id="it-promo">
<?php
if ( 'page_title' == $it_options['promo_content'] ) { ?>
	<div id="it-promo-title">
		<h1>
	<?php
	if ( is_tag() ) {
		printf( single_tag_title() );
	} elseif ( is_day() ) {
		printf( the_time( 'F j, Y' ) );
	} elseif ( is_month() ) {
		printf( the_time( 'F, Y' ) );
	} elseif ( is_year() ) {
		printf( the_time( 'Y' ) );
	} elseif ( is_search() ) {
		printf( __( 'Search for ', IT_THEME_TEXTDOMAIN ) . get_search_query() );
	} elseif ( is_single() ) {
		printf( single_post_title() );
	} elseif ( is_category() ) {
		printf( single_cat_title() );
	} elseif ( is_author() ) {
		global $wp_query;

		$curauth = $wp_query->get_queried_object();

		printf( $curauth->nickname );
	} elseif ( is_page() ) {
		printf( wp_title( '' ) );
	} elseif ( is_home() || is_front_page() ) {
		printf( __( 'Blog', IT_THEME_TEXTDOMAIN ) );
	} elseif ( is_404() ) {
		printf( __( 'Error 404', IT_THEME_TEXTDOMAIN ) );
	}
	?>
		</h1>
	<?php
	if ( $it_options['promo_show_excerpt'] ) {
		the_excerpt();
	}
	?>
	</div><!--End div#it-promo-title-->
	<?php if ( $it_options['breadcrumb'] ) { ?>
		<div id="it-breadcrumbs">
			<?php
			esc_html_e( $it_options['breadcrumb_prefix'], IT_THEME_TEXTDOMAIN );
			IT_Theme_Render::breadcrumbs();
			?>
		</div><!--End div#it-breadcrumbs-->
		<div class="clearbreak"></div>
	<?php
	}
}
elseif ( 'sidebars' == $it_options['promo_content'] ) {
	IT_Theme_Render::columns( 'promo' );
}
?>
</div><!--End #it-promo-->
