<?php //begin sidebar  ?>

<div id="sidebar">

	<ul id="sidebarwidgeted">
    
    <?php if(get_theme_mod('enews') == 'Yes') { ?>
                
        <li id="enews" class="widget">
			<div class="enews">
                <h4><?php _e("eNews &amp; Updates", 'studiopress'); ?></h4>    
                <form id="subscribe" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo get_theme_mod('enews_id'); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"><p><?php _e("Sign up to receive breaking news", 'studiopress'); ?><br /><?php _e("as well as receive other site updates!", 'studiopress'); ?></p><input type="text" value="<?php _e("Enter your email address...", 'studiopress'); ?>" id="subbox" onfocus="if (this.value == <?php _e("'Enter your email address...'", 'studiopress'); ?>) {this.value = '';}" onblur="if (this.value == '') {this.value = <?php _e("'Enter your email address...'", 'studiopress'); ?>;}" name="email"/><input type="hidden" value="<?php echo get_theme_mod('enews_id'); ?>" name="uri"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="<?php _e("GO", 'studiopress'); ?>" id="subbutton" /></form>
            </div>
        </li>
        
    <?php } else { ?>
	<?php } ?> 
        
	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Right') ) : ?>
        
		<li id="text-widget" class="widget">
            <h4><?php _e("Text Widget", 'studiopress'); ?></h4>
            <p><?php _e("This is an example of a text widget that you can place to describe a particular product or service. Use it as a way to get your visitors interested, so they can click through and read more about it.", 'studiopress'); ?></p>
		</li>	
            	
		<li id="recent-posts" class="widget">
            <h4><?php _e("Recent Posts", 'studiopress'); ?></h4>
                <ul>
                    <?php wp_get_archives('type=postbypost&limit=5'); ?> 
                </ul>
		</li>	
        
        <li id="archives" class="widget">
            <h4><?php _e("Archives", 'studiopress'); ?></h4>
                <ul>
					<?php wp_get_archives('type=monthly'); ?>
                </ul>
        </li>

		<li id="links" class="widget">
			<h4><?php _e("Links", 'studiopress'); ?></h4>
				<ul>
					<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
				</ul>
		</li>
        
		<li id="meta" class="widget">
            <h4><?php _e("Admin", 'studiopress'); ?></h4>
                <ul>
                    <?php wp_register(); ?>
                    <li><?php wp_loginout(); ?></li>
                    <li><a href="http://www.wordpress.org/">WordPress</a></li>
                    <?php wp_meta(); ?>
                    <li><a href="http://validator.w3.org/check?uri=referer">XHTML</a></li>
                </ul>
		</li>  
        		
	<?php endif; ?>
    
	</ul>
			
</div>

<?php //end sidebar  ?>