
                    <div id="mainWidgets">
                        <?php global $wp_query; $postid = $wp_query->post->ID; $cus = get_post_meta($postid, 'sbg_selected_sidebar_replacement', true);?>
						<?php if ($cus != '') { ?>
                        <?php if ($cus[0] != '0') { ?>
                        <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar($cus[0])){ }else { ?>
                        <p class="noside">
                          <div class="widget login-widget clearfix">
                          	<?php echo lioit_login_form(); ?>
                          </div></div>
                        </p>
                        <?php } ?>
                        <?php } else { ?>
                        <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Single')){ }else { ?>
                          <div class="widget login-widget clearfix">
                          	<?php echo lioit_login_form(); ?>
                          </div></div>
                        <?php } ?>
                        <?php } ?>
                        <?php } else { ?>
                        <?php if  (function_exists('dynamic_sidebar') && dynamic_sidebar('Single')){ }else { ?>
                          <div class="widget login-widget clearfix">
                          	<?php echo lioit_login_form(); ?>
                          </div></div>
                        <?php } ?>
                        <?php } ?>
                    </div><!--End Main Widgets-->