<?php
// Remove Extra Paragraphs in ShortCodes (explicit usage)
function slant_shortcode_empty_paragraph_fix($content) {
	$block = join("|",array(
						"button",
						"column",
						"title",
						"divider",
						"piechart",
						"progress",
						"count",
						"countdown",
						"row",
						"iconbox",
						"icon",
						"portfolio",
						"testimonial",
						"logos",
						"logo",
						"recent_posts", 
						"team",
						"imagebox",
						));

	// opening tag
	$rep = preg_replace("/(<p>)?\[($block)(\s[^\]]+)?\](<\/p>|<br \/>)?/","[$2$3]",$content);

	// closing tag
	$rep = preg_replace("/(<p>)?\[\/($block)](<\/p>|<br \/>)/","[/$2]",$rep);

	return $rep;
}

add_filter('the_content', 'slant_shortcode_empty_paragraph_fix');
add_filter('widget_text', 'slant_shortcode_empty_paragraph_fix');

/* ------------------------------------------------------------------------ */
/* Columns
/* ------------------------------------------------------------------------ */
// Columns
add_shortcode('column', 'slant_shortcode_column');
function slant_shortcode_column( $atts, $content = null ) {

	$atts = shortcode_atts(
		array(
        'width' => 'col-md-12',
		'padding' => '',
		'class' => '',
		'animation' => '',
        ), $atts);
        
    switch ($atts['width']){
        	
    	case '1/1':	
    		$width = "col-md-12";
    		break;
    	
        case "3/4" :
        	$width = "col-md-9";
        	break; 
        	
    	case "1/2":
    		$width = "col-md-6 col-sm-12";
    		break;

        case "1/3" :
        	$width = "col-md-4 col-sm-6";
        	break;

        case "2/3" :
        	$width = "col-md-8 col-sm-6";
       		break;

        case "1/4" :
        	$width = "col-md-3 col-sm-6";
        	break;   	
        		    	
      	case "1/6" :
        	$width = "col-md-2 col-sm-4 col-xs-6";
        	break;   	
        	
        	
    	default :
        	$width = "col-md-12";
    }   
	
	$style = '';
	$style ='style="';
	 if($atts['padding'] != '' ) {
            $style .= 'padding-top: '.(preg_match('/(px|em|\%|pt|cm)$/', $atts['padding']) ? $atts['padding'] : $atts['padding'].'px').';';
			$style .= 'padding-bottom: '.(preg_match('/(px|em|\%|pt|cm)$/', $atts['padding']) ? $atts['padding'] : $atts['padding'].'px').';';
        }
     $style .= '"';	
	 
	 $animation ="";
	 
	  if($atts['animation'] != '' ) {
            $animation = 'data-animated= '.$atts["animation"].'';
        }else{ $animation ="";}

        
    $content ='<div '.$animation.' class="'.$width.' '.$atts["class"].' col-padding" '.$style.'>'. do_shortcode( $content ).'<div class="clearfix"></div></div>';
    
 
    
    return $content;
}




/*-----------------------------------------------------------------------------------*/
/*	Title
/*-----------------------------------------------------------------------------------*/
add_shortcode('title', 'slant_shortcode_title');
function slant_shortcode_title( $atts, $content = null ) {
	
	return '<h2 data-animated="fadeIn" class="title centered">'.do_shortcode($content).'</h2>';
	
}


/* ------------------------------------------------------------------------ */
/* Dividers
/* ------------------------------------------------------------------------ */
add_shortcode('divider', 'slant_shortcode_divider');
function slant_shortcode_divider( $atts, $content = null ) {
	extract(shortcode_atts(array(
		'margintop'    => '20',
		'marginbottom'    => '20'
	    ), $atts));
	
	$content = '';
	$content = '<div style="padding-bottom: ' . $marginbottom . 'px; margin-top: ' . $margintop . 'px;" class="space-divider"></div>';

	return $content;
}


