<?php
function services($atts)
{
    extract(shortcode_atts(array(
        'text'               	=> '',
        'text2'               	=> '',
        'type'               	=> '',
        'icon'               	=> ''
    ), $atts));
    
    $result ='';
	if($type == 'style1')
    {
	$result .= '
	<div class="servicebox">
		<div class="icon">
			<i class="icon-'.esc_attr($icon).'"></i>
		</div>
		<div class="text tb">
			<div class="tb-cell">
				<h3 class="heading">'.esc_attr($text).'</h3>
			</div>
		</div>
	</div>';
	}
    elseif($type == 'style2')
    {
        $result .= '
		<div class="servicebox style-2 text-right">
			<div class="text">
				<h3 class="heading">'.esc_attr($text).'</h3>
				<p>'.esc_attr($text2).'</p>
			</div>
			<span style="width:200px; height:50px;"></span>
		</div>';
    }
	elseif($type == 'style3')
    {
        $result .= '
		<div class="servicebox style-2 text-left">
			<div class="text">
				<h3 class="heading">'.esc_attr($text).'</h3>
				<p>'.esc_attr($text2).'</p>
			</div>
			<span style="width:200px; height:50px;"></span>
		</div>';
    }
    return $section_services = force_balance_tags( $result );
}
add_shortcode( "rms-services", "services" );