<?php
/* Slideshow Shortcode */
add_shortcode('helium_slideshow', 'helium_slideshow');
function helium_slideshow($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'class'       => '',
    ), $atts);

    $html = '';
    $html .= $atts['class'];
    return $html;

}

/* banner intro home Shortcode */
add_shortcode('helium_banner_intro_default', 'helium_banner_intro_default');
function helium_banner_intro_default($atts, $content = null) {
  $atts = shortcode_atts(
  array(
    'title'           =>'',
    'description'     =>'',
    'style'           =>'intro-style1',
    'thumb_image'     =>'',
    'isbutton1'       =>'true',
    'link_button1'    =>'#',
    'text_button1'    =>'',
    'target_link1'    =>'_self',
    'isbutton2'       =>'true',
    'link_button2'    =>'#',
    'text_button2'    =>'',
    'target_link2'    =>'_self',
    'animation'       => 'fadeInUp',
    'animation_delay' => '300',
    'class'           => '',
  ), $atts);

	$html ='';
  $style='intro-style1';
	$cols='col-md-6 col-sm-8 col-sm-offset-2';
  $overlay='overlay';
  $center_content='center-content';
	if($atts['style']=='intro-style2')
	{
		$cols='col-md-8 col-md-offset-2 text-center space30';
    $style='intro-style2';
    $center_content='';
	}elseif($atts['style']=='intro-style3'){
		$cols='col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 text-center space40';
    $style='intro-style3';
	}elseif($atts['style']=='intro-style4'){
    $style ='intro-style4';
    $cols ='col-md-8 col-md-offset-2 text-center';
    $center_content='';
    $overlay='';
  }elseif($atts['style']=='intro-style5'){
    $cols='';
    $style='intro-style5';
    $overlay='';
  }elseif($atts['style']=='intro-style10'){
    $cols='col-md-8 col-md-offset-2 text-center space90';
    $style='intro-style2 intro-style10';
    $overlay='overlay-gradiant';
    $center_content='';
  }elseif($atts['style']=='intro-style9') {
    $cols='col-md-8 col-md-offset-2 text-center';
    $style='intro-style9';
    $overlay='';
    $center_content='';
  }elseif($atts['style']=='intro-style8'){
     $cols='col-sm-10 col-sm-offset-1 text-center';
     $style='intro-style8';
  }
  $target1='';
  $target2='';
  $stylefix='';
	// INTRO 
  $thumbnail = '';
  if($atts['thumb_image']){
    $image_info = wp_get_attachment_image_src($atts['thumb_image'], 'full');
    if($image_info[0]){
      $thumbnail = $image_info[0];
    }else{
      $thumbnail = $atts['thumb_image'];
    }
  }else{
    if($atts['style']=='intro-style1'||$atts['style']=='intro-style2'|| $atts['style']=='intro-style10'){
      $stylefix='fix_padding_top';
    }
  }
  $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
  $html .= '<div class="intro '.$style.' '. $atts['class'].' '.$stylefix.' " '.$animated_code.'>';
                if($overlay!=''){
                  $html.= '<div class="'.$overlay.'"></div>';
                }
  $html .= '     <div class="container">
                    <div class="row '.$center_content.'">
                        <div class="'.$cols.'">
                            <h2>'.$atts['title'].'</h2>
                            <p>'.$atts['description'].'</p>';
                            if($atts['isbutton1']=='true'&& $atts['text_button1']!=''){
                               if($atts['target_link1']=='page-scroll'){
                                    $target1='page-scroll';
                               }
                            	 $html.='<a href="'.$atts['link_button1'].'" target="'.$atts['target_link1'].'"  class="btn btn-primary btn-lg '.$target1.'">'.$atts['text_button1'].'</a>';	
                            }
                            if($atts['isbutton2']=='true'&& $atts['text_button2']!=''){
                              if($atts['target_link2']=='page-scroll'){
                                    $target2='page-scroll';
                              }
                            	$html.='<a href="'.$atts['link_button2'].'" target="'.$atts['target_link2'].'" class="btn btn-default btn-border btn-lg '.$target2.'">'.$atts['text_button2'].'</a>';	
                            }
  $html .= '           </div>';
    					if($atts['style']=='intro-style1')
    					{
	$html .= '			    <div class="col-md-5 col-md-push-1">';
                         $html .= 	$thumbnail ==''?'':'<img src="'.$thumbnail.'" alt="'.$atts['title'].'" title="'.$atts['title'].'" 					 	class="img-responsive">';
	$html .= '          </div>';						
    					}else if($atts['style']=='intro-style2'|| $atts['style']=='intro-style10'){
                      $html .= '<div class="col-md-12 text-center">';
	                    $html .= 	$thumbnail ==''?'':'<img src="'.$thumbnail.'" alt="'.$atts['title'].'" title="'.$atts['title'].'" 					 		class="img-responsive">';
	                    $html .= ' </div>';						
    					}
  $html .= '       </div>
                </div>
            </div>';
  return $html;
}
add_shortcode('helium_banner_intro_countdown', 'helium_banner_intro_countdown');
function helium_banner_intro_countdown($atts, $content = null) {
  $atts = shortcode_atts(
  array(
    'title'           =>'',
    'description'     =>'',
    'end_days'        => '',
    'end_months'      => '',
    'end_years'       => '',
    'time_zone'       => 'dHMS',
    'years'           => 'years',
    'months'          => 'months',
    'weeks'           => 'weeks',
    'days'            => 'days',
    'hours'           => 'hours',
    'minutes'         => 'mins',
    'seconds'         => 'secs',
    'years1'          => 'year',
    'months1'         => 'month',
    'weeks1'          => 'week',
    'days1'           => 'day',
    'hours1'          => 'hour',
    'minutes1'        => 'min',
    'seconds1'        => 'sec',
    'animation'       => 'fadeInUp',
    'animation_delay' => '300',
    'class'           => '',
  ), $atts);

  $html ='';
  $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
  $html .= '<div class="intro intro-style7 '. $atts['class'].' " '.$animated_code.' >';
    $html .= '<div class="container">
                 <div class="col-md-8 col-md-offset-2">
                    <div class="intro4-inner text-center">
                    <h2>'.$atts['title'].'</h2>
                    <h4>'.$atts['description'].'</h4>
                    <div class="intro-countdown" data-time_zone="'.$atts['time_zone'].'"  data-end_day="'.$atts['end_days'].'" data-end_month="'.$atts['end_months'].'" data-end_year="'.$atts['end_years'].'"  data-years="'.$atts['years'].'" data-months="'.$atts['months'].'" data-weeks="'.$atts['weeks'].'" data-days="'.$atts['days'].'" data-hours="'.$atts['hours'].'" data-minutes="'.$atts['minutes'].'"
  data-seconds="'.$atts['seconds'].'"  data-years1="'.$atts['years1'].'" data-months1="'.$atts['months1'].'"
 data-week1s="'.$atts['weeks1'].'" data-days1="'.$atts['days1'].'" data-hours1="'.$atts['hours1'].'"
 data-minutes1="'.$atts['minutes1'].'"
 data-seconds1="'.$atts['seconds1'].'">
                      <div class="countdown styled">
                        
                      </div>
                    </div>';
     $html .= '</div>';  
    $html .= '</div>';
   $html .= '</div>';  
  $html .= '</div>';
  return $html;
}
// shortcode helium header
 add_shortcode('helium_header', 'helium_header');
