<div id="sidebar">
<div id="sidebarinner">

<ul class="sidebar_list">

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) : ?>

<?php include (TEMPLATEPATH . '/includes/searchform.php'); ?>

<?php if((is_home()) && (is_front_page()) && ($paged < 1)) { ?>
<?php include (TEMPLATEPATH . '/includes/about.php'); ?>
<?php } ?>

<?php include (TEMPLATEPATH . '/includes/social.php'); ?>

<?php if(is_single()) { ?>
<?php include (TEMPLATEPATH . '/includes/related.php'); ?> 
<?php } ?>

<?php $sponsor_activate = get_theme_option('sponsor_activate'); if(($sponsor_activate == '') || ($sponsor_activate == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php include (TEMPLATEPATH . '/includes/sponsor.php'); ?>
<?php } ?>

<?php $emvideo_activate = get_theme_option('emvideo_activate'); if(($emvideo_activate == '') || ($emvideo_activate == 'No')) { ?>
<?php { /* nothing */ } ?>
<?php } else { ?>
<?php include (TEMPLATEPATH . '/includes/video.php'); ?>
<?php } ?>

<li class="widget_categories">
<h6><?php _e('Categories'); ?></h6>
<form action="<?php bloginfo('url'); ?>" method="get">
<?php
$select = wp_dropdown_categories('show_option_none=Select Category&show_count=1&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</li>


<li class="widget_pages">
<h6><?php _e('Pages'); ?></h6>
<form action="<?php bloginfo('url'); ?>" method="get">
<?php
$select = wp_dropdown_pages('show_option_none=Select Page&orderby=name&echo=0');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
</li>


<li class="widget_archive">
<h6><?php _e('Archives'); ?></h6>
	<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> 
	<option value=""><?php echo attribute_escape(__('Select Month')); ?></option> 
  	<?php wp_get_archives('type=monthly&format=option&show_post_count=1'); ?> </select>
</li>


<li class="widget_recentcomments_gravatar">
<h6><?php _e('Recent Comments'); ?></h6>
<?php get_avatar_recent_comment(); ?>
</li>

<li class="widget_hottopics">
<h6><?php _e('Hot Topics'); ?></h6>
<?php get_hottopics(); ?>
</li>

<li class="widget_tag_cloud">
<h6><?php _e('Popular Tags'); ?></h6>
<div>
<?php if(function_exists("wp_tag_cloud")) { ?>
<?php wp_tag_cloud('smallest=8&largest=20&'); ?>
<?php } ?>
</div>
</li>

<li class="widget_links">
<h6><?php _e('Blogroll'); ?></h6>
	<ul>
		<?php get_links(-1, '<li>', '</li>', ' - '); ?>
	</ul>
</li>

<li class="widget_meta">
<h6><?php _e('Meta'); ?></h6>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<!-- Just the original author link. Please keep it to support our work. Thanks. -->
<li><a href="http://www.magpress.com/" title="WordPress Themes" target="_blank">WordPress Themes</a></li>
<?php wp_meta(); ?>
<li><a href="http://validator.w3.org/check?uri=referer" rel="nofollow">XHTML</a></li>
<li><a href="http://jigsaw.w3.org/css-validator/validator?uri=<?php echo get_settings('home'); ?>&amp;usermedium=all" rel="nofollow">CSS</a></li>
</ul>
</li>

<?php endif; ?>

</ul><!-- SIDEBARLIST END -->

<div class="clearfix"></div>
</div><!-- SIDEBARINNER END -->
</div><!-- SIDEBAR END -->