/*-----------------------------------------------------------------------------------*/
/*	charts : Pie Chart
/*-----------------------------------------------------------------------------------*/
add_shortcode('piechart', 'slant_shortcode_piechart');
function slant_shortcode_piechart( $atts, $content = null ) {
	extract( shortcode_atts( array(
                    'title'      => '',
					'percent'      =>'',
					'color'      =>'',
                ), $atts ) );
				
				global $slant_options;
				$st_options = get_option('slant_options'); 
				if($color ==""){$color= $st_options['theme_color'];}

				wp_enqueue_script( 'piechart' );
				
				$return = '<div class="charts"> <span class="chart" data-barcolor="'.$color.'" data-percent="'.$percent.'"> <span class="percent"></span> </span>
				  <div class="clearfix"></div>
				  <h3>'.$title.'</h3>
				</div>';
	
					   
					   return $return;
					
	
}


/*-----------------------------------------------------------------------------------*/
/*	Progress Bar
/*-----------------------------------------------------------------------------------*/
add_shortcode('progress', 'slant_shortcode_progress');
function slant_shortcode_progress( $atts, $content = null ) {
	extract( shortcode_atts( array(
                    'title'      => '',
					'percent'      =>'',
                ), $atts ) );
				
				global $slant_options;
				$st_options = get_option('slant_options'); 
				$color= $st_options['theme_color'];
				
				
					
				
				
				$return = '<div class="progress_bar">
					<div class="title"><p>'.$title.' <span>'.$percent.'%</span></p> </div>
					<div class="progress_custom_bar">
						<div class="progress_custom bar_bgcolor not-loaded" data-width="'.$percent.'">	
						</div>
					</div>
					</div>';
	
					   
					   return $return;
					
	
}

/*-----------------------------------------------------------------------------------*/
/*	charts : Count
/*-----------------------------------------------------------------------------------*/
add_shortcode('count', 'slant_shortcode_count');
function slant_shortcode_count( $atts, $content = null ) {
	extract( shortcode_atts( array(
                    'title'      => '',
					'num'      =>'',
					'icon'      =>'',
                ), $atts ) );
				
				global $slant_options;
				$st_options = get_option('slant_options'); 
				$color= $st_options['theme_color'];
				
				wp_enqueue_script( 'count' );
				
				
				$return = '<div class="countto">
				<p class="counter">
				<span class="icon">
				<i class="fa '.$icon.'"></i>
				</span>
				<b class="timer count"  data-to="'.$num.'" data-speed="3000"></b> 
				<span class="count_title">'.$title.'</span>
				</p><div class="clearfix"></div></div>';   
				return $return;
					
	
}

/*-----------------------------------------------------------------------------------*/
/*	charts : Count
/*-----------------------------------------------------------------------------------*/
add_shortcode('countdown', 'slant_shortcode_countdown');
function slant_shortcode_countdown( $atts, $content = null ) {
	extract( shortcode_atts( array(
                    'year'      => '',
					'month'      =>'',
					'day'      =>'',
                ), $atts ) );
				
				global $slant_options;
				$st_options = get_option('slant_options'); 
				
				
				
				//Countdown timer

			
	$return = '<div id="timer" class="comesoon-timer" data-comesoon-active = "1" data-count-year="'.$year.'" data-count-month="'.$month.'" data-count-day ="'.$day.'" > </div>';			
	return $return;
}




/*-----------------------------------------------------------------------------------*/
/*	Row Section
/*-----------------------------------------------------------------------------------*/
add_shortcode('row', 'slant_shortcode_row');
function slant_shortcode_row( $atts, $content = null ) {
 extract( shortcode_atts( array(
						'padding' => '',
						'class' => '',
                ), $atts ) );
				
				
	$style = '';
	$style ='style="';
	 if($atts['padding'] != '' ) {
            $style .= 'padding-top: '.(preg_match('/(px|em|\%|pt|cm)$/', $atts['padding']) ? $atts['padding'] : $atts['padding'].'px').';';
			$style .= 'padding-bottom: '.(preg_match('/(px|em|\%|pt|cm)$/', $atts['padding']) ? $atts['padding'] : $atts['padding'].'px').';';
        }
     $style .= '"';	
 
    $content ='<div class="clearfix"></div><div class="row '.$atts["class"].' col-padding" '.$style.'>'. do_shortcode( $content ).'<div class="clearfix"></div></div>';
    return $content;
			
	
}