function helium_header($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           =>'',
      'description'     =>'',
      'text-align'      =>'text-center',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $html = '';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html .='<div class="section-head '.$atts['text-align'].' col-md-8 col-md-offset-2 '.$atts['class'].' " '.$animated_code.'>';
      if($atts['title']!=''){
        $html .='<h1>'.$atts['title'].'</h1>';
      }
      if($atts['title']!=''){
        $html .='<p>'.$atts['description'].'</p>';
      } 
    $html .='</div>';
    return $html;
}
// end shortcode helium header
// service secsion
add_shortcode('helium_service', 'helium_service');
function helium_service($atts, $content = null) {
    $atts = shortcode_atts(
    array(
      'title'           =>'',
      'description'     =>'',
      'icon'            =>'',
      'style'           =>'style1',
      'text-align'      =>'features-left',
      'text_button'     =>'',
      'link_button'     =>'#',
      'target_url'      =>'_self',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $style='service-box';
    $html_icon='<span><i class="'.$atts['icon'].'"></i></span>';
    $class_details='';
    $html_open_div='';
    $html_close_div='';
    $button_style4='';
    if($atts['style']=='style2'){
        $style='service-box3';
        $html_icon='<i class="'.$atts['icon'].'"></i>';
    }elseif($atts['style']=='style5'){
        $style='service-box2';
        $html_icon='<i class="'.$atts['icon'].'"></i>';
    }elseif($atts['style']=='style3'){
        $html_open_div='<div class="features">';
        $style='feature '.$atts['text-align'];
        $class_details='fetaure-details';
        $html_icon='<div class="icon-container">
                      <div class="icon">
                        <i class="'.$atts['icon'].'"></i>
                      </div>
                    </div>';
        $html_close_div='</div>';
    }else if($atts['style']=='style4'){
      $style='sf-box sf-box1';
      $html_icon='<i class="'.$atts['icon'].'"></i>';
      $button_style4='<a href="'.$atts['link_button'].'" target="'.$atts['target_url'].'" class="btn btn-border">'.$atts['text_button'].'</a>';
    }
    $html = '';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
        $html .=$html_open_div;
        $html .='<div class="'.$style.' '.$atts['class'].'" '.$animated_code.'>';
                if($atts['icon']!='')
                {
                  $html .=$html_icon;
                }
        $html .='<div class="'.$class_details.'">';
                if($atts['title']!=''){
                  $html .='<h4>'.$atts['title'].'</h4>';
                }
                if($atts['description']!=''){
                  $html .='<p>'.$atts['description'].'</p>';
                }  
                //button style4
                if($atts['text_button']!='')
                {
                  $html .=$button_style4;
                }
        $html .='</div>
              </div>';
        $html .=$html_close_div;
    return $html;
}
//end service secsion
// videobox
add_shortcode('helium_videobox', 'helium_videobox');
function helium_videobox($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'video_url'       =>'',
      'icon'            =>'fa fa-play',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);

    $html = '';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : ' data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html .='<div class="video-box '.$atts['class'].'"'.$animated_code.'>
              <a href="'.$atts['video_url'].'" class="prettyPhoto video-link">';
                if($atts['icon']!=''){
                  $html.='<span class="'.$atts['icon'].'"></span>';
                }
    $html .=' </a>
            </div>';
    return $html;
}
// end videobox
/* Testimonial Shortcode */
add_shortcode('helium_testmonial', 'helium_testmonial');
function helium_testmonial($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'isdots'          =>'true',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html= '<div class="quote '.$atts['class'].'" data-isdot='.$atts['isdots'].' '.$animated_code.'>
                '.do_shortcode($content).'
            </div>';
    return $html;
}
add_shortcode('helium_testmonial_item', 'helium_testmonial_item');
function helium_testmonial_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'description'  =>'',
      'thumbnail'    =>'',
      'author_name'  =>'',
      'company_name' =>'',
      'class'        =>'',
    ), $atts);

    $html='';
    $thumbnail = '';
    if($atts['thumbnail']){
      $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
      if($image_info[0]){
        $thumbnail = $image_info[0];
      }else{
        $thumbnail = $atts['thumbnail'];
      }
    }
    $html .= '<div class="testimonial '.$atts['class'].'">';
              if($atts['description']!='')
              {
                $html .= '<div class="quote">
                          '.$atts['description'].'
                         </div>';
              }
    $html .= '<div class="author">';
    $html .= ($thumbnail!='')?'<img class="img-responsive" src="'.$thumbnail.'" alt="helium">':'';            
    $html .= ' <cite>';
    $html .= ($atts['author_name']!='')?'<b>'.$atts['author_name'].'</b>':'';             
    $html .= ' '.$atts['company_name'].'
               </cite>
              </div>
            </div>';
    return $html;
}
/*End  Testimonial Shortcode */

