<?php get_header(); ?>
	
	<div class="wishbone_page_info wishbone_whitebox">
		<h1 class="page-title">
			<?php 
				printf( 
					wp_kses( 
						__( '<em>Browsing Category:</em>%s', 'jt-wishbone' ), 
						array( 'em'=> array() )
					), single_cat_title( '', false )
				);
			?>
		</h1>
	</div>

	<?php
	$showslider 	= wishbone_option('category_showslider');
	$slidetype 		= wishbone_option('category_home-slide-type');
	$p_number 		= wishbone_option('category_fetchnumb');
	$postlayout		= wishbone_option('category_home-post-layout', 'default');
	$pagingtype		= wishbone_option('pagingtype');
	$sidebarpos 	= wishbone_option('category_homesidebar', 'right-sidebar'); //Values: no-sidebar, right-sidebar, left-sidebar

	if( wishbone_option('category_slider_tags') ){
		$p_tags = wishbone_option('category_slider_tags');
	} else {
		$p_tags = null;
	}

	if ( $showslider == 1 && !is_paged() ):
		switch ($slidetype) {
			case 'wishbonecarousel':
				wishbone_wishbone_carousel( $p_number, $p_tags ); 
				break;
			
			case 'wideslider':
				wishbone_wideslider( $p_number, $p_tags ); 
				break;
			
			case 'grid':
				wishbone_gridhero( $p_number, $p_tags ); 
				break;
			
			case 'twocol':
				wishbone_twocol_slider( $p_number, $p_tags ); 
				break;

			case 'onecol':
				wishbone_onecol_slider( $p_number, $p_tags );
				break;

			default:
				# code...
				break;
		}
	endif; 

	if( 'no-sidebar' == $sidebarpos ){
		$containerclass = 'large-12 wishbone_no-sidebar';
	} else {
		$containerclass = 'large-8';
	}

	?>

	<!-- ===================================
	CONTENT AREA
	===================================== -->
	<div class="wishbone_maincontainer">
		<div class="row">
			
			<?php if( 'left-sidebar' == $sidebarpos ) get_sidebar(); ?>

			<div class="<?php echo esc_attr( $containerclass ); ?> column">
				<div class="wishbone_blogwrapper">
					<?php 
						if( have_posts() ): 
							
							wishbone_looptype( $postlayout ); 

							wishbone_paging_type( $pagingtype, $postlayout );
						endif;
					?>
				</div>
			</div> <!-- end .large-8 column -->

			<?php if( 'right-sidebar' == $sidebarpos ) get_sidebar(); ?>
			
			<div class="clear"></div>
		</div> <!-- end .row -->
		<div class="clear"></div>
	</div>
<?php get_footer(); ?>