/*-----------------------------------------------------------------------------------*/
/* Buttons
/*-----------------------------------------------------------------------------------*/
add_shortcode('button', 'slant_colored_buttons');
function slant_colored_buttons($atts){
	extract(shortcode_atts(array(
		'link'	=> '#',
		'title'	=> '',
		'target'	=> '',
		'bgcolor'	=> '',
		'textcolor'	=> '',
		'icon'	=> '',
		'type'	=> '',
		'align'	=> '',

	), $atts));



	
	$target = $atts['target'];
	$button_target = 'target="'.$target.'"';
	
	//$link = $atts['link'];

	global $slant_options;
	$st_options = get_option('slant_options'); 
	$themecolor= $st_options['theme_color']; 
	$button_class = "";
	
	
	switch ($bgcolor){
        	
    	case 'theme_color':	
    		$button_bg_color = $themecolor;
			$button_class .= "";
    		break;
			
    	case 'border':	
    		$button_bg_color = "none";
			$button_class .= "btn-bordered ";
    		break;
			
    	default :
        	$button_bg_color = $themecolor;
			$button_class .= "";
    }  
	
	 switch ($textcolor){
        	
    	case 'theme_color':	
    		$button_color = $themecolor;
			$button_class .= "";
    		break;
			
    	case 'white':	
    		$button_color = "#FFFFFF";
			$button_class .= "white ";
    		break;
			
		case 'dark':	
    		$button_color = "#333333";
			$button_class .= "";
    		break;
			
    	default :
        	$button_color = "#333333";
			$button_class .= "";
    }  
		
	 switch ($align){
    	case 'right':	
    		$button_class .= 'pull-right ';
    		break;
			
    	case 'center':	
    		$button_class .= 'centered-block ';
    		break;
			
    	default :
        	$button_class .= 'pull-left ';
    }   
	
	 switch ($type){
    	case 'slant':	
    		$button_class .= 'btn-slant ';
    		break;

    	default :
        $button_class .= "";
    }   
	
	if($type == "slant"){
	$return ='<a ' . $button_target .' href="'.$atts['link'].'" class="btn  '.$button_class.' fa '.$icon.' " style="background:'.$button_bg_color.';color:'.$button_color.';">'.$title.'</a>';																					
	}elseif($type != "slant" && $icon != ""){
	$return ='<a ' . $button_target .' href="'.$atts['link'].'" class="btn  '.$button_class.' icon fa-1x" style="background:'.$button_bg_color.';color:'.$button_color.';"><i class="fa '.$icon.'"></i>'.$title.'</a>';																					
	}else{
	$return ='<a ' . $button_target .' href="'.$atts['link'].'" class="btn  '.$button_class.'  " style="background:'.$button_bg_color.';color:'.$button_color.';">'.$title.'</a>';																					
	}
    return $return;
}




/*-----------------------------------------------------------------------------------*/
/*	Icon Box
/*-----------------------------------------------------------------------------------*/
add_shortcode('iconbox', 'slant_shortcode_iconbox');
function slant_shortcode_iconbox( $atts, $content = null ) {
		extract( shortcode_atts( array(
							'icon'      => '',
							'position'  => 'top',
							'title'      => '',
							'content'      => '',
							'btnlink'      => '',
							'btntxt' => '',
						), $atts ) );
						
						
		if($position == "left"){
		$return = '<div class="iconbox left">
				<div class="diamond col-md-3 col-sm-3"> <i class="fa '. $icon .' "></i>	</div>
				<div class="col-md-9 col-sm-9 content">	
				<h2>'. $title .'</h2>
				<div class="details"><p>'. $content .'</p>		
				<a href="'. $btnlink .'">'. $btntxt .'</a>		
				</div></div>
				</div>';
				}else{
				
				$return = ' <div class="iconbox top">
				<div class="diamond "> <i class="fa '. $icon .' "></i>	</div>	
				<h2 class="centered ">'. $title .'</h2>
				<div class="details centered"><p>'. $content .'</p>		
				<a href="'. $btnlink .'" class="btn btn-small btn-slant">'. $btntxt .'</a>		
				</div>
				</div>';
				
				}
	
	

	
						
    	return $return;
    
}


/*-----------------------------------------------------------------------------------*/
/* Icon 
/*-----------------------------------------------------------------------------------*/
add_shortcode('icon', 'slant_shortcode_icon');
function slant_shortcode_icon( $atts, $content = null ) {
		extract( shortcode_atts( array(
							'name'      => '',
						), $atts ) );
						
						
		
		$return = '<i class="fa '.$name.'"></i>';						
    	return $return;
    
}


