<?php
if ( function_exists('register_sidebar') )
    register_sidebar();




####################################
//  THUMBNAILS
####################################
// Enable support for post-thumbnails
add_theme_support('post-thumbnails');

// If we want to ensure that we only call this function if
// the user is working with WP 2.9 or higher,
// let's instead make sure that the function exists first

if ( function_exists('add_theme_support') ) {
	add_theme_support('post-thumbnails');
}
####################################
//  THUMBNAILS END
####################################




####################################
//  SHORTCODES
####################################
// red
function sc_red($atts, $content = null) {
	return '<div class="red">'.$content.'</div>';
}
add_shortcode("red", "sc_red");

// green
function sc_green($atts, $content = null) {
	return '<div class="green">'.$content.'</div>';
}
add_shortcode("green", "sc_green");

// yellow
function sc_yellow($atts, $content = null) {
	return '<div class="yellow">'.$content.'</div>';
}
add_shortcode("yellow", "sc_yellow");

// blue
function sc_blue($atts, $content = null) {
	return '<div class="blue">'.$content.'</div>';
}
add_shortcode("blue", "sc_blue");

// code
function sc_code($atts, $content = null) {
	return '<xmp class="xmpCustom">'.$content.'</xmp>';
}
add_shortcode("code", "sc_code");

// quote
function sc_quote($atts, $content = null) {
	return '<blockquote><p>'.$content.'</p></blockquote>';
}
add_shortcode("quote", "sc_quote");

// quote left
function sc_quote_left($atts, $content = null) {
	return '<blockquote class="blockquoteLeft"><p>'.$content.'</p></blockquote>';
}
add_shortcode("quoteLeft", "sc_quote_left");

// quote right
function sc_quote_right($atts, $content = null) {
	return '<blockquote class="blockquoteRight"><p>'.$content.'</p></blockquote>';
}
add_shortcode("quoteRight", "sc_quote_right");

// spacer
function sc_spacer($atts, $content = null) {
	return '<br />';
}
add_shortcode("spacer", "sc_spacer");

// lightbox - prettyPhoto
function sc_lightbox($atts, $content = null) {
	return '<div class="lightbox">'.$content.'<div class="Clear"></div></div>';
}
add_shortcode("lightbox", "sc_lightbox");
####################################
//  SHORTCODES END
####################################




####################################
//  BREADCRUMB
####################################
function the_breadcrumb() {
	if (!is_home()) {
		echo '<a href="';
		echo get_option('home');
		echo '">';
		echo bloginfo('name');
		echo "</a> » ";
		if (is_category() || is_single()) {
			the_category(' » ');
			if (is_single()) {
				echo " » ";
				the_title();
			}
		} elseif (is_page()) {
			echo the_title();
		} elseif( is_tag() ) {
			single_tag_title();
		} elseif (is_day()) {
			the_time('F jS, Y');
		} elseif (is_month()) {
			the_time('F, Y');
		} elseif (is_year()) {
			the_time('Y');
		}
	}
}
####################################
//  BREADCRUMB END
####################################




####################################
//  COMMENTS
####################################
function mytheme_comment($comment, $args, $depth) {
   $GLOBALS['comment'] = $comment; ?>
   <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
     <div id="comment-<?php comment_ID(); ?>" class="comment-body">
	<div class="comment-header">
		<div class="comment-avatar">
			<?php echo get_avatar($comment,$size='30',$default='<path_to_url>' ); ?>
		</div>
		<div class="comment-block-right">
			<div class="comment-author">
				<?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
			</div>
			<div class="comment-meta">
				<a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?>
			</div>
		</div>
	</div>
	<div class="comment-pending">
		<?php if ($comment->comment_approved == '0') : ?>
			<em><?php _e('Your comment is awaiting moderation.') ?></em>
			<br />
		<?php endif; ?>
	</div>
	<div class="comment-text">
		<?php comment_text() ?>
	</div>
	<div class="comment-reply">
		<?php comment_reply_link(array_merge( $args, array('reply_text' => '<span class="highlight">Reply</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
	</div>

     </div>
<?php
        }
####################################
//  COMMENTS END
####################################

?>