	<div id="sidebar">
		<ul>
			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
			<li>
				<?php include (TEMPLATEPATH . '/searchform.php'); ?>
			</li>

			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
			<li><h2>Author</h2>
			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
			</li>
			-->

			<?php if ( is_404() || is_category() || is_day() || is_month() ||
						is_year() || is_search() || is_paged() ) {
			?> <li>

			<?php /* If this is a 404 page */ if (is_404()) { ?>
			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
			<p>Está a ver os arquivos da categoria <?php single_cat_title(''); ?>.</p>
			
			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
			<p>Está a ver os arquivos do blogue <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> de <?php the_time('l, j \d\e F \d\e Y'); ?>.</p>
			
			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
			<p>Está a ver os arquivos do blogue <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> de <?php the_time('F \d\e Y'); ?>.</p>

      <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
			<p>Está a ver os arquivos do blogue <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> de <?php the_time('Y'); ?>.</p>
			
		 <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
			<p>Procurou <strong>'<?php the_search_query(); ?>'</strong> nos arquivos do blogue <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a>. Se não tiver encontrado o que procurava, poderá experimentar uma destas ligações.</p>

			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
			<p>Está a ver os arquivos do blogue <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a>.</p>

			<?php } ?>
				
			</li> <?php }?>

			<?php wp_list_pages('title_li=<h2>Páginas</h2>' ); ?>

			<li><h2>Arquivos</h2>
				<ul>
				<?php wp_get_archives('type=monthly'); ?>
				</ul>
			</li>

			<?php wp_list_categories('show_count=1&title_li=<h2>Categorias</h2>'); ?>

			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>				
				<?php wp_list_bookmarks(); ?>
				
				<li><h2>Meta</h2>
				<ul>
					<?php wp_register(); ?>
					<li><?php wp_loginout(); ?></li>
					<li><a href="http://validator.w3.org/check/referer" title="Esta página é XHTML 1.0 Transitional Válido"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr> Válido</a></li>
					<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
					<li><a href="http://wordpress.org/" title="Powered by WordPress, plataforma pessoal de publicação de vanguarda.">WordPress</a></li>
					<?php wp_meta(); ?>
				</ul>
				</li>
			<?php } ?>
			
			<?php endif; ?>
		</ul>
	</div>