/* Accordion Shortcode */
add_shortcode('helium_accordion', 'helium_accordion');
function helium_accordion($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'targetid'        => '',
      'style'           => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $html ='';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html .= '<div class="'.$atts['style'].' '.$atts['class'].'">';
    if($atts['title']!=''||$atts['description']!='')
    {
      $html .='<div id="'.$atts['targetid'].'" class="faq-inner">';
        $html .=($atts['title']!='')?'<h2>'.$atts['title'].'</h2>':'';
        $html .=($atts['description']!='')?'<p>'.$atts['description'].'</p>':'';
      $html .='</div>';
    }
    $html .= '
                <div class="panel-group accordion" id="accordion">
                   '.do_shortcode($content).'
                </div>
              </div>';
    return $html;
}
add_shortcode('helium_accordion_item', 'helium_accordion_item');
function helium_accordion_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           =>'',
      'description'     =>'',
      'icon'            =>'',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);

    $html = '';

    $date = new DateTime();
    $id='collapse'.$date->getTimestamp().rand();

    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    
    $html .= '<div class="panel panel-default '.$atts['class'].'" '.$animated_code.'>';
            if($atts['title']!='')
            {
              $html.='<div class="panel-heading">
                        <h4 class="panel-title">
                          <a data-toggle="collapse" data-parent="#accordion" href="#'.$id.'">
                            <i class="'.$atts['icon'].'"></i>'.$atts['title'].'
                          </a>
                        </h4>
                      </div>';
            }
    $html .= '<div id="'.$id.'" class="panel-collapse collapse">
                <div class="panel-body">
                  '.$atts['description'].'
                </div>
              </div>
            </div>';
    return $html;
}
/* End Accordion Shortcode */

