<?php
// Get Content
global $dollah_theme;
$dollah_theme->topbar_left = is_active_sidebar( 'hoot-topbar-left' );
$dollah_theme->topbar_right = is_active_sidebar( 'hoot-topbar-right' );

// Template modification Hook
do_action( 'dollah_template_before_topbar' );

// Display Topbar
$dollah_topbar_left = $dollah_theme->topbar_left;
$dollah_topbar_right = $dollah_theme->topbar_right;
if ( !empty( $dollah_topbar_left ) || !empty( $dollah_topbar_right ) ) :

	?>
	<div <?php hybridextend_attr( 'topbar', '', 'inline-nav hgrid-stretch' ); ?>>
		<div class="hgrid">
			<div class="hgrid-span-12">

				<div class="topbar-inner table">
					<?php if ( $dollah_topbar_left ): ?>
						<div id="topbar-left" class="table-cell-mid">
							<?php dynamic_sidebar( 'hoot-topbar-left' ); ?>
						</div>
					<?php endif; ?>

					<?php if ( $dollah_topbar_right ): ?>
						<div id="topbar-right" class="table-cell-mid">
							<div class="topbar-right-inner">
								<?php
								dynamic_sidebar( 'hoot-topbar-right' );
								?>
							</div>
						</div>
					<?php endif; ?>
				</div>

			</div>
		</div>
	</div>
	<?php

endif;

// Template modification Hook
do_action( 'dollah_template_after_topbar' );