/*-----------------------------------------------------------------------------------*/
/*	Image Box
/*-----------------------------------------------------------------------------------*/
add_shortcode('imagebox', 'slant_shortcode_imagebox');
function slant_shortcode_imagebox( $atts, $content = null ) {
		extract( shortcode_atts( array(
							'image'      => '',
							'title'      => '',
							'link' => '',
							'btntxt' => '',
							'content'      => '',
						), $atts ) );
						
						
		
		$return = '<div data-animated="fadeInLeft" class="col-lg-4 col-md-4 col-sm-12">
				<div class="shape">
				<a href="#" class="overlay hexagon"></a>
				<div class="details">
					<p>'.$content.'</p>		
					<a href="'.$link.'" class="button">'.$btntxt.'</a>		
				</div>
					<div class="bg"></div>	<div class="base">
					<img src="'.$image.'" alt="Shapes" />
				</div>
				</div>	
				<h2 class="centered">'.$title.'</h2>
				</div><!-- col-lg-4 -->';
			
    	return $return;
    
}




//Portfolio Gallery //////////////////////////////////////////
add_shortcode('portfolio', 'slant_portfolio_shortcode');
function slant_portfolio_shortcode($atts){

extract(shortcode_atts(array(
	  'items' => -1,
	  'col' => 4,
	  'hide_cat' =>'',
	  'style' => '',
   ), $atts));
   
   
		global $post;
		$portfolio = new WP_Query('post_type=portfolio&cat=-'. $hide_cat .'&posts_per_page=' .$items); 
		
	if($style =='carousel'){
	$return = '<!--Portfolio-->';
	$return .= '<div class="portfolio-carousel owl-carousel work">';
	if( $portfolio->have_posts() ) :
	while ($portfolio->have_posts()) : $portfolio->the_post(); 
	$item_categories = get_the_terms( $post->ID, 'portfolio-category' );
	
	$return .= '<div class="item"><a class="portfolio-box" href="'.get_permalink().'">
	<div class="view view-first">';
				
				if ( has_post_thumbnail()) {
				$imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "portfolio-thumb" );
				$return .= '<img src="'. $imgsrc[0].'" alt="item">';
				}
				
			$return .= '<div class="mask">
            <span> <i class="info fa fa-link"></i>
              <h3>';
			  
			  $i=0;
				 if($item_categories){
							 foreach ($item_categories as $cat){
							if($i!=0){ $return .='/ ';}
							$return .= $cat->name .' ';
							$i++;
							}
							}
			  
			  $return .='</h3>
            
            </span>
          </div></div>';
					
				$return .= '<h2>'.get_the_title().'</h2></a></div>';
	endwhile; endif;
	wp_reset_query();
	$return .= '</div>';
	
	
	}else{
		
	wp_enqueue_script( 'gridScrollFx' );
	wp_enqueue_script( 'colorfinder' );
	wp_enqueue_script( 'imagesloaded' );
	wp_enqueue_script( 'isotope' );
	
	
	$grid = 'grid-'.$col;
	$categories = get_categories('title_li=&orderby=name&hide_empty=1&taxonomy=portfolio-category');
		$return = '<!--Portfolio-->';
		if($categories){		
		$return .= '<!-- Portfolio Filter Start -->	
		<section id="options" class="clearfix">
		<div class="container">
			<ul id="filters" class="option-set portfolioFilter clearfix" data-option-key="filter">
          <li><a href="#filter" data-filter="*" class="btn btn-slant btn-bordered active">show all </a></li>';
		  
			if($categories){
					foreach($categories as $category){
			$return .=  '<li><a href="#filter" class="btn btn-slant btn-bordered " data-filter=.'.$category->cat_name.'>'.$category->cat_name.' </a></li>';

						}	
					}				

       $return .= '</ul>
		</div>
      </section><!-- #options -->';
	  }
	  $return .='<section  class="grid-wrap portfolio-container" data-gride-element="1">
		<ul class="grid '.$grid.' swipe-right" id="grid">';

	 if( $portfolio->have_posts() ) :

	while ($portfolio->have_posts()) : $portfolio->the_post(); 
		
		$item_categories = get_the_terms( $post->ID, 'portfolio-category' );
		$cat_slug = '';

			if(is_object($item_categories) || is_array($item_categories))
	
					{
						foreach ($item_categories as $cat)
						{
							$cat_slug .= $cat->name .' ' ;
					} }

		$return .= '<li class="item '.$cat_slug.'"><a class="portfolio-box" href="'.get_permalink().'">';
		
				if ( has_post_thumbnail()) {
				$imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "large" );
				$return .= '<img src="'. $imgsrc[0].'" alt="item">';
				}
					
				$return .= '<h3>'.get_the_title().'</h3></a></li>';
		endwhile; endif;
		wp_reset_query();
	 $return .= ' </ul></section><!--Portfolio Grid End-->';
	 
		}
	return $return; 
	

}