// Feature Shortcode 
add_shortcode('helium_feature', 'helium_feature');
function helium_feature($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'thumbnail'       => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $html='';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $thumbnail = '';
    if($atts['thumbnail']){
      $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
      if($image_info[0]){
        $thumbnail = $image_info[0];
      }else{
        $thumbnail = $atts['thumbnail'];
      }
    }
    $html .= '<div class="'.$atts['class'].' info-content center-content " '.$animated_code.'>
                <div class="col-md-7 col-sm-6">';
                if($thumbnail != '')
                {
    $html .=      '<img src="'.$thumbnail.'" class="img-responsive" alt="'.$atts['title'].'"/>';
                }
    $html .=  ' </div>
                <div class="col-md-5 col-sm-6">';
                  if($atts['title'] != '')
                  {
      $html .=  '   <h4>'.$atts['title'].'</h4><div class="space10"></div>';           
                  }
                  if ($atts['description'] != '') {
      $html .=  '   <p>'.$atts['description'].'</p><div class="space20"></div>';
                  }
      $html .=  do_shortcode($content);
      $html .=' </div>
            </div>';
    return $html;
}
add_shortcode('helium_feature_item', 'helium_feature_item');
function helium_feature_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'       => '',
      'icon'        => '',
      'class'       => '',
    ), $atts);
    $html ='';
    $html .= '<li class="'.$atts['class'].'">';
              if($atts['icon'] != '')
              {
      $html .= '<i class="'.$atts['icon'].'"></i>';
              }
      $html .= ''.$atts['title'].'
              </li>';
    return $html;
}
// End Feature Shortcode 

// Info Content Shortcode 
add_shortcode('helium_info_content', 'helium_info_content');
function helium_info_content($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'style'           => 'style1',
      'text_button'     => '',
      'link_button'     => '#',
      'target_url'      => '_self',
      'thumbnail'       => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $html='';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $thumbnail = '';
    if($atts['thumbnail']){
      $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
      if($image_info[0]){
        $thumbnail = $image_info[0];
      }else{
        $thumbnail = $atts['thumbnail'];
      }
    }
    $style='info-content';
    $thumb_image='';
    $title='<h4>'.$atts['title'].'</h4>';
    $button='<div class="space30"></div><a href="'.$atts['link_button'].'" target="'.$atts['target_url'].'" class="btn btn-primary">'.$atts['text_button'].'</a>';
    if($atts['style']=='style2')
    {
       if($thumbnail != ''){
          $thumb_image='<img src="'.$thumbnail.'" class="img-responsive center-block" alt="'.$atts['title'].'">';
       }
       $style='info-three text-center';
       $title='<h3>'.$atts['title'].'</h3>';
       $button='';
    }
    $html .= '<div class="'.$style.' '.$atts['class'].'">
                '.$thumb_image.'';

                if($atts['title'] != '')
                {
      $html .=''. $title.'';           
                }

                if($atts['description'] != '')
                {
      $html .=    '<p>'.$atts['description'].'</p>';            
                }
      $html .=''.$button .'';        
    $html .=' </div>';
    return $html;
}
// End Info Content Shortcode 
// facts
add_shortcode('helium_facts', 'helium_facts');
function helium_facts($atts, $content = null) {
    $atts = shortcode_atts(
    array(
      'name'             => '',
      'animation_number' => '0',
      'animation_time'   => '100',
      'isplus'           => 'true',
      'animation'        => 'fadeInUp',
      'animation_delay'  => '300',
      'class'            => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html= '<div class="facts-wrap fact text-center '.$atts['class'].'" '.$animated_code.'>
              <h3><span class="counter" data-number="'.$atts['animation_number'].'" data-time="'.$atts['animation_time'].'">0</span>';
              if($atts['isplus']=='true')
              {
      $html .= '+';  
              }
      $html .= '</h3>';
              if($atts['name']!=''){
      $html .= '<h4>'.$atts['name'].'</h4>';
              }
    $html.= '</div>';
    return $html;
}
// end facts
// team shortcode
add_shortcode('helium_team', 'helium_team');
function helium_team($atts, $content = null) {
    $atts = shortcode_atts(
    array(
      'name'            => '',
      'job'             => '',
      'link'            => '',
      'description'     => '',
      'thumbnail'       => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    
    $thumbnail = '';
    $html='';

    if($atts['thumbnail']){
      $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
      $thumbnail = ($image_info[0]) ? $image_info[0] : $atts['thumbnail'];
    }
    $html .= '<div class="team-box '.$atts['class'].'" '.$animated_code.'>';
            if($thumbnail!=''){
              $html .= '<figure>
                          <img class="img-responsive" src="'.$thumbnail.'" alt="'.$atts['name'].'">
                        </figure>';
            }
    $html .='<div>';
    if($atts['link'] != ''){
        $html .=($atts['name']!='')?'<h4><a href="'.$atts['link'].'">'.$atts['name'].'</a></h4>':'';
    }else{
        $html .=($atts['name']!='')?'<h4>'.$atts['name'].'</h4>':'';
    }
    
    $html .=($atts['job']!='')?'<small>'.$atts['job'].'</small>':'';
    $html .=($atts['description']!='')?'<p>'.$atts['description'].'</p>':'';          
    $html .='</div></div>';

    return $html;
}
// end team shortcode
// social 
add_shortcode('helium_social', 'helium_social');
function helium_social($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html= '<ul class="list-inline social-icons icon-circle '.$atts['class'].'" '.$animated_code.'>
                '.do_shortcode($content).'
            </ul>';
    return $html;
}
add_shortcode('helium_social_item', 'helium_social_item');
function helium_social_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'icon'            => '',
      'link_target'     => '#',
      'class'           => '',
    ), $atts);
    $html  = '<li class="'.$atts['class'].'">';
      if($atts['icon']!='')
      {
        $html .='<a href="'.$atts['link_target'].'" class="social fa '.$atts['icon'].'"></a>';
      }
    $html .='</li>';
    return $html;
}
// end social

// pricing shortcode
add_shortcode('helium_pricing', 'helium_pricing');
function helium_pricing($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'price'           => '',
      'plan_unit'       => '',
      'text_button'     => '',
      'link_button'     => '#',
      'target_url'      => '_self',
      'is_highlight'    => 'false',
      'plan_recommended'=> '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $style='';
    $elm_highlight='';
    if($atts['is_highlight']=='true'){
      $style='plan-highlight';
      if($atts['plan_recommended']!='')
      {
        $elm_highlight='<p class="plan-recommended">'.$atts['plan_recommended'].'</p>';
      }
    }
    $html= '';

    $html .= '<div class="plan '.$style.'">';
    $html .= $elm_highlight;
    $html .= ($atts['title']!='')?'<h3 class="plan-title">'.$atts['title'].'</h3>':'';
    $html .= ($atts['price']!='')?'<div class="plan-price">'.$atts['price'].' <span class="plan-unit">'.$atts['plan_unit'].'</span></div>':'';
    $html .= do_shortcode($content);
    $html .= ($atts['text_button']!='')?'<a href="'.$atts['link_button'].'" target="'.$atts['target_url'].'" class="btn btn-primary btn-block">'.$atts['text_button'].'</a>':'';
    $html .='</div>';
    return $html;
}
add_shortcode('helium_pricing_item', 'helium_pricing_item');
function helium_pricing_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'value' => '',
      'name'  => '',
      'class' => '',
    ), $atts);
    $html  = '<li class="'.$atts['class'].'">';
    $html .=($atts['value']!='')?'<b>'.$atts['value'].'</b> ':'';
    $html .=($atts['name']!='')?''.$atts['name'].'':'';
    $html .='</li>';
    return $html;
}
// end pricing shortcode
// call action
add_shortcode('helium_callaction', 'helium_callaction');
function helium_callaction($atts, $content = null) {
    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'text_button'     => '',
      'link_button'     => '#',
      'target_url'      => '_self',
      'icon'            => '',
      'text-align'      => 'text-center',
      'style'           => 'style1',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html ='';
    if($atts['style']=='style1')
    {
      $html .= '<div class="cta-wrap '.$atts['text-align'].' '.$atts['class'].'" '.$animated_code.'>';
      $html .=($atts['title']!='')?'<h2>'.$atts['title'].'</h2>':'';
      $html .=($atts['description']!='')?'<p>'.$atts['description'].'</p>':'';
      if($atts['text_button']!='')
      {
        $html .= '<div class="space20"></div>
                  <a href="'.$atts['link_button'].'" class="btn btn-lg btn-default">'.$atts['text_button'].'';
                  if($atts['icon']!='')
                  {
                     $html .= '<i class="'.$atts['icon'].'"></i>';
                  } 
        $html .='</a>';
      }
      $html .= '</div>';
    }else{
      $html .= '<div class="cta-wrap cta-wrap2'.$atts['text-align'].' '.$atts['class'].'" '.$animated_code.'>';
      $html .= '<div class="col-md-8">';
      $html .= ($atts['title']!='')?'<h2>'.$atts['title'].'</h2>':'';
      $html .= ($atts['description']!='')?'<p>'.$atts['description'].'</p>':'';
      $html .= '</div>';
      if($atts['text_button']!='')
      {
        $html .='<div class="col-md-2">';
        $html .= '<div class="space20"></div>
                  <a href="'.$atts['link_button'].'" class="btn btn-lg btn-default">'.$atts['text_button'].'';
                  if($atts['icon']!='')
                  {
                     $html .= '<i class="'.$atts['icon'].'"></i>';
                  } 
        $html .='</a>';
        $html .= '</div>';
      }
      $html .= '</div>';  
    }
    return $html;
}
// end call action

