<div id="sidebar">

    <?php if (function_exists('bp_message_get_notices')) { ?>
        <?php bp_message_get_notices(); ?>
    <?php } ?>
    <?php if (bp_is_current_action('new-dedication')) { ?>
        <?php dynamic_sidebar('new-dedication'); ?>		
    <?php } else { ?>
        <?php dynamic_sidebar('buddypress'); ?>
    <?php } ?>

</div>	