<?php get_header() ?>
<?php $DYN_layout=get_option("buddylayout"); ?>
<?php if($DYN_layout!="layout_four" && $DYN_layout!="layout_five") {

	get_sidebar();

} ?>

<div class="mid-wrap <?php

		if($DYN_layout=="layout_one") { ?> left out-full  <?php }

		elseif($DYN_layout=="layout_two") { ?> right out-threequarter  <?php }

		elseif($DYN_layout=="layout_three") { ?> right out-half  <?php }

		elseif($DYN_layout=="layout_four") { ?> left out-threequarter  <?php }

		elseif($DYN_layout=="layout_five") { ?> left out-half  <?php }

		elseif($DYN_layout=="layout_six") { ?> left out-half  <?php }

		else { ?> left out-threequarter  <?php }

	?>">

<div id="container">
	<div id="content">

		<?php do_action( 'bp_before_member_home_content' ) ?>

		<div id="item-header">
			<?php locate_template( array( 'members/single/member-header.php' ), true ) ?>
		</div><!-- #item-header -->

		<div id="item-nav">
			<div class="item-list-tabs no-ajax" id="object-nav">
				<ul>
					<?php bp_get_displayed_user_nav() ?>

					<?php do_action( 'bp_members_directory_member_types' ) ?>
				</ul>
			</div>
		</div><!-- #item-nav -->

		<div id="item-body">
			<?php do_action( 'bp_before_member_body' ) ?>

			<?php if ( bp_is_user_activity() || !bp_current_component() ) : ?>
				<?php locate_template( array( 'members/single/activity.php' ), true ) ?>

			<?php elseif ( bp_is_user_blogs() ) : ?>
				<?php locate_template( array( 'members/single/blogs.php' ), true ) ?>

			<?php elseif ( bp_is_user_friends() ) : ?>
				<?php locate_template( array( 'members/single/friends.php' ), true ) ?>

			<?php elseif ( bp_is_user_groups() ) : ?>
				<?php locate_template( array( 'members/single/groups.php' ), true ) ?>

			<?php elseif ( bp_is_user_messages() ) : ?>
				<?php locate_template( array( 'members/single/messages.php' ), true ) ?>

			<?php elseif ( bp_is_user_profile() ) : ?>
				<?php locate_template( array( 'members/single/profile.php' ), true ) ?>

			<?php endif; ?>

			<?php do_action( 'bp_after_member_body' ) ?>

		</div><!-- #item-body -->

		<?php do_action( 'bp_after_member_home_content' ) ?>

	</div><!-- #content -->
</div><!-- #container -->
</div><!-- / mid-wrap -->

<?php locate_template( array( 'sidebar.php' ), true ) ?>

<?php get_footer() ?>