// testimonial //////////////////////////////////////////
add_shortcode('testimonial', 'slant_testimonial_shortcode');
function slant_testimonial_shortcode($atts){

extract(shortcode_atts(array(
      'items' => -1,
   ), $atts));
	
	
	 global $post;
  
	
	 $return = ' <div class="container extra-padding testimonial" ><p class="centered" ><i class="fa fa-quote-left"></i></p>
				 <div class="clearfix"></div>
				<div  class="clients-carousel owl-carousel owl-theme centered" >';
            
    query_posts(array( 
        'post_type' => 'testimonial',
        'showposts' => $items 
    ) );  

           while (have_posts()) : the_post(); 
		   $job_title = rwmb_meta( 'slant_testimonial_job_title' );
             $return .= '<div class="item">
              <p>'. get_the_content() .'</p>
              <div class="clearfix"></div>
			  <h3>'. get_the_title().'</h3> <span>'.$job_title.'</span>
            </div>';
            endwhile;
			wp_reset_query();
          $return .= ' </div><!-- owl-->
				</div><!--container-->
  <!-- testimonial  -->';


	return $return; 
}

/* ------------------------------------------------------------------------ */
/* Logos
/* ------------------------------------------------------------------------ */
add_shortcode('logos', 'slant_shortcode_logos');
function slant_shortcode_logos($atts, $content = null) {
	
	$return = '<!-- Logos --><div  class="logos-carousel owl-carousel owl-theme centered extra-padding" >';
	$return .=  do_shortcode( $content );
	$return .= '</div><!-- owl-->';
	
	return $return;
}

// Logo
add_shortcode('logo', 'hotspot_shortcode_logo');
function hotspot_shortcode_logo($atts, $content = null) {
extract(shortcode_atts(array(
    ), $atts));

	$return = '';
	$return .= '<div class="item">';
	$return .= '<img src="'. do_shortcode( $content ).'" alt="" />';
	$return .= '</div>';

	return $return;
}

//recent Posts //////////////////////////////////////////	
add_shortcode('recent_posts', 'slant_posts_shortcode');
function slant_posts_shortcode($atts){

extract(shortcode_atts(array(
      'col' => 3,
   ), $atts));
   
   
	global $post;
	
wp_reset_query();
$queryObject = new  Wp_Query( array(
    'showposts' => $col,
    'post_type' => array('post'),
    ));
	
	if($col == "2"){
	$classes ="col-lg-6 col-md-6 col-sm-12";
	}else{
	$classes ="col-lg-4 col-md-4 col-sm-12";
	}
	

	$return = '<div class="row blog-posts">';
// The Loop
if ( $queryObject->have_posts() ) :


    while ( $queryObject->have_posts() ) : $queryObject->the_post();
		
		 if ( has_post_thumbnail()) {
				$thumb_img = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "blog-thumb" );
				} else { $thumb_img = "";} 
	

         $return .= '<div data-animated="fadeInLeft" class="'.$classes.'">
					<div class="blog-bg">
					<h2><a href="'. get_permalink() .'">'. get_the_title().'</a></h2>
					<h5>Published Aug 30.</h5>';
					
				if ( has_post_thumbnail()) { 
				  $return .='<a href="'. get_permalink() .'"><img src="'.$thumb_img[0].'" class="post" alt="" /></a>';
				  }
					
	
					 $return .='<div class="col-lg-12 blog-content">
								
							
					<p>Armed with insight, we embark on designing the right brand experience that engages the audience. </p>
					
					<p><a href="'. get_permalink() .'" class="more fa  fa-external-link"> Read More</a></p>
					<br>

					</div>
				</div></div><!-- /col -->';


       
    endwhile;
	wp_reset_query();