//latest blog
add_shortcode('helium_lastest_blog', 'helium_lastest_blog');
function helium_lastest_blog($atts, $content = null) {
    $atts = shortcode_atts(
    array(
      'item_count'      =>'4',
      'columns'         =>'4',
      'show_date'       => 'true',
      'show_author'     => 'true',
      'show_comment'    => 'true',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'     => '',
    ), $atts);
    $args = array(
      'post_type' => 'post', 
      'posts_per_page' => $atts['item_count'],
      'order' => 'desc'
    );
    $cols = 'col-md-3 col-sm-6 col-xsp-6';
    if($atts['columns'] == 1){
      $cols = 'col-md-12';
    }else if($atts['columns'] == 2){
      $cols = 'col-md-6 col-xsp-6';
    }else if($atts['columns'] == 3){
      $cols = 'col-md-4 col-sm-4 col-xsp-6';
    }else if($atts['columns'] == 4){
      $cols = 'col-md-3 col-sm-6 col-xsp-6';
    }else if($atts['columns'] == 6){
      $cols = 'col-md-2 col-sm-2 col-xsp-6';
    }
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $blog = new WP_Query($args);
    ob_start(); ?>
    <div class="home-blog" <?php echo $animated_code; ?>>
      <?php while($blog->have_posts()) : $blog->the_post(); ?>
          <article class="blog-item <?php echo $cols; ?> no-padding">
            <div class="blog-mason-item">
              <a href="<?php the_permalink(); ?>">
                <?php $thumbnail_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_id()),'thumbnail_640x711'); ?>
                <?php if($thumbnail_url){ ?>
                  <img src="<?php  echo $thumbnail_url[0]; ?>" alt="<?php the_title(); ?>" class="img-responsive"/>
                <?php } ?>
              </a>
              <div class="blog-mason-excerpt">
                <h2>
                  <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                </h2>
                <div class="blog-meta">
                    <?php if($atts['show_date'] == 'true'){?>
                      <i class="icon-clock2"></i><?php the_time(get_option('date_format'));?>
                    <?php } ?>
                    <?php if($atts['show_author'] == 'true'){ ?>
                      <i class="icon-head"></i><?php the_author_meta('display_name'); ?> 
                    <?php } ?>
                    <?php if($atts['show_comment'] == 'true'){ ?>
                      <i class="icon-speech-bubble"></i> <?php comments_number( esc_html__('0 Comment ', 'helium'), esc_html__( '1 Comment', 'helium' ), esc_html__( '% Comments', 'helium' ) ); ?>
                    <?php } ?>
                </div>
              </div>
            </div>
          </article>
      <?php endwhile; wp_reset_postdata(); ?>
    </div>
    <?php
    return ob_get_clean();
}
//end latest blog

// contact info
add_shortcode('helium_contact_info', 'helium_contact_info');
function helium_contact_info($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html = '<div class="contact sidebar" '.$animated_code .'>';
    $html .= ($atts['title']!='')?'<h3>'.$atts['title'].'</h3>':'';
    $html .= '  <ul class="list">
                  '.do_shortcode($content).'
                </ul>
            </div>';
    return $html;
}
add_shortcode('helium_contact_info_item', 'helium_contact_info_item');
function helium_contact_info_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'icon'            => '',
      'title'           => '',
      'class'           => '',
    ), $atts);
    $html  = '<li class="'.$atts['class'].'">';
      if($atts['icon']!='')
      {
        $html .='<i class="'.$atts['icon'].'"></i>'.$atts['title'].'';
      }
    $html .='</li>';
    return $html;
}
// end contact info
// screent shot
add_shortcode('helium_shots', 'helium_shots');
function helium_shots($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $html='';
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html .= '<div class="shots" '.$animated_code.'>
              '.do_shortcode($content).'
            </div>';
    return $html;
}
add_shortcode('helium_shots_item', 'helium_shots_item');
function helium_shots_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'thumbnail'       => '',
      'class'           => '',
    ), $atts);
    $thumbnail='';
    if($atts['thumbnail']){
      $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
      if($image_info[0]){
        $thumbnail = $image_info[0];
      }else{
        $thumbnail = $atts['thumbnail'];
      }
    }
    $html  = '<div class="'.$atts['class'].'">';
    $html .= ($thumbnail!='')?'<img class="img-responsive" src="'.$thumbnail.'" alt="helium">':''; 
    $html .='</div>';
    return $html;
}
// end screent shot
// slide intro 
add_shortcode('helium_slide_intro', 'helium_slide_intro');
function helium_slide_intro($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html= '<div class="intro intro-style6 '.$atts['class'].'" '.$animated_code.'>
                  <div id="intro6-slider" class="flexslider">
                  <ul class="slides">
                    '.do_shortcode($content).'
                  </ul>
                  <div class="is-prev"><i class="icon-angle-left-circle"></i></div>
                  <div class="is-next"><i class="icon-angle-right-circle"></i></div>
                </div>
            </div>';
    return $html;
}
add_shortcode('helium_slide_intro_item', 'helium_slide_intro_item');
function helium_slide_intro_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'text_button'     => '',
      'link_button'     => '#',
      'target_url'      => '_self',
      'class'           => '',
    ), $atts);
    $html  = '<li>
                <div class="container">
                  <div class="row">
                    <div class="col-md-8 col-md-offset-2 text-center">';
                    $html  .=($atts['title']!='')?'<h2>'.$atts['title'].'</h2>':'';
                    $html  .=($atts['description']!='')?'<p>'.$atts['description'].'</p>':'';  
                    if($atts['text_button']!='')
                    {
                      $html  .='<a href="'.$atts['link_button'].'" target="'.$atts['target_url'].'" class="btn btn-primary btn-lg">'.$atts['text_button'].'</a>';
                    }
  $html  .='        </div>
                  </div>
                </div>
              </li>';
    return $html;
}
// end slide intro 
// masony blog
add_shortcode('blog_masony', 'blog_masony');
function blog_masony($atts, $content = null) {
    $atts = shortcode_atts(
    array(
    'columns'         => '2',
    'animation'       => 'fadeInUp',
    'animation_delay' => '300',
    'class'           => '',
    ), $atts);
ob_start(); ?>
<?php 
  $cols='blog-masonry-2col';
  if($atts['columns']=='3')
  {
    $cols='blog-masonry-3col';
  }
  $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
      $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
  $args = array(    
      'paged' => $paged,
      'post_type' => 'post',
      'orderby' => 'date',
  );
  $a = new WP_Query($args); 
?>
<div class="blog-masonry <?php echo $cols; ?>">
    <?php
      if ( $a->have_posts() ) : while ( $a->have_posts() ) : $a->the_post(); ?>
      <div class="item" id="post-<?php the_ID(); ?>" <?php echo  $animated_code;  ?> >
          <article>
            <?php if(has_post_format('gallery')){?>
                  <?php helium_content_gallery(); /* Display gallery of post */ ?>
             <?php }elseif(has_post_format('video')){?>
                  <div class="media">
                    <?php helium_postformat_video(); /* Display video of post */ ?>
                  </div>
             <?php }else if(has_post_format('audio')) {?>
                  <div class="media">
                    <?php helium_postformat_audio(); /* Display video of post */ ?>
                  </div>
             <?php }else if(has_post_format('link')){?>
                  <div class="media">
                        <?php   
                            global $post;
                            $link = get_post_meta( $post->ID, 'format_link_url', true );
                            $link_description = get_post_meta( $post->ID, 'format_link_description', true );
                            
                            printf( '<h4 class="post-title"><a href="%1$s" target="blank">%2$s</a></h4>',
                                            $link,
                                            get_the_title()
                            );
                        ?>
                        <?php
                          if( $link_description!='')
                          {
                            printf( '<a href="%1$s" target="blank">%2$s</a>',
                                        $link,
                                        $link_description
                                );
                          }
                        ?>
                  </div>
            <?php }else if(has_post_format('aside')){ ?>
                <div class="media">
                    <div class="post-body">
                           <?php the_content(''); /* Display content  */ ?>
                    </div>
                </div>
            <?php }else{?>
               <?php if(has_post_thumbnail()){ ?>
                  <div class="post-media">
                    <?php helium_content_thumbnail('full'); /* Display thumbnail of post */ ?>
                  </div>
                <?php } ?>
            <?php } ?>
            <div class="blog-excerpt">
              <h4><?php helium_content_title(); /* Display title of post */ ?></h4>
              <div class="post-meta">
                  <span>
                    <i class="fa fa-user"></i>
                    <?php _e('By: ', 'helium'); ?>
                    <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?>
                    </a>
                  </span>
                &nbsp;
                <span>
                    <i class="fa fa-comments"></i>
                    <a href="<?php the_permalink();?>">                  
                       <?php comments_number( esc_html__('Comment: 0', 'helium'), esc_html__( 'Comment: 1', 'helium' ), esc_html__( 'Comments: %', 'helium' ) ); ?>
                    </a>             
                </span>
              </div>
              <div class="post-body">
                  <?php helium_content_body(); /* Display content of post or intro in category page */ ?>
              </div>
               <?php helium_content_readmore(); /* Display read more button in category page */ ?>
            </div>
        </article>
      </div>
      <?php endwhile;  wp_reset_postdata();?>
    </div>
    <div class="pagination-wrapper text-center">
      <?php
          global $wp_query;
          $big = 999999999; // need an unlikely integer
          $pages = paginate_links(array(
                       'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
                       'format' => '?paged=%#%',
                       'current' => max(1, get_query_var('paged') ),
                       'total' => $a->max_num_pages,
                       'next_text'    => wp_kses( __('→' , 'helium'), true),
                       'prev_text'    => wp_kses( __('←', 'helium'), true),
                       'type'       => 'array',
                   ) );

          if( is_array( $pages ) ) {
                  $paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
                  echo wp_kses( __('<ul class="pagination">', 'helium'), true);
                  foreach ( $pages as $page ) {
                          echo wp_kses( __('<li>', 'helium'), true) .wp_kses($page,true). wp_kses( __('</li>', 'helium'), true);
                  }
                 echo wp_kses( __('</ul>', 'helium'), true ) ;
              }
      ?>
    <?php else : ?>
            <p><?php esc_html_e('Sorry, no pages matched your criteria.', 'helium'); ?></p>
    <?php endif; ?>
</div>
<?php
    return ob_get_clean();
}
//end masony blog
// breadcrumbs blog
add_shortcode('helium_breadcrumbs_blog', 'helium_breadcrumbs_blog');
function helium_breadcrumbs_blog($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'thumbnail'       => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
  $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
  $thumbnail='';
  $customizer_show_breadcrumb = get_theme_mod('show_breadcrumb','yes');
  $customizer_image_cover = get_theme_mod('blog_cover');
  $blog_cover=$customizer_image_cover;
  if($atts['thumbnail']){
    $image_info = wp_get_attachment_image_src($atts['thumbnail'], 'full');
    if($image_info[0]){
      $thumbnail = $image_info[0];
    }else{
      $thumbnail = $atts['thumbnail'];
    }
  }else{
    $thumbnail=$blog_cover;
  }
  ob_start(); ?>
  <div class="page-head" style="background: url('<?php echo $thumbnail; ?>') no-repeat center;" <?php echo $animated_code ?>>
    <div class="overlay"></div>
    <div class="container">
      <div class="row">
        <div class="col-md-12 text-center">
          <?php $show_page_heading = get_post_meta(helium_get_current_id(), "helium_met_page_heading", true) ? get_post_meta(helium_get_current_id(), "helium_met_page_heading", true):'yes'; ?>
          <h1 class="post-title"> <?php echo $atts['title']; ?> </h1>
          <?php if($customizer_show_breadcrumb=='yes' ){ ?>
              <?php helium_breadcrumbs(); ?>
          <?php }  ?>
        </div>
      </div>
    </div>  
  </div>    
<?php
    return ob_get_clean();
}
// end breadcrumbs blog
// OUT TIMELINE
add_shortcode('helium_out_timeline', 'helium_out_timeline');
function helium_out_timeline($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html= '<ul class="timeline '.$atts['class'].'" '.$animated_code.'>
                '.do_shortcode($content).'
            </ul>';
    return $html;
}
add_shortcode('helium_out_timeline_item', 'helium_out_timeline_item');
function helium_out_timeline_item($atts, $content = null) {

    $atts = shortcode_atts(
    array(
      'title'           => '',
      'description'     => '',
      'date_time'       => '',
      'color_date'      => '',
      'icon'            => '',
      'bg_icon'         => '',
      'color_icon'      => '',
      'text-align'      => '',
      'style'           => 'icon',
      'sapo'            => '',
      'animation'       => 'fadeInUp',
      'animation_delay' => '300',
      'class'           => '',
    ), $atts);
    $animated_code = ($atts['animation_delay'] == '0') ? '' : 'data-animation="'.$atts['animation'].'" data-animation_delay="'.$atts['animation_delay'].'"';
    $html  = '<li class="'.$atts['text-align'].' '.$atts['class'].'" '.$animated_code.'>';
      $html .= '<div class="timeline-image" style="background-color:'.$atts['bg_icon'].';color:'.$atts['color_icon'].'">';
      if($atts['style']=='icon')
      {
        if($atts['icon']!='')
        {
          $html .= '<i class="'.$atts['icon'].'"></i>';
        }
      }else{
        if($atts['sapo']!='')
        {
          $html .= '<h4>'.$atts['sapo'].'</h4>';
        }
      }
      $html .= '</div>
                <div class="timeline-panel">
                  <div class="timeline-heading">';
      $html .=  ($atts['date_time']!='')?'<h4 style="color:'.$atts['color_date'].'">'.$atts['date_time'].'</h4>':'';           
      $html .=  ($atts['title']!='')?'<h4 class="subheading">'.$atts['title'].'</h4>':'';
      $html .= ' </div>';
      if($atts['description']!='')
      {
        $html .='<div class="timeline-body">
                    <p class="text-muted">'.$atts['description'].'</p>
                 </div>';
      }
      $html .= '</div>';  
    $html .='</li>';
    return $html;
}
// END OUT TIMELINE

/* googlemap */
add_shortcode('helium_googlemap', 'helium_googlemap');
function helium_googlemap($atts, $content = null) {

    $atts = shortcode_atts(
    array(
    'defineid'      => 'map-canvas',
    'latitude'      => '40.805478',
    'longitude'     => '-73.96522499999998',
    'zoom'          => '12',
    'icon_marker'   => '',
    'marker_title'  => '',
    'city'          => '',
    'address'       => ''
    ), $atts);
    $thumbnail ='';
    if($atts['icon_marker']){
      $image_info = wp_get_attachment_image_src($atts['icon_marker'], 'full');
      if($image_info[0]){
        $thumbnail = $image_info[0];
      }else{
        $thumbnail = $atts['icon_marker'];
      }
    }
    $html ='<div class="google-map">
              <div class="map" id="'.$atts['defineid'].'" data-title="'.$atts['marker_title'].'" data-lat="'.trim($atts['latitude']).'" data-lon="'.trim($atts['longitude']).'" data-zoom="'.$atts['zoom'].'" data-icon="'.$thumbnail.'" data-city="'.$atts['city'].'" data-address="'.$atts['address'].'">
              </div>
          </div>';
    return $html;
}
/* /googlemap */
?>