endif;
      
        $return .= ' <div class="clearfix"></div></div>';
	  
	  return $return;
}



//Team Shortcode //////////////////////////////////////////
add_shortcode('team', 'slant_team_shortcode');
function slant_team_shortcode($atts){

extract(shortcode_atts(array(
      'items' => -1, 
	  'style' => '', 
   ), $atts));
   
   global $post;
   
  if($style =='classic'){
   
   $return = '<!-- team --><div class="team-carousel owl-carousel">';
		  
		query_posts(array( 
        'post_type' => 'team',
        'showposts' => $items 
		) );  
	
       while (have_posts()) : the_post();
       
	   
	  if ( has_post_thumbnail()) {
	  $imgteam = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "team-thumb" );
	  $position = rwmb_meta( 'slant_person_position' );
	  $facebook = rwmb_meta( 'slant_person_facebook' );
	  $twitter = rwmb_meta( 'slant_person_twitter' );
	  $linkedin = rwmb_meta( 'slant_person_linkedin' );
	  $google = rwmb_meta( 'slant_person_google' );
	  
	  $return .= '<div class="item">
	   <div class="view view-first">
					<img class="lazyOwl" src="'. $imgteam[0] .'" alt="" />
					 <div class="mask">
					<span>';
					  if ($position) {
						  $return .= '<h3>'. $position .'</h3>';
						  }
					 $return .= '<p>
					'. get_the_content() .'
					</p>
					 <ul class="social-network social-circle social-small">';
								if ($facebook) {
								$return .= '<li><a href="#" class="icoFacebook" title="Facebook"><i class="fa fa-facebook"></i></a></li>';
								} if ($twitter) {
								$return .= '<li><a href="#" class="icoTwitter" title="Twitter"><i class="fa fa-twitter"></i></a></li>';
								} if ($google) {
								$return .= '<li><a href="#" class="icoGoogle" title="Google +"><i class="fa fa-google-plus"></i></a></li>';
								}
					 
					$return .= '</ul></span>
				  </div>
		  
					</div>
                    <div class="team-info">
					<h3>'. get_the_title() .'</h3>';

					$return .= '</div></div>';
			}
			 endwhile; 
			wp_reset_query();
           $return .= '</div>';
   
   }else{
   
   wp_enqueue_script( 'skewSlider' );

   $return = '<!-- team -->
  <div class="cont"> 
  <div class="skewSlider slide1 team teamslider_style1 gray" id="teamslider" data-slider-type="teamskew">
   <ul>';
		  
		query_posts(array( 
        'post_type' => 'team',
        'showposts' => $items 
		) );  
	
       while (have_posts()) : the_post();
       
	   
	  if ( has_post_thumbnail()) {
	  $imgteam = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), "full" );
	  $position = rwmb_meta( 'slant_person_position' );
	  $facebook = rwmb_meta( 'slant_person_facebook' );
	  $twitter = rwmb_meta( 'slant_person_twitter' );
	  $linkedin = rwmb_meta( 'slant_person_linkedin' );
	  $google = rwmb_meta( 'slant_person_google' );
	  
	  $return .= '   <li><div class="skw-content slide">
                        <img src="'. $imgteam[0] .'" alt="person" />
                        <div class="text">
							<h3>'. get_the_title() .'</h3>
							 <h4>'. $position .'</h4>
                            <p>'. get_the_content() .'</p> 
							
							<ul class="social-network social-circle social-small">';
								 if ($facebook) {
								$return .= '<li><a href="#" class="icoFacebook" title="Facebook"><i class="fa fa-facebook"></i></a></li>';
								} if ($twitter) {
								$return .= '<li><a href="#" class="icoTwitter" title="Twitter"><i class="fa fa-twitter"></i></a></li>';
								} if ($google) {
								$return .= '<li><a href="#" class="icoGoogle" title="Google +"><i class="fa fa-google-plus"></i></a></li>';
								}
							 $return .= '</ul>	
							
                        </div>
                    </div></li>';
	  

			}
			 endwhile; 
			wp_reset_query();
           $return .= '</ul></div></div> ';
   }
  
	return $return; 
}


?>