<?php

add_shortcode('gem_fullwidth', 'thegem_fullwidth_shortcode');
add_shortcode('gem_custom_header', 'thegem_custom_header_shortcode');
add_shortcode('gem_divider', 'thegem_divider_shortcode');
add_shortcode('gem_image', 'thegem_image_shortcode');
add_shortcode('gem_icon_with_title', 'thegem_icon_with_title_shortcode');
add_shortcode('gem_textbox', 'thegem_textbox_shortcode');
add_shortcode('gem_youtube', 'thegem_youtube_shortcode');
add_shortcode('gem_vimeo', 'thegem_vimeo_shortcode');
add_shortcode('gem_dropcap', 'thegem_dropcap_shortcode');
add_shortcode('gem_quote', 'thegem_quote_shortcode');
add_shortcode('gem_video', 'thegem_video_shortcode');
add_shortcode('gem_list', 'thegem_list_shortcode');
add_shortcode('gem_table', 'thegem_table_shortcode');
add_shortcode('gem_icon_with_text', 'thegem_icon_with_text_shortcode');
add_shortcode('gem_alert_box', 'thegem_alert_box_shortcode');
add_shortcode('gem_clients', 'thegem_clients_shortcode');
add_shortcode('gem_diagram', 'thegem_diagram_shortcode');
add_shortcode('gem_skill', 'thegem_skill_shortcode');
add_shortcode('gem_gallery', 'thegem_gallery_shortcode');
add_shortcode('gem_news', 'thegem_news_shortcode');
add_shortcode('gem_quickfinder', 'thegem_quickfinder_shortcode');
add_shortcode('gem_team', 'thegem_team_shortcode');
add_shortcode('gem_pricing_table', 'thegem_pricing_table_shortcode');
add_shortcode('gem_pricing_column', 'thegem_pricing_column_shortcode');
add_shortcode('gem_pricing_price', 'thegem_pricing_price_shortcode');
add_shortcode('gem_pricing_row', 'thegem_pricing_row_shortcode');
add_shortcode('gem_pricing_row_title', 'thegem_pricing_row_title_shortcode');
add_shortcode('gem_pricing_footer', 'thegem_pricing_footer_shortcode');
add_shortcode('gem_icon', 'thegem_icon_shortcode');
add_shortcode('gem_button', 'thegem_button_shortcode');
add_shortcode('gem_testimonials', 'thegem_testimonials_shortcode');
add_shortcode('gem_map_with_text', 'thegem_map_with_text_shortcode');
add_shortcode('gem_counter', 'thegem_counter_shortcode');
add_shortcode('gem_counter_box', 'thegem_counter_box_shortcode');
add_shortcode('gem_portfolio_slider', 'thegem_portfolio_slider_shortcode');
add_shortcode('gem_portfolio', 'thegem_portfolio_shortcode');
add_shortcode('gem_current_date', 'thegem_current_date_shortcode');
add_shortcode('gem_link', 'thegem_link');
add_shortcode('gem_project_info', 'thegem_project_info_shortcode');
add_shortcode('gem_socials', 'thegem_socials_shortcode');
add_shortcode('gem_search_form', 'thegem_search_form_shortcode');
add_shortcode('gem_countdown', 'thegem_countdown_shortcode');
add_shortcode('gem_product_grid', 'thegem_product_grid_shortcode');
add_shortcode('gem_product_grid_extended', 'thegem_product_grid_extended_shortcode');
add_shortcode('gem_product_compact_grid', 'thegem_product_compact_grid_shortcode');
add_shortcode('gem_product_grid_carousel', 'thegem_product_grid_carousel_shortcode');
add_shortcode('gem_product_grid_categories', 'thegem_product_grid_categories_shortcode');
add_shortcode('gem_product_slider', 'thegem_product_slider_shortcode');
add_shortcode('gem_news_grid', 'thegem_news_grid_shortcode');
add_shortcode('gem_featured_posts_slider', 'thegem_featured_posts_slider_shortcode');
add_shortcode('gem_heading', 'thegem_heading_shortcode');
add_shortcode('gem_template', 'thegem_template_shortcode');
add_shortcode('gem_infotext', 'thegem_infotext_shortcode');
add_shortcode('gem_custom_menu', 'thegem_custom_menu_shortcode');
add_shortcode('gem_wc_hook', 'thegem_wc_hook_shortcode');
add_shortcode('gem_social_sharing', 'thegem_social_sharing_shortcode');
add_shortcode('gem_custom_fields', 'thegem_cf_shortcode');

add_action( 'init', 'thegem_theme_remove_shortcodes',20 );
function thegem_theme_remove_shortcodes() {
	if(!function_exists('thegem_scripts')) {
		global $shortcode_tags;
		$shortcodes = $shortcode_tags;
		ksort($shortcodes);
		foreach ($shortcodes as $shortcode => $value) {
			if(strpos($shortcode, 'gem_') === 0 || strpos($shortcode, 'thegem_') === 0) {
				remove_shortcode($shortcode);
			}
		}
	}
}

function thegem_cf_get_edit_template_type()
{
	$type = get_post_type(get_the_ID());
	if (!empty($_REQUEST['post_type'])){
		$type = $_REQUEST['post_type'];
	} elseif(empty($_REQUEST['post_type']) && !empty($_REQUEST['post_id'])){
		$type = get_post_type($_REQUEST['post_id']);
	}

	if (thegem_is_template_post('single-post') ||
		!empty($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'thegem_templates' && !empty($_REQUEST['p']) && thegem_get_template_type($_REQUEST['p']) == 'single-post') {
		$type = 'post';
	}

	if (thegem_is_template_post('portfolio') ||
		!empty($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'thegem_templates' && !empty($_REQUEST['p']) && thegem_get_template_type($_REQUEST['p']) == 'portfolio') {
		$type = 'thegem_pf_item';
	}

	if (thegem_is_template_post('single-product') ||
		!empty($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'thegem_templates' && !empty($_REQUEST['p']) && thegem_get_template_type($_REQUEST['p']) == 'single-product') {
		$type = 'product';
	}

	if($type === 'blocks') {
		if(get_post_meta(get_the_ID(), 'thegem_is_portfolio', true)) {
			$type = 'thegem_pf_item';
		}
		if(get_post_meta(get_the_ID(), 'thegem_is_single_post', true)) {
			$type = 'post';
		}
		if(get_post_meta(get_the_ID(), 'thegem_is_single_product', true)) {
			$type = 'product';
		}
	}

	return $type;
}

function thegem_cf_get_edit_template_post_id()
{
	$post_id = get_the_ID();

	switch (thegem_cf_get_edit_template_type()) {
		case 'post':
			$single_post = thegem_templates_init_post();
			$post_id = !empty($single_post->ID) ? $single_post->ID : $post_id;
			break;
		case 'thegem_pf_item':
			$portfolio = thegem_templates_init_portfolio();
			$post_id = !empty($portfolio->ID) ? $portfolio->ID : $post_id;
			break;
		case 'product':
			$product = thegem_templates_init_product();
			$post_id = (!empty($product) && !empty($product->get_id())) ? $product->get_id() : $post_id;
			break;
	}

	return $post_id;
}

function thegem_cf_get_post_types()
{
	$post_types = array();
	foreach (get_post_types(array('public' => true), 'object') as $slug => $post_type) {
		if (!in_array($slug, array('thegem_news', 'thegem_footer', 'thegem_title', 'thegem_templates', 'attachment'), true)) {
			$post_types[$post_type->label] = $slug;
		}
	}

	return $post_types;
}

function thegem_cf_get_fields_by_post_type($pt, $param = 'list')
{
	$post_type = $pt;
	switch ($pt) {
		case 'page':
			$post_type = 'default';
			break;
		case 'thegem_pf_item':
			$post_type = 'portfolio';
			break;
	}

	if (!function_exists('thegem_theme_options_get_page_settings')) return;

	$pt_data = thegem_theme_options_get_page_settings($post_type);
	$custom_fields = !empty($pt_data['custom_fields']) ? $pt_data['custom_fields'] : null;
	$custom_fields_data = !empty($pt_data['custom_fields_data']) ? json_decode($pt_data['custom_fields_data'], true) : null;

	$data = array();
	if (!empty($custom_fields_data)) {
		foreach ($custom_fields_data as $field) {
			switch ($param) {
				case 'list':
					$data[$field['title']] = $field['key'];
					break;
				case 'link':
					if($field['type'] == 'link') {
						$data[$field['title']] = $field['key'];
					}
					break;
			}
		}
	}

	return $data;
}

function thegem_cf_get_project_details($param = 'list')
{
	if (thegem_cf_get_edit_template_type() !== 'thegem_pf_item' || empty(thegem_get_option('portfolio_project_details_data'))) return;

	$meta_data = json_decode(thegem_get_option('portfolio_project_details_data'), true);

	$project_details = array();
	if (!empty($meta_data)) {
		foreach ($meta_data as $meta) {
			$key = __($meta['title'], 'thegem');
			$value = '_thegem_cf_'.str_replace('-', '_', sanitize_title($meta['title']));

			switch ($param) {
				case 'list':
					$project_details[$key] = $value;
					break;
				case 'link':
					if($meta['type'] == 'link') {
						$project_details[$key] = $value;
					}
					break;
			}
		}
	}

	return $project_details;
}

function thegem_cf_get_acf_plugin_groups($post_type = 'any')
{
	if (!thegem_is_plugin_active('advanced-custom-fields/acf.php') && !thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) return array();

	$groups = array();
	if ($post_type == 'any') {
		$field_groups = acf_get_field_groups();
	} else {
		$field_groups = acf_get_field_groups(array('post_type' => $post_type));
	}

	foreach ($field_groups as $group) {
		if (!empty($group)) {
			$groups[$group['title'] . ' (ACF)'] = $group['key'];
		}
	}

	return $groups;
}

function thegem_cf_get_acf_plugin_groups_keys()
{
	if (!thegem_is_plugin_active('advanced-custom-fields/acf.php') && !thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) return array();

	$groups = array();
	foreach (acf_get_field_groups() as $group) {
		if (!empty($group)) {
			$groups[] = $group['key'];
		}
	}

	return $groups;
}

function thegem_cf_get_acf_plugin_fields_by_group($gr, $param = 'list')
{
	if (!thegem_is_plugin_active('advanced-custom-fields/acf.php') && !thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) return array();

	$fields = array();
	foreach (acf_get_fields($gr) as $field) {
		switch ($param) {
			case 'list':
				if (!empty($field)) {
					$fields[$field['label']] = $field['name'];
				}
				break;
			case 'link':
				if (!empty($field) && ($field['type'] == 'link' || $field['type'] == 'url')) {
					$fields[$field['label']] = $field['name'];
				}
				break;
		}
	}

	return $fields;
}

function thegem_cf_trim_plugins_group_slug($group) {
	preg_match('/_(.*?)_/', $group, $match);

	return !empty($match) ? str_replace($match[0], '', $group) : $group;
}

function thegem_cf_check_plugins_group($group) {
	preg_match('/_(.*?)_/', $group, $match);

	return !empty($match) ? $match[1] : $group;
}

function thegem_cf_get_toolset_plugin_groups() {
	if (!thegem_is_plugin_active('types/wpcf.php')) return array();

	$groups = array();
	if (!empty(wpcf_admin_fields_get_groups())) {
		foreach (wpcf_admin_fields_get_groups() as $group) {
			if (!empty($group)) {
				$groups[$group['name'] . ' (Toolset)'] = '_toolset_' . $group['slug'];
			}
		}
	}

	return $groups;
}

function thegem_cf_get_toolset_plugin_fields_by_group($gr, $output = 'list') {
	if (!thegem_is_plugin_active('types/wpcf.php')) return array();

	$trim_gr = thegem_cf_trim_plugins_group_slug($gr);

	$toolset_groups = wpcf_admin_fields_get_groups();
	$toolset_fields = [];
	if (!empty($toolset_groups)) {
		foreach($toolset_groups as $group){
			if($group['slug'] == $trim_gr){
				$toolset_fields[] = wpcf_admin_fields_get_fields_by_group($group['id']);
			}
		}
	}

	$fields = array();
	$i = 0;
	if (!empty($toolset_fields)) {
		foreach ($toolset_fields as $field) {
			if (!empty($field)) {
				foreach ($field as $fd) {
					switch ($output) {
						case 'list':
							$fields[$fd['name']] = $fd['meta_key'];
							break;
						case 'link':
							if (!empty($fd) && ($fd['type'] == 'link' || $fd['type'] == 'url')) {
								$fields[$fd['name']] = $fd['meta_key'];
							}
							break;
						case 'type':
							$i++;
							if (!isset($fields[$fd['type']])) {
								$fields[$fd['type']] = $fd['meta_key'];
							} else {
								$fields[$fd['type'] . '_' . $i] = $fd['meta_key'];
							}

							break;
					}
				}
			}
		}
	}

	return $fields;
}

function thegem_cf_get_fields_is_type_link($fields_type)
{
	$data = [];

	switch ($fields_type) {
		case 'custom_fields':
			$post_types = thegem_cf_get_post_types();
			foreach ($post_types as $pt) {
				$fields = thegem_cf_get_fields_by_post_type($pt, 'link');
				if (!empty($fields)) {
					foreach ($fields as $key => $value) {
						$data[$key] = $value;
					}
				}
			}
			break;
		case 'project_details':
			$data = thegem_cf_get_project_details('link');
			break;
		default:
			$fields_acf = thegem_cf_get_acf_plugin_fields_by_group($fields_type, 'link');
			$fields_toolset = thegem_cf_get_toolset_plugin_fields_by_group($fields_type, 'link');
			$fields = array_merge($fields_acf, $fields_toolset);
			if (!empty($fields)) {
				foreach ($fields as $key => $value) {
					$data[$key] = $value;
				}
			}
			break;
	}

	return $data;
}

function thegem_cf_set_repeater_controls($type, $attr = null)
{
	$result = array();
	$show_controls = true;
	$link_sources = array_merge(
		array(
			__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
			__('Project Details', 'thegem') => 'project_details',
		),
		thegem_cf_get_acf_plugin_groups(),
		thegem_cf_get_toolset_plugin_groups()
	);

	if ($type == 'post_type') {
		$options = thegem_cf_get_fields_by_post_type($attr);

		if (!empty($options)) {
			$result[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Custom Field', 'thegem'),
				'param_name' => 'select_field',
				'value' => $options,
			);
		} else {
			$show_controls = false;
		}
	}

	if ($type == 'manual_input') {
		$result[] = array(
			'type' => 'textfield',
			'heading' => __('Specify Field`s Name', 'thegem'),
			'param_name' => 'select_field',
			'description' => __('Use field`s name / meta key as set in custom fields settings', 'thegem'),
		);
	}

	if ($type == 'acf') {
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Select ACF Field', 'thegem'),
			'param_name' => 'select_field',
			'value' => thegem_cf_get_acf_plugin_fields_by_group($attr),
		);
	}

	if ($type == 'toolset') {
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Select Toolset Field', 'thegem'),
			'param_name' => 'select_field',
			'value' => thegem_cf_get_toolset_plugin_fields_by_group($attr),
		);
	}

	if ($show_controls) {
		if ($type == 'acf' || $type == 'toolset') {
			$result[] = array(
				'type' => 'dropdown',
				'heading' => __('Field Type', 'thegem'),
				'param_name' => 'field_type',
				'value' => array(
					__('Inherit', 'thegem') => 'inherit',
					__('Text', 'thegem') => 'text',
					__('Number', 'thegem') => 'number',
				),
				'std' => 'inherit',
			);
		} else {
			$result[] = array(
				'type' => 'dropdown',
				'heading' => __('Field Type', 'thegem'),
				'param_name' => 'field_type',
				'value' => array(
					__('Text', 'thegem') => 'text',
					__('Number', 'thegem') => 'number',
				),
				'std' => 'text',
			);
		}

		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Number Format', 'thegem'),
			'param_name' => 'field_format',
			'value' => array(
				__('WP Locale', 'thegem') => 'wp_locale',
				__('Disabled', 'thegem') => '',
			),
			'std' => 'wp_locale',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$result[] = array(
			'type' => 'textfield',
			'heading' => __('Prefix', 'thegem'),
			'param_name' => 'field_prefix',
			'value' => '',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$result[] = array(
			'type' => 'textfield',
			'heading' => __('Suffix', 'thegem'),
			'param_name' => 'field_suffix',
			'value' => '',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom', 'thegem') => 'custom',
			),
			'std' => 'default',
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Icon pack', 'thegem'),
			'param_name' => 'icon_pack',
			'value' => array_merge(array(
				__('Elegant', 'thegem') => 'elegant',
				__('Material Design', 'thegem') => 'material',
				__('FontAwesome', 'thegem') => 'fontawesome',
				__('Header Icons', 'thegem') => 'thegem-header',
				__('Additional', 'thegem') => 'thegemdemo'),
				thegem_userpack_to_dropdown()
			),
			'std' => 'thegem-header',
			'dependency' => array(
				'element' => 'icon',
				'value' => 'custom'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$result[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_elegant',
			'icon_pack' => 'elegant',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('elegant')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$result[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_material',
			'icon_pack' => 'material',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('material')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$result[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_fontawesome',
			'icon_pack' => 'fontawesome',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('fontawesome')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$result[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_thegemdemo',
			'icon_pack' => 'thegemdemo',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('thegemdemo')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$result[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_thegemheader',
			'icon_pack' => 'thegem-header',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('thegem-header')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		if (thegem_icon_userpack_enabled()) {
			$result[] = thegem_userpack_to_shortcode(array(
				'type' => 'thegem_icon',
				'heading' => __('Icon', 'thegem'),
				'param_name' => 'icon_userpack',
				'icon_pack' => 'userpack',
				'dependency' => array(
					'element' => 'icon_pack',
					'value' => array('userpack')
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
			));
		}
		$result[] = array(
			'type' => 'checkbox',
			'heading' => __('Label', 'thegem'),
			'param_name' => 'label',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '1',
			'edit_field_class' => 'vc_column vc_col-sm-12',
		);
		$result[] = array(
			'type' => 'textfield',
			'heading' => __('Label Text', 'thegem'),
			'param_name' => 'label_text',
			'value' => '',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'dependency' => array(
				'element' => 'label',
				'value' => '1'
			),
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Link Type', 'thegem'),
			'param_name' => 'link',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom Link', 'thegem') => 'custom',
				__('Dynamic', 'thegem') => 'dynamic',
			),
			'std' => '',
		);
		$result[] = array(
			'type' => 'vc_link',
			'heading' => __('URL (Link)', 'thegem'),
			'param_name' => 'link_custom',
			'dependency' => array(
				'element' => 'link',
				'value' => 'custom'
			),
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __('Dynamic Link Source', 'thegem'),
			'param_name' => 'link_dynamic',
			'value' => $link_sources,
			'std' => '',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);
		foreach($link_sources as $source) {
			if (!empty(thegem_cf_get_fields_is_type_link($source))) {
				$result[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Dynamic Link', 'thegem'),
					'param_name' => $source. '_link_select',
					'value' => thegem_cf_get_fields_is_type_link($source),
					'std' => '',
					'dependency' => array(
						'element' => 'link_dynamic',
						'value' => $source,
					),
				);
			}
		}
		$result[] = array(
			'type' => 'checkbox',
			'heading' => __('Open link in a new tab', 'thegem'),
			'param_name' => 'link_target',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);
		$result[] = array(
			'type' => 'checkbox',
			'heading' => __('Add nofollow option to link', 'thegem'),
			'param_name' => 'link_nofollow',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);
	}

	return $result;
}

function thegem_cf_set_layout_params()
{
	$result = array();
	$group = __('General', 'thegem');

	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Source', 'thegem'),
		'param_name' => 'source',
		'value' => array_merge(
			array(
				__('Custom Fields (TheGem)', 'thegem') => 'thegem_cf',
				__('Manual Input', 'thegem') => 'manual_input',
			),
			thegem_cf_get_acf_plugin_groups(),
			thegem_cf_get_toolset_plugin_groups()
		),
		'std' => 'thegem_cf',
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'description' => __('Choose between TheGem`s custom fields, ACF/Toolset field group or manual input of custom field name.', 'thegem'),
		'group' => $group
	);

	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Post Type', 'thegem'),
		'param_name' => 'post_type',
		'value' => thegem_cf_get_post_types(),
		'std' => thegem_cf_get_edit_template_type(),
		'dependency' => array(
			'element' => 'source',
			'value' => 'thegem_cf'
		),
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);

	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Skin', 'thegem'),
		'param_name' => 'skin',
		'value' => array_merge(array(
				__('Modern', 'thegem') => 'modern',
				__('Table', 'thegem') => 'table',
			)
		),
		'std' => 'modern',
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);

	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Layout', 'thegem'),
		'param_name' => 'layout',
		'value' => array_merge(array(
				__('Horizontal', 'thegem') => 'horizontal',
				__('Vertical', 'thegem') => 'vertical',
			)
		),
		'std' => 'horizontal',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('modern'),
		),
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);

	foreach (thegem_cf_get_post_types() as $pt) {
		$result[] = array(
			'type' => 'param_group',
			'heading' => __('Items', 'thegem'),
			'param_name' => $pt . '_info_content',
			'params' => thegem_cf_set_repeater_controls('post_type', $pt),
			'dependency' => array(
				'element' => 'post_type',
				'value' => $pt
			),
			'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem'),
			'group' => $group
		);
	}

	$result[] = array(
		'type' => 'param_group',
		'heading' => __('Items', 'thegem'),
		'param_name' => 'info_content',
		'params' => thegem_cf_set_repeater_controls('manual_input'),
		'dependency' => array(
			'element' => 'source',
			'value' => 'manual_input'
		),
		'group' => $group
	);

	if ((thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) && !empty(thegem_cf_get_acf_plugin_groups())) {
		foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
			$result[] = array(
				'type' => 'param_group',
				'heading' => __('Items', 'thegem'),
				'param_name' => $gr . '_info_content',
				'params' => thegem_cf_set_repeater_controls('acf', $gr),
				'dependency' => array(
					'element' => 'source',
					'value' => $gr
				),
				'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
				'group' => $group
			);
		}
	}

	// Toolset Group Fields Repeater
	if ((thegem_is_plugin_active('types/wpcf.php')) && !empty(thegem_cf_get_toolset_plugin_groups())) {
		foreach (thegem_cf_get_toolset_plugin_groups() as $gr) {
			$result[] = array(
				'type' => 'param_group',
				'heading' => __('Items', 'thegem'),
				'param_name' => $gr . '_info_content',
				'params' => thegem_cf_set_repeater_controls('toolset', $gr),
				'dependency' => array(
					'element' => 'source',
					'value' => $gr
				),
				'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=types-custom-fields" target="_blank">Toolset -> Custom Fields</a> to manage your custom fields.', 'thegem'),
				'group' => $group
			);
		}
	}

	return $result;
}

function thegem_cf_set_style_params()
{
	$result = array();
	$group = __('Style', 'thegem');
	$resolutions = array('desktop', 'tablet', 'mobile');
	$positions = array('top', 'right', 'bottom', 'left');

	// List
	$result[] = array(
		'type' => 'thegem_delimeter_heading',
		'heading' => __('List', 'thegem'),
		'param_name' => 'layout_delim_head',
		'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
		'group' => $group
	);
	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Alignment', 'thegem'),
		'param_name' => 'list_alignment',
		'value' => array_merge(array(
				__('Left', 'thegem') => 'left',
				__('Center', 'thegem') => 'center',
				__('Right', 'thegem') => 'right',
			)
		),
		'std' => 'left',
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);
	$result[] = array(
		'type' => 'checkbox',
		'heading' => __('Divider', 'thegem'),
		'param_name' => 'list_divider',
		'value' => array(__('Yes', 'thegem') => '1'),
		'std' => '1',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('table')
		),
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'group' => $group
	);
	$result[] = array(
		'type' => 'colorpicker',
		'heading' => __('Divider Color', 'thegem'),
		'param_name' => 'list_divider_color',
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'dependency' => array(
			'element' => 'list_divider',
			'value' => '1'
		),
		'group' => $group
	);
	$result[] = array(
		'type' => 'thegem_delimeter_heading_two_level',
		'heading' => __('Space Between', 'thegem'),
		'param_name' => 'delimiter_heading_two_level_panel',
		'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
		'group' => $group
	);
	foreach ($resolutions as $res) {
		$result[] = array(
			'type' => 'textfield',
			'heading' => __('' . ucfirst($res) . '', 'thegem'),
			'param_name' => 'list_spacing_' . $res,
			'value' => '',
			'dependency' => array(
				'element' => 'skin',
				'value' => array('modern')
			),
			'edit_field_class' => 'vc_column vc_col-sm-4',
			'group' => $group
		);
	}
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Vertical Spacing', 'thegem'),
		'param_name' => 'table_vertical_spacing',
		'value' => '',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('table')
		),
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Horizontal Spacing', 'thegem'),
		'param_name' => 'table_horizontal_spacing',
		'value' => '',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('table')
		),
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'group' => $group
	);

	// Icon
	$result[] = array(
		'type' => 'thegem_delimeter_heading',
		'heading' => __('Icon', 'thegem'),
		'param_name' => 'layout_delim_head',
		'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Size', 'thegem'),
		'param_name' => 'icon_size',
		'value' => '',
		'edit_field_class' => 'vc_column vc_col-sm-4',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Horizontal Spacing', 'thegem'),
		'param_name' => 'icon_spacing',
		'value' => '',
		'edit_field_class' => 'vc_column vc_col-sm-4',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Vertical Spacing', 'thegem'),
		'param_name' => 'icon_spacing_vertical',
		'value' => '',
		'edit_field_class' => 'vc_column vc_col-sm-4',
		'group' => $group
	);
	$result[] = array(
		'type' => 'colorpicker',
		'heading' => __('Color', 'thegem'),
		'param_name' => 'icon_color',
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);

	// Text
	$texts = ['label', 'value'];
	$result[] = array(
		'type' => 'thegem_delimeter_heading',
		'heading' => __('Text', 'thegem'),
		'param_name' => 'layout_delim_head',
		'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
		'group' => $group
	);
	$result[] = array(
		'type' => 'dropdown',
		'heading' => __('Layout', 'thegem'),
		'param_name' => 'text_layout',
		'value' => array(
			__('Inline', 'thegem') => 'inline',
			__('Vertical', 'thegem') => 'vertical',
		),
		'edit_field_class' => 'vc_column vc_col-sm-12',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Label Spacing', 'thegem'),
		'param_name' => 'label_text_spacing',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('modern')
		),
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'group' => $group
	);
	$result[] = array(
		'type' => 'textfield',
		'heading' => __('Value Spacing', 'thegem'),
		'param_name' => 'value_text_spacing',
		'dependency' => array(
			'element' => 'skin',
			'value' => array('modern')
		),
		'edit_field_class' => 'vc_column vc_col-sm-6',
		'group' => $group
	);

	foreach ($texts as $txt) {
		$result[] = array(
			'type' => 'thegem_delimeter_heading_two_level',
			'heading' => __(ucfirst($txt), 'thegem'),
			'param_name' => 'padding_top_sub_delim_head',
			'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
			'group' => $group
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __(ucfirst($txt) . ' Text Style', 'thegem'),
			'param_name' => $txt . '_text_style',
			'value' => array(
				__('Default', 'thegem') => '',
				__('Title H1', 'thegem') => 'title-h1',
				__('Title H2', 'thegem') => 'title-h2',
				__('Title H3', 'thegem') => 'title-h3',
				__('Title H4', 'thegem') => 'title-h4',
				__('Title H5', 'thegem') => 'title-h5',
				__('Title H6', 'thegem') => 'title-h6',
				__('Title xLarge', 'thegem') => 'title-xlarge',
				__('Styled Subtitle', 'thegem') => 'styled-subtitle',
				__('Main Menu', 'thegem') => 'title-main-menu',
				__('Body', 'thegem') => 'text-body',
				__('Tiny Body', 'thegem') => 'text-body-tiny',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => $group
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __(ucfirst($txt) . ' Font weight', 'thegem'),
			'param_name' => $txt . '_text_font_weight',
			'value' => array(
				__('Default', 'thegem') => '',
				__('Thin', 'thegem') => 'light',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => $group
		);
		$result[] = array(
			'type' => 'textfield',
			'heading' => __(ucfirst($txt) . ' Letter Spacing', 'thegem'),
			'param_name' => $txt . '_text_letter_spacing',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => $group
		);
		$result[] = array(
			'type' => 'dropdown',
			'heading' => __(ucfirst($txt) . ' Text Transform', 'thegem'),
			'param_name' => $txt . '_text_transform',
			'value' => array(
				__('Default', 'thegem') => '',
				__('None', 'thegem') => 'none',
				__('Capitalize', 'thegem') => 'capitalize',
				__('Lowercase', 'thegem') => 'lowercase',
				__('Uppercase', 'thegem') => 'uppercase',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => $group
		);
		$result[] = array(
			'type' => 'colorpicker',
			'heading' => __(ucfirst($txt) . ' Text Color', 'thegem'),
			'param_name' => $txt . '_text_color',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => $group
		);
		if ($txt === 'label') {
			$result[] = array(
				'type' => 'checkbox',
				'heading' => __('Colon', 'thegem'),
				'param_name' => $txt . '_colon',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => $group
			);
		}
		if ($txt === 'value') {
			$result[] = array(
				'type' => 'colorpicker',
				'heading' => __(ucfirst($txt) . ' Text Color on Hover', 'thegem'),
				'param_name' => $txt . '_text_color_hover',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => $group
			);
		}
	}

	return $result;
}

function thegem_cf_shortcode_settings()
{
	return array(
		'name' => __('Custom Fields', 'thegem'),
		'base' => 'gem_custom_fields',
		'icon' => 'thegem-icon-wpb-ui-custom-fields',
		'category' => __('TheGem', 'thegem'),
		'description' => __('Custom Fields', 'thegem'),
		'params' => array_merge(
			/* General - Layout */
			thegem_cf_set_layout_params(),

			/* General - Styles */
			thegem_cf_set_style_params(),

			/* Extra Options */
			thegem_set_elements_extra_options(),

			/* Responsive Options */
			thegem_set_elements_responsive_options()
		)
	);
}

function thegem_cf_shortcode($atts, $content)
{
	$params = shortcode_atts(array_merge(array(
		'source' => 'thegem_cf',
		'post_type' => thegem_cf_get_edit_template_type(),
		'skin' => 'modern',
		'layout' => 'horizontal',
		'info_content' => '',
		'list_alignment' => 'left',
		'list_divider' => '1',
		'list_divider_color' => '',
		'list_spacing_desktop' => '',
		'list_spacing_tablet' => '',
		'list_spacing_mobile' => '',
		'table_vertical_spacing' => '',
		'table_horizontal_spacing' => '',
		'icon_color' => '',
		'icon_size' => '',
		'icon_spacing' => '',
		'icon_spacing_vertical' => '',
		'text_layout' => 'inline',
		'label_text_spacing' => '',
		'label_text_style' => '',
		'label_text_font_weight' => '',
		'label_text_font_style' => '',
		'label_text_letter_spacing' => '',
		'label_text_transform' => '',
		'label_text_color' => '',
		'label_colon' => '1',
		'value_text_spacing' => '',
		'value_text_style' => '',
		'value_text_font_weight' => '',
		'value_text_font_style' => '',
		'value_text_letter_spacing' => '',
		'value_text_transform' => '',
		'value_text_color' => '',
		'value_text_color_hover' => '',
	),
		thegem_templates_extra_options_extract(),
		thegem_templates_responsive_options_extract()
	), $atts, 'gem_custom_fields');

	$uniqid = uniqid('thegem-custom-') . rand(1, 9999);
	$post_id = thegem_cf_get_edit_template_post_id();

	if (!empty($atts)) {
		$params = array_merge($params, $atts);
	}

	$info_content = $meta_data = $meta_types = array();
	if (!empty($params['source']) && $params['source'] == 'thegem_cf') {
		$post_type = $params['post_type'];
		$info_content = !empty($params[$post_type . '_info_content']) ? vc_param_group_parse_atts($params[$post_type . '_info_content']) : '';
		$meta_data = array_flip(thegem_cf_get_fields_by_post_type($post_type));
	}

	if (!empty($params['source']) && $params['source'] == 'manual_input') {
		$info_content = vc_param_group_parse_atts($params['info_content']);
	}

	$plugin_type = thegem_cf_check_plugins_group($params['source']);

	if ((thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) && !empty($params['source']) && $plugin_type != 'toolset') {
		$source = $params['source'];
		$info_content = !empty($params[$source . '_info_content']) ? vc_param_group_parse_atts($params[$source . '_info_content']) : '';
		$meta_data = array_flip(thegem_cf_get_acf_plugin_fields_by_group($source));
	}

	if (thegem_is_plugin_active('types/wpcf.php') && !empty($params['source']) && $plugin_type == 'toolset') {
		$source = $params['source'];
		$info_content = !empty($params[$source . '_info_content']) ? vc_param_group_parse_atts($params[$source . '_info_content']) : '';
		$meta_data = array_flip(thegem_cf_get_toolset_plugin_fields_by_group($source));
		$meta_types = array_flip(thegem_cf_get_toolset_plugin_fields_by_group($source, 'type'));
	}

	$skin = 'custom-fields--' . $params['skin'];
	$layout = 'custom-fields--' . $params['layout'];
	$alignment = 'custom-fields--' . $params['list_alignment'];
	$divider = !empty($params['list_divider']) ? 'custom-fields--divider-show' : 'custom-fields--divider-hide';
	$colon = !empty($params['label_colon']) ? 'custom-fields--colon-show' : 'custom-fields--colon-hide';
	$text_layout = 'custom-fields--text-' . $params['text_layout'];
	$params['element_class'] = implode(' ', array(
		$skin,
		$layout,
		$alignment,
		$divider,
		$colon,
		$text_layout,
		$params['element_class'],
		thegem_templates_responsive_options_output($params)
	));
	$label_text_styled = implode(' ', array($params['label_text_style'], $params['label_text_font_weight']));
	$value_text_styled = implode(' ', array($params['value_text_style'], $params['value_text_font_weight']));

	ob_start();
	?>

	<div <?php if (!empty($params['element_id'])): ?>id="<?= esc_attr($params['element_id']); ?>"<?php endif; ?> class="thegem-te-custom-fields <?= esc_attr($params['element_class']); ?> <?= esc_attr($uniqid); ?>">
		<?php if (!empty($info_content)) : ?>
			<div class="custom-fields">
				<?php foreach ($info_content as $item) {
					$meta_output = $label_output = $value_output = '';
					$meta_value = !empty($item['select_field']) ? get_post_meta($post_id, $item['select_field'], true) : '';
					$meta_label = (!empty($meta_data) && !empty($item['select_field'])) ? $meta_data[$item['select_field']] : '';

					if (!empty($meta_value)) {
						if (!empty($item['icon']) && $item['icon'] == 'custom' && isset($item['icon_pack']) && !empty($item['icon_' . str_replace("-", "", $item['icon_pack'])])) {
							wp_enqueue_style('icons-' . $item['icon_pack']);
							$label_output .= '<div class="icon">' . thegem_build_icon($item['icon_pack'], $item['icon_' . str_replace("-", "", $item['icon_pack'])]) . '</div>';
						}

						if (!empty($item['label'])) {
							$label_text = !empty($item['label_text']) ? $item['label_text'] : $meta_label;
							$label_output .= '<div class="label-before">' . esc_html($label_text) . '<span class="colon">:</span></div>';
						}
						$label_output = '<div class="item-label ' . $label_text_styled . '">' . $label_output . '</div>';

						if (!empty($item['field_type']) && !empty($item['select_field'])){
							// ACF / Toolset inherit type fields
							if ($item['field_type'] == 'inherit'){

								if($plugin_type != 'toolset') {
									$field_type = get_field_object($item['select_field'])['type'];
								} else {
									$get_type = isset($meta_types[$item['select_field']]) ? $meta_types[$item['select_field']] : '';
									$field_type = !empty(strstr($get_type, '_', true)) ? strstr($get_type, '_', true) : $get_type;
								}

								switch ($field_type) {
									case 'image':
										$id = attachment_url_to_postid( $meta_value );
										if (!empty($id)) {
											$image = wp_get_attachment_image($id, 'full', false, []);
										} else {
											$image = wp_get_attachment_image($meta_value, 'full', false, []);
										}

										$value_output = !empty($image) ? '<div class="meta">' . $image . '</div>' : '';
										break;
									case 'file':
										$file = wp_get_attachment_url($meta_value);
										$value_output = !empty($file) ? '<div class="meta">' . $file . '</div>' : '';
										break;
									case 'oembed':
										$width = get_field_object($item['select_field'])['width'];
										$styles = !empty($width) ? 'style="width: ' . $width . 'px; max-width: 100%; display: table-cell;"' : '';

										ob_start();
										echo get_field_object($item['select_field'])['value'];
										$value_output = '<div class="meta" '.$styles.'>' . ob_get_clean() . '</div>';
										break;
									case 'embed' :
										global $wp_embed;

										ob_start();
										echo $wp_embed->run_shortcode('[embed]' . $meta_value . '[/embed]');
										$value_output = '<div class="meta">' . ob_get_clean() . '</div>';
										break;
									case 'video' :
										ob_start();
										echo wp_video_shortcode( ['src' => $meta_value] );
										$value_output = '<div class="meta">' . ob_get_clean() . '</div>';
										break;
									default:
										$value_output = !is_array($meta_value) ? '<div class="meta">' . $meta_value . '</div>' : '';
								}
							} elseif ($item['field_type'] == 'number') {
								$meta_value = floatval($meta_value);
								$decimal = explode('.', $meta_value);
								$decimal = isset($decimal[1]) ? strlen(($decimal[1])) : 0;
								$decimal = $decimal <= 3 ? $decimal : 3;

								if (!empty($item['field_format']) && $item['field_format'] == 'wp_locale') {
									$meta_value = number_format_i18n($meta_value, $decimal);
								}

								if (!empty($item['field_prefix'])) {
									$meta_value = $item['field_prefix'] . '' . $meta_value;
								}

								if (!empty($item['field_suffix'])) {
									$meta_value = $meta_value . '' . $item['field_suffix'];
								}

								$value_output = '<div class="meta">' . $meta_value . '</div>';
							} else {
								$value_output = !is_array($meta_value) ? '<div class="meta">' . $meta_value . '</div>' : '';
							}
						}

						if (!empty($item['link'])) {
							if ($item['link'] == 'custom') {
								$custom_link = !empty($item['link_custom']) ? vc_build_link($item['link_custom']) : null;

								if (!empty($custom_link['url'])) {
									$value_output = '<a href="' . $custom_link['url'] . '" class="meta-link" target="' . $custom_link['target'] . '" title="' . $custom_link['title'] . '" rel="' . $custom_link['rel'] . '">' . $value_output . '</a>';
								}
							} else {
								$dynamic_link = [
									'target' => !empty($item['link_target']) ? '_blank' : '_self',
									'rel' => !empty($item['link_nofollow']) ? 'nofollow' : '',
								];

								switch ($item['link_dynamic']) {
									case 'custom_fields':
										if (!empty($item['custom_fields_link_select'])) {
											$dynamic_link['url'] = get_post_meta($post_id, $item['custom_fields_link_select'], true);
										}

										break;
									case 'project_details':
										if (!empty($item['project_details_link_select'])) {
											$dynamic_link['url'] = get_post_meta($post_id, $item['project_details_link_select'], true);
										}

										break;
									default:
										if (!empty($item[$item['link_dynamic'].'_link_select'])) {
											$acf_link = get_post_meta($post_id, $item[$item['link_dynamic'].'_link_select'], true);

											if(is_array($acf_link)){
												$dynamic_link = [
													'url' => !empty($acf_link['url']) ? $acf_link['url'] : null,
													'target' => !empty($acf_link['target']) ? $acf_link['target'] : $dynamic_link['target'],
													'rel' => !empty($acf_link['rel']) ? $acf_link['rel'] : $dynamic_link['rel'],
												];
											} else{
												$dynamic_link['url'] = $acf_link;
											}
										}

										break;
								}

								if (!empty($dynamic_link['url'])) {
									$value_output = '<a href="' . $dynamic_link['url'] . '" class="meta-link" target="' . $dynamic_link['target'] . '" rel="' . $dynamic_link['rel'] . '">' . $value_output . '</a>';
								}
							}
						}

						$value_output = '<div class="item-value ' . $value_text_styled . '">' . $value_output . '</div>';

						echo '<div class="custom-fields-item">' . $label_output . ' ' . $value_output . '</div>';
					}
				} ?>
			</div>
		<?php endif; ?>
	</div>

	<?php
	//Custom Styles
	$customize = '.thegem-te-custom-fields.' . $uniqid;
	$custom_css = '';
	$resolution = array('desktop', 'tablet', 'mobile');
	$unit = 'px';

	// List Style
	if (!empty($params['list_divider_color'])) {
		$custom_css .= $customize . ' .custom-fields-item:not(:last-child):after {background-color: ' . $params['list_divider_color'] . ';}';
	}
	foreach ($resolution as $res) {
		if (isset($params['list_spacing_' . $res]) && (!empty($params['list_spacing_' . $res]) || strcmp($params['list_spacing_' . $res], '0') === 0)) {
			$result = str_replace(' ', '', $params['list_spacing_' . $res]);
			if ($res == 'desktop') {
				if ($params['layout'] == 'horizontal') {
					$custom_css .= $customize . ' .custom-fields-item {margin-right:' . $result . $unit . '; padding-right:' . $result . $unit . ';}';
				} else {
					$custom_css .= $customize . ' .custom-fields-item {margin-top:' . $result . $unit . ';}';
				}
			} else {
				$width = ($res == 'tablet' ? 'max-width: 1023px' : 'max-width: 767px');
				if ($params['layout'] == 'horizontal') {
					$custom_css .= '@media screen and (' . $width . ') {' . $customize . ' .custom-fields-item {margin-right:' . $result . $unit . '; padding-right:' . $result . $unit . ';}}';
				} else {
					$custom_css .= '@media screen and (' . $width . ') {' . $customize . ' .custom-fields-item {margin-top:' . $result . $unit . ';}}';
				}
			}
		}
	}
	if (!empty($params['table_vertical_spacing']) || (isset($params['table_vertical_spacing']) && $params['table_vertical_spacing'] == '0')) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {padding-top: ' . $params['table_vertical_spacing'] . 'px; padding-bottom: ' . $params['table_vertical_spacing'] . 'px;}';
		$custom_css .= $customize . ' .custom-fields-item .item-value {padding-top: ' . $params['table_vertical_spacing'] . 'px; padding-bottom: ' . $params['table_vertical_spacing'] . 'px;}';
	}
	if (!empty($params['table_horizontal_spacing']) || (isset($params['table_horizontal_spacing']) && $params['table_vertical_spacing'] == '0')) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {padding-right: ' . $params['table_horizontal_spacing'] . 'px;}';
	}

	// Icon Style
	if (!empty($params['icon_size'])) {
		$custom_css .= $customize . ' .custom-fields-item .icon i {font-size: ' . $params['icon_size'] . 'px; line-height: ' . $params['icon_size'] . 'px;}';
	}
	if (!empty($params['icon_spacing'])) {
		$custom_css .= $customize . ' .custom-fields-item .icon {margin-right: ' . $params['icon_spacing'] . 'px;}';
	}
	if (!empty($params['icon_spacing_vertical'])) {
		$custom_css .= $customize . ' .custom-fields-item .icon {margin-top: ' . $params['icon_spacing_vertical'] . 'px;}';
	}
	if (!empty($params['icon_color'])) {
		$custom_css .= $customize . ' .custom-fields-item .icon {color: ' . $params['icon_color'] . ';}';
	}

	// Text Style
	if (!empty($params['label_text_spacing']) || (isset($params['label_text_spacing']) && $params['label_text_spacing'] == '0')) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {padding-right: ' . $params['label_text_spacing'] . 'px;}';
	}
	if (!empty($params['value_text_spacing']) || (isset($params['value_text_spacing']) && $params['value_text_spacing'] == '0')) {
		$custom_css .= $customize . ' .custom-fields-item .item-value {padding-left: ' . $params['value_text_spacing'] . 'px;}';
	}
	if (!empty($params['value_text_letter_spacing'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-value {letter-spacing: ' . $params['value_text_letter_spacing'] . 'px;}';
		$custom_css .= $customize . ' .custom-fields-item .label-after {letter-spacing: ' . $params['value_text_letter_spacing'] . 'px;}';
	}
	if (!empty($params['value_text_transform'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-value {text-transform: ' . $params['value_text_transform'] . ';}';
		$custom_css .= $customize . ' .custom-fields-item .label-after {text-transform: ' . $params['value_text_transform'] . ';}';
	}
	if (!empty($params['value_text_color'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-value {color: ' . $params['value_text_color'] . ';}';
		$custom_css .= $customize . ' .custom-fields-item a {color: ' . $params['value_text_color'] . ';}';
		$custom_css .= $customize . ' .custom-fields-item .label-after {color: ' . $params['value_text_color'] . ';}';
	}
	if (!empty($params['value_text_color_hover'])) {
		$custom_css .= $customize . ' .custom-fields-item a:hover {color: ' . $params['value_text_color_hover'] . ';}';
		$custom_css .= $customize . ' .custom-fields-item a:hover .icon {color: ' . $params['value_text_color_hover'] . ';}';
	}
	if (!empty($params['label_text_letter_spacing'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {letter-spacing: ' . $params['label_text_letter_spacing'] . 'px;}';
	}
	if (!empty($params['label_text_transform'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {text-transform: ' . $params['label_text_transform'] . ';}';
	}
	if (!empty($params['label_text_color'])) {
		$custom_css .= $customize . ' .custom-fields-item .item-label {color: ' . $params['label_text_color'] . ';}';
	}

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));

	// Print custom css
	$css_output = '';
	if (!empty($custom_css)) {
		$css_output = '<style>' . $custom_css . '</style>';
	}

	return $css_output . $return_html;
}

// Thegem CF Shorthand
add_shortcode('tg_meta', function ($atts) {
	extract(shortcode_atts(array(
		'key' => '',
	), $atts, 'tg_meta'));

	$post_id = thegem_cf_get_edit_template_post_id();
	$return_html = isset($key) && !empty($key) ? get_post_meta($post_id, $key, true) : '';

	return $return_html;
});

function thegem_social_sharing_shortcode($atts, $content) {

	$params = shortcode_atts(array_merge(array(
		'alignment' => 'left',
		'facebook' => '1',
		'twitter' => '1',
		'pinterest' => '1',
		'tumblr' => '1',
		'linkedin' => '1',
		'reddit' => '1',
		'telegram' => '1',
		'whatsapp' => '1',
		'viber' => '1',
		'xing' => '1',
		'icons_type' => 'simple',
		'icons_size' => 'tiny',
		'icons_size_custom' => '',
		'icons_spacing_horizontal' => '',
		'icons_spacing_vertical' => '',
		'icons_border_width' => '',
		'icons_border_radius' => '',
		'icons_width' => '',
		'icons_height' => '',
		'icons_color' => '',
		'icons_color_hover' => '',
		'icons_background_color' => '',
		'icons_background_color_hover' => '',
		'icons_border_color' => '',
		'icons_border_color_hover' => '',
	),
		thegem_templates_extra_options_extract(),
		thegem_templates_responsive_options_extract()
	), $atts, 'gem_social_sharing');

	$uniqid = uniqid('thegem-custom-').rand(1,9999);

	$alignment = 'socials-sharing--'.$params['alignment'];
	$icons_type = 'socials-sharing--'.$params['icons_type'];
	$icons_size = 'socials-sharing--'.$params['icons_size'];
	$params['element_class'] = implode(' ', array(
		$alignment, $icons_type, $icons_size,
		$params['element_class'],
        thegem_templates_responsive_options_output($params)
	));

	ob_start();
	?>

    <div <?php if (!empty($params['element_id'])): ?>id="<?= esc_attr($params['element_id']); ?>"<?php endif; ?> class="thegem-te-socials-sharing <?= esc_attr($params['element_class']); ?> <?= esc_attr($uniqid); ?>">
        <div class="socials-sharing">
            <ul>
	            <?php if ($params['facebook']): ?>
                <li><a class="socials-item facebook" target="_blank" href="<?= esc_url('https://www.facebook.com/sharer/sharer.php?u='.urlencode(get_permalink())); ?>" title="Facebook"><i class="socials-item-icon facebook"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['twitter']): ?>
                <li><a class="socials-item twitter" target="_blank" href="<?= esc_url('https://twitter.com/intent/tweet?text='.urlencode(get_the_title()).'&amp;url='.urlencode(get_permalink())); ?>" title="Twitter"><i class="socials-item-icon twitter"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['pinterest']): ?>
                <li><a class="socials-item pinterest" target="_blank" href="<?= esc_url('https://pinterest.com/pin/create/button/?url='.urlencode(get_permalink()).'&amp;description='.urlencode(get_the_title())); ?>" title="Pinterest"><i class="socials-item-icon pinterest"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['tumblr']): ?>
                <li><a class="socials-item tumblr" target="_blank" href="<?= esc_url('https://tumblr.com/widgets/share/tool?canonicalUrl='.urlencode(get_permalink())); ?>" title="Tumblr"><i class="socials-item-icon tumblr"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['linkedin']): ?>
                <li><a class="socials-item linkedin" target="_blank" href="<?= esc_url('https://www.linkedin.com/shareArticle?mini=true&url='.urlencode(get_permalink()).'&amp;title='.urlencode(get_the_title())); ?>&amp;summary=<?php echo urlencode(get_the_excerpt()); ?>" title="LinkedIn"><i class="socials-item-icon linkedin"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['reddit']): ?>
                <li><a class="socials-item reddit" target="_blank" href="<?= esc_url('https://www.reddit.com/submit?url='.urlencode(get_permalink()).'&amp;title='.urlencode(get_the_title())); ?>" title="Reddit"><i class="socials-item-icon reddit"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['telegram']): ?>
                <li><a class="socials-item telegram" target="_blank" href="<?= esc_url('https://t.me/share/url?url='.urlencode(get_permalink()).'&amp;text='.urlencode(get_the_title())); ?>" title="Telegram"><i class="socials-item-icon telegram"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['whatsapp']): ?>
                <li><a class="socials-item whatsapp" target="_blank" href="<?= esc_url('https://wa.me/?text='.urlencode(get_permalink())); ?>" title="WhatsApp"><i class="socials-item-icon whatsapp"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['viber']): ?>
                <li><a class="socials-item viber" target="_blank" href="<?= 'viber://forward/?text='.urlencode(get_permalink()); ?>" title="Viber"><i class="socials-item-icon viber"></i></a></li>
	            <?php endif; ?>

	            <?php if ($params['xing']): ?>
                <li><a class="socials-item xing" target="_blank" href="<?= esc_url('https://www.xing.com/spi/shares/new?url='.urlencode(get_permalink())); ?>" title="Xing"><i class="socials-item-icon xing"></i></a></li>
	            <?php endif; ?>
            </ul>
        </div>

    </div>

	<?php
	//Custom Styles
	$customize = '.thegem-te-socials-sharing.'.$uniqid;
	$custom_css = '';

	// Layout Styles
	if (!empty($params['icons_spacing_horizontal']) || $params['icons_spacing_horizontal'] == '0') {
		$custom_css .= $customize.' .socials-sharing ul {margin-left: -'.$params['icons_spacing_horizontal'].'px; margin-right: -'.$params['icons_spacing_horizontal'].'px;}';
		$custom_css .= $customize.' .socials-sharing ul li {padding-left: '.$params['icons_spacing_horizontal'].'px; padding-right: '.$params['icons_spacing_horizontal'].'px;}';
	}
	if (!empty($params['icons_spacing_vertical']) || $params['icons_spacing_vertical'] == '0') {
		$custom_css .= $customize.' .socials-sharing ul li {margin-top: '.$params['icons_spacing_vertical'].'px; margin-bottom: '.$params['icons_spacing_vertical'].'px;}';
	}
	if ($params['icons_size'] == 'custom' && !empty($params['icons_size_custom'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item-icon {font-size: ' . $params['icons_size_custom'] . 'px;}';
	}

	// Icons Style
	if (!empty($params['icons_width']) || $params['icons_width'] == '0') {
		$custom_css .= $customize.' .socials-sharing .socials-item {min-width: ' . $params['icons_width'] . 'px;}';
	}
	if (!empty($params['icons_height']) || $params['icons_height'] == '0') {
		$custom_css .= $customize.' .socials-sharing .socials-item {min-height: ' . $params['icons_height'] . 'px;}';
	}
	if (!empty($params['icons_border_width']) || $params['icons_border_width'] == '0') {
		$custom_css .= $customize.' .socials-sharing .socials-item {border-width: ' . $params['icons_border_width'] . 'px;}';
	}
	if (!empty($params['icons_border_radius']) || $params['icons_border_radius'] == '0') {
		$custom_css .= $customize.' .socials-sharing .socials-item {border-radius: ' . $params['icons_border_radius'] . 'px;}';
	}
	if (!empty($params['icons_color'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item {color: ' . $params['icons_color'] . ';}';
	}
	if (!empty($params['icons_color_hover'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item:hover {color: ' . $params['icons_color_hover'] . ';}';
	}
	if (!empty($params['icons_background_color'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item {background-color: ' . $params['icons_background_color'] . ';}';
	}
	if (!empty($params['icons_background_color_hover'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item:hover {background-color: ' . $params['icons_background_color_hover'] . ';}';
	}
	if (!empty($params['icons_border_color'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item {border-color: ' . $params['icons_border_color'] . ';}';
	}
	if (!empty($params['icons_border_color_hover'])) {
		$custom_css .= $customize.' .socials-sharing .socials-item:hover {border-color: ' . $params['icons_border_color_hover'] . ';}';
	}

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));

	// Print custom css
	$css_output = '';
	if (!empty($custom_css)) {
		$css_output = '<style>' . $custom_css . '</style>';
	}

	return $css_output . $return_html;
}

function thegem_project_info_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => '',
	), $atts, 'thegem_project_info'));

	$values = vc_param_group_parse_atts($atts['values']);
	$graph_lines_data = array();
	$post_id = thegem_cf_get_edit_template_post_id();

	foreach ( $values as $data ) {
		$meta_label = $meta_value = $select_field = '';

		if (!isset($data['source'])) {
			$data['source'] = 'default';
		}

		if (!isset($data['icon'])) {
			$data['icon'] = '1';
		}

		if (!isset($data['icon_pack'])) {
			$data['icon_pack'] = $data['pack'];
		}

		switch ($data['source']) {
			case 'thegem_cf':
				$meta_data = array_flip(thegem_cf_get_fields_by_post_type($data['post_type']));
				$select_field = !empty($data[$data['post_type'].'_select_field']) ? $data[$data['post_type'].'_select_field'] : '';
				$meta_value = !empty($select_field) ? get_post_meta($post_id, $select_field, true) : '';
				$meta_label = (!empty($meta_data) && !empty($select_field) && isset($meta_data[$select_field])) ? $meta_data[$select_field] : '';

				break;
			case 'project_details':
				$meta_data = array_flip(thegem_cf_get_project_details());
				$select_field = !empty($data['project_details_select_field']) ? $data['project_details_select_field'] : '';
				$meta_value = !empty($select_field) ? get_post_meta($post_id, $select_field, true) : '';
				$meta_label = (!empty($meta_data) && !empty($select_field) && isset($meta_data[$select_field])) ? $meta_data[$select_field] : '';

				break;
			default:
				if (!empty($data[$data['source'].'_select_field'])) {
					$plugin_type = thegem_cf_check_plugins_group($data['source']);
					$select_field = $data[$data['source'] . '_select_field'];

					if ($plugin_type !== 'toolset') {
						$meta_data = array_flip(thegem_cf_get_acf_plugin_fields_by_group($data['source']));
					} else {
						$meta_data = array_flip(thegem_cf_get_toolset_plugin_fields_by_group($data['source']));
					}

					$meta_value = !empty($select_field) ? get_post_meta($post_id, $select_field, true) : '';
					$meta_label = (!empty($meta_data) && !empty($select_field) && isset($meta_data[$select_field])) ? $meta_data[$select_field] : '';
				}

				break;
		}

		if ($data['source'] != 'default' && !empty($select_field) && !empty($data['field_type'])){
			if ($data['field_type'] == 'number') {
				$meta_value = floatval($meta_value);
				$decimal = explode('.', $meta_value);
				$decimal = isset($decimal[1]) ? strlen(($decimal[1])) : 0;
				$decimal = $decimal <= 3 ? $decimal : 3;

				if (!empty($data['field_format']) && $data['field_format'] == 'wp_locale') {
					$meta_value = number_format_i18n($meta_value, $decimal);
				}

				if (!empty($data['field_prefix'])) {
					$meta_value = $data['field_prefix'] . '' . $meta_value;
				}

				if (!empty($data['field_suffix'])) {
					$meta_value = $meta_value . '' . $data['field_suffix'];
				}
			}

			if (!empty($data['link'])) {
				if ($data['link'] == 'custom') {
					$custom_link = !empty($data['link_custom']) ? vc_build_link($data['link_custom']) : null;

					if (!empty($custom_link['url'])) {
						$meta_value = '<a href="' . $custom_link['url'] . '" class="meta-link" target="' . $custom_link['target'] . '" title="' . $custom_link['title'] . '" rel="' . $custom_link['rel'] . '">' . $meta_value . '</a>';
					}
				} else {
					$dynamic_link = [
						'target' => !empty($data['link_target']) ? '_blank' : '_self',
						'rel' => !empty($data['link_nofollow']) ? 'nofollow' : '',
					];

					switch ($data['link_dynamic']) {
						case 'custom_fields':
							if (!empty($data['custom_fields_link_select'])) {
								$dynamic_link['url'] = get_post_meta($post_id, $data['custom_fields_link_select'], true);
							}

							break;
						case 'project_details':
							if (!empty($data['project_details_link_select'])) {
								$dynamic_link['url'] = get_post_meta($post_id, $data['project_details_link_select'], true);
							}

							break;
						default:
							if (!empty($data[$data['link_dynamic'].'_link_select'])) {
								$acf_link = get_post_meta($post_id, $data[$data['link_dynamic'].'_link_select'], true);

								if(is_array($acf_link)){
									$dynamic_link = [
										'url' => !empty($acf_link['url']) ? $acf_link['url'] : null,
										'target' => !empty($acf_link['target']) ? $acf_link['target'] : $dynamic_link['target'],
										'rel' => !empty($acf_link['rel']) ? $acf_link['rel'] : $dynamic_link['rel'],
									];
								} else{
									$dynamic_link['url'] = $acf_link;
								}
							}

							break;
					}

					if (!empty($dynamic_link['url'])) {
						$meta_value = '<a href="' . $dynamic_link['url'] . '" class="meta-link" target="' . $dynamic_link['target'] . '" rel="' . $dynamic_link['rel'] . '">' . $meta_value . '</a>';
					}
				}
			}

			$new_line['title'] = !empty($data['label']) && !empty($meta_label) ? $meta_label : '';
			$new_line['decription'] = !empty($meta_value) ? $meta_value : '';
		} elseif ($data['source'] == 'default') {
			$new_line['title'] =  isset($data['title']) ? ($data['title']) : '';
			$new_line['decription'] = isset($data['decription']) ? ($data['decription']) : '';
		}

		$new_line['icon'] = !empty($data['icon']) ? $data['icon'] : '';
		$new_line['pack'] = isset($data['icon_pack']) ? ($data['icon_pack']) : '';
		$new_line['material'] = isset($data['icon_material']) ? ($data['icon_material']) : '';
		$new_line['elegant'] = isset($data['icon_elegant']) ? ($data['icon_elegant']) : '';
		$new_line['fontawesome'] = isset($data['icon_fontawesome']) ? ($data['icon_fontawesome']) : '';
		$new_line['thegem-header'] = isset($data['icon_thegemheader']) ? ($data['icon_thegemheader']) : '';
		$new_line['thegemdemo'] = isset($data['icon_thegemdemo']) ? ($data['icon_thegemdemo']) : '';
		$new_line['userpack'] = isset($data['icon_userpack']) ? ($data['icon_userpack']) : '';
		$new_line['icon_color'] = isset($data['icon_color']) ? ($data['icon_color']) : '';

		$graph_lines_data[] = $new_line;
		if ($new_line['pack'] == 'elegant') {wp_enqueue_style( 'icons-elegant');}
		if ($new_line['pack'] == 'material') {wp_enqueue_style( 'icons-material');}
		if ($new_line['pack'] == 'fontawesome') {wp_enqueue_style( 'icons-fontawesome');}
		if ($new_line['pack'] == 'thegem-header') {wp_enqueue_style( 'icons-thegem-header');}
		if ($new_line['pack'] == 'thegemdemo') {wp_enqueue_style( 'icons-thegemdemo');}
		if ($new_line['pack'] == 'userpack') {wp_enqueue_style( 'icons-userpack');}
	}

	$output = '';
	foreach ($graph_lines_data as $line) {
		$color = 'background-color:' . $line['icon_color'] . '; color:' . $line['icon_color'] . ';';
		$output .= '<div class="project-info-shortcode-item">';

		if ($line['pack'] == 'elegant') {
			$icon = ($line['elegant']);
		} elseif ($line['pack'] == 'material') {
			$icon = ($line['material']);
		} elseif ($line['pack'] == 'thegem-header') {
			$icon = ($line['thegem-header']);
		} elseif ($line['pack'] == 'thegemdemo') {
			$icon = ($line['thegemdemo']);
		} elseif ($line['pack'] == 'userpack') {
			$icon = ($line['userpack']);
		} else {
			$icon = ($line['fontawesome']);
		}

		if($line['icon']) {
			$output .= '<div style="' . $color . '" class="icon gem-print-icon gem-icon-pack-' . $line['pack'] . '">&#x' . $icon . '</div>';
		}

		$output .= '<div class="title">' . $line['title'] . '</div>';
		if (!empty($line['decription'])) {
			$output .= '<div class="decription">' . $line['decription'] . '</div>';
		}
		$output .= '</div>';
	}

	if ($style == 2) {
		$calsses = 'project-info-shortcode project-info-shortcode-style-2';
	} else {
		$calsses = 'project-info-shortcode project-info-shortcode-style-default';
	}

	$return_html = "<div class='$calsses'>" .$output. "</div>";
	return $return_html;
}

function thegem_custom_header_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'background_image' => '',
		'background_style' => '',
		'ch_background_color' => '',
		'video_background_type' => '',
		'video_background_src' => '',
		'video_background_acpect_ratio' => '',
		'video_background_overlay_color' => '',
		'video_background_overlay_opacity' => '',
		'video_background_poster' => '',
		'container' => '',
		'icon' => '',
		'shape' => 'none',
		'style' => '',
		'color' => '',
		'color_2' => '',
		'background_color' => '',
		'border_color' => '',
		'size' => 'small',
		'centered' => '',
		'icon_position'=> 'gem-custom-header-icon-position-left',
		'subtitle' => '',
		'subtitle_width' => '900',
		'title_width' => '900',
		'subtitle_color' => '#4c5867',
		'opacity' => '1',
		'pack' => '',
		'icon_elegant' => '',
		'icon_material' => '',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_userpack' => '',
		'breadcrumbs' => '',
		'breadcrumbs_color' => '',
		'padding_bottom' => '90',
		'padding_top' => '',
		'icon_top_margin' => '',
		'icon_bottom_margin' => '',
		'title_top_margin' => '',
		'centreed_breadcrumbs' =>  '',
		'title_bottom_margin' => '',
		'gradient_backgound' => '',
		'gradient_backgound_from' => '#fff',
		'gradient_backgound_to' => '#000',
		'gradient_backgound_style' => 'linear',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '180',
		'gradient_radial_backgound_position' => 'at top',

	), $atts, 'gem_custom_header'));

	$shape = thegem_check_array_value(array('circle', 'square', 'romb', 'hexagon'), $shape, 'none');
	$style = thegem_check_array_value(array('', 'angle-45deg-r', 'angle-45deg-l', 'angle-90deg'), $style, '');
	$size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $size, 'small');
	$css_style_icon = '';
	$css_style_icon_1 = '';
	$css_style_icon_2 = '';
	$title_styles ='';
	$css_style_icon_background = '';
	if($background_color) {
		$css_style_icon_background .= 'background-color: '.$background_color.';';
		if(!$border_color) {
			$css_style_icon .= 'border-color: '.$background_color.';';
		}
	}
	if($title_top_margin) {
		$title_styles .= 'margin-top:' .$title_top_margin. 'px;';
	}
	if($title_bottom_margin) {
		$title_styles .= 'margin-bottom:' .$title_bottom_margin. 'px;';
	}

	if($opacity) {
		$css_style_icon .= 'opacity:'.$opacity.';';
	}
	if($border_color) {
		$css_style_icon .= 'border-color: '.$border_color.';';
	}
	if($icon_top_margin) {
		$css_style_icon .= 'margin-top: '.$icon_top_margin.'px;';
	}
	if($icon_bottom_margin) {
		$css_style_icon .= 'margin-bottom: '.$icon_bottom_margin.'px;';
	}
	$simple_icon = '';
	if(!($background_color || $border_color)) {
		$simple_icon = ' gem-simple-icon';
	}
	if($color = $color) {
		$css_style_icon_1 = 'color: '.$color.';';
		if(($color_2 = $color_2) && $style) {
			$css_style_icon_2 = 'color: '.$color_2.';';
		}
		else {
			$css_style_icon_2 = 'color: '.$color.';';
		}
	}
	$css_style = '';
	if ($gradient_backgound_angle == 'cusotom_deg') {
		$gradient_backgound_angle = $gradient_backgound_cusotom_deg.'deg';
	}
	if($gradient_backgound and $gradient_backgound_style == 'linear') {
		$css_style .= 'background: linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	if($gradient_backgound and $gradient_backgound_style == 'radial') {
		$css_style .= 'background: radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	if($background_image = thegem_attachment_url($background_image)) {
		$css_style .= 'background-image: url('.$background_image.');';
	}
	if($ch_background_color) {
		$css_style .= 'background-color: '.$ch_background_color.';';
	}
	if($background_style == 'cover') {
		$css_style .= 'background-repeat: no-repeat; background-size: cover;';
	}
	if($background_style == 'contain') {
		$css_style .= 'background-repeat: no-repeat; background-size: contain;';
	}
	if($background_style == 'repeat') {
		$css_style .= 'background-repeat: repeat;';
	}
	if($padding_top) {
		$css_style .= 'padding-top: '.$padding_top.'px;';
	}

	if($background_style == 'no-repeat') {
		$css_style .= 'background-repeat: no-repeat;';
	}
	if($container == '') {
		$css_style .= 'padding-left: 21px; padding-right: 21px;';
	}
	if($pack =='elegant' && empty($icon) && $icon_elegant) {
		$icon = $icon_elegant;
	}
	if($pack =='material' && empty($icon) && $icon_material) {
		$icon = $icon_material;
	}
	if($pack =='fontawesome' && empty($icon) && $icon_fontawesome) {
		$icon = $icon_fontawesome;
	}
	if($pack =='thegem-header' && empty($icon) && $icon_thegem_header) {
		$icon = $icon_thegem_header;
	}
	if($pack =='userpack' && empty($icon) && $icon_userpack) {
		$icon = $icon_userpack;
	}
	wp_enqueue_style('icons-'.$pack);

	$custom_header_uid = uniqid();

	$html_js = '<script type="text/javascript">if (typeof(gem_fix_fullwidth_position) == "function") { gem_fix_fullwidth_position(document.getElementById("custom-header-' . $custom_header_uid . '")); }</script>';

	$video = thegem_video_background($video_background_type, $video_background_src, $video_background_acpect_ratio, false, $video_background_overlay_color, $video_background_overlay_opacity, thegem_attachment_url($video_background_poster), true);
	$return_html =
		'<div id="custom-header-' . $custom_header_uid . '" class="custom-header '.$icon_position.'  ' .($centreed_breadcrumbs ? 'centreed_breadcrumbs' : '') . ' fullwidth-block clearfix'.'" style="'.$css_style. '">'.$html_js.$video.($container ? '<div class="container">' : '').
		'<div class="gem-icon gem-icon-pack-'.$pack.' gem-icon-size-'.$size.' '.$style.' gem-icon-shape-'.$shape.$simple_icon.'" style="'.$css_style_icon.'">'.
		($shape == 'hexagon' ? '<div class="gem-icon-shape-hexagon-back"><div class="gem-icon-shape-hexagon-back-inner"><div class="gem-icon-shape-hexagon-back-inner-before" style="background-color: '.($border_color ? $border_color : $background_color).'"></div></div></div><div class="gem-icon-shape-hexagon-top"><div class="gem-icon-shape-hexagon-top-inner"><div class="gem-icon-shape-hexagon-top-inner-before" style="'.$css_style_icon_background.'"></div></div></div>' : '').
		'<div class="gem-icon-inner" style="'.$css_style_icon_background.'">'.
		($shape == 'romb' ? '<div class="romb-icon-conteiner">' : '').
		'<span class="gem-icon-half-1" style="'.$css_style_icon_1.'"><span class="back-angle">&#x'.$icon.';</span></span>'.
		'<span class="gem-icon-half-2" style="'.$css_style_icon_2.'"><span class="back-angle">&#x'.$icon.';</span></span>'.
		($shape == 'romb' ? '</div>' : '').
		'</div>'.
		'</div>
			<div class="gem-custom-header-conteiner">'.
		'<div style="'.$title_styles.'" class="custom-header-title"><span style=" max-width:'.$title_width.'px;">' .do_shortcode($content). '</span></div>'.
		'<div class="custom-header-subtitle styled-subtitle" style="padding-bottom:'.$padding_bottom.'px;"><span class="light" style="max-width:'.$subtitle_width.'px; color:'.$subtitle_color.'; ">'.$subtitle.'</span></div>';
	if($breadcrumbs) {
		ob_start();
		gem_breadcrumbs();
		$return_html .= ob_get_clean();
	}
	$return_html .=
		($container ? '</div>' : '').'</div></div>';

	return $return_html;
}

function thegem_custom_menu_shortcode($atts, $content) {

	$params = vc_map_get_attributes('gem_custom_menu', $atts);

	$unique_id = uniqid('thegem-custom-menu-') . rand(1, 9999);
	$custom_css = '';

	wp_enqueue_style('thegem-menu-custom');

	$pointer_classes = '';
	if (isset($params['menu_pointer_style_hover'])) {
		if (in_array($params['menu_pointer_style_hover'], ['frame-default', 'frame-rounded'])) {
			$pointer_classes = 'style-hover-framed style-hover-animation-'.$params['animation_framed'];
		} else if (in_array($params['menu_pointer_style_hover'], ['line-underline-1', 'line-underline-2', 'line-overline-1', 'line-overline-2', 'line-top-bottom'])) {
			$pointer_classes = 'style-hover-lined style-hover-animation-'.$params['animation_line'];
		} else if (in_array($params['menu_pointer_style_hover'], ['background-underline', 'background-color', 'background-rounded', 'background-extra-paddings'])) {
			$pointer_classes = 'style-hover-background style-hover-animation-'.$params['animation_background'];
		} else {
			$pointer_classes = 'style-hover-text';
		}
		$pointer_classes .= ' style-hover-type-'.$params['menu_pointer_style_hover'];
	}
	if (isset($params['menu_pointer_style_active'])) {
		if (in_array($params['menu_pointer_style_active'], ['frame-default', 'frame-rounded'])) {
			$pointer_classes .= ' style-active-framed';
		} else if (in_array($params['menu_pointer_style_active'], ['line-underline-1', 'line-underline-2', 'line-overline-1', 'line-overline-2', 'line-top-bottom'])) {
			$pointer_classes .= ' style-active-lined';
		} else if (in_array($params['menu_pointer_style_active'], ['background-underline', 'background-color', 'background-rounded', 'background-extra-paddings'])) {
			$pointer_classes .= ' style-active-background';
		} else {
			$pointer_classes .= ' style-active-text';
		}
		$pointer_classes .= ' style-active-type-'.$params['menu_pointer_style_active'];
	}

	$responsive_classes = thegem_templates_responsive_options_output($params);
	$menu_item_font_class = implode(' ', array($params['font_preset'], $params['menu_item_color_preset']));

	ob_start(); ?>

		<div id="<?php echo(esc_attr($unique_id)); ?>" class="thegem-menu-custom thegem-menu-custom--<?= $params['submenu_style'] ?> thegem-menu-custom--<?= $params['menu_alignment'] ?> <?php echo $params['menu_indicator'] ? 'menu-indicator' : ''; ?> <?=$pointer_classes?> <?=$responsive_classes?>"">
			<?php if (!empty($params['heading_text'])) {
				$link_before = '<span>';
				$link_after =  '</span>';
				$link_attrs = $icon = $label = $class = $separator = '';

				if (!empty($params['heading_link'])) {
					$link = vc_build_link($params['heading_link']);

					if (isset($link['url']) && !empty($link['url'])) {
						$link_attrs .= 'href="'.esc_attr($link['url']).'"';
					}

					if (isset($link['title']) && !empty($link['title'])) {
						$link_attrs .= ' title="'.esc_attr($link['title']).'"';
					}

					if (isset($link['target']) && !empty($link['target'])) {
						$link_attrs .= ' target="'.esc_attr(trim($link['target'])).'"';
					}

					if (isset($link['rel']) && !empty($link['rel'])) {
						$link_attrs .= ' rel="'.esc_attr(trim($link['rel'])).'"';
					}

					$link_before = '<a '.$link_attrs.'>';
					$link_after = '</a>';
				}

				if ($params['heading_icon'] && isset($params['pack']) && $params['icon_' . str_replace("-", "", $params['pack'])] != '') {
					wp_enqueue_style('icons-' . $params['pack']);

					if (!empty($params['heading_icon_color'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .icon { color:' . $params['heading_icon_color'] . '; }';
					}

					if (!empty($params['heading_icon_color_hover'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .icon { transition: all 0.3s; }';
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header:hover .icon { color:' . $params['heading_icon_color_hover'] . '; }';
					}

					$icon = '<span class="icon">'.thegem_build_icon($params['pack'], $params['icon_' . str_replace("-", "", $params['pack'])]).'</span>';
				}

				if (!empty($params['heading_color'])) {
					$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header { color:' . $params['heading_color'] . '; }';
				}

				if (!empty($params['heading_color_hover'])) {
					$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header:hover a { color:' . $params['heading_color_hover'] . '; }';
				}

				if (!empty($params['heading_text_transform'])) {
					$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header { text-transform: ' . $params['heading_text_transform'] . '; }';
				}

				if (isset($params['heading_font_weight']) && $params['heading_font_weight'] == 'thin') {
					$class .= 'light';
				}

				if (!empty($params['heading_label_text'])) {
					$label = '<span class="label title-h6">'.$params['heading_label_text'].'</span>';

					if (!empty($params['heading_label_color'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .label { color:' . $params['heading_label_color'] . '; }';
					}

					if (!empty($params['heading_label_background'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .label { background-color:' . $params['heading_label_background'] . '; }';
					}
				}

				if (!empty($params['heading_separator'])) {
					$separator = '<div class="separator"><span></span></div>';

					if (!empty($params['heading_separator_color'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .separator span { background-color:' . $params['heading_separator_color'] . '; }';
					}

					if (!empty($params['heading_separator_weight'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .separator span { height:' . $params['heading_separator_weight'] . 'px; }';
					}

					if (!empty($params['heading_separator_width'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .separator span { width:' . $params['heading_separator_width'] . 'px; }';
					}

					if (!empty($params['heading_separator_top_spacing'])) {
						$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .separator { margin-top:' . $params['heading_separator_top_spacing'] . 'px; }';
					}
				}

				if (!empty($params['heading_bottom_spacing'])) {
					$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header { margin-bottom:' . $params['heading_bottom_spacing'] . 'px; }';
				}

				echo '<'.$params['heading_tag'].' class="menu-custom-header '.esc_attr($class).' '.esc_attr($params['heading_div_style']).'">'.$link_before.$icon.$params['heading_text'].$label.$link_after.$separator.'</'.$params['heading_tag'].'>';
			}

			if (!empty($params['menu_alignment'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header a,
				.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header > span,
				.thegem-menu-custom#' . esc_attr($unique_id) . ' .menu-custom-header .separator,
				.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom,
				.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li > span { justify-content:' . $params['menu_alignment'] . '; }';
			}

			if (!empty($params['menu_item_color'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span { color:' . $params['menu_item_color'] . ' !important; }';
			}
			if (!empty($params['menu_item_color_hover'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover>span { color:' . $params['menu_item_color_hover'] . ' !important; }';
			}
            if (!empty($params['menu_item_color_active'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active>span { color:' . $params['menu_item_color_active'] . ' !important; }';
            }

			if (!empty($params['menu_item_background'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span { background:' . $params['menu_item_background'] . ' !important; }';
			}
			if (!empty($params['menu_item_background_hover'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a:before,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover>span { background:' . $params['menu_item_background_hover'] . ' !important; }';
			}
            if (!empty($params['menu_item_background_active'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active>span { background:' . $params['menu_item_background_active'] . ' !important; }';
            }

			if (!empty($params['menu_item_icon_color'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .icon,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span .icon { color:' . $params['menu_item_icon_color'] . ' !important; }';
			}
			if (!empty($params['menu_item_icon_color_hover'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom .icon { transition: all 0.3s; }';
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a .icon,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover>span .icon { color:' . $params['menu_item_icon_color_hover'] . ' !important; }';
			}
            if (!empty($params['menu_item_icon_color_active'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a .icon,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active>span .icon { color:' . $params['menu_item_icon_color_hover'] . ' !important; }';
            }

            if (!empty($params['pointer_color_menu_item_hover'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a .text:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a .text:after {background-color:' . $params['pointer_color_menu_item_hover'] . ' !important; }';
	            $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a:after {border-color:' . $params['pointer_color_menu_item_hover'] . ' !important; }';
            }
            if (!empty($params['pointer_color_menu_item_hover']) && $params['menu_pointer_style_hover'] == 'background-underline') {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:hover a:after {background-color:' . $params['pointer_color_menu_item_hover'] . ' !important; }';
            }
            if (!empty($params['pointer_color_menu_item_active'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a .text:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a .text:after {background-color:' . $params['pointer_color_menu_item_active'] . ' !important;}';
	            $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a:after {border-color:' . $params['pointer_color_menu_item_active'] . ' !important; }';
            }
            if (!empty($params['pointer_color_menu_item_active']) && $params['menu_pointer_style_active'] == 'background-underline') {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li.menu-item-active a:after {background-color:' . $params['pointer_color_menu_item_active'] . ' !important; }';
            }

            if (!empty($params['pointer_width_menu_item'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:after { width:' . $params['pointer_width_menu_item'] . 'px !important; }';
            }
            if (!empty($params['pointer_height_menu_item'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:before,
                 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:after { height:' . $params['pointer_height_menu_item'] . 'px !important; }';
            }
            if (!empty($params['pointer_top_spacing_menu_item'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:before {top: -' . $params['pointer_top_spacing_menu_item'] . 'px !important; }';
	            $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a .text:after {bottom: -' . $params['pointer_top_spacing_menu_item'] . 'px !important; }';
            }

			if (!empty($params['menu_item_letter_spacing']) || strcmp($params['menu_item_letter_spacing'], '0') === 0) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span { letter-spacing: ' . $params['menu_item_letter_spacing'] . 'px !important; }';
			}
			if (!empty($params['menu_item_text_transform'])) {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span { text-transform: ' . $params['menu_item_text_transform'] . ' !important; }';
			}
			if (isset($params['menu_item_font_weight']) && $params['menu_item_font_weight'] == 'thin') {
				$custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a,
				 .thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li>span {
					font-family: var(--thegem-to-light-title-font-family);
					font-style: var(--thegem-to-light-title-font-style);
					font-weight: normal;
				}';
			}

            if ($params['submenu_style'] == 'vertical') {
	            if (!empty($params['menu_item_spacing'])) {
		            $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li { margin-bottom:' . $params['menu_item_spacing'] . 'px; }';
	            }
            } else {
	            if (!empty($params['menu_item_spacing'])) {
		            $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li a{
		                padding-left: ' . $params['menu_item_spacing'] . 'px;
		                padding-right: ' . $params['menu_item_spacing'] . 'px;
		            }';
	            }
            }

            if (empty($params['submenu_separator'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:before{ display: none; }';
            }
            if (!empty($params['submenu_separator_color'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:before{ background-color: ' . $params['submenu_separator_color'] . '; }';
            }
            if (!empty($params['submenu_separator_weight'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:before{ width: ' . $params['submenu_separator_weight'] . 'px; }';
            }
            if (!empty($params['submenu_separator_height'])) {
                $custom_css .= '.thegem-menu-custom#' . esc_attr($unique_id) . ' ul.nav-menu-custom li:before{ height: ' . $params['submenu_separator_height'] . 'px; }';
            }

			if ($params['menu_source'] == 'nav_menu') {
				if (!empty($params['nav_menu']) && is_nav_menu($params['nav_menu']) && !empty(wp_get_nav_menu_items($params['nav_menu']))) {
					if (!empty($params['show_submenus'])) {
						$depth = 0;
					} else {
						$depth = 1;
					}

					wp_nav_menu(array(
						'menu' => $params['nav_menu'],
						'menu_class' => 'nav-menu-custom',
						'container' => null,
						'echo' => true,
						'depth' => $depth,
						'link_before' => '<span class="text">',
						'link_after' => '<i class="indicator"></i></span>',
						'li_class' => esc_attr($menu_item_font_class)
					));
				}
			} else {
				$menu_custom = vc_param_group_parse_atts($params['menu_custom']);

				if (!empty($menu_custom)) {
					echo '<ul class="nav-menu-custom">';
					foreach ( $menu_custom as $item ) {
						if (empty($item['item_title'])) {
							continue;
						}
						$item_link_before = '<span>';
						$item_link_after =  '</span>';
						$item_link_attrs = $item_icon = $item_label = '';

						if (!empty($item['item_link'])) {
							$item_link = vc_build_link($item['item_link']);

							if (isset($item_link['url']) && !empty($item_link['url'])) {
								$item_link_attrs .= 'href="'.esc_attr($item_link['url']).'"';
							}

							if (isset($item_link['title']) && !empty($item_link['title'])) {
								$item_link_attrs .= ' title="'.esc_attr($item_link['title']).'"';
							}

							if (isset($item_link['target']) && !empty($item_link['target'])) {
								$item_link_attrs .= ' target="'.esc_attr(trim($item_link['target'])).'"';
							}

							if (isset($item_link['rel']) && !empty($item_link['rel'])) {
								$item_link_attrs .= ' rel="'.esc_attr(trim($item_link['rel'])).'"';
							}

							$item_link_before = '<a '.$item_link_attrs.'>';
							$item_link_after = '</a>';
						}

						if (!empty($item['item_icon']) && isset($item['pack']) && !empty($item['icon_' . str_replace("-", "", $item['pack'])])) {
							wp_enqueue_style('icons-' . $item['pack']);
							$item_icon = '<span class="icon">'.thegem_build_icon($item['pack'], $item['icon_' . str_replace("-", "", $item['pack'])]).'</span>';
						}

						if (!empty($item['item_label_text'])) {
							$item_label_style = '';

							if (!empty($item['item_label_color'])) {
								$item_label_style .= 'color:' . $item['item_label_color'] . ';';
							}

							if (!empty($item['item_label_background'])) {
								$item_label_style .= 'background-color:' . $item['item_label_background'] . ';';
							}

							$item_label = '<span class="label title-h6" style="'.$item_label_style.'">'.$item['item_label_text'].'</span>';
						}

						echo '<li class="'.esc_attr($menu_item_font_class).'" style="">'.$item_link_before.$item_icon.'<span class="text">'.$item['item_title'].'<i class="indicator"></i></span>'.$item_label.$item_link_after.'</li>';
					}
					echo '</ul>';
				}
			} ?>
		</div>

	<?php
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));

	// Print custom css
	$css_output = '';
	if (!empty($custom_css)) {
		$css_output = '<style>' . $custom_css . '</style>';
	}

	return $css_output . $return_html;
}

function thegem_fullwidth_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'color' => '',
		'fullheight' => '',
		'background_color' => '',
		'background_image' => '',
		'background_style' => '',
		'background_position_horizontal' => 'center',
		'background_position_vertical' => 'top',
		'background_parallax' => '',
		'background_parallax_mobile' => '',
		'background_parallax_type' => '',
		'background_parallax_overlay_color' => '',
		'video_background_type' => '',
		'video_background_src' => '',
		'video_background_acpect_ratio' => '16:9',
		'video_background_overlay_color' => '',
		'video_background_overlay_opacity' => '',
		'video_background_poster' => '',
		'padding_top' => '',
		'padding_bottom' => '',
		'padding_left' => '',
		'padding_right' => '',
		'container' => '',
		'styled_marker_top_style' => '',
		'styled_marker_top_direction' => 'inside',
		'styled_marker_bottom_style' => '',
		'styled_marker_bottom_direction' => 'inside',
		'gradient_backgound' => '',
		'gradient_backgound_from' => '#fff',
		'gradient_backgound_to' => '#000',
		'gradient_backgound_style' => 'linear',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '180',
		'gradient_radial_backgound_position' => 'at top',
		'ken_burns_enabled' => false,
		'ken_burns_direction' => 'zoom_in',
		'ken_burns_transition_speed' => 15000,
		'play_on_mobile' => '',
		'background_fallback' => ''
	), $atts, 'gem_fullwidth'));
	$styled_marker_top_style = thegem_check_array_value(array('', 'triangle', 'figure'), $styled_marker_top_style, '');
	$styled_marker_bottom_style = thegem_check_array_value(array('', 'triangle', 'figure'), $styled_marker_bottom_style, '');
	$styled_marker_top_direction = thegem_check_array_value(array('inside', 'outside'), $styled_marker_top_direction, 'inside');
	$styled_marker_bottom_direction = thegem_check_array_value(array('inside', 'outside'), $styled_marker_bottom_direction, 'inside');
	$background_parallax_type = thegem_check_array_value(array('vertical', 'horizontal', 'fixed'), $background_parallax_type, 'vertical');
	$ken_burns_direction = thegem_check_array_value(array('zoom_in', 'zoom_out'), $ken_burns_direction, 'zoom_in');

	$css_style = '';
	if($color) {
		$css_style .= 'color: '.$color.';';
	}
	if($background_color) {
		$css_style .= 'background-color: '.$background_color.';';
	}
	if ($gradient_backgound_angle == 'cusotom_deg') {
		$gradient_backgound_angle = $gradient_backgound_cusotom_deg.'deg';
	}
	if($gradient_backgound and $gradient_backgound_style == 'linear') {
		$css_style .= 'background: linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	if($gradient_backgound and $gradient_backgound_style == 'radial') {
		$css_style .= 'background: radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	$background_image_style = '';
	if($background_image = thegem_attachment_url($background_image)) {
		$background_image_style .= 'background-image: url('.$background_image.');';

		if($background_style == 'cover') {
			$background_image_style .= 'background-repeat: no-repeat; background-size: cover;';
		}
		if($background_style == 'contain') {
			$background_image_style .= 'background-repeat: no-repeat; background-size: contain;';
		}
		if($background_style == 'repeat') {
			$background_image_style .= 'background-repeat: repeat;';
		}
		if($background_style == 'no-repeat') {
			$background_image_style .= 'background-repeat: no-repeat;';
		}
		$background_image_style .= 'background-position: '.$background_position_horizontal.' '.$background_position_vertical.';';
	}

	$video = thegem_video_background($video_background_type, $video_background_src, $video_background_acpect_ratio, false, $video_background_overlay_color, $video_background_overlay_opacity, thegem_attachment_url($video_background_poster), $play_on_mobile, thegem_attachment_url($background_fallback), $background_style, $background_position_horizontal, $background_position_vertical);
	if($padding_top) {
		$css_style .= 'padding-top: '.$padding_top.'px;';
	}
	if($padding_bottom) {
		$css_style .= 'padding-bottom: '.$padding_bottom.'px;';
	}
	if($padding_left) {
		$css_style .= 'padding-left: '.$padding_left.'px;';
	}
	if($padding_right) {
		$css_style .= 'padding-right: '.$padding_right.'px;';
	}
	if($fullheight) {
		$css_style .= 'height: 100vh';
	}

	$top_marker = '';
	$bottom_marker = '';
	if($styled_marker_top_style == 'triangle') {
		if($styled_marker_top_direction == 'inside') {
			$top_marker = '<div class="fullwidth-top-marker marker-direction-inside"><svg width="140" height="70"><path d="M 0,0 70,70 140,0" /></svg></div>';
		} elseif($styled_marker_top_direction == 'outside' && $background_color) {
			$top_marker = '<div class="fullwidth-top-marker marker-direction-outside"><svg width="140" height="70" style="fill: '.$background_color.'"><path d="M 0,71 70,0 140,71" /></svg></div>';
		}
	} elseif($styled_marker_top_style == 'figure') {
		if($styled_marker_top_direction == 'inside') {
			$top_marker = '<div class="fullwidth-top-marker marker-direction-inside"><svg width="140" height="70"><path d="M 0,0 Q 65,5 70,70 Q 75,5 140,0" /></svg></div>';
		} elseif($styled_marker_top_direction == 'outside' && $background_color) {
			$top_marker = '<div class="fullwidth-top-marker marker-direction-outside"><svg width="140" height="70" style="fill: '.$background_color.'"><path d="M 0,71 Q 65,65 70,0 Q 75,65 140,71" /></svg></div>';
		}
	}
	if($styled_marker_bottom_style == 'triangle') {
		if($styled_marker_bottom_direction == 'inside') {
			$bottom_marker = '<div class="fullwidth-bottom-marker marker-direction-inside"><svg width="140" height="70"><path d="M 0,71 70,0 140,71" /></svg></div>';
		} elseif($styled_marker_bottom_direction == 'outside' && $background_color) {
			$bottom_marker = '<div class="fullwidth-bottom-marker marker-direction-outside"><svg width="140" height="70" style="fill: '.$background_color.'"><path d="M 0,0 70,70 140,0" /></svg></div>';
		}
	} elseif($styled_marker_bottom_style == 'figure') {
		if($styled_marker_bottom_direction == 'inside') {
			$bottom_marker= '<div class="fullwidth-bottom-marker marker-direction-inside"><svg width="140" height="70"><path d="M 0,71 Q 65,65 70,0 Q 75,65 140,71" /></svg></div>';
		} elseif($styled_marker_bottom_direction == 'outside' && $background_color) {
			$bottom_marker = '<div class="fullwidth-bottom-marker marker-direction-outside"><svg width="140" height="70" style="fill: '.$background_color.'"><path d="M 0,0 Q 65,5 70,70 Q 75,5 140,0" /></svg></div>';
		}
	}

	if ($background_parallax && in_array($background_parallax_type, array('vertical', 'horizontal'))) {
		wp_enqueue_script('thegem-parallax-' . $background_parallax_type);
	}

	if ($ken_burns_enabled) {
		wp_enqueue_style('thegem-ken-burns');
		wp_enqueue_script('thegem-ken-burns');

		$ken_burns_classes[] = 'thegem-ken-burns-bg';
		$ken_burns_classes[] = $ken_burns_direction == 'zoom_in' ? 'thegem-ken-burns-zoom-in' : 'thegem-ken-burns-zoom-out';

		$ken_burns_classes = ' '.implode(' ', $ken_burns_classes);
		$background_image_style .= ' animation-duration: '.(!empty($ken_burns_transition_speed) ? esc_attr(trim($ken_burns_transition_speed)) : 15000).'ms;';
	}

	$fullwidth_uid = uniqid();

	$html_js = '<script type="text/javascript">if (typeof(gem_fix_fullwidth_position) == "function") { gem_fix_fullwidth_position(document.getElementById("fullwidth-block-' . $fullwidth_uid . '")); }</script>';

	$return_html = '<div id="fullwidth-block-' . $fullwidth_uid . '" class="fullwidth-block' . ($background_parallax ? ' fullwidth-block-parallax-' . $background_parallax_type : '') . ($ken_burns_enabled ? ' fullwidth-block-ken-burns' : '').' clearfix" ' . ($background_parallax ? 'data-mobile-parallax-enable="' . ($background_parallax_mobile ? '1' : '0') . '"' : '') .  ' style="'.$css_style.'">' . $html_js .$top_marker. ($background_image_style != '' ? '<div class="fullwidth-block-background'.(!empty($ken_burns_classes) ? $ken_burns_classes : '').'" style="'.$background_image_style.'"></div>' : '') . ($background_parallax_overlay_color ? '<div class="fullwidth-block-parallax-overlay" style="background-color: ' . $background_parallax_overlay_color . ';"></div>' : '') .$video. '<div class="fullwidth-block-inner">'.($container ? '<div class="container">' : '').do_shortcode($content).($container ? '</div>' : '').'</div>'.$bottom_marker.'</div>';
	return $return_html;
}

function thegem_divider_shortcode($atts) {
	extract(shortcode_atts(array(
		'direction' => 'horizontal',
		'style' => '',
		'color' => '',
		'weight' => '',
		'width' => '',
		'margin_top' => '',
		'margin_bottom' => '',
		'fullwidth' => '',
		'class_name' => '',
		'inline_element' => '1',
		'vertical_style' => 'solid',
		'vertical_height_desktop' => '50',
		'vertical_height_tablet' => '50',
		'vertical_height_mobile' => '50',
		'vertical_weight' => '1',
        ), $atts, 'gem_divider'));

	$css_style = '';
	$weight = trim($weight);
	if(substr($weight, -1) !== '%' && intval($weight) > 0) {
		$weight = intval($weight).'px';
	}
	$width = trim($width);
	if(substr($width, -1) !== '%' && intval($width) > 0) {
		$width = intval($width).'px';
	}
	if($weight) {
		$css_style .= 'border-width: '.$weight.';';
	}
	if($width) {
		$css_style .= 'width: '.$width.';';
	}
	if($color) {
		$css_style .= 'border-color: '.$color.';';
	}
	$svg = '';
	if($style == 1) {
		$svg = '<svg width="100%" height="1px"><line x1="0" x2="100%" y1="0" y2="0" stroke="'.$color.'" stroke-width="2" stroke-linecap="black" stroke-dasharray="4, 4"/></svg>';
	}
	if($style == 4) {
		$svg = '<svg width="100%" height="8px"><line x1="4" x2="100%" y1="4" y2="4" stroke="'.$color.'" stroke-width="6" stroke-linecap="round" stroke-dasharray="1, 13"/></svg>';
	}
	if($style == 5) {
		$svg = '<svg width="100%" height="6px"><line x1="3" x2="100%" y1="3" y2="3" stroke="'.$color.'" stroke-width="6" stroke-linecap="square" stroke-dasharray="9, 13"/></svg>';
	}

	if($direction == 'vertical' && $vertical_style == 'stroked') {
		$svg = '<svg width="1px" height="100%"><line x1="0" x2="1" y1="0" y2="100%" stroke="'.$color.'" stroke-width="2" stroke-linecap="black" stroke-dasharray="4, 4"/></svg>';
    }

	$class_name .= $direction == 'vertical' && !empty($inline_element) ? ' gem-divider--v-inline' : null;
	$class_name .= $direction == 'vertical' && !empty($vertical_style) ? ' gem-divider--v-'.$vertical_style.'' : null;

	$id = uniqid('thegem-divider-');
	$inline_css = $editor_class = '';
	$vertical_editor_attr = $direction == 'vertical' ? thegem_data_editor_attribute($id . '-editor '.$editor_class) : null;

	if($margin_top) {
		$inline_css .= '#'.$id.' {margin-top: '.intval($margin_top).'px !important;}';
	}
	if($margin_bottom) {
		$inline_css .= '#'.$id.' {margin-bottom: '.intval($margin_bottom).'px !important;}';
	}
	if (isset($atts['divider_disable_desktop']) && !empty($atts['divider_disable_desktop'])) {
		$inline_css .= '@media screen and (min-width: 1024px) {#'.$id.' {display: none;}}';
	}
	if (isset($atts['divider_disable_tablet']) && !empty($atts['divider_disable_tablet'])) {
		$inline_css .= '@media screen and (max-width: 1023px) and (min-width: 768px) {#'.$id.' {display: none;}}';
	}
	if (isset($atts['divider_disable_mobile']) && !empty($atts['divider_disable_mobile'])) {
		$inline_css .= '@media screen and (max-width: 767px) {#'.$id.' {display: none;}}';
	}
	if (isset($atts['tablet_margin_top'])) {
		$inline_css .= '@media screen and (max-width: 1023px) and (min-width: 768px) {#'.$id.' {margin-top: '.intval($atts['tablet_margin_top']).'px !important;}}';
	}
	if (isset($atts['tablet_margin_bottom'])) {
		$inline_css .= '@media screen and (max-width: 1023px) and (min-width: 768px) {#'.$id.' {margin-bottom: '.intval($atts['tablet_margin_bottom']).'px !important;}}';
	}
	if (isset($atts['mobile_margin_top'])) {
		$inline_css .= '@media screen and (max-width: 767px) {#'.$id.' {margin-top: '.intval($atts['mobile_margin_top']).'px !important;}}';
	}
	if (isset($atts['mobile_margin_bottom'])) {
		$inline_css .= '@media screen and (max-width: 767px) {#'.$id.' {margin-bottom: '.intval($atts['mobile_margin_bottom']).'px !important;}}';
	}

	//Vertical Styles
    if($direction == 'vertical') {
		$inline_css .= '.vc_gem_divider.'.$id . '-editor '.$editor_class.' {background: transparent !important;}';

        if (!empty($inline_element)) {
	        $inline_css .= '.vc_gem_divider.'.$id . '-editor '.$editor_class.' {display: inline-flex;}';
        }

	    if(!empty($vertical_height_desktop) && intval($vertical_height_desktop) > 0) {
		    $inline_css .= '#'.$id.' {height: '.intval($vertical_height_desktop).'px !important;}';
	    }
	    if(!empty($vertical_height_tablet) && intval($vertical_height_tablet) > 0) {
		    $inline_css .= '@media screen and (max-width: 1023px) and (min-width: 768px) {#'.$id.' {height: '.intval($vertical_height_tablet).'px !important;}}';
	    }
	    if(!empty($vertical_height_mobile) && intval($vertical_height_mobile) > 0) {
		    $inline_css .= '@media screen and (max-width: 767px) {#'.$id.' {height: '.intval($vertical_height_mobile).'px !important;}}';
	    }
	    if(!empty($vertical_weight) && intval($vertical_weight) > 0) {
		    $inline_css .= '#'.$id.' {border-width: '.intval($vertical_weight).'px !important;}';
	    }
	}


	if(!empty($inline_css)) {
		$inline_css = '<style>'.$inline_css.'</style>';
	}

	$return_html = ($direction == 'vertical' && !empty($inline_element)) ? '' : '<div class="clearboth"></div>';
	$return_html .= $inline_css.'<div id="'.esc_attr($id).'" class="gem-divider '.(get_post_meta(get_the_ID(), 'thegem_template_type', true) == 'megamenu' ? 'megamenu-divider' : '').' '.($class_name ? $class_name : '') .  ($style ? ' gem-divider-style-'.$style : '').($fullwidth ? ' fullwidth-block' : '').'" style="'.$css_style.'" '.$vertical_editor_attr.'>'.$svg.'</div>';
	return $return_html;
}

function thegem_image_shortcode($atts) {
	extract(shortcode_atts(array(
		'width' => '',
		'height' => '',
		'src' => '',
		'alt' => '',
		'style' => 'default',
		'position' => 'below',
		'disable_lightbox'=>'',
		'effects_enabled' => false,
		'effects_enabled_delay' => '',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
	), $atts, 'gem_image'));

	$css_style = $interactions_data = $delay = '';
	$classes = $style;
	if(!empty($width) && substr($width, -1) != "%") {
		$width = intval($width).'px';
	}
	if(!empty($height) && substr($height, -1) != "%") {
		$height = intval($height).'px';
	}
	if($width && $width > 0) {
		$css_style .= 'width: '.$width.';';
	}
	if($height && $height > 0) {
		$css_style .= 'height: '.$height.';';
	}
	if($style == '11') {
		$height = $width;
	}
	if ($effects_enabled) {
		thegem_lazy_loading_enqueue();
	}
	if(isset($effects_enabled_delay) && !empty($effects_enabled_delay)) {
		$delay = ' data-ll-item-delay="'.$effects_enabled_delay.'"';
	}

	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$classes .= ' gem-interactions-enabled';
	}

	$return_html = '<div class="gem-image gem-wrapbox gem-wrapbox-style-'.$classes.($position ? ' gem-wrapbox-position-'.$position : '') . ($effects_enabled ? ' lazy-loading' : '') .'"'.$interactions_data.' '.$delay.' style="'.$css_style.'">'.
		'<div class="gem-wrapbox-inner ' . ($effects_enabled ? ' lazy-loading-item' : '') . '" ' . ($effects_enabled ? ' data-ll-effect="move-up"' : '') . '>'.
		($style == '12' ? '<div class="shadow-wrap">' : '').
		(!$disable_lightbox ? '<a href="'.thegem_attachment_url($src).'" class="fancybox">' : '').
		'<img class="gem-wrapbox-element img-responsive'.($style == '11' ? ' img-circle' : '').'" src="'.thegem_attachment_url($src).'" alt="'.$alt.'"/>'.
		(!$disable_lightbox ? '</a>' : '').
		($style == '12' ? '</div>' : '').
		'</div>'.
		'</div>';
	if($position == 'centered') {
		$return_html = '<div class="centered-box gem-image-centered-box">'.$return_html.'</div>';
	}
	return $return_html;
}

function thegem_youtube_shortcode($atts) {
	extract(shortcode_atts(array(
		'width' => '100%',
		'height' => '300',
		'video_id' => '',
		'style' => 'no-style',
		'position' => 'below',
		'aspect_ratio' => ''
	), $atts, 'gem_youtube'));
	$css_style = '';
	$classes = $style;
	if($style != 11 && $style != 12) {
		$classes .= ' rounded-corners';
	}
	if(in_array($style, array(1, 5, 7))) {
		$classes .= ' shadow-box';
	}
	if(substr($width, -1) != "%") {
		$width = intval($width).'px';
	}
	if(substr($height, -1) != "%") {
		$height = intval($height).'px';
	}
	if($width && $width > 0) {
		$css_style .= 'width: '.$width.';';
	}
	$ratio_style = '';
	if($aspect_percents = thegem_aspect_ratio_to_percents($aspect_ratio)) {
		$ratio_style = 'padding-top: '.$aspect_percents.'%';
	} else {
		if($height && $height > 0) {
			$css_style .= 'height: '.$height.';';
		}
	}
	$return_html = '<div class="gem-youtube gem-wrapbox gem-wrapbox-style-'.$classes.($position ? ' gem-wrapbox-position-'.$position : '').'" style="'.$css_style.'">'.
		'<div class="gem-wrapbox-inner'.($ratio_style ? ' gem-ratio-style' : '').'"'.($ratio_style ? ' style="'.$ratio_style.'"' : '').'>'.
		($style == '12' ? '<div class="shadow-wrap">' : '').
		'<iframe class="gem-wrapbox-element img-responsive" width="'.$width.'" height="'.intval($height).'" allowfullscreen="allowfullscreen" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="//www.youtube.com/embed/'.$video_id.'?rel=0&amp;wmode=opaque"></iframe>'.

		($style == '12' ? '</div>' : '').
		'</div>'.
		'</div>';

	if (class_exists('TheGemGdpr')) {
		return TheGemGdpr::getInstance()->replace_disallowed_content($return_html, TheGemGdpr::CONSENT_NAME_YOUTUBE, array(
			'width'=>$width,
			'height'=>$height,
			'ratio_style'=>$ratio_style
		));
	}

	return $return_html;
}

function thegem_vimeo_shortcode($atts) {
	extract(shortcode_atts(array(
		'width' => '100%',
		'height' => '300',
		'video_id' => '',
		'style' => 'no-style',
		'position' => 'below',
		'aspect_ratio' => ''
	), $atts, 'gem_vimeo'));
	$css_style = '';
	$classes = $style;
	if($style != 11 && $style != 12) {
		$classes .= ' rounded-corners';
	}
	if(in_array($style, array(1, 5, 7))) {
		$classes .= ' shadow-box';
	}
	if(substr($width, -1) != "%") {
		$width = intval($width).'px';
	}
	if(substr($height, -1) != "%") {
		$height = intval($height).'px';
	}
	if($width && $width > 0) {
		$css_style .= 'width: '.$width.';';
	}
	$ratio_style = '';
	if($aspect_percents = thegem_aspect_ratio_to_percents($aspect_ratio)) {
		$ratio_style = 'padding-top: '.$aspect_percents.'%';
	} else {
		if($height && $height > 0) {
			$css_style .= 'height: '.$height.';';
		}
	}
	$return_html = '<div class="gem-vimeo gem-wrapbox gem-wrapbox-style-'.$classes.($position ? ' gem-wrapbox-position-'.$position : '').'" style="'.$css_style.'">'.
		'<div class="gem-wrapbox-inner'.($ratio_style ? ' gem-ratio-style' : '').'"'.($ratio_style ? ' style="'.$ratio_style.'"' : '').'>'.
		($style == '12' ? '<div class="shadow-wrap">' : '').
		'<iframe webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true" class="gem-wrapbox-element img-responsive" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="//player.vimeo.com/video/'.$video_id.'?title=0&amp;byline=0&amp;portrait=0 "></iframe>'.
		($style == '12' ? '</div>' : '').
		'</div>'.
		'</div>';

	if (class_exists('TheGemGdpr')) {
		return TheGemGdpr::getInstance()->replace_disallowed_content($return_html, TheGemGdpr::CONSENT_NAME_VIMEO, array(
			'width'=>$width,
			'height'=>$height,
			'ratio_style'=>$ratio_style
		));
	}

	return $return_html;
}

function thegem_video_shortcode($atts) {
	extract(shortcode_atts(array(
		'width' => '100%',
		'height' => '300',
		'video_src' => '',
		'image_src' => '',
		'style' => 'no-style',
		'position' => 'below',
		'aspect_ratio' => ''
	), $atts, 'gem_video'));
	$css_style = '';
	$classes = $style;
	if($style != 11 && $style != 12) {
		$classes .= ' rounded-corners';
	}
	if(in_array($style, array(1, 5, 7))) {
		$classes .= ' shadow-box';
	}
	if(substr($width, -1) != "%") {
		$width = intval($width).'px';
	}
	if(substr($height, -1) != "%") {
		$height = intval($height).'px';
	}
	if($width && $width > 0) {
		$css_style .= 'width: '.$width.';';
	}
	$ratio_style = '';
	if($aspect_percents = thegem_aspect_ratio_to_percents($aspect_ratio)) {
		$ratio_style = 'padding-top: '.$aspect_percents.'%';
	} else {
		if($height && $height > 0) {
			$css_style .= 'height: '.$height.';';
		}
	}
	$image_src = thegem_attachment_url($image_src);
	wp_enqueue_style('wp-mediaelement');
	wp_enqueue_script('thegem-mediaelement');
	$return_html = '<div class="gem-video gem-wrapbox gem-wrapbox-style-'.$classes.($position ? ' gem-wrapbox-position-'.$position : '').'" style="'.$css_style.'">'.
		'<div class="gem-wrapbox-inner video-block'.($ratio_style ? ' gem-ratio-style' : '').'"'.($ratio_style ? ' style="'.$ratio_style.'"' : '').'>'.
		($style == '12' ? '<div class="shadow-wrap video-block">' : '').
		'<video width="100%" height="100%" controls="controls" src="'.$video_src.'" '.($image_src ? ' poster="'.$image_src.'"' : '').' preload="none"></video>'.
		($style == '12' ? '</div>' : '').
		'</div>'.
		'</div>';
	return $return_html;
}

function thegem_textbox_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => 'default',
		'content_text_color' => '',
		'content_background_color' => '#f4f6f7',
		'content_background_image' => '',
		'content_background_overlay_color' => '',
		'content_background_style' => '',
		'content_background_position_horizontal' => 'center',
		'content_background_position_vertical' => 'top',
		'padding_top' => '',
		'padding_bottom' => '',
		'padding_left' => '',
		'padding_right' => '',
		'border_width' => '0',
		'border_color' => '',
		'border_radius' => '0',
		'rectangle_corner' => '',
		'top_style' => 'default',
		'bottom_style' => 'default',
		'icon_pack' => 'elegant',
		'icon_shape' => 'square',
		'icon_style' => '',
		'icon_elegant' => '',
		'icon_material' => '',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_userpack' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'icon_opacity' => '1',
		'title_content' => '',
		'title_text_color' => '',
		'title_background_color' => '',
		'title_padding_top' => '',
		'title_padding_bottom' => '',
		'picture' => '',
		'picture_position' => 'top',
		'disable_lightbox' => false,
		'centered' => '',
		'effects_enabled' => false,
		'effects_enabled_delay' => '',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_textbox'));
	$return_html = '';
	$title_html = '';
	$content_html = '';
	$top_html = '';
	$bottom_html = '';
	$css_style = '';
	$css_content_style = '';
	$rectangle_corner = explode(',', $rectangle_corner);
	$border_radius = intval($border_radius);
	$border_width = intval($border_width);
	$svg_top_color = '';
	$svg_bottom_color = '';

	if($style == 'title') {
		$css_title_style = '';
		if($title_text_color) {
			$css_title_style .= 'color: '.$title_text_color.';';
		}
		if($title_background_color) {
			$css_title_style .= 'background-color: '.$title_background_color.';';
			$svg_top_color = $title_background_color;
		}
		if(intval($title_padding_top) >= 0 && $title_padding_top !== '') {
			$css_title_style .= 'padding-top: '.intval($title_padding_top).'px;';
		}
		if(intval($title_padding_bottom) >= 0 && $title_padding_bottom !== '') {
			$css_title_style .= 'padding-bottom: '.intval($title_padding_bottom).'px;';
		}
		if(intval($padding_left) >= 0 && $padding_left !== '') {
			$css_title_style .= 'padding-left: '.intval($padding_left).'px;';
		}
		if(intval($padding_right) >= 0 && $padding_right !== '') {
			$css_title_style .= 'padding-right: '.intval($padding_right).'px;';
		}
		$title_html .= '<div class="gem-textbox-title" style="'.$css_title_style.'">';
		if(($icon_pack =='elegant' && $icon_elegant) || ($icon_pack =='material' && $icon_material) || ($icon_pack =='fontawesome' && $icon_fontawesome) || ($icon_pack =='thegem-header' && $icon_thegem_header) || ($icon_pack =='userpack' && $icon_userpack)) {
			$title_html .= '<div class="gem-textbox-title-icon">'.do_shortcode(thegem_build_icon_shortcode($atts)).'</div>';
		}
		if($title_content) {
			$title_html .= '<div class="gem-textbox-title-text">'.do_shortcode((rawurldecode(base64_decode($title_content)))).'</div>';
		}
		$title_html .= '</div>';
	}
	if($style == 'picturebox' && $picture) {
		$title_html .= '<div class="gem-textbox-picture centered-box">';
		if($disable_lightbox) {
			$title_html .= '<img src="'.thegem_attachment_url($picture).'" alt="'.trim( strip_tags( get_post_meta( $picture, '_wp_attachment_image_alt', true ) ) ).'" class="img-responsive" />';
		} else {
			$title_html .= '<a href="'.thegem_attachment_url($picture).'" class="fancy"><img src="'.thegem_attachment_url($picture).'" alt="'.trim( strip_tags( get_post_meta( $picture, '_wp_attachment_image_alt', true ) ) ).'" class="img-responsive" /></a>';
		}
		$title_html .= '</div>';
	}

	if($content_text_color) {
		$css_content_style .= 'color: '.$content_text_color.';';
	}
	if($content_background_color) {
		$css_content_style .= 'background-color: '.$content_background_color.';';
		$svg_top_color = $svg_top_color ? $svg_top_color : $content_background_color;
		$svg_bottom_color = $content_background_color;
	}
	if($content_background_image = thegem_attachment_url($content_background_image)) {
		$css_content_style .= 'background-image: url('.$content_background_image.');';
	}
	if($content_background_style == 'cover') {
		$css_content_style .= 'background-repeat: no-repeat; background-size: cover;';
	}
	if($content_background_style == 'contain') {
		$css_content_style .= 'background-repeat: no-repeat; background-size: contain;';
	}
	if($content_background_style == 'repeat') {
		$css_content_style .= 'background-repeat: repeat;';
	}
	if($content_background_style == 'no-repeat') {
		$css_content_style .= 'background-repeat: no-repeat;';
	}
	$css_content_style .= 'background-position: '.$content_background_position_horizontal.' '.$content_background_position_vertical.';';

	if(intval($padding_top) >= 0 && $padding_top !== '') {
		$css_content_style .= 'padding-top: '.intval($padding_top).'px;';
	}
	if(intval($padding_bottom) >= 0 && $padding_bottom !== '') {
		$css_content_style .= 'padding-bottom: '.intval($padding_bottom).'px;';
	}
	if(intval($padding_left) >= 0 && $padding_left !== '') {
		$css_content_style .= 'padding-left: '.intval($padding_left).'px;';
	}
	if(intval($padding_right) >= 0 && $padding_right !== '') {
		$css_content_style .= 'padding-right: '.intval($padding_right).'px;';
	}

	$content_html .= '<div class="gem-textbox-content" style="'.$css_content_style.'">' . ($content_background_overlay_color ? '<div class="gem-textbox-background-overlay" style="background-color: '.$content_background_overlay_color.'"></div>' : '') . do_shortcode($content).'</div>';

	if($border_width && $border_color) {
		$css_style .= 'border: '.$border_width.'px solid '.$border_color.';';
		$svg_top_color = $border_color;
		$svg_bottom_color = $border_color;
	}

	if($top_style == 'flag') {
		$rectangle_corner = array_merge($rectangle_corner, array('lt', 'rt'));
		$top_html = '<div class="gem-textbox-top gem-textbox-top-flag"><svg viewBox="0 0 1000 20" preserveAspectRatio="none" width="100%" height="20" style="fill: '.$svg_top_color.';"><path d="M 0,20.5 0,0 500,20.5 1000,0 1000,20.5" /></svg></div>';
	}
	if($top_style == 'shield') {
		$rectangle_corner = array_merge($rectangle_corner, array('lt', 'rt'));
		$top_html = '<div class="gem-textbox-top gem-textbox-top-shield"><svg viewBox="0 0 1000 50" preserveAspectRatio="none" width="100%" height="50" style="fill: '.$svg_top_color.';"><path d="M 0,50.5 500,0 1000,50.5" /></svg></div>';
	}
	if($top_style == 'ticket') {
		$rectangle_corner = array_merge($rectangle_corner, array('lt', 'rt'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$top_html = '<div class="gem-textbox-top gem-textbox-top-ticket"><svg width="100%" height="14" style="fill: '.$svg_top_color.';"><defs><pattern id="'.$pattern_id.'" x="16" y="0" width="32" height="16" patternUnits="userSpaceOnUse" ><path d="M 0,14.5 16,-0.5 32,14.5" /></pattern></defs><rect x="0" y="0" width="100%" height="14" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}
	if($top_style == 'sentence') {
		$top_html = '<div class="gem-textbox-top gem-textbox-top-sentence"><svg width="100" height="50" style="fill: '.$svg_top_color.';"><path d="M 0,51 Q 45,45 50,0 Q 55,45 100,51" /></svg></div>';
	}
	if($top_style == 'note-1') {
		$rectangle_corner = array_merge($rectangle_corner, array('lt', 'rt'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$top_html = '<div class="gem-textbox-top gem-textbox-top-note-1"><svg width="100%" height="31" style="fill: '.$svg_top_color.';"><defs><pattern id="'.$pattern_id.'" x="11" y="0" width="23" height="32" patternUnits="userSpaceOnUse" ><path d="M20,9h3V0H0v9h3c2.209,0,4,1.791,4,4v6c0,2.209-1.791,4-4,4H0v9h23v-9h-3c-2.209,0-4-1.791-4-4v-6C16,10.791,17.791,9,20,9z" /></pattern></defs><rect x="0" y="0" width="100%" height="32" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}
	if($top_style == 'note-2') {
		$rectangle_corner = array_merge($rectangle_corner, array('lt', 'rt'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$top_html = '<div class="gem-textbox-top gem-textbox-top-note-1"><svg width="100%" height="27" style="fill: '.$svg_top_color.';"><defs><pattern id="'.$pattern_id.'" x="10" y="0" width="20" height="28" patternUnits="userSpaceOnUse" ><path d="M20,8V0H0v8c3.314,0,6,2.687,6,6c0,3.313-2.686,6-6,6v8h20v-8c-3.313,0-6-2.687-6-6C14,10.687,16.687,8,20,8z" /></pattern></defs><rect x="0" y="0" width="100%" height="28" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}
	if($bottom_style == 'flag') {
		$rectangle_corner = array_merge($rectangle_corner, array('lb', 'rb'));
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-flag"><svg viewBox="0 0 1000 20" preserveAspectRatio="none" width="100%" height="20" style="fill: '.$svg_bottom_color.';"><path d="M 0,-0.5 0,20 500,0 1000,20 1000,-0.5" /></svg></div>';
	}
	if($bottom_style == 'shield') {
		$rectangle_corner = array_merge($rectangle_corner, array('lb', 'rb'));
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-shield"><svg viewBox="0 0 1000 50" preserveAspectRatio="none" width="100%" height="50" style="fill: '.$svg_bottom_color.';"><path d="M 0,-0.5 500,50 1000,-0.5" /></svg></div>';
	}
	if($bottom_style == 'ticket') {
		$rectangle_corner = array_merge($rectangle_corner, array('lb', 'rb'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-ticket"><svg width="100%" height="14" style="fill: '.$svg_bottom_color.';"><defs><pattern id="'.$pattern_id.'" x="16" y="-1" width="32" height="16" patternUnits="userSpaceOnUse" ><path d="M 0,-0.5 16,14.5 32,-0.5" /></pattern></defs><rect x="0" y="-1" width="100%" height="14" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}
	if($bottom_style == 'sentence') {
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-sentence"><svg width="100" height="50" style="fill: '.$svg_bottom_color.';"><path d="M 0,-1 Q 45,5 50,50 Q 55,5 100,-1" /></svg></div>';
	}
	if($bottom_style == 'note-1') {
		$rectangle_corner = array_merge($rectangle_corner, array('lb', 'rb'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-note-1"><svg width="100%" height="32" style="fill: '.$svg_bottom_color.';"><defs><pattern id="'.$pattern_id.'" x="11" y="-1" width="23" height="32" patternUnits="userSpaceOnUse" ><path d="M20,9h3V0H0v9h3c2.209,0,4,1.791,4,4v6c0,2.209-1.791,4-4,4H0v9h23v-9h-3c-2.209,0-4-1.791-4-4v-6C16,10.791,17.791,9,20,9z" /></pattern></defs><rect x="0" y="-1" width="100%" height="32" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}
	if($bottom_style == 'note-2') {
		$rectangle_corner = array_merge($rectangle_corner, array('lb', 'rb'));
		$pattern_id = 'pattern-'.time().'-'.rand(0, 100);
		$bottom_html = '<div class="gem-textbox-bottom gem-textbox-bottom-note-2"><svg width="100%" height="28" style="fill: '.$svg_bottom_color.';"><defs><pattern id="'.$pattern_id.'" x="10" y="-1" width="20" height="28" patternUnits="userSpaceOnUse" ><path d="M20,8V0H0v8c3.314,0,6,2.687,6,6c0,3.313-2.686,6-6,6v8h20v-8c-3.313,0-6-2.687-6-6C14,10.687,16.687,8,20,8z" /></pattern></defs><rect x="0" y="-1" width="100%" height="28" style="fill: url(#'.$pattern_id.');" /></svg></div>';
	}

	if($border_radius) {
		if(!in_array('lt', $rectangle_corner)) {
			$css_style .= 'border-top-left-radius: '.$border_radius.'px;';
		}
		if(!in_array('rt', $rectangle_corner)) {
			$css_style .= 'border-top-right-radius: '.$border_radius.'px;';
		}
		if(!in_array('rb', $rectangle_corner)) {
			$css_style .= 'border-bottom-right-radius: '.$border_radius.'px;';
		}
		if(!in_array('lb', $rectangle_corner)) {
			$css_style .= 'border-bottom-left-radius: '.$border_radius.'px;';
		}
	}

	if ($effects_enabled) {
		thegem_lazy_loading_enqueue();
	}
	$delay = 'data-ll-item-delay="0"';
	if(isset($effects_enabled_delay) && !empty($effects_enabled_delay)) {
		$delay = ' data-ll-item-delay="'.$effects_enabled_delay.'"';
	}

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	if($style == 'picturebox' && $picture) {

		if($picture_position == 'top') {
			$return_html = ($effects_enabled ? '<div class="lazy-loading" '.$delay.'>' : '').'<div class="gem-textbox '.$class.''.($effects_enabled ? ' lazy-loading-item' : '').($centered ? ' centered-box' : '').'" '.($effects_enabled ? ' data-ll-effect="move-up"' : '').' '.$interactions_data.'>'.$top_html.$title_html.'<div class="gem-textbox-inner gem-textbox-after-image" style="'.$css_style.'">'.$content_html.'</div>'.$bottom_html.'</div>'.($effects_enabled ? '</div>' : '');
		}
		if($picture_position == 'bottom') {
			$return_html = ($effects_enabled ? '<div class="lazy-loading" '.$delay.'>' : '').'<div class="gem-textbox '.$class.''.($effects_enabled ? ' lazy-loading-item' : '').($centered ? ' centered-box' : '').'" '.($effects_enabled ? ' data-ll-effect="move-up"' : '').' '.$interactions_data.'>'.$top_html.'<div class="gem-textbox-inner gem-textbox-before-image" style="'.$css_style.'">'.$content_html.'</div>'.$title_html.$bottom_html.'</div>'.($effects_enabled ? '</div>' : '');
		}
	} else {
		$return_html = ($effects_enabled ? '<div class="lazy-loading" '.$delay.'>' : '').'<div class="gem-textbox '.$class.''.($effects_enabled ? ' lazy-loading-item' : '').($centered ? ' centered-box' : '').'" '.($effects_enabled ? ' data-ll-effect="move-up"' : '').' '.$interactions_data.'>'.$top_html.'<div class="gem-textbox-inner" style="'.$css_style.'">'.$title_html.$content_html.'</div>'.$bottom_html.'</div>'.($effects_enabled ? '</div>' : '');
	}

	return $return_html;
}

function thegem_quote_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => 'default',
		'no_paddings' => '',
		'background_color' => '',
		'border_color' => '',
		'text_color' => '',
		'quote_color' => '',
		'custom_style' => '',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_quote'));
	$add_custom_styles = '';
	$add_custom_styles_blockqute = '';
	$add_custom_styles_blockqute_mark = '';
	$custom_css_style = '';

	if($background_color) {
		$custom_css_style .= 'background-color: '.$background_color.'; ';
	}
	if($border_color) {
		$custom_css_style .= 'border-color: '.$border_color.'; ';
	}
	if($text_color) {
		$custom_css_style .= 'color: '.$text_color.'; ';
	}
	if($custom_style == 1) {
		$add_custom_styles .=  "style='$custom_css_style'";
	}
	if($custom_style == 1 and $text_color and ($style == 'default' or $style == '3' or $style == '1'))  {
		$add_custom_styles_blockqute .=  "style='color: $text_color ; border-color: $border_color '";
	}
	if ($quote_color ) {
		$add_custom_styles_blockqute_mark .=  '<span style=color:'.$quote_color .';  class="custom-color-blockqute-mark">&#xe60c;</span>' ;
	};

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	$return_html = '<div '. $add_custom_styles .'  class="gem-quote'.($style ? ' gem-quote-style-'.$style : '').($no_paddings ? ' gem-quote-no-paddings' : '').($quote_color ? ' custom-color-blockqute-mark-added' : '').''.$class.'" '.$interactions_data.'><blockquote '. $add_custom_styles_blockqute .' >'.do_shortcode($content).'</blockquote>' . $add_custom_styles_blockqute_mark . '</div>';
	return $return_html;
}

function thegem_list_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'type' => '',
		'color' => '',
		'effects_enabled' => false,
		'effects_enabled_delay' => ''
	), $atts, 'gem_list'));
	$delay = '';
	if ($effects_enabled) {
		thegem_lazy_loading_enqueue();
	}
	if(isset($effects_enabled_delay) && !empty($effects_enabled_delay)) {
		$delay = 'data-ll-item-delay="'.$effects_enabled_delay.'"';
	}
	$return_html = '<div class="gem-list' . ($effects_enabled ? ' lazy-loading' : '') .($type ? ' gem-list-type-'.$type : '').($color ? ' gem-list-color-'.$color : '').'" '.$delay.'>'.thegem_remove_wpautop($content, true).'</div>';
	return $return_html;
}

function thegem_table_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => '1',
		'row_headers' => '',
		'deactivate_responsive' => ''
	), $atts, 'gem_table'));
	wp_enqueue_script('jquery-restable');
	$return_html = '<div class="gem-table '.($deactivate_responsive ? '' : 'gem-table-responsive').($style ? ' gem-table-style-'.$style : '').($row_headers ? ' row-headers' : '').'">'.thegem_remove_wpautop($content, true).'</div>';
	return $return_html;
}

function thegem_quickfinder_shortcode($atts) {
	ob_start();
	thegem_quickfinder($atts);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_team_shortcode($atts) {
	extract(shortcode_atts(array(
		'team' => '',
		'style' => '1',
		'columns' => '3',
		'centered' => '',
		'background_color' => '',
		'border_color' => '',
		'bottom_border_color' => '',
		'image_border_color' => '',
		'name_color' => '',
		'position_color' => '',
		'desc_color' => '',
		'tel_color' => '',
		'mail_color' => '',
		'socials_color' => '',
		'hover_background_color' => '',
		'hover_border_color' => '',
		'hover_bottom_border_color' => '',
		'hover_image_border_color' => '',
		'hover_name_color' => '',
		'hover_position_color' => '',
		'hover_desc_color' => '',
		'hover_tel_color' => '',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_team'));
	$style = thegem_check_array_value(array(1,2,3,4,5,6), $style, 1);
	$columns = thegem_check_array_value(array('1', '2', '3', '4'), $columns, '3');

	$hover_colors = array();
	foreach((array)$atts as $key => $value) {
		if(substr($key, 0, 6) == 'hover_' && !empty($value)) {
			$hover_colors[substr($key, 6)] = $value;
		}
	}

	$class = $interactions_data = '';
	$vars_interactions = array();
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
	}

	ob_start();
	thegem_team(
		array_merge(
			array('team' => $team, 'style' => 'style-' . $style, 'columns' => $columns, 'centered' => $centered, 'background_color' => $background_color, 'border_color' => $border_color, 'bottom_border_color' => $bottom_border_color, 'image_border_color' => $image_border_color, 'name_color' => $name_color, 'position_color' => $position_color, 'desc_color' => $desc_color, 'tel_color' => $tel_color, 'mail_color' => $mail_color, 'socials_color' => $socials_color, 'hover_colors' => $hover_colors),
			$vars_interactions
		)
	);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_gallery_shortcode($atts) {

	if (!isset($atts['new_default_highlights'])) {
		if (!isset($atts['gallery_ignore_highlights'])) {
			$atts['gallery_ignore_highlights'] = '';
		}
	}

	$atts = vc_map_get_attributes('gem_gallery', $atts);

	$atts['columns_desktop'] = $atts['gallery_layout'];
	unset($atts['gallery_layout']);
	$atts['columns_100'] = $atts['gallery_fullwidth_columns'];
	unset($atts['gallery_fullwidth_columns']);

	foreach ($atts as $key => $value) {
		if (strpos($key, 'gallery_') !== false) {
			$atts[str_replace('gallery_','', $key)] = $value;
			unset($atts[$key]);
		}
	}

	ob_start();

	if($atts['type'] == 'slider') {
		$atts['layout'] = $atts['slider_layout'];
		unset($atts['slider_layout']);
		thegem_gallery($atts);
	} else {
		$atts['layout'] = $atts['style'];
		unset($atts['gallery_style']);
		thegem_gallery_block($atts);
	}

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_vc_get_galleries() {
	$galleries_posts = get_posts(array(
		'post_type' => 'thegem_gallery',
		'posts_per_page' => -1,
		'orderby' => 'title',
		'order' => 'ASC',
	));
	$galleries = array();
	foreach($galleries_posts as $gallery) {
		$galleries[$gallery->post_title.' (ID='.$gallery->ID.')'] = $gallery->ID;
	}
	return $galleries;
}

function thegem_pricing_table_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => '1',
		'button_icon' => 'default',
			/*interactions*/
	'interactions_enabled' => '',
	'vertical_scroll' => '',
	'vertical_scroll_direction' => 'vertical_scroll_direction_up',
	'vertical_scroll_speed' => '3',
	'vertical_scroll_viewport_bottom' => '0',
	'vertical_scroll_viewport_top' => '100',
	'horizontal_scroll' => '',
	'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
	'horizontal_scroll_speed' => '3',
	'horizontal_scroll_viewport_bottom' => '0',
	'horizontal_scroll_viewport_top' => '100',
	'mouse_effects' => '',
	'mouse_effects_direction' => 'mouse_effects_direction_opposite',
	'mouse_effects_speed' => '3',
	'disable_effects_desktop' => '',
	'disable_effects_tablet' => '',
	'disable_effects_mobile' => ''
		/*END interactions*/
	), $atts, 'gem_pricing_table'));

	wp_enqueue_style('thegem-pricing-tables');
	$style = thegem_check_array_value(array(1, 2, 3, 4, 5, 6, 7, 8) ,$style, 1);
	$content = str_replace('[gem_pricing_price', '[gem_pricing_price use_style="'.$style.'" ',$content);

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	$return_html = '<div class="pricing-table row inline-row inline-row-center pricing-table-style-'.$style.' button-icon-'.$button_icon.''.$class.'" '.$interactions_data.'>';
	$return_html.= do_shortcode($content);
	$return_html.= '</div>';

	return $return_html;
}

function thegem_pricing_column_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'highlighted' => '0',
		'top_choice' => '',
		'top_choice_color' => '',
		'top_choice_background_color' => '',
		'label_top_corner' => 0,
		'cols' => 4,
	), $atts, 'gem_pricing_column'));
	$path = THEGEM_THEME_URI.'/images/star.svg#star';
	$fill_svg_color ='';
	if ($top_choice_background_color) {
		$fill_svg_color =  "style=fill:$top_choice_background_color;";
	}
	$fill_svg = '<svg class="svg_pricing" '.$fill_svg_color.'><use xlink:href='.$path.'></use></svg>';
	$return_html = '
	<div class="pricing-column-wrapper ' .($cols == 4  ? 'col-md-3 col-sm-4 col-xs-6 ' : ''). ($cols == 3  ? 'col-md-4 col-sm-4 col-xs-6 ' : ''). ' inline-column'.($highlighted == '1' ? ' highlighted' : '').'">'
		.($top_choice ?
			'<div ' .($top_choice_background_color ? 'style=background-color:'.$top_choice_background_color.'' : ''). '  class="pricing-column-top-choice">'.$fill_svg.'
		<div ' .($top_choice_color ? 'style=color:'.$top_choice_color.'' : ''). ' class="pricing-column-top-choice-text">'.$top_choice.'</div></div>' : '').
		'<div class="pricing-column'.($label_top_corner == '1' ? ' label-top-corner' : '').'">';
	$return_html.= do_shortcode($content);
	$return_html.= '</div></div>';
	return $return_html;
}

function thegem_pricing_price_shortcode($atts) {
	if (!empty($atts['title'])) {
		$atts['title'] = vc_value_from_safe($atts['title']);
	}

	if (!empty($atts['subtitle'])) {
		$atts['subtitle'] = vc_value_from_safe($atts['subtitle']);
	}

	if (!empty($atts['currency'])) {
		$atts['currency'] = vc_value_from_safe($atts['currency']);
	}

	if (!empty($atts['price'])) {
		$atts['price'] = vc_value_from_safe($atts['price']);
	}

	if (!empty($atts['time'])) {
		$atts['time'] = vc_value_from_safe($atts['time']);
	}

	extract(shortcode_atts(array(
		'title' => '',
		'subtitle' => '',
		'currency' => '',
		'price' => '',
		'time' => '',
		'font_size' => '',
		'color' => '',
		'use_style' => '',
		'background' => '',
		'backgroundcolor' => '',
		'font_size' => '',
		'price_color' => '',
		'title_color' => '',
		'subtitle_color' => '',
		'time_color' => '',
		'font_size_time' => ''

	), $atts, 'gem_pricing_price'));

	$svg_fill= '';
	if ($backgroundcolor) { $svg_fill = "style='fill:$backgroundcolor'";}
	$url = THEGEM_THEME_URI . '/css/post-arrow.svg#dec-post-arrow';
	$bottom_html = '<svg ' .$svg_fill. ' class="wrap-style"><use xlink:href='.$url.' /></use></svg>';
	$background = thegem_attachment_url($background);
	$return_html = '
	 <div class="pricing-price-row '.($background ? 'pricing-price-row-width-background' : '').' "  style="'.($background ? ' background-image: url('.$background.');' : '') . ($backgroundcolor ? ' background-color: '.$backgroundcolor.'; ' : '') . ($price_color ? 'color:'.$price_color.'; ' : '') .'">

		'.($title ? '<div class="pricing-price-title-wrapper">
		<div '.($title_color ? 'style=color:'.$title_color.'' : '').'  class="pricing-price-title">'.$title.'</div>
		<div '.($subtitle_color ? 'style=color:'.$subtitle_color.'' : '').' class="pricing-price-subtitle">'.$subtitle.'</div>
		</div>' : '').'

		<div class="pricing-price-wrapper"><div class="pricing-price'.($background ? ' pricing-price-row-background' : '').'" style="'.($background ? ' background-image: url('.$background.');' : '') . ($backgroundcolor ? ' background-color: '.$backgroundcolor.'; ' : '') .'">'.
		'<div style=" '.($price_color ? 'color:'.$price_color.'; ' : '') .($font_size != '' ? 'font-size: '.$font_size.'px;' : '').'" class="pricing-cost">'.$currency.$price.'</div>'.($time != '' ? '<div  class="time" style= ' .'display:inline-block;'  . ($time_color ? 'color:'.$time_color.';' : '') . ($font_size_time ? 'font-size:'.$font_size_time.'px; ' : '') .'>'.$time.'</div>' : '').
		'</div></div>'
		.$bottom_html.
		'</div>';

	return do_shortcode($return_html);
}

function thegem_pricing_row_shortcode($atts, $content) {
	if (!empty($atts['strike'])) {
		$atts['strike'] = vc_value_from_safe($atts['strike']);
	}

	extract(shortcode_atts(array(
		'strike' => '',
	), $atts, 'gem_pricing_row'));

	$return_html = '<figure class="pricing-row'.($strike == '1' ? ' strike' : '').'">'.$content.'</figure>';
	return do_shortcode($return_html);
}
function thegem_pricing_row_title_shortcode($atts, $content) {
	if (!empty($atts['subtitle'])) {
		$atts['subtitle'] = vc_value_from_safe($atts['subtitle']);
	}

	extract(shortcode_atts(array(
		'subtitle' => '',
		'title_color' => '',
		'subtitle_color' => '',
	), $atts, 'gem_pricing_row_title'));
	$return_html = '<div class="pricing-row pricing-row-title"><div '.($title_color ? "style='color: $title_color'" :'').' class="pricing_row_title">'.$content.'</div>'.($subtitle ? '<div '.($subtitle_color ? "style='color: $subtitle_color'" :'').'  class="pricing_row_subtitle">'.$subtitle.'</div>' : ''). '</div>';
	return do_shortcode($return_html);
}

function thegem_pricing_footer_shortcode($atts, $content) {
	if (!empty($atts['button_1_text'])) {
		$atts['button_1_text'] = vc_value_from_safe($atts['button_1_text']);
	}

	extract(shortcode_atts(array(
		'href' => '#',
		'button_1_text' => '',
		'button_1_link' => '',
		'button_1_style' => 'center',
		'button_1_size' => 'small',
		'button_1_text_weight' => 'normal',
		'button_1_no_uppercase' => 0,
		'button_1_corner' => 3,
		'button_1_border' => 2,
		'button_1_position' => 'center',
		'button_1_text_color' => '',
		'button_1_background_color' => '',
		'button_1_border_color' => '',
		'button_1_hover_text_color' => '',
		'button_1_hover_background_color' => '',
		'button_1_hover_border_color' => '',
		'button_1_icon_pack' => 'elegant',
		'button_1_icon_elegant' => '',
		'button_1_icon_material' => '',
		'button_1_icon_fontawesome' => '',
		'button_1_icon_thegem_header' => '',
		'button_1_icon_userpack' => '',
		'button_1_icon_position' => 'left',
		'button_1_separator' => '',
		'button_1_extra_class' => '',
	), $atts, 'gem_pricing_footer'));
	$button1 = array();
	foreach($atts as $key => $value) {
		if(substr($key, 0, 9) == 'button_1_') {
			$button1[substr($key, 9)] = $value;
		}
	}
	$button1['position'] = 'center';
	$return_html = '<div class="pricing-footer">'.thegem_button_shortcode($button1).'</div>';
	return do_shortcode($return_html);
}

function thegem_icon_shortcode($atts) {
	extract(shortcode_atts(array(
		'pack' => 'material',
		'icon' => '',
		'icon_elegant' => '',
		'icon_material' => 'f287',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'shape' => 'square',
		'style' => '',
		'color' => '',
		'color_2' => '',
		'background_color' => '',
		'border_color' => '',
		'size' => 'small',
		'icon_opacity' => '1',
		'link' => '',
		'link_target' => '_self',
		'centered' => '',
		'icon_top_margin' => '0',
		'icon_bottom_margin' => '0',
		'css_style' => '',
		'gradient_backgound' => '',
		'gradient_backgound_from' => '#fff',
		'gradient_backgound_to' => '#000',
		'gradient_backgound_style' => 'linear',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '180',
		'gradient_radial_backgound_position' => 'at top',
		'gradient_color_style' => 'linear',
		'gradient_color_angle' => 'to bottom',
		'gradient_color_cusotom_deg' => '180',
		'gradient_radial_color_position' => 'at top',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_icon'));
	if($pack =='elegant' && empty($icon) && $icon_elegant) {
		$icon = $icon_elegant;
	}
	if($pack =='material' && empty($icon) && $icon_material) {
		$icon = $icon_material;
	}
	if($pack =='fontawesome' && empty($icon) && $icon_fontawesome) {
		$icon = $icon_fontawesome;
	}
	if($pack =='thegem-header' && empty($icon) && $icon_thegem_header) {
		$icon = $icon_thegem_header;
	}
	if($pack =='thegemdemo' && empty($icon) && $icon_thegemdemo) {
		$icon = $icon_thegemdemo;
	}
	if($pack =='userpack' && empty($icon) && $icon_userpack) {
		$icon = $icon_userpack;
	}
	wp_enqueue_style('icons-'.$pack);
	$shape = thegem_check_array_value(array('circle', 'square', 'romb', 'hexagon'), $shape, 'square');
	$style = thegem_check_array_value(array('', 'angle-45deg-r', 'angle-45deg-l', 'angle-90deg', 'gradient'), $style, '');
	$size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $size, 'small');
	$link = esc_url($link);
	$link_target = thegem_check_array_value(array('_self', '_blank'), $link_target, '_self');
	$css_style_icon = '';
	$css_style_icon_background = '';
	$css_style_icon_1 = '';
	$css_style_icon_2 = '';
	$css_style_icon_3 = '';

	if($css_style) {
		$css_style_icon .= esc_attr($css_style);
	}

	if ($gradient_backgound_angle == 'cusotom_deg') {
		$gradient_backgound_angle = $gradient_backgound_cusotom_deg.'deg';
	}
	if($gradient_backgound and $gradient_backgound_style == 'linear') {
		$css_style_icon_background .= 'background: linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	if($gradient_backgound and $gradient_backgound_style == 'radial') {
		$css_style_icon_background .= 'background: radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}

	if($background_color) {
		$css_style_icon_background .= 'background-color: '.$background_color.';';
		if(!$border_color || !$style == 'gradient') {
			$css_style_icon .= 'border-color: '.$background_color.';';
		}
	}

	if(intval($icon_top_margin)) {
		$css_style_icon .= 'margin-top: '.intval($icon_top_margin).'px;';
	}
	if(intval($icon_bottom_margin)) {
		$css_style_icon .= 'margin-bottom: '.intval($icon_bottom_margin).'px;';
	}
	if($border_color) {
		$css_style_icon .= 'border-color: '.$border_color.';';
	}
	if($icon_opacity) {
		$css_style_icon .= 'opacity: '.$icon_opacity.';';
	}

	$simple_icon = '';
	if(!($background_color || $border_color || $gradient_backgound)) {
		$simple_icon = ' gem-simple-icon';
	}

	if($color = $color) {
		$css_style_icon_1 = 'color: '.$color.';';
		if(($color_2 = $color_2) && $style) {
			$css_style_icon_2 = 'color: '.$color_2.';';
		} else {
			$css_style_icon_2 = 'color: '.$color.';';
		}

		if ($gradient_color_angle == 'cusotom_deg') {
			$gradient_color_angle = $gradient_color_cusotom_deg.'deg';
		}

		if( $gradient_color_style == 'linear') {
			$css_style_icon_3 .= 'background: linear-gradient( '.$gradient_color_angle.', '.$color.', '.$color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
		if ($gradient_color_style == 'radial') {
			$css_style_icon_3 .= 'background: radial-gradient( '.$gradient_radial_color_position.', '.$color.', '.$color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
	}
	if(!empty($icon)) {
		if ($style != 'gradient'){
			$output = '<span class="gem-icon-half-1" style="' . $css_style_icon_1 . '"><span class="back-angle">&#x' . $icon . ';</span></span>'.
				'<span class="gem-icon-half-2" style="' . $css_style_icon_2 . '"><span class="back-angle">&#x' . $icon . ';</span></span>';
		}
		else {
			$output = '<span class="gem-icon-style-gradient"><span style="'. $css_style_icon_3 . '" class="back-angle">&#x' . $icon . ';</span></span>';
		}
	}
	if($shape == "romb") {'';}
	if($shape == "romb") {'</div> ';}

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	$return_html = '<div class="gem-icon gem-icon-pack-'.$pack.' gem-icon-size-'.$size.' '.$style.' gem-icon-shape-'.$shape.$simple_icon.''.$class.'" '.$interactions_data.' style="'.$css_style_icon.'">'.

		($shape == 'hexagon' ? '<div class="gem-icon-shape-hexagon-back"><div class="gem-icon-shape-hexagon-back-inner"><div class="gem-icon-shape-hexagon-back-inner-before" style="background-color: '.($border_color ? $border_color : $background_color).'"></div></div></div><div class="gem-icon-shape-hexagon-top"><div class="gem-icon-shape-hexagon-top-inner"><div class="gem-icon-shape-hexagon-top-inner-before" style="'.$css_style_icon_background.'"></div></div></div>' : '').
		'<div class="gem-icon-inner" style="'.$css_style_icon_background.'">'.
		($shape == 'romb' ? '<div class="romb-icon-conteiner">' : '').
		($link ? '<a href="'.$link.'" target="'.$link_target.'">' : ''). $output .($link ? '</a>' : '').
		($shape == 'romb' ? '</div>' : '').
		'</div>'.
		'</div>';
	return ($centered ? '<div class="centered-box">' : '').$return_html.($centered ? '</div>' : '');
}

function thegem_build_icon_shortcode($atts) {
	extract(shortcode_atts(array(
		'icon_pack' => 'material',
		'icon' => '',
		'icon_shape' => 'square',
		'icon_style' => '',
		'icon_elegant' => '',
		'icon_material' => 'f287',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'icon_opacity' => '1',
		'icon_link' => '',
		'icon_link_target' => '_self',
		'css_style' => '',
		'icon_gradient_backgound' => '',
		'icon_gradient_backgound_from' => '#fff',
		'icon_gradient_backgound_to' => '#000',
		'icon_gradient_backgound_style' => 'linear',
		'icon_gradient_backgound_angle' => 'to bottom',
		'icon_gradient_backgound_cusotom_deg' => '180',
		'icon_gradient_radial_backgound_position' => 'at top',
		'icon_gradient_color_style' => 'linear',
		'icon_gradient_color_angle' => 'to bottom',
		'icon_gradient_color_cusotom_deg' => '180',
		'icon_gradient_radial_color_position' => 'at top',

	), $atts, 'gem_icon'));

	if($icon_pack =='elegant' && empty($icon) && $icon_elegant) {
		$icon = $icon_elegant;
	}
	if($icon_pack =='material' && empty($icon) && $icon_material) {
		$icon = $icon_material;
	}
	if($icon_pack =='fontawesome' && empty($icon) && $icon_fontawesome) {
		$icon = $icon_fontawesome;
	}
	if($icon_pack =='thegem-header' && empty($icon) && $icon_thegem_header) {
		$icon = $icon_thegem_header;
	}
	if($icon_pack =='thegemdemo' && empty($icon) && $icon_thegemdemo) {
		$icon = $icon_thegemdemo;
	}
	if($icon_pack =='userpack' && empty($icon) && $icon_userpack) {
		$icon = $icon_userpack;
	}
	$icon_shortcode = '[gem_icon pack="'.$icon_pack.
		'" icon="'.$icon.
		'" shape="'.$icon_shape.
		'" style="'.$icon_style.
		'" color="'.$icon_color.
		'" color_2="'.$icon_color_2.
		'" background_color="'.$icon_background_color.
		'" border_color="'.$icon_border_color.
		'" size="'.$icon_size.
		'" opacity="'.$icon_opacity.
		'" link="'.$icon_link.
		'" link_target="'.$icon_link_target.
		'" gradient_backgound="'.$icon_gradient_backgound.
		'" gradient_backgound_from="'.$icon_gradient_backgound_from.
		'" gradient_backgound_to="'.$icon_gradient_backgound_to.
		'" gradient_backgound_style="'.$icon_gradient_backgound_style.
		'" gradient_backgound_angle="'.$icon_gradient_backgound_angle.
		'" gradient_backgound_cusotom_deg="'.$icon_gradient_backgound_cusotom_deg.
		'" gradient_radial_backgound_position="'.$icon_gradient_radial_backgound_position.
		'" gradient_color_style="'.$icon_gradient_color_style.
		'" gradient_color_angle="'.$icon_gradient_color_angle.
		'" gradient_color_cusotom_deg="'.$icon_gradient_color_cusotom_deg.
		'" gradient_radial_color_position="'.$icon_gradient_radial_color_position.
		'" css_style="'.$css_style.'"]';

	return $icon_shortcode;

}

function thegem_build_icon_with_title_shortcode($atts) {
	extract(shortcode_atts(array(
		'icon_pack' => 'material',
		'icon' => '',
		'icon_elegant' => '',
		'icon_material' => 'f287',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'icon_shape' => 'circle',
		'icon_style' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'title' => '',
		'level' => 'h6',
		'title_color' => '',
		'icon_gradient_backgound' => '',
		'icon_gradient_backgound_from' => '#fff',
		'icon_gradient_backgound_to' => '#000',
		'icon_gradient_backgound_style' => 'linear',
		'icon_gradient_backgound_angle' => 'to bottom',
		'icon_gradient_backgound_cusotom_deg' => '180',
		'icon_gradient_radial_backgound_position' => 'at top',
		'icon_gradient_color_style' => 'linear',
		'icon_gradient_color_angle' => 'to bottom',
		'icon_gradient_color_cusotom_deg' => '180',
		'icon_gradient_radial_color_position' => 'at top',

	), $atts, 'gem_icon'));

	$icon_shortcode = '[gem_icon pack="'.$icon_pack.
		'" icon="'.$icon.
		'" shape="'.$icon_shape.
		'" style="'.$icon_style.
		'" color="'.$icon_color.
		'" color_2="'.$icon_color_2.
		'" background_color="'.$icon_background_color.
		'" border_color="'.$icon_border_color.
		'" size="'.$icon_size.
		'" gradient_backgound="'.$icon_gradient_backgound.
		'" gradient_backgound_from="'.$icon_gradient_backgound_from.
		'" gradient_backgound_to="'.$icon_gradient_backgound_to.
		'" gradient_backgound_style="'.$icon_gradient_backgound_style.
		'" gradient_backgound_angle="'.$icon_gradient_backgound_angle.
		'" gradient_backgound_cusotom_deg="'.$icon_gradient_backgound_cusotom_deg.
		'" gradient_radial_backgound_position="'.$icon_gradient_radial_backgound_position.
		'" gradient_color_style="'.$icon_gradient_color_style.
		'" gradient_color_angle="'.$icon_gradient_color_angle.
		'" gradient_color_cusotom_deg="'.$icon_gradient_color_cusotom_deg.
		'" gradient_radial_color_position="'.$icon_gradient_radial_color_position;
	return $icon_shortcode;

}

function thegem_icon_with_title_shortcode($atts) {
	extract(shortcode_atts(array(
		'icon_pack' => 'material',
		'icon' => '',
		'link' => '',
		'icon_elegant' => '',
		'icon_material' => 'f287',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'icon_shape' => 'circle',
		'icon_style' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'title' => '',
		'level' => 'h1',
		'title_color' => '',
		'icon_gradient_backgound' => '',
		'icon_gradient_backgound_from' => '#fff',
		'icon_gradient_backgound_to' => '#000',
		'icon_gradient_backgound_style' => 'linear',
		'icon_gradient_backgound_angle' => 'to bottom',
		'icon_gradient_backgound_cusotom_deg' => '180',
		'icon_gradient_radial_backgound_position' => 'at top',
		'icon_gradient_color_style' => 'linear',
		'icon_gradient_color_angle' => 'to bottom',
		'icon_gradient_color_cusotom_deg' => '180',
		'icon_gradient_radial_color_position' => 'at top',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
		/*END interactions*/
	), $atts, 'gem_icon_with_title'));

	$level = thegem_check_array_value(array('h1','h2','h3','h4','h5','h6'), $level, 'h1');
	$icon_size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $icon_size, 'small');
	$css_style = '';
	if($title_color) {
		$css_style = 'color: '.$title_color.';';
	}
	$linkstart = '';
	$linkend = '';
	if($link) {
		$linkstart = '<a href=' . $link . '>';
		$linkend = '</a>';
	}

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	$return_html = '<div class="gem-icon-with-title-icon">'.do_shortcode(thegem_build_icon_shortcode($atts)).'</div>';
	$return_html .= '<div class="gem-iconed-title"><'.$level.' style="'.$css_style.'">'. $linkstart . $title . $linkend . '</'.$level.'></div>';
	$return_html = '<div class=" gem-icon-with-title  gem-icon-with-title-icon-size-'.$icon_size.''.$class.'" '.$interactions_data.'>' .$linkstart . $return_html . $linkend .'</div>';
	return $return_html;
}

function thegem_icon_with_text_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'pack' => 'material',
		'icon' => '',
		'icon_material' => 'f287',
		'icon_shape' => 'square',
		'icon_style' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'title' => '',
		'level' => 'h6',
		'flow' => '',
		'centered' => '',
		'disable_mobile_centered' => '',
		'title_color' => '',
		'icon_bottom_margin' => '0',
		'icon_top_margin' => '0',
		'icon_top_side_padding' => '0',
		'icon_right_side_padding' => '0',
		'icon_bottom_side_padding' => '0',
		'icon_left_side_padding'=> '0',
		'float_right' => '',
		'icon_gradient_backgound' => '',
		'icon_gradient_backgound_from' => '#fff',
		'icon_gradient_backgound_to' => '#000',
		'icon_gradient_backgound_style' => 'linear',
		'icon_gradient_backgound_angle' => 'to bottom',
		'icon_gradient_backgound_cusotom_deg' => '180',
		'icon_gradient_radial_backgound_position' => 'at top',
		'icon_gradient_color_style' => 'linear',
		'icon_gradient_color_angle' => 'to bottom',
		'icon_gradient_color_cusotom_deg' => '180',
		'icon_gradient_radial_color_position' => 'at top',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_icon_with_text'));
	if($title_color) {
		$css_style = 'color: '.$title_color.';';
	}

	$css_style_padding= "";
	if($icon_top_side_padding) {
		$css_style_padding .= 'padding-top: '.$icon_top_side_padding.'px;';
	}
	if($icon_right_side_padding) {
		$css_style_padding .= 'padding-right: '.$icon_right_side_padding.'px;';
	}
	if($icon_bottom_side_padding) {
		$css_style_padding .= 'padding-bottom: '.$icon_bottom_side_padding.'px;';
	}
	if($icon_left_side_padding) {
		$css_style_padding .= 'padding-left: '.$icon_left_side_padding.'px;';
	}

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	$icon_size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $icon_size, 'small');
	$return_html = '<div style="margin-bottom:' .$icon_bottom_margin. 'px;' .$css_style_padding. 'margin-top:' .$icon_top_margin. 'px; " class="gem-icon-with-text-icon">' .do_shortcode(thegem_build_icon_shortcode($atts)). '</div>';
	$return_html .= '<div class="gem-icon-with-text-content" >';
	if($title) {
		$return_html .= '<div class="gem-icon-with-text-empty"></div>';
	}
	$return_html .= '<div class="gem-icon-with-text-text">'.do_shortcode($content).'</div></div>';
	$return_html = '<div class="gem-icon-with-text gem-icon-with-text-icon-size-'.$icon_size.($centered ? ' centered-box' : '').($disable_mobile_centered ? ' disable-mobile-centered' : '').($float_right ? ' gem-icon-with-text-float-right' : '').($flow ? ' gem-icon-with-text-flow' : '').''.$class.'" '.$interactions_data.'>'.$return_html.'<div class="clearboth"></div></div>';
	return $return_html;
}

function thegem_alert_box_shortcode($atts, $content) {
	if (isset($atts['button_1_text'])) {
		$atts['button_1_text'] = vc_value_from_safe($atts['button_1_text']);
	}

	if (isset($atts['button_2_text'])) {
		$atts['button_2_text'] = vc_value_from_safe($atts['button_2_text']);
	}

	extract(shortcode_atts(array(
		'content_text_color' => '',
		'content_background_color' => '#f4f6f7',
		'content_background_image' => '',
		'content_background_style' => '',
		'content_background_position_horizontal' => 'center',
		'content_background_position_vertical' => 'top',
		'border_width' => '0',
		'border_color' => '',
		'border_radius' => '0',
		'rectangle_corner' => '',
		'top_style' => 'default',
		'bottom_style' => 'default',
		'image' => '',
		'icon_pack' => 'material',
		'icon_shape' => 'square',
		'icon_style' => '',
		'icon_elegant' => '',
		'icon_material' => 'f287',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_userpack' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'icon_opacity' => '1',

		'button_1_text' => '',
		'button_1_link' => '',
		'button_1_style' => 'flat',
		'button_1_size' => 'small',
		'button_1_text_weight' => 'normal',
		'button_1_no_uppercase' => 0,
		'button_1_corner' => 3,
		'button_1_border' => 2,
		'button_1_text_color' => '',
		'button_1_background_color' => '',
		'button_1_border_color' => '',
		'button_1_hover_text_color' => '',
		'button_1_hover_background_color' => '',
		'button_1_hover_border_color' => '',
		'button_1_icon_pack' => 'elegant',
		'button_1_icon_elegant' => '',
		'button_1_icon_material' => '',
		'button_1_icon_fontawesome' => '',
		'button_1_icon_thegem_header' => '',
		'button_1_icon_userpack' => '',

		'button_2_activate' => 0,
		'button_2_text' => '',
		'button_2_link' => '',
		'button_2_style' => 'flat',
		'button_2_size' => 'small',
		'button_2_text_weight' => 'normal',
		'button_2_no_uppercase' => 0,
		'button_2_corner' => 3,
		'button_2_border' => 2,
		'button_2_text_color' => '',
		'button_2_background_color' => '',
		'button_2_border_color' => '',
		'button_2_hover_text_color' => '',
		'button_2_hover_background_color' => '',
		'button_2_hover_border_color' => '',
		'button_2_icon_pack' => 'elegant',
		'button_2_icon_elegant' => '',
		'button_2_icon_material' => '',
		'button_2_icon_fontawesome' => '',
		'button_2_icon_thegem_header' => '',
		'button_2_icon_userpack' => '',

		'centered' => '',
	), $atts, 'gem_alert_box'));
	$atts = is_array($atts) ? $atts : array();
	$button1 = array();
	foreach($atts as $key => $value) {
		if(substr($key, 0, 9) == 'button_1_') {
			$button1[substr($key, 9)] = $value;
		}
	}
	if($centered) {
		$button1['position'] = 'inline';
	} else {
		$button1['position'] = 'center';
	}
	$button2 = array();
	if($button_2_activate) {
		foreach($atts as $key => $value) {
			if(substr($key, 0, 9) == 'button_2_') {
				$button2[substr($key, 9)] = $value;
			}
		}
		if($centered) {
			$button2['position'] = 'inline';
		} else {
			$button2['position'] = 'center';
		}
	}

	$ab_buttons = '<div class="gem-alert-box-buttons">'.thegem_button_shortcode($button1).($button_2_activate ? thegem_button_shortcode($button2) : '').'</div>';

	$ab_picture = '';
	if($image && $icon_pack == 'image') {
		$image_thumb = thegem_generate_thumbnail_src($image, 'thegem-person');
		$scrset = array();
		if (!empty($icon_size)) {
			switch ($icon_size) {
				case 'small':
				case 'medium':
					thegem_add_srcset_rule($scrset, '1x', 'thegem-person-80', $image);
					thegem_add_srcset_rule($scrset, '2x', 'thegem-person-160', $image);
					break;

				case 'large':
					thegem_add_srcset_rule($scrset, '1x', 'thegem-person-160', $image);
					thegem_add_srcset_rule($scrset, '2x', 'thegem-person', $image);
					break;

				case 'xlarge':
					thegem_add_srcset_rule($scrset, '1x', 'thegem-person-240', $image);
					thegem_add_srcset_rule($scrset, '2x', 'thegem-person', $image);
					break;
			}
			if (!empty($scrset)) {
				$srcset_condtions = array();
				foreach ($scrset as $condition => $condition_url) {
					$srcset_condtions[] = esc_url($condition_url) . ' ' . $condition;
				}
				$scrset = implode(', ', $srcset_condtions);
			}
		}
		$ab_picture = '<div class="gem-alert-box-picture"><div class="gem-alert-box-image image-size-'.$icon_size.' image-shape-'.$icon_shape.'"><img src="'.$image_thumb[0].'" alt="#" class="img-responsive" ' . ($scrset != '' ? 'srcset="' . $scrset . '"' : '') .' /></div></div>';
	}
	if(($icon_pack =='elegant' && $icon_elegant) || ($icon_pack =='material' && $icon_material) || ($icon_pack =='fontawesome' && $icon_fontawesome) || ($icon_pack =='thegem-header' && $icon_thegem_header) || ($icon_pack =='userpack' && $icon_userpack)) {
		$ab_picture = '<div class="gem-alert-box-picture">'.do_shortcode(thegem_build_icon_shortcode($atts)).'</div>';
	}

	$ab_content = '<div class="gem-alert-box-content">'.do_shortcode($content).'</div>';

	$return_html = '<div class="gem-alert-box'.($centered ? ' centered-box' : '').'"><div class="gem-alert-inner">'.$ab_picture.$ab_content.$ab_buttons.'</div></div>';

	$return_html = thegem_textbox_shortcode(array_diff_key($atts, array_diff_key($atts, array(
		'content_text_color' => '',
		'content_background_color' => '#f4f6f7',
		'content_background_image' => '',
		'content_background_style' => '',
		'content_background_position_horizontal' => 'center',
		'content_background_position_vertical' => 'top',
		'border_width' => '0',
		'border_color' => '',
		'border_radius' => '0',
		'rectangle_corner' => '',
		'top_style' => 'default',
		'bottom_style' => 'default',
	))),$return_html);

	return $return_html;
}

function thegem_button_shortcode($atts) {
	if (isset($atts['text'])) {
		$atts['text'] = vc_value_from_safe($atts['text']);
	}

	extract(shortcode_atts(array(
		'text' => 'Button',
		'link' => '',
		'text_source' => 'custom_text',
		'post_type' => thegem_cf_get_edit_template_type(),
		'link_type' => 'custom',
		'style' => 'flat',
		'size' => 'small',
		'size_tablet' => '',
		'size_mobile' => '',
		'text_weight' => 'normal',
		'no_uppercase' => 0,
		'corner' => 3,
		'border' => 2,
		'position' => 'inline',
		'text_color' => '',
		'background_color' => '',
		'border_color' => '',
		'hover_text_color' => '',
		'hover_background_color' => '',
		'hover_border_color' => '',
		'icon_pack' => 'elegant',
		'icon_elegant' => '',
		'icon_material' => '',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_userpack' => '',
		'icon_position' => 'left',
		'separator' => '',
		'separator_weight' => '',
		'extra_class' => '',
		'id' => '',
		'effects_enabled' => false,
		'effects_enabled_name' => 'default',
		'effects_enabled_duration' => '',
		'effects_enabled_delay' => '',
		'effects_enabled_timing_function' => '',

		'gradient_backgound' => '',
		'gradient_radial_swap_colors' => '',
		'gradient_backgound_from' => '',
		'gradient_backgound_to' => '',
		'gradient_backgound_hover_from' => '',
		'gradient_backgound_hover_to' => '',
		'gradient_backgound_style' => 'linear',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '180',
		'gradient_radial_backgound_position' => 'at top',
        /*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => '',
        /*END interactions*/

		'text_size' => '',
		'text_size_tablet' => '',
		'text_size_mobile' => '',
		'padding_left' => '',
		'padding_left_tablet' => '',
		'padding_left_mobile' => '',
		'padding_right' => '',
		'padding_right_tablet' => '',
		'padding_right_mobile' => '',
		'letter_spacing' => '',
		'text_transform' => '',
		'element_hide_desktop' => '0',
		'element_hide_tablet' => '0',
		'element_hide_mobile' => '0',
	), $atts, 'gem_button'));

	$post_id = thegem_cf_get_edit_template_post_id();

	// Get Button dynamic text source
	if (!empty($text_source) && $text_source != 'custom_text') {
		switch ($text_source) {
			case 'thegem_cf':
				if (!empty($atts[$post_type . '_select_field'])) {
					$key = $atts[$post_type . '_select_field'];
					$text = get_post_meta($post_id, $key, true);
				}
				break;
			case 'project_details':
				if (!empty($atts['project_details_select_field'])) {
					$key = $atts['project_details_select_field'];
					$text = get_post_meta($post_id, $key, true);
				}
				break;
			default:
				if (!empty($atts[$text_source . '_select_field'])) {
					$key = $atts[$text_source . '_select_field'];
					$text = get_post_meta($post_id, $key, true);
				}
		}
	}

	// Get Button dynamic link source
	$link = ( '||' === $link ) ? '' : $link;
	$tag = 'a';
	$button_attributes = array();

	if($link === 'post_link') {
		$a_href = $link;
		$a_title = '';
		$a_target = '';
	} elseif(!empty($link_type) && $link_type == 'custom') {
		$link = vc_build_link( $link );
		$a_href = $link['url'];
		$a_title = $link['title'];
		$a_target = strlen( $link['target'] ) > 0 ? $link['target'] : '_self';
	} elseif(!empty($link_type) && $link_type == 'dynamic') {
		$dynamic_link = [
			'target' => !empty($atts['link_target']) ? '_blank' : '_self',
			'rel' => !empty($atts['link_nofollow']) ? 'nofollow' : '',
			'title' => '',
		];

		switch ($atts['link_dynamic']) {
			case 'custom_fields':
				if (!empty($atts['custom_fields_link_select'])) {
					$dynamic_link['url'] = get_post_meta($post_id, $atts['custom_fields_link_select'], true);
				}

				break;
			case 'project_details':
				if (!empty($atts['project_details_link_select'])) {
					$dynamic_link['url'] = get_post_meta($post_id, $atts['project_details_link_select'], true);
				}

				break;
			default:
				if (!empty($atts[$atts['link_dynamic'].'_link_select'])) {
					$acf_link = get_post_meta($post_id, $atts[$atts['link_dynamic'].'_link_select'], true);

					if(is_array($acf_link)){
						$dynamic_link = [
							'url' => !empty($acf_link['url']) ? $acf_link['url'] : null,
							'target' => !empty($acf_link['target']) ? $acf_link['target'] : $dynamic_link['target'],
							'rel' => !empty($acf_link['rel']) ? $acf_link['rel'] : $dynamic_link['rel'],
							'title' => !empty($acf_link['title']) ? $acf_link['title'] : $dynamic_link['title'],
						];
					} else{
						$dynamic_link['url'] = $acf_link;
					}
				}

				break;
		}

		$a_href = $dynamic_link['url'];
		$a_title =$dynamic_link['title'];
		$a_target = $dynamic_link['target'];
		$button_attributes = [
			'rel' => $dynamic_link['rel'],
		];
	}

	$icon = '';
	if($icon_elegant && $icon_pack == 'elegant') {
		$icon = $icon_elegant;
	}
	if($icon_material && $icon_pack == 'material') {
		$icon = $icon_material;
	}
	if($icon_fontawesome && $icon_pack == 'fontawesome') {
		$icon = $icon_fontawesome;
	}
	if($icon_thegem_header && $icon_pack == 'thegem-header') {
		$icon = $icon_thegem_header;
	}
	if($icon_userpack && $icon_pack == 'userpack') {
		$icon = $icon_userpack;
	}
	if ($effects_enabled && $effects_enabled_name == 'default') {
		thegem_lazy_loading_enqueue();
	} elseif(function_exists('thegem_advanced_animation_enqueue')) {
		thegem_advanced_animation_enqueue();
	}

	$interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$extra_class .= ' gem-interactions-enabled';
	}


	/* CART / CHEKOUT BUILDER BUTTON */
	if((isset($GLOBALS['thegem_template_type']) && $GLOBALS['thegem_template_type'] === 'checkout') || thegem_is_template_post('checkout')) {
		if(isset($atts['link_type']) && $atts['link_type'] === 'custom_url') {

		} elseif(isset($atts['link_type']) && $atts['link_type'] === 'cart_page') {
			$a_href = function_exists('wc_get_cart_url') ? esc_url(wc_get_cart_url()) : '#';
		} else {
			$tag = 'button';
			$order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) );
			$button_attributes = array(
				'name' => 'woocommerce_checkout_place_order',
				'value' => $order_button_text,
				'type' => 'submit',
				'data-value' => $order_button_text,
			);
		}
	} elseif((isset($GLOBALS['thegem_template_type']) && $GLOBALS['thegem_template_type'] === 'cart') || thegem_is_template_post('cart')) {
		if(isset($atts['link_type']) && $atts['link_type'] === 'custom_url') {

		} else {
			$a_href = function_exists('wc_get_checkout_url') ? esc_url(wc_get_checkout_url()) : '#';
		}
	} else {

	}
	if(!empty($id)) {
		$button_attributes['id'] = $id;
	}

	// Output responsive options
	$responsive_options_output = array(
		'element_hide_desktop' => $element_hide_desktop,
		'element_hide_tablet' => $element_hide_tablet,
		'element_hide_mobile' => $element_hide_mobile,
	);
	$extra_class = implode(' ', array($extra_class, thegem_templates_responsive_options_output($responsive_options_output)));

	return thegem_button(array(
		'tag' => $tag,
		'text' => do_shortcode($text),
		'href' => $a_href,
		'target' => $a_target,
		'title' => $a_title,
		'style' => $style,
		'size' => $size,
		'size_tablet' => $size_tablet,
		'size_mobile' => $size_mobile,
		'text_weight' => $text_weight,
		'no-uppercase' => $no_uppercase,
		'corner' => $corner,
		'border' => $border,
		'position' => $position,
		'text_color' => $text_color,
		'background_color' => $background_color,
		'border_color' => $border_color,
		'hover_text_color' => $hover_text_color,
		'hover_background_color' => $hover_background_color,
		'hover_border_color' => $hover_border_color,
		'icon_pack' => $icon_pack,
		'icon' => $icon,
		'icon_position' => $icon_position,
		'separator' => $separator,
		'separator_weight' => $separator_weight,
		'extra_class' => $extra_class,
		'effects_enabled' => $effects_enabled,
		'effects_enabled_name' => $effects_enabled_name,
		'effects_enabled_duration' => $effects_enabled_duration,
		'effects_enabled_delay' => $effects_enabled_delay,
		'effects_enabled_timing_function' => $effects_enabled_timing_function,

		'gradient_backgound' => $gradient_backgound,
		'gradient_backgound_from' => $gradient_backgound_from,
		'gradient_backgound_to' => $gradient_backgound_to,
		'gradient_backgound_hover_from' => $gradient_backgound_hover_from,
		'gradient_backgound_hover_to' => $gradient_backgound_hover_to,
		'gradient_backgound_style' => $gradient_backgound_style,
		'gradient_radial_swap_colors' => $gradient_radial_swap_colors,
		'gradient_backgound_angle' => $gradient_backgound_angle,
		'gradient_backgound_cusotom_deg' => $gradient_backgound_cusotom_deg,
		'gradient_radial_backgound_position' => $gradient_radial_backgound_position,
		'interactions_data' => $interactions_data,
		'attributes' => $button_attributes,

		'text_size' => $text_size,
		'text_size_tablet' => $text_size_tablet,
		'text_size_mobile' => $text_size_mobile,
		'padding_left' => $padding_left,
		'padding_left_tablet' => $padding_left_tablet,
		'padding_left_mobile' => $padding_left_mobile,
		'padding_right' => $padding_right,
		'padding_right_tablet' => $padding_right_tablet,
		'padding_right_mobile' => $padding_right_mobile,
		'letter_spacing' => $letter_spacing,
		'text_transform' => $text_transform,
	));
}

function thegem_dropcap_shortcode($atts) {
	extract(shortcode_atts(array(
		'letter' => '',
		'shape' => 'square',
		'color' => '',
		'style' => 'medium',
		'background_color' => '',
		'border_color' => '',
		'gradient_backgound' => '',
		'gradient_backgound_from' => '#fff',
		'gradient_backgound_to' => '#000',
		'gradient_backgound_style' => 'linear',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '180',
		'gradient_radial_backgound_position' => 'at top',
	), $atts, 'gem_dropcap'));
	$shape = thegem_check_array_value(array('circle', 'square', 'hexagon'), $shape, 'circle');
	$style = thegem_check_array_value(array('medium', 'big'), $style, 'medium');
	$css_style = '';
	$hexagon_bacgound ='';
	if($color) {
		$css_style .= 'color: '.$color.';';
	}
	if($background_color) {
		$css_style .= 'background-color: '.$background_color.';';
	}
	if($border_color) {
		$css_style .= 'border: 1px solid '.$border_color.';';
	}
	if ($gradient_backgound_angle == 'cusotom_deg') {
		$gradient_backgound_angle = $gradient_backgound_cusotom_deg.'deg';
	}
	if (!$gradient_backgound){
		$hexagon_bacgound .= $border_color ? $border_color : $background_color;
	}
	if($gradient_backgound and $gradient_backgound_style == 'linear') {
		$css_style .= 'background: linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
		$hexagon_bacgound .= 'linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
		$background_color .= 'linear-gradient('.$gradient_backgound_angle.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}
	if($gradient_backgound and $gradient_backgound_style == 'radial') {
		$css_style .= 'background: radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
		$hexagon_bacgound .= 'radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
		$background_color.= 'radial-gradient('.$gradient_radial_backgound_position.', '.$gradient_backgound_from.', '.$gradient_backgound_to.');';
	}

	$letter = mb_substr($letter,0,1);
	$return_html =


		'<div class="gem-dropcap gem-dropcap-shape-'.$shape.' gem-dropcap-style-'.$style.'">'.
		($shape == 'hexagon' ? '<div class="dropcap-hexagon-inner"><div class="gem-dropcap-shape-hexagon-back"><div class="gem-dropcap-shape-hexagon-back-inner"><div class="gem-dropcap-shape-hexagon-back-inner-before" style="background: '.($hexagon_bacgound).'"></div></div></div><div class="gem-dropcap-shape-hexagon-top"><div class="gem-dropcap-shape-hexagon-top-inner"><div class="gem-dropcap-shape-hexagon-top-inner-before" style="background-color:'.$background_color.'"></div></div></div></div>' : '').

		'<span class="gem-dropcap-letter" style="'.$css_style.'">'.$letter.'</span></div>';


	return $return_html;
}

function thegem_counter_box_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'style' => 1,
		'columns' => 4,
		'connector_color' => '',
		'effects_enabled' => false,
		'team_person' => '',
		'team_image_size' => 'small',
		'number_format' => '',
		'effects_enabled_delay' => ''
	), $atts, 'gem_counter_box'));
	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			$effects_enabled = false;
		}
	}
	wp_enqueue_style('odometr');
	wp_enqueue_script('thegem-counter');
	$style = thegem_check_array_value(array(1, 2, 'vertical') ,$style, 1);
	$content = str_replace('[gem_counter ', '[gem_counter use_style="'.$style.'" ',$content);
	$number_format = $number_format ? $number_format : '(ddd).ddd';
	if ($effects_enabled) {
		thegem_lazy_loading_enqueue();
	}
	if($style == 'vertical') {
		$team_html = '';
		if($team_person) {
			$team_image_size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $team_image_size, 'small');
			ob_start();
			thegem_team(array('team_person' => $team_person, 'style' => 'style-counter', 'columns' => 1, 'team_image_size' => $team_image_size));
			$team_html = '<div class="gem-counter-team image-size-'.esc_attr($team_image_size).'">'.trim(preg_replace('/\s\s+/', ' ', ob_get_clean())).'</div>';
		}
		$content = str_replace('[gem_counter ', '[gem_counter connector_color="'.$connector_color.'" ',$content);
		return '<div data-number-format="'.$number_format.'" class="gem-counter-box gem-counter-style-' . $style . ($effects_enabled ? ' lazy-loading lazy-loading-not-hide' : '') . '" '.(isset($effects_enabled_delay) && !empty($effects_enabled_delay) ? 'data-ll-item-delay="'.$effects_enabled_delay.'"' : '').'>'.$team_html.'<div class="gem-counters-list">'.do_shortcode($content).'</div></div>';
	} else {
		$content = str_replace('[gem_counter ', '[gem_counter columns="'.$columns.'" ',$content);
		return '<div data-number-format="'.$number_format.'" class="gem-counter-box row inline-row inline-row-center gem-counter-style-' . $style . ($effects_enabled ? ' lazy-loading lazy-loading-not-hide' : '') . '" '.(isset($effects_enabled_delay) && !empty($effects_enabled_delay) ? 'data-ll-item-delay="'.$effects_enabled_delay.'"' : '').'>'.do_shortcode($content).'</div>';
	}
}

function thegem_vc_get_team_persons() {
	$persons = get_posts(array(
		'post_type' => 'thegem_team_person',
		'posts_per_page' => -1,
		'orderby' => 'title',
		'order' => 'ASC',
	));
	$team_persons = array(__('None', 'thegem') => '');
	foreach($persons as $person) {
		$team_persons[$person->post_title.' (ID='.$person->ID.')'] = $person->ID;
	}
	return $team_persons;
}

function thegem_counter_shortcode($atts) {
	extract($atts = shortcode_atts(array(
		'from' => '0',
		'to' => '100',
		'text' => '',
		'icon_pack' => 'elegant',
		'icon_shape' => '',
		'icon_style' => '',
		'icon_elegant' => '',
		'icon_material' => '',
		'icon_fontawesome' => '',
		'icon_thegem_header' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'icon_color' => '',
		'icon_color_2' => '',
		'icon_background_color' => '',
		'icon_border_color' => '',
		'icon_size' => 'small',
		'icon_opacity' => '1',
		'background_color' => '',
		'numbers_color' => '',
		'text_color' => '',
		'suffix' => '',
		'use_style' =>'',
		'columns' => 4,
		'connector_color' => '',
		'link' => '',
		'hover_icon_color' => '',
		'hover_background_color' => '',
		'hover_numbers_color' => '',
		'hover_text_color' => '',
			/*interactions*/
		'interactions_enabled' => '',
		'vertical_scroll' => '',
		'vertical_scroll_direction' => 'vertical_scroll_direction_up',
		'vertical_scroll_speed' => '3',
		'vertical_scroll_viewport_bottom' => '0',
		'vertical_scroll_viewport_top' => '100',
		'horizontal_scroll' => '',
		'horizontal_scroll_direction' => 'horizontal_scroll_direction_left',
		'horizontal_scroll_speed' => '3',
		'horizontal_scroll_viewport_bottom' => '0',
		'horizontal_scroll_viewport_top' => '100',
		'mouse_effects' => '',
		'mouse_effects_direction' => 'mouse_effects_direction_opposite',
		'mouse_effects_speed' => '3',
		'disable_effects_desktop' => '',
		'disable_effects_tablet' => '',
		'disable_effects_mobile' => ''
			/*END interactions*/
	), $atts, 'gem_counter'));

	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="counter-shortcode-dummy"></div>';
		}
	}
	$return_html = '';
	$circle_border = '';
	if($use_style == 2) {
		$circle_border = $icon_border_color ? $icon_border_color : '#ffffff';
		$background_color = '';
		$hover_background_color = '';
		$atts['icon_background_color'] = '';
		$atts['icon_border_color'] = '';
	}
	if($use_style == 'vertical') {
		$atts['icon_background_color'] = $icon_background_color ? $icon_background_color : ($background_color ? $background_color : '#ffffff');
	}

	$link = ( '||' === $link ) ? '' : $link;
	$link = vc_build_link( $link );
	$a_href = $link['url'];
	$a_title = $link['title'];
	$a_target = strlen( $link['target'] ) > 0 ? trim($link['target']) : '_self';

	$hover_data = '';
	$link_html = '';
	if($a_href) {
		$link_html = '<a class="gem-counter-link" href="'.esc_url($a_href).'"'.($a_title ? ' title="'.esc_attr($a_title).'"' : '').($a_target ? ' target="'.esc_attr($a_target).'"' : '').'></a>';
		if($hover_icon_color) {
			$hover_data .= ' data-hover-icon-color="'.$hover_icon_color.'"';
		}
		if($hover_background_color) {
			$hover_data .= ' data-hover-background-color="'.$hover_background_color.'"';
		}
		if($hover_numbers_color) {
			$hover_data .= ' data-hover-numbers-color="'.$hover_numbers_color.'"';
		}
		if($hover_text_color) {
			$hover_data .= ' data-hover-text-color="'.$hover_text_color.'"';
		}
	}

	$counter_effect = 'gem-counter-effect-';
	if(!empty($atts['icon_background_color'])) {
		$counter_effect .= 'background-reverse';
	} elseif(!empty($atts['icon_border_color'])) {
		$counter_effect .= 'border-reverse';
	} else {
		$counter_effect .= 'simple';
	}

	if(($icon_pack =='elegant' && $icon_elegant) || ($icon_pack =='material' && $icon_material) || ($icon_pack =='fontawesome' && $icon_fontawesome) || ($icon_pack =='thegem-header' && $icon_thegem_header) || ($icon_pack =='thegemdemo' && $icon_thegemdemo) || ($icon_pack =='userpack' && $icon_userpack)) {
		$icon_html = do_shortcode(thegem_build_icon_shortcode($atts));
		if($use_style == 2) {
			$return_html .= '<div class="gem-counter-icon"><div class="gem-counter-icon-circle-1" style="border-color: '.esc_attr($circle_border).';"><div class="gem-counter-icon-circle-2" style="border-color: '.esc_attr($circle_border).';">'.$icon_html.'</div></div></div>';
		} else {
			$return_html .= '<div class="gem-counter-icon">'.$icon_html.'</div>';
		}
	}
	$return_html .= '<div class="gem-counter-number"'.($numbers_color ? ' style="color: '.esc_attr($numbers_color).'"' : '').'><div class="gem-counter-odometer" data-to="'.$to.'">'.$from.'</div>'.($suffix ? '<span class="gem-counter-suffix">'.$suffix.'</span>' : '').'</div>';
	if($text) {
		$return_html .= '<div class="gem-counter-text styled-subtitle"'.($text_color ? ' style="color: '.esc_attr($text_color).'"' : '').'>'.$text.'</div>';
	}

	$counter_bottom = '';
	if($use_style == 1 && $background_color) {
		$counter_bottom = '<div class="gem-counter-bottom"><div class="gem-counter-bottom-left" style="background-color: '.$background_color.';"></div><svg width="20" height="10" style="fill: '.$background_color.';"><path d="M 0,0 0,10 2,10 C 2,-2 18,-2, 18,10 L 20,10 20,0 " /></svg><div class="gem-counter-bottom-right" style="background-color: '.$background_color.';"></div></div>';
	}

	$class = $interactions_data = '';
	if($interactions_enabled) {
		$vars_interactions = array(
			'interactions_enabled' => $interactions_enabled,
			'vertical_scroll' => $vertical_scroll,
			'vertical_scroll_direction' => $vertical_scroll_direction,
			'vertical_scroll_speed' => $vertical_scroll_speed,
			'vertical_scroll_viewport_bottom' => $vertical_scroll_viewport_bottom,
			'vertical_scroll_viewport_top' => $vertical_scroll_viewport_top,
			'horizontal_scroll' => $horizontal_scroll,
			'horizontal_scroll_direction' => $horizontal_scroll_direction,
			'horizontal_scroll_speed' => $horizontal_scroll_speed,
			'horizontal_scroll_viewport_bottom' => $horizontal_scroll_viewport_bottom,
			'horizontal_scroll_viewport_top' => $horizontal_scroll_viewport_top,
			'mouse_effects' => $mouse_effects,
			'mouse_effects_direction' => $mouse_effects_direction,
			'mouse_effects_speed' => $mouse_effects_speed,
			'disable_effects_desktop' => $disable_effects_desktop,
			'disable_effects_tablet' => $disable_effects_tablet,
			'disable_effects_mobile' => $disable_effects_mobile
		);
		$interactions_data = interactions_data_attr($vars_interactions);
		$class = ' gem-interactions-enabled';
	}

	if($use_style == 'vertical') {
		$icon_size = thegem_check_array_value(array('small', 'medium', 'large', 'xlarge'), $icon_size, 'small');
		return '<div class="gem-counter gem-counter-size-'.esc_attr($icon_size).' '.$counter_effect.''.$class.'"'.$hover_data.' '.$interactions_data.'><div class="gem-counter-connector"'.($connector_color ? ' style="background-color: '.esc_attr($connector_color).'"' : '').'></div><div class="gem-counter-inner"'.($background_color ? ' style="background-color: '.esc_attr($background_color).'"' : '').'>'.$return_html.'</div>'.$link_html.'</div>';
	} else {
		$columns_class = 'col-md-3 col-sm-4 col-xs-6';
		if($columns == 1) {
			$columns_class = 'col-xs-12';
		} elseif($columns == 2) {
			$columns_class = 'col-sm-6 col-xs-12';
		} elseif($columns == 3) {
			$columns_class = 'col-md-4 col-sm-6 col-xs-12';
		}
		return '<div class="gem-counter '.$columns_class.' inline-column '.$counter_effect.''.$class.'"'.$hover_data.' '.$interactions_data.'><div class="gem-counter-inner"'.($background_color ? ' style="background-color: '.esc_attr($background_color).'"' : '').'>'.$return_html.$counter_bottom.$link_html.'</div></div>';
	}
}

function thegem_news_shortcode($atts) {

	if (thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="news-grid-shortcode-dummy"></div>';
		}
	}

	if (!empty($atts['effects_enabled'])) {
		thegem_lazy_loading_enqueue();
	}

	$related_by_categories = '';
	if (!empty($atts['related_by_categories'])) {
		$related_by_categories = $atts['related_by_categories'];
	}
	$related_by_tags = '';
	if (!empty($atts['related_by_tags'])) {
		$related_by_tags = $atts['related_by_tags'];
	}
	$related_by_author = '';
	if (!empty($atts['related_by_author'])) {
		$related_by_author = $atts['related_by_author'];
	}

	$source_type = $atts['source_type'] ?? '';
	$new_related = isset($atts['new_related']);

	$atts = vc_map_get_attributes('gem_news', $atts);

	$button_params = array();
	foreach((array)$atts as $key => $value) {
		if(substr($key, 0, 7) == 'button_') {
			$button_params[substr($key, 7)] = $value;
		}
	}

	$item_colors = array();
	foreach((array)$atts as $key => $value) {
		if(substr($key, 0, 5) == 'item_') {
			$item_colors[substr($key, 5)] = $value;
		}
	}

	$atts['button'] = $button_params;
	$atts['item_colors'] = $item_colors;

	if (!empty($source_type) && !$new_related) {
		if ($source_type == 'related') {
			$atts['query_type'] = 'related';
			$taxonomy_related = [];
			if ($related_by_categories) {
				$taxonomy_related[] = 'category';
			}
			if ($related_by_tags) {
				$taxonomy_related[] = 'post_tag';
			}
			if ($related_by_author) {
				$taxonomy_related[] = 'authors';
			}
			$atts['taxonomy_related'] = implode(',', $taxonomy_related);
			$atts['exclude_posts_manual_type'] = 'current';
		} else if ($source_type == 'archive') {
			$atts['query_type'] = 'archive';
		} else {
			$atts['query_type'] = 'post';
		}
	}

	ob_start();
	thegem_blog($atts);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_clients_shortcode($atts) {
	extract(shortcode_atts(array(
		'set' => '',
		'style' => '',
		'rows' => '3',
		'cols' => '3',
		'autoscroll' => '',
		'fullwidth' => '',
		'disable_grayscale' => false,
		'effects_enabled' => false,
		'effects_enabled_delay' => ''
	), $atts, 'gem_clients'));

	if ($effects_enabled) {
		thegem_lazy_loading_enqueue();
	}

	ob_start();
	if($style == 'carousel') {
		thegem_clients_block(array('disable_grayscale' => $disable_grayscale, 'clients_set' => $set, 'autoscroll' => $autoscroll, 'fullwidth' => $fullwidth, 'effects_enabled' => $effects_enabled, 'effects_enabled_delay' => $effects_enabled_delay));
	} else {
		thegem_clients(array('disable_grayscale' => $disable_grayscale, 'clients_set' => $set, 'rows' => $rows, 'cols' => $cols, 'autoscroll' => $autoscroll, 'effects_enabled' => $effects_enabled, 'effects_enabled_delay' => $effects_enabled_delay));
	}
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_testimonials_shortcode($atts) {
	extract(shortcode_atts(array(
		'set' => '',
		'fullwidth' => '',
		'style' => 'style1',
		'image_size' => 'size-small',
		'autoscroll' => 0,
		'background_color' => '',
		'name_color' => '',
		'company_color' => '',
		'position_color' => '',
		'quote_color' => '',
		'text_color' => ''
	), $atts, 'gem_testimonials'));
	ob_start();
	thegem_testimonialss(array('testimonials_set' => $set, 'fullwidth' => $fullwidth, 'style' => $style, 'image_size' => $image_size, 'autoscroll' => $autoscroll, 'background_color' => $background_color, 'name_color' => $name_color, 'company_color' => $company_color, 'position_color' => $position_color, 'text_color' => $text_color, 'quote_color' => $quote_color));


	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_map_with_text_shortcode($atts, $content) {
	extract(shortcode_atts(array(
		'background_color' => '',
		'color' => '',
		'size' => '',
		'link' => '',
		'grayscale' => '',
		'container' => '',
		'disable_scroll' => '',
		'rounded_corners' => ''
	), $atts, 'gem_map_with_text'));
	$size = str_replace( array( 'px', ' ' ), array( '', '' ), $size );
	$size = $size ? ($size + 46) : '';
	$map = '<div class="gem-map-with-text-map'.($grayscale ? ' grayscale' : '').'">'.do_shortcode('[vc_gmaps'.($link ? ' link="'.$link.'"' : '').' size="'.$size.'" disable_scroll="'.$disable_scroll.'"]').'</div>';
	$css_style = '';
	if($color) {
		$css_style .= 'color: '.$color.';';
	}
	if($background_color) {
		$css_style .= 'background-color: '.$background_color.';';
	}
	$return_html = '<div class="gem-map-with-text'.($rounded_corners ? ' rounded-corners' : '').'"><div class="gem-map-with-text-content" style="'.$css_style.'">'.($container ? '<div class="container">' : '').do_shortcode($content).($container ? '</div>' : '').'</div>'.$map.'</div>';
	return $return_html;
}

function thegem_link($atts) {
	extract(shortcode_atts(array(
		'text' => '',
		'href' => '',
		'class' => '',
		'title' => '',
		'target' => '_self',
	), $atts, 'gem_link'));
	$return_html = '<a';
	if($href) {
		$return_html .= ' href="'.esc_url($href).'"';
	}
	if($class) {
		$return_html .= ' class="'.esc_attr($href).'"';
	}
	if($title) {
		$return_html .= ' title="'.esc_attr($title).'"';
	}
	$target = thegem_check_array_value(array('_self', '_blank'), $target, '_self');
	$return_html .= ' target="'.esc_attr($target).'"';
	$return_html .= '>'.esc_html($text).'</a>';
	return $return_html;
}

function thegem_current_date_shortcode($atts) {
	extract(shortcode_atts(array(
		'date' => '',
		'format' => 'd/m/Y',
	), $atts, 'gem_current_date'));
	$date = $date ? strtotime($date) : time();
	return date_i18n($format, $date);
}

function print_filters_for( $hook = '' ) {
	global $wp_filter;
	if( empty( $hook ) || !isset( $wp_filter[$hook] ) )
		return;

	$output = '<pre>';
	$output .= print_r( $wp_filter[$hook],1 );
	$output .= '</pre>';
	return $output;
}

function thegem_run_shortcode($content) {
	return $content;
}

if(!thegem_is_plugin_active('js_composer/js_composer.php')) {
	require_once(plugin_dir_path( __FILE__ ) . 'vc_shortcodes/init.php');
}

function thegem_userpack_to_dropdown() {
	return thegem_icon_userpack_enabled() ? array(__('UserPack', 'thegem') => 'userpack') : array();
}
function thegem_userpack_to_shortcode($arr = array()) {
	return thegem_icon_userpack_enabled() ? $arr : array();
}

function thegem_get_interactions_options($interactions = array()) {
	$interactions = array(
		array(
			'type' => 'checkbox',
			'heading' => __('Enable Interactions', 'thegem'),
			'param_name' => 'interactions_enabled',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'dependency' => '',
			'value' => array(__('Yes', 'thegem') => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Vertical scroll', 'thegem'),
			'param_name' => 'vertical_scroll',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Vertical scroll direction', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'vertical_scroll_direction',
			'value' => array(
				__('Up', 'thegem') => 'vertical_scroll_direction_up',
				__('Down', 'thegem') => 'vertical_scroll_direction_down'
			),
			'dependency' => array('element' => 'vertical_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Speed (0 to 10; use "." for decimals)', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'vertical_scroll_speed',
			'value' => '3',
			'dependency' => array('element' => 'vertical_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Vertical scroll viewport bottom', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'vertical_scroll_viewport_bottom',
			'value' => '0',
			'dependency' => array('element' => 'vertical_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Vertical scroll viewport top', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'vertical_scroll_viewport_top',
			'value' => '100',
			'dependency' => array('element' => 'vertical_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Horizontal scroll', 'thegem'),
			'param_name' => 'horizontal_scroll',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Horizontal scroll direction', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'horizontal_scroll_direction',
			'value' => array(
				__('Left', 'thegem') => 'horizontal_scroll_direction_left',
				__('Right', 'thegem') => 'horizontal_scroll_direction_right'
			),
			'dependency' => array('element' => 'horizontal_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Speed (0 to 10; use "." for decimals)', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'horizontal_scroll_speed',
			'value' => '3',
			'dependency' => array('element' => 'horizontal_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Horizontal scroll viewport bottom', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'horizontal_scroll_viewport_bottom',
			'value' => '0',
			'dependency' => array('element' => 'horizontal_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Horizontal scroll viewport top', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'horizontal_scroll_viewport_top',
			'value' => '100',
			'dependency' => array('element' => 'horizontal_scroll', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Mouse effects', 'thegem'),
			'param_name' => 'mouse_effects',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Mouse effects direction', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'mouse_effects_direction',
			'value' => array(
				__('Opposite', 'thegem') => 'mouse_effects_direction_opposite',
				__('Direct', 'thegem') => 'mouse_effects_direction_direct'
			),
			'dependency' => array('element' => 'mouse_effects', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Speed (0 to 10; use "." for decimals)', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'param_name' => 'mouse_effects_speed',
			'value' => '3',
			'dependency' => array('element' => 'mouse_effects', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Disable on desktop', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-4',
			'param_name' => 'disable_effects_desktop',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Disable on tablet', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-4',
			'param_name' => 'disable_effects_tablet',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Disable on mobile', 'thegem'),
			'edit_field_class' => 'vc_column vc_col-sm-4',
			'param_name' => 'disable_effects_mobile',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array('element' => 'interactions_enabled', 'value' => '1'),
			'group' => __('Interactions', 'thegem')
		),
	);
	return $interactions ? $interactions : array();
}

if(!function_exists('thegem_get_resp_padding_margin')) {
	function thegem_get_resp_padding_margin() {
		$resp_options = array();
		$resolution = array('tablet', 'mobile');
		$offset_name = array('padding', 'margin');
		$direction = array('top', 'bottom', 'left', 'right');

		foreach ($resolution as $res) {
			$resp_options[] = array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __($res, 'thegem'),
				'param_name' => $res.'_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
				'group' => __('Responsive Options', 'thegem')
			);
			foreach ($offset_name as $name) {
				$resp_options[] = array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __($name, 'thegem'),
					'param_name' => $res.'_'.$name.'_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
					'group' => __('Responsive Options', 'thegem')
				);
				foreach ($direction as $dir) {
					$resp_options[] = array(
						'type' => 'textfield',
						'heading' => __($dir, 'thegem'),
						'param_name' => $res.'_'.$name.'_'.$dir,
						'edit_field_class' => 'vc_column vc_col-sm-3 capitalize',
						'group' => __('Responsive Options', 'thegem')
					);
				}
			}
			$resp_options[] = array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('', 'thegem'),
				'param_name' => $res.'_description_sub_delim_head',
				'edit_field_class' => 'vc_column vc_col-sm-12 no-top-padding',
				'description' => __('Note: px units are used by default. For % units add values with %, eg. 10%', 'thegem'),
				'group' => __('Responsive Options', 'thegem')
			);
		}

		return $resp_options;
	}
}

if(!function_exists('thegem_is_template_post') ) {
	function thegem_is_template_post($template_type) {
		global $pagenow;
		$activate = false;

		if((is_admin() && in_array($pagenow, array('post-new.php', 'post.php', 'admin-ajax.php'))) || (!is_admin() && in_array($pagenow, array('index.php')))) {
			if($pagenow === 'post-new.php' && !empty($_REQUEST['post_type']) && $_REQUEST['post_type'] === 'thegem_templates') {
				$activate = true;
			}
			if($pagenow === 'post.php' && !empty($_REQUEST['post']) && get_post_type($_REQUEST['post']) === 'thegem_templates' && thegem_get_template_type($_REQUEST['post']) == $template_type) {
				$activate = true;
			}
			if($pagenow === 'post.php' && !empty($_REQUEST['post_id']) && get_post_type($_REQUEST['post_id']) === 'thegem_templates' && thegem_get_template_type($_REQUEST['post_id']) == $template_type) {
				$activate = true;
			}
			if($pagenow === 'admin-ajax.php' && !empty($_REQUEST['post_id']) && get_post_type($_REQUEST['post_id']) === 'thegem_templates' && thegem_get_template_type($_REQUEST['post_id']) == $template_type) {
				$activate = true;
			}
			if($pagenow === 'index.php' && !empty($_REQUEST['vc_post_id']) && get_post_type($_REQUEST['vc_post_id']) === 'thegem_templates' && thegem_get_template_type($_REQUEST['vc_post_id']) == $template_type) {
				$activate = true;
			}
		}

		return $activate;
	}
}

if(!function_exists('thegem_get_column_flex_options') ) {
	function thegem_get_column_flex_options($type = 'header') {
		$flexibility = array();
		$resolution = array('desktop', 'tablet', 'mobile');
		$default_text = 'Default';
		$inherit_desktop_text = 'Inherit from Desktop';
		$inherit_tablet_text = 'Inherit from Tablet';
		$default_opt_name = '';

		$flexibility[] = array(
			'type' => 'checkbox',
			'heading' => __('Flex Container', 'thegem'),
			'param_name' => 'flexbox_enabled',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '1',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'description' => __('If enabled, flex container will be applied on column. It is recommended to have this option enabled as it gives more flexibility in layout settings in comparison with default WPBakery column.', 'thegem'),
			'group' => __('Layout', 'thegem'),
			'dependency' => '',
		);

		foreach ($resolution as $res) {
			if ($res == 'tablet') {
				$default_opt_name = $inherit_desktop_text;
			} elseif ($res == 'mobile') {
				$default_opt_name = $inherit_tablet_text;
			} else {
				$default_opt_name = $default_text;
			}

			$flexibility[] = array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __($res, 'thegem'),
				'param_name' => $res.'_flex_head',
				'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
				'group' => __('Layout', 'thegem'),
				'dependency' => array('element' => 'flexbox_enabled', 'value' => '1'),
			);

			$direction_std_value = '';
			if($type == 'header') {
				$direction_std_value = 'row';
			} elseif($type == 'single-product') {
				$direction_std_value = 'column';
			}
			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Items Direction', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_direction',
				'value' => array(
					__('Row', 'thegem') => 'row',
					__('Row Reverse', 'thegem') => 'row-reverse',
					__('Column', 'thegem') => 'column',
					__('Column Reverse', 'thegem') => 'column-reverse',
				),
				'std' => $direction_std_value,
				'save_always' => true,
				'dependency' => array('element' => 'flexbox_enabled', 'value' => '1'),
				'group' => __('Layout', 'thegem'),
				'description' => __('How items are placed in the column.', 'thegem'),
			);

			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Items Wrap', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_wrap',
				'value' => array(
					__($default_opt_name, 'thegem') => '',
					__('Nowrap', 'thegem') => 'nowrap',
					__('Wrap', 'thegem') => 'wrap',
					__('Wrap Reverse', 'thegem') => 'wrap-reverse',
				),
				'std' => ($res == 'desktop' ? 'wrap' : ''),
				'save_always' => true,
				'dependency' => array('element' => 'flexbox_enabled', 'value' => '1'),
				'group' => __('Layout', 'thegem'),
				'description' => __('Force onto one line or wrap onto multiple lines.', 'thegem'),
			);

			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Vertical Align', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_align_vertical',
				'value' => array(
					__($default_opt_name, 'thegem') => '',
					__('Top', 'thegem') => 'start',
					__('Middle', 'thegem') => 'center',
					__('Bottom', 'thegem') => 'end',
					__('Stretch', 'thegem') => 'stretch',
				),
				'std' => ($res == 'desktop' ? 'center' : ''),
				'save_always' => true,
				'description' => __('Vertical align of items in the column.', 'thegem'),
				'dependency' => array('element' => $res.'_direction', 'value' => array('row', 'row-reverse')),
				'group' => __('Layout', 'thegem'),
			);
			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Horizontal Align', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_align_horizontal',
				'value' => array(
					__($default_opt_name, 'thegem') => '',
					__('Start', 'thegem') => 'start',
					__('Center', 'thegem') => 'center',
					__('End', 'thegem') => 'end',
					__('Space Between', 'thegem') => 'between',
					__('Space Around', 'thegem') => 'around',
					__('Space Evenly', 'thegem') => 'evenly',
				),
				'std' => ($res == 'desktop' ? 'start' : ''),
				'save_always' => true,
				'dependency' => array('element' => $res.'_direction', 'value' => array('row', 'row-reverse')),
				'group' => __('Layout', 'thegem'),
				'description' => __('Horizontal align of items in the column.', 'thegem'),
			);

			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Vertical Align', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_column_align_vertical',
				'value' => array(
					__($default_opt_name, 'thegem') => '',
					__('Top', 'thegem') => 'start',
					__('Middle', 'thegem') => 'center',
					__('Bottom', 'thegem') => 'end',
					__('Space Between', 'thegem') => 'between',
					__('Space Around', 'thegem') => 'around',
					__('Space Evenly', 'thegem') => 'evenly',
				),
				'std' => ($res == 'desktop' ? 'start' : ''),
				'save_always' => true,
				'description' => __('Vertical align of items in the column.', 'thegem'),
				'dependency' => array('element' => $res.'_direction', 'value' => array('column', 'column-reverse')),
				'group' => __('Layout', 'thegem'),
			);
			$flexibility[] = array(
				'type' => 'dropdown',
				'heading' => __('Horizontal Align', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'param_name' => $res.'_column_align_horizontal',
				'value' => array(
					__($default_opt_name, 'thegem') => '',
					__('Left', 'thegem') => 'start',
					__('Center', 'thegem') => 'center',
					__('Right', 'thegem') => 'end',
					__('Stretch', 'thegem') => 'stretch',
				),
				'save_always' => true,
				'dependency' => array('element' => $res.'_direction', 'value' => array('column', 'column-reverse')),
				'group' => __('Layout', 'thegem'),
				'description' => __('Horizontal align of items in the column.', 'thegem'),
			);
		}

		return $flexibility;
	}
}

if(!function_exists('thegem_set_column_flex_options')) {
	function thegem_set_column_flex_options($type = 'header') {
		$flexibility = thegem_get_column_flex_options($type);
		$options_list = [];

		foreach (array('vc_column', 'vc_column_inner') as $key) {
			foreach ($flexibility as $k => $v) {
				$options_list[] = vc_add_param($key, array(
					'type' => (isset($v['type']) && !empty($v['type'])) ? $v['type'] : '',
					'heading' => (isset($v['heading']) && !empty($v['heading'])) ? $v['heading'] : '',
					'param_name' => (isset($v['param_name']) && !empty($v['param_name'])) ? $v['param_name'] : '',
					'value' => (isset($v['value']) && !empty($v['value'])) ? $v['value'] : '',
					'std' => (isset($v['std']) && !empty($v['std'])) ? $v['std'] : '',
					'dependency' => (isset($v['dependency']) && !empty($v['dependency'])) ? $v['dependency'] : '',
					'edit_field_class' => (isset($v['edit_field_class']) && !empty($v['edit_field_class'])) ? $v['edit_field_class'] : '',
					'group' => (isset($v['group']) && !empty($v['group'])) ? $v['group'] : '',
					'description' => (isset($v['description']) && !empty($v['description'])) ? $v['description'] : '',
					'weight' => 1
				));
			}
		}

		return $options_list;
	}
}

if(!function_exists('thegem_get_elements_design_options')) {
	function thegem_get_elements_design_options($type = 'header') {
		$resp_options = array();
		$resolution = array('desktop', 'tablet', 'mobile');
		$gaps = array('padding', 'margin');
		$gaps_dir = array('top', 'bottom', 'left', 'right');
		$default_text = 'Default';
		$inherit_desktop_text = 'Inherit from Desktop';
		$inherit_tablet_text = 'Inherit from Tablet';
		$unset_option = array();
		$group = 'Flex Options';

		foreach ($resolution as $res) {
			$default_opt_name = $top_margin = '';
			if ($res == 'tablet') {
				$default_opt_name = $inherit_desktop_text;
				$top_margin = 'margin-top';
			} elseif ($res == 'mobile') {
				$default_opt_name = $inherit_tablet_text;
				$top_margin = 'margin-top';
			} else {
				$default_opt_name = $default_text;
				$top_margin = '';
			}

			if ($res == 'tablet' || $res == 'mobile') {
				$unset_option = array(__('Unset (not inherited)', 'thegem') => 'unset',);
			}

			$field_cls = 'vc_col-sm-12';
			if ($res != 'desktop') {
				$field_cls = 'vc_col-sm-6';
			}

			$resp_options[] = array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __($res, 'thegem'),
				'param_name' => $res.'_flex_head',
				'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding '.$top_margin.' vc_column vc_col-sm-12 capitalize',
				'group' => __($group, 'thegem')
			);

			$resp_options[] = array(
				'type' => 'checkbox',
				'heading' => __('Hide on '.$res, 'thegem'),
				'param_name' => $res.'_disable',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column '.$field_cls.' capitalize',
				'group' => __($group, 'thegem')
			);

			if ($res != 'desktop') {
				$resp_options[] = array(
					'type' => 'textfield',
					'heading' => __('Order on '.$res, 'thegem'),
					'param_name' => $res.'_order',
					'edit_field_class' => 'vc_column vc_col-sm-6 capitalize',
					'group' => __($group, 'thegem')
				);
			}

			$resp_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Vertical Align', 'thegem'),
				'param_name' => $res.'_vertical',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'value' => array_merge(
					array(__($default_opt_name, 'thegem') => ''),
					$unset_option,
					array(
						__('Top', 'thegem') => 'start',
						__('Middle', 'thegem') => 'center',
						__('Bottom', 'thegem') => 'end'
					)
				),
				'description' => __('Vertical align of header item. Works only in case items direction is set to "Row" in column settings', 'thegem'),
				'group' => __($group, 'thegem'),
			);

			$resp_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Horizontal Align', 'thegem'),
				'param_name' => $res.'_horizontal',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'value' => array_merge(
					array(__($default_opt_name, 'thegem') => ''),
					$unset_option,
					array(
						__('Left', 'thegem') => 'start',
						__('Center', 'thegem') => 'center',
						__('Right', 'thegem') => 'end'
					)
				),
				'description' => __('Horizontal align of header item.', 'thegem'),
				'group' => __($group, 'thegem'),
			);

			$resp_options[] = array(
				'type' => 'checkbox',
				'heading' => __('Position Absolute', 'thegem'),
				'param_name' => $res.'_absolute',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-3 capitalize',
				'group' => __($group, 'thegem')
			);

			foreach ($gaps as $name) {
				$resp_options[] = array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __($name, 'thegem'),
					'param_name' => $res.'_'.$name.'_sub_flex_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
					'group' => __($group, 'thegem')
				);
				foreach ($gaps_dir as $dir) {
					$resp_options[] = array(
						'type' => 'textfield',
						'heading' => __($dir, 'thegem'),
						'param_name' => $res.'_'.$name.'_'.$dir,
						'value' => ($name == 'padding' && ($dir == 'left' || $dir == 'right') && $type == 'header' ? '5' : ''),
						'edit_field_class' => 'vc_column vc_col-sm-3 capitalize',
						'group' => __($group, 'thegem')
					);
				}
			}
			$resp_options[] = array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('', 'thegem'),
				'param_name' => $res.'_description_sub_flex_head',
				'edit_field_class' => 'vc_column vc_col-sm-12 no-top-padding',
				'description' => __('Note: px units are used by default. For % units add values with %, eg. 10%', 'thegem'),
				'group' => __($group, 'thegem')
			);
		}

		return $resp_options;
	}
}

if(!function_exists('thegem_set_elements_design_options')) {
	function thegem_set_elements_design_options($type = 'header') {
		$resolutions = thegem_get_elements_design_options($type);
		$options_list = [];


		foreach (array('gem_heading') as $key) {
			/*
			$resp_options = thegem_get_resp_padding_margin();
			foreach ($resp_options as $k => $v) {
				print_r($v);
				if ($v['group'] == 'Responsive Options'){
					vc_remove_param( $key, $v['param_name'] );
				}
			}
			*/


		}

		foreach ($resolutions as $k => $v) {
			$options_list[] = [
				'type' => (isset($v['type']) && !empty($v['type'])) ? $v['type'] : '',
				'heading' => (isset($v['heading']) && !empty($v['heading'])) ? $v['heading'] : '',
				'param_name' => (isset($v['param_name']) && !empty($v['param_name'])) ? $v['param_name'] : '',
				'value' => (isset($v['value']) && !empty($v['value'])) ? $v['value'] : '',
				'edit_field_class' => (isset($v['edit_field_class']) && !empty($v['edit_field_class'])) ? $v['edit_field_class'] : '',
				'group' => (isset($v['group']) && !empty($v['group'])) ? $v['group'] : '',
				'description' => (isset($v['description']) && !empty($v['description'])) ? $v['description'] : '',
			];
		}

		return $options_list;
	}
}

if(!function_exists('thegem_set_elements_design_options_vc_shortcodes')) {
	function thegem_set_elements_design_options_vc_shortcodes($type = 'header') {
		$resolutions = thegem_get_elements_design_options($type);
		$options_list = [];

		foreach (array('vc_column_text') as $key) {
			foreach ($resolutions as $k => $v) {
				$options_list[] = vc_add_param($key, array(
					'type' => (isset($v['type']) && !empty($v['type'])) ? $v['type'] : '',
					'heading' => (isset($v['heading']) && !empty($v['heading'])) ? $v['heading'] : '',
					'param_name' => (isset($v['param_name']) && !empty($v['param_name'])) ? $v['param_name'] : '',
					'value' => (isset($v['value']) && !empty($v['value'])) ? $v['value'] : '',
					'edit_field_class' => (isset($v['edit_field_class']) && !empty($v['edit_field_class'])) ? $v['edit_field_class'] : '',
					'group' => (isset($v['group']) && !empty($v['group'])) ? $v['group'] : '',
					'description' => (isset($v['description']) && !empty($v['description'])) ? $v['description'] : '',
				));
			}
		}

		return $options_list;
	}
}

if(!function_exists('thegem_get_elements_extra_options')) {
	function thegem_get_elements_extra_options($group, $link) {
		$extra_options = array();

		$extra_options[] = array(
			'type' => 'thegem_delimeter_heading',
			'heading' => __('Extra Options', 'thegem'),
			'param_name' => 'layout_delim_head',
			'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
			'group' => __($group, 'thegem')
		);
		if ($link) {
			$extra_options[] = array(
				'type' => 'vc_link',
				'heading' => __( 'URL (Link)', 'thegem' ),
				'param_name' => 'element_link',
				'edit_field_class' => 'vc_column vc_col-sm-12',
				'description' => __('Add custom link.', 'thegem'),
				'group' => __($group, 'thegem')
			);
		}
		$extra_options[] = array(
			'type' => 'textfield',
			'heading' => __('Element ID', 'thegem'),
			'param_name' => 'element_id',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'description' => __('Enter element ID (Note: make sure it is unique and valid according to <a href="https://www.w3schools.com/tags/att_global_id.asp" target="_blank">w3c specification</a>).', 'thegem' ),
			'group' => __($group, 'thegem')
		);
		$extra_options[] = array(
			'type' => 'textfield',
			'heading' => __('Extra class name', 'thegem'),
			'param_name' => 'element_class',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'description' => __('Style particular content element differently - add a class name and refer to it in custom CSS.', 'thegem' ),
			'group' => __($group, 'thegem')
		);

		return $extra_options;
	}
}

if(!function_exists('thegem_set_elements_extra_options')) {
	function thegem_set_elements_extra_options($link=false, $group='General') {
		$extra_options = thegem_get_elements_extra_options($group, $link);
		$options_list = [];

		foreach ($extra_options as $k => $v) {
			$options_list[] = [
				'type' => (isset($v['type']) && !empty($v['type'])) ? $v['type'] : '',
				'heading' => (isset($v['heading']) && !empty($v['heading'])) ? $v['heading'] : '',
				'param_name' => (isset($v['param_name']) && !empty($v['param_name'])) ? $v['param_name'] : '',
				'value' => (isset($v['value']) && !empty($v['value'])) ? $v['value'] : '',
				'edit_field_class' => (isset($v['edit_field_class']) && !empty($v['edit_field_class'])) ? $v['edit_field_class'] : '',
				'group' => (isset($v['group']) && !empty($v['group'])) ? $v['group'] : '',
				'description' => (isset($v['description']) && !empty($v['description'])) ? $v['description'] : '',
			];
		}

		return $options_list;
	}
}

if(!function_exists('thegem_get_elements_responsive_options')) {
	function thegem_get_elements_responsive_options($group = 'Responsive Options') {
		$responsive_options = array();
		$resolutions = array('desktop', 'tablet', 'mobile');

		foreach ($resolutions as $res) {
			$responsive_options[] = array(
				'type' => 'checkbox',
				'heading' => __('Hide on '.$res.'', 'thegem'),
				'param_name' => 'element_hide_'.$res,
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '0',
				'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
				'group' => __($group, 'thegem')
			);
		}

		return $responsive_options;
	}
}

if(!function_exists('thegem_set_elements_responsive_options')) {
	function thegem_set_elements_responsive_options($group = 'Responsive Options') {
		$responsive_options = thegem_get_elements_responsive_options($group);
		$options_list = [];

		foreach ($responsive_options as $k => $v) {
			$options_list[] = [
				'type' => (isset($v['type']) && !empty($v['type'])) ? $v['type'] : '',
				'heading' => (isset($v['heading']) && !empty($v['heading'])) ? $v['heading'] : '',
				'param_name' => (isset($v['param_name']) && !empty($v['param_name'])) ? $v['param_name'] : '',
				'value' => (isset($v['value']) && !empty($v['value'])) ? $v['value'] : '',
				'edit_field_class' => (isset($v['edit_field_class']) && !empty($v['edit_field_class'])) ? $v['edit_field_class'] : '',
				'group' => (isset($v['group']) && !empty($v['group'])) ? $v['group'] : '',
				'description' => (isset($v['description']) && !empty($v['description'])) ? $v['description'] : '',
			];
		}

		return $options_list;
	}
}

function thegem_shortcodes() {
	$icons_params = array();
	if(function_exists('vc_map_integrate_shortcode')) {
		$icons_params = vc_map_integrate_shortcode( 'vc_icon', 'i_', '',
			array('include_only_regex' => '/^(type|icon_\w*)/'),
			array(
				'type' => 'add_icon',
				'value' => 'true',
			)
		);
	}

	$interactions = $resp_options = $design_options = [];
	if (!thegem_is_template_post('header')/* && !thegem_is_template_post('single-product')*/) {
		$interactions = thegem_get_interactions_options();
		$resp_options = thegem_get_resp_padding_margin();
	}

	// Init Thegem Heading Shortcode Params
	$gem_heading_name = __('Heading', 'thegem');
	$gem_heading_category = __('TheGem', 'thegem');
	$gem_heading_description = __('Heading shortcode', 'thegem');

	$is_template_header = false;
	if (thegem_is_template_post('header')) {
		$is_template_header = true;
		$gem_heading_name = __('Heading/Text', 'thegem');
		$gem_heading_category = __('Header Builder', 'thegem');
		$gem_heading_description = __('Elements - Heading/Text', 'thegem');
		$design_options = thegem_set_elements_design_options();
	}

	$is_template_single_product = false;
	if (0 && thegem_is_template_post('single-product')) {
		$is_template_single_product = true;
		$gem_heading_name = __('Heading/Text', 'thegem');
		$gem_heading_category = __('Single Product Builder', 'thegem');
		$gem_heading_description = __('Elements - Heading/Text', 'thegem');
		$design_options = thegem_set_elements_design_options();
	}

	$gem_heading_sources = [
		__('Custom text', 'thegem') => 'custom_text',
		__('Page/Post Title', 'thegem') => 'page_title',
		__('Page/Post Excerpt', 'thegem') => 'page_excerpt',
		__('Page/Post Date', 'thegem') => 'page_date',
		__('Page/Post Time', 'thegem') => 'page_time',
		__('Author Name', 'thegem') => 'page_author',
		__('Comments Number', 'thegem') => 'page_comments',
		__('Custom Fields (TheGem)', 'thegem') => 'thegem_cf',
	];
	if (thegem_cf_get_edit_template_type() == 'thegem_pf_item') {
		$gem_heading_sources[__('Project Details (TheGem)', 'thegem')] = 'project_details';
	}
	if (!empty(thegem_cf_get_acf_plugin_groups())) {
		$gem_heading_sources = array_merge($gem_heading_sources, thegem_cf_get_acf_plugin_groups());
	}
	if (!empty(thegem_cf_get_toolset_plugin_groups())) {
		$gem_heading_sources = array_merge($gem_heading_sources, thegem_cf_get_toolset_plugin_groups());
	}

	$gem_heading_sources_dependency = [];
	foreach ($gem_heading_sources as $source) {
		if ($source != 'custom_text'){
			$gem_heading_sources_dependency[] = $source;
		}
	}

	function gem_heading_dynamic_options($is_template_header, $is_template_single_product, $gem_heading_sources)
	{
		$gem_heading_options = [];
		$gem_heading_output_dependency = [];
		foreach ($gem_heading_sources as $source) {
			if ($source != 'custom_text' && $source != 'page_title' && $source != 'page_excerpt' && $source != 'page_date' && $source != 'page_time' && $source != 'page_author' && $source != 'page_comments'){
				$gem_heading_output_dependency[] = $source;
			}
		}
		$link_sources = array_merge(
			array(
				__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
				__('Project Details', 'thegem') => 'project_details',
			),
			thegem_cf_get_acf_plugin_groups(),
			thegem_cf_get_toolset_plugin_groups()
		);

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => ((!$is_template_header && !$is_template_single_product) ? __('Heading Source', 'thegem') : __('Source', 'thegem')),
			'param_name' => 'text_source',
			'value' => $gem_heading_sources,
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'param_group',
			'heading' => ((!$is_template_header && !$is_template_single_product) ? __('Heading Content', 'thegem') : __('Content', 'thegem')),
			'param_name' => 'text_content',
			'params' => array_merge(array(
				array(
					'type' => 'textarea',
					'heading' => __('Text', 'thegem'),
					'param_name' => 'heading_text',
					'admin_label' => true,
					'value' => ((!$is_template_header && !$is_template_single_product) ? __('This is heading', 'thegem') : __('Lorem ipsum dolor sit amet', 'thegem')),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Font weight', 'thegem'),
					'param_name' => 'heading_text_weight',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Thin', 'thegem') => 'light',
					),
					'dependency' => array(
						'element' => 'heading_text',
						'not_empty' => true
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Font italic', 'thegem'),
					'param_name' => 'heading_text_style',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'heading_text',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Underline', 'thegem'),
					'param_name' => 'heading_text_decoration',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'heading_text',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'heading_text_color',
					'dependency' => array(
						'element' => 'heading_text',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Rotating text effect', 'thegem'),
					'param_name' => 'rotating_text_enabled',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'heading_text',
						'not_empty' => true
					),
					'description' => __('If enabled, you can then specify additional text fragments to be displayed in rotation', 'thegem'),
				),
				array(
					'type' => 'param_group',
					'heading' => __('Rotating text', 'thegem'),
					'param_name' => 'rotating_text_items',
					'params' => array_merge(
						array(
							array(
								'type' => 'textarea',
								'heading' => __('Text', 'thegem'),
								'param_name' => 'text',
								'value' => __('This is rotating text', 'thegem'),
								'admin_label' => true
							),
						)
					),
					'dependency' => array(
						'element' => 'rotating_text_enabled',
						'value' => '1'
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Rotating Animation', 'thegem'),
					'param_name' => 'rotating_animation_name',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Fade', 'thegem') => 'fade'
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'dependency' => array(
						'element' => 'rotating_text_enabled',
						'value' => '1'
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Rotating Speed (ms)', 'thegem'),
					'param_name' => 'rotating_animation_duration',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'dependency' => array(
						'element' => 'rotating_text_enabled',
						'value' => '1'
					)
				),
			)),
			'dependency' => array(
				'element' => 'text_source',
				'value' => 'custom_text'
			),
			'description' => (
			(!$is_template_header && !$is_template_single_product)
				? __('Use repeater above to style different heading text fragments separately (eg. mix different colors & font weights in one heading). Click on "+" to add new text fragments.', 'thegem')
				: __('Use repeater above to style different text fragments separately (eg. mix different colors & font weights). Click on "+" to add new text fragments.', 'thegem')
			),
			'group' => __('Content', 'thegem')
		);

		// Post Types Options
		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Post Type', 'thegem'),
			'param_name' => 'post_type',
			'value' => thegem_cf_get_post_types(),
			'std' => thegem_cf_get_edit_template_type(),
			'dependency' => array(
				'element' => 'text_source',
				'value' => 'thegem_cf'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Content', 'thegem'),
		);

		foreach (thegem_cf_get_post_types() as $pt) {
			if (!empty(thegem_cf_get_fields_by_post_type($pt))) {
				$gem_heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Custom Field', 'thegem'),
					'param_name' => $pt . '_select_field',
					'value' => thegem_cf_get_fields_by_post_type($pt),
					'std' => '',
					'dependency' => array(
						'element' => 'post_type',
						'value' => $pt
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem'),
					'group' => __('Content', 'thegem'),
				);
			}
		}

		// Project Details Options
		if (!empty(thegem_cf_get_project_details())) {
			$gem_heading_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Project Detail', 'thegem'),
				'param_name' => 'project_details_select_field',
				'value' => thegem_cf_get_project_details(),
				'std' => '',
				'dependency' => array(
					'element' => 'text_source',
					'value' => 'project_details'
				),
				'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio</a> to manage your custom fields.', 'thegem'),
				'group' => __('Content', 'thegem'),
			);
		}

		// ACF Options
		if (thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) {
			foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_acf_plugin_fields_by_group($gr))) {
					$gem_heading_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select ACF Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
						'group' => __('Content', 'thegem'),
					);
				}
			}
		}

		// Toolset Group Fields Repeater
		if ((thegem_is_plugin_active('types/wpcf.php')) && !empty(thegem_cf_get_toolset_plugin_groups())) {
			foreach (thegem_cf_get_toolset_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_toolset_plugin_fields_by_group($gr))) {
					$gem_heading_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select Toolset Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_toolset_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=types-custom-fields" target="_blank">Toolset -> Custom Fields</a> to manage your custom fields.', 'thegem'),
						'group' => __('Content', 'thegem'),
					);
				}
			}
		}

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Output Data', 'thegem'),
			'param_name' => 'output_data',
			'value' => array(
				__('All', 'thegem') => 'all',
				__('Value', 'thegem') => 'value',
				__('Label', 'thegem') => 'label',
			),
			'dependency' => array(
				'element' => 'text_source',
				'value' => $gem_heading_output_dependency,
			),
			'std' => 'value',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Field Type', 'thegem'),
			'param_name' => 'field_type',
			'value' => array(
				__('Text', 'thegem') => 'text',
				__('Number', 'thegem') => 'number',
			),
			'dependency' => array(
				'element' => 'text_source',
				'value' => $gem_heading_output_dependency,
			),
			'std' => 'text',
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Number Format', 'thegem'),
			'param_name' => 'field_format',
			'value' => array(
				__('WP Locale', 'thegem') => 'wp_locale',
				__('Disabled', 'thegem') => '',
			),
			'std' => 'wp_locale',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'textfield',
			'heading' => __('Prefix', 'thegem'),
			'param_name' => 'field_prefix',
			'value' => '',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'textfield',
			'heading' => __('Suffix', 'thegem'),
			'param_name' => 'field_suffix',
			'value' => '',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Link Type', 'thegem'),
			'param_name' => 'link',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom Link', 'thegem') => 'custom',
				__('Dynamic', 'thegem') => 'dynamic',
			),
			'std' => 'custom',
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'vc_link',
			'heading' => __( 'URL (Link)', 'thegem' ),
			'param_name' => 'heading_link',
			'dependency' => array(
				'element' => 'link',
				'value' => 'custom'
			),
			'description' => __( 'Add link to heading.', 'thegem' ),
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Dynamic Link Source', 'thegem'),
			'param_name' => 'link_dynamic',
			'value' => $link_sources,
			'std' => '',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
			'group' => __('Content', 'thegem'),
		);

		foreach($link_sources as $source) {
			if (!empty(thegem_cf_get_fields_is_type_link($source))) {
				$gem_heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Dynamic Link', 'thegem'),
					'param_name' => $source. '_link_select',
					'value' => thegem_cf_get_fields_is_type_link($source),
					'std' => '',
					'dependency' => array(
						'element' => 'link_dynamic',
						'value' => $source,
					),
					'group' => __('Content', 'thegem'),
				);
			}
		}

		$gem_heading_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Open link in a new tab', 'thegem'),
			'param_name' => 'link_target',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
			'group' => __('Content', 'thegem'),
		);

		$gem_heading_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Add nofollow option to link', 'thegem'),
			'param_name' => 'link_nofollow',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
			'group' => __('Content', 'thegem'),
		);

		return $gem_heading_options;
	}

	// Init Thegem Button Shortcode Params
	function gem_button_dynamic_options()
	{
		$gem_button_options = [];
		$gem_button_sources = [
			__('Custom text', 'thegem') => 'custom_text',
			__('Custom Fields (TheGem)', 'thegem') => 'thegem_cf',
		];
		if (thegem_cf_get_edit_template_type() == 'thegem_pf_item') {
			$gem_button_sources[__('Project Details (TheGem)', 'thegem')] = 'project_details';
		}
		if (!empty(thegem_cf_get_acf_plugin_groups())) {
			$gem_button_sources = array_merge($gem_button_sources, thegem_cf_get_acf_plugin_groups());
		}
		if (!empty(thegem_cf_get_toolset_plugin_groups())) {
			$gem_button_sources = array_merge($gem_button_sources, thegem_cf_get_toolset_plugin_groups());
		}

		$gem_button_output_dependency = [];
		foreach ($gem_button_sources as $source) {
			if ($source != 'custom_text'){
				$gem_button_output_dependency[] = $source;
			}
		}

		$link_sources = array_merge(
			array(
				__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
				__('Project Details', 'thegem') => 'project_details',
			),
			thegem_cf_get_acf_plugin_groups(),
			thegem_cf_get_toolset_plugin_groups()
		);

		$gem_button_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Button Text Source', 'thegem'),
			'param_name' => 'text_source',
			'value' => $gem_button_sources,
			'std' => 'custom_text',
		);

		$gem_button_options[] = array(
			'type' => 'textfield',
			'heading' => __('Button Text', 'thegem'),
			'param_name' => 'text',
			'std' => 'Button',
			'dependency' => array(
				'element' => 'text_source',
				'value' => 'custom_text'
			),
		);

		// Post Types Options
		$gem_button_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Post Type', 'thegem'),
			'param_name' => 'post_type',
			'value' => thegem_cf_get_post_types(),
			'std' => thegem_cf_get_edit_template_type(),
			'dependency' => array(
				'element' => 'text_source',
				'value' => 'thegem_cf'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
		);

		foreach (thegem_cf_get_post_types() as $pt) {
			if (!empty(thegem_cf_get_fields_by_post_type($pt))) {
				$gem_button_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Custom Field', 'thegem'),
					'param_name' => $pt . '_select_field',
					'value' => thegem_cf_get_fields_by_post_type($pt),
					'std' => '',
					'dependency' => array(
						'element' => 'post_type',
						'value' => $pt
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem'),
				);
			}
		}

		// Project Details Options
		if (!empty(thegem_cf_get_project_details())) {
			$gem_button_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Project Detail', 'thegem'),
				'param_name' => 'project_details_select_field',
				'value' => thegem_cf_get_project_details(),
				'std' => '',
				'dependency' => array(
					'element' => 'text_source',
					'value' => 'project_details'
				),
				'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio</a> to manage your custom fields.', 'thegem'),
			);
		}

		// ACF Options
		if (thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) {
			foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_acf_plugin_fields_by_group($gr))) {
					$gem_button_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select ACF Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
					);
				}
			}
		}

		// Toolset Group Fields Repeater
		if ((thegem_is_plugin_active('types/wpcf.php')) && !empty(thegem_cf_get_toolset_plugin_groups())) {
			foreach (thegem_cf_get_toolset_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_toolset_plugin_fields_by_group($gr))) {
					$gem_button_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select Toolset Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_toolset_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=types-custom-fields" target="_blank">Toolset -> Custom Fields</a> to manage your custom fields.', 'thegem'),
					);
				}
			}
		}

		$gem_button_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Link Type', 'thegem'),
			'param_name' => 'link_type',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom Link', 'thegem') => 'custom',
				__('Dynamic', 'thegem') => 'dynamic',
			),
			'std' => 'custom',
		);

		$gem_button_options[] = array(
			'type' => 'vc_link',
			'heading' => __( 'URL (Link)', 'thegem' ),
			'param_name' => 'link',
			'dependency' => array(
				'element' => 'link_type',
				'value' => 'custom'
			),
			'description' => __( 'Add link to button.', 'thegem' ),
		);

		$gem_button_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Dynamic Link Source', 'thegem'),
			'param_name' => 'link_dynamic',
			'value' => $link_sources,
			'std' => '',
			'dependency' => array(
				'element' => 'link_type',
				'value' => 'dynamic',
			),
		);

		foreach($link_sources as $source) {
			if (!empty(thegem_cf_get_fields_is_type_link($source))) {
				$gem_button_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Dynamic Link', 'thegem'),
					'param_name' => $source. '_link_select',
					'value' => thegem_cf_get_fields_is_type_link($source),
					'std' => '',
					'dependency' => array(
						'element' => 'link_dynamic',
						'value' => $source,
					),
				);
			}
		}

		$gem_button_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Open link in a new tab', 'thegem'),
			'param_name' => 'link_target',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link_type',
				'value' => 'dynamic',
			),
		);

		$gem_button_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Add nofollow option to link', 'thegem'),
			'param_name' => 'link_nofollow',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link_type',
				'value' => 'dynamic',
			),
		);

		return $gem_button_options;
	}

	// Init Thegem Project Info Shortcode Params
	function gem_project_info_dynamic_options()
	{
		$project_info_options = array();
		$project_info_sources = [
			__('Manual Values', 'thegem') => 'default',
			__('Custom Fields (TheGem)', 'thegem') => 'thegem_cf',
		];
		if (thegem_cf_get_edit_template_type() == 'thegem_pf_item') {
			$project_info_sources[__('Project Details (TheGem)', 'thegem')] = 'project_details';
		}
		if (!empty(thegem_cf_get_acf_plugin_groups())) {
			$project_info_sources = array_merge($project_info_sources, thegem_cf_get_acf_plugin_groups());
		}
		if (!empty(thegem_cf_get_toolset_plugin_groups())) {
			$project_info_sources = array_merge($project_info_sources, thegem_cf_get_toolset_plugin_groups());
		}

		$project_info_output_dependency = [];
		foreach ($project_info_sources as $source) {
			if ($source != 'default'){
				$project_info_output_dependency[] = $source;
			}
		}

		$link_sources = array_merge(
			array(
				__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
				__('Project Details', 'thegem') => 'project_details',
			),
			thegem_cf_get_acf_plugin_groups(),
			thegem_cf_get_toolset_plugin_groups()
		);

		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Source', 'thegem'),
			'param_name' => 'source',
			'value' => $project_info_sources,
			'std' => 'default',
		);

		$project_info_options[] = array(
			'type' => 'textfield',
			'heading' => __( 'Title', 'thegem' ),
			'param_name' => 'title',
			'admin_label' => true,
			'dependency' => array(
				'element' => 'source',
				'value' => 'default'
			),
		);

		$project_info_options[] = array(
			'type' => 'textfield',
			'heading' => __( 'Decription', 'thegem' ),
			'param_name' => 'decription',
			'dependency' => array(
				'element' => 'source',
				'value' => 'default'
			),
		);

		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Post Type', 'thegem'),
			'param_name' => 'post_type',
			'value' => thegem_cf_get_post_types(),
			'std' => thegem_cf_get_edit_template_type(),
			'dependency' => array(
				'element' => 'source',
				'value' => 'thegem_cf'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
		);

		foreach (thegem_cf_get_post_types() as $pt) {
			if (!empty(thegem_cf_get_fields_by_post_type($pt))) {
				$project_info_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Custom Field', 'thegem'),
					'param_name' => $pt . '_select_field',
					'value' => thegem_cf_get_fields_by_post_type($pt),
					'std' => '',
					'dependency' => array(
						'element' => 'post_type',
						'value' => $pt
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem'),
				);
			}
		}

		// Project Details Options
		if (!empty(thegem_cf_get_project_details())) {
			$project_info_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Project Detail', 'thegem'),
				'param_name' => 'project_details_select_field',
				'value' => thegem_cf_get_project_details(),
				'std' => '',
				'dependency' => array(
					'element' => 'source',
					'value' => 'project_details'
				),
				'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio</a> to manage your custom fields.', 'thegem'),
			);
		}

		// ACF Options
		if (thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) {
			foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_acf_plugin_fields_by_group($gr))) {
					$project_info_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select ACF Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
					);
				}
			}
		}

		// Toolset Group Fields Repeater
		if ((thegem_is_plugin_active('types/wpcf.php')) && !empty(thegem_cf_get_toolset_plugin_groups())) {
			foreach (thegem_cf_get_toolset_plugin_groups() as $gr) {
				if (!empty(thegem_cf_get_toolset_plugin_fields_by_group($gr))) {
					$project_info_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select Toolset Field', 'thegem'),
						'param_name' => $gr . '_select_field',
						'value' => thegem_cf_get_toolset_plugin_fields_by_group($gr),
						'std' => '',
						'dependency' => array(
							'element' => 'source',
							'value' => $gr
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=types-custom-fields" target="_blank">Toolset -> Custom Fields</a> to manage your custom fields.', 'thegem'),
						'group' => __('Content', 'thegem'),
					);
				}
			}
		}

		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Field Type', 'thegem'),
			'param_name' => 'field_type',
			'value' => array(
				__('Text', 'thegem') => 'text',
				__('Number', 'thegem') => 'number',
			),
			'std' => 'text',
			'dependency' => array(
				'element' => 'source',
				'value' => $project_info_output_dependency
			),
		);
		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Number Format', 'thegem'),
			'param_name' => 'field_format',
			'value' => array(
				__('WP Locale', 'thegem') => 'wp_locale',
				__('Disabled', 'thegem') => '',
			),
			'std' => 'wp_locale',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$project_info_options[] = array(
			'type' => 'textfield',
			'heading' => __('Prefix', 'thegem'),
			'param_name' => 'field_prefix',
			'value' => '',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$project_info_options[] = array(
			'type' => 'textfield',
			'heading' => __('Suffix', 'thegem'),
			'param_name' => 'field_suffix',
			'value' => '',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'field_type',
				'value' => 'number'
			),
		);
		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom', 'thegem') => 'custom',
			),
			'std' => 'custom',
		);
		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Icon pack', 'thegem'),
			'param_name' => 'icon_pack',
			'value' => array_merge(array(
				__('Elegant', 'thegem') => 'elegant',
				__('Material Design', 'thegem') => 'material',
				__('FontAwesome', 'thegem') => 'fontawesome',
				__('Header Icons', 'thegem') => 'thegem-header',
				__('Additional', 'thegem') => 'thegemdemo'),
				thegem_userpack_to_dropdown()
			),
			'std' => 'thegem-header',
			'dependency' => array(
				'element' => 'icon',
				'value' => 'custom'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$project_info_options[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_elegant',
			'icon_pack' => 'elegant',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('elegant')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$project_info_options[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_material',
			'icon_pack' => 'material',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('material')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$project_info_options[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_fontawesome',
			'icon_pack' => 'fontawesome',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('fontawesome')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$project_info_options[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_thegemdemo',
			'icon_pack' => 'thegemdemo',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('thegemdemo')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		$project_info_options[] = array(
			'type' => 'thegem_icon',
			'heading' => __('Icon', 'thegem'),
			'param_name' => 'icon_thegemheader',
			'icon_pack' => 'thegem-header',
			'dependency' => array(
				'element' => 'icon_pack',
				'value' => array('thegem-header')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
		);
		if (thegem_icon_userpack_enabled()) {
			$project_info_options[] = thegem_userpack_to_shortcode(array(
				'type' => 'thegem_icon',
				'heading' => __('Icon', 'thegem'),
				'param_name' => 'icon_userpack',
				'icon_pack' => 'userpack',
				'dependency' => array(
					'element' => 'icon_pack',
					'value' => array('userpack')
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
			));
		}
		$project_info_options[] = array(
			'type' => 'colorpicker',
			'heading' => __('Icon Color', 'thegem'),
			'param_name' => 'icon_color',
			'dependency' => array(
				'element' => 'icon',
				'value' => 'custom'
			),
		);
		$project_info_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Label', 'thegem'),
			'param_name' => 'label',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '1',
			'dependency' => array(
				'element' => 'source',
				'value' => $project_info_output_dependency
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
		);
		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Link Type', 'thegem'),
			'param_name' => 'link',
			'value' => array(
				__('None', 'thegem') => '',
				__('Custom Link', 'thegem') => 'custom',
				__('Dynamic', 'thegem') => 'dynamic',
			),
			'std' => '',
			'dependency' => array(
				'element' => 'source',
				'value' => $project_info_output_dependency
			),
		);
		$project_info_options[] = array(
			'type' => 'vc_link',
			'heading' => __('URL (Link)', 'thegem'),
			'param_name' => 'link_custom',
			'dependency' => array(
				'element' => 'link',
				'value' => 'custom'
			),
		);
		$project_info_options[] = array(
			'type' => 'dropdown',
			'heading' => __('Dynamic Link Source', 'thegem'),
			'param_name' => 'link_dynamic',
			'value' => $link_sources,
			'std' => '',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);
		foreach($link_sources as $source) {
			if (!empty(thegem_cf_get_fields_is_type_link($source))) {
				$project_info_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Select Dynamic Link', 'thegem'),
					'param_name' => $source. '_link_select',
					'value' => thegem_cf_get_fields_is_type_link($source),
					'std' => '',
					'dependency' => array(
						'element' => 'link_dynamic',
						'value' => $source,
					),
				);
			}
		}
		$project_info_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Open link in a new tab', 'thegem'),
			'param_name' => 'link_target',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);
		$project_info_options[] = array(
			'type' => 'checkbox',
			'heading' => __('Add nofollow option to link', 'thegem'),
			'param_name' => 'link_nofollow',
			'value' => array(__('Yes', 'thegem') => '1'),
			'std' => '0',
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'dependency' => array(
				'element' => 'link',
				'value' => 'dynamic',
			),
		);

		return $project_info_options;
	}

	$is_templates_megamenu = false;
	if (thegem_is_template_post('megamenu')) {
		$is_templates_megamenu = true;
	}

	add_filter('vc_autocomplete_gem_news_grid_categories_callback', 'TheGemCategoryAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_news_categories_callback', 'TheGemCategoryAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_categories_render', 'TheGemCategoryRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_categories_render', 'TheGemCategoryRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_tags_callback', 'TheGemTagAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_news_tags_callback', 'TheGemTagAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_tags_render', 'TheGemTagRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_tags_render', 'TheGemTagRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_exclude_blog_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_blog_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_exclude_blog_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_blog_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_authors_callback', 'TheGemAuthorAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_authors_callback', 'TheGemAuthorAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_authors_render', 'TheGemAuthorRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_news_authors_render', 'TheGemAuthorRenderByIdExact', 10, 1);

	add_filter('vc_autocomplete_gem_news_grid_exclude_post_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_news_exclude_post_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_post_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_news_grid_exclude_post_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_post_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_post_terms_render', 'TheGemTaxonomyRenderById', 10, 1);

	add_filter('vc_autocomplete_gem_news_grid_select_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_select_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_select_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_select_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_exclude_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_posts_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_exclude_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_posts_manual_render', 'TheGemPostTypeRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_grid_exclude_any_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_news_exclude_any_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_any_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_news_grid_exclude_any_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_news_exclude_any_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_any_terms_render', 'TheGemTaxonomyRenderById', 10, 1);

	foreach (select_post_types() as $post_type_label => $post_type_name) {
		add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_manual_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_manual_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_manual_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_manual_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_exclude_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_exclude_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_exclude_callback', 'TheGemPostTypeAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_exclude_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_exclude_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_exclude_render', 'TheGemPostTypeRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_news_grid_exclude_' . $post_type_name . '_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_exclude_' . $post_type_name . '_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_' . $post_type_name . '_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
		add_filter('vc_autocomplete_gem_news_grid_exclude_' . $post_type_name . '_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_news_exclude_' . $post_type_name . '_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
		add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_' . $post_type_name . '_terms_render', 'TheGemTaxonomyRenderById', 10, 1);

		$options = select_post_type_taxonomies($post_type_name);
		foreach ($options as $tax_label => $tax_name) {
			add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_callback', 'TheGemTaxonomyTermsAutocompleteSuggesterBySlug', 10, 3);
			add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_callback', 'TheGemTaxonomyTermsAutocompleteSuggesterBySlug', 10, 3);
			add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_callback', 'TheGemTaxonomyTermsAutocompleteSuggesterBySlug', 10, 3);
			add_filter('vc_autocomplete_gem_news_grid_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_render', 'TheGemTaxonomyTermsRenderBySlug', 10, 2);
			add_filter('vc_autocomplete_gem_news_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_render', 'TheGemTaxonomyTermsRenderBySlug', 10, 2);
			add_filter('vc_autocomplete_gem_featured_posts_slider_source_post_type_' . $post_type_name . '_tax_' . $tax_name . '_render', 'TheGemTaxonomyTermsRenderBySlug', 10, 2);
		}
	}

	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_cat_callback', 'TheGemCategoryAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_cat_render', 'TheGemCategoryRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_tags_callback', 'TheGemTagAutocompleteSuggesterBySlug', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_tags_render', 'TheGemTagRenderBySlugExact', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_blog_posts_callback', 'TheGemPostAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_exclude_blog_posts_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_authors_callback', 'TheGemAuthorAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_featured_posts_slider_select_blog_authors_render', 'TheGemAuthorRenderByIdExact', 10, 1);

	foreach (select_post_type_taxonomies('thegem_pf_item') as $tax_label => $tax_name) {
		if ($tax_name == 'thegem_portfolios') {
			$param_name = 'portfolios';
		} else {
			$param_name = 'content_portfolios_' . $tax_name;
		}
		add_filter('vc_autocomplete_gem_portfolio_' . $param_name . '_callback', 'TheGemTaxonomyTermsAutocompleteSuggesterBySlug', 10, 3);
		add_filter('vc_autocomplete_gem_portfolio_slider_' . $param_name . '_callback', 'TheGemTaxonomyTermsAutocompleteSuggesterBySlug', 10, 3);
		add_filter('vc_autocomplete_gem_portfolio_' . $param_name . '_render', 'TheGemTaxonomyTermsRenderBySlug', 10, 2);
		add_filter('vc_autocomplete_gem_portfolio_slider_' . $param_name . '_render', 'TheGemTaxonomyTermsRenderBySlug', 10, 2);
	}
	add_filter('vc_autocomplete_gem_portfolio_exclude_portfolios_callback', 'TheGemPortfolioAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_portfolio_exclude_portfolios_render', 'TheGemPostRenderByIdExact', 10, 1);
	add_filter('vc_autocomplete_gem_portfolio_exclude_portfolio_terms_callback', 'TheGemTaxonomyAutocompleteSuggesterById', 10, 3);
	add_filter('vc_autocomplete_gem_portfolio_exclude_portfolio_terms_render', 'TheGemTaxonomyRenderById', 10, 1);
	add_filter('vc_autocomplete_gem_portfolio_content_portfolios_posts_callback', 'TheGemPortfolioAutocompleteSuggesterById', 10, 1);
	add_filter('vc_autocomplete_gem_portfolio_content_portfolios_posts_render', 'TheGemPostRenderByIdExact', 10, 1);

	$paginations = array(
		__('Normal', 'thegem') => 'normal',
		__('Load More', 'thegem') => 'more',
		__('Infinite Scroll', 'thegem') => 'scroll',
		__('Disable pagination', 'thegem') => 'disable',
	);

	if (thegem_is_template_post('single-post')) {

		$paginations = array(
			__('Load More', 'thegem') => 'more',
			__('Infinite Scroll', 'thegem') => 'scroll',
			__('Disable pagination', 'thegem') => 'disable',
		);
	}

	$query_type_default = 'post';
	$taxonomy_related_default = '';
	$exclude_posts_default = 'manual';
	$featured_source_default = 'featured';
	if (thegem_is_template_post('blog-archive')) {
		$query_type_default = 'archive';
		$featured_source_default = 'all';
	} else if (thegem_is_template_post('single-post')) {
		$query_type_default = 'related';
		$taxonomy_related_default = 'category';
		$exclude_posts_default = 'current';
	}

	$blog_grid_post_types_fields = array(
		array(
			'type' => 'thegem_hidden_param',
			'param_name' => 'new_related',
			'std' => '1',
			'save_always' => true,
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Show', 'thegem'),
			'param_name' => 'query_type',
			'value' => array_merge(
				[
					__('Posts (Blog)', 'thegem') => 'post',
				],
				select_post_types(),
				[
					__('Same Taxonomy Items (Related)', 'thegem') => 'related',
					__('Posts Archive', 'thegem') => 'archive',
					__('Manual Selection', 'thegem') => 'manual',
				]
			),
			'std' => $query_type_default,
			'save_always' => true,
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Related by', 'thegem'),
			'param_name' => 'taxonomy_related',
			'value' => select_post_type_taxonomies(false, false, true),
			'std' => $taxonomy_related_default,
			'save_always' => true,
			'dependency' => array(
				'element' => 'query_type',
				'value' => 'related'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'autocomplete',
			'heading' => __('Select Posts', 'thegem'),
			'param_name' => 'select_posts_manual',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'query_type',
				'value' => 'manual'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Exclude', 'thegem'),
			'param_name' => 'exclude_posts_manual_type',
			'value' => array(
				__('Manual Selection', 'thegem') => 'manual',
				__('Current Post', 'thegem') => 'current',
				__('Term', 'thegem') => 'term',
			),
			'std' => $exclude_posts_default,
			'save_always' => true,
			'dependency' => array(
				'element' => 'query_type',
				'value' => ['manual', 'archive', 'related']
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'autocomplete',
			'heading' => __('Exclude Posts', 'thegem'),
			'param_name' => 'exclude_posts_manual',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'exclude_posts_manual_type',
				'value' => 'manual'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		),
		array(
			'type' => 'autocomplete',
			'heading' => __('Exclude Posts Terms', 'thegem'),
			'param_name' => 'exclude_any_terms',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'description' => __('Add post term by name.', 'thegem'),
			'dependency' => array(
				'element' => 'exclude_posts_manual_type',
				'value' => array('term')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		),
	);

	foreach (select_post_types() as $post_type_label => $post_type_name) {

		$options = select_post_type_taxonomies($post_type_name);

		$blog_grid_post_types_fields[] = array(
			'type' => 'dropdown',
			'heading' => __('Source', 'thegem'),
			'param_name' => 'source_post_type_' . $post_type_name,
			'value' => array_merge(
				[
					__('All', 'thegem') => 'all',
				],
				$options,
				[
					__('Manual Selection', 'thegem') => 'manual',
				]
			),
			'std' => 'all',
			'dependency' => array(
				'element' => 'query_type',
				'value' => $post_type_name
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		);

		foreach ($options as $tax_label => $tax_name) {

			$terms = get_thegem_select_taxonomy_terms($tax_name);

			if (!is_wp_error($terms) && !empty($terms)) {

				$blog_grid_post_types_fields[] = array(
					'type' => 'autocomplete',
					'heading' => sprintf(__('Select %s Terms', 'thegem'), $tax_label),
					'param_name' => 'source_post_type_' . $post_type_name . '_tax_' . $tax_name,
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'dependency' => array(
						'element' => 'source_post_type_' . $post_type_name,
						'value' => $tax_name
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				);
			}
		}

		$blog_grid_post_types_fields[] = array(
			'type' => 'autocomplete',
			'heading' => sprintf(__('Select %s', 'thegem'), $post_type_label),
			'param_name' => 'source_post_type_' . $post_type_name . '_manual',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'source_post_type_' . $post_type_name,
				'value' => 'manual',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		);

		$blog_grid_post_types_fields[] = array(
			'type' => 'dropdown',
			'heading' => __('Exclude', 'thegem'),
			'param_name' => 'exclude_' . $post_type_name . '_manual_type',
			'value' => array(
				__('Manual Selection', 'thegem') => 'manual',
				__('Current Post', 'thegem') => 'current',
				__('Term', 'thegem') => 'term',
			),
			'std' => 'manual',
			'dependency' => array(
				'element' => 'query_type',
				'value' => $post_type_name
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		);

		$blog_grid_post_types_fields[] = array(
			'type' => 'autocomplete',
			'heading' => sprintf(__('Exclude %s', 'thegem'), $post_type_label),
			'param_name' => 'source_post_type_' . $post_type_name . '_exclude',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'exclude_' . $post_type_name . '_manual_type',
				'value' => array('manual')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		);

		$blog_grid_post_types_fields[] = array(
			'type' => 'autocomplete',
			'heading' => sprintf(__('Exclude %s Terms', 'thegem'), $post_type_label),
			'param_name' => 'exclude_' . $post_type_name . '_terms',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'description' => __('Add term by name.', 'thegem'),
			'dependency' => array(
				'element' => 'exclude_' . $post_type_name . '_manual_type',
				'value' => array('term')
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Posts & Layout', 'thegem')
		);
	}


	$portfolio_grid_query_type_default = 'portfolios';

	$portfolio_paginations = array(
		__('Normal', 'thegem') => 'normal',
		__('Load More', 'thegem') => 'more',
		__('Infinite Scroll', 'thegem') => 'scroll',
		__('Disable pagination', 'thegem') => 'disable',
	);

	if (thegem_is_template_post('portfolio')) {

		$portfolio_grid_query_type_default = 'related';

		$portfolio_paginations = array(
			__('Load More', 'thegem') => 'more',
			__('Infinite Scroll', 'thegem') => 'scroll',
			__('Disable pagination', 'thegem') => 'disable',
		);
	}

	$portfolio_grid_source_fields = array(
		array(
			'type' => 'dropdown',
			'heading' => __('Show', 'thegem'),
			'param_name' => 'query_type',
			'value' => array(
				__('Portfolio Items', 'thegem') => 'portfolios',
				__('Related', 'thegem') => 'related',
			),
			'std' => $portfolio_grid_query_type_default,
			'save_always' => true,
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Related by', 'thegem'),
			'param_name' => 'taxonomy_related',
			'value' => select_post_type_taxonomies('thegem_pf_item'),
			'std' => 'thegem_portfolios',
			'save_always' => true,
			'dependency' => array(
				'element' => 'query_type',
				'value' => 'related'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Source', 'thegem'),
			'param_name' => 'source',
			'value' => array_merge(
				select_post_type_taxonomies('thegem_pf_item'),
				[__('Portfolio Items', 'thegem') => 'posts']
			),
			'std' => 'thegem_portfolios',
			'save_always' => true,
			'dependency' => array(
				'element' => 'query_type',
				'value' => 'portfolios'
			),
			'edit_field_class' => 'vc_column vc_col-sm-12',
			'group' => __('Portfolios & Layout', 'thegem')
		),
	);
	foreach (select_post_type_taxonomies('thegem_pf_item') as $tax_label => $tax_name) {
		if ($tax_name == 'thegem_portfolios') {
			$param_name = 'portfolios';
		} else {
			$param_name = 'content_portfolios_' . $tax_name;
		}
		$portfolio_grid_source_fields[] = array(
			'type' => 'autocomplete',
			'heading' => sprintf(__('Select %s', 'thegem'), $tax_label),
			'param_name' => $param_name,
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'source',
				'value' => $tax_name
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Portfolios & Layout', 'thegem')
		);
	}

	array_push($portfolio_grid_source_fields,
		array(
			'type' => 'thegem_hidden_param',
			'param_name' => 'clearfix',
			'edit_field_class' => 'no-top-padding',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'autocomplete',
			'heading' => __('Select Portfolio Items', 'thegem'),
			'param_name' => 'content_portfolios_posts',
			'settings' => array(
				'multiple' => true,
				'sortable' => true,
			),
			'dependency' => array(
				'element' => 'source',
				'value' => 'posts'
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'thegem_hidden_param',
			'param_name' => 'clearfix',
			'edit_field_class' => 'no-top-padding',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Order by', 'thegem'),
			'param_name' => 'order_by',
			'value' => array(
				__('Default', 'thegem') => 'default',
				__('Date', 'thegem') => 'date',
				__('ID', 'thegem') => 'ID',
				__('Author', 'thegem') => 'author',
				__('Title', 'thegem') => 'title',
				__('Last modified date', 'thegem') => 'modified',
				__('Number of comments', 'thegem') => 'comment_count',
				__('Random', 'thegem') => 'rand',
			),
			'std' => 'default',
			'dependency' => array(
				'callback' => 'order_callback',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Portfolios & Layout', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Sort Order', 'thegem'),
			'param_name' => 'order',
			'value' => array(
				__('Default', 'thegem') => 'default',
				__('Descending', 'thegem') => 'DESC',
				__('Ascending', 'thegem') => 'ASC',
			),
			'std' => 'default',
			'dependency' => array(
				'callback' => 'order_callback',
			),
			'edit_field_class' => 'vc_column vc_col-sm-6',
			'group' => __('Portfolios & Layout', 'thegem')
		)
	);

	function get_thegem_schemes_values($group = '') {

		$creative_blog_schemes_list = [
			'6' => [
				'6a' => [
					'count' => 9,
					0 => 'squared',
				],
				'6b' => [
					'count' => 7,
					0 => 'squared',
					1 => 'horizontal',
					6 => 'horizontal',
				],
				'6c' => [
					'count' => 9,
					0 => 'horizontal',
					3 => 'horizontal',
					6 => 'horizontal',
				],
				'6d' => [
					'count' => 9,
					0 => 'horizontal',
					1 => 'horizontal',
					2 => 'horizontal',
				],
				'6e' => [
					'count' => 6,
					0 => 'squared',
					1 => 'squared',
				]
			],
			'5' => [
				'5a' => [
					'count' => 7,
					0 => 'squared',
				],
				'5b' => [
					'count' => 8,
					0 => 'horizontal',
					4 => 'horizontal',
				],
				'5c' => [
					'count' => 6,
					0 => 'horizontal',
					1 => 'horizontal',
					4 => 'horizontal',
					5 => 'horizontal',
				],
				'5d' => [
					'count' => 4,
					0 => 'squared',
					1 => 'vertical',
					2 => 'horizontal',
					3 => 'horizontal',
				]
			],
			'4' => [
				'4a' => [
					'count' => 5,
					0 => 'squared',
				],
				'4b' => [
					'count' => 4,
					0 => 'squared',
					1 => 'horizontal',
				],
				'4c' => [
					'count' => 4,
					0 => 'squared',
					1 => 'vertical',
				],
				'4d' => [
					'count' => 7,
					0 => 'vertical',
				],
				'4e' => [
					'count' => 4,
					0 => 'vertical',
					1 => 'vertical',
					2 => 'horizontal',
					3 => 'horizontal',
				],
				'4f' => [
					'count' => 6,
					0 => 'horizontal',
					5 => 'horizontal',
				]
			],
			'3' => [
				'3a' => [
					'count' => 4,
					0 => 'vertical',
					1 => 'vertical',
				],
				'3b' => [
					'count' => 4,
					1 => 'horizontal',
					2 => 'horizontal',
				],
				'3c' => [
					'count' => 5,
					0 => 'vertical',
				],
				'3d' => [
					'count' => 5,
					0 => 'horizontal',
				],
				'3e' => [
					'count' => 3,
					0 => 'squared',
				],
				'3f' => [
					'count' => 4,
					0 => 'horizontal',
					1 => 'vertical',
				],
				'3g' => [
					'count' => 4,
					0 => 'vertical',
					3 => 'horizontal',
				],
				'3h' => [
					'count' => 5,
					2 => 'vertical',
				]
			],
			'2' => [
				'2a' => [
					'count' => 5,
					0 => 'vertical',
				],
				'2b' => [
					'count' => 5,
					3 => 'vertical',
				],
				'2c' => [
					'count' => 4,
					0 => 'vertical',
					2 => 'vertical',
				],
				'2d' => [
					'count' => 4,
					0 => 'horizontal',
					1 => 'vertical',
				],
				'2e' => [
					'count' => 5,
					0 => 'horizontal',
				],
				'2f' => [
					'count' => 4,
					0 => 'horizontal',
					1 => 'horizontal',
				],
				'2g' => [
					'count' => 5,
					2 => 'horizontal',
				],
				'2h' => [
					'count' => 4,
					0 => 'horizontal',
					3 => 'horizontal',
				],
			]
		];

		$schemes_values = array();

		foreach ((array)$creative_blog_schemes_list as $scheme_col => $scheme_values) {

			$options = [];
			$default = '';
			$i = 1;

			foreach ($scheme_values as $scheme_key => $scheme_val) {
				$options[__('Scheme', 'thegem') . $i] = $scheme_key;
				if ($i == 1) {
					$default = $scheme_key;
				}
				$i++;
			}

			array_push($schemes_values, array(
				'type' => 'dropdown',
				'heading' => __('Layout Scheme', 'thegem') . ' ' . strval($scheme_col) . 'x',
				'param_name' => 'layout_scheme_' . strval($scheme_col) . 'x',
				'value' => $options,
				'std' => $default,
				'save_always' => true,
				'edit_field_class' => 'vc_column vc_col-sm-6 layout_scheme',
				'group' => $group
			));

			foreach ($scheme_values as $scheme_key => $scheme_val) {

				array_push($schemes_values, array(

					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => '',
					'param_name' => 'layout_scheme_' . $scheme_key,
					'description' => '<img src="' . plugin_dir_url(__FILE__) . '/category-schemes/scheme' . $scheme_key . '.png">',
					'dependency' => array(
						'element' => 'layout_scheme_' . strval($scheme_col) . 'x',
						'value' => array($scheme_key)
					),
					'edit_field_class' => 'vc_column vc_col-sm-6 layout_scheme',
					'group' => $group
				));

			}
		}

		return $schemes_values;
	};

	$creative_portfolio_schemes_values = get_thegem_schemes_values(__('Portfolios & Layout', 'thegem'));
	$creative_blog_schemes_values = get_thegem_schemes_values(__('Posts & Layout', 'thegem'));

	$filter_acf = $meta_fields_acf = [];
	if (thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')){
		foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
			$filter_acf[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Custom Field', 'thegem'),
				'param_name' => 'attribute_custom_fields_acf_' . $gr,
				'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
				'dependency' => array(
					'element' => 'attribute_type',
					'value' => $gr
				),
				'description' => __('Go to the <a href="'.get_site_url().'/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			);

			$meta_fields_acf[] = array(
				'type' => 'dropdown',
				'heading' => __('Select Custom Field', 'thegem'),
				'param_name' => 'additional_meta_custom_fields_acf_' . $gr,
				'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
				'dependency' => array(
					'element' => 'additional_meta_type',
					'value' => $gr
				),
				'description' => __('Go to the <a href="'.get_site_url().'/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Appearance', 'thegem')
			);
		}
	}

	function get_project_details_fields($filter_acf, $post_type = 'portfolio') {
		if ($post_type == 'post') {
			$name = __('Custom Fields', 'thegem');
			$layout_name = __('Fields Layout', 'thegem');
			$position_name = __('Fields Position', 'thegem');
			$default_type = 'custom_fields';
			$std_tax = 'category';
			$taxonomies = select_post_type_taxonomies();
			$custom_fields = select_theme_options_custom_fields_all(true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem');
		} else {
			$name = __('Project Details', 'thegem');
			$layout_name = __('Details Layout', 'thegem');
			$position_name = __('Details Position', 'thegem');
			$default_type = 'details';
			$std_tax = 'thegem_portfolios';
			$taxonomies = select_post_type_taxonomies('thegem_pf_item', true);
			$custom_fields = select_theme_options_custom_fields('portfolio', true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio Page</a> to manage your custom fields.', 'thegem');
		}
		return array(
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => $name,
				'param_name' => 'sub_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
				'group' => __('Appearance', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Show', 'thegem').' '.$name,
				'param_name' => 'show_details',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'callback' => 'show_details_callback',
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Appearance', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => $layout_name,
				'param_name' => 'details_layout',
				'value' => array(
					__('Vertical', 'thegem') => 'vertical',
					__('Inline', 'thegem') => 'inline',
				),
				'std' => 'vertical',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Appearance', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Details Style', 'thegem'),
				'param_name' => 'details_style',
				'value' => array(
					__('Text', 'thegem') => 'text',
					__('Labels', 'thegem') => 'labels',
				),
				'std' => 'text',
				'dependency' => array(
					'element' => 'details_layout',
					'value' => 'inline'
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Appearance', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => $position_name,
				'param_name' => 'details_position',
				'value' => array(
					__('Top', 'thegem') => 'top',
					__('Bottom', 'thegem') => 'bottom',
				),
				'std' => 'bottom',
				'dependency' => array(
					'element' => 'details_layout',
					'value' => 'inline'
				),
				'edit_field_class' => 'position_below vc_column vc_col-sm-6',
				'group' => __('Appearance', 'thegem')
			),
			array(
				'type' => 'param_group',
				'heading' => __('Attributes', 'thegem'),
				'param_name' => 'repeater_details',
				'value' => urlencode(json_encode(array(
					array(
						'attribute_title' => 'Attribute 1',
						'attribute_type' => $default_type,
					),
				))),
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'params' => array_merge(
					array(
						array(
							'type' => 'textfield',
							'heading' => __('Title', 'thegem'),
							'param_name' => 'attribute_title',
							'value' => __('Title', 'thegem'),
							'edit_field_class' => 'vc_column vc_col-sm-12',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Type', 'thegem'),
							'param_name' => 'attribute_type',
							'value' => array_merge(
								[
									__('Project Details', 'thegem') => 'details',
									__('Taxonomies', 'thegem') => 'taxonomies',
									__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
								],
								thegem_cf_get_acf_plugin_groups()
							),
							'std' => $default_type,
							'edit_field_class' => 'vc_column vc_col-sm-6',
							'group' => __('Filters & Sorting', 'thegem')
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Field', 'thegem'),
							'param_name' => 'attribute_details',
							'value' => select_portfolio_details(true),
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('details')
							),
							'description' => $description,
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Taxonomy', 'thegem'),
							'param_name' => 'attribute_taxonomies',
							'value' => $taxonomies,
							'std' => $std_tax,
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Field', 'thegem'),
							'param_name' => 'attribute_custom_fields',
							'value' => $custom_fields,
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('custom_fields')
							),
							'description' => $description,
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
					),
					$filter_acf,
					array(
						array(
							'type' => 'dropdown',
							'heading' => __('Field Type', 'thegem'),
							'param_name' => 'attribute_meta_type',
							'value' => array(
								__('Text', 'thegem') => 'text',
								__('Number', 'thegem') => 'number',
							),
							'std' => 'text',
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Price Format', 'thegem'),
							'param_name' => 'attribute_price_format',
							'value' => array(
								__('Disabled', 'thegem') => 'disabled',
								__('WP Locale', 'thegem') => 'wp_locale',
								__('Custom Locale', 'thegem') => 'custom_locale',
							),
							'std' => 'disabled',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Custom Locale', 'thegem'),
							'param_name' => 'attribute_price_format_locale',
							'value' => __('', 'thegem'),
							'description' => __('Enter locale, e.g. en_GB. See <a href="https://wpcentral.io/internationalization/" target="_blank">complete locale list</a>.', 'thegem'),
							'dependency' => array(
								'element' => 'attribute_price_format',
								'value' => array('custom_locale')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_hidden_param',
							'param_name' => 'clearfix',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'no-top-padding vc_column vc_col-sm-12',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Prefix', 'thegem'),
							'param_name' => 'attribute_price_format_prefix',
							'std' => '',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Suffix', 'thegem'),
							'param_name' => 'attribute_price_format_suffix',
							'std' => '',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_hidden_param',
							'param_name' => 'clearfix',
							'edit_field_class' => 'no-top-padding',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Icon pack', 'thegem'),
							'param_name' => 'attribute_icon_pack',
							'value' => array_merge(
								array(
									__('Material Design', 'thegem') => 'material',
									__('FontAwesome', 'thegem') => 'fontawesome',
									__('Elegant', 'thegem') => 'elegant',
									__('Additional', 'thegem') => 'thegemdemo',
									__('Header Icons', 'thegem') => 'thegem-header'
								),
								thegem_userpack_to_dropdown()
							),
							'std' => 'material',
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_material',
							'icon_pack' => 'material',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('material')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_fontawesome',
							'icon_pack' => 'fontawesome',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('fontawesome')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_elegant',
							'icon_pack' => 'elegant',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('elegant')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_thegemdemo',
							'icon_pack' => 'thegemdemo',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('thegemdemo')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_thegemheader',
							'icon_pack' => 'thegem-header',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('thegem-header')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
					),
					thegem_userpack_to_shortcode(array(
						array(
							'type' => 'thegem_icon',
							'heading' => __('Icon', 'thegem'),
							'param_name' => 'attribute_icon_userpack',
							'icon_pack' => 'userpack',
							'dependency' => array(
								'element' => 'attribute_icon_pack',
								'value' => array('userpack')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
					))
				),
				'edit_field_class' => 'vc_column vc_col-sm-12',
				'group' => __('Appearance', 'thegem')
			),
		);
	}

	$project_details_portfolio = get_project_details_fields($filter_acf);
	$project_details_post = get_project_details_fields($filter_acf, 'post');

	$read_more_button = array(
		array(
			'type' => 'thegem_delimeter_heading_two_level',
			'heading' => __('Button', 'thegem'),
			'param_name' => 'sub_delim_head',
			'dependency' => array(
				'callback' => 'readmore_button_callback'
			),
			'edit_field_class' => 'readmore_button thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
			'group' => __('Appearance', 'thegem')
		),
		array(
			'type' => 'checkbox',
			'heading' => __('Show "Read More" Button', 'thegem'),
			'param_name' => 'show_readmore_button',
			'std' => '',
			'value' => array(__('Yes', 'thegem') => '1'),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Appearance', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Button Text', 'thegem'),
			'param_name' => 'readmore_button_text',
			'std' => __('Read More', 'thegem'),
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Appearance', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Button Link', 'thegem'),
			'param_name' => 'readmore_button_link',
			'value' => array(
				__('Link to Single Post', 'thegem') => 'default',
				__('Custom Link', 'thegem') => 'custom',
			),
			'std' => 'default',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Appearance', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Button Link', 'thegem'),
			'param_name' => 'readmore_button_custom_link',
			'dependency' => array(
				'element' => 'readmore_button_link',
				'value' => array('custom')
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Appearance', 'thegem')
		),
		array(
			'type' => 'textfield',
			'heading' => __('Button ID', 'thegem'),
			'param_name' => 'readmore_button_id',
			'dependency' => array(
				'element' => 'readmore_button_link',
				'value' => array('custom')
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Appearance', 'thegem')
		),
	);

	$read_more_button_style = array(
		array(
			'type' => 'thegem_delimeter_heading_two_level',
			'heading' => __('Read More Button', 'thegem'),
			'param_name' => 'products_source_sub_delim_head',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
			'group' => __('Style', 'thegem')
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Style', 'thegem'),
			'param_name' => 'readmore_button_style',
			'value' => array(
				__('Flat', 'thegem') => 'flat',
				__('Outline', 'thegem') => 'outline'
			),
			'std' => 'outline',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Sizes', 'thegem'),
			'param_name' => 'readmore_button_size',
			'value' => array(
				__('Default', 'thegem') => 'default',
				__('Tiny', 'thegem') => 'tiny',
				__('Small', 'thegem') => 'small',
				__('Medium', 'thegem') => 'medium',
				__('Large', 'thegem') => 'large',
				__('Giant', 'thegem') => 'giant'
			),
			'std' => 'default',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'textfield',
			'heading' => __('Border radius', 'thegem'),
			'param_name' => 'readmore_button_corner',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'dropdown',
			'heading' => __('Border width', 'thegem'),
			'param_name' => 'readmore_button_border',
			'value' => array(1, 2, 3, 4, 5, 6),
			'std' => 2,
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Text color', 'thegem'),
			'param_name' => 'readmore_button_text_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Hover text color', 'thegem'),
			'param_name' => 'readmore_button_hover_text_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Background color', 'thegem'),
			'param_name' => 'readmore_button_background_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Hover background color', 'thegem'),
			'param_name' => 'readmore_button_hover_background_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Border color', 'thegem'),
			'param_name' => 'readmore_button_border_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
		array(
			'type' => 'colorpicker',
			'heading' => __('Hover border color', 'thegem'),
			'param_name' => 'readmore_button_hover_border_color',
			'dependency' => array(
				'element' => 'show_readmore_button',
				'not_empty' => true
			),
			'edit_field_class' => 'readmore_button vc_column vc_col-sm-6',
			'group' => __('Style', 'thegem'),
		),
	);

	function get_project_filters_fields($filter_acf, $post_type = 'portfolio') {
		if ($post_type == 'post') {
			$prefix = 'news_grid_';
			$std_tax = 'category';
			$taxonomies = select_post_type_taxonomies();
			$custom_fields = select_theme_options_custom_fields_all(true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem');
		} else {
			$prefix = 'portfolio_';
			$std_tax = 'thegem_portfolios';
			$taxonomies = select_post_type_taxonomies('thegem_pf_item', true);
			$custom_fields = select_theme_options_custom_fields('portfolio', true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio Page</a> to manage your custom fields.', 'thegem');
		}

		return array(
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Filters', 'thegem'),
				'param_name' => 'filters_filters_header',
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Filters Type', 'thegem'),
				'param_name' => 'filter_type',
				'value' => array(
					__('Default Filter', 'thegem') => 'default',
					__('Extended Filter', 'thegem') => 'extended',
				),
				'std' => 'default',
				'dependency' => array(
					'callback' => 'grid_filter_type_callback',
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Filter & Sorting Style', 'thegem'),
				'param_name' => 'filter_style',
				'value' => array(
					__('Buttons', 'thegem') => 'buttons',
					__('Tabs Default', 'thegem') => 'tabs-default',
					__('Tabs Alternative', 'thegem') => 'tabs-alternative',
				),
				'std' => 'buttons',
				'dependency' => array(
					'element' => 'filter_type',
					'value' => array('default')
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_hidden_param',
				'param_name' => 'clearfix',
				'edit_field_class' => 'no-top-padding',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Show Filters', 'thegem'),
				'param_name' => $prefix . 'with_filter',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Filters Mobile Dropdown', 'thegem'),
				'param_name' => 'mobile_dropdown',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => 'filter_style',
					'value' => array('tabs-default', 'tabs-alternative')
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_hidden_param',
				'param_name' => 'clearfix',
				'edit_field_class' => 'no-top-padding',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Filter By', 'thegem'),
				'param_name' => 'filter_by',
				'value' => $taxonomies,
				'std' => $std_tax,
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Click Behavior', 'thegem'),
				'param_name' => 'attribute_click_behavior',
				'value' => array(
					__('Filtering', 'thegem') => 'filtering',
					__('Link to Post Archive', 'thegem') => 'archive_link',
				),
				'std' => 'filtering',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Order By', 'thegem'),
				'param_name' => 'attribute_order_by',
				'value' => array(
					__('Name', 'thegem') => 'name',
					__('Term Order', 'thegem') => 'term_order',
				),
				'std' => 'name',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Query Type', 'thegem'),
				'param_name' => 'attribute_query_type',
				'value' => array(
					__('AND', 'thegem') => 'and',
					__('OR', 'thegem') => 'or',
				),
				'std' => 'or',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'param_group',
				'heading' => __('Filters', 'thegem'),
				'param_name' => 'repeater_attributes',
				'value' => urlencode(json_encode(array(
					array(
						'attribute_title' => 'Categories',
						'attribute_taxonomies' => $std_tax,
					),
				))),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'params' => array_merge(
					array(
						array(
							'type' => 'textfield',
							'heading' => __('Title', 'thegem'),
							'param_name' => 'attribute_title',
							'value' => __('Title', 'thegem'),
							'edit_field_class' => 'vc_column vc_col-sm-12',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Filter By', 'thegem'),
							'param_name' => 'attribute_type',
							'value' => array_merge(
								[
									__('Taxonomies', 'thegem') => 'taxonomies',
									__('Project Details', 'thegem') => 'details',
									__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
								],
								thegem_cf_get_acf_plugin_groups()
							),
							'std' => 'taxonomies',
							'edit_field_class' => 'vc_column vc_col-sm-6',
							'group' => __('Filters & Sorting', 'thegem')
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Taxonomy', 'thegem'),
							'param_name' => 'attribute_taxonomies',
							'value' => $taxonomies,
							'std' => $std_tax,
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'checkbox',
							'heading' => __('Hierarchy', 'thegem'),
							'param_name' => 'attribute_taxonomies_hierarchy',
							'value' => array(__('Yes', 'thegem') => '1'),
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Click Behavior', 'thegem'),
							'param_name' => 'attribute_taxonomies_click_behavior',
							'value' => array(
								__('Filtering', 'thegem') => 'filtering',
								__('Link to Post Archive', 'thegem') => 'archive_link',
							),
							'std' => 'filtering',
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Field', 'thegem'),
							'param_name' => 'attribute_details',
							'value' => select_portfolio_details(true),
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('details')
							),
							'description' => $description,
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Select Field', 'thegem'),
							'param_name' => 'attribute_custom_fields',
							'value' => $custom_fields,
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('custom_fields')
							),
							'description' => $description,
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
					),
					$filter_acf,
					array(
						array(
							'type' => 'dropdown',
							'heading' => __('Field Type', 'thegem'),
							'param_name' => 'attribute_meta_type',
							'value' => array(
								__('Text', 'thegem') => 'text',
								__('Number', 'thegem') => 'number',
							),
							'std' => 'text',
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array_merge(
									array('custom_fields', 'details'),
									thegem_cf_get_acf_plugin_groups_keys()
								),
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Price Format', 'thegem'),
							'param_name' => 'attribute_price_format',
							'value' => array(
								__('Disabled', 'thegem') => 'disabled',
								__('WP Locale', 'thegem') => 'wp_locale',
								__('Custom Locale', 'thegem') => 'custom_locale',
							),
							'std' => 'disabled',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Custom Locale', 'thegem'),
							'param_name' => 'attribute_price_format_locale',
							'value' => __('', 'thegem'),
							'description' => __('Enter locale, e.g. en_GB. See <a href="https://wpcentral.io/internationalization/" target="_blank">complete locale list</a>.', 'thegem'),
							'dependency' => array(
								'element' => 'attribute_price_format',
								'value' => array('custom_locale')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'thegem_hidden_param',
							'param_name' => 'clearfix',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'no-top-padding vc_column vc_col-sm-12',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Prefix', 'thegem'),
							'param_name' => 'attribute_price_format_prefix',
							'std' => '',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'textfield',
							'heading' => __('Suffix', 'thegem'),
							'param_name' => 'attribute_price_format_suffix',
							'std' => '',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('number')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Order By', 'thegem'),
							'param_name' => 'attribute_order_by',
							'value' => array(
								__('Name', 'thegem') => 'name',
								__('Term Order', 'thegem') => 'term_order',
							),
							'std' => 'name',
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Order By', 'thegem'),
							'param_name' => 'attribute_order_by_details',
							'value' => array(
								__('Name', 'thegem') => 'name',
								__('Term Order', 'thegem') => 'term_order',
							),
							'std' => 'name',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('text')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Query Type', 'thegem'),
							'param_name' => 'attribute_query_type',
							'value' => array(
								__('AND', 'thegem') => 'and',
								__('OR', 'thegem') => 'or',
							),
							'std' => 'and',
							'dependency' => array(
								'element' => 'attribute_type',
								'value' => array('taxonomies')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
						array(
							'type' => 'dropdown',
							'heading' => __('Query Type', 'thegem'),
							'param_name' => 'attribute_query_type_details',
							'value' => array(
								__('AND', 'thegem') => 'and',
								__('OR', 'thegem') => 'or',
							),
							'std' => 'and',
							'dependency' => array(
								'element' => 'attribute_meta_type',
								'value' => array('text')
							),
							'edit_field_class' => 'vc_column vc_col-sm-6',
						),
					)),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Filters Style', 'thegem'),
				'param_name' => 'filters_style',
				'value' => array(
					__('Horizontal', 'thegem') => 'standard',
					__('Sidebar', 'thegem') => 'sidebar',
					__('Hidden Sidebar', 'thegem') => 'hidden',
				),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Sidebar Position', 'thegem'),
				'param_name' => 'sidebar_position',
				'value' => array(
					__('Left', 'thegem') => 'left',
					__('Right', 'thegem') => 'right',
				),
				'std' => 'left',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('sidebar')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Sticky Sidebar', 'thegem'),
				'param_name' => 'sidebar_sticky',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('sidebar')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Sticky Filters', 'thegem'),
				'param_name' => 'default_filters_sticky',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Sticky Filters', 'thegem'),
				'param_name' => 'filters_sticky',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Scroll To Top', 'thegem'),
				'param_name' => 'filters_scroll_top',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('“Show All” Button', 'thegem'),
				'param_name' => 'filter_show_all',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Truncate Filters', 'thegem'),
				'param_name' => 'truncate_filters',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Number of filters to show', 'thegem'),
				'param_name' => 'truncate_filters_number',
				'std' => '5',
				'dependency' => array(
					'element' => 'truncate_filters',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Filter Preloading', 'thegem'),
				'param_name' => 'filters_preloading',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'description' => __('If enabled, items in the filter buttons will be preloaded on the current page.', 'thegem'),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Sorting', 'thegem'),
				'param_name' => 'sorting_filters_header',
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Show Sorting', 'thegem'),
				'param_name' => $prefix . 'sorting',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Search', 'thegem'),
				'param_name' => 'search_filters_header',
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Show Search', 'thegem'),
				'param_name' => $prefix . 'show_search',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Reset Filters on Search', 'thegem'),
				'param_name' => 'search_reset_filters',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Live Search', 'thegem'),
				'param_name' => 'live_search',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Search By', 'thegem'),
				'param_name' => 'search_by',
				'value' => array(
					__('Content', 'thegem') => 'content',
					__('Meta Fields', 'thegem') => 'meta',
				),
				'std' => 'content',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Show as', 'thegem'),
				'param_name' => 'show_search_as',
				'value' => array(
					__('Icon', 'thegem') => 'icon',
					__('Input', 'thegem') => 'input',
				),
				'std' => 'icon',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Text Labels', 'thegem'),
				'param_name' => 'text_labels_filters_extras',
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Show All" Text', 'thegem'),
				'param_name' => 'filters_text_labels_all_text',
				'value' => __('Show All', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Clear Filters" Text', 'thegem'),
				'param_name' => 'filters_text_labels_clear_text',
				'value' => __('Clear Filters', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Search" Text', 'thegem'),
				'param_name' => 'filters_text_labels_search_text',
				'value' => __('Search...', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Show Filters" Text', 'thegem'),
				'param_name' => 'filter_buttons_hidden_show_text',
				'value' => __('Show Filters', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Sidebar Title" Text', 'thegem'),
				'param_name' => 'filter_buttons_hidden_sidebar_title',
				'value' => __('Filter', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Filter By" Text', 'thegem'),
				'param_name' => 'filter_buttons_hidden_filter_by_text',
				'value' => __('Filter By', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Extras', 'thegem'),
				'param_name' => 'search_filters_extras',
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Used in fullwidth section (no gaps)', 'thegem'),
				'param_name' => 'fullwidth_section_sorting',
				'value' => array(__('Yes', 'thegem') => '1'),
				'description' => __('Activate to add extra padding', 'thegem'),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"No Items Found" Button Text', 'thegem'),
				'param_name' => 'not_found_text',
				'std' => __('No items were found matching your selection', 'thegem'),
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Filter Style', 'thegem'),
				'param_name' => 'filter_style_default_delim_head',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Position', 'thegem'),
				'param_name' => 'filter_buttons_position',
				'value' => array(
					__('Default', 'thegem') => 'default',
					__('Left', 'thegem') => 'left',
					__('Right', 'thegem') => 'right',
					__('Center', 'thegem') => 'center',
				),
				'std' => 'default',
				'dependency' => array(
					'element' => $prefix . 'with_filter',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Hover Pointer', 'thegem'),
				'param_name' => 'hover_pointer',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => 'filter_style',
					'value' => array('tabs-default', 'tabs-alternative')
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Sticky Filters Background', 'thegem'),
				'param_name' => 'default_filters_sticky_color',
				'dependency' => array(
					'element' => 'default_filters_sticky',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('“Show All” Button Text', 'thegem'),
				'param_name' => $prefix . 'all_text',
				'std' => __('Show All', 'thegem'),
				'dependency' => array(
					'element' => 'filter_show_all',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('“Show Filters” Text', 'thegem'),
				'param_name' => 'filters_mobile_show_button_text',
				'std' => __('Show Filters', 'thegem'),
				'dependency' => array(
					'element' => 'mobile_dropdown',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('“More” Text', 'thegem'),
				'param_name' => 'filters_more_button_text',
				'std' => __('More', 'thegem'),
				'dependency' => array(
					'element' => 'truncate_filters',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('“More” Arrow', 'thegem'),
				'param_name' => 'filters_more_button_arrow',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => 'truncate_filters',
					'not_empty' => true
				),
				'edit_field_class' => 'default_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Filter Style (Standard)', 'thegem'),
				'param_name' => 'filter_style_standard_delim_head',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Border Width', 'thegem'),
				'param_name' => 'filter_buttons_standard_border_width',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Border Radius', 'thegem'),
				'param_name' => 'filter_buttons_standard_border_radius',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Bottom Spacing', 'thegem'),
				'param_name' => 'filter_buttons_standard_bottom_spacing',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Alignment', 'thegem'),
				'param_name' => 'filter_buttons_standard_alignment',
				'value' => array(
					__('Left', 'thegem') => 'left',
					__('Right', 'thegem') => 'right',
					__('Center', 'thegem') => 'center',
				),
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Dropdown Colors', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_text_header',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Sticky Filters Background', 'thegem'),
				'param_name' => 'filters_sticky_color',
				'dependency' => array(
					'element' => 'filters_sticky',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Filter Style (Sidebar)', 'thegem'),
				'param_name' => 'filter_style_hidden_sidebar_delim_head',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('sidebar')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Filter Style (Hidden)', 'thegem'),
				'param_name' => 'filter_style_hidden_delim_head',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Text Colors', 'thegem'),
				'param_name' => 'filter_buttons_hidden_sidebar_text_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden', 'sidebar')
				),
				'description' => __('Filter titles inherit style settings from sidebar widgets and can be adjusted in theme options under "Typography -> Elements -> Sidebar Widgets"', 'thegem'),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Normal', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_text_color_normal',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Hover', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_text_color_hover',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Active', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_text_color_active',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Dropdown Background', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_background_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Number Range Background', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_price_range_background_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Normal', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_price_range_background_color_normal',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Hover', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_price_range_background_color_hover',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Active', 'thegem'),
				'param_name' => 'filter_buttons_standard_dropdown_price_range_background_color_active',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Sidebar Separator', 'thegem'),
				'param_name' => 'product_separator_sidebar_sub',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden', 'sidebar')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Separator Width', 'thegem'),
				'param_name' => 'filter_buttons_hidden_sidebar_separator_width',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden', 'sidebar')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Separator Color', 'thegem'),
				'param_name' => 'filter_buttons_hidden_sidebar_separator_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden', 'sidebar')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Selected Filters', 'thegem'),
				'param_name' => 'selected_filters_sub',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Duplicate in Sidebar', 'thegem'),
				'param_name' => 'duplicate_selected_in_sidebar',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('sidebar')
				),
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Selected Filters Border Radius', 'thegem'),
				'param_name' => 'filter_buttons_standard_selected_border_radius',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_hidden_param',
				'param_name' => 'clearfix',
				'edit_field_class' => 'extended_filter no-top-padding vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_selected_text_color_normal',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Color on hover', 'thegem'),
				'param_name' => 'filter_buttons_standard_selected_text_color_hover',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Background Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_selected_background_color_normal',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Background Color on hover', 'thegem'),
				'param_name' => 'filter_buttons_standard_selected_background_color_hover',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Sidebar Responsive Mode', 'thegem'),
				'param_name' => 'sidebar_responsive_mode_filters_heading',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Sidebar', 'thegem'),
				'param_name' => 'sidebar_hidden_filters_heading',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('hidden')
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('"Show Filters" Icon', 'thegem'),
				'param_name' => 'filter_buttons_hidden_show_icon',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('"Show Filters" Text Color', 'thegem'),
				'param_name' => 'filter_buttons_sidebar_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Show Filters" Border Radius', 'thegem'),
				'param_name' => 'filter_buttons_sidebar_border_radius',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Show Filters" Border Width', 'thegem'),
				'param_name' => 'filter_buttons_sidebar_border_width',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Sidebar Background Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_background',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Overlay Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_overlay_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('"Close" Icon Color', 'thegem'),
				'param_name' => 'filter_buttons_standard_close_icon_color',
				'dependency' => array(
					'element' => 'filters_style',
					'value' => array('standard', 'sidebar','hidden')
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Search', 'thegem'),
				'param_name' => 'search_standard_filters_sub',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Icon color', 'thegem'),
				'param_name' => 'filter_buttons_standard_search_icon_color',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Input Border radius', 'thegem'),
				'param_name' => 'filter_buttons_standard_search_input_border_radius',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Input color', 'thegem'),
				'param_name' => 'filter_buttons_standard_search_input_color',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Input Background color', 'thegem'),
				'param_name' => 'filter_buttons_standard_search_input_background_color',
				'dependency' => array(
					'element' => $prefix . 'show_search',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_filter vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Sorting Style', 'thegem'),
				'param_name' => 'sorting_style_more_delim_head',
				'edit_field_class' => 'extended_sorting thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Default sorting" Text', 'thegem'),
				'param_name' => 'sorting_extended_text',
				'value' => __('Default sorting', 'woocommerce' ),
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Color', 'thegem'),
				'param_name' => 'sorting_extended_text_color',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-12',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Border Radius', 'thegem'),
				'param_name' => 'sorting_extended_border_radius',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Border Width', 'thegem'),
				'param_name' => 'sorting_extended_border_width',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('Bottom Spacing', 'thegem'),
				'param_name' => 'sorting_extended_bottom_spacing',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-4',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Sort by title (A-Z)" Text', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_title_text',
				'value' => __( 'Sort by title (A-Z)', 'thegem' ),
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Sort by title (Z-A)" Text', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_title_desc_text',
				'value' => __( 'Sort by title (Z-A)', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Sort by latest" Text', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_latest_text',
				'value' => __( 'Sort by latest', 'thegem'),
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'textfield',
				'heading' => __('"Sort by oldest" Text', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_oldest_text',
				'value' => __( 'Sort by oldest', 'thegem' ),
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Text Color', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_text_color_normal',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Hover Text Color', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_text_color_hover',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Active Text Color', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_text_color_active',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Dropdown Background Color', 'thegem'),
				'param_name' => 'sorting_extended_dropdown_background_color',
				'dependency' => array(
					'element' => $prefix . 'sorting',
					'not_empty' => true
				),
				'edit_field_class' => 'extended_sorting vc_column vc_col-sm-6',
				'group' => __('Filters & Sorting', 'thegem')
			),
		);
	}

	$project_filters_portfolio = get_project_filters_fields($filter_acf);
	$project_filters_post = get_project_filters_fields($filter_acf, 'post');

	function get_project_details_style_fields($post_type = 'portfolio') {
		if ($post_type == 'post') {
			$name = __('Custom Fields', 'thegem');
		} else {
			$name = __('Project Details', 'thegem');
		}

		return array(
			array(
				'type' => 'thegem_delimeter_heading',
				'heading' => $name . ' ' . __('Style', 'thegem'),
				'param_name' => 'details_delim_head',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Alignment', 'thegem'),
				'param_name' => 'details_alignment_vertical',
				'value' => array(
					__('Justify', 'thegem') => 'justify',
					__('Left', 'thegem') => 'left',
					__('Right', 'thegem') => 'right',
				),
				'std' => 'justify',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Alignment', 'thegem'),
				'param_name' => 'details_alignment_inline',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Center', 'thegem') => 'center',
					__('Left', 'thegem') => 'left',
					__('Right', 'thegem') => 'right',
				),
				'std' => '',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'inline_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Divider', 'thegem'),
				'param_name' => 'title_sub_delim_head',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Divider', 'thegem'),
				'param_name' => 'details_divider_show',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '1',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Color', 'thegem'),
				'param_name' => 'details_divider_color',
				'dependency' => array(
					'element' => 'details_divider_show',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Field Label', 'thegem'),
				'param_name' => 'title_sub_delim_head',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Size Preset', 'thegem'),
				'param_name' => 'details_label_preset',
				'value' => array(
					__('Title H1', 'thegem') => 'title-h1',
					__('Title H2', 'thegem') => 'title-h2',
					__('Title H3', 'thegem') => 'title-h3',
					__('Title H4', 'thegem') => 'title-h4',
					__('Title H5', 'thegem') => 'title-h5',
					__('Title H6', 'thegem') => 'title-h6',
					__('Title xLarge', 'thegem') => 'title-xlarge',
					__('Styled Subtitle', 'thegem') => 'styled-subtitle',
					__('Main Menu', 'thegem') => 'main-menu-item',
					__('Body', 'thegem') => 'text-body',
					__('Tiny Body', 'thegem') => 'text-body-tiny',
				),
				'std' => 'text-body-tiny',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Font Transform', 'thegem'),
				'param_name' => 'details_label_transform',
				'value' => array(
					__('Default', 'thegem') => '',
					__('None', 'thegem') => 'none',
					__('Lowercase', 'thegem') => 'lowercase',
					__('Uppercase', 'thegem') => 'uppercase',
					__('Capitalize', 'thegem') => 'capitalize',
				),
				'std' => '',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Font Weight', 'thegem'),
				'param_name' => 'details_label_font_weight',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Thin', 'thegem') => 'light',
				),
				'std' => '',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'textfield',
				'heading' => __('Letter Spacing', 'thegem'),
				'param_name' => 'details_label_letter_spacing',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Color', 'thegem'),
				'param_name' => 'details_label_color',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'textfield',
				'heading' => __('Icon Size', 'thegem'),
				'param_name' => 'details_icon_size',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'checkbox',
				'heading' => __('Colon', 'thegem'),
				'param_name' => 'details_colon_show',
				'value' => array(__('Yes', 'thegem') => '1'),
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vertical_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'textfield',
				'heading' => __('Separator', 'thegem'),
				'param_name' => 'details_separator',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'inline_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'thegem_delimeter_heading_two_level',
				'heading' => __('Field Value', 'thegem'),
				'param_name' => 'title_sub_delim_head',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Size Preset', 'thegem'),
				'param_name' => 'details_value_preset',
				'value' => array(
					__('Title H1', 'thegem') => 'title-h1',
					__('Title H2', 'thegem') => 'title-h2',
					__('Title H3', 'thegem') => 'title-h3',
					__('Title H4', 'thegem') => 'title-h4',
					__('Title H5', 'thegem') => 'title-h5',
					__('Title H6', 'thegem') => 'title-h6',
					__('Title xLarge', 'thegem') => 'title-xlarge',
					__('Styled Subtitle', 'thegem') => 'styled-subtitle',
					__('Main Menu', 'thegem') => 'main-menu-item',
					__('Body', 'thegem') => 'text-body',
					__('Tiny Body', 'thegem') => 'text-body-tiny',
				),
				'std' => 'text-body-tiny',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Font Transform', 'thegem'),
				'param_name' => 'details_value_transform',
				'value' => array(
					__('Default', 'thegem') => '',
					__('None', 'thegem') => 'none',
					__('Lowercase', 'thegem') => 'lowercase',
					__('Uppercase', 'thegem') => 'uppercase',
					__('Capitalize', 'thegem') => 'capitalize',
				),
				'std' => '',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem')
			),
			array(
				'type' => 'dropdown',
				'heading' => __('Font Weight', 'thegem'),
				'param_name' => 'details_value_font_weight',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Thin', 'thegem') => 'light',
				),
				'std' => '',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'textfield',
				'heading' => __('Letter Spacing', 'thegem'),
				'param_name' => 'details_value_letter_spacing',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Color', 'thegem'),
				'param_name' => 'details_value_color',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'colorpicker',
				'heading' => __('Border Color', 'thegem'),
				'param_name' => 'details_value_border_color',
				'dependency' => array(
					'element' => 'details_style',
					'value' => array('labels')
				),
				'edit_field_class' => 'inline_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
			array(
				'type' => 'textfield',
				'heading' => __('Icon Size', 'thegem'),
				'param_name' => 'details_icon_size_value',
				'dependency' => array(
					'element' => 'show_details',
					'not_empty' => true
				),
				'edit_field_class' => 'inline_details vc_column vc_col-sm-6',
				'group' => __('Style', 'thegem'),
			),
		);
	}

	$project_details_style_portfolio = get_project_details_style_fields();
	$project_details_style_post = get_project_details_style_fields('post');

	function get_additional_meta_fields($meta_fields_acf, $post_type = 'portfolio') {
		if ($post_type == 'post') {
			$std_tax = 'category';
			$taxonomies = select_post_type_taxonomies();
			$custom_fields = select_theme_options_custom_fields_all(true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem');
		} else {
			$std_tax = 'thegem_portfolios';
			$taxonomies = select_post_type_taxonomies('thegem_pf_item', true);
			$custom_fields = select_theme_options_custom_fields('portfolio', true);
			$description = __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio Page</a> to manage your custom fields.', 'thegem');
		}

		return array_merge(
			array(
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'additional_meta_added',
					'std' => '1',
					'save_always' => true,
					'edit_field_class' => 'no-top-padding vc_column vc_col-sm-12',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Additional Meta', 'thegem'),
					'param_name' => 'show_additional_meta',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'callback' => 'additional_meta_callback',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Select Meta Type', 'thegem'),
					'param_name' => 'additional_meta_type',
					'value' => array_merge(
						[
							__('Taxonomies', 'thegem') => 'taxonomies',
							__('Project Details', 'thegem') => 'details',
							__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
						],
						thegem_cf_get_acf_plugin_groups()
					),
					'std' => 'taxonomies',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Select Taxonomy', 'thegem'),
					'param_name' => 'additional_meta_taxonomies',
					'value' => $taxonomies,
					'std' => $std_tax,
					'dependency' => array(
						'element' => 'additional_meta_type',
						'value' => array('taxonomies')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Select Field', 'thegem'),
					'param_name' => 'additional_meta_details',
					'value' => select_portfolio_details(true),
					'dependency' => array(
						'element' => 'additional_meta_type',
						'value' => array('details')
					),
					'description' => $description,
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Select Field', 'thegem'),
					'param_name' => 'additional_meta_custom_fields',
					'value' => $custom_fields,
					'dependency' => array(
						'element' => 'additional_meta_type',
						'value' => array('custom_fields')
					),
					'description' => $description,
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
			),
			$meta_fields_acf,
			array(
				array(
					'type' => 'dropdown',
					'heading' => __('Click Behavior', 'thegem'),
					'param_name' => 'additional_meta_click_behavior',
					'value' => array(
						__('Filtering', 'thegem') => 'filtering',
						__('Link to Post Archive', 'thegem') => 'archive_link',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'filtering',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'taxonomies_behavior vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Click Behavior', 'thegem'),
					'param_name' => 'additional_meta_click_behavior_meta',
					'value' => array(
						__('Filtering', 'thegem') => 'filtering',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'filtering',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'meta_behavior vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'edit_field_class' => 'no-top-padding',
					'group' => __('Appearance', 'thegem')
				)
			)
		);
	}

	$project_additional_meta_fields_portfolio = get_additional_meta_fields($meta_fields_acf);
	$project_additional_meta_fields_post = get_additional_meta_fields($meta_fields_acf, 'post');

	$gallery_grid_source_type_fields = array(
		array(
			'type' => 'thegem_hidden_param',
			'param_name' => 'source_type',
			'std' => 'custom',
			'save_always' => true,
			'edit_field_class' => 'no-top-padding vc_column vc_col-sm-12',
		),
	);

	if (thegem_is_template_post('single-product')) {
		$gallery_grid_source_type_fields = array(
			array(
				'type' => 'dropdown',
				'heading' => __('Blog Source', 'thegem'),
				'param_name' => 'source_type',
				'value' => array(
					__('Product Gallery', 'thegem') => 'product-gallery',
					__('Custom Selection', 'thegem') => 'custom',
				),
				'std' => 'product-gallery',
				'save_always' => true,
				'edit_field_class' => 'vc_column vc_col-sm-12',
			),
		);
	}

	if (thegem_is_template_post('portfolio')) {
		$gallery_grid_source_type_fields = array(
			array(
				'type' => 'dropdown',
				'heading' => __('Blog Source', 'thegem'),
				'param_name' => 'source_type',
				'value' => array(
					__('Project Gallery', 'thegem') => 'portfolio-gallery',
					__('Custom Selection', 'thegem') => 'custom',
				),
				'std' => 'portfolio-gallery',
				'save_always' => true,
				'edit_field_class' => 'vc_column vc_col-sm-12',
			),
		);
	}

	$shortcodes = array(
		'gem_alert_box' => array(
			'name' => __('Alert Box / CTA', 'thegem'),
			'base' => 'gem_alert_box',
			'is_container' => true,
			'js_view' => 'VcGemAlertBoxView',
			'icon' => 'thegem-icon-wpb-ui-alert-box',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Catch visitors attention with alert box', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown(),array(__('Image', 'thegem') => 'image')),
					'std' => 'material',
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('material')
					),
					'std' => 'f287',
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegem-header')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'attach_image',
						'heading' => __('Image', 'thegem'),
						'param_name' => 'image',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('image')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Shape', 'thegem'),
						'param_name' => 'icon_shape',
						'value' => array(__('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle', __('Rhombus', 'thegem') => 'romb', __('Hexagon', 'thegem') => 'hexagon'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Style', 'thegem'),
						'param_name' => 'icon_style',
						'value' => array(__('Default', 'thegem') => '', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg'),
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant', 'material', 'fontawesome', 'thegem-header', 'userpack')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'icon_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant', 'material', 'fontawesome', 'thegem-header', 'userpack')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color 2', 'thegem'),
						'param_name' => 'icon_color_2',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant', 'material', 'fontawesome', 'thegem-header', 'userpack')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Background Color', 'thegem'),
						'param_name' => 'icon_background_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant', 'material', 'fontawesome', 'thegem-header', 'userpack')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Border Color', 'thegem'),
						'param_name' => 'icon_border_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant', 'material', 'fontawesome', 'thegem-header', 'userpack')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Size', 'thegem'),
						'param_name' => 'icon_size',
						'value' => array(__('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text Color', 'thegem'),
						'param_name' => 'content_text_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'content_background_color',
						'std' => '#f4f6f7'
					),
					array(
						'type' => 'attach_image',
						'heading' => __('Background Image', 'thegem'),
						'param_name' => 'content_background_image',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background style', 'thegem'),
						'param_name' => 'content_background_style',
						'value' => array(
							__('Default', 'thegem') => '',
							__('Cover', 'thegem') => 'cover',
							__('Contain', 'thegem') => 'contain',
							__('No Repeat', 'thegem') => 'no-repeat',
							__('Repeat', 'thegem') => 'repeat'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background horizontal position', 'thegem'),
						'param_name' => 'content_background_position_horizontal',
						'value' => array(
							__('Center', 'thegem') => 'center',
							__('Left', 'thegem') => 'left',
							__('Right', 'thegem') => 'right'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background vertical position', 'thegem'),
						'param_name' => 'content_background_position_vertical',
						'value' => array(
							__('Top', 'thegem') => 'top',
							__('Center', 'thegem') => 'center',
							__('Bottom', 'thegem') => 'bottom'
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'border_color',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border Width (px)', 'thegem'),
						'param_name' => 'border_width',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border Radius (px)', 'thegem'),
						'param_name' => 'border_radius',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Rectangle Corner', 'thegem'),
						'param_name' => 'rectangle_corner',
						'value' => array(
							__('Left Top', 'thegem') => 'lt',
							__('Right Top', 'thegem') => 'rt',
							__('Right Bottom', 'thegem') => 'rb',
							__('Left Bottom', 'thegem') => 'lb'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Top Arеа Style', 'thegem'),
						'param_name' => 'top_style',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Flag', 'thegem') => 'flag',
							__('Shield', 'thegem') => 'shield',
							__('Ticket', 'thegem') => 'ticket',
							__('Sentence', 'thegem') => 'sentence',
							__('Note 1', 'thegem') => 'note-1',
							__('Note 2', 'thegem') => 'note-2',
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Bottom Arеа Style', 'thegem'),
						'param_name' => 'bottom_style',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Flag', 'thegem') => 'flag',
							__('Shield', 'thegem') => 'shield',
							__('Ticket', 'thegem') => 'ticket',
							__('Sentence', 'thegem') => 'sentence',
							__('Note 1', 'thegem') => 'note-1',
							__('Note 2', 'thegem') => 'note-2',
						),
					),

					array(
						'type' => 'textfield',
						'heading' => __('Button Text', 'thegem'),
						'param_name' => 'button_1_text',
						'group' => __('Button 1', 'thegem'),
					),
					array(
						'type' => 'vc_link',
						'heading' => __( 'URL (Link)', 'thegem' ),
						'param_name' => 'button_1_link',
						'description' => __( 'Add link to button.', 'thegem' ),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'button_1_style',
						'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'button_1_size',
						'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
						'std' => 'small',
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text weight', 'thegem'),
						'param_name' => 'button_1_text_weight',
						'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('No uppercase', 'thegem'),
						'param_name' => 'button_1_no_uppercase',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border radius', 'thegem'),
						'param_name' => 'button_1_corner',
						'value' => 3,
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Border width', 'thegem'),
						'param_name' => 'button_1_border',
						'value' => array(1, 2, 3, 4, 5, 6),
						'std' => 2,
						'dependency' => array(
							'element' => 'button_1_style',
							'value' => array('outline')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text color', 'thegem'),
						'param_name' => 'button_1_text_color',
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover text color', 'thegem'),
						'param_name' => 'button_1_hover_text_color',
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background color', 'thegem'),
						'param_name' => 'button_1_background_color',
						'dependency' => array(
							'element' => 'button_1_style',
							'value' => array('flat')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover background color', 'thegem'),
						'param_name' => 'button_1_hover_background_color',
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border color', 'thegem'),
						'param_name' => 'button_1_border_color',
						'dependency' => array(
							'element' => 'button_1_style',
							'value' => array('outline')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover border color', 'thegem'),
						'param_name' => 'button_1_hover_border_color',
						'dependency' => array(
							'element' => 'button_1_style',
							'value' => array('outline')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'button_1_icon_pack',
						'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
						'std' => 2,
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('elegant')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('material')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('fontawesome')
						),
						'group' => __('Button 1', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('thegem-header')
						),
						'group' => __('Button 1', 'thegem')
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_1_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
						'group' => __('Button 1', 'thegem')
					),

					array(
						'type' => 'checkbox',
						'heading' => __('Activate Button', 'thegem'),
						'param_name' => 'button_2_activate',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Button Text', 'thegem'),
						'param_name' => 'button_2_text',
						'group' => __('Button 2', 'thegem'),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
					),
					array(
						'type' => 'vc_link',
						'heading' => __( 'URL (Link)', 'thegem' ),
						'param_name' => 'button_2_link',
						'description' => __( 'Add link to button.', 'thegem' ),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'button_2_style',
						'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'button_2_size',
						'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
						'std' => 'small',
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text weight', 'thegem'),
						'param_name' => 'button_2_text_weight',
						'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('No uppercase', 'thegem'),
						'param_name' => 'button_2_no_uppercase',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border radius', 'thegem'),
						'param_name' => 'button_2_corner',
						'value' => 3,
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Border width', 'thegem'),
						'param_name' => 'button_2_border',
						'value' => array(1, 2, 3, 4, 5, 6),
						'std' => 2,
						'dependency' => array(
							'element' => 'button_2_style',
							'value' => array('outline')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text color', 'thegem'),
						'param_name' => 'button_2_text_color',
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover text color', 'thegem'),
						'param_name' => 'button_2_hover_text_color',
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background color', 'thegem'),
						'param_name' => 'button_2_background_color',
						'dependency' => array(
							'element' => 'button_2_style',
							'value' => array('flat')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover background color', 'thegem'),
						'param_name' => 'button_2_hover_background_color',
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border color', 'thegem'),
						'param_name' => 'button_2_border_color',
						'dependency' => array(
							'element' => 'button_2_style',
							'value' => array('outline')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover border color', 'thegem'),
						'param_name' => 'button_2_hover_border_color',
						'dependency' => array(
							'element' => 'button_2_style',
							'value' => array('outline')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'button_2_icon_pack',
						'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
						'std' => 2,
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_2_icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'button_2_icon_pack',
							'value' => array('elegant')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_2_icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'button_2_icon_pack',
							'value' => array('material')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_2_icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'button_2_icon_pack',
							'value' => array('fontawesome')
						),
						'group' => __('Button 2', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_2_icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'button_2_icon_pack',
							'value' => array('thegem-header')
						),
						'group' => __('Button 2', 'thegem')
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_2_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_2_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_2_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
						'dependency' => array(
							'element' => 'button_2_activate',
							'not_empty' => true
						),
						'group' => __('Button 2', 'thegem')
					),

					array(
						'type' => 'checkbox',
						'heading' => __('Centered', 'thegem'),
						'param_name' => 'centered',
						'value' => array(__('Yes', 'thegem') => '1')
					),
				)),
		),

		'gem_button' => array(
			'name' => __('Button', 'thegem'),
			'base' => 'gem_button',
			'icon' => 'thegem-icon-wpb-ui-button',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Styled button element', 'thegem'),
			'params' => array_merge(
				gem_button_dynamic_options(),

				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Position', 'thegem'),
						'param_name' => 'position',
						'value' => array(__('Inline', 'thegem') => 'inline', __('Left', 'thegem') => 'left', __('Right', 'thegem') => 'right', __('Center', 'thegem') => 'center', __('Fullwidth', 'thegem') => 'fullwidth')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Button Style Preset', 'thegem'),
						'param_name' => 'style',
						'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border radius', 'thegem'),
						'param_name' => 'corner',
						'value' => 3,
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Button Size', 'thegem'),
						'param_name' => 'size_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size on Desktop', 'thegem'),
						'param_name' => 'size',
						'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
						'std' => 'small',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size on Tablet', 'thegem'),
						'param_name' => 'size_tablet',
						'value' => array(__('Default', 'thegem') => '', __('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size on Mobile', 'thegem'),
						'param_name' => 'size_mobile',
						'value' => array(__('Default', 'thegem') => '', __('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Button Text', 'thegem'),
						'param_name' => 'text_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text weight', 'thegem'),
						'param_name' => 'text_weight',
						'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Letter Spacing', 'thegem'),
						'param_name' => 'letter_spacing',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text Transform', 'thegem'),
						'param_name' => 'text_transform',
						'value' => array(
							__('Default', 'thegem') => '',
							__('Capitalize', 'thegem') => 'capitalize',
							__('Lowercase', 'thegem') => 'lowercase',
							__('Uppercase', 'thegem') => 'uppercase',
							__('None', 'thegem') => 'none',
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Text Size', 'thegem'),
						'param_name' => 'text_size_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Size on Desktop (px)', 'thegem'),
						'param_name' => 'text_size',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Size on Tablet (px)', 'thegem'),
						'param_name' => 'text_size_tablet',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Size on Mobile (px) ', 'thegem'),
						'param_name' => 'text_size_mobile',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('No uppercase', 'thegem'),
						'param_name' => 'no_uppercase',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Border width', 'thegem'),
						'param_name' => 'border',
						'value' => array(1, 2, 3, 4, 5, 6),
						'std' => 2,
						'dependency' => array(
							'element' => 'style',
							'value' => array('outline')
						),
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Button Colors', 'thegem'),
						'param_name' => 'colors_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text color', 'thegem'),
						'param_name' => 'text_color',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background color', 'thegem'),
						'param_name' => 'background_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('flat')
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border color', 'thegem'),
						'param_name' => 'border_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('outline')
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Hover Colors', 'thegem'),
						'param_name' => 'hover_colors_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text color', 'thegem'),
						'param_name' => 'hover_text_color',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background color', 'thegem'),
						'param_name' => 'hover_background_color',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border color', 'thegem'),
						'param_name' => 'hover_border_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('outline')
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Gradient Colors', 'thegem'),
						'param_name' => 'gradient_colors_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Gradient Backgound Colors', 'thegem'),
						'param_name' => 'gradient_backgound',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background From', 'thegem'),
						"edit_field_class" => "vc_col-sm-5 vc_column",
						'param_name' => 'gradient_backgound_from',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background To', 'thegem'),
						"edit_field_class" => "vc_col-sm-5 vc_column",
						'param_name' => 'gradient_backgound_to',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover Background From', 'thegem'),
						"edit_field_class" => "vc_col-sm-5 vc_column",
						'param_name' => 'gradient_backgound_hover_from',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover Background To', 'thegem'),
						"edit_field_class" => "vc_col-sm-5 vc_column",
						'param_name' => 'gradient_backgound_hover_to',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'gradient_backgound_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'gradient_radial_backgound_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",
						) ,
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array(
								'radial',
							)
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Swap Colors', 'thegem'),
						'param_name' => 'gradient_radial_swap_colors',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array(
								'radial',
							)
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'gradient_backgound_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",
						),
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array(
								'linear',
							)
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_backgound_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'gradient_backgound_angle',
							'value' => array(
								'cusotom_deg',
							)
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Separator Style', 'thegem'),
						'param_name' => 'separator',
						'value' => array(
							__('None', 'thegem') => '',
							__('Single', 'thegem') => 'single',
							__('Square', 'thegem') => 'square',
							__('Soft Double', 'thegem') => 'soft-double',
							__('Strong Double', 'thegem') => 'strong-double'
						),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Separator Weight', 'thegem'),
						'param_name' => 'separator_weight',
						'dependency' => array(
							'element' => 'separator',
							'value' => array( 'single', 'soft-double', 'strong-double' )
						)
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Extra class name', 'thegem' ),
						'param_name' => 'extra_class',
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'ID name', 'thegem' ),
						'param_name' => 'id',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'icon_pack',
						'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
						'std' => 2,
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('elegant')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('material')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('fontawesome')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('thegem-header')
						),
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Padding', 'thegem'),
						'param_name' => 'padding_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Left', 'thegem'),
						'param_name' => 'padding_left_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Desktop', 'thegem' ),
						'param_name' => 'padding_left',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Tablet', 'thegem' ),
						'param_name' => 'padding_left_tablet',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Mobile', 'thegem' ),
						'param_name' => 'padding_left_mobile',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Right', 'thegem'),
						'param_name' => 'padding_right_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Desktop', 'thegem' ),
						'param_name' => 'padding_right',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Tablet', 'thegem' ),
						'param_name' => 'padding_right_tablet',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __( 'Mobile', 'thegem' ),
						'param_name' => 'padding_right_mobile',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'group' => __('Style', 'thegem'),
					),
				),
				array(
					array(
						'type' => 'checkbox',
						'heading' => __('Animation enabled', 'thegem'),
						'param_name' => 'effects_enabled',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Animation Type', 'thegem'),
						'param_name' => 'effects_enabled_name',
						'value' =>
							array_merge(array(__('Default', 'thegem') => 'default'), array_flip(TheGemButtonAnimation::getAnimationList())
						),
						'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
						'description' => esc_html__( 'Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'thegem' ),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Animation Speed (ms)', 'thegem'),
						'param_name' => 'effects_enabled_duration',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'effects_enabled_name',
							'value' => array('slide-up', 'slide-down', 'slide-left', 'slide-right', 'fade-down', 'fade-up', 'fade-left', 'fade-right', 'fade')
						),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Animation delay (ms)', 'thegem'),
						'param_name' => 'effects_enabled_delay',
						'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
						'group' => __('Animations', 'thegem'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Timing Function', 'thegem'),
						'param_name' => 'effects_enabled_timing_function',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'effects_enabled_name',
							'value' => array('slide-up', 'slide-down', 'slide-left', 'slide-right', 'fade-down', 'fade-up', 'fade-left', 'fade-right', 'fade')
						),
						'group' => __('Animations', 'thegem'),
						'description' => sprintf( __( '(Please refer to this %s)', 'thegem' ), '<a href="https://www.w3schools.com/cssref/css3_pr_animation-timing-function.asp" target="_blank">article</a>' ),
					)
				),
				$interactions
			),
		),

		'gem_clients' => array(
			'name' => __('Clients', 'thegem'),
			'base' => 'gem_clients',
			'icon' => 'thegem-icon-wpb-ui-clients',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Clients overview inside content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('Grid', 'thegem') => 'grid', __('Carousel', 'thegem') => 'carousel')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Clients Sets', 'thegem'),
					'param_name' => 'set',
					'value' => thegem_vc_get_terms('thegem_clients_sets'),
					'group' =>__('Select Clients Sets', 'thegem'),
					'edit_field_class' => 'thegem-terms-checkboxes'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'autoscroll',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Rows', 'thegem'),
					'param_name' => 'rows',
					'value' => '3',
					'dependency' => array(
						'element' => 'style',
						'value' => array('grid')
					),
				),

				array(
					'type' => 'textfield',
					'heading' => __('Cols', 'thegem'),
					'param_name' => 'cols',
					'value' => '3',
					'dependency' => array(
						'element' => 'style',
						'value' => array('grid')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Fullwidth', 'thegem'),
					'param_name' => 'fullwidth',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('carousel')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable grayscale', 'thegem'),
					'param_name' => 'disable_grayscale',
					'value' => array(__('Yes', 'thegem') => '1')
				),

			)),
		),

		'gem_countdown' => array(
			'name' => __( 'Countdown', 'thegem' ),
			'base' => 'gem_countdown',
			'icon' => 'thegem-icon-wpb-ui-countdown',
			'category' => __( 'TheGem', 'thegem'),
			'params' => array(
				array(
					'type' => 'dropdown',
					'heading' => __( 'Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Boxes', 'thegem') => 'style-3',
						__('Elegant', 'thegem') => 'style-4',
						__('Cross', 'thegem') => 'style-6',
						__('Days Only', 'thegem') => 'style-7',
						__('Circles', 'thegem') => 'style-5',
					),
				),
				array(
					'type' => 'thegem_datepicker_param',
					'heading' => __( 'Start Event', 'thegem' ),
					'description' => 'Date format : Day-Month-Year',
					'param_name' => 'start_eventdate',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'thegem_datepicker_param',
					'heading' => __( 'Event Date', 'thegem' ),
					'description' => 'Date format : Day-Month-Year',
					'param_name' => 'eventdate',
				),
				array(
					'type' => 'dropdown',
					'heading' => __( 'Aligment', 'thegem'),
					'param_name' => 'aligment',
					'value' => array( __('Left', 'thegem') => 'align-left', __('Center', 'thegem') => 'align-center', __('Right', 'thegem') => 'align-right'),
					'dependency' => array(
						'element' => 'style',
						'value' => array(
							'style-4',
							'style-6',
							'style-7',
						)
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Numbers Weight', 'thegem'),
					'param_name' => 'weight_number',
					'value' => array('Bold' => 8, 'Thin' => 4),
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __( 'Number color', 'thegem' ),
					'param_name' => 'color_number',
					'dependency' => array(
						'element' => 'style',
						'value' => array(
							'style-3',
							'style-4',
							'style-6',
							'style-7',
						),
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __( 'Text color', 'thegem' ),
					'param_name' => 'color_text',
					'dependency' => array(
						'element' => 'style',
						'value' => array(
							'style-3',
							'style-4',
							'style-5',
							'style-6',
							'style-7',
						),
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __( 'Border color', 'thegem' ),
					'param_name' => 'color_border',
					'dependency' => array(
						'element' => 'style',
						'value' => array(
							'style-3',
							'style-4',
							'style-6',
						),
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __( 'Countdown text', 'thegem' ),
					'param_name' => 'countdown_text',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-7',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'color_background',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-3',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Color Days', 'thegem'),
					'param_name' => 'color_days',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Color Hours', 'thegem'),
					'param_name' => 'color_hours',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Color Minutes', 'thegem'),
					'param_name' => 'color_minutes',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Color Seconds', 'thegem'),
					'param_name' => 'color_seconds',
					'dependency' => array(
						'element' => 'style',
						'value' => 'style-5',
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __( 'Extra class name', 'thegem' ),
					'param_name' => 'extraclass',
				),
			)
		),

		'gem_counter' => array(
			'name' => __('Counter', 'thegem'),
			'base' => 'gem_counter',
			'as_child' => array('only' => 'gem_counter_box'),
			'content_element' => true,
			'icon' => 'thegem-icon-wpb-ui-counter',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Counter', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('From', 'thegem'),
					'param_name' => 'from',
				),
				array(
					'type' => 'textfield',
					'heading' => __('To', 'thegem'),
					'param_name' => 'to',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Text', 'thegem'),
					'param_name' => 'text',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Suffix', 'thegem'),
					'param_name' => 'suffix',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'background_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Numbers Color', 'thegem'),
					'param_name' => 'numbers_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text Color', 'thegem'),
					'param_name' => 'text_color',
				),
				array(
					'type' => 'vc_link',
					'heading' => __( 'URL (Link)', 'thegem' ),
					'param_name' => 'link',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header', __('Additional', 'thegem') => 'thegemdemo'), thegem_userpack_to_dropdown()),
					'group' => __('Icon', 'thegem')
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('elegant')
					),
					'group' => __('Icon', 'thegem')
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('material')
					),
					'group' => __('Icon', 'thegem')
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('fontawesome')
					),
					'group' => __('Icon', 'thegem')
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegem-header')
					),
					'group' => __('Icon', 'thegem')
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegemdemo',
					'icon_pack' => 'thegemdemo',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegemdemo')
					),
					'group' => __('Icon', 'thegem')
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
						'group' => __('Icon', 'thegem')
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Shape', 'thegem'),
						'param_name' => 'icon_shape',
						'value' => array(__('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle'),
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Style', 'thegem'),
						'param_name' => 'icon_style',
						'value' => array(__('Default', 'thegem') => '', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg'),
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'icon_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color 2', 'thegem'),
						'param_name' => 'icon_color_2',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Background Color', 'thegem'),
						'param_name' => 'icon_background_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Border Color', 'thegem'),
						'param_name' => 'icon_border_color',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Size', 'thegem'),
						'param_name' => 'icon_size',
						'value' => array(__('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge'),
						'group' => __('Icon', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'hover_icon_color',
						'group' => __('Hover', 'thegem'),
						'dependency' => array(
							'element' => 'link',
							'not_empty' => true
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'hover_background_color',
						'group' => __('Hover', 'thegem'),
						'dependency' => array(
							'element' => 'link',
							'not_empty' => true
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Numbers Color', 'thegem'),
						'param_name' => 'hover_numbers_color',
						'group' => __('Hover', 'thegem'),
						'dependency' => array(
							'element' => 'link',
							'not_empty' => true
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text Color', 'thegem'),
						'param_name' => 'hover_text_color',
						'group' => __('Hover', 'thegem'),
						'dependency' => array(
							'element' => 'link',
							'not_empty' => true
						),
					),
				),
				$interactions
			),
		),

		'gem_counter_box' => array(
			'name' => __('Counter box', 'thegem'),
			'base' => 'gem_counter_box',
			'is_container' => true,
			'js_view' => 'VcGemCounterBoxView',
			'as_parent' => array('only' => 'gem_counter'),
			'icon' => 'thegem-icon-wpb-ui-counter-box',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Counter box', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('Style 1', 'thegem') => '1', __('Style 2', 'thegem') => '2', __('Vertical', 'thegem') => 'vertical')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns', 'thegem'),
					'param_name' => 'columns',
					'value' => array(1,2,3,4),
					'std' => 4,
					'dependency' => array(
						'element' => 'style',
						'value' => array('1', '2')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Connector color', 'thegem'),
					'param_name' => 'connector_color',
					'dependency' => array(
						'element' => 'style',
						'value' => array('vertical')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Team Person', 'thegem'),
					'param_name' => 'team_person',
					'value' => thegem_vc_get_team_persons(),
					'dependency' => array(
						'element' => 'style',
						'value' => array('vertical')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Team Person Image Size', 'thegem'),
					'param_name' => 'team_image_size',
					'value' => array(__('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge'),
					'dependency' => array(
						'element' => 'team_person',
						'not_empty' => true
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Number format', 'thegem'),
					'param_name' => 'number_format',
					'std' => '(ddd).ddd',
					'description' => __('Example: (ddd).ddd -> 9999.99, ( ddd).ddd -> 9 999.99, (,ddd).ddd -> 9,999.99', 'thegem')
				),
			)),
		),

		'gem_custom_header' => array(
			'name' => __('Custom Header', 'thegem'),
			'base' => 'gem_custom_header',
			'is_container' => false,
			'js_view' => 'VcGemCustomHeaderView',
			'icon' => 'thegem-icon-wpb-ui-custom-header',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Custom Header', 'thegem'),
			'deprecated' => 5,
			'params' => array_merge(array(
				array(
					'type' => 'textarea_html',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
					'value' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title max width px', 'thegem'),
					'param_name' => 'title_width',
					'value' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title top margin', 'thegem'),
					'param_name' => 'title_top_margin',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title bottom margin', 'thegem'),
					'param_name' => 'title_bottom_margin',
				),
				array(
					'type' => 'textarea',
					'heading' => __('Subtitle', 'thegem'),
					'param_name' => 'subtitle',
					'value' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => __('Subtitle max width px', 'thegem'),
					'param_name' => 'subtitle_width',
					'value' => ''
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Subtitle color', 'thegem'),
					'param_name' => 'subtitle_color',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon position', 'thegem'),
					'param_name' => 'icon_position',
					'value' => array(
						__('Left', 'thegem') => 'gem-custom-header-icon-position-left',
						__('Right', 'thegem') => 'gem-custom-header-icon-position-right',
						__('No Display', 'thegem') => 'gem-custom-header-no-icon',
						__('Centered', 'thegem') => 'gem-custom-header-icon-position-centered'
					)
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Background image', 'thegem'),
					'param_name' => 'background_image',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background style', 'thegem'),
					'param_name' => 'background_style',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Cover', 'thegem') => 'cover',
						__('Contain', 'thegem') => 'contain',
						__('No Repeat', 'thegem') => 'no-repeat',
						__('Repeat', 'thegem') => 'repeat'
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Custom Header Background color', 'thegem'),
					'param_name' => 'ch_background_color',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound', 'thegem'),
					'param_name' => 'gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1')
				),

				array(
					'type' => 'colorpicker',
					'heading' => __('From', 'thegem'),
					'param_name' => 'gradient_backgound_from',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('To', 'thegem'),
					'param_name' => 'gradient_backgound_to',

					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Style', 'thegem'),
					'param_name' => 'gradient_backgound_style',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Linear', "thegem") => "linear",
						__('Radial', "thegem") => "radial",
					) ,
					"std" => 'linear',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'gradient_radial_backgound_position',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Top', "thegem") => "at top",
						__('Bottom', "thegem") => "at bottom",
						__('Right', "thegem") => "at right",
						__('Left', "thegem") => "at left",
						__('Center', "thegem") => "at center",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'gradient_backgound_angle',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Vertical to bottom ↓', "thegem") => "to bottom",
						__('Vertical to top ↑', "thegem") => "to top",
						__('Horizontal to left  →', "thegem") => "to right",
						__('Horizontal to right ←', "thegem") => "to left",
						__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
						__('Diagonal from left to top ↗', "thegem") => "to top right",
						__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
						__('Diagonal from right to top ↖', "thegem") => "to top left",
						__('Custom', "thegem") => "cusotom_deg",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'linear',
						)
					)
				),
				array(
					"type" => "textfield",
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'gradient_backgound_cusotom_deg',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'gradient_backgound_angle',
						'value' => array(
							'cusotom_deg',
						)
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background video type', 'thegem'),
					'param_name' => 'video_background_type',
					'value' => array(
						__('None', 'thegem') => '',
						__('YouTube', 'thegem') => 'youtube',
						__('Vimeo', 'thegem') => 'vimeo',
						__('Self', 'thegem') => 'self'
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video id (YouTube or Vimeo) or src', 'thegem'),
					'param_name' => 'video_background_src',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'video_background_acpect_ratio',
					'value' => '16:9'
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background video overlay color', 'thegem'),
					'param_name' => 'video_background_overlay_color',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Background video overlay opacity (0 - 1)', 'thegem'),
					'param_name' => 'video_background_overlay_opacity',
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Video Poster', 'thegem'),
					'param_name' => 'video_background_poster',
					'dependency' => array(
						'element' => 'video_background_type',
						'value' => array('self')
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Container', 'thegem'),
					'param_name' => 'container',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Bread Crumbs', 'thegem'),
					'param_name' => 'breadcrumbs',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Centreed Bread Crumbs', 'thegem'),
					'param_name' => 'centreed_breadcrumbs',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('material')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('thegem-header')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Shape', 'thegem'),
						'param_name' => 'shape',
						'value' => array(__('None', 'thegem') => 'none', __('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle', __('Rhombus', 'thegem') => 'romb', __('Hexagon', 'thegem') => 'hexagon')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'style',
						'value' => array(__('Default', 'thegem') => '', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color 2', 'thegem'),
						'param_name' => 'color_2',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'background_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'border_color',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Opacity (0-1)', 'thegem'),
						'param_name' => 'opacity',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'size',
						'value' => array(__('small', 'thegem') => 'small', __('medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon top margin', 'thegem'),
						'param_name' => 'icon_top_margin',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon bottom margin', 'thegem'),
						'param_name' => 'icon_bottom_margin',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding top', 'thegem'),
						'param_name' => 'padding_top',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding bottom', 'thegem'),
						'param_name' => 'padding_bottom',
					),
				)),
		),

		'gem_custom_menu' => array(
			'name' => __('Custom Menu', 'thegem'),
			'base' => 'gem_custom_menu',
			'icon' => 'thegem-icon-wpb-ui-custom-menu',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Custom Menu', 'thegem'),
			'params' => array_merge(
				array(
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Menu Source', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Menu Source', 'thegem'),
						'param_name' => 'menu_source',
						'value' => array(
							__('Appearance -> Menus', 'thegem') => 'nav_menu',
							__('Custom List', 'thegem') => 'custom',
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Select Menu', 'thegem'),
						'param_name' => 'nav_menu',
						'value' => thegem_get_menu_list(),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/nav-menus.php" target="_blank">Menus screen</a> to manage your menus', 'thegem'),
						'dependency' => array(
							'element' => 'menu_source',
							'value' => 'nav_menu'
						),
					),
//					array(
//						'type' => 'checkbox',
//						'heading' => __('Show Submenus', 'thegem'),
//						'param_name' => 'show_submenus',
//						'value' => array(__('Yes', 'thegem') => '1'),
//						'dependency' => array(
//							'element' => 'menu_source',
//							'value' => 'nav_menu'
//						),
//					),
					array(
						'type' => 'param_group',
						'heading' => __('Custom List', 'thegem'),
						'param_name' => 'menu_custom',
						'description' => __('Use repeater above to manage list items. Click on "+" to add new items.', 'thegem'),
						'params' => array_merge(
							array(
								array(
									'type' => 'textarea',
									'heading' => __('Title', 'thegem'),
									'param_name' => 'item_title',
								),
								array(
									'type' => 'vc_link',
									'heading' => __('Link', 'thegem'),
									'param_name' => 'item_link',
								),
								array(
									'type' => 'checkbox',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'item_icon',
									'value' => array(__('Yes', 'thegem') => '1'),
								),
								array(
									'type' => 'dropdown',
									'heading' => __('Icon pack', 'thegem'),
									'param_name' => 'pack',
									'value' => array_merge(array(
										__('Elegant', 'thegem') => 'elegant',
										__('Material Design', 'thegem') => 'material',
										__('FontAwesome', 'thegem') => 'fontawesome',
										__('Header Icons', 'thegem') => 'thegem-header',
										__('Additional', 'thegem') => 'thegemdemo'),
										thegem_userpack_to_dropdown()
									),
									'std' => 'elegant',
									'dependency' => array(
										'element' => 'item_icon',
										'value' => array('1')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_elegant',
									'icon_pack' => 'elegant',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('elegant')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_material',
									'icon_pack' => 'material',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('material')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_fontawesome',
									'icon_pack' => 'fontawesome',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('fontawesome')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_thegem_header',
									'icon_pack' => 'thegem-header',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('thegem-header')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_thegemdemo',
									'icon_pack' => 'thegemdemo',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('thegemdemo')
									),
								),
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_thegemheader',
									'icon_pack' => 'thegem-header',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('thegem-header')
									),
								),
							),
							thegem_userpack_to_shortcode(array(
								array(
									'type' => 'thegem_icon',
									'heading' => __('Icon', 'thegem'),
									'param_name' => 'icon_userpack',
									'icon_pack' => 'userpack',
									'dependency' => array(
										'element' => 'pack',
										'value' => array('userpack')
									),
								),
							)),
							array(
								array(
									'type' => 'textfield',
									'heading' => __('Label Text', 'thegem'),
									'param_name' => 'item_label_text',
									'edit_field_class' => 'vc_column vc_col-sm-4',
								),
								array(
									'type' => 'colorpicker',
									'heading' => __('Label Text Color', 'thegem'),
									'param_name' => 'item_label_color',
									'edit_field_class' => 'vc_column vc_col-sm-4',
								),
								array(
									'type' => 'colorpicker',
									'heading' => __('Label Background Color', 'thegem'),
									'param_name' => 'item_label_background',
									'edit_field_class' => 'vc_column vc_col-sm-4',
								),
							)
						),
						'dependency' => array(
							'element' => 'menu_source',
							'value' => 'custom'
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Custom Menu Style', 'thegem'),
						'param_name' => 'submenu_style',
						'value' => array(
							__('Vertical', 'thegem') => 'vertical',
							__('Horizontal', 'thegem') => 'horizontal',
						),
                        'std' => 'vertical',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Font Preset', 'thegem'),
						'param_name' => 'font_preset',
						'value' => array(
							__('Submenu', 'thegem') => 'submenu-item',
							__('Main Menu', 'thegem') => 'main-menu-item',
							__('Title H1', 'thegem') => 'title-h1',
							__('Title H2', 'thegem') => 'title-h2',
							__('Title H3', 'thegem') => 'title-h3',
							__('Title H4', 'thegem') => 'title-h4',
							__('Title H5', 'thegem') => 'title-h5',
							__('Title H6', 'thegem') => 'title-h6',
							__('Title xLarge', 'thegem') => 'title-xlarge',
							__('Styled Subtitle', 'thegem') => 'styled-subtitle',
							__('Body', 'thegem') => 'text-body',
							__('Tiny Body', 'thegem') => 'text-body-tiny',
						),
						'std' => 'submenu-item',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),

					array(
						'type' => 'dropdown',
						'heading' => __('Color Preset', 'thegem'),
						'param_name' => 'menu_item_color_preset',
						'value' => array(
							__('Inherit Theme Options', 'thegem') => 'inherit-colors',
							__('Default', 'thegem') => 'default-colors',
						),
						'std' => 'inherit-colors',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Menu Indicator', 'thegem'),
						'param_name' => 'menu_indicator',
						'value' => array(__('Yes', 'thegem') => '1'),
                        'edit_field_class' => 'vc_col-sm-6 vc_column',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Custom Menu Separator', 'thegem'),
						'param_name' => 'submenu_separator',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '1',
						'dependency' => array(
							'element' => 'submenu_style',
							'value' => array('horizontal')
						),
                        'edit_field_class' => 'vc_col-sm-6 vc_column',
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Heading', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Heading Text', 'thegem'),
						'param_name' => 'heading_text',
						'std' => __('This is heading', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Heading Icon', 'thegem'),
						'param_name' => 'heading_icon',
						'value' => array(__('Yes', 'thegem') => '1'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'pack',
						'value' => array_merge(array(
							__('Elegant', 'thegem') => 'elegant',
							__('Material Design', 'thegem') => 'material',
							__('FontAwesome', 'thegem') => 'fontawesome',
							__('Header Icons', 'thegem') => 'thegem-header',
							__('Additional', 'thegem') => 'thegemdemo'),
							thegem_userpack_to_dropdown()
						),
						'std' => 'elegant',
						'dependency' => array(
							'element' => 'heading_icon',
							'value' => array('1')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('elegant')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('material')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('fontawesome')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegem-header')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegemdemo',
						'icon_pack' => 'thegemdemo',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegemdemo')
						),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegemheader',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegem-header')
						),
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'vc_link',
						'heading' => __('Link', 'thegem'),
						'param_name' => 'heading_link',
						'description' => __('Add link to heading.', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('HTML Tag', 'thegem'),
						'param_name' => 'heading_tag',
						'value' => array(
							__('H1', 'thegem') => 'h1',
							__('H2', 'thegem') => 'h2',
							__('H3', 'thegem') => 'h3',
							__('H4', 'thegem') => 'h4',
							__('H5', 'thegem') => 'h5',
							__('H6', 'thegem') => 'h6',
							__('p', 'thegem') => 'p',
							__('div', 'thegem') => 'div'
						),
						'std' => 'div',
						'save_always' => true,
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Font Preset', 'thegem'),
						'param_name' => 'heading_div_style',
						'value' => array(
							__('Main Menu', 'thegem') => 'main-menu-item',
							__('Title H1', 'thegem') => 'title-h1',
							__('Title H2', 'thegem') => 'title-h2',
							__('Title H3', 'thegem') => 'title-h3',
							__('Title H4', 'thegem') => 'title-h4',
							__('Title H5', 'thegem') => 'title-h5',
							__('Title H6', 'thegem') => 'title-h6',
							__('Title xLarge', 'thegem') => 'title-xlarge',
							__('Styled Subtitle', 'thegem') => 'styled-subtitle',
							__('Body', 'thegem') => 'text-body',
							__('Tiny Body', 'thegem') => 'text-body-tiny',
						),
						'std' => 'main-menu-item',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Label Text', 'thegem'),
						'param_name' => 'heading_label_text',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Separator', 'thegem'),
						'param_name' => 'heading_separator',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '1'
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Alignment', 'thegem'),
						'param_name' => 'menu_alignment',
						'value' => array(
							__('Left', 'thegem') => 'flex-start',
							__('Center', 'thegem') => 'center',
							__('Right', 'thegem') => 'flex-end',
						),
						'std' => 'flex-start',
						'group' => __('Style', 'thegem'),
					),

                    // Heading Style
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Heading', 'thegem'),
						'param_name' => 'layout_delim_head',
						'group' => __('Style', 'thegem'),
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Normal Color', 'thegem'),
						'param_name' => 'heading_color',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover Color', 'thegem'),
						'param_name' => 'heading_color_hover',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'heading_icon_color',
						'dependency' => array(
							'element' => 'heading_icon',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Hover Color', 'thegem'),
						'param_name' => 'heading_icon_color_hover',
						'dependency' => array(
							'element' => 'heading_icon',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Font Weight', 'thegem'),
						'param_name' => 'heading_font_weight',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Thin', 'thegem') => 'thin',
						),
						'std' => 'default',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text Transform', 'thegem'),
						'param_name' => 'heading_text_transform',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('None', 'thegem') => 'none',
							__('Capitalize', 'thegem') => 'capitalize',
							__('Lowercase', 'thegem') => 'lowercase',
							__('Uppercase', 'thegem') => 'uppercase',
						),
						'std' => 'default',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Label', 'thegem'),
						'param_name' => 'sub_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'heading_label_color',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background', 'thegem'),
						'param_name' => 'heading_label_background',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Separator', 'thegem'),
						'param_name' => 'sub_delim_head',
						'dependency' => array(
							'element' => 'heading_separator',
							'value' => '1'
						),
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'heading_separator_color',
						'dependency' => array(
							'element' => 'heading_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Weight', 'thegem'),
						'param_name' => 'heading_separator_weight',
						'value' => array(1, 2, 3, 4, 5, 6),
						'std' => 1,
						'dependency' => array(
							'element' => 'heading_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Width', 'thegem'),
						'param_name' => 'heading_separator_width',
						'dependency' => array(
							'element' => 'heading_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Top Spacing', 'thegem'),
						'param_name' => 'heading_separator_top_spacing',
						'dependency' => array(
							'element' => 'heading_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Bottom Spacing', 'thegem'),
						'param_name' => 'heading_bottom_spacing',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),

					// Menu List Style
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Menu / List', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Font Weight', 'thegem'),
						'param_name' => 'menu_item_font_weight',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Thin', 'thegem') => 'thin',
						),
						'std' => 'default',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text Transform', 'thegem'),
						'param_name' => 'menu_item_text_transform',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('None', 'thegem') => 'none',
							__('Capitalize', 'thegem') => 'capitalize',
							__('Lowercase', 'thegem') => 'lowercase',
							__('Uppercase', 'thegem') => 'uppercase',
						),
						'std' => 'default',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Letter Spacing', 'thegem'),
						'param_name' => 'menu_item_letter_spacing',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Menu Separator', 'thegem'),
						'param_name' => 'sub_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Spacing', 'thegem'),
						'param_name' => 'menu_item_spacing',
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Weight', 'thegem'),
						'param_name' => 'submenu_separator_weight',
						'value' => array(1, 2, 3, 4, 5, 6),
						'std' => 1,
						'dependency' => array(
							'element' => 'submenu_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Height', 'thegem'),
						'param_name' => 'submenu_separator_height',
						'dependency' => array(
							'element' => 'submenu_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'submenu_separator_color',
						'dependency' => array(
							'element' => 'submenu_separator',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),

                    array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Menu Pointer', 'thegem'),
						'param_name' => 'sub_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level margin-top vc_column vc_col-sm-12',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Hover Pointer', 'thegem'),
						'param_name' => 'menu_pointer_style_hover',
						'value' => array(
							__('Background Color', 'thegem') => 'background-color',
							__('Rounded Background', 'thegem') => 'background-rounded',
							__('Frame', 'thegem') => 'frame-default',
							__('Rounded Frame', 'thegem') => 'frame-rounded',
							__('Underline', 'thegem') => 'line-underline-1',
							__('Overline', 'thegem') => 'line-overline-1',
							__('Top & Bottom', 'thegem') => 'line-top-bottom',
							__('Text Color', 'thegem') => 'text-color'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'std' => 'background-color',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Active Pointer', 'thegem'),
						'param_name' => 'menu_pointer_style_active',
						'value' => array(
							__('Background Color', 'thegem') => 'background-color',
							__('Rounded Background', 'thegem') => 'background-rounded',
							__('Frame', 'thegem') => 'frame-default',
							__('Rounded Frame', 'thegem') => 'frame-rounded',
							__('Underline', 'thegem') => 'line-underline-1',
							__('Overline', 'thegem') => 'line-overline-1',
							__('Top & Bottom', 'thegem') => 'line-top-bottom',
							__('Text Color', 'thegem') => 'text-color'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'std' => 'background-color',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Hover Animation', 'thegem'),
						'param_name' => 'animation_framed',
						'value' => array(
							__('Fade', 'thegem') => 'fade',
							__('Grow', 'thegem') => 'grow',
							__('Shrink', 'thegem') => 'shrink',
							__('Draw', 'thegem') => 'draw',
							__('Corners', 'thegem') => 'corners',
							__('None', 'thegem') => 'none',
						),
						'dependency' => array(
							'element' => 'menu_pointer_style_hover',
							'value' => array('frame-default', 'frame-rounded'),
						),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'std' => 'fade',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Hover Animation', 'thegem'),
						'param_name' => 'animation_line',
						'value' => array(
							__('Fade', 'thegem') => 'fade',
							__('Slide Left', 'thegem') => 'slide-left',
							__('Slide Right', 'thegem') => 'slide-right',
							__('Grow', 'thegem') => 'grow',
							__('Drop In', 'thegem') => 'drop-in',
							__('Drop Out', 'thegem') => 'drop-out',
							__('None', 'thegem') => 'none',
						),
						'dependency' => array(
							'element' => 'menu_pointer_style_hover',
							'value' => array('line-underline-1', 'line-underline-2', 'line-overline-1', 'line-overline-2', 'line-top-bottom'),
						),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'std' => 'fade',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Hover Animation', 'thegem'),
						'param_name' => 'animation_background',
						'value' => array(
							__('Fade', 'thegem') => 'fade',
							__('Grow', 'thegem') => 'grow',
							__('Shrink', 'thegem') => 'shrink',
							__('Sweep Left', 'thegem') => 'sweep-left',
							__('Sweep Right', 'thegem') => 'sweep-right',
							__('Sweep Up', 'thegem') => 'sweep-up',
							__('Sweep Down', 'thegem') => 'sweep-down',
							__('None', 'thegem') => 'none',
						),
						'dependency' => array(
							'element' => 'menu_pointer_style_hover',
							'value' => array('background-underline', 'background-color', 'background-rounded', 'background-extra-paddings'),
						),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'std' => 'fade',
						'group' => __('Style', 'thegem')
					),

					array(
						'type' => 'colorpicker',
						'heading' => __('Text Normal Color', 'thegem'),
						'param_name' => 'menu_item_color',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text Hover Color', 'thegem'),
						'param_name' => 'menu_item_color_hover',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text Active Color', 'thegem'),
						'param_name' => 'menu_item_color_active',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Normal Color', 'thegem'),
						'param_name' => 'menu_item_background',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Hover Color', 'thegem'),
						'param_name' => 'menu_item_background_hover',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Active Color', 'thegem'),
						'param_name' => 'menu_item_background_active',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'menu_item_icon_color',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Hover Color', 'thegem'),
						'param_name' => 'menu_item_icon_color_hover',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Active Color', 'thegem'),
						'param_name' => 'menu_item_icon_color_active',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Pointer Hover Color', 'thegem'),
						'param_name' => 'pointer_color_menu_item_hover',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Pointer Active Color', 'thegem'),
						'param_name' => 'pointer_color_menu_item_active',
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Pointer Width (px)', 'thegem'),
						'param_name' => 'pointer_width_menu_item',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Pointer Weight (px)', 'thegem'),
						'param_name' => 'pointer_height_menu_item',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),
                    array(
						'type' => 'textfield',
						'heading' => __('Pointer Top Spacing (px)', 'thegem'),
						'param_name' => 'pointer_top_spacing_menu_item',
						'edit_field_class' => 'vc_col-sm-4 vc_column',
						'group' => __('Style', 'thegem'),
					),

					array(
						'type' => 'checkbox',
						'heading' => __('Hide on desktop', 'thegem'),
						'param_name' => 'element_hide_desktop',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '0',
						'edit_field_class' => 'vc_col-sm-4 vc_column no-top-padding',
						'group' => __('Responsive Options', 'thegem'),
					),
                    array(
						'type' => 'checkbox',
						'heading' => __('Hide on tablet', 'thegem'),
						'param_name' => 'element_hide_tablet',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '0',
	                    'edit_field_class' => 'vc_col-sm-4 vc_column no-top-padding',
						'group' => __('Responsive Options', 'thegem'),
					),
                    array(
						'type' => 'checkbox',
						'heading' => __('Hide on mobile', 'thegem'),
						'param_name' => 'element_hide_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '0',
	                    'edit_field_class' => 'vc_col-sm-4 vc_column no-top-padding',
						'group' => __('Responsive Options', 'thegem'),
					),
				)
			),
		),

		'gem_diagram' => array(
			'name' => __('Diagram', 'thegem'),
			'base' => 'gem_diagram',
			'icon' => 'thegem-icon-wpb-ui-diagram',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Styled diagrams and graphs', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('title', 'thegem'),
					'param_name' => 'title',
				),
				array(
					'type' => 'textfield',
					'heading' => __('summary', 'thegem'),
					'param_name' => 'summary',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('type', 'thegem'),
					'param_name' => 'type',
					'value' => array(__('circle', 'thegem') => 'circle', __('line', 'thegem') => 'line')
				),
				array(
					'type' => 'textarea',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
					'value' => '[gem_skill title="Skill1" amount="70" color="#ff0000" title_color=""]'."\n".
						'[gem_skill title="Skill2" amount="70" color="#ffff00" title_color=""]'."\n".
						'[gem_skill title="Skill3" amount="70" color="#ff00ff" title_color=""]'."\n".
						'[gem_skill title="Skill4" amount="70" color="#f0f0f0" title_color=""]'
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array('element' => 'type', 'value' => array('line')),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('style-1', 'thegem') => 'style-1',
						__('style-2', 'thegem') => 'style-2',
						__('style-3', 'thegem') => 'style-3'
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'background',
					'dependency' => array(
						'element' => 'type',
						'value' => array('line')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Title color', 'thegem'),
					'param_name' => 'title_color',
					'dependency' => array(
						'element' => 'type',
						'value' => array('line')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Summary color', 'thegem'),
					'param_name' => 'summary_color',
					'dependency' => array(
						'element' => 'type',
						'value' => array('line')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Line color', 'thegem'),
					'param_name' => 'line_color',
					'dependency' => array(
						'element' => 'type',
						'value' => array('line')
					)
				),
			)),
		),

		'gem_divider' => array(
			'name' => __('Divider', 'thegem'),
			'base' => 'gem_divider',
			'icon' => 'thegem-icon-wpb-ui-divider',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Horizontal separator in different styles', 'thegem'),
			'params' => array_merge(
                array(
                    /*
                    array(
                        'type' => 'dropdown',
                        'heading' => __('Direction', 'thegem'),
                        'param_name' => 'direction',
                        'value' => array(
                            __('Horizontal', 'thegem') => 'horizontal',
                            __('Vertical', 'thegem') => 'vertical',
                        ),
                        'std' => 'horizontal',
                        'edit_field_class' => 'vc_column vc_col-sm-12'
                    ),
                    */

	                // Horizontal
                    array(
                        'type' => 'dropdown',
                        'heading' => __('Style', 'thegem'),
                        'param_name' => 'style',
                        'value' => array(
                            __('Default', 'thegem') => '',
                            __('stroked', 'thegem') => 1,
                            __('3px', 'thegem') => 2,
                            __('7px', 'thegem') => 3,
                            __('dotted', 'thegem') => 4,
                            __('dashed', 'thegem') => 5,
                            __('zigzag', 'thegem') => 6,
                            __('wave', 'thegem') => 7
                        ),
	                    'dependency' => array(
		                    'element' => 'direction',
		                    'value' => 'horizontal'
	                    ),
                        'edit_field_class' => 'vc_column vc_col-sm-12'
                    ),
                    array(
                        'type' => 'textfield',
                        'heading' => __('Weight', 'thegem'),
                        'param_name' => 'weight',
                        'dependency' => array(
                            'element' => 'style',
                            'value' => array('')
                        ),
                        'edit_field_class' => 'vc_column vc_col-sm-12'
                    ),
                    array(
                        'type' => 'textfield',
                        'heading' => __('Width', 'thegem'),
                        'param_name' => 'width',
	                    'dependency' => array(
		                    'element' => 'direction',
		                    'value' => 'horizontal'
	                    ),
	                    'edit_field_class' => 'vc_column vc_col-sm-12'
                    ),
                    array(
                        'type' => 'textfield',
                        'heading' => __('Margin top', 'thegem'),
                        'param_name' => 'margin_top',
	                    'dependency' => array(
		                    'element' => 'direction',
		                    'value' => 'horizontal'
	                    ),
	                    'edit_field_class' => 'vc_column vc_col-sm-6'
                    ),
                    array(
                        'type' => 'textfield',
                        'heading' => __('Margin bottom', 'thegem'),
                        'param_name' => 'margin_bottom',
	                    'dependency' => array(
		                    'element' => 'direction',
		                    'value' => 'horizontal'
	                    ),
	                    'edit_field_class' => 'vc_column vc_col-sm-6'
                    ),

	                /* Vertical
					array(
						'type' => 'checkbox',
						'heading' => __('Inline Element', 'thegem'),
						'param_name' => 'inline_element',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
						'std' => '1',
						'edit_field_class' => 'vc_column vc_col-sm-12'
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'vertical_style',
						'value' => array(
							__('Solid', 'thegem') => 'solid',
							__('Stroked', 'thegem') => 'stroked',
							__('Dotted', 'thegem') => 'dotted',
							__('Dashed', 'thegem') => 'dashed',
						),
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Height Desktop (px)', 'thegem'),
						'param_name' => 'vertical_height_desktop',
						'std' => '50',
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4'
					),
					array(
						'type' => 'textfield',
						'heading' => __('Height Tablet (px)', 'thegem'),
						'param_name' => 'vertical_height_tablet',
						'std' => '50',
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4'
					),
					array(
						'type' => 'textfield',
						'heading' => __('Height Mobile (px)', 'thegem'),
						'param_name' => 'vertical_height_mobile',
						'std' => '50',
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4'
					),
					array(
						'type' => 'textfield',
						'heading' => __('Weight (px)', 'thegem'),
						'param_name' => 'vertical_weight',
						'dependency' => array(
							'element' => 'direction',
							'value' => 'vertical'
						),
						'std' => '1',
						'edit_field_class' => 'vc_column vc_col-sm-12'
					),
	                */

					// All
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'color',
						'edit_field_class' => 'vc_column vc_col-sm-12'
					),
					array(
						'type' => 'textfield',
						'heading' => __('Extra class name', 'thegem'),
						'param_name' => 'class_name',
						'edit_field_class' => 'vc_column vc_col-sm-12'
					),
				),
				array(
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on desktop', 'thegem'),
						'param_name' => 'divider_disable_desktop',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on tablet', 'thegem'),
						'param_name' => 'divider_disable_tablet',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on mobile', 'thegem'),
						'param_name' => 'divider_disable_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Tablet', 'thegem'),
						'param_name' => 'tablet_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Margin top', 'thegem'),
						'param_name' => 'tablet_margin_top',
						'edit_field_class' => 'vc_column vc_col-sm-6 capitalize',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Margin bottom', 'thegem'),
						'param_name' => 'tablet_margin_bottom',
						'edit_field_class' => 'vc_column vc_col-sm-6 capitalize',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Mobile', 'thegem'),
						'param_name' => 'mobile_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Margin top', 'thegem'),
						'param_name' => 'mobile_margin_top',
						'edit_field_class' => 'vc_column vc_col-sm-6 capitalize',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Margin bottom', 'thegem'),
						'param_name' => 'mobile_margin_bottom',
						'edit_field_class' => 'vc_column vc_col-sm-6 capitalize',
						'group' => __('Responsive Options', 'thegem')
					)
				)
			)
		),

		'gem_dropcap' => array(
			'name' => __('Dropcap', 'thegem'),
			'base' => 'gem_dropcap',
			'icon' => 'thegem-icon-wpb-ui-dropcap',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Dropcap symbol for text content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('letter', 'thegem'),
					'param_name' => 'letter',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Shape', 'thegem'),
					'param_name' => 'shape',
					'value' => array(__('square', 'thegem') => 'square', __('circle', 'thegem') => 'circle', __('hexagon', 'thegem') => 'hexagon')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('Medium', 'thegem') => 'medium', __('Big', 'thegem') => 'big')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Color', 'thegem'),
					'param_name' => 'color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'background_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border Color', 'thegem'),
					'param_name' => 'border_color',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound', 'thegem'),
					'param_name' => 'gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1')
				),

				array(
					'type' => 'colorpicker',
					'heading' => __('From', 'thegem'),
					'param_name' => 'gradient_backgound_from',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('To', 'thegem'),
					'param_name' => 'gradient_backgound_to',

					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Style', 'thegem'),
					'param_name' => 'gradient_backgound_style',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Linear', "thegem") => "linear",
						__('Radial', "thegem") => "radial",
					) ,
					"std" => 'linear',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'gradient_radial_backgound_position',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Top', "thegem") => "at top",
						__('Bottom', "thegem") => "at bottom",
						__('Right', "thegem") => "at right",
						__('Left', "thegem") => "at left",
						__('Center', "thegem") => "at center",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'gradient_backgound_angle',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Vertical to bottom ↓', "thegem") => "to bottom",
						__('Vertical to top ↑', "thegem") => "to top",
						__('Horizontal to left  →', "thegem") => "to right",
						__('Horizontal to right ←', "thegem") => "to left",
						__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
						__('Diagonal from left to top ↗', "thegem") => "to top right",
						__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
						__('Diagonal from right to top ↖', "thegem") => "to top left",
						__('Custom', "thegem") => "cusotom_deg",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'linear',
						)
					)
				),
				array(
					"type" => "textfield",
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'gradient_backgound_cusotom_deg',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'gradient_backgound_angle',
						'value' => array(
							'cusotom_deg',
						)
					)
				),
			)),
		),

		'gem_fullwidth' => array(
			'name' => __('Fullwidth Container', 'thegem'),
			'base' => 'gem_fullwidth',
			'is_container' => true,
			'js_view' => 'VcGemFullwidthView',
			'icon' => 'thegem-icon-wpb-ui-fullwidth',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Fullwidth', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'colorpicker',
					'heading' => __('Color', 'thegem'),
					'param_name' => 'color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'background_color',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound', 'thegem'),
					'param_name' => 'gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1')
				),

				array(
					'type' => 'colorpicker',
					'heading' => __('From', 'thegem'),
					'param_name' => 'gradient_backgound_from',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('To', 'thegem'),
					'param_name' => 'gradient_backgound_to',

					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Style', 'thegem'),
					'param_name' => 'gradient_backgound_style',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Linear', "thegem") => "linear",
						__('Radial', "thegem") => "radial",
					) ,
					"std" => 'linear',
					'dependency' => array(
						'element' => 'gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'gradient_radial_backgound_position',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Top', "thegem") => "at top",
						__('Bottom', "thegem") => "at bottom",
						__('Right', "thegem") => "at right",
						__('Left', "thegem") => "at left",
						__('Center', "thegem") => "at center",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'gradient_backgound_angle',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Vertical to bottom ↓', "thegem") => "to bottom",
						__('Vertical to top ↑', "thegem") => "to top",
						__('Horizontal to left  →', "thegem") => "to right",
						__('Horizontal to right ←', "thegem") => "to left",
						__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
						__('Diagonal from left to top ↗', "thegem") => "to top right",
						__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
						__('Diagonal from right to top ↖', "thegem") => "to top left",
						__('Custom', "thegem") => "cusotom_deg",

					) ,
					'dependency' => array(
						'element' => 'gradient_backgound_style',
						'value' => array(
							'linear',
						)
					)
				),
				array(
					"type" => "textfield",
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'gradient_backgound_cusotom_deg',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'gradient_backgound_angle',
						'value' => array(
							'cusotom_deg',
						)
					)
				),

				array(
					'type' => 'attach_image',
					'heading' => __('Background image', 'thegem'),
					'param_name' => 'background_image',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Overlay Color', 'thegem'),
					'param_name' => 'background_parallax_overlay_color',
					'dependency' => array(
						'element' => 'background_image',
						'not_empty' => true
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background style', 'thegem'),
					'param_name' => 'background_style',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Cover', 'thegem') => 'cover',
						__('Contain', 'thegem') => 'contain',
						__('No Repeat', 'thegem') => 'no-repeat',
						__('Repeat', 'thegem') => 'repeat'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background horizontal position', 'thegem'),
					'param_name' => 'background_position_horizontal',
					'value' => array(
						__('Center', 'thegem') => 'center',
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background vertical position', 'thegem'),
					'param_name' => 'background_position_vertical',
					'value' => array(
						__('Top', 'thegem') => 'top',
						__('Center', 'thegem') => 'center',
						__('Bottom', 'thegem') => 'bottom'
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Parallax', 'thegem'),
					'param_name' => 'background_parallax',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Enable Parallax on Mobiles', 'thegem'),
					'param_name' => 'background_parallax_mobile',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'background_parallax',
						'value' => array('1')
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Full-height', 'thegem'),
					'param_name' => 'fullheight',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Ken Burns effect', 'thegem'),
					'param_name' => 'ken_burns_enabled',
					'dependency' => array(
						'element' => 'background_image',
						'not_empty' => true
					)
				),
				array(
					'type' => 'dropdown',
					'value' => array(__('Zoom In', 'thegem') => 'zoom_in', __('Zoom Out', 'thegem') => 'zoom_out'),
					'heading' => __('Direction', 'thegem'),
					'param_name' => 'ken_burns_direction',
					'dependency' => array(
						'element' => 'ken_burns_enabled',
						'not_empty' => true
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Transition speed, ms', 'thegem'),
					'value' => 15000,
					'param_name' => 'ken_burns_transition_speed',
					'dependency' => array(
						'element' => 'ken_burns_enabled',
						'not_empty' => true
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Parallax type', 'thegem'),
					'param_name' => 'background_parallax_type',
					'value' => array(
						__('Vertical', 'thegem') => 'vertical',
						__('Horizontal', 'thegem') => 'horizontal',
						__('Fixed', 'thegem') => 'fixed'
					),
					'dependency' => array(
						'element' => 'background_parallax',
						'value' => array('1')
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background video type', 'thegem'),
					'param_name' => 'video_background_type',
					'value' => array(
						__('None', 'thegem') => '',
						__('YouTube', 'thegem') => 'youtube',
						__('Vimeo', 'thegem') => 'vimeo',
						__('Self', 'thegem') => 'self'
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video id (YouTube or Vimeo) or src', 'thegem'),
					'param_name' => 'video_background_src',
					'value' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'video_background_acpect_ratio',
					'value' => '16:9'
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Play On Mobile', 'thegem'),
					'param_name' => 'play_on_mobile',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Background Fallback', 'thegem'),
					'param_name' => 'background_fallback',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background video overlay color', 'thegem'),
					'param_name' => 'video_background_overlay_color',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Background video overlay opacity (0 - 1)', 'thegem'),
					'param_name' => 'video_background_overlay_opacity',
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Video Poster', 'thegem'),
					'param_name' => 'video_background_poster',
					'dependency' => array(
						'element' => 'video_background_type',
						'value' => array('self')
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Padding top', 'thegem'),
					'param_name' => 'padding_top',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Padding bottom', 'thegem'),
					'param_name' => 'padding_bottom',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Padding left', 'thegem'),
					'param_name' => 'padding_left',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Padding right', 'thegem'),
					'param_name' => 'padding_right',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Container', 'thegem'),
					'param_name' => 'container',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Top Styled Marker Style', 'thegem'),
					'param_name' => 'styled_marker_top_style',
					'value' => array(__('None', 'thegem') => '', __('Triangle', 'thegem') => 'triangle', __('Figure', 'thegem') => 'figure')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Top Styled Marker Direction', 'thegem'),
					'param_name' => 'styled_marker_top_direction',
					'value' => array(__('Inside', 'thegem') => 'inside', __('Outside', 'thegem') => 'outside'),
					'dependency' => array(
						'element' => 'styled_marker_top_style',
						'not_empty' => true
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Bottom Styled Marker Style', 'thegem'),
					'param_name' => 'styled_marker_bottom_style',
					'value' => array(__('None', 'thegem') => '', __('Triangle', 'thegem') => 'triangle', __('Figure', 'thegem') => 'figure')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Bottom Styled Marker Direction', 'thegem'),
					'param_name' => 'styled_marker_bottom_direction',
					'value' => array(__('Inside', 'thegem') => 'inside', __('Outside', 'thegem') => 'outside'),
					'dependency' => array(
						'element' => 'styled_marker_bottom_style',
						'not_empty' => true
					),
				),
			)),
		),

		'gem_icon' => array(
			'name' => __('Icon', 'thegem'),
			'base' => 'gem_icon',
			'icon' => 'thegem-icon-wpb-ui-icon',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Customizable Font Icon', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header', __('Additional', 'thegem') => 'thegemdemo') , thegem_userpack_to_dropdown()),
					'std' => 'material',
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('material')
					),
					'std' => 'f287'
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('thegem-header')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegemdemo',
					'icon_pack' => 'thegemdemo',
					'dependency' => array(
						'element' => 'pack',
						'value' => array('thegemdemo')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Shape', 'thegem'),
						'param_name' => 'shape',
						'value' => array(__('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle', __('Rhombus', 'thegem') => 'romb', __('Hexagon', 'thegem') => 'hexagon')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'style',
						'value' => array(__('Default', 'thegem') => '', __('Gradient', 'thegem') => 'gradient', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color 2', 'thegem'),
						'param_name' => 'color_2',
					),

					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'gradient_color_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'style',
							'value' => array(
								'gradient',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'gradient_radial_color_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'gradient_color_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'gradient_color_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'gradient_color_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_color_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'gradient_color_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'background_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'border_color',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Gradient Backgound', 'thegem'),
						'param_name' => 'gradient_backgound',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('From', 'thegem'),
						'param_name' => 'gradient_backgound_from',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('To', 'thegem'),
						'param_name' => 'gradient_backgound_to',

						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'gradient_backgound_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'gradient_radial_backgound_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'gradient_backgound_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_backgound_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'gradient_backgound_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'size',
						'value' => array(__('small', 'thegem') => 'small', __('medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Link', 'thegem'),
						'param_name' => 'link',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Link target', 'thegem'),
						'param_name' => 'link_target',
						'value' => array(__('Self', 'thegem') => '_self', __('Blank', 'thegem') => '_blank')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Centered', 'thegem'),
						'param_name' => 'centered',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon top margin', 'thegem'),
						'param_name' => 'icon_top_margin',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon bottom margin', 'thegem'),
						'param_name' => 'icon_bottom_margin',
					),
				),
				$interactions
			),
		),

		'gem_icon_with_text' => array(
			'name' => __('Icon with text', 'thegem'),
			'base' => 'gem_icon_with_text',
			'is_container' => true,
			'js_view' => 'VcGemIconWithTextView',
			'icon' => 'thegem-icon-wpb-ui-icon-with-text',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Font Icon with aligned text content', 'thegem'),
			'deprecated' => 5,
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header', __('Additional', 'thegem') => 'thegemdemo'), thegem_userpack_to_dropdown()),
					'std' => 'material',
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('material')
					),
					'std' => 'f287'
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegem-header')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegemdemo',
					'icon_pack' => 'thegemdemo',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegemdemo')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Shape', 'thegem'),
						'param_name' => 'icon_shape',
						'value' => array(__('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle', __('Rhombus', 'thegem') => 'romb', __('Hexagon', 'thegem') => 'hexagon')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_style',
						'value' => array(__('Default', 'thegem') => '', __('Gradient', 'thegem') => 'gradient', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('color', 'thegem'),
						'param_name' => 'icon_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('color 2', 'thegem'),
						'param_name' => 'icon_color_2',
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_gradient_color_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'icon_style',
							'value' => array(
								'gradient',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'icon_gradient_radial_color_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_color_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'icon_gradient_color_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_color_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'icon_gradient_color_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'icon_gradient_color_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'icon_background_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'icon_border_color',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Gradient Backgound', 'thegem'),
						'param_name' => 'icon_gradient_backgound',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('From', 'thegem'),
						'param_name' => 'icon_gradient_backgound_from',
						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('To', 'thegem'),
						'param_name' => 'icon_gradient_backgound_to',

						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_gradient_backgound_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'icon_gradient_radial_backgound_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_backgound_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'icon_gradient_backgound_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_backgound_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_backgound_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'icon_gradient_backgound_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'icon_size',
						'value' =>  array(__('small', 'thegem') => 'small', __('medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Flow', 'thegem'),
						'param_name' => 'flow',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Centered', 'thegem'),
						'param_name' => 'centered',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable centered layout on mobile', 'thegem'),
						'param_name' => 'disable_mobile_centered',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Float right icon', 'thegem'),
						'param_name' => 'float_right',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon top padding', 'thegem'),
						'param_name' => 'icon_top_side_padding',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon right padding', 'thegem'),
						'param_name' => 'icon_right_side_padding',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon bottom padding', 'thegem'),
						'param_name' => 'icon_bottom_side_padding',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon left padding', 'thegem'),
						'param_name' => 'icon_left_side_padding',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon top margin', 'thegem'),
						'param_name' => 'icon_top_margin',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Icon bottom margin', 'thegem'),
						'param_name' => 'icon_bottom_margin',
					),

				),
				$interactions
			),
		),

		'gem_icon_with_title' => array(
			'name' => __('Icon with Title', 'thegem'),
			'base' => 'gem_icon_with_title',
			'icon' => 'thegem-icon-wpb-ui-icon-with-title',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Title with customizable font icon', 'thegem'),
			'deprecated' => 5,
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header', __('Additional', 'thegem') => 'thegemdemo'), thegem_userpack_to_dropdown()),
					'std' => 'material',
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('material')
					),
					'std' => 'f287'
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegem-header')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegemdemo',
					'icon_pack' => 'thegemdemo',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegemdemo')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Shape', 'thegem'),
						'param_name' => 'icon_shape',
						'value' => array(__('square', 'thegem') => 'square', __('circle', 'thegem') => 'circle', __('romb', 'thegem') => 'romb')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_style',
						'value' => array(__('Default', 'thegem') => '', __('Gradient', 'thegem') => 'gradient', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'icon_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color 2', 'thegem'),
						'param_name' => 'icon_color_2',
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_gradient_color_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'icon_style',
							'value' => array(
								'gradient',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'icon_gradient_radial_color_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_color_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'icon_gradient_color_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_color_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'icon_gradient_color_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'icon_gradient_color_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'icon_background_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'icon_border_color',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Gradient Backgound', 'thegem'),
						'param_name' => 'icon_gradient_backgound',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('From', 'thegem'),
						'param_name' => 'icon_gradient_backgound_from',
						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('To', 'thegem'),
						'param_name' => 'icon_gradient_backgound_to',

						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'icon_gradient_backgound_style',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'icon_gradient_backgound',
							'value' => array('1')
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'icon_gradient_radial_backgound_position',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_backgound_style',
							'value' => array(
								'radial',
							)
						)
					),
					array(
						"type" => "dropdown",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'icon_gradient_backgound_angle',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",

						) ,
						'dependency' => array(
							'element' => 'icon_gradient_backgound_style',
							'value' => array(
								'linear',
							)
						)
					),
					array(
						"type" => "textfield",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_backgound_cusotom_deg',
						"edit_field_class" => "vc_col-sm-4 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'icon_gradient_backgound_angle',
							'value' => array(
								'cusotom_deg',
							)
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'icon_size',
						'value' =>  array(__('small', 'thegem') => 'small', __('medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Title', 'thegem'),
						'param_name' => 'title',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Title color', 'thegem'),
						'param_name' => 'title_color',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Level', 'thegem'),
						'param_name' => 'level',
						'value' => array(__('h1', 'thegem') => 'h1', __('h2', 'thegem') => 'h2', __('h3', 'thegem') => 'h3', __('h4', 'thegem') => 'h4', __('h5', 'thegem') => 'h5', __('h6', 'thegem') => 'h6')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Link', 'thegem'),
						'param_name' => 'link',
					),
				),
				$interactions
			),
		),

		'gem_instagram_gallery' => array(
			'name' => __('Instagram Gallery', 'thegem'),
			'base' => 'gem_instagram_gallery',
			'icon' => 'thegem-icon-wpb-ui-instagram-gallery',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Instagram Gallery slider', 'thegem'),
			'deprecated' => 5,
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Title', 'thegem'),
					'param_name' => 'title',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Instagram', 'thegem'),
					'param_name' => 'instagram',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout',
					'value' => array(__('3x columns', 'thegem') => '3x', __('4x columns', 'thegem') => '4x')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Gaps Size', 'thegem'),
					'param_name' => 'gaps_size',
					'std' => 42,
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'hover',
					'value' => array(__('Cyan Breeze', 'thegem') => 'default', __('Zooming White', 'thegem') => 'zooming-blur', __('Horizontal Sliding', 'thegem') => 'horizontal-sliding', __('Vertical Sliding', 'thegem') => 'vertical-sliding', __('Gradient', 'thegem') => 'gradient', __('Circular Overlay', 'thegem') => 'circular')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Arrow', 'thegem'),
					'param_name' => 'arrow',
					'value' => array(__('Big', 'thegem') => 'portfolio_slider_arrow_big', __('Small', 'thegem') => 'portfolio_slider_arrow_small')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'autoscroll',
				),
			)),
		),

		'gem_map_with_text' => array(
			'name' => __('Map with Text', 'thegem'),
			'base' => 'gem_map_with_text',
			'is_container' => true,
			'js_view' => 'VcGemMapWithTextView',
			'icon' => 'thegem-icon-wpb-ui-map-with-text',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Map with Text', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'background_color',
				),
				array(
					'type' => 'textfield',
					'heading' => __( 'Map height', 'thegem' ),
					'param_name' => 'size',
					'admin_label' => true,
					'description' => __( 'Enter map height in pixels. Example: 200 or leave it empty to make map responsive.', 'thegem' )
				),
				array(
					'type' => 'textarea_safe',
					'heading' => __( 'Map embed iframe', 'thegem' ),
					'param_name' => 'link',
					'description' => sprintf( __( 'Visit <a href="%s" target="_blank">Google maps</a> to create your map. 1) Find location 2) Click "Share" and make sure map is public on the web 3) Click folder icon to reveal "Embed on my site" link 4) Copy iframe code and paste it here.', 'thegem' ), 'https://www.google.com/maps/d/')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Grayscale', 'thegem'),
					'param_name' => 'grayscale',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Container', 'thegem'),
					'param_name' => 'container',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Rounded Corners', 'thegem'),
					'param_name' => 'rounded_corners',
					'value' => array(__('Yes', 'thegem') => '1')
				),
			)),
		),

		'gem_news' => array(
			'name' => __('Blog', 'thegem'),
			'base' => 'gem_news',
			'icon' => 'thegem-icon-wpb-ui-news',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Classic blog lists and grids', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Query', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'source_type',
					'dependency' => array(
						'callback' => 'source_type_callback',
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
			),
			$blog_grid_post_types_fields,
			array(
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Categories', 'thegem'),
					'param_name' => 'select_blog_categories',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Categories', 'thegem'),
					'param_name' => 'categories',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_categories',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Tags', 'thegem'),
					'param_name' => 'select_blog_tags',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Tags', 'thegem'),
					'param_name' => 'tags',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_tags',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Posts', 'thegem'),
					'param_name' => 'select_blog_posts',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Posts', 'thegem'),
					'param_name' => 'posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_posts',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Authors', 'thegem'),
					'param_name' => 'select_blog_authors',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Authors', 'thegem'),
					'param_name' => 'authors',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_authors',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Exclude', 'thegem'),
					'param_name' => 'exclude_blog_posts_type',
					'value' => array(
						__('Manual Selection', 'thegem') => 'manual',
						__('Current Post', 'thegem') => 'current',
						__('Term', 'thegem') => 'term',
					),
					'std' => 'manual',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Blog Posts', 'thegem'),
					'param_name' => 'exclude_blog_posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => 'manual'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Posts Terms', 'thegem'),
					'param_name' => 'exclude_post_terms',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'description' => __('Add post term by name.', 'thegem'),
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => array('term')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Order by', 'thegem'),
					'param_name' => 'order_by',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Date', 'thegem') => 'date',
						__('ID', 'thegem') => 'ID',
						__('Author', 'thegem') => 'author',
						__('Title', 'thegem') => 'title',
						__('Last modified date', 'thegem') => 'modified',
						__('Number of comments', 'thegem') => 'comment_count',
						__('Random', 'thegem') => 'rand',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'order_callback',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Sort Order', 'thegem'),
					'param_name' => 'order',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Descending', 'thegem') => 'DESC',
						__('Ascending', 'thegem') => 'ASC',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'order_callback',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Offset', 'thegem'),
					'param_name' => 'offset',
					'description' => __('Number of items to displace or pass over', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Classic List 01', 'thegem') => 'default',
						__('Classic List 02', 'thegem') => 'compact',
						__('Classic List 03', 'thegem') => 'compact-2',
						__('Timeline', 'thegem') => 'timeline',
						__('Timeline Fullwidth', 'thegem') => 'timeline_new',
						//__('Masonry 2x', 'thegem') => '2x',
						__('Masonry 3x', 'thegem') => '3x',
						__('Masonry 4x', 'thegem') => '4x',
						__('100% width', 'thegem') => '100%',
						//__('Justified 2x', 'thegem') => 'justified-2x',
						__('Justified 3x', 'thegem') => 'justified-3x',
						__('Justified 4x', 'thegem') => 'justified-4x',
						__('Styled List 1', 'thegem') => 'styled_list1',
						__('Styled List 2', 'thegem') => 'styled_list2',
						__('Multi Author List', 'thegem') => 'multi-author',
						__('Carousel', 'thegem') => 'grid_carousel',
						__('Slider', 'thegem') => 'slider',
						__('Compact List 01 (for mega menu, sidebar, narrow column)', 'thegem') => 'compact-tiny-1',
						__('Compact List 02 (for mega menu, sidebar, narrow column)', 'thegem') => 'compact-tiny-2',
						__('Compact List 03 (for mega menu, sidebar, narrow column)', 'thegem') => 'compact-tiny-3',
						__('Compact List 04 (for mega menu, sidebar, narrow column)', 'thegem') => 'classic-tiny',
					),
					'std' => ( !$is_templates_megamenu ? 'default' : 'compact-tiny-1' ),
					'save_always' => true,
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Height', 'thegem'),
					'param_name' => 'image_height',
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-3'),
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Justified Style', 'thegem'),
					'param_name' => 'justified_style',
					'value' => array(
						__('Style 1', 'thegem') => 'justified-style-1',
						__('Style 2', 'thegem') => 'justified-style-2',
					),
					'dependency' => array(
						'element' => 'style',
						'value' => array(/*'justified-2x', */'justified-3x', 'justified-4x'),
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Slider Style', 'thegem'),
					'param_name' => 'slider_style',
					'value' => array(
						__('Fullwidth', 'thegem') => 'fullwidth',
						__('Halfwidth', 'thegem') => 'halfwidth',
					),
					'dependency' => array(
						'element' => 'style',
						'value' => array('slider'),
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'slider_autoscroll',
					'dependency' => array(
						'element' => 'style',
						'value' => array('slider'),
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Post per page', 'thegem'),
					'param_name' => 'post_per_page',
					'std' => '5',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'post_pagination',
					'value' => $paginations,
					'save_always' => true,
					'dependency' => array(
						'element' => 'style',
						'value' => array('default', 'timeline', 'timeline_new', /*'2x',*/ '3x', '4x', '100%', /*'justified-2x',*/ 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'compact-2', 'multi-author')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'compact_post_pagination',
					'value' => array(
						__('Normal', 'thegem') => 'normal',
						__('Disable pagination', 'thegem') => 'disable',
					),
					'std' => 'disable',
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Loading animation', 'thegem'),
					'param_name' => 'loading_animation',
					'std' => 'move-up',
					'value' => array(__('Disabled', 'thegem') => 'disabled', __('Bounce', 'thegem') => 'bounce', __('Move Up', 'thegem') => 'move-up', __('Fade In', 'thegem') => 'fade-in', __('Fall Perspective', 'thegem') => 'fall-perspective', __('Scale', 'thegem') => 'scale', __('Flip', 'thegem') => 'flip'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('default', 'timeline', 'timeline_new', /*'2x',*/ '3x', '4x', '100%', /*'justified-2x',*/ 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author', 'compact', 'compact-2')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Ignore Sticky Posts', 'thegem'),
					'param_name' => 'ignore_sticky',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide featured image', 'thegem'),
					'param_name' => 'hide_featured',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'compact-tiny-2', 'classic-tiny')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide date in title', 'thegem'),
					'param_name' => 'hide_date',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('default', 'timeline', /*'2x',*/ '3x', '4x', /*'justified-2x',*/ 'justified-3x', 'justified-4x', 'compact', 'slider', '100%', 'compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide author', 'thegem'),
					'param_name' => 'hide_author',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide comments', 'thegem'),
					'param_name' => 'hide_comments',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide likes', 'thegem'),
					'param_name' => 'hide_likes',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x',  'styled_list1', 'styled_list2', 'multi-author', 'grid_carousel', 'compact', 'compact-2', 'slider')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide Social Sharing', 'thegem'),
					'param_name' => 'hide_social_sharing',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', 'justified-3x', 'justified-4x',  'styled_list1', 'styled_list2', 'multi-author', '100%')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show title', 'thegem'),
					'param_name' => 'show_title',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => 1,
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Truncate Title', 'thegem'),
					'param_name' => 'truncate_title',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Number of words', 'thegem'),
					'param_name' => 'title_size',
					'dependency' => array(
						'element' => 'truncate_title',
						'not_empty' => true
					),
					'std' => 25,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Category', 'thegem'),
					'param_name' => 'show_category',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => 1,
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'compact-tiny-3', 'classic-tiny')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show description', 'thegem'),
					'param_name' => 'show_description',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'classic-tiny')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Truncate Description', 'thegem'),
					'param_name' => 'truncate_description',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Number of words', 'thegem'),
					'param_name' => 'description_size',
					'dependency' => array(
						'element' => 'truncate_description',
						'not_empty' => true
					),
					'std' => 25,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Separator', 'thegem'),
					'param_name' => 'show_separator',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => 1,
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-1', 'compact-tiny-2', 'classic-tiny')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('grid_carousel')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Better Thumbnails Quality', 'thegem'),
					'param_name' => 'fullwidth_section_images',
					'value' => array(__('Yes', 'thegem') => '1'),
					'description' => __('Activate for better image quality in case of using in fullwidth section', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('compact-tiny-3')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Button Text', 'thegem'),
					'param_name' => 'button_text',
					'group' => __('Load More Button', 'thegem'),
					'std' => __('Load More', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_style',
					'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Size', 'thegem'),
					'param_name' => 'button_size',
					'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
					'std' => 'medium',
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Text weight', 'thegem'),
					'param_name' => 'button_text_weight',
					'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No uppercase', 'thegem'),
					'param_name' => 'button_no_uppercase',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border radius', 'thegem'),
					'param_name' => 'button_corner',
					'std' => 25,
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border width', 'thegem'),
					'param_name' => 'button_border',
					'value' => array(1, 2, 3, 4, 5, 6),
					'std' => 2,
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'button_text_color',
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover text color', 'thegem'),
					'param_name' => 'button_hover_text_color',
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'button_background_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('flat')
					),
					'std' => '#00bcd5',
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background color', 'thegem'),
					'param_name' => 'button_hover_background_color',
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'button_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border color', 'thegem'),
					'param_name' => 'button_hover_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'button_icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
					'group' => __('Load More Button', 'thegem'),
					'dependency' => array(
						'element' => 'post_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('elegant')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('material')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('fontawesome')
					),
					'group' => __('Load More Button', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('thegem-header')
					),
					'group' => __('Load More Button', 'thegem')
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
						'group' => __('Load More Button', 'thegem'),
						'dependency' => array(
							'element' => 'post_pagination',
							'value' => array('more')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Separatot Style', 'thegem'),
						'param_name' => 'button_separator',
						'value' => array(
							__('None', 'thegem') => '',
							__('Single', 'thegem') => 'single',
							__('Square', 'thegem') => 'square',
							__('Soft Double', 'thegem') => 'soft-double',
							__('Strong Double', 'thegem') => 'strong-double',
							__('Load More', 'thegem') => 'load-more'
						),
						'std' => 'load-more',
						'group' => __('Load More Button', 'thegem'),
						'dependency' => array(
							'element' => 'post_pagination',
							'value' => array('more')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background', 'thegem'),
						'param_name' => 'item_background_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author', 'slider')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Transparent background', 'thegem'),
						'param_name' => 'item_masonsy_background_transparent',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'style',
							'value' => array('3x', '4x', '100%')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Transparent background', 'thegem'),
						'param_name' => 'item_justified_background_transparent',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'justified_style',
							'value' => array('justified-style-2')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Post Title', 'thegem'),
						'param_name' => 'item_post_title_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author', 'slider', 'compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Post Title Hover', 'thegem'),
						'param_name' => 'item_post_title_hover_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author', 'slider', 'compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Post Excerpt', 'thegem'),
						'param_name' => 'item_post_excerpt_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author', 'slider', 'compact-tiny-1', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Sharing Button Background', 'thegem'),
						'param_name' => 'item_sharing_button_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Sharing Button Icon', 'thegem'),
						'param_name' => 'item_sharing_button_icon_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('default', 'timeline', 'timeline_new', '3x', '4x', '100%', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'multi-author')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Time line', 'thegem'),
						'param_name' => 'item_time_line_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('timeline', 'timeline_new', 'multi-author')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Month', 'thegem'),
						'param_name' => 'item_month_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('timeline_new')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Date', 'thegem'),
						'param_name' => 'item_date_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('timeline_new', 'styled_list1', 'styled_list2', 'multi-author', 'compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Time', 'thegem'),
						'param_name' => 'item_time_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('timeline_new', 'styled_list1', 'styled_list2', 'multi-author')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border', 'thegem'),
						'param_name' => 'item_border_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('timeline', 'timeline_new', 'justified-3x', 'justified-4x', 'styled_list1', 'styled_list2', 'compact-tiny-1', 'compact-tiny-2', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Image Hover Overlay Color', 'thegem'),
						'param_name' => 'hover_overlay_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Icon on Hover', 'thegem'),
						'param_name' => 'icon_on_hover',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => 1,
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'classic-tiny')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Additional Background', 'thegem'),
						'param_name' => 'item_additional_background_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('styled_list1')
						),
						'group' => __('Colors', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Bottom Gap', 'thegem'),
						'param_name' => 'bottom_gap',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Image Size', 'thegem'),
						'param_name' => 'image_size',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'compact-tiny-2')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Image Border Radius', 'thegem'),
						'param_name' => 'image_border_radius',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'compact-tiny-2', 'classic-tiny')
						),
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Title Size Preset', 'thegem'),
						'param_name' => 'title_preset',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Title H1', 'thegem') => 'title-h1',
							__('Title H2', 'thegem') => 'title-h2',
							__('Title H3', 'thegem') => 'title-h3',
							__('Title H4', 'thegem') => 'title-h4',
							__('Title H5', 'thegem') => 'title-h5',
							__('Title H6', 'thegem') => 'title-h6',
							__('Title xLarge', 'thegem') => 'title-xlarge',
							__('Styled Subtitle', 'thegem') => 'styled-subtitle',
							__('Main Menu', 'thegem') => 'main-menu-item',
							__('Body', 'thegem') => 'text-body',
							__('Tiny Body', 'thegem') => 'text-body-tiny',
						),
						'std' => 'default',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Title Font Transform', 'thegem'),
						'param_name' => 'title_transform',
						'value' => array(
							__('Default', 'thegem') => '',
							__('None', 'thegem') => 'none',
							__('Lowercase', 'thegem') => 'lowercase',
							__('Uppercase', 'thegem') => 'uppercase',
							__('Capitalize', 'thegem') => 'capitalize',
						),
						'std' => 'default',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'compact-tiny-2', 'compact-tiny-3', 'classic-tiny')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Description Font Preset', 'thegem'),
						'param_name' => 'post_excerpt_preset',
						'value' => array(
							__('Body', 'thegem') => 'text-body',
							__('Tiny Body', 'thegem') => 'text-body-tiny',
							__('Main Menu', 'thegem') => 'main-menu-item',
							__('Title H5', 'thegem') => 'title-h5',
							__('Title H6', 'thegem') => 'title-h6',
						),
						'std' => 'text-body-tiny',
						'dependency' => array(
							'element' => 'style',
							'value' => array('compact-tiny-1', 'classic-tiny')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
				)),
		),

		'gem_news_grid' => array(
			'name' => __('Posts Extended Grid', 'thegem'),
			'base' => 'gem_news_grid',
			'icon' => 'thegem-icon-wpb-ui-news-grid',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Extended grids for posts', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Unique Grid ID', 'thegem'),
					'param_name' => 'portfolio_uid',
					'value' => 'grid_' . substr(md5(rand()), 0, 7),
					'description' => __('In case of adding multiple product grids on the same page please ensure that each product grid has its own unique ID to avoid conflicts. ', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'save_always' => true,
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Style', 'thegem'),
					'param_name' => 'news_grid_title_style',
					'value' => array(
						__('Light', 'thegem') => 'light',
						__('Dark', 'thegem') => 'dark'
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Grid\'s Title', 'thegem'),
					'param_name' => 'news_grid_title',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Query', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'source_type',
					'dependency' => array(
						'callback' => 'source_type_callback',
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
			),
			$blog_grid_post_types_fields,
			array(
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Categories', 'thegem'),
					'param_name' => 'select_blog_categories',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Categories', 'thegem'),
					'param_name' => 'categories',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_categories',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Tags', 'thegem'),
					'param_name' => 'select_blog_tags',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Tags', 'thegem'),
					'param_name' => 'tags',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_tags',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Posts', 'thegem'),
					'param_name' => 'select_blog_posts',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Posts', 'thegem'),
					'param_name' => 'posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_posts',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Select Blog Authors', 'thegem'),
					'param_name' => 'select_blog_authors',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Authors', 'thegem'),
					'param_name' => 'authors',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'select_blog_authors',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Exclude', 'thegem'),
					'param_name' => 'exclude_blog_posts_type',
					'value' => array(
						__('Manual Selection', 'thegem') => 'manual',
						__('Current Post', 'thegem') => 'current',
						__('Term', 'thegem') => 'term',
					),
					'std' => 'manual',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Blog Posts', 'thegem'),
					'param_name' => 'exclude_blog_posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => 'manual'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Posts Terms', 'thegem'),
					'param_name' => 'exclude_post_terms',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'description' => __('Add post term by name.', 'thegem'),
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => array('term')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Order by', 'thegem'),
					'param_name' => 'order_by',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Date', 'thegem') => 'date',
						__('ID', 'thegem') => 'ID',
						__('Author', 'thegem') => 'author',
						__('Title', 'thegem') => 'title',
						__('Last modified date', 'thegem') => 'modified',
						__('Number of comments', 'thegem') => 'comment_count',
						__('Random', 'thegem') => 'rand',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'order_callback',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Sort Order', 'thegem'),
					'param_name' => 'order',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Descending', 'thegem') => 'DESC',
						__('Ascending', 'thegem') => 'ASC',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'order_callback',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Offset', 'thegem'),
					'param_name' => 'offset',
					'description' => __('Number of items to displace or pass over', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Skin', 'thegem'),
					'param_name' => 'news_grid_version',
					'value' => array(
							__('Classic Style', 'thegem') => 'default',
							__('Alternative Style', 'thegem') => 'new',
							__('List Style', 'thegem') => 'list'
					),
					'dependency' => array(
						'callback' => 'news_grid_style_callback'
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'news_grid_style',
					'value' => array(
						__('Justified Grid', 'thegem') => 'justified',
						__('Masonry Grid ', 'thegem') => 'masonry',
						__('Metro Style', 'thegem') => 'metro',
						__('Creative Grid', 'thegem') => 'creative'
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Desktop', 'thegem'),
					'param_name' => 'news_grid_layout',
					'value' => array(
						__('2x columns', 'thegem') => '2x',
						__('3x columns', 'thegem') => '3x',
						__('4x columns', 'thegem') => '4x',
						__('5x columns', 'thegem') => '5x',
						__('6x columns', 'thegem') => '6x',
						__('100% width', 'thegem') => '100%'
					),
					'std' => '2x',
					'dependency' => array(
						'element' => 'news_grid_style',
						'value' => array('justified', 'masonry', 'metro')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Desktop', 'thegem'),
					'param_name' => 'columns_desktop_creative',
					'value' => array(
							__('2x columns', 'thegem') => '2x',
							__('3x columns', 'thegem') => '3x',
							__('4x columns', 'thegem') => '4x',
							__('5x columns', 'thegem') => '5x',
							__('6x columns', 'thegem') => '6x',
							__('100% width', 'thegem') => '100%'
					),
					'std' => '4x',
					'dependency' => array(
						'element' => 'news_grid_style',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Tablet', 'thegem'),
					'param_name' => 'columns_tablet',
					'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
							__('3x columns', 'thegem') => '3x',
							__('4x columns', 'thegem') => '4x',
					),
					'std' => '2x',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Mobile', 'thegem'),
					'param_name' => 'columns_mobile',
					'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
					),
					'std' => '1x',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns 100%', 'thegem'),
					'param_name' => 'columns_100_creative',
					'value' => array(
							__('4 Columns', 'thegem') => '4',
							__('5 Columns', 'thegem') => '5',
							__('6 Columns', 'thegem') => '6',
					),
					'std' => '5',
					'save_always' => true,
					'dependency' => array(
						'element' => 'columns_desktop_creative',
						'value' => array('100%')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns 100% Width (1920x Screen)', 'thegem'),
					'param_name' => 'news_grid_fullwidth_columns',
					'value' => array(
						__('4 Columns', 'thegem') => '4',
						__('5 Columns', 'thegem') => '5',
						__('6 Columns', 'thegem') => '6',
					),
					'std' => '4',
					'dependency' => array(
						'element' => 'news_grid_layout',
						'value' => array('100%')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Desktop', 'thegem'),
					'param_name' => 'columns_desktop_list',
					'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
							__('3x columns', 'thegem') => '3x',
							__('4x columns', 'thegem') => '4x',
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Tablet', 'thegem'),
					'param_name' => 'columns_tablet_list',
					'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Creative Layouts', 'thegem'),
					'param_name' => 'creative_layouts_sub_delim_head',
					'dependency' => array(
						'element' => 'news_grid_style',
						'value' => array('creative')
					),
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
					'group' => __('Posts & Layout', 'thegem')
				),
			),
			$creative_blog_schemes_values,
			array(
				array(
					'type' => 'checkbox',
					'heading' => __('Apply on mobiles', 'thegem'),
					'param_name' => 'scheme_apply_mobiles',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'news_grid_style',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Apply on tablets', 'thegem'),
					'param_name' => 'scheme_apply_tablets',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'news_grid_style',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Max. row\'s height in grid (px)', 'thegem'),
					'param_name' => 'metro_max_row_height',
					'dependency' => array(
						'callback' => 'metro_max_row_height_callback'
					),
					'std' => 380,
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Image Size', 'thegem'),
					'param_name' => 'image_size',
					'value' => array(
						__('As in Grid Layout (Thumbnails)', 'thegem') => 'default',
						__('Full Size', 'thegem') => 'full',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'image_size_callback',
					),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Ratio', 'thegem'),
					'param_name' => 'image_ratio',
					'std' => 1,
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('full')
					),
					'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Ratio', 'thegem'),
					'param_name' => 'image_ratio_default',
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Better Thumbnails Quality', 'thegem'),
					'param_name' => 'news_grid_fullwidth_section_images',
					'value' => array(__('Yes', 'thegem') => '1'),
					'description' => __('Activate for better image quality in case of using in fullwidth section', 'thegem'),
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Position', 'thegem'),
					'param_name' => 'news_grid_display_titles',
					'value' => array(
						__('Below the featured image', 'thegem') => 'page',
						__('On featured image', 'thegem') => 'hover'
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Position', 'thegem'),
					'param_name' => 'caption_position_list',
					'value' => array(
						__('Right', 'thegem') => 'right',
						__('Left', 'thegem') => 'left',
						__('Zigzag', 'thegem') => 'zigzag'
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Image Hover Type', 'thegem'),
					'param_name' => 'news_grid_hover',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Gradient', 'thegem') => 'gradient',
						__('Circular Overlay', 'thegem') => 'circular',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'image_hover_effect_list',
					'value' => array(
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Title & Description', 'thegem'),
					'param_name' => 'sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide featured image', 'thegem'),
					'param_name' => 'news_grid_hide_featured_image',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Title', 'thegem'),
					'param_name' => 'blog_show_title',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Truncate Title (Lines)', 'thegem'),
					'param_name' => 'news_grid_truncate_titles',
					'dependency' => array(
						'element' => 'blog_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Description', 'thegem'),
					'param_name' => 'blog_show_description',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Truncate Description (Lines)', 'thegem'),
					'param_name' => 'news_grid_truncate_description',
					'dependency' => array(
						'element' => 'blog_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Meta', 'thegem'),
					'param_name' => 'sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide date', 'thegem'),
					'param_name' => 'news_grid_hide_date',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide author', 'thegem'),
					'param_name' => 'news_grid_hide_author',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide author\'s avatar', 'thegem'),
					'param_name' => 'news_grid_hide_author_avatar',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide comments', 'thegem'),
					'param_name' => 'news_grid_hide_comments',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide social sharing', 'thegem'),
					'param_name' => 'news_grid_disable_socials',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Activate Likes', 'thegem'),
					'param_name' => 'news_grid_likes',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
			),
			$project_additional_meta_fields_post,
			$project_details_post,
			$read_more_button,
			array(
				array(
					'type' => 'checkbox',
					'heading' => __('Show Divider', 'thegem'),
					'param_name' => 'blog_show_divider',
					'std' => '1',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Items per page', 'thegem'),
					'param_name' => 'news_grid_items_per_page',
					'std' => '8',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'news_grid_pagination',
					'value' => $paginations,
					'save_always' => true,
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show all on load more', 'thegem'),
					'param_name' => 'load_more_show_all',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Next page preloading', 'thegem'),
					'param_name' => 'next_page_preloading',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'description' => __('If enabled, items for the next page will be preloaded on the current page.', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('normal', 'more', 'scroll')
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Reduce HTML Size', 'thegem'),
					'param_name' => 'reduce_html_size',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Items on Page Load', 'thegem'),
					'param_name' => 'items_on_load',
					'std' => '8',
					'description' => __('Number of items to load on initial page load. The rest will be loaded on user scroll to reduce HTML size of the page for better pagespeed performance.', 'thegem'),
					'dependency' => array(
						'element' => 'reduce_html_size',
						'not_empty' => true,
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Button Text', 'thegem'),
					'param_name' => 'button_text',
					'std' => __('Load More', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Grid Image Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Gaps', 'thegem'),
					'param_name' => 'gaps_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Desktop', 'thegem'),
					'param_name' => 'news_grid_gaps_size',
					'std' => 42,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Tablet', 'thegem'),
					'param_name' => 'news_grid_gaps_size_tablet',
					'std' => 42,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Mobile', 'thegem'),
					'param_name' => 'news_grid_gaps_size_mobile',
					'std' => 42,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Height, px', 'thegem'),
					'param_name' => 'news_grid_image_height',
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'edit_field_class' => 'image_height vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border Radius', 'thegem'),
					'param_name' => 'image_border_radius',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Shadow', 'thegem'),
					'param_name' => 'thumb_border_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Enable Shadow', 'thegem'),
					'param_name' => 'enable_shadow',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Shadow color', 'thegem'),
					'param_name' => 'shadow_color',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'std' => 'rgba(0, 0, 0, 0.15)',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'shadow_position',
					'value' => array(
						__('Outline', 'thegem') => 'outline',
						__('Inset', 'thegem') => 'inset'
					),
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'std' => 'outline',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Horizontal', 'thegem'),
					'param_name' => 'shadow_horizontal',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '0',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Vertical', 'thegem'),
					'param_name' => 'shadow_vertical',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Blur', 'thegem'),
					'param_name' => 'shadow_blur',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Spread', 'thegem'),
					'param_name' => 'shadow_spread',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '-5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Apply shadow on caption container', 'thegem'),
					'param_name' => 'shadowed_container',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Title', 'thegem'),
					'param_name' => 'title_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Size Preset', 'thegem'),
					'param_name' => 'news_grid_title_preset',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Title H1', 'thegem') => 'title-h1',
						__('Title H2', 'thegem') => 'title-h2',
						__('Title H3', 'thegem') => 'title-h3',
						__('Title H4', 'thegem') => 'title-h4',
						__('Title H5', 'thegem') => 'title-h5',
						__('Title H6', 'thegem') => 'title-h6',
						__('Title xLarge', 'thegem') => 'title-xlarge',
						__('Styled Subtitle', 'thegem') => 'styled-subtitle',
						__('Main Menu', 'thegem') => 'main-menu-item',
						__('Body', 'thegem') => 'text-body',
						__('Tiny Body', 'thegem') => 'text-body-tiny',
					),
					'std' => 'default',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('HTML Tag', 'thegem'),
					'param_name' => 'title_tag',
					'value' => array(
						__('H1', 'thegem') => 'h1',
						__('H2', 'thegem') => 'h2',
						__('H3', 'thegem') => 'h3',
						__('H4', 'thegem') => 'h4',
						__('H5', 'thegem') => 'h5',
						__('H6', 'thegem') => 'h6',
						__('p', 'thegem') => 'p',
						__('div', 'thegem') => 'div'
					),
					'std' => 'div',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Font Transform', 'thegem'),
					'param_name' => 'news_grid_title_transform',
					'value' => array(
						__('Default', 'thegem') => '',
						__('None', 'thegem') => 'none',
						__('Lowercase', 'thegem') => 'lowercase',
						__('Uppercase', 'thegem') => 'uppercase',
						__('Capitalize', 'thegem') => 'capitalize',
					),
					'std' => '',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Font Weight', 'thegem'),
					'param_name' => 'news_grid_title_font_weight',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Thin', 'thegem') => 'light',
					),
					'std' => '',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title Letter Spacing', 'thegem'),
					'param_name' => 'news_grid_title_letter_spacing',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Title Color', 'thegem'),
					'param_name' => 'item_post_title_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Title Color Hover', 'thegem'),
					'param_name' => 'item_post_title_color_hover',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Description', 'thegem'),
					'param_name' => 'description_sub_delim_head',
					'dependency' => array(
						'element' => 'blog_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Description Size Preset', 'thegem'),
					'param_name' => 'news_grid_description_preset',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Title H1', 'thegem') => 'title-h1',
						__('Title H2', 'thegem') => 'title-h2',
						__('Title H3', 'thegem') => 'title-h3',
						__('Title H4', 'thegem') => 'title-h4',
						__('Title H5', 'thegem') => 'title-h5',
						__('Title H6', 'thegem') => 'title-h6',
						__('Title xLarge', 'thegem') => 'title-xlarge',
						__('Styled Subtitle', 'thegem') => 'styled-subtitle',
						__('Main Menu', 'thegem') => 'main-menu-item',
						__('Tiny', 'thegem') => 'text-body',
						__('Tiny Body', 'thegem') => 'text-body-tiny',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'blog_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Description Color', 'thegem'),
					'param_name' => 'item_post_excerpt_color',
					'dependency' => array(
						'element' => 'blog_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Other Elements', 'thegem'),
					'param_name' => 'other_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Author Color', 'thegem'),
					'param_name' => 'item_post_author_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Date Color', 'thegem'),
					'param_name' => 'item_post_date_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Categories Color', 'thegem'),
					'param_name' => 'item_post_categories_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Categories Background Color', 'thegem'),
					'param_name' => 'item_post_categories_background_color',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('new', 'list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Icon Color', 'thegem'),
					'param_name' => 'item_post_hover_icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Comments Icon Color', 'thegem'),
					'param_name' => 'item_post_comments_icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Likes Icon Color', 'thegem'),
					'param_name' => 'item_post_likes_icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Sharing Icon Color', 'thegem'),
					'param_name' => 'item_post_share_icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Sharing Social Icon Color', 'thegem'),
					'param_name' => 'item_post_share_social_icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Hover', 'thegem'),
					'param_name' => 'item_hover_background_color',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Divider Color', 'thegem'),
					'param_name' => 'item_divider_color_list',
					'dependency' => array(
						'element' => 'blog_show_divider',
						'value' => '1'
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
			),
			$read_more_button_style,
			$project_details_style_post,
			array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Container Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Caption Column Width (%)', 'thegem'),
					'param_name' => 'caption_column_width',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Horizontal Alignment', 'thegem'),
					'param_name' => 'caption_horizontal_alignment',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Left', 'thegem') => 'left',
						__('Center', 'thegem') => 'center',
						__('Right', 'thegem') => 'right',
					),
					'std' => '',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Vertical Alignment', 'thegem'),
					'param_name' => 'caption_vertical_alignment',
					'value' => array(
						__('Top', 'thegem') => 'flex-start',
						__('Center', 'thegem') => 'center',
						__('Bottom', 'thegem') => 'flex-end',
					),
					'std' => 'center',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Preset', 'thegem'),
					'param_name' => 'news_grid_background_style',
					'value' => array(
						__('Transparent', 'thegem') => 'transparent',
						__('White', 'thegem') => 'white',
						__('Grey', 'thegem') => 'gray',
						__('Dark', 'thegem') => 'dark'
					),
					'dependency' => array(
						'callback' => 'display_titles_hover_callback'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Content Alignment', 'thegem'),
					'param_name' => 'caption_container_alignment',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Left', 'thegem') => 'left',
						__('Centered', 'thegem') => 'center',
						__('Right', 'thegem') => 'right',
					),
					'dependency' => array(
						'element' => 'news_grid_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable Hover', 'thegem'),
					'param_name' => 'disable_hover',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'item_background_color_list',
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('list')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Background', 'thegem'),
					'param_name' => 'item_background_color',
					'dependency' => array(
						'element' => 'news_grid_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Bottom Border', 'thegem'),
					'param_name' => 'item_post_bottom_border_color',
					'dependency' => array(
						'element' => 'news_grid_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Container Padding', 'thegem'),
					'param_name' => 'layout_delim_head_pagination_more',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Desktop Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Tablet Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Mobile Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Load More Button Style', 'thegem'),
					'param_name' => 'layout_delim_head_pagination_more',
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_style',
					'value' => array(
						__( 'Flat', 'thegem' ) => 'flat',
						__( 'Outline', 'thegem' ) => 'outline'
					),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Size', 'thegem'),
					'param_name' => 'button_size',
					'value' => array(
						__('Tiny', 'thegem') => 'tiny',
						__('Small', 'thegem') => 'small',
						__('Medium', 'thegem') => 'medium',
						__('Large', 'thegem') => 'large',
						__('Giant', 'thegem') => 'giant'
					),
					'std' => 'medium',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Text weight', 'thegem'),
					'param_name' => 'button_text_weight',
					'value' => array(
						__('Normal', 'thegem') => 'normal',
						__('Thin', 'thegem') => 'thin'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No uppercase', 'thegem'),
					'param_name' => 'button_no_uppercase',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border radius', 'thegem'),
					'param_name' => 'button_corner',
					'std' => 25,
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border width', 'thegem'),
					'param_name' => 'button_border',
					'value' => array(1, 2, 3, 4, 5, 6),
					'std' => 2,
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'button_text_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover text color', 'thegem'),
					'param_name' => 'button_hover_text_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'button_background_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('flat')
					),
					'std' => '#00bcd5',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background color', 'thegem'),
					'param_name' => 'button_hover_background_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'button_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border color', 'thegem'),
					'param_name' => 'button_hover_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound Colors', 'thegem'),
					'param_name' => 'button_gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),

				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background From', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_from',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background To', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'group' => __('Style', 'thegem'),
					'param_name' => 'button_gradient_backgound_to',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background From', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_hover_from',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background To', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_hover_to',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_gradient_backgound_style',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					"value" => array(
						__('Linear', "thegem") => "linear",
						__('Radial', "thegem") => "radial",
					) ,
					"std" => 'linear',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'button_gradient_radial_backgound_position',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					"value" => array(
						__('Top', "thegem") => "at top",
						__('Bottom', "thegem") => "at bottom",
						__('Right', "thegem") => "at right",
						__('Left', "thegem") => "at left",
						__('Center', "thegem") => "at center",

					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Swap Colors', 'thegem'),
					'param_name' => 'button_gradient_radial_swap_colors',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_angle',
					'group' => __('Style', 'thegem'),
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Vertical to bottom ↓', "thegem") => "to bottom",
						__('Vertical to top ↑', "thegem") => "to top",
						__('Horizontal to left  →', "thegem") => "to right",
						__('Horizontal to right ←', "thegem") => "to left",
						__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
						__('Diagonal from left to top ↗', "thegem") => "to top right",
						__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
						__('Diagonal from right to top ↖', "thegem") => "to top left",
						__('Custom', "thegem") => "cusotom_deg",

					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'linear',
						)
					)
				),
				array(
					"type" => "textfield",
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_cusotom_deg',
					'group' => __('Style', 'thegem'),
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'cusotom_deg',
						)
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'button_icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('elegant')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('material')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('fontawesome')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('thegem-header')
					),
					'group' => __('Style', 'thegem')
				),
			),
			thegem_userpack_to_shortcode(array(
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_userpack',
					'icon_pack' => 'userpack',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('userpack')
					),
				),
			)),
			array(
				array(
					'type' => 'dropdown',
					'heading' => __( 'Icon position', 'thegem' ),
					'param_name' => 'button_icon_position',
					'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Separator Style', 'thegem'),
					'param_name' => 'button_separator',
					'value' => array(
						__('None', 'thegem') => '',
						__('Single', 'thegem') => 'single',
						__('Square', 'thegem') => 'square',
						__('Soft Double', 'thegem') => 'soft-double',
						__('Strong Double', 'thegem') => 'strong-double',
						__('Load More', 'thegem') => 'load-more'
					),
					'std' => 'load-more',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'news_grid_pagination',
						'value' => array('more')
					),
				),
			),
			$project_filters_post,
			array(
				array(
					'type' => 'dropdown',
					'heading' => __('Loading Animation', 'thegem'),
					'param_name' => 'loading_animation',
					'std' => 'move-up',
					'value' => array(
						__('Disabled', 'thegem') => 'disabled',
						__('Bounce', 'thegem') => 'bounce',
						__('Move Up', 'thegem') => 'move-up',
						__('Fade In', 'thegem') => 'fade-in',
						__('Fall Perspective', 'thegem') => 'fall-perspective',
						__('Scale', 'thegem') => 'scale',
						__('Flip', 'thegem') => 'flip'
					),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Enable animation on mobile', 'thegem'),
					'param_name' => 'loading_animation_mobile',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Ignore Sticky Posts', 'thegem'),
					'param_name' => 'news_grid_ignore_sticky_posts',
					'std' => '1',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'new_default_highlights',
					'std' => '1',
					'save_always' => true,
					'edit_field_class' => 'no-top-padding vc_column vc_col-sm-12',
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Ignore Highlighted Items', 'thegem'),
					'param_name' => 'news_grid_ignore_highlights',
					'std' => '1',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'news_grid_version',
						'value' => array('default', 'new')
					),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Skeleton Preloader on Grid Loading', 'thegem'),
					'param_name' => 'skeleton_loader',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'columns_desktop',
						'value' => array('2x', '3x', '4x', '5x', '6x')
					),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('AJAX Preloader Type', 'thegem'),
					'param_name' => 'ajax_preloader_type',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Minimal', 'thegem') => 'minimal',
					),
					'std' => 'default',
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Preloader Color', 'thegem'),
					'param_name' => 'minimal_preloader_color',
					'dependency' => array(
						'element' => 'ajax_preloader_type',
						'value' => 'minimal'
					),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable Grid\'s Bottom Margin', 'thegem'),
					'param_name' => 'disable_bottom_margin',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Additional', 'thegem')
				),
			)),
		),

		'gem_featured_posts_slider' => array(
			'name' => __('Featured Posts Slider', 'thegem'),
			'base' => 'gem_featured_posts_slider',
			'icon' => 'thegem-icon-wpb-ui-featured-posts-slider',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Featured Posts Slider', 'thegem'),
			'admin_enqueue_css' => array(THEGEM_THEME_URI.'/css/icons-arrows.css'),
			'params' => array_merge(array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Posts', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'source_type',
					'dependency' => array(
						'callback' => 'source_type_callback',
					),
					'edit_field_class' => 'no-top-padding',
					'group' => __('Posts & Layout', 'thegem')
				),
			),
			$blog_grid_post_types_fields,
			array(
				array(
					'type' => 'dropdown',
					'heading' => __('Source', 'thegem'),
					'param_name' => 'featured_source',
					'value' => array(
						__('Featured via post\'s page options', 'thegem') => 'featured',
						__('All posts from posts archive', 'thegem') => 'all',
					),
					'std' => $featured_source_default,
					'save_always' => true,
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'archive'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Source', 'thegem'),
					'param_name' => 'source',
					'value' => array(
						__('Featured via post\'s page options', 'thegem') => 'featured',
						__('Select posts', 'thegem') => 'posts',
						__('All posts from category', 'thegem') => 'categories',
						__('All posts from tag', 'thegem') => 'tags',
						__('All posts from author', 'thegem') => 'authors',
					),
					'std' => 'featured',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'value' => $thegem_vc_get_featured_post_categories = thegem_vc_get_featured_post_categories(),
					'heading' => !empty($thegem_vc_get_featured_post_categories) ? __('Categories', 'thegem') : '',
					'param_name' => 'categories',
					'dependency' => array(
						'element' => 'source',
						'value' => 'featured'
					),
					'edit_field_class' => 'thegem-terms-checkboxes vc_column vc_col-sm-6',
					'description'=> empty($thegem_vc_get_featured_post_categories) ? __('No featured posts in no categories are selected', 'thegem') : '',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Categories', 'thegem'),
					'param_name' => 'select_blog_cat',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'source',
						'value' => 'categories'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Tags', 'thegem'),
					'param_name' => 'select_blog_tags',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'source',
						'value' => 'tags'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Posts', 'thegem'),
					'param_name' => 'select_blog_posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'source',
						'value' => 'posts'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Select Authors', 'thegem'),
					'param_name' => 'select_blog_authors',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'source',
						'value' => 'authors'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Order by', 'thegem'),
					'param_name' => 'order_by',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Date', 'thegem') => 'date',
						__('ID', 'thegem') => 'ID',
						__('Author', 'thegem') => 'author',
						__('Title', 'thegem') => 'title',
						__('Last modified date', 'thegem') => 'modified',
						__('Number of comments', 'thegem') => 'comment_count',
						__('Random', 'thegem') => 'rand',
					),
					'std' => 'default',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Sort Order', 'thegem'),
					'param_name' => 'order',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Descending', 'thegem') => 'DESC',
						__('Ascending', 'thegem') => 'ASC',
					),
					'std' => 'default',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Offset', 'thegem'),
					'param_name' => 'offset',
					'description' => __('Number of items to displace or pass over', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Exclude', 'thegem'),
					'param_name' => 'exclude_blog_posts_type',
					'value' => array(
						__('Manual Selection', 'thegem') => 'manual',
						__('Current Post', 'thegem') => 'current',
						__('Term', 'thegem') => 'term',
					),
					'std' => 'manual',
					'dependency' => array(
						'element' => 'query_type',
						'value' => 'post'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Blog Posts', 'thegem'),
					'param_name' => 'exclude_blog_posts',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'save_always' => true,
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => 'manual'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Posts Terms', 'thegem'),
					'param_name' => 'exclude_post_terms',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'description' => __('Add post term by name.', 'thegem'),
					'dependency' => array(
						'element' => 'exclude_blog_posts_type',
						'value' => array('term')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('Classic', 'thegem') => 'default', __('Alternative', 'thegem') => 'new'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout',
					'value' => array(__('Container', 'thegem') => 'container', __('100% Width', 'thegem') => 'fullwidth'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Max. Height (in px)', 'thegem'),
					'param_name' => 'max_height',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Fullheight', 'thegem'),
					'param_name' => 'fullheight',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'layout',
						'value' => array('fullwidth')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Centered Captions', 'thegem'),
					'param_name' => 'centered_captions',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Blog Post Title Style', 'thegem'),
					'std'=>'big',
					'param_name' => 'title_style',
					'value' => array(
						__('Small', 'thegem') => 'small',
						__('Normal', 'thegem') => 'normal',
						__('Big', 'thegem') => 'big',
						__('Large', 'thegem') => 'large'
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Max. number of posts in slider', 'thegem'),
					'param_name' => 'max_posts',
					'std' => '3',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Posts sorting in slider', 'thegem'),
					'param_name' => 'order_by',
					'value' => array(__('Date descending', 'thegem') => 'date_desc', __('Date ascending', 'thegem') => 'date_asc'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hide "Read more" Button', 'thegem'),
					'param_name' => 'hide_button',
					'std' => '0',
					'value' => array(__('No', 'thegem') => '0', __('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide date', 'thegem'),
					'param_name' => 'hide_date',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide excerpt', 'thegem'),
					'param_name' => 'hide_excerpt',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide categories', 'thegem'),
					'param_name' => 'hide_categories',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide author', 'thegem'),
					'param_name' => 'hide_author',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Hide author\'s avatar', 'thegem'),
					'param_name' => 'hide_author_avatar',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Paginator', 'thegem'),
					'param_name' => 'paginator_type',
					'value' => array(__('Arrows', 'thegem') => 'arrows', __('Bullets', 'thegem') => 'bullets'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_dropdown_arrows',
					'heading' => __('Paginator icon', 'thegem'),
					'param_name' => 'paginator_icon',
					'value' => array(
						__('Arrows Style 1', 'thegem') => '1',
						__('Arrows Style 2', 'thegem') => '2',
						__('Arrows Style 3', 'thegem') => '3',
						__('Arrows Style 4', 'thegem') => '4',
						__('Arrows Style 5', 'thegem') => '5',
					),
					'dependency' => array(
						'element' => 'paginator_type',
						'value' => array('arrows')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Paginator size', 'thegem'),
					'param_name' => 'paginator_size',
					'value' => array(__('Regular', 'thegem') => 'regular', __('Large', 'thegem') => 'large'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Paginator style', 'thegem'),
					'param_name' => 'paginator_style',
					'value' => array(__('Light', 'thegem') => 'light', __('Dark', 'thegem') => 'dark'),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Paginator position', 'thegem'),
					'param_name' => 'paginator_position',
					'value' => array(__('Left & right', 'thegem') => 'left_right', __('Bottom centered', 'thegem') => 'bottom_centered'),
					'dependency' => array(
						'element' => 'paginator_type',
						'value' => array('arrows')
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Sliding effect', 'thegem'),
					'param_name' => 'sliding_effect',
					'value' => array(
						__('Slide', 'thegem') => 'slide',
						__('Fade', 'thegem') => 'fade'
					),
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'auto_scroll',
					'group' => __('Posts & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Background Overlay', 'thegem'),
					'param_name' => 'use_background_overlay',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Colors', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Overlay Color', 'thegem'),
					'param_name' => 'overlay_color',
					'std' => '#000000',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'use_background_overlay',
						'value' => array('1')
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Overlay Opacity (0-1)', 'thegem'),
					'param_name' => 'overlay_opacity',
					'group' => __('Colors', 'thegem'),
					'std' => 0.7,
					'dependency' => array(
						'element' => 'use_background_overlay',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Title', 'thegem'),
					'param_name' => 'post_title_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Author', 'thegem'),
					'param_name' => 'post_author_color',
					'group' => __('Colors', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Date', 'thegem'),
					'param_name' => 'post_date_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Excerpt', 'thegem'),
					'param_name' => 'post_excerpt_color',
					'group' => __('Colors', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Post Categories', 'thegem'),
					'param_name' => 'post_categories_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Button Name', 'thegem'),
					'param_name' => 'button_text',
					'group' => __('Read More Button', 'thegem'),
					'std' => __('Read More', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_style',
					'std' => 'outline',
					'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Size', 'thegem'),
					'param_name' => 'button_size',
					'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
					'std' => 'small',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Text weight', 'thegem'),
					'param_name' => 'button_text_weight',
					'std' => 'thin',
					'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No uppercase', 'thegem'),
					'param_name' => 'button_no_uppercase',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border radius', 'thegem'),
					'param_name' => 'button_corner',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border width', 'thegem'),
					'param_name' => 'button_border',
					'value' => array(1, 2, 3, 4, 5, 6),
					'std' => 1,
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'button_text_color',
					'std' => '#ffffff',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover text color', 'thegem'),
					'param_name' => 'button_hover_text_color',
					'std' => '#000000',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'button_background_color',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('flat')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background color', 'thegem'),
					'param_name' => 'button_hover_background_color',
					'std' => '#ffffff',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'button_border_color',
					'std' => '#ffffff',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border color', 'thegem'),
					'param_name' => 'button_hover_border_color',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound Colors', 'thegem'),
					'param_name' => 'button_gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background From', 'thegem'),
					'edit_field_class' => 'vc_col-sm-5 vc_column',
					'param_name' => 'button_gradient_backgound_from',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background To', 'thegem'),
					'edit_field_class' => 'vc_col-sm-5 vc_column',
					'group' => __('Read More Button', 'thegem'),
					'param_name' => 'button_gradient_backgound_to',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background From', 'thegem'),
					'edit_field_class' => 'vc_col-sm-5 vc_column',
					'param_name' => 'button_gradient_backgound_hover_from',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background To', 'thegem'),
					'edit_field_class' => 'vc_col-sm-5 vc_column',
					'param_name' => 'button_gradient_backgound_hover_to',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_gradient_backgound_style',
					'edit_field_class' => 'vc_col-sm-4 vc_column',
					'group' => __('Read More Button', 'thegem'),
					'value' => array(
						__('Linear', 'thegem') => 'linear',
						__('Radial', 'thegem') => 'radial',
					) ,
					'std' => 'linear',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'button_gradient_radial_backgound_position',
					'edit_field_class' => 'vc_col-sm-4 vc_column',
					'group' => __('Read More Button', 'thegem'),
					'value' => array(
						__('Top', 'thegem') => 'at top',
						__('Bottom', 'thegem') => 'at bottom',
						__('Right', 'thegem') => 'at right',
						__('Left', 'thegem') => 'at left',
						__('Center', 'thegem') => 'at center',
					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array('radial')
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Swap Colors', 'thegem'),
					'param_name' => 'button_gradient_radial_swap_colors',
					'edit_field_class' => 'vc_col-sm-4 vc_column',
					'group' => __('Read More Button', 'thegem'),
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array('radial')
					)
				),
				array(
					'type' => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_angle',
					'group' => __('Read More Button', 'thegem'),
					'edit_field_class' => 'vc_col-sm-4 vc_column',
					'value' => array(
						__('Vertical to bottom ↓', 'thegem') => 'to bottom',
						__('Vertical to top ↑', 'thegem') => 'to top',
						__('Horizontal to left  →', 'thegem') => 'to right',
						__('Horizontal to right ←', 'thegem') => 'to left',
						__('Diagonal from left to bottom ↘', 'thegem') => 'to bottom right',
						__('Diagonal from left to top ↗', 'thegem') => 'to top right',
						__('Diagonal from right to bottom ↙', 'thegem') => 'to bottom left',
						__('Diagonal from right to top ↖', 'thegem') => 'to top left',
						__('Custom', 'thegem') => 'cusotom_deg',
					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array('linear')
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_cusotom_deg',
					'group' => __('Read More Button', 'thegem'),
					'edit_field_class' => 'vc_col-sm-4 vc_column',
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array('cusotom_deg')
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'button_icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'hide_button',
						'value' => array('0')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_elegant',
					'icon_pack' => 'elegant',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_material',
					'icon_pack' => 'material',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('material')
					)
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('fontawesome')
					)
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'group' => __('Read More Button', 'thegem'),
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('thegem-header')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
						'group' => __('Read More Button', 'thegem'),
						'dependency' => array(
							'element' => 'hide_button',
							'value' => array('0')
						),
					)
				)),
		),

		'gem_heading' => array(
			'name' => $gem_heading_name,
			'base' => 'gem_heading',
			'icon' => 'thegem-icon-wpb-ui-heading',
			'category' => $gem_heading_category,
			'description' => $gem_heading_description,
			'params' => array_merge(
				gem_heading_dynamic_options($is_template_header, $is_template_single_product, $gem_heading_sources),

				array(
					array(
						'type' => 'checkbox',
						'heading' => __('Heading Icon', 'thegem'),
						'param_name' => 'heading_icon',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'pack',
						'value' => array_merge(array(
							__('Elegant', 'thegem') => 'elegant',
							__('Material Design', 'thegem') => 'material',
							__('FontAwesome', 'thegem') => 'fontawesome',
							__('Header Icons', 'thegem') => 'thegem-header',
							__('Additional', 'thegem') => 'thegemdemo'),
							thegem_userpack_to_dropdown()
						),
						'std' => 'elegant',
						'dependency' => array(
							'element' => 'heading_icon',
							'value' => array('1')
						),
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('elegant')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('material')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('fontawesome')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegem-header')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegemdemo',
						'icon_pack' => 'thegemdemo',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegemdemo')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem'),
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('userpack')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem'),
					),
				)),
				array(
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'heading_icon_color',
						'dependency' => array(
							'element' => 'heading_icon',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('HTML Tag', 'thegem'),
						'param_name' => 'heading_tag',
						'value' => array(
							__('Default', 'thegem') => ( (!$is_template_header && !$is_template_single_product && !$is_templates_megamenu) ? 'h1' : 'div' ),
							__('H1', 'thegem') => 'h1',
							__('H2', 'thegem') => 'h2',
							__('H3', 'thegem') => 'h3',
							__('H4', 'thegem') => 'h4',
							__('H5', 'thegem') => 'h5',
							__('H6', 'thegem') => 'h6',
							__('p', 'thegem') => 'p',
							__('div', 'thegem') => 'div'
						),
						'std' => ( (!$is_template_header && !$is_template_single_product && !$is_templates_megamenu) ? 'h1' : 'div' ),
						'save_always' => true,
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'heading_div_style',
						'value' => array(
							__('None', 'thegem') => '',
							__('Title H1', 'thegem') => 'title-h1',
							__('Title H2', 'thegem') => 'title-h2',
							__('Title H3', 'thegem') => 'title-h3',
							__('Title H4', 'thegem') => 'title-h4',
							__('Title H5', 'thegem') => 'title-h5',
							__('Title H6', 'thegem') => 'title-h6',
							__('Title xLarge', 'thegem') => 'title-xlarge',
							__('Styled Subtitle', 'thegem') => 'styled-subtitle',
							__('Main Menu', 'thegem') => 'main-menu-item',
							__('Body', 'thegem') => 'text-body',
							__('Tiny Body', 'thegem') => 'text-body-tiny',
						),
						'std' => ($is_templates_megamenu ? 'main-menu-item' : ''),
						'save_always' => true,
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text align', 'thegem'),
						'param_name' => 'heading_align',
						'value' => array(
							__('Left', 'thegem') => 'left',
							__('Right', 'thegem') => 'right',
							__('Center', 'thegem') => 'center',
							__('Justify', 'thegem') => 'justify'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Inline element', 'thegem'),
						'param_name' => 'heading_inline',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Label Text', 'thegem'),
						'param_name' => 'heading_label_text',
						'group' => __('Content', 'thegem'),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Max width', 'thegem'),
						'param_name' => 'heading_width',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Element ID', 'thegem'),
						'param_name' => 'element_id',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Extra class name', 'thegem'),
						'param_name' => 'extra_class',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Font weight', 'thegem'),
						'param_name' => 'heading_page_text_weight',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Thin', 'thegem') => 'light',
						),
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gem_heading_sources_dependency
						),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Font italic', 'thegem'),
						'param_name' => 'heading_page_text_style',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gem_heading_sources_dependency
						),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Underline', 'thegem'),
						'param_name' => 'heading_page_text_decoration',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gem_heading_sources_dependency
						),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Text color', 'thegem'),
						'param_name' => 'heading_page_text_color',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'text_source',
							'value' => $gem_heading_sources_dependency
						),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover color', 'thegem'),
						'param_name' => 'heading_text_color_hover',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use custom font size?', 'thegem'),
						'param_name' => 'heading_custom_font_size',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Font size', 'thegem'),
						'param_name' => 'heading_font_size',
						'dependency' => array(
							'element' => 'heading_custom_font_size',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Line height', 'thegem'),
						'param_name' => 'heading_line_height',
						'dependency' => array(
							'element' => 'heading_custom_font_size',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Letter spacing', 'thegem'),
						'param_name' => 'heading_letter_spacing',
						'dependency' => array(
							'element' => 'heading_custom_font_size',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Text transform', 'thegem'),
						'param_name' => 'heading_text_transform',
						'value' => array(
//							__('Inherit', 'thegem') => 'inherit',
							__('None', 'thegem') => 'none',
							__('Capitalize', 'thegem') => 'capitalize',
							__('Lowercase', 'thegem') => 'lowercase',
							__('Uppercase', 'thegem') => 'uppercase'
						),
						'dependency' => array(
							'element' => 'heading_custom_font_size',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Responsive font size options', 'thegem'),
						'param_name' => 'heading_responsive_font',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Font size tablet', 'thegem'),
						'param_name' => 'heading_font_size_tablet',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Line height tablet', 'thegem'),
						'param_name' => 'heading_line_height_tablet',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Letter spacing tablet', 'thegem'),
						'param_name' => 'heading_letter_spacing_tablet',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Font size mobile', 'thegem'),
						'param_name' => 'heading_font_size_mobile',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Line height mobile', 'thegem'),
						'param_name' => 'heading_line_height_mobile',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Letter spacing mobile', 'thegem'),
						'param_name' => 'heading_letter_spacing_mobile',
						'dependency' => array(
							'element' => 'heading_responsive_font',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Google fonts?', 'thegem'),
						'param_name' => 'heading_google_font',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'google_fonts',
						'param_name' => 'heading_custom_fonts',
						'value' => '',
						'settings' => array(
							'fields' => array(
								'font_family_description' => esc_html__('Select font family.', 'thegem'),
								'font_style_description' => esc_html__('Select font styling.', 'thegem'),
							),
						),
						'dependency' => array(
							'element' => 'heading_google_font',
							'value' => '1'
						),
						'group' => __('Style', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Label Color', 'thegem'),
						'param_name' => 'heading_label_color',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Label Background', 'thegem'),
						'param_name' => 'heading_label_background',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __('Style', 'thegem'),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Animation Type', 'thegem'),
						'param_name' => 'heading_animation_type',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Advanced', 'thegem') => 'advanced'
						),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('CSS Animation', 'thegem'),
						'param_name' => 'heading_animation',
						'value' => array_flip(TheGemHeadingAnimation::getAnimationList()),
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'description' => esc_html__( 'Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'thegem' ),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'animation_style',
						'heading' => esc_html__( 'CSS Animation', 'thegem' ),
						'param_name' => 'css_animation',
						'value' => '',
						'settings' => array(
							'type' => 'in',
							'custom' => array(
								array(
									'label' => esc_html__( 'Default', 'thegem' ),
									'values' => array(
										esc_html__( 'Top to bottom', 'thegem' ) => 'top-to-bottom',
										esc_html__( 'Bottom to top', 'thegem' ) => 'bottom-to-top',
										esc_html__( 'Left to right', 'thegem' ) => 'left-to-right',
										esc_html__( 'Right to left', 'thegem' ) => 'right-to-left',
										esc_html__( 'Appear from center', 'thegem' ) => 'appear',
									),
								),
							),
						),
						'description' => esc_html__( 'Select type of animation for element to be animated when it "enters" the browsers viewport (Note: works only in modern browsers).', 'thegem' ),
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'default'
						),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Animation Speed (ms)', 'thegem'),
						'param_name' => 'heading_animation_duration',
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Animation Delay (ms)', 'thegem'),
						'param_name' => 'heading_animation_delay',
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Interval (ms)', 'thegem'),
						'param_name' => 'heading_animation_interval',
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Timing Function', 'thegem'),
						'param_name' => 'heading_animation_timing_function',
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem'),
						'description' => sprintf( __( '(Please refer to this %s)', 'thegem' ), '<a href="https://www.w3schools.com/cssref/css3_pr_animation-timing-function.asp" target="_blank">article</a>' ),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable On Desktop', 'thegem'),
						'param_name' => 'heading_animation_disable_desktop',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable On Tablet', 'thegem'),
						'param_name' => 'heading_animation_disable_tablet',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable On Mobile', 'thegem'),
						'param_name' => 'heading_animation_disable_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-3',
						'dependency' => array(
							'element' => 'heading_animation_type',
							'value' => 'advanced'
						),
						'group' => __('Animations', 'thegem'),
					),
				),
				$interactions,
				array(
					array(
						'type' => 'css_editor',
						'heading' => __('CSS box', 'thegem'),
						'param_name' => 'css',
						'group' => __('Design Options', 'js_composer'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on desktop', 'thegem'),
						'param_name' => 'heading_disable_desktop',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on tablet', 'thegem'),
						'param_name' => 'heading_disable_tablet',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on mobile', 'thegem'),
						'param_name' => 'heading_disable_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
				),
				$resp_options,
				$design_options
			)
		),

		'gem_project_info' => array(
			'name' => __('Project info', 'thegem'),
			'base' => 'gem_project_info',
			'is_container' => false,
			'icon' => 'thegem-icon-wpb-ui-project-info',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Project info', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Style 1', 'thegem') => '1',
						__('Style 2', 'thegem') => '2',
					)
				),
				array(
					'type' => 'param_group',
					'heading' => __( 'Items', 'thegem' ),
					'param_name' => 'values',
					'value' => urlencode(
						json_encode(
							array(
								array(
									'title' => __( 'Element', 'thegem' ),
									'decription' => '',
									'icon' => 'custom',
									'icon_pack' => 'material',
									'icon_material' => 'f287',
									'icon_color' => '',
									'label' => '1',
								),
								array(
									'title' => __( 'Element', 'thegem' ),
									'decription' => '',
									'icon' => 'custom',
									'icon_pack' => 'material',
									'icon_material' => 'f287',
									'icon_color' => '',
									'label' => '1',
								),
							)
						)
					),
					'params' => gem_project_info_dynamic_options(),
				),
			)),
		),

		'gem_portfolio' => array(
			'name' => __('Portfolio', 'thegem'),
			'base' => 'gem_portfolio',
			'icon' => 'thegem-icon-wpb-ui-portfolio',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Portfolio overview inside content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Unique Grid ID', 'thegem'),
					'param_name' => 'portfolio_uid',
					'value' => 'grid_' . substr(md5(rand()), 0, 7),
					'description' => __('In case of adding multiple product grids on the same page please ensure that each product grid has its own unique ID to avoid conflicts. ', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'save_always' => true,
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title', 'thegem'),
					'param_name' => 'portfolio_title',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Portfolios', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Portfolios & Layout', 'thegem')
				),
			),
			$portfolio_grid_source_fields,
			array(
				array(
					'type' => 'textfield',
					'heading' => __('Offset', 'thegem'),
					'param_name' => 'offset',
					'description' => __('Number of items to displace or pass over', 'thegem'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Exclude', 'thegem'),
					'param_name' => 'exclude_type',
					'value' => array(
						__('Manual Selection', 'thegem') => 'manual',
						__('Current Post', 'thegem') => 'current',
						__('Term', 'thegem') => 'term',
					),
					'std' => 'manual',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Portfolio Items', 'thegem'),
					'param_name' => 'exclude_portfolios',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'description' => __('Add portfolio by title.', 'thegem'),
					'dependency' => array(
						'element' => 'exclude_type',
						'value' => array('manual')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'autocomplete',
					'heading' => __('Exclude Portfolio Terms', 'thegem'),
					'param_name' => 'exclude_portfolio_terms',
					'settings' => array(
						'multiple' => true,
						'sortable' => true,
					),
					'description' => __('Add portfolio term by name.', 'thegem'),
					'dependency' => array(
						'element' => 'exclude_type',
						'value' => array('term')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable Link to Portfolio Page', 'thegem'),
					'param_name' => 'disable_portfolio_link',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Skin', 'thegem'),
					'param_name' => 'thegem_elementor_preset',
					'value' => array(
						__('Classic Style', 'thegem') => 'default',
						__('Alternative Style', 'thegem') => 'alternative',
					),
					'std' => 'default',
					'dependency' => array(
						'callback' => 'portfolio_skin_callback',
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_type',
					'value' => array(
						__('Grid', 'thegem') => 'grid',
						__('Creative Grid', 'thegem') => 'creative',
					),
					'std' => 'grid',
					'dependency' => array(
						'callback' => 'news_grid_style_callback'
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Desktop', 'thegem'),
					'param_name' => 'columns_desktop_creative',
					'value' => array(
						__('2x columns', 'thegem') => '2x',
						__('3x columns', 'thegem') => '3x',
						__('4x columns', 'thegem') => '4x',
						__('5x columns', 'thegem') => '5x',
						__('6x columns', 'thegem') => '6x',
						__('100% width', 'thegem') => '100%'
					),
					'std' => '4x',
					'dependency' => array(
						'element' => 'layout_type',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Desktop', 'thegem'),
					'param_name' => 'portfolio_layout',
					'value' => array(
						__('2x columns', 'thegem') => '2x',
						__('3x columns', 'thegem') => '3x',
						__('4x columns', 'thegem') => '4x',
						__('5x columns', 'thegem') => '5x',
						__('6x columns', 'thegem') => '6x',
						__('100% width', 'thegem') => '100%',
						__('1x column list', 'thegem') => '1x',
					),
					'std' => '2x',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'dependency' => array(
						'element' => 'layout_type',
						'value' => array('grid')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Tablet', 'thegem'),
					'param_name' => 'columns_tablet',
					'value' => array(
						__('1x columns', 'thegem') => '1x',
						__('2x columns', 'thegem') => '2x',
						__('3x columns', 'thegem') => '3x',
						__('4x columns', 'thegem') => '4x',
					),
					'std' => '2x',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns Mobile', 'thegem'),
					'param_name' => 'columns_mobile',
					'value' => array(
						__('1x columns', 'thegem') => '1x',
						__('2x columns', 'thegem') => '2x',
					),
					'std' => '1x',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout Version', 'thegem'),
					'param_name' => 'portfolio_layout_version',
					'value' => array(__('Fullwidth', 'thegem') => 'fullwidth', __('With Sidebar', 'thegem') => 'sidebar'),
					'dependency' => array(
						'element' => 'portfolio_layout',
						'value' => array('1x')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'portfolio_style',
					'value' => array(__('Justified Grid', 'thegem') => 'justified', __('Masonry Grid ', 'thegem') => 'masonry', __('Metro Style', 'thegem') => 'metro'),
					'dependency' => array(
						'element' => 'portfolio_layout',
						'value' => array('2x', '3x', '4x', '5x', '6x', '100%')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns 100% Width (1920x Screen)', 'thegem'),
					'param_name' => 'portfolio_fullwidth_columns',
					'value' => array(__('4 Columns', 'thegem') => '4', __('5 Columns', 'thegem') => '5'),
					'dependency' => array(
						'element' => 'portfolio_layout',
						'value' => array('100%')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
			),
			$creative_portfolio_schemes_values,
			array(
				array(
					'type' => 'checkbox',
					'heading' => __('Apply on mobiles', 'thegem'),
					'param_name' => 'scheme_apply_mobiles',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'layout_type',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Apply on tablets', 'thegem'),
					'param_name' => 'scheme_apply_tablets',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'layout_type',
						'value' => array('creative')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns 100%', 'thegem'),
					'param_name' => 'columns_100_creative',
					'value' => array(
						__('4 Columns', 'thegem') => '4',
						__('5 Columns', 'thegem') => '5',
						__('6 Columns', 'thegem') => '6',
					),
					'std' => '5',
					'dependency' => array(
						'element' => 'columns_desktop_creative',
						'value' => array('100%')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Max. row\'s height in grid (px)', 'thegem'),
					'param_name' => 'metro_max_row_height',
					'dependency' => array(
						'callback' => 'metro_max_row_height_callback'
					),
					'std' => 380,
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Image Size', 'thegem'),
					'param_name' => 'image_size',
					'value' => array(
						__('As in Grid Layout (Thumbnails)', 'thegem') => 'default',
						__('Full Size', 'thegem') => 'full',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_style',
						'value' => array('justified')
					),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Ratio', 'thegem'),
					'param_name' => 'image_ratio',
					'std' => 1,
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('full')
					),
					'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Ratio', 'thegem'),
					'param_name' => 'image_ratio_default',
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
					'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Better Thumbnails Quality', 'thegem'),
					'param_name' => 'portfolio_fullwidth_section_images',
					'value' => array(__('Yes', 'thegem') => '1'),
					'description' => __('Activate for better image quality in case of using in fullwidth section', 'thegem'),
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Position', 'thegem'),
					'param_name' => 'portfolio_caption_position',
					'value' => array(
						__('Right', 'thegem') => 'right',
						__('Left', 'thegem') => 'left',
						__('Zigzag', 'thegem') => 'zigzag',
						__('On Hover', 'thegem') => 'hover',
					),
					'dependency' => array(
						'element' => 'portfolio_layout',
						'value' => array('1x')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'image_hover_effect',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_caption_position',
						'value' => array('right', 'left', 'zigzag')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'image_hover_effect_hover',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Gradient', 'thegem') => 'gradient',
						__('Circular Overlay', 'thegem') => 'circular',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_caption_position',
						'value' => array('hover')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Caption Position', 'thegem'),
					'param_name' => 'portfolio_display_titles',
					'value' => array(
						__('Below Image', 'thegem') => 'page',
						__('On Hover', 'thegem') => 'hover',
						__('On Image', 'thegem') => 'image'
					),
					'std' => 'page',
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'portfolio_hover',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'portfolio_hover_hover',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Gradient', 'thegem') => 'gradient',
						__('Circular Overlay', 'thegem') => 'circular',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('hover')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'portfolio_hover_image',
					'value' => array(
						__('Gradient', 'thegem') => 'gradient',
						__('Circular Overlay', 'thegem') => 'circular',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'gradient',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('image')
					),
					'edit_field_class' => 'hide_on_list default_skin vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'portfolio_hover_image_alternative',
					'value' => array(
						__('Cyan Breeze', 'thegem') => 'default',
						__('Zooming White', 'thegem') => 'zooming-blur',
						__('Horizontal Sliding', 'thegem') => 'horizontal-sliding',
						__('Vertical Sliding', 'thegem') => 'vertical-sliding',
						__('Gradient', 'thegem') => 'gradient',
						__('Circular Overlay', 'thegem') => 'circular',
						__('Zoom & Overlay', 'thegem') => 'zoom-overlay',
						__('Disabled', 'thegem') => 'disabled',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('image')
					),
					'edit_field_class' => 'hide_on_list alternative_skin vc_column vc_col-sm-6',
					'description' => __('To adjust color presets for hover effects go to <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/colors/hovers" target="_blank">Theme Options -> Colors</a>.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Hover Icons', 'thegem'),
					'param_name' => 'portfolio_icons_show',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Title & Description', 'thegem'),
					'param_name' => 'sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Title', 'thegem'),
					'param_name' => 'portfolio_show_title',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Truncate Title (Lines)', 'thegem'),
					'param_name' => 'portfolio_truncate_titles',
					'std' => '',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'edit_field_class' => 'no-top-padding',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Description', 'thegem'),
					'param_name' => 'portfolio_show_description',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Truncate Description (Lines)', 'thegem'),
					'param_name' => 'portfolio_truncate_description',
					'std' => '',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Meta', 'thegem'),
					'param_name' => 'sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Date', 'thegem'),
					'param_name' => 'portfolio_show_date',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Truncate Date & Categories (Lines)', 'thegem'),
					'param_name' => 'portfolio_truncate_info',
					'std' => '',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Likes', 'thegem'),
					'param_name' => 'portfolio_likes',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable sharing buttons', 'thegem'),
					'param_name' => 'portfolio_disable_socials',
					'value' => array(__('Yes', 'thegem') => '1'),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				)
			),
			$project_additional_meta_fields_portfolio,
			$project_details_portfolio,
			$read_more_button,
			array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Items per page', 'thegem'),
					'param_name' => 'portfolio_items_per_page',
					'std' => '8',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Pagination', 'thegem'),
					'param_name' => 'portfolio_pagination',
					'value' => $portfolio_paginations,
					'save_always' => true,
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show all on load more', 'thegem'),
					'param_name' => 'load_more_show_all',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Next page preloading', 'thegem'),
					'param_name' => 'next_page_preloading',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '1',
					'description' => __('If enabled, items for the next page will be preloaded on the current page.', 'thegem'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Reduce HTML Size', 'thegem'),
					'param_name' => 'reduce_html_size',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '',
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Items on Page Load', 'thegem'),
					'param_name' => 'items_on_load',
					'std' => '8',
					'description' => __('Number of items to load on initial page load. The rest will be loaded on user scroll to reduce HTML size of the page for better pagespeed performance.', 'thegem'),
					'dependency' => array(
						'element' => 'reduce_html_size',
						'not_empty' => true,
					),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Grid Image Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Gaps', 'thegem'),
					'param_name' => 'gaps_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Desktop', 'thegem'),
					'param_name' => 'portfolio_gaps_size',
					'std' => 42,
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Tablet', 'thegem'),
					'param_name' => 'portfolio_gaps_size_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Mobile', 'thegem'),
					'param_name' => 'portfolio_gaps_size_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Image Height, px', 'thegem'),
					'param_name' => 'portfolio_image_height',
					'dependency' => array(
						'element' => 'image_size',
						'value' => array('default')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Overlay Color', 'thegem'),
					'param_name' => 'zoom_overlay_color',
					'dependency' => array(
						'element' => 'portfolio_hover',
						'value' => array('zoom-overlay')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Elements Size', 'thegem'),
					'param_name' => 'portfolio_hover_elements_size',
					'value' => array(
							__('Default', 'thegem') => 'default',
							__('Small', 'thegem') => 'small',
							__('Big', 'thegem') => 'big',
					),
					'std' => 'default',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border Radius', 'thegem'),
					'param_name' => 'image_border_radius',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Shadow', 'thegem'),
					'param_name' => 'thumb_border_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level border-top margin-top vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Enable Shadow', 'thegem'),
					'param_name' => 'enable_shadow',
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Shadow color', 'thegem'),
					'param_name' => 'shadow_color',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'std' => 'rgba(0, 0, 0, 0.15)',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'shadow_position',
					'value' => array(
						__('Outline', 'thegem') => 'outline',
						__('Inset', 'thegem') => 'inset'
					),
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-4',
					'std' => 'outline',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Horizontal', 'thegem'),
					'param_name' => 'shadow_horizontal',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '0',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Vertical', 'thegem'),
					'param_name' => 'shadow_vertical',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Blur', 'thegem'),
					'param_name' => 'shadow_blur',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Spread', 'thegem'),
					'param_name' => 'shadow_spread',
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'std' => '-5',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Apply shadow on caption container', 'thegem'),
					'param_name' => 'shadowed_container',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'enable_shadow',
						'not_empty' => true,
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Title', 'thegem'),
					'param_name' => 'title_sub_delim_head',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Style', 'thegem'),
					'param_name' => 'portfolio_title_style',
					'value' => array(__('Light', 'thegem') => 'light', __('Dark', 'thegem') => 'dark'),
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Size Preset', 'thegem'),
					'param_name' => 'portfolio_title_preset',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Title H1', 'thegem') => 'title-h1',
						__('Title H2', 'thegem') => 'title-h2',
						__('Title H3', 'thegem') => 'title-h3',
						__('Title H4', 'thegem') => 'title-h4',
						__('Title H5', 'thegem') => 'title-h5',
						__('Title H6', 'thegem') => 'title-h6',
						__('Title xLarge', 'thegem') => 'title-xlarge',
						__('Styled Subtitle', 'thegem') => 'styled-subtitle',
						__('Main Menu', 'thegem') => 'main-menu-item',
						__('Body', 'thegem') => 'text-body',
						__('Tiny Body', 'thegem') => 'text-body-tiny',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('HTML Tag', 'thegem'),
					'param_name' => 'title_tag',
					'value' => array(
						__('H1', 'thegem') => 'h1',
						__('H2', 'thegem') => 'h2',
						__('H3', 'thegem') => 'h3',
						__('H4', 'thegem') => 'h4',
						__('H5', 'thegem') => 'h5',
						__('H6', 'thegem') => 'h6',
						__('p', 'thegem') => 'p',
						__('div', 'thegem') => 'div'
					),
					'std' => 'div',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Font Transform', 'thegem'),
					'param_name' => 'portfolio_title_transform',
					'value' => array(
						__('Default', 'thegem') => '',
						__('None', 'thegem') => 'none',
						__('Lowercase', 'thegem') => 'lowercase',
						__('Uppercase', 'thegem') => 'uppercase',
						__('Capitalize', 'thegem') => 'capitalize',
					),
					'std' => '',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Font Weight', 'thegem'),
					'param_name' => 'portfolio_title_font_weight',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Thin', 'thegem') => 'light',
					),
					'std' => '',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Title Letter Spacing', 'thegem'),
					'param_name' => 'portfolio_title_letter_spacing',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Title Normal Color', 'thegem'),
					'param_name' => 'portfolio_title_color',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Title Hover Color', 'thegem'),
					'param_name' => 'portfolio_title_color_hover',
					'dependency' => array(
						'element' => 'portfolio_show_title',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Description', 'thegem'),
					'param_name' => 'description_sub_delim_head',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Description Size Preset', 'thegem'),
					'param_name' => 'portfolio_description_preset',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Title H1', 'thegem') => 'title-h1',
						__('Title H2', 'thegem') => 'title-h2',
						__('Title H3', 'thegem') => 'title-h3',
						__('Title H4', 'thegem') => 'title-h4',
						__('Title H5', 'thegem') => 'title-h5',
						__('Title H6', 'thegem') => 'title-h6',
						__('Title xLarge', 'thegem') => 'title-xlarge',
						__('Styled Subtitle', 'thegem') => 'styled-subtitle',
						__('Main Menu', 'thegem') => 'main-menu-item',
						__('Tiny', 'thegem') => 'text-body',
						__('Tiny Body', 'thegem') => 'text-body-tiny',
					),
					'std' => 'default',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_hidden_param',
					'param_name' => 'clearfix',
					'edit_field_class' => 'no-top-padding',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Description Normal Color', 'thegem'),
					'param_name' => 'portfolio_desc_color',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Description Hover Color', 'thegem'),
					'param_name' => 'portfolio_desc_color_hover',
					'dependency' => array(
						'element' => 'portfolio_show_description',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Other Elements', 'thegem'),
					'param_name' => 'other_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border Color', 'thegem'),
					'param_name' => 'portfolio_border_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Separator Color', 'thegem'),
					'param_name' => 'portfolio_separator_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Categories Normal Color', 'thegem'),
					'param_name' => 'portfolio_categories_color',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Categories Hover Color', 'thegem'),
					'param_name' => 'portfolio_categories_color_hover',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Categories "in" Text', 'thegem'),
					'param_name' => 'portfolio_categories_in_text',
					'std' => 'in',
					'dependency' => array(
						'element' => 'show_additional_meta',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Date Color', 'thegem'),
					'param_name' => 'portfolio_date_color',
					'dependency' => array(
						'element' => 'portfolio_show_date',
						'not_empty' => true
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem'),
				),
			),
			$read_more_button_style,
			$project_details_style_portfolio,
			array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Container Style', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background Style', 'thegem'),
					'param_name' => 'portfolio_background_style',
					'value' => array(
						__('White', 'thegem') => 'white',
						__('Grey', 'thegem') => 'gray',
						__('Dark', 'thegem') => 'dark',
						__('Transparent', 'thegem') => 'transparent'
					),
					'std' => 'white',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background Style', 'thegem'),
					'param_name' => 'portfolio_background_style_list',
					'value' => array(
						__('White', 'thegem') => 'white',
						__('Grey', 'thegem') => 'gray',
						__('Dark', 'thegem') => 'dark',
					),
					'std' => 'white',
					'dependency' => array(
						'element' => 'portfolio_caption_position',
						'value' => array('right', 'left', 'zigzag')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Content Alignment', 'thegem'),
					'param_name' => 'caption_container_alignment',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Left', 'thegem') => 'left',
						__('Centered', 'thegem') => 'center',
						__('Right', 'thegem') => 'right',
					),
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'portfolio_background_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color on hover', 'thegem'),
					'param_name' => 'portfolio_background_color_hover',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'edit_field_class' => 'hide_on_list vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color', 'thegem'),
					'param_name' => 'portfolio_background_color_list',
					'dependency' => array(
						'element' => 'portfolio_caption_position',
						'value' => array('right', 'left', 'zigzag')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background Color on hover', 'thegem'),
					'param_name' => 'portfolio_background_color_hover_list',
					'dependency' => array(
						'element' => 'portfolio_caption_position',
						'value' => array('right', 'left', 'zigzag')
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Caption Container Padding', 'thegem'),
					'param_name' => 'layout_delim_head_pagination_more',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Desktop Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Tablet Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right_tablet',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('Mobile Paddings', 'thegem'),
					'param_name' => 'caption_sub_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Top', 'thegem'),
					'param_name' => 'caption_padding_top_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Bottom', 'thegem'),
					'param_name' => 'caption_padding_bottom_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Left', 'thegem'),
					'param_name' => 'caption_padding_left_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Right', 'thegem'),
					'param_name' => 'caption_padding_right_mobile',
					'edit_field_class' => 'vc_column vc_col-sm-3',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Load More Button Style', 'thegem'),
					'param_name' => 'layout_delim_head_pagination_more',
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Button Text', 'thegem'),
					'param_name' => 'button_text',
					'group' => __('Style', 'thegem'),
					'std' => __('Load More', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_style',
					'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Size', 'thegem'),
					'param_name' => 'button_size',
					'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
					'std' => 'medium',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Text weight', 'thegem'),
					'param_name' => 'button_text_weight',
					'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No uppercase', 'thegem'),
					'param_name' => 'button_no_uppercase',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border radius', 'thegem'),
					'param_name' => 'button_corner',
					'std' => 25,
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border width', 'thegem'),
					'param_name' => 'button_border',
					'value' => array(1, 2, 3, 4, 5, 6),
					'std' => 2,
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'button_text_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover text color', 'thegem'),
					'param_name' => 'button_hover_text_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'button_background_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('flat')
					),
					'std' => '#00bcd5',
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background color', 'thegem'),
					'param_name' => 'button_hover_background_color',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'button_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border color', 'thegem'),
					'param_name' => 'button_hover_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Gradient Backgound Colors', 'thegem'),
					'param_name' => 'button_gradient_backgound',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background From', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_from',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background To', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'group' => __('Style', 'thegem'),
					'param_name' => 'button_gradient_backgound_to',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background From', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_hover_from',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Background To', 'thegem'),
					"edit_field_class" => "vc_col-sm-5 vc_column",
					'param_name' => 'button_gradient_backgound_hover_to',
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_gradient_backgound_style',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					"value" => array(
						__('Linear', "thegem") => "linear",
						__('Radial', "thegem") => "radial",
					) ,
					"std" => 'linear',
					'dependency' => array(
						'element' => 'button_gradient_backgound',
						'value' => array('1')
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Gradient Position', 'thegem'),
					'param_name' => 'button_gradient_radial_backgound_position',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					"value" => array(
						__('Top', "thegem") => "at top",
						__('Bottom', "thegem") => "at bottom",
						__('Right', "thegem") => "at right",
						__('Left', "thegem") => "at left",
						__('Center', "thegem") => "at center",

					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Swap Colors', 'thegem'),
					'param_name' => 'button_gradient_radial_swap_colors',
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'group' => __('Style', 'thegem'),
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'radial',
						)
					)
				),
				array(
					"type" => "dropdown",
					'heading' => __('Custom Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_angle',
					'group' => __('Style', 'thegem'),
					"edit_field_class" => "vc_col-sm-4 vc_column",
					"value" => array(
						__('Vertical to bottom ↓', "thegem") => "to bottom",
						__('Vertical to top ↑', "thegem") => "to top",
						__('Horizontal to left  →', "thegem") => "to right",
						__('Horizontal to right ←', "thegem") => "to left",
						__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
						__('Diagonal from left to top ↗', "thegem") => "to top right",
						__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
						__('Diagonal from right to top ↖', "thegem") => "to top left",
						__('Custom', "thegem") => "cusotom_deg",

					) ,
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'linear',
						)
					)
				),
				array(
					"type" => "textfield",
					'heading' => __('Angle', 'thegem'),
					'param_name' => 'button_gradient_backgound_cusotom_deg',
					'group' => __('Style', 'thegem'),
					"edit_field_class" => "vc_col-sm-4 vc_column",
					'description' => __('Set value in DG 0-360', 'thegem'),
					'dependency' => array(
						'element' => 'button_gradient_backgound_style',
						'value' => array(
							'cusotom_deg',
						)
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'button_icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
					'group' => __('Style', 'thegem'),
					'dependency' => array(
						'element' => 'portfolio_pagination',
						'value' => array('more')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('elegant')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('material')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('fontawesome')
					),
					'group' => __('Style', 'thegem'),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'button_icon_pack',
						'value' => array('thegem-header')
					),
					'group' => __('Style', 'thegem'),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
						'group' => __('Style', 'thegem'),
						'dependency' => array(
							'element' => 'portfolio_pagination',
							'value' => array('more')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Separatot Style', 'thegem'),
						'param_name' => 'button_separator',
						'value' => array(
							__('None', 'thegem') => '',
							__('Single', 'thegem') => 'single',
							__('Square', 'thegem') => 'square',
							__('Soft Double', 'thegem') => 'soft-double',
							__('Strong Double', 'thegem') => 'strong-double',
							__('Load More', 'thegem') => 'load-more'
						),
						'std' => 'load-more',
						'group' => __('Style', 'thegem'),
						'dependency' => array(
							'element' => 'portfolio_pagination',
							'value' => array('more')
						),
					),
				),
				$project_filters_portfolio,
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Loading animation', 'thegem'),
						'param_name' => 'loading_animation',
						'std' => 'move-up',
						'value' => array(
								__('Disabled', 'thegem') => 'disabled',
								__('Bounce', 'thegem') => 'bounce',
								__('Move Up', 'thegem') => 'move-up',
								__('Fade In', 'thegem') => 'fade-in',
								__('Fall Perspective', 'thegem') => 'fall-perspective',
								__('Scale', 'thegem') => 'scale',
								__('Flip', 'thegem') => 'flip'
						),
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Enable animation on mobile', 'thegem'),
						'param_name' => 'loading_animation_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'thegem_hidden_param',
						'param_name' => 'new_default_highlights',
						'std' => '1',
						'save_always' => true,
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Ignore Highlighted Items', 'thegem'),
						'param_name' => 'ignore_highlights',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '1',
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Skeleton Preloader on Grid Loading', 'thegem'),
						'param_name' => 'skeleton_loader',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'portfolio_layout',
							'value' => array('2x', '3x', '4x', '5x', '6x')
						),
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('AJAX Preloader Type', 'thegem'),
						'param_name' => 'ajax_preloader_type',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Minimal', 'thegem') => 'minimal',
						),
						'std' => 'default',
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Preloader Color', 'thegem'),
						'param_name' => 'minimal_preloader_color',
						'dependency' => array(
							'element' => 'ajax_preloader_type',
							'value' => 'minimal'
						),
						'group' => __('Additional', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable Grid\'s Bottom Margin', 'thegem'),
						'param_name' => 'disable_bottom_margin',
						'value' => array(__('Yes', 'thegem') => '1'),
						'group' => __('Additional', 'thegem')
					),
				)),
		),

		'gem_portfolio_slider' => array(
			'name' => __('Portfolio slider', 'thegem'),
			'base' => 'gem_portfolio_slider',
			'icon' => 'thegem-icon-wpb-ui-portfolio-slider',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Portfolio slider inside content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Title', 'thegem'),
					'param_name' => 'portfolio_title',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Portfolios', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Portfolios & Layout', 'thegem')
				),
			),
			$portfolio_grid_source_fields,
			array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Layout', 'thegem'),
					'param_name' => 'portfolio_layout',
					'value' => array(__('3x columns', 'thegem') => '3x', __('100% width', 'thegem') => '100%'),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns 100% Width (1920x Screen)', 'thegem'),
					'param_name' => 'portfolio_fullwidth_columns',
					'value' => array(__('3 Columns', 'thegem') => '3', __('4 Columns', 'thegem') => '4', __('5 Columns', 'thegem') => '5'),
					'std' => '4',
					'dependency' => array(
						'element' => 'portfolio_layout',
						'value' => array('100%')
					),
					'group' => __('Portfolios & Layout', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Display Titles', 'thegem'),
					'param_name' => 'portfolio_display_titles',
					'value' => array(__('On Page', 'thegem') => 'page', __('On Hover', 'thegem') => 'hover'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Hover Type', 'thegem'),
					'param_name' => 'portfolio_hover',
					'value' => array(__('Cyan Breeze', 'thegem') => 'default', __('Zooming White', 'thegem') => 'zooming-blur', __('Horizontal Sliding', 'thegem') => 'horizontal-sliding', __('Vertical Sliding', 'thegem') => 'vertical-sliding', __('Gradient', 'thegem') => 'gradient', __('Circular Overlay', 'thegem') => 'circular'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Show Date & Sets', 'thegem'),
					'param_name' => 'portfolio_show_info',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable sharing buttons', 'thegem'),
					'param_name' => 'portfolio_disable_socials',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Activate Likes', 'thegem'),
					'param_name' => 'portfolio_likes',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Appearance', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Gaps Size', 'thegem'),
					'param_name' => 'portfolio_gaps_size',
					'std' => 42,
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Background Style', 'thegem'),
					'param_name' => 'portfolio_background_style',
					'value' => array(__('White', 'thegem') => 'white', __('Grey', 'thegem') => 'gray', __('Dark', 'thegem') => 'dark'),
					'dependency' => array(
						'callback' => 'display_titles_hover_callback'
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Style', 'thegem'),
					'param_name' => 'portfolio_title_style',
					'value' => array(__('Light', 'thegem') => 'light', __('Dark', 'thegem') => 'dark'),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Arrow', 'thegem'),
					'param_name' => 'portfolio_slider_arrow',
					'value' => array(__('Big', 'thegem') => 'portfolio_slider_arrow_big', __('Small', 'thegem') => 'portfolio_slider_arrow_small'),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Colors', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background', 'thegem'),
					'param_name' => 'portfolio_background_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Bottom Border', 'thegem'),
					'param_name' => 'portfolio_bottom_border_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Project Title', 'thegem'),
					'param_name' => 'portfolio_title_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Separator', 'thegem'),
					'param_name' => 'portfolio_separator_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Project Description', 'thegem'),
					'param_name' => 'portfolio_desc_color',
					'dependency' => array(
						'element' => 'portfolio_display_titles',
						'value' => array('page')
					),
					'group' => __('Style', 'thegem')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Animation', 'thegem'),
					'param_name' => 'portfolio_slider_animation',
					'value' => array(__('Dynamic slide', 'thegem') => 'dynamic', __('One-by-one', 'thegem') => 'one'),
					'group' => __('Additional', 'thegem')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'portfolio_autoscroll',
					'group' => __('Additional', 'thegem')
				),
			)),
		),

		'gem_pricing_column' => array(
			'name' => __('Pricing Table Column', 'thegem'),
			'base' => 'gem_pricing_column',
			'icon' => 'thegem-icon-wpb-ui-pricing-column',
			'as_parent' => array('only' => 'gem_pricing_price,gem_pricing_row,gem_pricing_row_title,gem_pricing_footer'),
			'as_child' => array('only' => 'gem_pricing_table'),
			'category' => __('TheGem', 'thegem'),
			'is_container' => true,
			'js_view' => 'VcGemPricingColumnView',
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Top Choice', 'thegem'),
					'param_name' => 'top_choice',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Highlighted', 'thegem'),
					'param_name' => 'highlighted',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Column width', 'thegem'),
					'param_name' => 'cols',
					'value' => array(3, 4),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Top choice color', 'thegem'),
					'param_name' => 'top_choice_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Top choice background color', 'thegem'),
					'param_name' => 'top_choice_background_color',
				)
			)),
		),

		'gem_pricing_price' => array(
			'name' => __("Column's Header", 'thegem'),
			'base' => 'gem_pricing_price',
			'icon' => 'thegem-icon-wpb-ui-pricing-price',
			'as_child' => array('only' => 'gem_pricing_column'),
			'category' => __('TheGem', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Column title', 'thegem'),
					'param_name' => 'title',
					'value' => ''
				),
				array(
					'type' => 'textfield',
					'heading' => __('Column subtitle', 'thegem'),
					'param_name' => 'subtitle',
					'value' => ''
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Price background color ', 'thegem'),
					'param_name' => 'backgroundcolor',
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Price background image', 'thegem'),
					'param_name' => 'background',
				),

				array(
					'type' => 'textfield',
					'heading' => __('Currency', 'thegem'),
					'param_name' => 'currency',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Price', 'thegem'),
					'param_name' => 'price',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Time period', 'thegem'),
					'param_name' => 'time',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Styles', 'thegem'),
					'param_name' => 'font_size_label',
					'value' => array(__('Use default styles', 'thegem') => 'default', __('Use custom styles', 'thegem') => 'custom'),
					'dependency' => array(
						'element' => 'style',
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Set font size of the price', 'thegem'),
					'param_name' => 'font_size',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Set font size of the time', 'thegem'),
					'param_name' => 'font_size_time',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Set color for Price', 'thegem'),
					'param_name' => 'price_color',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Set color for title', 'thegem'),
					'param_name' => 'title_color',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Set color for subtitle', 'thegem'),
					'param_name' => 'subtitle_color',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Set color for time', 'thegem'),
					'param_name' => 'time_color',
					'dependency' => array(
						'element' => 'font_size_label',
						'value' => array('custom')
					),
				),
			)),
		),

		'gem_pricing_row' => array(
			'name' => __("Column's Row", 'thegem'),
			'base' => 'gem_pricing_row',
			'icon' => 'thegem-icon-wpb-ui-pricing-row',
			'as_child' => array('only' => 'gem_pricing_column'),
			'category' => __('TheGem', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textarea_html',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
					'value' => '#'
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Strike', 'thegem'),
					'param_name' => 'strike',
					'value' => array(__('Yes', 'thegem') => '1')
				),
			)),
		),
		'gem_pricing_row_title' => array(
			'name' => __("Column's Extra Title", 'thegem'),
			'base' => 'gem_pricing_row_title',
			'icon' => 'thegem-icon-wpb-ui-pricing-row-title',
			'as_child' => array('only' => 'gem_pricing_column'),
			'category' => __('TheGem', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Extra Title', 'thegem'),
					'param_name' => 'content',
					'value' => '#'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Extra Subtitle', 'thegem'),
					'param_name' => 'subtitle',
					'value' => '#'
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Extra Title Color', 'thegem'),
					'param_name' => 'title_color',

				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Extra Subtitle Color', 'thegem'),
					'param_name' => 'subtitle_color',

				),
			)),
		),
		'gem_pricing_footer' => array(
			'name' => __("Column's Footer", 'thegem'),
			'base' => 'gem_pricing_footer',
			'icon' => 'thegem-icon-wpb-ui-pricing-footer',
			'as_child' => array('only' => 'gem_pricing_column'),
			'category' => __('TheGem', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Button Text', 'thegem'),
					'param_name' => 'button_1_text',
				),
				array(
					'type' => 'vc_link',
					'heading' => __( 'URL (Link)', 'thegem' ),
					'param_name' => 'button_1_link',
					'description' => __( 'Add link to button.', 'thegem' )
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'button_1_style',
					'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Size', 'thegem'),
					'param_name' => 'button_1_size',
					'value' => array(__('Tiny', 'thegem') => 'tiny', __('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Giant', 'thegem') => 'giant'),
					'std' => 'small'
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Text weight', 'thegem'),
					'param_name' => 'button_1_text_weight',
					'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No uppercase', 'thegem'),
					'param_name' => 'button_1_no_uppercase',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border radius', 'thegem'),
					'param_name' => 'button_1_corner',
					'value' => 3,
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border width', 'thegem'),
					'param_name' => 'button_1_border',
					'value' => array(1, 2, 3, 4, 5, 6),
					'std' => 2,
					'dependency' => array(
						'element' => 'button_1_style',
						'value' => array('outline')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'button_1_text_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover text color', 'thegem'),
					'param_name' => 'button_1_hover_text_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'button_1_background_color',
					'dependency' => array(
						'element' => 'button_1_style',
						'value' => array('flat')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background color', 'thegem'),
					'param_name' => 'button_1_hover_background_color',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'button_1_border_color',
					'dependency' => array(
						'element' => 'button_1_style',
						'value' => array('outline')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border color', 'thegem'),
					'param_name' => 'button_1_hover_border_color',
					'dependency' => array(
						'element' => 'button_1_style',
						'value' => array('outline')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'button_1_icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'std' => 2,
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_1_icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'button_1_icon_pack',
						'value' => array('elegant')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_1_icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'button_1_icon_pack',
						'value' => array('material')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_1_icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'button_1_icon_pack',
						'value' => array('fontawesome')
					),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'button_1_icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'button_1_icon_pack',
						'value' => array('thegem-header')
					),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'button_1_icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'button_1_icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __( 'Icon position', 'thegem' ),
						'param_name' => 'button_1_icon_position',
						'value' => array(__( 'Left', 'thegem' ) => 'left', __( 'Right', 'thegem' ) => 'right'),
					),

				)),
		),

		'gem_pricing_table' => array(
			'name' => __('Pricing table', 'thegem'),
			'base' => 'gem_pricing_table',
			'icon' => 'thegem-icon-wpb-ui-pricing-table',
			'is_container' => true,
			'js_view' => 'VcGemPricingTableView',
			'as_parent' => array('only' => 'gem_pricing_column'),
			'category' => __('TheGem', 'thegem'),
			'description' => __('Styled pricing table', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('Style 1', 'thegem') => '1', __('Style 2', 'thegem') => '2', __('Style 3', 'thegem') => '3', __('Style 4', 'thegem') => '4', __('Style 5', 'thegem') => '5', __('Style 6', 'thegem') => '6', __('Style 7', 'thegem') => '7', __('Style 8', 'thegem') => '8')
				),
			),
			$interactions
			),
		),

		'gem_quickfinder' => array(
			'name' => __('Quickfinder', 'thegem'),
			'base' => 'gem_quickfinder',
			'icon' => 'thegem-icon-wpb-ui-quickfinder',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Quickfinder overviews inside content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Default Style', 'thegem') => 'default',
						__('Classic Box', 'thegem') => 'classic',
						__('Iconed Box', 'thegem') => 'iconed',
						__('Binded Box', 'thegem') => 'binded',
						__('Binded Iconed Boxes', 'thegem') => 'binded-iconed',
						__('Tag Box', 'thegem') => 'tag',
						__('Vertical Style 1', 'thegem') => 'vertical-1',
						__('Vertical Style 2', 'thegem') => 'vertical-2',
						__('Vertical Style 3', 'thegem') => 'vertical-3',
						__('Vertical Style 4', 'thegem') => 'vertical-4',
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Number Of Columns', 'thegem'),
					'param_name' => 'columns',
					'value' => array(1,2,3,4,6),
					'std' => 3,
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Box Style', 'thegem'),
					'param_name' => 'box_style',
					'value' => array(
						__('Solid', 'thegem') => 'solid',
						__('Soft Outlined', 'thegem') => 'soft-outlined',
						__('Strong Outlined', 'thegem') => 'strong-outlined',
					),
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Box Background Color', 'thegem'),
					'param_name' => 'box_background_color',
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Box Border Color', 'thegem'),
					'param_name' => 'box_border_color',
					'dependency' => array(
						'element' => 'box_style',
						'value' => array('soft-outlined', 'strong-outlined')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Alignment', 'thegem'),
					'param_name' => 'alignment',
					'value' => array(
						__('Centered', 'thegem') => 'center',
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right',
					),
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag', 'vertical-3')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon Position', 'thegem'),
					'param_name' => 'icon_position',
					'value' => array(
						__('Top', 'thegem') => 'top',
						__('Bottom', 'thegem') => 'bottom',
						__('Top float', 'thegem') => 'top-float',
						__('Center float', 'thegem') => 'center-float',
					),
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Title Weight', 'thegem'),
					'param_name' => 'title_weight',
					'value' => array(
						__('Bold', 'thegem') => 'bold',
						__('Thin', 'thegem') => 'thin',
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Activate Button', 'thegem'),
					'param_name' => 'activate_button',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Button Style', 'thegem'),
					'param_name' => 'button_style',
					'value' => array(__('Flat', 'thegem') => 'flat', __('Outline', 'thegem') => 'outline'),
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Button Text weight', 'thegem'),
					'param_name' => 'button_text_weight',
					'value' => array(__('Normal', 'thegem') => 'normal', __('Thin', 'thegem') => 'thin'),
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'textfield',
					'heading' => __('Button Border radius', 'thegem'),
					'param_name' => 'button_corner',
					'value' => 3,
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Button Text color', 'thegem'),
					'param_name' => 'button_text_color',
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Button Background color', 'thegem'),
					'param_name' => 'button_background_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('flat')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Button Border color', 'thegem'),
					'param_name' => 'button_border_color',
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Icon Color', 'thegem'),
					'param_name' => 'hover_icon_color',
					'group' => __('Hovers', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Box Color', 'thegem'),
					'param_name' => 'hover_box_color',
					'group' => __('Hovers', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('classic', 'iconed', 'binded', 'binded-iconed', 'tag')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Border Color', 'thegem'),
					'param_name' => 'hover_border_color',
					'group' => __('Hovers', 'thegem'),
					'dependency' => array(
						'element' => 'box_style',
						'value' => array('soft-outlined', 'strong-outlined')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Title Color', 'thegem'),
					'param_name' => 'hover_title_color',
					'group' => __('Hovers', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Description Color', 'thegem'),
					'param_name' => 'hover_description_color',
					'group' => __('Hovers', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Button Text Color', 'thegem'),
					'param_name' => 'hover_button_text_color',
					'group' => __('Hovers', 'thegem'),
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Button Background Color', 'thegem'),
					'param_name' => 'hover_button_background_color',
					'group' => __('Hovers', 'thegem'),
					'dependency' => array(
						'element' => 'activate_button',
						'not_empty' => true
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Button Border Color', 'thegem'),
					'param_name' => 'hover_button_border_color',
					'group' => __('Hovers', 'thegem'),
					'dependency' => array(
						'element' => 'button_style',
						'value' => array('outline')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Connector Color', 'thegem'),
					'param_name' => 'connector_color',
					'dependency' => array(
						'element' => 'style',
						'value' => array('vertical-1', 'vertical-2', 'vertical-3', 'vertical-4')
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Quickfinders', 'thegem'),
					'param_name' => 'quickfinders',
					'value' => thegem_vc_get_terms('thegem_quickfinders'),
					'group' =>__('Select Quickfinders', 'thegem'),
					'edit_field_class' => 'thegem-terms-checkboxes'
				),
			),
			$interactions
			),
		),

		'gem_quote' => array(
			'name' => __('Quoted text', 'thegem'),
			'base' => 'gem_quote',
			'icon' => 'thegem-icon-wpb-ui-quote',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Quoted text content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textarea_html',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Style 1', 'thegem') => '1',
						__('Style 2', 'thegem') => '2',
						__('Style 3', 'thegem') => '3',
						__('Style 4', 'thegem') => '4',
						__('Style 5', 'thegem') => '5',
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('No Paddings', 'thegem'),
					'param_name' => 'no_paddings',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Use Custom Colors', 'thegem'),
					'param_name' => 'custom_style',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Backgound color', 'thegem'),
					'param_name' => 'background_color',
					'dependency' => array(
						'element' => 'custom_style',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border color', 'thegem'),
					'param_name' => 'border_color',
					'dependency' => array(
						'element' => 'custom_style',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'text_color',
					'dependency' => array(
						'element' => 'custom_style',
						'value' => array('1')
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Quote color', 'thegem'),
					'param_name' => 'quote_color',
					'dependency' => array(
						'element' => 'custom_style',
						'value' => array('1')
					)
				),
			),
			$interactions
			),
		),

		'gem_search_form' => array(
			'name' => __('Search form', 'thegem'),
			'base' => 'gem_search_form',
			'is_container' => false,
			'icon' => 'thegem-icon-wpb-ui-search-form',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Search form', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('General', 'thegem'),
					'param_name' => 'delimiter_heading_description',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12 capitalize',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Light', 'thegem') => 'light',
						__('Dark', 'thegem') => 'dark',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Alignment', 'thegem'),
					'param_name' => 'alignment',
					'value' => array(
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right',
						__('Center', 'thegem') => 'center',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Placehoder', 'thegem'),
					'param_name' => 'placeholder',
					'std' => __('Search', 'thegem'),
                    'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Height', 'thegem'),
					'param_name' => 'height',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable Margins', 'thegem'),
					'param_name' => 'disable_margins',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => '0',
					'edit_field_class' => 'vc_column vc_col-sm-12'
				),
				array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'delimiter_heading_description',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border Width', 'thegem'),
					'param_name' => 'border_width',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Border Radius', 'thegem'),
					'param_name' => 'border_radius',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border Color', 'thegem'),
					'param_name' => 'border_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text Color', 'thegem'),
					'param_name' => 'text_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Placeholder Color', 'thegem'),
					'param_name' => 'placeholder_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Icon Color', 'thegem'),
					'param_name' => 'icon_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
				),
			)),
		),

		'gem_socials' => array(
			'name' => __('Socials', 'thegem'),
			'base' => 'gem_socials',
			'is_container' => false,
			'icon' => 'thegem-icon-wpb-ui-socials',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Socials', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Rounded', 'thegem') => 'rounded',
						__('Square', 'thegem') => 'square',
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icons color', 'thegem'),
					'param_name' => 'colored',
					'value' => array(
						__('Default', 'thegem') => 'default',
						__('Custom', 'thegem') => 'custom',
					)
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Custom color', 'thegem'),
					'param_name' => 'color',
					'dependency' => array(
						'element' => 'colored',
						'value' => 'custom'
					),
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Alignment', 'thegem'),
					'param_name' => 'alignment',
					'value' => array(
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right',
						__('Center', 'thegem') => 'center',
					)
				),
				array(
					'type' => 'textfield',
					'heading' => __('Icons size', 'thegem'),
					'param_name' => 'icons_size',
					'std' => 16
				),
				array(
					'type' => 'param_group',
					'heading' => __( 'Socials', 'thegem' ),
					'param_name' => 'socials',
					'value' => urlencode(json_encode(array(
						array(
							'social' => 'facebook',
							'url' => '#',
						),
						array(
							'social' => 'twitter',
							'url' => '#',
						),
						array(
							'social' => 'instagram',
							'url' => '#',
						),
					))),
					'params' => array_merge(array(
						array(
							'type' => 'dropdown',
							'heading' => __( 'Social', 'thegem' ),
							'param_name' => 'social',
							'value' => array_flip(apply_filters('thegem_socials_icons_list', array(
								'facebook' => 'Facebook', 'linkedin' => 'LinkedIn', 'twitter' => 'Twitter', 'instagram' => 'Instagram',
								'pinterest' => 'Pinterest', 'stumbleupon' => 'StumbleUpon', 'rss' => 'RSS',
								'vimeo' => 'Vimeo', 'youtube' => 'YouTube', 'flickr' => 'Flickr', 'tumblr' => 'Tumblr',
								'wordpress' => 'WordPress', 'dribbble' => 'Dribbble', 'deviantart' => 'DeviantArt', 'share' => 'Share',
								'myspace' => 'Myspace', 'skype' => 'Skype', 'picassa' => 'Picassa', 'googledrive' => 'Google Drive',
								'blogger' => 'Blogger', 'spotify' => 'Spotify', 'delicious' => 'Delicious', 'telegram' => 'Telegram',
								'vk' => 'VK', 'whatsapp' => 'WhatsApp', 'viber' => 'Viber', 'ok' => 'OK', 'reddit' => 'Reddit',
								'slack' => 'Slack', 'askfm' => 'ASKfm', 'meetup' => 'Meetup', 'weibo' => 'Weibo', 'qzone' => 'Qzone',
								'tiktok' => 'TikTok', 'soundcloud' => 'SoundCloud', 'discord' => 'Discord'
							)))
						),
						array(
							'type' => 'textfield',
							'heading' => __('Url', 'thegem'),
							'param_name' => 'url',
							'std' => '#'
						),
					)),
				),

			)),
		),

		'gem_video' => array(
			'name' => __('Self-Hosted Video ', 'thegem'),
			'base' => 'gem_video',
			'icon' => 'thegem-icon-wpb-ui-video',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Video content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Width', 'thegem'),
					'param_name' => 'width',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Height', 'thegem'),
					'param_name' => 'height',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'aspect_ratio',
					'value' => '16:9'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video URL in mp4 or flv format', 'thegem'),
					'param_name' => 'video_src',
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Poster Image', 'thegem'),
					'param_name' => 'image_src',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('no border', 'thegem') => 'default',
						__('8px & border', 'thegem') => '1',
						__('16px & border', 'thegem') => '2',
						__('8px outlined border', 'thegem') => '3',
						__('20px outlined border', 'thegem') => '4',
						__('20px border with shadow', 'thegem') => '5',
						__('Combined border', 'thegem') => '6',
						__('20px border radius', 'thegem') => '7',
						__('55px border radius', 'thegem') => '8',
						__('Dashed inside', 'thegem') => '9',
						__('Dashed outside', 'thegem') => '10',
						__('Rounded with border', 'thegem') => '11'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'position',
					'value' => array(__('below', 'thegem') => 'below', __('left', 'thegem') => 'left', __('right', 'thegem') => 'right')
				),
			)),
		),

		'gem_gallery' => array(
			'name' => __('Styled Gallery', 'thegem'),
			'base' => 'gem_gallery',
			'icon' => 'thegem-icon-wpb-ui-gallery',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Image gallery in different styles', 'thegem'),
			'params' => array_merge(
				$gallery_grid_source_type_fields,
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Gallery', 'thegem'),
						'param_name' => 'gallery_gallery',
						'value' => thegem_vc_get_galleries(),
						'save_always' => true,
						'dependency' => array(
							'element' => 'source_type',
							'value' => 'custom'
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Gallery Type', 'thegem'),
						'param_name' => 'gallery_type',
						'description' => __('Choose gallery type', 'thegem'),
						'value' => array(__('Slider', 'thegem') => 'slider', __('Grid', 'thegem') => 'grid')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Layout', 'thegem'),
						'param_name' => 'gallery_slider_layout',
						'value' => array(__('fullwidth', 'thegem') => 'fullwidth', __('Sidebar', 'thegem') => 'sidebar'),
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('slider')
						),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable thumbnails bar', 'thegem'),
						'param_name' => 'no_thumbs',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('slider')
						),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Pagination', 'thegem'),
						'param_name' => 'pagination',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'no_thumbs',
							'not_empty' => true
						),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Autoscroll', 'thegem'),
						'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
						'param_name' => 'autoscroll',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('slider')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Columns Desktop', 'thegem'),
						'param_name' => 'gallery_layout',
						'value' => array(
							__('2x columns', 'thegem') => '2x',
							__('3x columns', 'thegem') => '3x',
							__('4x columns', 'thegem') => '4x',
							__('5x columns', 'thegem') => '5x',
							__('6x columns', 'thegem') => '6x',
							__('100% width', 'thegem') => '100%',
						),
						'std' => '2x',
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'dependency' => array(
							'element' => 'layout_type',
							'value' => array('grid')
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Columns Tablet', 'thegem'),
						'param_name' => 'columns_tablet',
						'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
							__('3x columns', 'thegem') => '3x',
							__('4x columns', 'thegem') => '4x',
						),
						'std' => '2x',
						'edit_field_class' => 'vc_column vc_col-sm-4'
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Columns Mobile', 'thegem'),
						'param_name' => 'columns_mobile',
						'value' => array(
							__('1x columns', 'thegem') => '1x',
							__('2x columns', 'thegem') => '2x',
						),
						'std' => '1x',
						'edit_field_class' => 'vc_column vc_col-sm-4'
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Style', 'thegem'),
						'param_name' => 'gallery_style',
						'description' => __('Choose gallery style', 'thegem'),
						'value' => array(__('Justified Grid', 'thegem') => 'justified', __('Masonry Grid', 'thegem') => 'masonry', __('Metro Style', 'thegem') => 'metro'),
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Columns 100% Width (1920x Screen)', 'thegem'),
						'param_name' => 'gallery_fullwidth_columns',
						'value' => array(__('4 Columns', 'thegem') => '4', __('5 Columns', 'thegem') => '5'),
						'dependency' => array(
							'element' => 'gallery_layout',
							'value' => array('100%')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Image Size', 'thegem'),
						'param_name' => 'image_size',
						'value' => array(
							__('As in Grid Layout (Thumbnails)', 'thegem') => 'default',
							__('Full Size', 'thegem') => 'full',
						),
						'std' => 'default',
						'dependency' => array(
							'element' => 'gallery_style',
							'value' => array('justified')
						),
						'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Image Ratio', 'thegem'),
						'param_name' => 'image_ratio',
						'std' => 1,
						'dependency' => array(
							'element' => 'image_size',
							'value' => array('full')
						),
						'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
						'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Image Ratio', 'thegem'),
						'param_name' => 'image_ratio_default',
						'dependency' => array(
							'element' => 'image_size',
							'value' => array('default')
						),
						'description' => __('Specify a decimal value, i.e. instead of 3:4, specify 0.75. Use a dot as a decimal separator. Leave blank to show the original image ratio', 'thegem'),
						'edit_field_class' => 'image_size vc_column vc_col-sm-6',
					),
					array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __('Gaps', 'thegem'),
						'param_name' => 'gaps_sub_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Desktop', 'thegem'),
						'param_name' => 'gaps_size',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
						'std' => 42,
						'edit_field_class' => 'vc_column vc_col-sm-4',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Tablet', 'thegem'),
						'param_name' => 'gaps_size_tablet',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
						'std' => 42,
						'edit_field_class' => 'vc_column vc_col-sm-4',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Mobile', 'thegem'),
						'param_name' => 'gaps_size_mobile',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
						'std' => 42,
						'edit_field_class' => 'vc_column vc_col-sm-4',
					),
					// array(
					// 	'type' => 'checkbox',
					// 	'heading' => __('No Gaps', 'thegem'),
					// 	'param_name' => 'gallery_no_gaps',
					// 	'value' => array(__('Yes', 'thegem') => '1'),
					// 	'dependency' => array(
					// 		'element' => 'gallery_type',
					// 		'value' => array('grid')
					// 	),
					// ),
					array(
						'type' => 'dropdown',
						'heading' => __('Hover Type', 'thegem'),
						'param_name' => 'gallery_hover',
						'value' => array(__('Cyan Breeze', 'thegem') => 'default', __('Zooming White', 'thegem') => 'zooming-blur', __('Horizontal Sliding', 'thegem') => 'horizontal-sliding', __('Vertical Sliding', 'thegem') => 'vertical-sliding', __('Gradient', 'thegem') => 'gradient', __('Circular Overlay', 'thegem') => 'circular')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Border Style', 'thegem'),
						'param_name' => 'gallery_item_style',
						'value' => array(
							__('no border', 'thegem') => 'default',
							__('8px & border', 'thegem') => '1',
							__('16px & border', 'thegem') => '2',
							__('8px outlined border', 'thegem') => '3',
							__('20px outlined border', 'thegem') => '4',
							__('20px border with shadow', 'thegem') => '5',
							__('Combined border', 'thegem') => '6',
							__('20px border radius', 'thegem') => '7',
							__('55px border radius', 'thegem') => '8',
							__('Dashed inside', 'thegem') => '9',
							__('Dashed outside', 'thegem') => '10',
							__('Rounded with border', 'thegem') => '11'
						),
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Title', 'thegem'),
						'param_name' => 'gallery_title',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Loading animation', 'thegem'),
						'param_name' => 'loading_animation',
						'std' => 'move-up',
						'value' => array(__('Disabled', 'thegem') => 'disabled', __('Bounce', 'thegem') => 'bounce', __('Move Up', 'thegem') => 'move-up', __('Fade In', 'thegem') => 'fade-in', __('Fall Perspective', 'thegem') => 'fall-perspective', __('Scale', 'thegem') => 'scale', __('Flip', 'thegem') => 'flip'),
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Max. row\'s height in grid (px)', 'thegem'),
						'param_name' => 'metro_max_row_height',
						'dependency' => array(
							'callback' => 'metro_max_row_height_callback'
						),
						'std' => 380,
					),
					array(
						'type' => 'thegem_hidden_param',
						'param_name' => 'new_default_highlights',
						'std' => '1',
						'save_always' => true,
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Ignore Highlighted Images', 'thegem'),
						'param_name' => 'gallery_ignore_highlights',
						'value' => array(__('Yes', 'thegem') => '1'),
						'std' => '1',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Better Thumbnails Quality', 'thegem'),
						'param_name' => 'fullwidth_section_images',
						'value' => array(__('Yes', 'thegem') => '1'),
						'description' => __('Activate for better image quality in case of using in fullwidth section', 'thegem'),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'dependency' => array(
							'element' => 'gallery_type',
							'value' => array('grid')
						),
					),
				)
			),
		),

		'gem_image' => array(
			'name' => __('Styled Image', 'thegem'),
			'base' => 'gem_image',
			'icon' => 'thegem-icon-wpb-ui-image',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Image in different styles', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Width', 'thegem'),
					'param_name' => 'width',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Height', 'thegem'),
					'param_name' => 'height',
				),
				array(
					'type' => 'attach_image',
					'heading' => __('Src', 'thegem'),
					'param_name' => 'src',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Alt text', 'thegem'),
					'param_name' => 'alt',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('no border', 'thegem') => 'default',
						__('8px & border', 'thegem') => '1',
						__('16px & border', 'thegem') => '2',
						__('8px outlined border', 'thegem') => '3',
						__('20px outlined border', 'thegem') => '4',
						__('20px border with shadow', 'thegem') => '5',
						__('Combined border', 'thegem') => '6',
						__('20px border radius', 'thegem') => '7',
						__('55px border radius', 'thegem') => '8',
						__('Dashed inside', 'thegem') => '9',
						__('Dashed outside', 'thegem') => '10',
						__('Rounded with border', 'thegem') => '11',
						__('Rounded without border', 'thegem') => '14'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'position',
					'value' => array(__('below', 'thegem') => 'below', __('centered', 'thegem') => 'centered', __('left', 'thegem') => 'left', __('right', 'thegem') => 'right')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Disable lightbox', 'thegem'),
					'param_name' => 'disable_lightbox',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
			),
			$interactions
			),
		),

		'gem_list' => array(
			'name' => __('Styled List', 'thegem'),
			'base' => 'gem_list',
			'class' => 'gem_list',
			'icon' => 'thegem-icon-wpb-ui-list',
			'category' => __('TheGem', 'thegem'),

			'description' => __('List in different styles', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Type', 'thegem'),
					'param_name' => 'type',
					'value' => array(__('Default', 'thegem') => '', __('Arrow', 'thegem') => 'arrow', __('Double arrow', 'thegem') => 'double-arrow',__('Check style 1', 'thegem') => 'check-style-1', __('Check style 2', 'thegem') => 'check-style-2', __('Disc style 1', 'thegem') => 'disc-style-1', __('Disc style 2', 'thegem') => 'disc-style-2', __('Checkbox', 'thegem') => 'checkbox', __('Cross', 'thegem') => 'cross', __('Snowflake style 1', 'thegem') => 'snowflake-style-1', __('Snowflake style 2', 'thegem') => 'snowflake-style-2', __('Square', 'thegem') => 'square', __('Star', 'thegem') => 'star', __('Plus', 'thegem') => 'plus', __('Label', 'thegem') => 'Label')
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Color', 'thegem'),
					'param_name' => 'color',
					'param_holder_class' => 'gem-colored-dropdown',
					'value' => array(
						__('Default Gray', 'thegem') => '',
						__('Aubergine', 'thegem') => '1',
						__('Teal', 'thegem') => '2',
						__('Cyan', 'thegem') => '3',
						__('Amber', 'thegem') => '4',
						__('Red', 'thegem') => '5',
						__('Deep Purple', 'thegem') => '6',
						__('Purple', 'thegem') => '7',
						__('Brown', 'thegem') => '8',
						__('Light Red ', 'thegem') => '9',
						__('Dark Pink', 'thegem') => '10',
						__('Lime', 'thegem') => '11',
						__('White', 'thegem') => '12',
						__('Lime', 'thegem') => '13'
					)
				),
				array(
					'type' => 'textarea_html',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
					'value' => '<ul>'."\n".'<li>'.__('Element 1', 'thegem').'</li>'."\n".'<li>'.__('Element 2', 'thegem').'</li>'."\n".'<li>'.__('Element 3', 'thegem').'</li>'."\n".'</ul>'
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Lazy loading enabled', 'thegem'),
					'param_name' => 'effects_enabled',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Animation delay (ms)', 'thegem'),
					'param_name' => 'effects_enabled_delay',
					'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
				),
			)),
		),

		'gem_template' => array(
			'name' => __('Global Section', 'thegem'),
			'base' => 'gem_template',
			'icon' => 'thegem-icon-wpb-ui-template',
			'category' => __('TheGem', 'thegem'),
			'params' => count(thegem_get_section_templates_list()) ? array(
				array(
					'type' => 'dropdown',
					'heading' => __('Template', 'thegem'),
					'param_name' => 'id',
					'value' => array_flip(thegem_get_section_templates_list()),
					'description' => '<a href="'.add_query_arg(array('post_type' => 'thegem_templates', 'templates_type' => 'content'), admin_url( 'edit.php' )).'" target="_blank">'.__('Edit global section', 'thegem').'</a>',
				),
			) : array(
				array(
					'type' => 'custom_markup',
					'param_name' => 'empty_output',
					'value' => '<p><b>'.esc_html__('No Global Sections Found', 'thegem').'</b></p>'.
						'<p>'.sprintf(__('To create new global section go to <a href="%s" target="_blank">TheGem Templates Builder &rarr; Global Sections</a>', 'thegem'), add_query_arg(array('post_type' => 'thegem_templates', 'templates_type' => 'content'), admin_url( 'edit.php' )).'#open-modal').'</p>'.
						'<p>'.sprintf(__('Check <a href="%s" target="_blank">documentation</a>', 'thegem'), 'https://codex-themes.com/thegem/documentation/section-template/').'</p>',
				),
			),
		),

		'gem_table' => array(
			'name' => __('Table', 'thegem'),
			'base' => 'gem_table',
			'icon' => 'thegem-icon-wpb-ui-table',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Styled table content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(__('style-1', 'thegem') => '1', __('style-2', 'thegem') => '2', __('style-3', 'thegem') => '3')
				),
				array(
					'type' => 'textarea_html',
					'heading' => __('Content', 'thegem'),
					'param_name' => 'content',
					'value' => '<table style="width: 100%;">'."\n".
						'<thead><tr><th><h6>'.__('Title 1', 'thegem').'</h6></th><th><h6>'.__('Title 2', 'thegem').'</h6></th><th><h6>'.__('Title 3', 'thegem').'</h6></th></tr></thead>'."\n".
						'<tbody>'."\n".
						'<tr><td>'.__('Content 1 1', 'thegem').'</td><td>'.__('Content 1 2', 'thegem').'</td><td>'.__('Content 1 3', 'thegem').'</td></tr>'."\n".
						'<tr><td>'.__('Content 2 1', 'thegem').'</td><td>'.__('Content 2 2', 'thegem').'</td><td>'.__('Content 2 3', 'thegem').'</td></tr>'."\n".
						'<tr><td>'.__('Content 3 1', 'thegem').'</td><td>'.__('Content 3 2', 'thegem').'</td><td>'.__('Content 3 3', 'thegem').'</td></tr>'."\n".
						'</tbody></table>',
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Row Headers For Responsive', 'thegem'),
					'param_name' => 'row_headers',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Deactivate Responsive Style', 'thegem'),
					'param_name' => 'deactivate_responsive',
					'value' => array(__('Yes', 'thegem') => '1')
				),
			)),
		),

		'gem_team' => array(
			'name' => __('Team', 'thegem'),
			'base' => 'gem_team',
			'icon' => 'thegem-icon-wpb-ui-team',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Team overview inside content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Style 1', 'thegem') => '1',
						__('Style 2', 'thegem') => '2',
						__('Style 3', 'thegem') => '3',
						__('Style 4', 'thegem') => '4',
						__('Style 5', 'thegem') => '5',
						__('Style 6', 'thegem') => '6',
					)
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Centered', 'thegem'),
					'param_name' => 'centered',
					'value' => array(__('Yes', 'thegem') => '1'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('4')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background', 'thegem'),
					'param_name' => 'background_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover background', 'thegem'),
					'param_name' => 'hover_background_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Border', 'thegem'),
					'param_name' => 'border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('2','3','4')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover border', 'thegem'),
					'param_name' => 'hover_border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('2','3','4')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Bottom Solid Border', 'thegem'),
					'param_name' => 'bottom_border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('4')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Bottom Solid Border', 'thegem'),
					'param_name' => 'hover_bottom_border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('4')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Image Outline Border', 'thegem'),
					'param_name' => 'image_border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('5')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover Image Border', 'thegem'),
					'param_name' => 'hover_image_border_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('5')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Name', 'thegem'),
					'param_name' => 'name_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover name', 'thegem'),
					'param_name' => 'hover_name_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'position_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover position', 'thegem'),
					'param_name' => 'hover_position_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Description color', 'thegem'),
					'param_name' => 'desc_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('5')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover description color', 'thegem'),
					'param_name' => 'hover_desc_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('5')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Telephone', 'thegem'),
					'param_name' => 'tel_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Hover telephone', 'thegem'),
					'param_name' => 'hover_tel_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('E-Mail', 'thegem'),
					'param_name' => 'mail_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Social Icons', 'thegem'),
					'param_name' => 'socials_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Teams', 'thegem'),
					'param_name' => 'team',
					'value' => thegem_vc_get_terms('thegem_teams'),
					'group' =>__('Select Teams', 'thegem'),
					'edit_field_class' => 'thegem-terms-checkboxes'
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Columns', 'thegem'),
					'param_name' => 'columns',
					'value' => array(1, 2, 3, 4),
					'std' => 3
				),
			),
			$interactions
			),
		),

		'gem_testimonials' => array(
			'name' => __('Testimonials', 'thegem'),
			'base' => 'gem_testimonials',
			'icon' => 'thegem-icon-wpb-ui-testimonials',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Testimonials', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Style 1', 'thegem') => 'style1',
						__('Style 2', 'thegem') => 'style2'
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Background color', 'thegem'),
					'param_name' => 'background_color',
					'group' => __('Colors', 'thegem'),
					'dependency' => array(
						'element' => 'style',
						'value' => array('style2')
					),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Name color', 'thegem'),
					'param_name' => 'name_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Company color', 'thegem'),
					'param_name' => 'company_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Position color', 'thegem'),
					'param_name' => 'position_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => 'text_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'colorpicker',
					'heading' => __('Quote color', 'thegem'),
					'param_name' => 'quote_color',
					'group' => __('Colors', 'thegem'),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Testimonials Sets', 'thegem'),
					'param_name' => 'set',
					'value' => thegem_vc_get_terms('thegem_testimonials_sets'),
					'group' =>__('Select Testimonials Sets', 'thegem'),
					'edit_field_class' => 'thegem-terms-checkboxes'
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Image Size', 'thegem'),
					'param_name' => 'image_size',
					'value' => array(
						__('Small', 'thegem') => 'size-small',
						__('Medium', 'thegem') => 'size-medium',
						__('Large', 'thegem') => 'size-large',
						__('Xlarge', 'thegem') => 'size-xlarge'
					),
				),
				array(
					'type' => 'checkbox',
					'heading' => __('Fullwidth', 'thegem'),
					'param_name' => 'fullwidth',
					'value' => array(__('Yes', 'thegem') => '1')
				),
				array(
					'type' => 'textfield',
					'heading' => __('Autoscroll', 'thegem'),
					'description' => __('Speed in Milliseconds, example - 5000', 'thegem'),
					'param_name' => 'autoscroll',
				),
			)),
		),

		'gem_textbox' => array(
			'name' => __('Styled Textbox', 'thegem'),
			'base' => 'gem_textbox',
			'is_container' => true,
			'js_view' => 'VcGemTextboxView',
			'icon' => 'thegem-icon-wpb-ui-textbox',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Customizable block of text', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'dropdown',
					'heading' => __('Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('Default / No Title ', 'thegem') => 'default',
						__('With Title Area', 'thegem') => 'title',
						__('Picturebox ', 'thegem') => 'picturebox',
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Icon pack', 'thegem'),
					'param_name' => 'icon_pack',
					'value' => array_merge(array(__('Elegant', 'thegem') => 'elegant', __('Material Design', 'thegem') => 'material', __('FontAwesome', 'thegem') => 'fontawesome', __('Header Icons', 'thegem') => 'thegem-header'), thegem_userpack_to_dropdown()),
					'dependency' => array(
						'element' => 'style',
						'value' => array('title')
					),
					'group' => __( 'Title', 'thegem' ),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_elegant',
					'icon_pack' => 'elegant',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('elegant')
					),
					'group' => __( 'Title', 'thegem' ),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_material',
					'icon_pack' => 'material',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('material')
					),
					'group' => __( 'Title', 'thegem' ),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_fontawesome',
					'icon_pack' => 'fontawesome',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('fontawesome')
					),
					'group' => __( 'Title', 'thegem' ),
				),
				array(
					'type' => 'thegem_icon',
					'heading' => __('Icon', 'thegem'),
					'param_name' => 'icon_thegem_header',
					'icon_pack' => 'thegem-header',
					'dependency' => array(
						'element' => 'icon_pack',
						'value' => array('thegem-header')
					),
					'group' => __( 'Title', 'thegem' ),
				),
			),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'icon_pack',
							'value' => array('userpack')
						),
					),
				)),
				array(
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Shape', 'thegem'),
						'param_name' => 'icon_shape',
						'value' => array(__('Square', 'thegem') => 'square', __('Circle', 'thegem') => 'circle', __('Rhombus', 'thegem') => 'romb', __('Hexagon', 'thegem') => 'hexagon'),
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Style', 'thegem'),
						'param_name' => 'icon_style',
						'value' => array(__('Default', 'thegem') => '', __('45 degree Right', 'thegem') => 'angle-45deg-r', __('45 degree Left', 'thegem') => 'angle-45deg-l', __('90 degree', 'thegem') => 'angle-90deg'),
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color', 'thegem'),
						'param_name' => 'icon_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Color 2', 'thegem'),
						'param_name' => 'icon_color_2',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Background Color', 'thegem'),
						'param_name' => 'icon_background_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Icon Border Color', 'thegem'),
						'param_name' => 'icon_border_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'edit_field_class' => 'vc_col-sm-6 vc_column',
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon Size', 'thegem'),
						'param_name' => 'icon_size',
						'value' => array(__('Small', 'thegem') => 'small', __('Medium', 'thegem') => 'medium', __('Large', 'thegem') => 'large', __('Extra Large', 'thegem') => 'xlarge'),
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'textarea_raw_html',
						'heading' => __('Title Area Content', 'thegem'),
						'param_name' => 'title_content',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Title Text Color', 'thegem'),
						'param_name' => 'title_text_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Title Background Color', 'thegem'),
						'param_name' => 'title_background_color',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Title Area Top Padding', 'thegem'),
						'param_name' => 'title_padding_top',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'textfield',
						'heading' => __('Title Area Bottom Padding', 'thegem'),
						'param_name' => 'title_padding_bottom',
						'dependency' => array(
							'element' => 'style',
							'value' => array('title')
						),
						'group' => __( 'Title', 'thegem' ),
					),
					array(
						'type' => 'attach_image',
						'heading' => __('Choose Image', 'thegem'),
						'param_name' => 'picture',
						'dependency' => array(
							'element' => 'style',
							'value' => array('picturebox')
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Image position', 'thegem'),
						'param_name' => 'picture_position',
						'value' => array(
							__('Top', 'thegem') => 'top',
							__('Bottom', 'thegem') => 'bottom',
						),
						'dependency' => array(
							'element' => 'style',
							'value' => array('picturebox')
						),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Disable Lightbox', 'thegem'),
						'param_name' => 'disable_lightbox',
						'value' => array(__('Yes', 'thegem') => '1'),
						'dependency' => array(
							'element' => 'style',
							'value' => array('picturebox')
						),
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Content Text Color', 'thegem'),
						'param_name' => 'content_text_color',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Content Background Color', 'thegem'),
						'param_name' => 'content_background_color',
						'std' => '#f4f6f7',
					),
					array(
						'type' => 'attach_image',
						'heading' => __('Content Background Image', 'thegem'),
						'param_name' => 'content_background_image',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Overlay Color', 'thegem'),
						'param_name' => 'content_background_overlay_color',
						'dependency' => array(
							'element' => 'content_background_image',
							'not_empty' => true
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background style', 'thegem'),
						'param_name' => 'content_background_style',
						'value' => array(
							__('Default', 'thegem') => '',
							__('Cover', 'thegem') => 'cover',
							__('Contain', 'thegem') => 'contain',
							__('No Repeat', 'thegem') => 'no-repeat',
							__('Repeat', 'thegem') => 'repeat'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background horizontal position', 'thegem'),
						'param_name' => 'content_background_position_horizontal',
						'value' => array(
							__('Center', 'thegem') => 'center',
							__('Left', 'thegem') => 'left',
							__('Right', 'thegem') => 'right'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Background vertical position', 'thegem'),
						'param_name' => 'content_background_position_vertical',
						'value' => array(
							__('Top', 'thegem') => 'top',
							__('Center', 'thegem') => 'center',
							__('Bottom', 'thegem') => 'bottom'
						)
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding top', 'thegem'),
						'param_name' => 'padding_top',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding bottom', 'thegem'),
						'param_name' => 'padding_bottom',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding left', 'thegem'),
						'param_name' => 'padding_left',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Padding right', 'thegem'),
						'param_name' => 'padding_right',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'border_color',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border Width', 'thegem'),
						'param_name' => 'border_width',
					),
					array(
						'type' => 'textfield',
						'heading' => __('Border Radius', 'thegem'),
						'param_name' => 'border_radius',
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Rectangle Corner', 'thegem'),
						'param_name' => 'rectangle_corner',
						'value' => array(
							__('Left Top', 'thegem') => 'lt',
							__('Right Top', 'thegem') => 'rt',
							__('Right Bottom', 'thegem') => 'rb',
							__('Left Bottom', 'thegem') => 'lb'
						)
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Top Arеа Style', 'thegem'),
						'param_name' => 'top_style',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Flag', 'thegem') => 'flag',
							__('Shield', 'thegem') => 'shield',
							__('Ticket', 'thegem') => 'ticket',
							__('Sentence', 'thegem') => 'sentence',
							__('Note 1', 'thegem') => 'note-1',
							__('Note 2', 'thegem') => 'note-2',
						),
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Bottom Arеа Style', 'thegem'),
						'param_name' => 'bottom_style',
						'value' => array(
							__('Default', 'thegem') => 'default',
							__('Flag', 'thegem') => 'flag',
							__('Shield', 'thegem') => 'shield',
							__('Ticket', 'thegem') => 'ticket',
							__('Sentence', 'thegem') => 'sentence',
							__('Note 1', 'thegem') => 'note-1',
							__('Note 2', 'thegem') => 'note-2',
						),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Centered', 'thegem'),
						'param_name' => 'centered',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Lazy loading enabled', 'thegem'),
						'param_name' => 'effects_enabled',
						'value' => array(__('Yes', 'thegem') => '1')
					),
					array(
						'type' => 'textfield',
						'heading' => __('Animation delay (ms)', 'thegem'),
						'param_name' => 'effects_enabled_delay',
						'dependency' => array('element' => 'effects_enabled', 'not_empty' => true),
					),
				),
			$interactions
			),
		),

		/*'gem_wc_hook' => array(
			'name' => __('WooCommerce Hook', 'thegem'),
			'base' => 'gem_wc_hook',
			'icon' => 'thegem-icon-wpb-ui-wc-hook',
			'category' => __('TheGem', 'thegem'),
			'params' => array(
				array(
					'heading' => __( 'Hook', 'thegem' ),
					'description' => __( 'Select which PHP hook do you want to display here.', 'thegem' ),
					'type' => 'dropdown',
					'param_name' => 'hook',
					'value' => array(
						esc_html__( 'Select', 'thegem' ) => 0,
						'woocommerce_before_single_product' => 'woocommerce_before_single_product',
						'woocommerce_before_single_product_summary' => 'woocommerce_before_single_product_summary',
						'woocommerce_product_thumbnails' => 'woocommerce_product_thumbnails',
						'woocommerce_single_product_summary' => 'woocommerce_single_product_summary',
						'woocommerce_before_add_to_cart_form' => 'woocommerce_before_add_to_cart_form',
						'woocommerce_before_variations_form' => 'woocommerce_before_variations_form',
						'woocommerce_before_add_to_cart_button' => 'woocommerce_before_add_to_cart_button',
						'woocommerce_before_single_variation' => 'woocommerce_before_single_variation',
						'woocommerce_single_variation' => 'woocommerce_single_variation',
						'woocommerce_after_single_variation' => 'woocommerce_after_single_variation',
						'woocommerce_after_add_to_cart_button' => 'woocommerce_after_add_to_cart_button',
						'woocommerce_after_variations_form' => 'woocommerce_after_variations_form',
						'woocommerce_after_add_to_cart_form' => 'woocommerce_after_add_to_cart_form',
						'woocommerce_product_meta_start' => 'woocommerce_product_meta_start',
						'woocommerce_product_meta_end' => 'woocommerce_product_meta_end',
						'woocommerce_share' => 'woocommerce_share',
						'woocommerce_after_single_product_summary' => 'woocommerce_after_single_product_summary',
						'woocommerce_after_single_product' => 'woocommerce_after_single_product',

						'woocommerce_before_cart' => 'woocommerce_before_cart',
						'woocommerce_after_cart_table' => 'woocommerce_after_cart_table',
						'woocommerce_cart_collaterals' => 'woocommerce_cart_collaterals',
						'woocommerce_after_cart' => 'woocommerce_after_cart',

						'woocommerce_before_checkout_form' => 'woocommerce_before_checkout_form',
						'woocommerce_checkout_before_customer_details' => 'woocommerce_checkout_before_customer_details',
						'woocommerce_checkout_after_customer_details' => 'woocommerce_checkout_after_customer_details',
						'woocommerce_checkout_billing' => 'woocommerce_checkout_billing',
						'woocommerce_checkout_shipping' => 'woocommerce_checkout_shipping',
						'woocommerce_checkout_before_order_review_heading' => 'woocommerce_checkout_before_order_review_heading',
						'woocommerce_checkout_before_order_review' => 'woocommerce_checkout_before_order_review',
						'woocommerce_checkout_order_review' => 'woocommerce_checkout_order_review',
						'woocommerce_checkout_after_order_review' => 'woocommerce_checkout_after_order_review',
						'woocommerce_after_checkout_form' => 'woocommerce_after_checkout_form',
					),
				),

				array(
					'heading' => __( 'Clean actions', 'thegem' ),
					'description' => __( 'You can clean all default WooCommerce PHP functions hooked to this action.', 'thegem' ),
					'type' => 'checkbox',
					'param_name' => 'clean_actions',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => 1,
				),
			),
		),*/

		'gem_youtube' => array(
			'name' => __('Youtube', 'thegem'),
			'base' => 'gem_youtube',
			'icon' => 'thegem-icon-wpb-ui-youtube',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Youtube video content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Width', 'thegem'),
					'param_name' => 'width',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Height', 'thegem'),
					'param_name' => 'height',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'aspect_ratio',
					'value' => '16:9'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video_id', 'thegem'),
					'param_name' => 'video_id',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('no border', 'thegem') => 'default',
						__('8px & border', 'thegem') => '1',
						__('16px & border', 'thegem') => '2',
						__('8px outlined border', 'thegem') => '3',
						__('20px outlined border', 'thegem') => '4',
						__('20px border with shadow', 'thegem') => '5',
						__('Combined border', 'thegem') => '6',
						__('20px border radius', 'thegem') => '7',
						__('55px border radius', 'thegem') => '8',
						__('Dashed inside', 'thegem') => '9',
						__('Dashed outside', 'thegem') => '10',
						__('Rounded with border', 'thegem') => '11'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'position',
					'value' => array(__('below', 'thegem') => 'below', __('left', 'thegem') => 'left', __('right', 'thegem') => 'right')
				),
			)),
		),

		'gem_vimeo' => array(
			'name' => __('Vimeo', 'thegem'),
			'base' => 'gem_vimeo',
			'icon' => 'thegem-icon-wpb-ui-vimeo',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Vimeo video content', 'thegem'),
			'params' => array_merge(array(
				array(
					'type' => 'textfield',
					'heading' => __('Width', 'thegem'),
					'param_name' => 'width',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Height', 'thegem'),
					'param_name' => 'height',
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'aspect_ratio',
					'value' => '16:9'
				),
				array(
					'type' => 'textfield',
					'heading' => __('Video id', 'thegem'),
					'param_name' => 'video_id',
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Border Style', 'thegem'),
					'param_name' => 'style',
					'value' => array(
						__('no border', 'thegem') => 'default',
						__('8px & border', 'thegem') => '1',
						__('16px & border', 'thegem') => '2',
						__('8px outlined border', 'thegem') => '3',
						__('20px outlined border', 'thegem') => '4',
						__('20px border with shadow', 'thegem') => '5',
						__('Combined border', 'thegem') => '6',
						__('20px border radius', 'thegem') => '7',
						__('55px border radius', 'thegem') => '8',
						__('Dashed inside', 'thegem') => '9',
						__('Dashed outside', 'thegem') => '10',
						__('Rounded with border', 'thegem') => '11'
					)
				),
				array(
					'type' => 'dropdown',
					'heading' => __('Position', 'thegem'),
					'param_name' => 'position',
					'value' => array(__('below', 'thegem') => 'below', __('left', 'thegem') => 'left', __('right', 'thegem') => 'right')
				),
			)),
		),

        'gem_social_sharing' => array(
	        'name' => __('Social Sharing', 'thegem'),
	        'base' => 'gem_social_sharing',
	        'icon' => 'thegem-icon-wpb-ui-socials-sharing',
	        'category' => __('TheGem', 'thegem'),
	        'description' => __('Social Sharing', 'thegem'),
	        'params' => array_merge(
                array(
                    array(
                        'type' => 'dropdown',
                        'heading' => __('Alignment', 'thegem'),
                        'param_name' => 'alignment',
                        'value' => array_merge(array(
                                __('Left', 'thegem') => 'left',
                                __('Center', 'thegem') => 'center',
                                __('Right', 'thegem') => 'right',
                                __('Justified', 'thegem') => 'justified',
                            )
                        ),
                        'std' => 'left',
                        'edit_field_class' => 'vc_column vc_col-sm-12',
	                    'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'dropdown',
                        'heading' => __('Icons Type', 'thegem'),
                        'param_name' => 'icons_type',
                        'value' => array(
                            __('Simple', 'thegem') => 'simple',
                            __('Round Border', 'thegem') => 'round',
                            __('Square Border', 'thegem') => 'square',
                        ),
                        'std' => 'simple',
                        'edit_field_class' => 'vc_column vc_col-sm-12',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Spacing Horizontal', 'thegem'),
                        'param_name' => 'icons_spacing_horizontal',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Spacing Vertical', 'thegem'),
                        'param_name' => 'icons_spacing_vertical',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'dropdown',
                        'heading' => __('Icons Size', 'thegem'),
                        'param_name' => 'icons_size',
                        'value' => array(
                            __('Tiny', 'thegem') => 'tiny',
                            __('Small', 'thegem') => 'small',
                            __('Medium', 'thegem') => 'medium',
                            __('Large', 'thegem') => 'large',
                            __('Extra Large', 'thegem') => 'xlarge',
                            __('Custom', 'thegem') => 'custom'
                        ),
                        'std' => 'tiny',
                        'edit_field_class' => 'vc_column vc_col-sm-12',
	                    'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Icons Custom Size', 'thegem'),
                        'param_name' => 'icons_size_custom',
                        'dependency' => array(
                            'element' => 'icons_size',
                            'value' => 'custom'
                        ),
                        'std' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-12',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'thegem_delimeter_heading',
                        'heading' => __('Icons', 'thegem'),
                        'param_name' => 'layout_delim_head',
                        'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
	                    'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Facebook', 'thegem'),
                        'param_name' => 'facebook',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Twitter', 'thegem'),
                        'param_name' => 'twitter',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Pinterest', 'thegem'),
                        'param_name' => 'pinterest',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Tumblr', 'thegem'),
                        'param_name' => 'tumblr',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('LinkedIn', 'thegem'),
                        'param_name' => 'linkedin',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Reddit', 'thegem'),
                        'param_name' => 'reddit',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('Telegram', 'thegem'),
                        'param_name' => 'telegram',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'checkbox',
                        'heading' => __('WhatsApp', 'thegem'),
                        'param_name' => 'whatsapp',
                        'value' => array(__('Yes', 'thegem') => '1'),
                        'std' => '1',
                        'edit_field_class' => 'vc_column vc_col-sm-4',
                        'group' => __('General', 'thegem')
                    ),

	                array(
		                'type' => 'checkbox',
		                'heading' => __('Viber', 'thegem'),
		                'param_name' => 'viber',
		                'value' => array(__('Yes', 'thegem') => '1'),
		                'std' => '1',
		                'edit_field_class' => 'vc_column vc_col-sm-4',
		                'group' => __('General', 'thegem')
	                ),

	                array(
		                'type' => 'checkbox',
		                'heading' => __('Xing', 'thegem'),
		                'param_name' => 'xing',
		                'value' => array(__('Yes', 'thegem') => '1'),
		                'std' => '1',
		                'edit_field_class' => 'vc_column vc_col-sm-4',
		                'group' => __('General', 'thegem')
	                ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Width', 'thegem'),
                        'param_name' => 'icons_width',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Height', 'thegem'),
                        'param_name' => 'icons_height',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Border Width', 'thegem'),
                        'param_name' => 'icons_border_width',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'textfield',
                        'heading' => __('Border Radius', 'thegem'),
                        'param_name' => 'icons_border_radius',
                        'value' => '',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Icons Color', 'thegem'),
                        'param_name' => 'icons_color',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Icons Color Hover', 'thegem'),
                        'param_name' => 'icons_color_hover',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Background Color', 'thegem'),
                        'param_name' => 'icons_background_color',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Background Color on Hover', 'thegem'),
                        'param_name' => 'icons_background_color_hover',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Border Color', 'thegem'),
                        'param_name' => 'icons_border_color',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),

                    array(
                        'type' => 'colorpicker',
                        'heading' => __('Border Color on Hover', 'thegem'),
                        'param_name' => 'icons_border_color_hover',
                        'edit_field_class' => 'vc_column vc_col-sm-6',
                        'dependency' => array(
                            'element' => 'icons_type',
                            'value' => array('round', 'square')
                        ),
                        'group' => __('General', 'thegem')
                    ),
	            ),

                /* Extra Options */
                thegem_set_elements_extra_options(),

                /* Responsive Options */
                thegem_set_elements_responsive_options()
            ),
        ),

        'gem_custom_fields' => thegem_cf_shortcode_settings(),
	);
	uasort($shortcodes, 'thegem_sort_shortcodes_array');
	$shortcodes = apply_filters('thegem_shortcodes_array', $shortcodes);
	return $shortcodes;
}

function thegem_sort_shortcodes_array($a, $b) {
	if ($a['name'] == $b['name']) {
		return 0;
	}
	return ($a['name'] < $b['name']) ? -1 : 1;
}

function thegem_VC_init() {
	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		remove_filter('the_excerpt', array($vc_manager->vc(), 'excerptFilter'));
		add_action('admin_print_scripts-post.php', 'thegem_printScriptsMessages');
		add_action('admin_print_scripts-post-new.php', 'thegem_printScriptsMessages');

		foreach(glob(plugin_dir_path( __FILE__ )."/params/*.php") as $param) {
			require_once($param);
		}

		$shortcodes = thegem_shortcodes();
		foreach($shortcodes as $shortcode) {
			vc_map($shortcode);
		}
		$vc_layout_sub_controls = array(
			array( 'link_post', __( 'Link to post', 'thegem' ) ),
			array( 'no_link', __( 'No link', 'thegem' ) ),
			array( 'link_image', __( 'Link to bigger image', 'thegem' ) )
		);
		$target_arr = array(
			__( 'Same window', 'thegem' ) => '_self',
			__( 'New window', 'thegem' ) => '_blank'
		);

		vc_add_param('vc_column_inner', array(
			'type' => 'column_offset',
			'heading' => __('Responsiveness', 'thegem'),
			'param_name' => 'offset',
			'group' => __( 'Width & Responsiveness', 'thegem' ),
			'description' => __('Adjust column for different screen sizes. Control width, offset and visibility settings.', 'thegem')
		));
		vc_add_param('vc_gmaps', array(
			'type' => 'checkbox',
			'heading' => __('Hide GMaps Default Title Bar', 'thegem'),
			'param_name' => 'hide_title',
			'value' => array(__('Yes', 'thegem') => '1')
		));
		vc_add_param('vc_gmaps', array(
			'type' => 'dropdown',
			'heading' => __('Style', 'thegem'),
			'param_name' => 'style',
			'value' => array(
				__('no border', 'thegem') => 'default',
				__('8px & border', 'thegem') => '1',
				__('16px & border', 'thegem') => '2',
				__('8px outlined border', 'thegem') => '3',
				__('20px outlined border', 'thegem') => '4',
				__('20px border with shadow', 'thegem') => '5',
				__('Combined border', 'thegem') => '6',
				__('20px border radius', 'thegem') => '7',
				__('55px border radius', 'thegem') => '8',
				__('Dashed inside', 'thegem') => '9',
				__('Dashed outside', 'thegem') => '10',
				__('Rounded with border', 'thegem') => '11'
			)
		));
		vc_add_param('vc_accordion', array(
			'type' => 'checkbox',
			'heading' => __('Lazy loading enabled', 'thegem'),
			'param_name' => 'effects_enabled',
			'value' => array(__('Yes', 'thegem') => '1')
		));
		vc_add_param('contact-form-7', array(
			'type' => 'dropdown',
			'heading' => __('Style', 'thegem'),
			'param_name' => 'html_class',
			'value' => array(
				__('Default', 'thegem') => '',
				__('White', 'thegem') => 'gem-contact-form-white',
				__('White Simple Line', 'thegem') => 'gem-contact-form-white gem-contact-form-simple-line',
				__('Dark', 'thegem') => 'gem-contact-form-dark',
				__('Dark Simple Line', 'thegem') => 'gem-contact-form-dark gem-contact-form-simple-line',
			)
		));
		vc_add_param('vc_text_separator', array(
			'type' => 'dropdown',
			'heading' => __('Title level', 'thegem'),
			'param_name' => 'title_level',
			'value' => array(
				__('H1', 'thegem') => 'h1',
				__('H2', 'thegem') => 'h2',
				__('H3', 'thegem') => 'h3',
				__('H4', 'thegem') => 'h4',
				__('H5', 'thegem') => 'h5',
				__('H6', 'thegem') => 'h6',
				__('XLarge', 'thegem') => 'xlarge',
				__('Styled Subtitle', 'thegem') => 'styled-subtitle',
			),
			'std' => 'h2',
			'weight' => 5
		));
		vc_add_param('vc_text_separator', array(
			'type' => 'checkbox',
			'heading' => __('Use light version of title', 'thegem'),
			'param_name' => 'title_light',
			'value' => array(__('Yes', 'thegem') => '1'),
			'dependency' => array(
				'element' => 'title_level',
				'value' => array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'xlarge')
			),
			'weight' => 550
		));
		vc_add_param('vc_column', array(
			'type' => 'checkbox',
			'heading' => __('Column sticky', 'thegem'),
			'param_name' => 'el_sticky',
			'value' => array(__('Yes', 'thegem') => '1'),
		));
		vc_add_param('vc_column_inner', array(
			'type' => 'checkbox',
			'heading' => __('Column sticky', 'thegem'),
			'param_name' => 'el_sticky',
			'value' => array(__('Yes', 'thegem') => '1'),
		));
		vc_add_param('vc_column', array(
			'type' => 'textfield',
			'heading' => __('Sticky Offset (px)', 'thegem'),
			'param_name' => 'el_sticky_offset',
			'dependency' => array(
				'element' => 'el_sticky',
				'not_empty' => true,
			),
		));
		vc_add_param('vc_column_inner', array(
			'type' => 'textfield',
			'heading' => __('Sticky Offset (px)', 'thegem'),
			'param_name' => 'el_sticky_offset',
			'dependency' => array(
				'element' => 'el_sticky',
				'not_empty' => true,
			),
		));
		foreach(array('vc_row', 'vc_row_inner') as $sc) {
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Hide on desktop', 'thegem'),
				'param_name' => 'el_disable_desktop',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
				'group' => __('Responsive Options', 'thegem')
			));
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Hide on tablet', 'thegem'),
				'param_name' => 'el_disable_tablet',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
				'group' => __('Responsive Options', 'thegem')
			));
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Hide on mobile', 'thegem'),
				'param_name' => 'el_disable_mobile',
				'value' => array(__('Yes', 'thegem') => '1'),
				'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
				'group' => __('Responsive Options', 'thegem')
			));
		}
		foreach(array('vc_row', 'vc_row_inner', 'vc_column', 'vc_column_inner') as $sc) {
			/*Box shadow*/
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Enable Shadow', 'thegem'),
				'param_name' => 'thegem_enable_shadow',
				'edit_field_class' => 'vc_column vc_col-sm-4',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'colorpicker',
				'heading' => __('Shadow color', 'thegem'),
				'param_name' => 'thegem_shadow_color',
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-4',
				'std' => 'rgba(0, 0, 0, 0.15)',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Position', 'thegem'),
				'param_name' => 'thegem_shadow_position',
				'value' => array(
					__('Outline', 'thegem') => 'outline',
					__('Inset', 'thegem') => 'inset'
				),
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-4',
				'std' => 'outline',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'textfield',
				'heading' => __('Horizontal', 'thegem'),
				'param_name' => 'thegem_shaow_horizontal',
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-3',
				'std' => '0',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'textfield',
				'heading' => __('Vertical', 'thegem'),
				'param_name' => 'thegem_shaow_vertical',
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-3',
				'std' => '5',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'textfield',
				'heading' => __('Blur', 'thegem'),
				'param_name' => 'thegem_shaow_blur',
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-3',
				'std' => '5',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'textfield',
				'heading' => __('Spread', 'thegem'),
				'param_name' => 'thegem_shaow_spread',
				'dependency' => array(
					'element' => 'thegem_enable_shadow',
					'not_empty' => true,
				),
				'edit_field_class' => 'vc_column vc_col-sm-3',
				'std' => '-5',
				'group' => __('Design Options', 'js_composer')
			));
			/*END Box shadow*/
			vc_add_param($sc, array(
				'type' => 'textfield',
				'heading' => __('Z-Index', 'thegem'),
				'param_name' => 'z_index',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			//if(thegem_featured_image_for_bg_available) {
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Use post featured image as background', 'thegem'),
				'param_name' => 'thegem_featured_image_for_bg_active',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			//}
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Background position', 'thegem'),
				'param_name' => 'background_position_desktop',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Left Top', 'thegem') => 'left top',
					__('Center Top', 'thegem') => 'center top',
					__('Right Top', 'thegem') => 'right top',
					__('Left Center', 'thegem') => 'left center',
					__('Center Center', 'thegem') => 'center center',
					__('Right Center', 'thegem') => 'right center',
					__('Left Bottom', 'thegem') => 'left bottom',
					__('Center Bottom', 'thegem') => 'center bottom',
					__('Right Bottom', 'thegem') => 'right bottom',
				),
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Tablet', 'thegem'),
				'param_name' => 'design_tablet_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'colorpicker',
				'heading' => __('Background Color', 'thegem'),
				'param_name' => 'background_color_tablet',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			vc_add_param($sc, array(
				'type' => 'attach_image',
				'heading' => __('Background image', 'thegem'),
				'param_name' => 'background_image_tablet',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Background position', 'thegem'),
				'param_name' => 'background_position_tablet',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Left Top', 'thegem') => 'left top',
					__('Center Top', 'thegem') => 'center top',
					__('Right Top', 'thegem') => 'right top',
					__('Left Center', 'thegem') => 'left center',
					__('Center Center', 'thegem') => 'center center',
					__('Right Center', 'thegem') => 'right center',
					__('Left Bottom', 'thegem') => 'left bottom',
					__('Center Bottom', 'thegem') => 'center bottom',
					__('Right Bottom', 'thegem') => 'right bottom',
				),
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Background style', 'thegem'),
				'param_name' => 'background_style_tablet',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Cover', 'thegem') => 'cover',
					__('Contain', 'thegem') => 'contain',
					__('No repeat', 'thegem') => 'no-repeat',
					__('Repeat', 'thegem') => 'repeat',
				),
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Mobile', 'thegem'),
				'param_name' => 'design_mobile_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'colorpicker',
				'heading' => __('Background Color', 'thegem'),
				'param_name' => 'background_color_mobile',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			vc_add_param($sc, array(
				'type' => 'attach_image',
				'heading' => __('Background image', 'thegem'),
				'param_name' => 'background_image_mobile',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Background position', 'thegem'),
				'param_name' => 'background_position_mobile',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Left Top', 'thegem') => 'left top',
					__('Center Top', 'thegem') => 'center top',
					__('Right Top', 'thegem') => 'right top',
					__('Left Center', 'thegem') => 'left center',
					__('Center Center', 'thegem') => 'center center',
					__('Right Center', 'thegem') => 'right center',
					__('Left Bottom', 'thegem') => 'left bottom',
					__('Center Bottom', 'thegem') => 'center bottom',
					__('Right Bottom', 'thegem') => 'right bottom',
				),
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'dropdown',
				'heading' => __('Background style', 'thegem'),
				'param_name' => 'background_style_mobile',
				'value' => array(
					__('Default', 'thegem') => '',
					__('Cover', 'thegem') => 'cover',
					__('Contain', 'thegem') => 'contain',
					__('No repeat', 'thegem') => 'no-repeat',
					__('Repeat', 'thegem') => 'repeat',
				),
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Deprecated', 'thegem'),
				'param_name' => 'design_deprecated_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
				'group' => __('Design Options', 'js_composer')
			));
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Disable custom paddings on tablets', 'thegem'),
				'param_name' => 'disable_custom_paddings_tablet',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			vc_add_param($sc, array(
				'type' => 'checkbox',
				'heading' => __('Disable custom paddings on mobiles', 'thegem'),
				'param_name' => 'disable_custom_paddings_mobile',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'group' => __( 'Design Options', 'js_composer' ),
			));
			$resolution = array('tablet', 'mobile');
			$offset_name = array('padding', 'margin');
			$direction = array('top', 'bottom', 'left', 'right');
			foreach ($resolution as $res) {
				vc_add_param($sc, array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __($res, 'thegem'),
					'param_name' => $res.'_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading vc_column vc_col-sm-12 no-top-padding margin-top capitalize',
					'group' => __('Responsive Options', 'thegem')
				));
				foreach ($offset_name as $name) {
					vc_add_param($sc, array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __($name, 'thegem'),
						'param_name' => $res.'_'.$name.'_sub_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
						'group' => __('Responsive Options', 'thegem')
					));
					foreach ($direction as $dir) {
						vc_add_param($sc, array(
							'type' => 'textfield',
							'heading' => __($dir, 'thegem'),
							'param_name' => $res.'_'.$name.'_'.$dir,
							'edit_field_class' => 'vc_column vc_col-sm-3 capitalize',
							'group' => __('Responsive Options', 'thegem')
						));
					}
				}
				vc_add_param($sc, array(
					'type' => 'thegem_delimeter_heading_two_level',
					'heading' => __('', 'thegem'),
					'param_name' => $res.'_description_sub_delim_head',
					'edit_field_class' => 'vc_column vc_col-sm-12 no-top-padding',
					'description' => __('Note: px units are used by default. For % units add values with %, eg. 10%', 'thegem'),
					'group' => __('Responsive Options', 'thegem')
				));
				if($sc === 'vc_row' || $sc === 'vc_row_inner') {
					vc_add_param($sc, array(
						'type' => 'checkbox',
						'heading' => $res === 'tablet' ? __('Reverse columns order on tablet', 'thegem') : __('Reverse columns order on mobile', 'thegem'),
						'param_name' => 'thegem_revesrse_columns_'.$res,
						'group' => __('Responsive Options', 'thegem')
					));
				}
			}
			if(thegem_is_template_post('cart') || thegem_is_template_post('checkout') || thegem_is_template_post('checkout-thanks')) {
				vc_add_param($sc, array(
					'type' => 'dropdown',
					'heading' => __('Visible for users', 'thegem'),
					'param_name' => 'visible_element_users',
					'value' => array(
						__('All users', 'thegem') => '',
						__('Only logged in users', 'thegem') => 'in',
						__('Only logged out users', 'thegem') => 'out',
					),
				));
			}
		}
		vc_add_param('vc_row', array(
			'type' => 'checkbox',
			'heading' => __('Apply TheGem fix for full height', 'thegem'),
			'param_name' => 'thegem_fix_full_height',
			'group' => __( 'Design Options', 'js_composer' ),
			'description' => __('Disable WPBakery\'s height restrictions for the first full height row in a viewport', 'thegem'),
			'dependency' => array(
				'element' => 'full_height',
				'not_empty' => true,
			),
		));
		vc_add_param('vc_row', array(
			'type' => 'checkbox',
			'heading' => __('Row as a slide for vertical slider', 'thegem'),
			'param_name' => 'vertical_slider',
			'description' => __('If checked, this row will be used as a slide in case fullscreen vertical slider is enabled in Page Options', 'thegem')
		));
		vc_add_param('vc_row', array(
			'type' => 'textfield',
			'heading' => __('Slide anchor ', 'thegem'),
			'param_name' => 'vertical_slider_anchor',
			'description' => __('Enter your slide\'s anchor which can be used for linking your menu items or other links with this slide (no spaces or special characters are allowed. Example for anchor: slide-1.<br> NOTE: this anchor works only with "Advanced" type of fullscreen slider. For "Basic" you should use "Row ID" field above)', 'thegem'),
			'dependency' => array(
				'element' => 'vertical_slider',
				'not_empty' => true,
			)
		));
		vc_add_param('vc_row', array(
			'type' => 'textfield',
			'heading' => __('Slide name ', 'thegem'),
			'param_name' => 'vertical_slider_title',
			'description' => __('Enter your slide\'s name which will be used for tooltip in vertical slider\'s dot navigation', 'thegem'),
			'dependency' => array(
				'element' => 'vertical_slider',
				'not_empty' => true,
			)
		));
		vc_add_param('vc_row', array(
			'type' => 'textarea_raw_html',
			'heading' => __('Custom CSS', 'thegem'),
			'param_name' => 'custom_css_code',
			'group' => __('Custom CSS', 'thegem'),
		));
		vc_add_param('vc_row', array(
			'type' => 'checkbox',
			'heading' => __('Ken Burns effect', 'thegem'),
			'param_name' => 'ken_burns_enabled',
			'description' => __('Add Ken Burns animation effect to this row', 'thegem'),
		));
		vc_add_param('vc_row', array(
			'type' => 'attach_image',
			'heading' => __('Ken Burns Image', 'thegem'),
			'param_name' => 'ken_burns_image',
			'description' => __('Select image for Ken Burns effect', 'thegem'),
			'dependency' => array(
				'element' => 'ken_burns_enabled',
				'not_empty' => true
			)
		));
		vc_add_param('vc_row', array(
			'type' => 'dropdown',
			'value' => array(__('Zoom In', 'thegem') => 'zoom_in', __('Zoom Out', 'thegem') => 'zoom_out'),
			'heading' => __('Direction', 'thegem'),
			'param_name' => 'ken_burns_direction',
			'dependency' => array(
				'element' => 'ken_burns_enabled',
				'not_empty' => true
			)
		));
		vc_add_param('vc_row', array(
			'type' => 'textfield',
			'heading' => __('Transition speed, ms', 'thegem'),
			'value' => 15000,
			'param_name' => 'ken_burns_transition_speed',
			'dependency' => array(
				'element' => 'ken_burns_enabled',
				'not_empty' => true
			)
		));

		$interactions = thegem_get_interactions_options();
		foreach (array('vc_column_text', 'vc_single_image', 'vc_custom_heading', 'vc_row' , 'vc_row_inner', 'vc_column', 'vc_column_inner') as $key) {
			foreach ($interactions as $k => $v) {
				vc_add_param($key, array(
					'type' => $v['type'],
					'heading' => $v['heading'],
					'param_name' => $v['param_name'],
					'value' => $v['value'],
					'edit_field_class' => $v['edit_field_class'],
					'dependency' => $v['dependency'],
					'group' => $v['group'],
				));
			}
		}

		if (thegem_is_template_post('header')) {
			thegem_set_column_flex_options('header');
		}
		if (thegem_is_template_post('single-product')) {
			thegem_set_column_flex_options('single-product');
		}

		if (thegem_is_template_post('header')) {
			thegem_set_elements_design_options_vc_shortcodes('header');
		}
		if (thegem_is_template_post('single-product')) {
			thegem_set_elements_design_options_vc_shortcodes('single-product');
		}

		foreach (array('vc_column_text', 'vc_single_image', 'vc_custom_heading', 'vc_progress_bar', 'vc_round_chart', 'vc_line_chart', 'vc_icon', 'vc_tta_tabs', 'vc_tta_tour', 'vc_tta_accordion', 'vc_row', 'vc_column', 'vc_pie') as $key) {
			vc_remove_param( $key, "css_animation" );
			vc_add_param($key, vc_map_add_css_animation());
			vc_add_param($key, array(
				'type' => 'textfield',
				'heading' => __('Animation delay (ms)', 'thegem'),
				'param_name' => 'effects_enabled_delay'
			));
		}

		vc_add_param('vc_tta_accordion', array(
			'type' => 'textfield',
			'heading' => __('Top spacing', 'thegem'),
			'param_name' => 'thegem_top_spacing',
			'edit_field_class' => 'vc_column vc_col-sm-6',
		));
		vc_add_param('vc_tta_accordion', array(
			'type' => 'textfield',
			'heading' => __('Bottom spacing', 'thegem'),
			'param_name' => 'thegem_bottom_spacing',
			'edit_field_class' => 'vc_column vc_col-sm-6',
		));
		vc_add_param('vc_tta_accordion', array(
			'type' => 'colorpicker',
			'heading' => __('Separator spacing', 'thegem'),
			'param_name' => 'thegem_separator_color',
			'dependency' => array(
				'element' => 'style',
				'value' => array('simple_solid', 'simple_dashed', 'simple_arrow')
			)
		));

		foreach (array('vc_row', 'vc_column') as $key) {
			vc_remove_param( $key, "parallax" );
			vc_remove_param( $key, "parallax_image" );
//			vc_remove_param( $key, "parallax_speed_video" );
			vc_remove_param( $key, "parallax_speed_bg" );
			vc_add_param($key,
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Parallax', 'thegem' ),
					'param_name' => 'parallax',
					'value' => array(
						esc_html__( 'None', 'thegem' ) => '',
						esc_html__( 'Simple', 'thegem' ) => 'content-moving',
						esc_html__( 'With fade', 'thegem' ) => 'content-moving-fade',
					),
					'description' => esc_html__( 'Add parallax type background for row (Note: If no image is specified, parallax will use background image from Design Options).', 'thegem' ),
					'dependency' => array(
						'element' => 'video_bg',
						'is_empty' => true,
					),
				)
			);
			vc_add_param($key,
				array(
					'type' => 'attach_image',
					'heading' => esc_html__( 'Image', 'thegem' ),
					'param_name' => 'parallax_image',
					'value' => '',
					'description' => esc_html__( 'Select image from media library.', 'thegem' ),
					'dependency' => array(
						'element' => 'parallax',
						'not_empty' => true,
					),
				)
			);
			vc_add_param($key,
				array(
					'type' => 'dropdown',
					'heading' => __('Background style', 'thegem'),
					'param_name' => 'background_style',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Cover', 'thegem') => 'cover',
						__('Contain', 'thegem') => 'contain',
						__('No Repeat', 'thegem') => 'no-repeat',
						__('Repeat', 'thegem') => 'repeat'
					),
					'dependency' => array(
						'element' => 'parallax_image',
						'not_empty' => true,
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'dropdown',
					'heading' => __('Background horizontal position', 'thegem'),
					'param_name' => 'background_position_horizontal',
					'value' => array(
						__('Center', 'thegem') => 'center',
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right'
					),
					'dependency' => array(
						'element' => 'parallax_image',
						'not_empty' => true,
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'dropdown',
					'heading' => __('Background vertical position', 'thegem'),
					'param_name' => 'background_position_vertical',
					'value' => array(
						__('Top', 'thegem') => 'top',
						__('Center', 'thegem') => 'center',
						__('Bottom', 'thegem') => 'bottom'
					),
					'dependency' => array(
						'element' => 'parallax_image',
						'not_empty' => true,
					)
				)
			);
//			vc_add_param($key,
//				array(
//					'type' => 'textfield',
//					'heading' => esc_html__( 'Parallax speed', 'thegem' ),
//					'param_name' => 'parallax_speed_video',
//					'value' => '1.5',
//					'description' => esc_html__( 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)', 'thegem' ),
//					'dependency' => array(
//						'element' => 'video_bg_parallax',
//						'not_empty' => true,
//					),
//				)
//			);
			vc_add_param($key,
				array(
					'type' => 'textfield',
					'heading' => esc_html__( 'Parallax speed', 'thegem' ),
					'param_name' => 'parallax_speed_bg',
					'value' => '1.5',
					'description' => esc_html__( 'Enter parallax speed ratio (Note: Default value is 1.5, min value is 1)', 'thegem' ),
					'dependency' => array(
						'element' => 'parallax',
						'not_empty' => true,
					),
				)
			);
		}

		foreach (array('vc_row') as $key) {
			vc_add_param($key,
				array(
					'type' => 'dropdown',
					'heading' => esc_html__( 'Video Background', 'thegem' ),
					'param_name' => 'video_background_type',
					'value' => array(
						esc_html__( 'None', 'thegem' ) => '',
						esc_html__( 'YouTube', 'thegem' ) => 'youtube',
						esc_html__( 'Vimeo', 'thegem' ) => 'vimeo',
						esc_html__( 'Self', 'thegem' ) => 'self',
					),
					'description' => esc_html__( 'Add video background for row.', 'thegem' ),
					'dependency' => array(
						'element' => 'video_bg',
						'is_empty' => true,
					),
				)
			);
			vc_add_param($key,
				array(
					'type' => 'textfield',
					'heading' => __('Video id (YouTube or Vimeo) or src', 'thegem'),
					'param_name' => 'video_background_src',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'textfield',
					'heading' => __('Video Aspect ratio (16:9, 16:10, 4:3...)', 'thegem'),
					'param_name' => 'video_background_acpect_ratio',
					'value' => '16:9',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'checkbox',
					'heading' => __('Play On Mobile', 'thegem'),
					'param_name' => 'video_background_play_on_mobile',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'attach_image',
					'heading' => __('Background Fallback', 'thegem'),
					'param_name' => 'video_background_fallback',
					'dependency' => array(
						'element' => 'video_background_type',
						'not_empty' => true
					)
				)
			);
			vc_add_param($key,
				array(
					'type' => 'colorpicker',
					'heading' => __('Background video overlay color', 'thegem'),
					'param_name' => 'video_background_overlay_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'dependency' => array(
						'element' => 'video_background_type',
						'value' => array('youtube', 'vimeo', 'self'),
					),
				)
			);
			vc_add_param($key,
				array(
					'type' => 'textfield',
					'heading' => __('Background video overlay opacity (0 - 1)', 'thegem'),
					'param_name' => 'video_background_overlay_opacity',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'dependency' => array(
						'element' => 'video_background_type',
						'value' => array('youtube', 'vimeo', 'self'),
					),
				)
			);
			vc_add_param($key,
				array(
					'type' => 'attach_image',
					'heading' => __('Video Poster', 'thegem'),
					'param_name' => 'video_background_poster',
					'dependency' => array(
						'element' => 'video_background_type',
						'value' => array('self')
					)
				)
			);
		}

		vc_remove_element('vc_carousel');
		vc_remove_element('vc_button');
		vc_remove_element('vc_cta_button');
		vc_remove_element('vc_cta_button2');
		vc_remove_element('vc_video');
		vc_remove_element('vc_flickr');
		vc_remove_element('vc_flickr');
		vc_remove_element('vc_cta');
		vc_map_update('vc_tta_section', array(
			'allowed_container_element' => array('vc_row', 'gem_textbox', 'gem_alert_box', 'gem_counter_box', 'gem_icon_with_text', 'gem_map_with_text', 'gem_pricing_table'),
		));
		vc_map_update('vc_column_inner', array(
			'allowed_container_element' => array('gem_textbox', 'gem_alert_box', 'gem_counter_box', 'gem_icon_with_text', 'gem_map_with_text', 'gem_pricing_table'),
		));
		vc_add_shortcode_param( 'thegem_icon', 'thegem_icon_settings_field' );
		vc_add_shortcode_param( 'thegem_dropdown_arrows', 'thegem_dropdown_arrows_settings_field' );
		vc_add_shortcode_param( 'thegem_datepicker_param', 'thegem_datepicker_param_settings_field');
		vc_add_shortcode_param( 'thegem_hidden_param', 'thegem_hidden_param_settings_field');
		if($vc_manager->mode() != 'admin_frontend_editor' && $vc_manager->mode() != 'admin_page' && $vc_manager->mode() != 'page_editable') {
			add_filter('the_content', 'thegem_run_shortcode', 7);
			add_filter('thegem_print_shortcodes', 'thegem_run_shortcode', 7);
			add_filter('widget_text', 'thegem_run_shortcode', 7);
			add_filter('the_excerpt', 'thegem_run_shortcode', 7);
		}
	} else {
		add_filter('the_content', 'thegem_run_shortcode', 7);
		add_filter('thegem_print_shortcodes', 'thegem_run_shortcode', 7);
		add_filter('widget_text', 'thegem_run_shortcode', 7);
		add_filter('the_excerpt', 'thegem_run_shortcode', 7);
	}
}
add_action('init', 'thegem_VC_init', 11);

function thegem_update_vc_shortcodes_params() {
	$param = WPBMap::getParam('vc_gmaps', 'link');
	$param['description'] = sprintf( __( 'Visit <a href="%s" target="_blank">Google maps</a> to create your map. 1) Find location 2) Click "Share" and make sure map is public on the web 3) Click folder icon to reveal "Embed on my site" link 4) Copy iframe code and paste it here.', 'thegem' ), 'https://www.google.com/maps/d/');
	vc_update_shortcode_param('vc_gmaps', $param);
}
add_action('vc_after_init', 'thegem_update_vc_shortcodes_params');

function thegem_vc_settings_tabs($tabs) {
	unset($tabs['vc-color']);
	return $tabs;
}
add_filter('vc_settings_tabs', 'thegem_vc_settings_tabs');

if(class_exists('WPBakeryShortCodesContainer')) {
	class WPBakeryShortCode_gem_alert_box extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_fullwidth extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_custom_header extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_map_with_text extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_icon_with_text extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_textbox extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_counter_box extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_pricing_table extends WPBakeryShortCodesContainer {}
	class WPBakeryShortCode_gem_pricing_column extends WPBakeryShortCodesContainer {}
}

function thegem_js_remove_wpautop($content, $autop = false) {
	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		return wpb_js_remove_wpautop($content, $autop);
	}
	return $content;
}

function thegem_portfolio_slider_shortcode($atts) {

	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="portfolio-slider-shortcode-dummy"></div>';
		}
	}

	$atts = vc_map_get_attributes('gem_portfolio_slider', $atts);

	$atts['content_portfolios_thegem_portfolios'] = $atts['portfolios'];
	unset($atts['portfolios']);

	foreach ($atts as $key => $value) {
		if (strpos($key, 'portfolio_') !== false && $key !== 'portfolio_uid') {
			$atts[str_replace('portfolio_','', $key)] = $value;
			unset($atts[$key]);
		}
	}

	ob_start();
	thegem_portfolio_slider($atts);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_portfolio_shortcode($atts) {

	if (thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="portfolio-shortcode-dummy"></div>';
		}
	}

	if (!isset($atts['new_default_highlights'])) {
		if (!isset($atts['ignore_highlights'])) {
			$atts['ignore_highlights'] = '';
		}
	}

	if (!isset($atts['additional_meta_added'])) {
		if (!isset($atts['portfolio_show_info'])) {
			$atts['portfolio_show_date'] = '';
			$atts['show_additional_meta'] = '';
		} else {
			$atts['portfolio_show_date'] = '1';
			$atts['show_additional_meta'] = '1';
		}

		if (isset($atts['portfolio_hover']) && isset($atts['portfolio_display_titles']) && $atts['portfolio_display_titles'] == 'hover') {
			$atts['portfolio_hover_hover'] = $atts['portfolio_hover'];
		}
	}

	if (!isset($atts['query_type']) && isset($atts['source_type'])) {
		$atts['query_type'] = $atts['source_type'] == 'related' ? 'related' : 'portfolios';
	}

	$atts = vc_map_get_attributes('gem_portfolio', $atts);

	$atts['orderby'] = $atts['order_by'];
	unset($atts['order_by']);
	$atts['content_portfolios_thegem_portfolios'] = $atts['portfolios'];
	unset($atts['portfolios']);
	$atts['columns_desktop'] = $atts['portfolio_layout'];
	unset($atts['portfolio_layout']);
	$atts['layout'] = $atts['portfolio_style'];
	unset($atts['portfolio_style']);
	$atts['columns_100'] = $atts['portfolio_fullwidth_columns'];
	unset($atts['portfolio_fullwidth_columns']);

	$button_params = array();
	foreach ($atts as $key => $value) {
		if (strpos($key, 'portfolio_') !== false && $key !== 'portfolio_uid') {
			$atts[str_replace('portfolio_','', $key)] = $value;
			unset($atts[$key]);
		}
		if(substr($key, 0, 7) == 'button_') {
			if ( $key == 'button_no_uppercase') {
				$button_params['no-uppercase'] = $value;
			} else {
				$button_params[substr($key, 7)] = $value;
			}
		}
	}
	$atts['button'] = $button_params;

	ob_start();

	thegem_portfolio($atts);

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_news_grid_shortcode($atts) {

	if (thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="news-grid-shortcode-dummy"></div>';
		}
	}

	if (!isset($atts['new_default_highlights'])) {
		if (!isset($atts['news_grid_ignore_highlights'])) {
			$atts['news_grid_ignore_highlights'] = '';
		}
	}

	if (!isset($atts['additional_meta_added'])) {
		if (!isset($atts['news_grid_hide_categories'])) {
			$atts['show_additional_meta'] = '1';
		} else {
			$atts['show_additional_meta'] = '';
		}
		if (isset($atts['news_grid_version']) && $atts['news_grid_version'] == 'list' && !isset($atts['blog_show_readmore_button'])) {
			$atts['show_readmore_button'] = '1';
		}
	}

	$related_by_categories = '';
	if (!empty($atts['related_by_categories'])) {
		$related_by_categories = $atts['related_by_categories'];
	}
	$related_by_tags = '';
	if (!empty($atts['related_by_tags'])) {
		$related_by_tags = $atts['related_by_tags'];
	}
	$related_by_author = '';
	if (!empty($atts['related_by_author'])) {
		$related_by_author = $atts['related_by_author'];
	}

	$source_type = $atts['source_type'] ?? '';
	$new_related = isset($atts['new_related']);

	$atts = vc_map_get_attributes('gem_news_grid', $atts);

	$atts['orderby'] = $atts['order_by'];
	unset($atts['order_by']);

	if ($atts['news_grid_version'] !== 'list') {

		$atts['columns_desktop'] = $atts['news_grid_layout'];
		unset($atts['news_grid_layout']);

		$atts['layout'] = $atts['news_grid_style'];
		unset($atts['news_grid_style']);

		if ($atts['layout'] == 'creative') {
			$atts['columns_desktop'] = $atts['columns_desktop_creative'];
			unset($atts['columns_desktop_creative']);
			$atts['columns_100'] = $atts['columns_100_creative'];
			unset($atts['columns_100_creative']);
		} else {
			$atts['columns_100'] = $atts['news_grid_fullwidth_columns'];
			unset($atts['news_grid_fullwidth_columns']);
		}
	}

	$button_params = array();
	foreach ($atts as $key => $value) {
		if (strpos($key, 'news_grid_') !== false) {
			$atts[str_replace('news_grid_','', $key)] = $value;
			unset($atts[$key]);
		}
		if(substr($key, 0, 7) == 'button_') {
			if ( $key == 'button_no_uppercase') {
				$button_params['no-uppercase'] = $value;
			} else {
				$button_params[substr($key, 7)] = $value;
			}
		}
	}
	$atts['button'] = $button_params;

	if (!empty($source_type) && !$new_related) {
		if ($source_type == 'related') {
			$atts['query_type'] = 'related';
			$taxonomy_related = [];
			if ($related_by_categories) {
				$taxonomy_related[] = 'category';
			}
			if ($related_by_tags) {
				$taxonomy_related[] = 'post_tag';
			}
			if ($related_by_author) {
				$taxonomy_related[] = 'authors';
			}
			$atts['taxonomy_related'] = implode(',', $taxonomy_related);
			$atts['exclude_posts_manual_type'] = 'current';
		} else if ($source_type == 'archive') {
			$atts['query_type'] = 'archive';
		} else {
			$atts['query_type'] = 'post';
		}
	}

	ob_start();
	thegem_news_grid($atts);

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));

	return $return_html;
}

function thegem_vc_get_terms($taxonomy) {
	$terms = get_terms($taxonomy, array('hide_empty' => false));
	$sets = array();
	foreach ($terms as $term) {
		$sets[$term->name] = $term->slug;
	}
	return $sets;
}

function thegem_vc_get_blog_categories() {
	$terms = get_terms('category', array('hide_empty' => false));
	$categories = array();
	foreach ($terms as $term) {
		$categories[$term->name.' ('.__('Posts', 'thegem').')'] = $term->slug;
	}
	if(taxonomy_exists('thegem_news_sets')) {
		$terms = get_terms('thegem_news_sets', array('hide_empty' => false));
		foreach ((array)$terms as $term) {
			$categories[$term->name.' ('.__('News', 'thegem').')'] = $term->slug;
		}
	}
	return $categories;
}

function TheGemCategoryAutocompleteSuggesterBySlug($query) {

	global $wpdb;
	$cat_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.term_id AS id, b.name as name, b.slug AS slug
					FROM {$wpdb->term_taxonomy} AS a
					INNER JOIN {$wpdb->terms} AS b ON b.term_id = a.term_id
					WHERE (a.taxonomy = 'category' OR a.taxonomy = 'thegem_news_sets') AND (a.term_id = '%d' OR b.slug LIKE '%%%s%%' OR b.name LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : -1, stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['slug'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '') . ((strlen($value['slug']) > 0) ? ' - ' . __('Slug', 'thegem') . ': ' . $value['slug'] : '');
			$result[] = $data;
		}
	}

	return $result;
}

function TheGemCategoryRenderBySlugExact($query) {
	$query = $query['value'];
	$query = trim($query);
	$term = get_term_by('slug', $query, 'category');

	if (!$term && taxonomy_exists('thegem_news_sets')) {
		$term = get_term_by('slug', $query, 'thegem_news_sets');
	}

	return thegem_productAutocompleteOutput($term, true);
}

function TheGemTagAutocompleteSuggesterBySlug($query) {

	global $wpdb;
	$cat_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.term_id AS id, b.name as name, b.slug AS slug
					FROM {$wpdb->term_taxonomy} AS a
					INNER JOIN {$wpdb->terms} AS b ON b.term_id = a.term_id
					WHERE a.taxonomy = 'post_tag' AND (a.term_id = '%d' OR b.slug LIKE '%%%s%%' OR b.name LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : -1, stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['slug'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '') . ((strlen($value['slug']) > 0) ? ' - ' . __('Slug', 'thegem') . ': ' . $value['slug'] : '');
			$result[] = $data;
		}
	}

	return $result;
}

function TheGemTagRenderBySlugExact($query) {
	$query = $query['value'];
	$query = trim($query);
	$term = get_term_by('slug', $query, 'post_tag');

	return thegem_productAutocompleteOutput($term, true);
}

function TheGemPortfolioAutocompleteSuggesterById($query) {

	global $wpdb;
	$cat_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.ID AS id, a.post_title as name, a.post_name AS slug
					FROM {$wpdb->posts} AS a
					WHERE (a.post_type = 'thegem_pf_item') AND a.post_status = 'publish' AND (a.ID = '%d' OR a.post_name LIKE '%%%s%%' OR a.post_title LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : -1, stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['id'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '') . ((strlen($value['slug']) > 0) ? ' - ' . __('Slug', 'thegem') . ': ' . $value['slug'] : '');
			$result[] = $data;
		}
	}
	return $result;
}

function TheGemPostTypeAutocompleteSuggesterById($query, $tag = false, $param_name = false) {

	$out = [];
	$post_type = $param_name ? str_replace(array("source_post_type_", "_manual", "_exclude"), "", $param_name) : 'any';

	$posts = get_posts([
		'post_type' => $post_type,
		'post_status' => 'publish',
		'posts_per_page' => -1,
		's' => $query
	]);

	if (empty($posts) || is_wp_error($posts)) {
		return $out;
	}

	foreach ($posts as $post) {
		if (!empty($post->post_title)) {
			$data = array();
			$data['value'] = $post->ID;
			$data['label'] = $post->post_title . ' (' . $post->ID . ')';
			$out[] = $data;
		}
	}

	return $out;
}

function TheGemPostTypeRenderById($query) {
	$query = $query['value'];
	$query = trim($query);
	$post = get_post($query);

	$data = array();
	if (!empty($post) && !is_wp_error($post)) {
		$data['value'] = $post->ID;
		$data['label'] = $post->post_title . ' (' . $post->ID . ')';
	}

	return !empty($data) ? $data : false;
}

function TheGemTaxonomyTermsAutocompleteSuggesterBySlug($query, $tag, $param_name) {
	$out = [];
	if ($param_name == 'portfolios') {
		$tax_name = 'thegem_portfolios';
	} else {
		$tax_name = str_replace(array("content_portfolios_"), "", $param_name);
	}
	if (strpos($tax_name, '_tax_') > 0) {
		$tax_name = substr($tax_name,strpos($tax_name, '_tax_') + 5);
	}

	$tax = get_taxonomy($tax_name);

	if (empty($tax_name) || is_wp_error($tax)) {
		return $out;
	}

	$args = array(
		'taxonomy' => $tax_name,
		'hide_empty' => true,
		'name__like' => $query
	);

	$terms = get_terms($args);

	if (!empty($terms)) {
		foreach ($terms as $term) {
			$data = array();
			$data['value'] = $term->slug;
			$data['label'] = $term->name;
			$out[] = $data;
		}
	}

	return $out;
}

function TheGemTaxonomyTermsRenderBySlug($query, $settings) {
	$query = $query['value'];
	$query = trim($query);
	$param_name = $settings['param_name'];
	if ($param_name == 'portfolios') {
		$tax_name = 'thegem_portfolios';
	} else {
		$tax_name = str_replace(array("content_portfolios_"), "", $param_name);
	}
	if (strpos($tax_name, '_tax_') > 0) {
		$tax_name = substr($tax_name,strpos($tax_name, '_tax_') + 5);
	}
	$term = get_term_by('slug', $query, $tax_name);

	if (!empty($term) && !is_wp_error($term)) {
		$data['value'] = $term->slug;
		$data['label'] = $term->name;
	}

	return !empty($data) ? $data : false;
}

function TheGemTaxonomyAutocompleteSuggesterById($query, $tag = false, $param_name = false) {
	$out = [];
	$post_type = $param_name ? str_replace(array("source_post_type_", "exclude_", "_terms"), "", $param_name) : 'any';

	if ($post_type && $post_type != 'any') {
		if ($post_type == 'portfolio') {
			$post_type = 'thegem_pf_item';
		}
		$taxonomies = get_object_taxonomies($post_type);
	} else {
		$taxonomies = get_taxonomies(array(
			'public' => true,
		));
	}

	if (empty($taxonomies) || is_wp_error($taxonomies)) {
		return $out;
	}

	$args = array(
		'taxonomy' => $taxonomies,
		'hide_empty' => true,
		'name__like' => $query
	);

	$terms = get_terms( $args );

	if (!empty($terms)) {
		foreach ($terms as $term) {
			$data = array();
			$data['value'] = $term->taxonomy . '|' . $term->term_id;
			$data['label'] = $term->name . ' (' . $term->taxonomy . ')';
			$out[] = $data;
		}
	}

	return $out;
}

function TheGemTaxonomyRenderById($query) {
	$query = $query['value'];
	$query = trim($query);
	$arr = explode("|", $query);
	$term = get_term_by('id', $arr[1], $arr[0]);

	$data = array();
	if (!empty($term) && !is_wp_error($term)) {
		$data['value'] = $term->taxonomy . '|' . $term->term_id;
		$data['label'] = $term->name . ' (' . $term->taxonomy . ')';
	}

	return !empty($data) ? $data : false;
}

function TheGemPostAutocompleteSuggesterById($query) {

	global $wpdb;
	$cat_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.ID AS id, a.post_title as name, a.post_name AS slug
					FROM {$wpdb->posts} AS a
					WHERE (a.post_type = 'post' OR a.post_type = 'thegem_news') AND a.post_status = 'publish' AND (a.ID = '%d' OR a.post_name LIKE '%%%s%%' OR a.post_title LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : -1, stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['id'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '') . ((strlen($value['slug']) > 0) ? ' - ' . __('Slug', 'thegem') . ': ' . $value['slug'] : '');
			$result[] = $data;
		}
	}
	return $result;
}

function TheGemAuthorAutocompleteSuggesterById($query) {

	global $wpdb;
	$author_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.ID AS id, a.display_name AS name
					FROM {$wpdb->users} AS a
					INNER JOIN {$wpdb->posts} AS b ON b.post_author = a.ID
					WHERE b.post_status = 'publish' AND (a.ID = '%d' OR a.user_login LIKE '%%%s%%' OR a.user_nicename LIKE '%%%s%%' OR a.display_name LIKE '%%%s%%' )
 					GROUP BY a.ID", $author_id > 0 ? $author_id : -1, stripslashes($query), stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['id'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '');
			$result[] = $data;
		}
	}
	return $result;
}

function TheGemPostRenderByIdExact($query) {
	$query = $query['value'];
	$query = trim($query);
	$post = get_post($query);

	$post_output = new stdClass();
	$post_output->slug = $post->post_name;
	$post_output->name = $post->post_title;
	$post_output->term_id = $post->ID;

	return thegem_productAutocompleteOutput($post_output);
}

function TheGemAuthorRenderByIdExact($query) {
	$query = $query['value'];
	$query = trim($query);
	$author = get_user_by('id', $query);

	$post_output = new stdClass();
	$post_output->name = $author->display_name;
	$post_output->term_id = $author->ID;

	return thegem_productAutocompleteOutput($post_output);
}

function thegem_vc_get_featured_post_categories() {
	$query_args = array(
		'post_type' => array('post', 'thegem_news'),
		'post_status' => 'publish',
		'meta_query' => array(
			array(
				'key' => 'thegem_show_featured_posts_slider',
				'value' => 1
			)
		)
	);

	$query = new WP_Query($query_args);
	$categories = array();

	if ($query->have_posts()) {
		while($query->have_posts()) {
			$query->the_post();
			foreach (get_the_category() as $category) {
				$categories[$category->cat_ID] = $category;
			}
		}
	}

	$categories = array_values($categories);

	/*if (count($categories) > 1) {
		array_multisort(array_column($categories, 'name'), SORT_ASC, $categories);
	}*/

	$items = array();

	foreach ($categories as $category) {
		$items[$category->name.' ('.__('Posts', 'thegem').')'] = $category->slug;
	}

	return $items;
}

/*
function gem_counter_box_vc_controls() {
?>
<script type="text/html" id="vc_controls-template-gem-counter-box">
	<div class="vc_controls-container">
		<div class="vc_controls-out-tl">
			<div class="vc_element element-{{ tag }}">
				<a class="vc_control-btn vc_element-name vc_element-move"
					 title="<?php printf( __( 'Drag to move %s', 'thegem' ), '{{ name }}' ) ?>"><span
					class="vc_btn-content">{{ name }}</span></a>
				<a class="vc_control-btn vc_control-btn-prepend" href="#"
					 title="<?php printf( __( 'Prepend to %s', 'thegem' ), '{{ name }}' ) ?>"><span
					class="vc_btn-content"><span class="icon"></span></span></a>
				<a class="vc_control-btn vc_control-btn-clone" href="#"
					 title="<?php printf( __( 'Clone %s', 'thegem' ), '{{ name }}' ) ?>"><span
					class="vc_btn-content"><span class="icon"></span></span></a>
				<a class="vc_control-btn vc_control-btn-delete" href="#"
					 title="<?php printf( __( 'Delete %s', 'thegem' ), '{{ name }}' ) ?>"><span
					class="vc_btn-content"><span class="icon"></span></span></a>
			</div>
		</div>
		<div class="vc_controls-bc">
			<a class="vc_control-btn vc_control-btn-append" href="#"
				 title="<?php printf( __( 'Append to %s', 'thegem' ), '{{ name }}' ) ?>"><span
				class="vc_btn-content"><span class="icon"></span></span></a>
		</div>
	</div>
	<!-- end vc_controls-column -->
</script>
<?php
}
add_action('vc_frontend_editor_render_template', 'gem_counter_box_vc_controls');
*/

/*function thegem_custom_css_classes_for_vc_column($class_string, $tag) {
	if(!thegem_get_option('')) {
		global $vc_manager;
		if($vc_manager->mode() != 'admin_frontend_editor' && $vc_manager->mode() != 'admin_page' && $vc_manager->mode() != 'page_editable') {
			if($tag == 'vc_column' || $tag == 'vc_column_inner') {
				$class_string = preg_replace_callback('/vc_col-sm-(\d{1,2})/', 'thegem_vc_column_replace_classes', $class_string);
			}
		}
	}
	return $class_string;
}
add_filter('vc_shortcodes_css_class', 'thegem_custom_css_classes_for_vc_column', 10, 2);

function thegem_vc_column_replace_classes($matches) {
	$css_class = 'vc_col-md-'.$matches[1];
	if($matches[1] > 6) {
		$css_class .= ' vc_col-xs-12';
	}
	if($matches[1] < 7 && $matches[1] > 3) {
		$css_class .= ' vc_col-sm-6 vc_col-xs-12';
	}
	if($matches[1] == 3) {
		$css_class .= ' vc_col-xs-6';
	}
	if($matches[1] == 2) {
		$css_class .= ' vc_col-xs-3';
	}
	if($matches[1] == 1) {
		$css_class .= ' vc_col-sm-2 vc_col-xs-3';
	}
	return $css_class;
}*/

function thegem_printScriptsMessages() {
	if(in_array( get_post_type(), vc_editor_post_types())) {
		wp_enqueue_script('thegem_js_composer_js_custom_views');
	}
}

function thegem_add_tta_tabs_tour_accordion_color() {
	$param_thegem = array(__( 'TheGem', 'thegem' ) => 'thegem');
	$param = WPBMap::getParam( 'vc_tta_tabs', 'color' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	$param['std'] = 'thegem';
	vc_update_shortcode_param( 'vc_tta_tabs', $param );
	$param = WPBMap::getParam( 'vc_tta_tour', 'color' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	$param['std'] = 'thegem';
	vc_update_shortcode_param( 'vc_tta_tour', $param );
	$param = WPBMap::getParam( 'vc_tta_accordion', 'color' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	$param['std'] = 'thegem';
	vc_update_shortcode_param( 'vc_tta_accordion', $param );
}
add_action( 'vc_after_init', 'thegem_add_tta_tabs_tour_accordion_color' );

function thegem_add_tta_accordion_styles_icons() {
	$param = WPBMap::getParam( 'vc_tta_accordion', 'style' );
	$param['value'][__( 'Simple solid', 'thegem' )] = 'simple_solid';
	$param['value'][__( 'Simple dashed', 'thegem' )] = 'simple_dashed';
	$param['value'][__( 'Simple with arrow', 'thegem' )] = 'simple_arrow';
	vc_update_shortcode_param( 'vc_tta_accordion', $param );
	$param = WPBMap::getParam( 'vc_tta_accordion', 'c_icon' );
	$param['value'][__( 'Solid squared', 'thegem' )] = 'solid_squared';
	$param['value'][__( 'Solid rounded', 'thegem' )] = 'solid_rounded';
	$param['value'][__( 'Outlined rounded', 'thegem' )] = 'outlined_rounded';
	vc_update_shortcode_param( 'vc_tta_accordion', $param );
}
add_action( 'vc_after_init', 'thegem_add_tta_accordion_styles_icons' );

function thegem_add_vc_shortcodes_pagination_styles() {
	$param_thegem = array(
		__( 'None', 'thegem' ) => '',
		__( 'TheGem Circle', 'thegem' ) => 'thegem-circle',
		__( 'TheGem Square', 'thegem' ) => 'thegem-square'
	);
	$param = WPBMap::getParam( 'vc_tta_tabs', 'pagination_style' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	vc_update_shortcode_param( 'vc_tta_tabs', $param );
	$param = WPBMap::getParam( 'vc_tta_tour', 'pagination_style' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	vc_update_shortcode_param( 'vc_tta_tour', $param );
	$param = WPBMap::getParam( 'vc_tta_pageable', 'pagination_style' );
	$param['value'] = array_merge($param_thegem, $param['value']);
	$param['std'] = 'thegem-circle';
	vc_update_shortcode_param( 'vc_tta_pageable', $param );
}
add_action( 'vc_after_init', 'thegem_add_vc_shortcodes_pagination_styles' );

function thegem_add_vc_column_text_effects() {
	$param = WPBMap::getParam( 'vc_column_text', 'css_animation' );
	if($param['type'] == 'dropdown') {
		$param['value'][__( 'Fade', 'thegem' )] = 'fade';
		vc_update_shortcode_param( 'vc_column_text', $param );
	}
}
add_action( 'vc_after_init', 'thegem_add_vc_column_text_effects' );

function TheGemProductCategoryCategoryAutocompleteSuggester( $query, $slug = false ) {
	global $wpdb;
	$cat_id = (int) $query;
	$query = trim( $query );
	$post_meta_infos = $wpdb->get_results( $wpdb->prepare( "SELECT a.term_id AS id, b.name as name, b.slug AS slug
					FROM {$wpdb->term_taxonomy} AS a
					INNER JOIN {$wpdb->terms} AS b ON b.term_id = a.term_id
					WHERE a.taxonomy = 'product_cat' AND (a.term_id = '%d' OR b.slug LIKE '%%%s%%' OR b.name LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : - 1, stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );

	$result = array();
	if ( is_array( $post_meta_infos ) && ! empty( $post_meta_infos ) ) {
		foreach ( $post_meta_infos as $value ) {
			$data = array();
			$data['value'] = $slug ? $value['slug'] : $value['id'];
			$data['label'] = __( 'Id', 'thegem' ) . ': ' . $value['id'] . ( ( strlen( $value['name'] ) > 0 ) ? ' - ' . __( 'Name', 'thegem' ) . ': ' . $value['name'] : '' ) . ( ( strlen( $value['slug'] ) > 0 ) ? ' - ' . __( 'Slug', 'thegem' ) . ': ' . $value['slug'] : '' );
			$result[] = $data;
		}
	}

	return $result;
}

function TheGemProductAttributesAutocompleteSuggester( $query ) {
	global $wpdb;
	$term_id = (int) $query;
	$query = trim( $query );
	$post_meta_infos = $wpdb->get_results( $wpdb->prepare( "SELECT a.term_id AS id, b.attribute_name AS term_slug, b.attribute_label AS term_label, c.name as val_name, c.slug AS val_slug
					FROM {$wpdb->term_taxonomy} AS a
					INNER JOIN {$wpdb->prefix}woocommerce_attribute_taxonomies AS b ON a.taxonomy = CONCAT('pa_', b.attribute_name)
					INNER JOIN {$wpdb->terms} AS c ON c.term_id = a.term_id
					WHERE (a.term_id = '%d' OR b.attribute_name LIKE '%%%s%%' OR b.attribute_label LIKE '%%%s%%' OR c.slug LIKE '%%%s%%' OR c.name LIKE '%%%s%%' )", $term_id > 0 ? $term_id : - 1, stripslashes( $query ), stripslashes( $query ), stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );

	$post_meta_infos_all = $wpdb->get_results( $wpdb->prepare( "SELECT a.attribute_name AS term_slug, a.attribute_label AS term_label
					FROM {$wpdb->prefix}woocommerce_attribute_taxonomies AS a
					WHERE (a.attribute_name LIKE '%%%s%%' OR a.attribute_label LIKE '%%%s%%')", stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );

	$result = array();
	if ( is_array( $post_meta_infos_all ) && ! empty( $post_meta_infos_all ) ) {
		foreach ( $post_meta_infos_all as $value ) {
			$data = array();
			$data['value'] = $value['term_slug'].'|all';
			$data['label'] = $value['term_label'] . ' - ' . __( 'All', 'thegem' );
			$result[] = $data;
		}
	}
	if ( is_array( $post_meta_infos ) && ! empty( $post_meta_infos ) ) {
		foreach ( $post_meta_infos as $value ) {
			$data = array();
			$data['value'] = $value['term_slug'].'|'.$value['val_slug'];
			$data['label'] = $value['term_label'] . ' - ' . $value['val_name'];
			$result[] = $data;
		}
	}
//	$result = [['value'=> 'V1', 'label' => $wpdb->prepare( "SELECT a.term_id AS id, b.attribute_name AS term_slug, b.attribute_label AS term_label, c.name as val_name, c.slug AS val_slug
//					FROM {$wpdb->term_taxonomy} AS a
//					INNER JOIN {$wpdb->prefix}woocommerce_attribute_taxonomies AS b ON a.taxonomy = CONCAT('pa_', b.attribute_name)
//					INNER JOIN {$wpdb->terms} AS c ON c.term_id = a.term_id
//					WHERE (a.term_id = '%d' OR b.attribute_name LIKE '%%%s%%' OR b.attribute_label LIKE '%%%s%%' OR c.slug LIKE '%%%s%%' OR c.name LIKE '%%%s%%' )", $term_id > 0 ? $term_id : - 1, stripslashes( $query ), stripslashes( $query ), stripslashes( $query ), stripslashes( $query ) )],['value'=> 'V2', 'label' => 'L2']];

	return $result;
}

function get_woo_select_products_attributes() {
	global $wc_product_attributes;
	$out = [];

	if (empty($wc_product_attributes) || is_wp_error($wc_product_attributes)) {
		return $out;
	}

	foreach ((array)$wc_product_attributes as $attr) {
		if (!empty($attr->attribute_name)) {
			$out[$attr->attribute_name] = $attr->attribute_label;
		}
	}
	return $out;
}

if(!function_exists('get_woo_attribute_productGrid')) {
	function get_woo_attribute_productGrid($checkbox = false) {
		if ($checkbox) {
			$attributes = array();
		} else {
			$attributes = array(__('Select attribute', 'thegem') => '');
		}

		if ( class_exists( 'Woocommerce' ) ) {
			$attributes_taxonomy = wc_get_attribute_taxonomies();
			foreach ( $attributes_taxonomy as $attribute ) {
				$attributes[$attribute->attribute_label] = $attribute->attribute_name;
			}
		}

		return $attributes;
	}
}

if(!function_exists('get_woo_category_productGrid')) {
	function get_woo_category_productGrid($checkbox = false) {
		if ($checkbox == 'all'){
			$categories = array(__('All', 'thegem') => '0');
		} else if ($checkbox) {
			$categories = array();
		} else {
			$categories = array(__('Select category', 'thegem') => '');
		}

		$terms = get_terms([
			'taxonomy' => 'product_cat',
			'hide_empty' => true,
		]);

		if (empty($terms) || is_wp_error($terms)) {
			return $categories;
		}

		foreach ((array)$terms as $term) {
			if (!empty($term->name)) {
				$categories[$term->name] = $term->slug;
			}
		}

		return $categories;
	}
}

function thegem_shortcode_product_attribute_filter_param( $param_settings, $current_value, $map_settings, $atts ) {
	if ( class_exists( 'Vc_Vendor_Woocommerce' ) ) {
		$vc_vendor_wc = new Vc_Vendor_Woocommerce();
		return $vc_vendor_wc->productAttributeFilterParamValue( $param_settings, $current_value, $map_settings, $atts );
	}
	return '';
}

function TheGemProductCategoryCategoryAutocompleteSuggesterBySlug( $query ) {
	$result = TheGemProductCategoryCategoryAutocompleteSuggester( $query, true );
	return $result;
}

function TheGemProductCategoryCategoryRenderByIdExact( $query ) {
	$query = $query['value'];
	$cat_id = (int) $query;
	$term = get_term( $cat_id, 'product_cat' );

	return thegem_productAutocompleteOutput( $term );
}

function TheGemProductCategoryCategoryRenderBySlugExact( $query ) {
	$query = $query['value'];
	$query = trim( $query );
	$term = get_term_by( 'slug', $query, 'product_cat' );

	return thegem_productAutocompleteOutput( $term, true );
}

function thegem_productAutocompleteOutput( $term, $slug = false ) {
	$term_slug = $term->slug;
	$term_title = $term->name;
	$term_id = $term->term_id;

	$term_slug_display = '';
	if ( ! empty( $term_slug ) ) {
		$term_slug_display = ' - ' . __( 'Slug', 'thegem' ) . ': ' . $term_slug;
	}

	$term_title_display = '';
	if ( ! empty( $term_title ) ) {
		$term_title_display = ' - ' . __( 'Name', 'thegem' ) . ': ' . $term_title;
	}

	$term_id_display = __( 'Id', 'thegem' ) . ': ' . $term_id;

	$data = array();
	$data['value'] = $slug ? $term_slug : $term_id;
	$data['label'] = $term_id_display . $term_title_display . $term_slug_display;

	return ! empty( $data ) ? $data : false;
}

function TheGemProductAttributesRenderExact( $query ) {
	$query = $query['value'];
	$query = trim( $query );
	$query_arr = explode("|", $query);

	$data = array();

	if ( wc_attribute_label('pa_'.$query_arr[0]) ) {

		if ($query_arr[1] == 'all') {
			$term_slug = 'all';
			$term_name = __( 'All', 'thegem' );
		} else {
			$term = get_term_by( 'slug', $query_arr[1], 'pa_'.$query_arr[0] );
			$term_slug = $term->slug;
			$term_name = $term->name;
		}

		$data['value'] = $query_arr[0].'|'.$term_slug;
		$data['label'] = wc_attribute_label('pa_'.$query_arr[0]) . ' - ' . $term_name;
	}

	return ! empty( $data ) ? $data : false;
}

function TheGemProductTagsAutocompleteSuggester( $query ) {
	global $wpdb;
	$cat_id = (int) $query;
	$query = trim( $query );
	$post_meta_infos = $wpdb->get_results( $wpdb->prepare( "SELECT a.term_id AS id, b.name as name, b.slug AS slug
					FROM {$wpdb->term_taxonomy} AS a
					INNER JOIN {$wpdb->terms} AS b ON b.term_id = a.term_id
					WHERE a.taxonomy = 'product_tag' AND (a.term_id = '%d' OR b.slug LIKE '%%%s%%' OR b.name LIKE '%%%s%%' )", $cat_id > 0 ? $cat_id : - 1, stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );

	$result = array();
	if ( is_array( $post_meta_infos ) && ! empty( $post_meta_infos ) ) {
		foreach ( $post_meta_infos as $value ) {
			$data = array();
			$data['value'] = $value['slug'];
			$data['label'] = __( 'Id', 'thegem' ) . ': ' . $value['id'] . ( ( strlen( $value['name'] ) > 0 ) ? ' - ' . __( 'Name', 'thegem' ) . ': ' . $value['name'] : '' ) . ( ( strlen( $value['slug'] ) > 0 ) ? ' - ' . __( 'Slug', 'thegem' ) . ': ' . $value['slug'] : '' );
			$result[] = $data;
		}
	}

	return $result;
}

function TheGemProductTagsRenderExact( $query ) {
	$query = $query['value'];
	$query = trim( $query );
	$term = get_term_by( 'slug', $query, 'product_tag' );

	return thegem_productAutocompleteOutput( $term, true );
}

function TheGemProductsAutocompleteSuggester($query) {

	global $wpdb;
	$product_id = (int)$query;
	$query = trim($query);
	$post_meta_infos = $wpdb->get_results($wpdb->prepare("SELECT a.ID AS id, a.post_title as name, a.post_name AS slug
					FROM {$wpdb->posts} AS a
					WHERE a.post_type = 'product' AND a.post_status = 'publish' AND (a.ID = '%d' OR a.post_name LIKE '%%%s%%' OR a.post_title LIKE '%%%s%%' )", $product_id > 0 ? $product_id : -1, stripslashes($query), stripslashes($query)), ARRAY_A);

	$result = array();
	if (is_array($post_meta_infos) && !empty($post_meta_infos)) {
		foreach ($post_meta_infos as $value) {
			$data = array();
			$data['value'] = $value['id'];
			$data['label'] = __('Id', 'thegem') . ': ' . $value['id'] . ((strlen($value['name']) > 0) ? ' - ' . __('Name', 'thegem') . ': ' . $value['name'] : '') . ((strlen($value['slug']) > 0) ? ' - ' . __('Slug', 'thegem') . ': ' . $value['slug'] : '');
			$result[] = $data;
		}
	}
	return $result;
}

function TheGemProductsRenderExact($query) {
	$query = $query['value'];
	$query = trim($query);
	$post = get_post($query);

	$post_output = new stdClass();
	$post_output->slug = $post->post_name;
	$post_output->name = $post->post_title;
	$post_output->term_id = $post->ID;

	return thegem_productAutocompleteOutput($post_output);
}

function thegem_socials_shortcode($atts) {
	$atts = shortcode_atts(array(
		'style' => 'default',
		'colored' => 'default',
		'color' => '',
		'alignment' => 'left',
		'icons_size' => 16,
		'socials' => urlencode(json_encode(array(
			array(
				'social' => 'facebook',
				'url' => '#',
			),
			array(
				'social' => 'twitter',
				'url' => '#',
			),
			array(
				'social' => 'instagram',
				'url' => '#',
			),
		)))
	), $atts, 'gem_socials');
	if($atts['colored'] != 'custom') {
		$atts['color'] = '';
	}
	$socials = vc_param_group_parse_atts($atts['socials']);
	$socials_html = '';
	foreach($socials as $social) {
		$social = shortcode_atts(array(
			'social' => 'facebook',
			'url' => '#',
		), $social);
		if(function_exists('thegem_additionals_socials_enqueue_style')){
			thegem_additionals_socials_enqueue_style($social['social']);
		}
		$socials_html .= '<a class="socials-item" target="_blank" href="'.$social['url'].'"'.($atts['color'] ? ' style="color: '.$atts['color'].';"' : '').'><i class="socials-item-icon '.$social['social'].'" style="font-size: '.$atts['icons_size'].'px"></i></a>';
	}
	return '<div class="socials socials-list '.($atts['colored'] != 'custom' ? 'socials-colored' : 'socials-colored-hover').' socials-'.$atts['style'].' socials-alignment-'.$atts['alignment'].'">'.$socials_html.'</div>';
}

add_action( 'vc_before_init', 'thegem_disable_vc_updater' );
function thegem_disable_vc_updater() {
	global $vc_manager;
	$vc_manager->disableUpdater(true);
}

function thegem_search_form_shortcode($atts) {
	$atts = shortcode_atts(array(
		'style' => 'light',
		'alignment' => 'left',
		'placeholder' => __('Search', 'thegem'),
		'height' => '',
		'disable_margins' => '0',
		'border_width' => '',
		'border_radius' => '',
		'border_color' => '',
		'text_color' => '',
		'placeholder_color' => '',
		'icon_color' => '',
	), $atts, 'gem_search_form');

	$uniqid = uniqid('thegem-custom-') . rand(1, 9999);
	$customize = '.gem-search-form.'.$uniqid;
	$custom_css = '';

	if (!empty($atts['disable_margins'])) {
		$custom_css .= $customize . ' {margin: 0;}';
	}
	if (!empty($atts['height'])) {
		$custom_css .= $customize . ' .search-field {height: ' . $atts['height'] . 'px;}';
	}
	if (!empty($atts['border_width'])) {
		$custom_css .= $customize . ' .search-field {border-width: ' . $atts['border_width'] . 'px;}';
	}
	if (!empty($atts['border_radius'])) {
		$custom_css .= $customize . ' .search-field {border-radius: ' . $atts['border_radius'] . 'px;}';
	}
	if (!empty($atts['border_color'])) {
		$custom_css .= $customize . ' .search-field {border-color: ' . $atts['border_color'] . ';}';
	}
	if (!empty($atts['text_color'])) {
		$custom_css .= $customize . ' .search-field {color: ' . $atts['text_color'] . ';}';
	}
	if (!empty($atts['placeholder_color'])) {
		$custom_css .= $customize . ' .search-field::placeholder {color: ' . $atts['placeholder_color'] . ';}';
	}
	if (!empty($atts['icon_color'])) {
		$custom_css .= $customize . ' .search-submit {color: ' . $atts['icon_color'] . ';}';
	}

	$output = '<div class="gem-search-form gem-search-form-style-'.$atts['style'].' gem-search-form-alignment-'.$atts['alignment'].' '.esc_attr($uniqid).'">';
	$output .= '<form role="search" method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">'.
		'<input class="search-field" type="search" name="s" placeholder="'.$atts['placeholder'].'" />'.
		'<button class="search-submit" type="submit"></button>'.
		'</form>';
	if(!empty($custom_css)) {
		$output .= '<style>'.$custom_css.'</style>';
	}
	$output .= '</div>';

	return $output;
}

function thegem_icon_settings_field( $settings, $value ) {
	add_thickbox();
	wp_enqueue_style('icons-'.$settings['icon_pack']);
	wp_enqueue_script('thegem-icons-picker');
	return '<div class="thegem_icon_block">'
		.'<input name="' . esc_attr( $settings['param_name'] ) . '" class="wpb_vc_param_value wpb-textinput icons-picker ' .
		esc_attr( $settings['param_name'] ) . ' ' .
		esc_attr( $settings['type'] ) . '_field" type="text" value="' . esc_attr( $value ) . '" data-iconpack="'.esc_attr( $settings['icon_pack'] ).'" />'
		.'</div>'.
		'<script type="text/javascript">'.
		'(function($) {'.
		'$(function() {'.
		'jQuery(\'.icons-picker\').iconsPicker();'.
		'});'.
		'})(jQuery);'.
		'</script>';
}

function thegem_dropdown_arrows_settings_field($settings, $value) {
	wp_enqueue_style('icons-arrows');

	$output = '<div class="thegem_dropdown_arrows_field_box">';
	$output.= '<div class="thegem_dropdown_arrows_icon"><i class="icon_style_'.esc_attr($value).'"></i></div>';
	$output.= '<div class="thegem_dropdown_arrows_field">';
	$output.= '<select name="'.esc_attr($settings['param_name']).'" class="wpb_vc_param_value wpb-input wpb-select dropdown '.esc_attr($settings['param_name']).'_field">';

	foreach ($settings['value'] as $k=>$v) {
		$selected = esc_attr($value) == esc_attr($v) ? ' selected="selected"':'';
		$output .= '<option value="'.esc_attr($v).'"'.$selected.'>'.esc_attr($k).'</option>';
	}

	$output.= '</select>';
	$output.= '</div>';

	$output.= '<script type="text/javascript">
		(function($) {
			$(".thegem_dropdown_arrows_field").on("change", "select", function() {
				var val = $(this).children("option:selected").val();
				var $icon = $(this).closest(".thegem_dropdown_arrows_field_box").find(".thegem_dropdown_arrows_icon>i");
				$icon.removeAttr("class");
				$icon.addClass("icon_style_"+val);
			});
		})(jQuery);
	</script>';

	$output.= '</div>';

	return $output;
}

function thegem_hidden_param_settings_field( $settings, $value ) {
	return '<input name="' . esc_attr( $settings['param_name'] ) . '" class="wpb_vc_param_value wpb-hidden-input ' .
		esc_attr( $settings['param_name'] ) . ' ' .
		esc_attr( $settings['type'] ) . '_field" type="hidden" value="' . esc_attr( $value ) . '" />';
}

/* COUNTDOWN */
function thegem_datepickerTimeToTimestamp($eventdate){
	$date = preg_split('//u',$eventdate,-1,PREG_SPLIT_NO_EMPTY);
	$day = $date[0].$date[1];
	$month = $date[3].$date[4];
	$year = $date[6].$date[7].$date[8].$date[9];

	return mktime(0, 0, 0, $month, $day, $year);
}

function thegem_countdown_shortcode($atts){
	extract(shortcode_atts(array(
		'style' => 'style-3',
		'eventdate' => date('d-m-Y', (time() + 84900)),
		'start_eventdate' => date('d-m-Y', (time() - 84900)),
		'aligment' => 'align-left',
		'extraclass' => '',
		'color_number' => '#333333',
		'color_text' => '#333333',
		'color_border' => '#333333',
		'color_background' => '',
		'countdown_text' => '',
		'color_days' => '#333333',
		'color_hours' => '#333333',
		'color_minutes' => '#333333',
		'color_seconds' => '#333333',
		'weight_number' => 8
	), $atts, 'gem_countdown'));

	wp_enqueue_script('thegem-countdown');
	wp_enqueue_style('thegem-countdown');
	$eventdate_timestamp = thegem_datepickerTimeToTimestamp($eventdate);
	$eventdate_start_timestamp = thegem_datepickerTimeToTimestamp($start_eventdate);

	if ($style == 'style-3'){
		$output  = "<div data-eventdate='".esc_attr($eventdate_timestamp)."' class='countdown-container countdown-style-3 ".esc_attr($extraclass)."'>";
		$output .= "<div class='countdown-wrapper countdown-info'>";
		$output .= "<div class='countdown-item count-1'><div class='wrap' style='background:".esc_attr($color_background)."; border-color: ".esc_attr($color_border)."'><span class='item-count countdown-days title-h1' style='color:".esc_attr($color_number)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Days', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-2'><div class='wrap' style='background:".esc_attr($color_background)."; border-color: ".esc_attr($color_border)."'><span class='item-count countdown-hours title-h1' style='color:".esc_attr($color_number)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Hours', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-3'><div class='wrap' style='background:".esc_attr($color_background)."; border-color: ".esc_attr($color_border)."'><span class='item-count countdown-minutes title-h1' style='color:".esc_attr($color_number)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Minutes', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-4'><div class='wrap' style='background:".esc_attr($color_background)."; border-color: ".esc_attr($color_border)."'><span class='item-count countdown-seconds title-h1' style='color:".esc_attr($color_number)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Seconds', 'thegem')."</span></div></div>";
		$output .= "</div></div><div style='clear: both'></div>";

		return $output;
	}

	if ($style == 'style-4'){
		$output  = "<div data-eventdate='".esc_attr($eventdate_timestamp)."' class='countdown-container countdown-style-4 ".esc_attr($aligment)." ".esc_attr($extraclass)."'>";
		$output .= "<div class='countdown-wrapper countdown-info'>";
		$output .= "<div class='countdown-item count-1'><div class='wrap' style='border-color: ".esc_attr($color_border)."'><span class='item-count countdown-days title-h2' style='color:".esc_attr($color_number)."'></span><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Days', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-2'><div class='wrap' style='border-color: ".esc_attr($color_border)."'><span class='item-count countdown-hours title-h2' style='color:".esc_attr($color_number)."'></span><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Hours', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-3'><div class='wrap' style='border-color: ".esc_attr($color_border)."'><span class='item-count countdown-minutes title-h2' style='color:".esc_attr($color_number)."'></span><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Minutes', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-4'><div class='wrap'><span class='item-count countdown-seconds title-h2' style='color:".esc_attr($color_number)."'></span><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Seconds', 'thegem')."</span></div></div>";
		$output .= "</div></div><div style='clear: both;'></div>";

		return $output;
	}

	$weight_class = '';
	if($weight_number == 4){
		$weight_class = 'light';
	}

	if ($style == 'style-5'){
		$output  = "<div data-eventdate='".esc_attr($eventdate_timestamp)."' data-starteventdate='".esc_attr($eventdate_start_timestamp)."'  data-colordays='".esc_attr($color_days)."' data-colorhours='".esc_attr($color_hours)."' data-colorminutes='".esc_attr($color_minutes)."' data-colorseconds='".esc_attr($color_seconds)."' data-weightnumber='".esc_attr($weight_number)."' class='countdown-container countdown-style-5 ".esc_attr($aligment)." ".esc_attr($extraclass)."'>";
		$output .= "<div class='countdown-wrapper countdown-info'>";
		$output .= "<div class='countdown-item count-1'><div class='circle-raphael-days'></div><div class='wrap'><span class='item-count countdown-days title-h1 ".$weight_class."' style='color:".esc_attr($color_days )."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Days', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-2'><div class='circle-raphael-hours'></div><div class='wrap'><span class='item-count countdown-hours title-h1 ".$weight_class."' style='color:".esc_attr($color_hours)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Hours', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-3'><div class='circle-raphael-minutes'></div><div class='wrap'><span class='item-count countdown-minutes title-h1 ".$weight_class."' style='color:".esc_attr($color_minutes)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Minutes', 'thegem')."</span></div></div>";
		$output .= "<div class='countdown-item count-4'><div class='circle-raphael-seconds'></div><div class='wrap'><span class='item-count countdown-seconds title-h1 ".$weight_class."' style='color:".esc_attr($color_seconds)."'></span><span class='item-title styled-subtitle' style='color:".esc_attr($color_text)."'>".__('Seconds', 'thegem')."</span></div></div>";
		$output .= "</div></div><div style='clear: both'></div>";


		return $output;
	}

	if ($style == 'style-6'){
		$output  = "<div data-eventdate='".esc_attr($eventdate_timestamp)."' class='countdown-container countdown-style-6 ".esc_attr($aligment)." ".esc_attr($extraclass)."'>";
		$output .= "<div class='countdown-wrapper countdown-info'>";
		$output .= "<div class='countdown-item count-1'><div class='wrap'><div class='countdown-item-border-1' style='background:".esc_attr($color_border)."'></div><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Days', 'thegem')."</span><span class='item-count countdown-days title-xlarge' style='color:".esc_attr($color_number)."'></span></div></div>";
		$output .= "<div class='countdown-item count-2'><div class='wrap'><div class='countdown-item-border-2' style='background:".esc_attr($color_border)."'></div><span class='item-title' style='color:".esc_attr($color_text) ."'>".__('Hours', 'thegem')."</span><span class='item-count countdown-hours title-xlarge' style='color:".esc_attr($color_number)."'></span></div></div>";
		$output .= "<div class='countdown-item count-3'><div class='wrap'><div class='countdown-item-border-3' style='background:".esc_attr($color_border)."'></div><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Minutes', 'thegem')."</span><span class='item-count countdown-minutes title-xlarge' style='color:".esc_attr($color_number)."'></span></div></div>";
		$output .= "<div class='countdown-item count-4'><div class='wrap'><div class='countdown-item-border-4' style='background:".esc_attr($color_border)."'></div><span class='item-title' style='color:".esc_attr($color_text)."'>".__('Seconds', 'thegem')."</span><span class='item-count countdown-seconds title-xlarge' style='color:".esc_attr($color_number)."'></span></div></div>";
		$output .= "</div></div><div style='clear: both'></div>";

		return $output;
	}

	if ($style == 'style-7'){
		$output  = "<div data-eventdate='".esc_attr($eventdate_timestamp)."' class='countdown-container countdown-style-7 ".esc_attr($aligment)." ".esc_attr($extraclass)."'>";
		$output .= "<div class='countdown-wrapper countdown-info'>";
		$output .= "<div class='countdown-item'><div class='wrap'><span class='item-count countdown-days title-xlarge' style='color:".esc_attr($color_number)."'></span></div>";
		if(!empty($countdown_text)){
			$output .= "<div class='countdown-text styled-subtitle' style='color:".esc_attr($color_text)."'>". $countdown_text ."</div>";
		}
		$output .= "</div></div></div><div style='clear: both'></div>";

		return $output;
	}
}

function thegem_datepicker_param_settings_field($settings, $value){
	return "<input class='countdown_datepicker wpb_vc_param_value wpb-textinput " . esc_attr( $settings['param_name'] ) . ' ' .esc_attr( $settings['type'] ) . "_field' type='text' name='" . esc_attr( $settings['param_name'] ) . "' value='". $value ."'><script>jQuery(\".countdown_datepicker\").each(function () {
			if(!jQuery(this).data('datepicker')) {
				 jQuery(this).data('datepicker', true);
					jQuery(this).datepicker({
					constraintInput:true,
					dateFormat: \"dd-mm-yy\",
					showOtherMonths: true,
					selectOtherMonths: true,
					beforeShow: function(input, inst) {
						if(!inst.dpDiv.parent('.ui-lightness').length) {
							inst.dpDiv.wrap('<div class=\"ui-lightness\"/>');
						}
					}
				});
			}
		});</script>";

}

add_action('admin_enqueue_scripts', 'thegem_countdown_admin_styles');
function thegem_countdown_admin_styles(){
	wp_enqueue_style('jquery-ui-lightness', THEGEM_THEME_URI . '/css/jquery-ui/ui-lightness/jquery-ui.css', array(), THEGEM_THEME_VERSION);
	wp_enqueue_script('jquery-ui-datepicker');
}

function thegem_remove_wpautop( $content, $autop = false ) {
	if ( $autop ) {
		$content = wpautop( preg_replace( '/<\/?p\>/', "\n", $content ) . "\n" );
	}
	return do_shortcode( shortcode_unautop( $content ) );
}

add_shortcode('gem_instagram_gallery', 'thegem_instagram_gallery_shortcode');
function thegem_instagram_gallery_shortcode($atts) {
	$atts = shortcode_atts(array(
		'instagram' => '',
		'title' => '',
		'layout' => '3x',
		'no_gaps' => '',
		'autoscroll' => false,
		'hover' => 'default',
		'effects_enabled' => false,
		'gaps_size' => 42,
		'arrow' => 'portfolio_slider_arrow_big',
	), $atts, 'gem_instagram_gallery');
	if(thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="instagram-shortcode-dummy"></div>';
		}
	}
	ob_start();
	thegem_instagram_gallery($atts);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	return $return_html;
}

function thegem_shortcode_product_class_init() {
	class TheGem_WC_Shortcode_Products extends WC_Shortcode_Products {
		protected function product_loop() {

			$columns = absint( $this->attributes['columns'] );
			$classes = $this->get_wrapper_classes( $columns );
			$products = $this->get_query_results();

			ob_start();

			if ( $products && $products->ids ) {
				// Prime meta cache to reduce future queries.
				update_meta_cache( 'post', $products->ids );
				update_object_term_cache( $products->ids, 'product' );

				// Setup the loop.
				wc_setup_loop( array(
					'columns'	  => $columns,
					'name'		 => $this->type,
					'is_shortcode' => true,
					'is_search'	=> false,
					'is_paginated' => wc_string_to_bool( $this->attributes['paginate'] ),
					'total'		=> $products->total,
					'total_pages'  => $products->total_pages,
					'per_page'	 => $products->per_page,
					'current_page' => $products->current_page,
				) );

				$original_post = $GLOBALS['post'];

				do_action( "woocommerce_shortcode_before_{$this->type}_loop", $this->attributes );

				// Fire standard shop loop hooks when paginating results so we can show result counts and so on.
				if ( wc_string_to_bool( $this->attributes['paginate'] ) ) {
					do_action( 'woocommerce_before_shop_loop' );
				}

				woocommerce_product_loop_start();
				$p_query = new WP_Query( $this->query_args );
				do_action( 'thegem_products_loop_start', $p_query );

				if ( wc_get_loop_prop( 'total' ) ) {
					foreach ( $products->ids as $product_id ) {
						$GLOBALS['post'] = get_post( $product_id ); // WPCS: override ok.
						setup_postdata( $GLOBALS['post'] );

						// Set custom product visibility when quering hidden products.
						add_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) );

						// Render product template.
						wc_get_template_part( 'content', 'product' );

						// Restore product visibility.
						remove_action( 'woocommerce_product_is_visible', array( $this, 'set_product_as_visible' ) );
					}
				}

				do_action( 'thegem_products_loop_end', $p_query );

				$GLOBALS['post'] = $original_post; // WPCS: override ok.
				woocommerce_product_loop_end();

				// Fire standard shop loop hooks when paginating results so we can show result counts and so on.
				if ( wc_string_to_bool( $this->attributes['paginate'] ) ) {
					do_action( 'woocommerce_after_shop_loop' );
				}

				do_action( "woocommerce_shortcode_after_{$this->type}_loop", $this->attributes );

				wp_reset_postdata();
				wc_reset_loop();
			} else {
				do_action( "woocommerce_shortcode_{$this->type}_loop_no_results", $this->attributes );
			}

			return '<div class="' . esc_attr( implode( ' ', $classes ) ) . '">' . ob_get_clean() . '</div>';
		}

		/**
		 * Parse query args.
		 *
		 * @since  3.2.0
		 * @return array
		 */
		protected function parse_query_args() {
			$query_args = array(
				'post_type'		   => 'product',
				'post_status'		 => 'publish',
				'ignore_sticky_posts' => true,
				'no_found_rows'	   => false === wc_string_to_bool( $this->attributes['paginate'] ),
				'orderby'			 => empty( $_GET['orderby'] ) ? $this->attributes['orderby'] : wc_clean( wp_unslash( $_GET['orderby'] ) ),
			);

			$orderby_value		 = explode( '-', $query_args['orderby'] );
			$orderby			   = esc_attr( $orderby_value[0] );
			$order				 = ! empty( $orderby_value[1] ) ? $orderby_value[1] : strtoupper( $this->attributes['order'] );
			$query_args['orderby'] = $orderby;
			$query_args['order']   = $order;

			if ( wc_string_to_bool( $this->attributes['paginate'] ) ) {
				$this->attributes['page'] = absint( empty( $_GET['product-page'] ) ? 1 : $_GET['product-page'] ); // WPCS: input var ok, CSRF ok.
			}

			if ( ! empty( $this->attributes['rows'] ) ) {
				$this->attributes['limit'] = $this->attributes['columns'] * $this->attributes['rows'];
			}

			// @codingStandardsIgnoreStart
			$ordering_args				= WC()->query->get_catalog_ordering_args( $query_args['orderby'], $query_args['order'] );
			$query_args['orderby']		= $ordering_args['orderby'];
			$query_args['order']		  = $ordering_args['order'];
			if ( $ordering_args['meta_key'] ) {
				$query_args['meta_key']	   = $ordering_args['meta_key'];
			}
			$query_args['posts_per_page'] = intval( $this->attributes['limit'] );
			if ( 1 < $this->attributes['page'] ) {
				$query_args['paged']		  = absint( $this->attributes['page'] );
			}
			$query_args['meta_query']	 = WC()->query->get_meta_query();
			$query_args['tax_query']	  = array();
			// @codingStandardsIgnoreEnd

			// Visibility.
			$this->set_visibility_query_args( $query_args );

			// SKUs.
			$this->set_skus_query_args( $query_args );

			// IDs.
			$this->set_ids_query_args( $query_args );

			// Set specific types query args.
			if ( method_exists( $this, "set_{$this->type}_query_args" ) ) {
				$this->{"set_{$this->type}_query_args"}( $query_args );
			}

			// Set Featured and On Sale Settings for Thegem Products Grid Shortcode
			if ( isset($this->attributes['thegem_grid_params']) ){
				if ( isset($this->attributes['thegem_grid_params']['gem_product_grid_featured_products']) && $this->attributes['thegem_grid_params']['gem_product_grid_featured_products'] == 1 ){
					$this->set_visibility_featured_query_args( $query_args );
				}

				if ( isset($this->attributes['thegem_grid_params']['gem_product_grid_onsale_products']) && $this->attributes['thegem_grid_params']['gem_product_grid_onsale_products'] == 1 ){
					$this->set_sale_products_query_args( $query_args );
				}
			}

			// Attributes.
			$this->set_attributes_query_args( $query_args );

			// Categories.
			$this->set_categories_query_args( $query_args );

			// Tags.
			$this->set_tags_query_args( $query_args );

			$query_args = apply_filters( 'woocommerce_shortcode_products_query', $query_args, $this->attributes, $this->type );

			// Always query only IDs.
			$query_args['fields'] = 'ids';

			return $query_args;
		}
	}
}

function thegem_featured_posts_slider_shortcode($atts) {

	if (thegem_is_plugin_active('js_composer/js_composer.php')) {
		global $vc_manager;
		if ($vc_manager->mode() == 'admin_frontend_editor' || $vc_manager->mode() == 'admin_page' || $vc_manager->mode() == 'page_editable') {
			return '<div class="gem-featured-posts-slider-shortcode-dummy"></div>';
		}
	}

	$related_by_categories = '';
	if (!empty($atts['related_by_categories'])) {
		$related_by_categories = $atts['related_by_categories'];
	}
	$related_by_tags = '';
	if (!empty($atts['related_by_tags'])) {
		$related_by_tags = $atts['related_by_tags'];
	}
	$related_by_author = '';
	if (!empty($atts['related_by_author'])) {
		$related_by_author = $atts['related_by_author'];
	}

	$source_type = $atts['source_type'] ?? '';
	$new_related = isset($atts['new_related']);

	$atts = vc_map_get_attributes('gem_featured_posts_slider', $atts);

	$button_params = array();
	if (is_array($atts)) {
		foreach ($atts as $key => $value) {
			if (substr($key, 0, 7) == 'button_') {
				$button_params[substr($key, 7)] = $value;
			}
		}
	}

	$paginator_params = array();
	if (is_array($atts)) {
		foreach ($atts as $key => $value) {
			if (substr($key, 0, 10) == 'paginator_') {
				$paginator_params[substr($key, 10)] = $value;
			}
		}
	}

	$atts['button'] = $button_params;
	$atts['paginator'] = $paginator_params;

	if (!empty($source_type) && !$new_related) {
		if ($source_type == 'related') {
			$atts['query_type'] = 'related';
			$taxonomy_related = [];
			if ($related_by_categories) {
				$taxonomy_related[] = 'category';
			}
			if ($related_by_tags) {
				$taxonomy_related[] = 'post_tag';
			}
			if ($related_by_author) {
				$taxonomy_related[] = 'authors';
			}
			$atts['taxonomy_related'] = implode(',', $taxonomy_related);
			$atts['exclude_posts_manual_type'] = 'current';
		} else if ($source_type == 'archive') {
			$atts['query_type'] = 'archive';
		} else {
			$atts['query_type'] = 'post';
		}
	}

	ob_start();
	gem_featured_posts_slider($atts);
	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));

	return $return_html;
}

function thegem_heading_shortcode($atts) {
	ob_start();
	$atts1 = $atts;
	$atts = vc_map_get_attributes('gem_heading', $atts);
	$atts = array_merge($atts, $atts1);
	thegem_heading($atts);

	$params = array_merge(array(
		'desktop_padding_top' => '',
		'desktop_padding_bottom' => '',
		'desktop_padding_left' => '',
		'desktop_padding_right' => '',
		'desktop_margin_top' => '',
		'desktop_margin_bottom' => '',
		'desktop_margin_left' => '',
		'desktop_margin_right' => '',
	), $atts);

	// Init Design Options Params
	$custom_css = $uniqid = $return_html = '';
	$uniqid = uniqid('thegem-custom-').rand(1,9999);
	$custom_css = thegem_templates_element_design_options($uniqid, '.thegem-te-heading', $params);

	$return_html .= '<div class="thegem-te-heading '.esc_attr($uniqid).'" '.thegem_data_editor_attribute($uniqid.'-editor').'>';
	$return_html .= trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));
	$return_html .= '</div>';

	if (!empty($params['heading_inline'])) {
		$custom_css .= '.thegem-te-heading.'.$uniqid.', .vc_gem_heading.'.$uniqid.'-editor {display: inline-flex !important;}';
	}

	// Print custom css
	if(!empty($custom_css)) {
		$return_html .= '<style>'. esc_js($custom_css) .'</style>';
	}

	if (!empty($params['heading_inline'])) {
		$return_html .= ' ';
	}

	return $return_html;
}

function thegem_get_section_templates_list() {
	$templates = array();
	$templates_list = thegem_get_templates('content');
	foreach ($templates_list as $template) {
		$templates[$template->ID] = $template->post_title . ' (ID = ' . $template->ID . ')';
	}
	return $templates;
}

function thegem_template_shortcode($atts) {
	$atts = shortcode_atts(array(
		'id' => 0,
	), $atts, 'gem_template');

	$atts['id'] = intval($atts['id']);
	$return_html = '<p>'.esc_html__('Global Section', 'thegem').'</p>';
	if($atts['id'] > 0 && $template = get_post($atts['id'])) {
		$return_html = do_shortcode($template->post_content);
		$custom_css = get_post_meta($atts['id'], '_wpb_shortcodes_custom_css', true) . get_post_meta($atts['id'], '_wpb_post_custom_css', true);
		$custom_css = str_replace(array("\n", "\r"), '', $custom_css);
		if($custom_css) {
			$return_html = '<style>' . esc_js($custom_css) . '</style>' . $return_html;
		}
		if(function_exists('vc_is_page_editable') && vc_is_page_editable()) {
			$template_link = vc_frontend_editor()->getInlineUrl('', $atts['id']);
			$button = '<a class="thegem-template-edit-button" href="'.$template_link.'" target="_blank">'.esc_html__('Edit Template ', 'thegem').'</a>';
			$return_html = $button.$return_html;
		}
		$return_html = '<div class="thegem-template-wrapper thegem-template-content thegem-template-' . esc_attr($atts['id']) . '">' . $return_html . '</div>';
	}

	return $return_html;
}

function thegem_infotext_shortcode($atts) {
	$params = shortcode_atts(array(
		//General
		'preset' => 'tiny',
		'infobox_alignment' => 'left',
		'element_id' => '',
		'extra_class' => '',
		'element_link' => '',
		'icon_position_to_text' => 'left',
		'icon_horizontal_align' => 'left',
		'icon_vertical_align' => 'center',
		//Icon
		'icon_image' => 'icon',
		'image' => '',
		'pack' => 'thegem-header',
		'icon_elegant' => '',
		'icon_material' => '',
		'icon_fontawesome' => '',
		'icon_thegemdemo' => '',
		'icon_userpack' => '',
		'icon_thegem_header' => 'e622',
		'shape' => 'simple',
		'style' => '',
		'color' => '',
		'hover_color' => '',
		'gradient_color_style' => 'linear',
		'color_2' => '',
		'hover_color_2' => '',
		'gradient_radial_color_position' => 'at top',
		'gradient_color_angle' => 'to bottom',
		'gradient_color_cusotom_deg' => '',
		'background_color' => '',
		'hover_background_color' => '',
		'border_color' => '',
		'hover_border_color' => '',
		'gradient_backgound' => '',
		'gradient_backgound_from' => '',
		'gradient_backgound_to' => '',
		'gradient_backgound_style' => 'linear',
		'gradient_radial_backgound_position' => 'at top',
		'gradient_backgound_angle' => 'to bottom',
		'gradient_backgound_cusotom_deg' => '',
		'size' => 'custom',
		'icon_size' => '16',
		'link' => 'custom',
		'icon_desktop_spacing_top' => '-2',
		'icon_desktop_spacing_bottom' => '',
		'icon_desktop_spacing_left' => '',
		'icon_desktop_spacing_right' => '8',
		'icon_tablet_spacing_top' => '',
		'icon_tablet_spacing_bottom' => '',
		'icon_tablet_spacing_left' => '',
		'icon_tablet_spacing_right' => '',
		'icon_mobile_spacing_top' => '',
		'icon_mobile_spacing_bottom' => '',
		'icon_mobile_spacing_left' => '',
		'icon_mobile_spacing_right' => '',
		//Title
		'title' => '',
		'title_source' => 'custom_text',
		'title_post_type' => thegem_cf_get_edit_template_type(),
		'title_output_data' => 'value',
		'title_field_type' => 'text',
		'title_field_format' => 'wp_locale',
		'title_field_prefix' => '',
		'title_field_suffix' => '',
		'title_text_style' => 'title-default',
		'title_font_weight' => '',
		'title_font_style' => '',
		'title_text_align' => '',
		'title_width' => '',
		'title_text_color' => '',
		'title_text_color_hover' => '',
		'title_custom_font_options' => '',
		'title_font_size' => '',
		'title_line_height' => '',
		'title_letter_spacing' => '',
		'title_text_transform' => 'none',
		'title_responsive_font_options' => '',
		'title_tablet_font_size' => '',
		'title_tablet_line_height' => '',
		'title_tablet_letter_spacing' => '',
		'title_mobile_font_size' => '',
		'title_mobile_line_height' => '',
		'title_mobile_letter_spacing' => '',
		'title_google_font_options' => '',
		'title_google_font' => '',
		'title_desktop_spacing_top' => '',
		'title_desktop_spacing_bottom' => '',
		'title_tablet_spacing_top' => '',
		'title_tablet_spacing_bottom' => '',
		'title_mobile_spacing_top' => '',
		'title_mobile_spacing_bottom' => '',
		//Subtitle
		'subtitle' => '',
		'subtitle_source' => 'custom_text',
		'subtitle_post_type' => thegem_cf_get_edit_template_type(),
		'subtitle_output_data' => 'value',
		'subtitle_field_type' => 'text',
		'subtitle_field_format' => 'wp_locale',
		'subtitle_field_prefix' => '',
		'subtitle_field_suffix' => '',
		'subtitle_text_style' => 'styled-subtitle',
		'subtitle_font_weight' => '',
		'subtitle_font_style' => '',
		'subtitle_text_align' => '',
		'subtitle_width' => '',
		'subtitle_text_color' => '',
		'subtitle_text_color_hover' => '',
		'subtitle_custom_font_options' => '',
		'subtitle_font_size' => '',
		'subtitle_line_height' => '',
		'subtitle_letter_spacing' => '',
		'subtitle_text_transform' => 'none',
		'subtitle_responsive_font_options' => '',
		'subtitle_tablet_font_size' => '',
		'subtitle_tablet_line_height' => '',
		'subtitle_tablet_letter_spacing' => '',
		'subtitle_mobile_font_size' => '',
		'subtitle_mobile_line_height' => '',
		'subtitle_mobile_letter_spacing' => '',
		'subtitle_google_font_options' => '',
		'subtitle_google_font' => '',
		'subtitle_desktop_spacing_top' => '',
		'subtitle_desktop_spacing_bottom' => '',
		'subtitle_tablet_spacing_top' => '',
		'subtitle_tablet_spacing_bottom' => '',
		'subtitle_mobile_spacing_top' => '',
		'subtitle_mobile_spacing_bottom' => '',
		//Description
		'description' => '+1 916-85-2235',
		'description_source' => 'custom_text',
		'description_post_type' => thegem_cf_get_edit_template_type(),
		'description_output_data' => 'value',
		'description_field_type' => 'text',
		'description_field_format' => 'wp_locale',
		'description_field_prefix' => '',
		'description_field_suffix' => '',
		'description_text_style' => 'text-body-tiny',
		'description_font_weight' => '',
		'description_font_style' => '',
		'description_text_align' => '',
		'description_width' => '',
		'description_text_color' => '',
		'description_text_color_hover' => '',
		'description_custom_font_options' => '',
		'description_font_size' => '',
		'description_line_height' => '',
		'description_letter_spacing' => '',
		'description_text_transform' => 'none',
		'description_responsive_font_options' => '',
		'description_tablet_font_size' => '',
		'description_tablet_line_height' => '',
		'description_tablet_letter_spacing' => '',
		'description_mobile_font_size' => '',
		'description_mobile_line_height' => '',
		'description_mobile_letter_spacing' => '',
		'description_google_font_options' => '',
		'description_google_font' => '',
		'description_desktop_spacing_top' => '',
		'description_desktop_spacing_bottom' => '',
		'description_tablet_spacing_top' => '',
		'description_tablet_spacing_bottom' => '',
		'description_mobile_spacing_top' => '',
		'description_mobile_spacing_bottom' => '',
	), $atts, 'gem_infotext');

	$return_html = $custom_css = $output = $link_atts = $class = $icon = '';
	$css_style_icon_1_hover = $css_style_icon_2_hover = $css_style_icon_3_hover = $css_style_icon_background_hover = $css_style_icon_hover = '';
	$uniqid = uniqid('thegem-custom-').rand(1,9999);

	// Get infotext element data
	$post_id = thegem_cf_get_edit_template_post_id();
	$info_texts = array('title', 'subtitle', 'description');

	if (!empty($atts)) {
		$params = array_merge($params, $atts);
	}

	foreach ($info_texts as $item){
		$key = $label = $value = $label_output = $value_output = '';

		if (!empty($params[$item.'_source']) && $params[$item.'_source'] == 'custom_text'){
			if(function_exists('vc_value_from_safe')) {
				$params[$item] = vc_value_from_safe($params[$item]);
			}
		} elseif(!empty($params[$item.'_source'])){
			switch($params[$item.'_source']) {
				case 'thegem_cf':
					if (!empty($params[$item.'_post_type'])){
						$key = $params[$item.'_'.$params[$item.'_post_type'].'_select_field'];
						$label = array_flip(thegem_cf_get_fields_by_post_type($params[$item.'_post_type']))[$key];
						$value = get_post_meta($post_id, $key, true);
					}

					break;
				case 'project_details':
					$key = $params[$item.'_project_details_select_field'];
					$label = array_flip(thegem_cf_get_project_details())[$key];
					$value = get_post_meta($post_id, $key, true);

					break;
				default:
					if (!empty($params[$item.'_'.$params[$item.'_source'].'_select_field'])) {
						$plugin_type = thegem_cf_check_plugins_group($params[$item.'_source']);
						$key = $params[$item.'_'.$params[$item.'_source'].'_select_field'];

						if ($plugin_type !== 'toolset') {
							$labels_array = array_flip(thegem_cf_get_acf_plugin_fields_by_group($params[$item.'_source']));
							$label = array_key_exists($key, $labels_array) ? $labels_array[$key] : '';
						} else {
							$labels_array = array_flip(thegem_cf_get_toolset_plugin_fields_by_group($params[$item.'_source']));
							$label = array_key_exists($key, $labels_array) ? $labels_array[$key] : '';
						}

						$value = get_post_meta($post_id, $key, true);
					}

					break;
			}

			if (!empty($params[$item . '_output_data']) && $params[$item . '_output_data'] != 'value') {
				$label_output = esc_html($label);
				if ($params[$item . '_output_data'] == 'all') {
					$label_output .= ': ';
				}
			}

			if (!empty($params[$item . '_output_data']) && $params[$item . '_output_data'] != 'label') {
				if (!empty($params[$item . '_field_type']) && $params[$item . '_field_type'] == 'number') {
					$value_output = floatval($value);
					$decimal = explode('.', $value_output);
					$decimal = isset($decimal[1]) ? strlen(($decimal[1])) : 0;
					$decimal = $decimal <= 3 ? $decimal : 3;

					if (!empty($params[$item . '_field_format']) && $params[$item . '_field_format'] == 'wp_locale') {
						$value_output = number_format_i18n($value_output, $decimal);
					}

					if (!empty($params[$item . '_field_prefix'])) {
						$value_output = $params[$item . '_field_prefix'] . '' . $value_output;
					}

					if (!empty($params[$item . '_field_suffix'])) {
						$value_output = $value_output . '' . $params[$item . '_field_suffix'];
					}
				} else {
					$value_output = $value;
				}
			}

			$params[$item] = $label_output . $value_output;
		} else {
			$params[$item] = '';
		}
	}

	// Icon customize
	if ($params['icon_image'] == 'icon') {
		if ($params['pack'] == 'elegant' && empty($icon) && $params['icon_elegant']) {
			$icon = $params['icon_elegant'];
		}
		if ($params['pack'] == 'material' && empty($icon) && $params['icon_material']) {
			$icon = $params['icon_material'];
		}
		if ($params['pack'] == 'fontawesome' && empty($icon) && $params['icon_fontawesome']) {
			$icon = $params['icon_fontawesome'];
		}
		if ($params['pack'] == 'thegem-header' && empty($icon) && $params['icon_thegem_header']) {
			$icon = $params['icon_thegem_header'];
		}
		if ($params['pack'] == 'thegemdemo' && empty($icon) && $params['icon_thegemdemo']) {
			$icon = $params['icon_thegemdemo'];
		}
		if ($params['pack'] == 'userpack' && empty($icon) && $params['icon_userpack']) {
			$icon = $params['icon_userpack'];
		}
		wp_enqueue_style('icons-'.$params['pack']);
	}

	$params['shape'] = thegem_check_array_value(array('simple', 'circle', 'square'), $params['shape'], 'simple');
	$params['style'] = thegem_check_array_value(array('', 'angle-45deg-r', 'angle-45deg-l', 'angle-90deg', 'gradient'), $params['style'], '');
	$params['size'] = thegem_check_array_value(array('tiny', 'small', 'medium', 'large', 'xlarge', 'custom'), $params['size'], 'custom');
	$css_style_icon = '';
	$css_style_icon_background = '';
	$css_style_icon_1 = '';
	$css_style_icon_2 = '';
	$css_style_icon_3 = '';

	if ($params['gradient_backgound_angle'] == 'cusotom_deg') {
		$params['gradient_backgound_angle'] = $params['gradient_backgound_cusotom_deg'].'deg';
	}
	if($params['gradient_backgound'] and $params['gradient_backgound_style'] == 'linear') {
		$css_style_icon_background .= 'background: linear-gradient('.$params['gradient_backgound_angle'].', '.$params['gradient_backgound_from'].', '.$params['gradient_backgound_to'].');';
	}
	if($params['gradient_backgound'] and $params['gradient_backgound_style'] == 'radial') {
		$css_style_icon_background .= 'background: radial-gradient('.$params['gradient_radial_backgound_position'].', '.$params['gradient_backgound_from'].', '.$params['gradient_backgound_to'].');';
	}

	if($params['background_color'] && $params['shape'] != 'simple') {
		$css_style_icon_background .= 'background-color: '.$params['background_color'].';';
		if(!$params['border_color'] || !$params['style'] == 'gradient') {
			$css_style_icon .= 'border-color: '.$params['background_color'].';';
		}
	}

	if($params['hover_background_color'] && $params['shape'] != 'simple') {
		$css_style_icon_background_hover .= 'background-color: '.$params['hover_background_color'].';';
		if(!$params['hover_border_color'] || !$params['style'] == 'gradient') {
			$css_style_icon_hover .= 'border-color: '.$params['hover_background_color'].';';
		}
	}

	if($params['border_color'] && $params['shape'] != 'simple') {
		$css_style_icon .= 'border-color: '.$params['border_color'].';';
	}

	if($params['hover_border_color'] && $params['shape'] != 'simple') {
		$css_style_icon_hover .= 'border-color: '.$params['hover_border_color'].';';
	}

	if(!($params['background_color'] || $params['border_color'] || $params['gradient_backgound'])) {
		$class .= ' gem-simple-icon';
	}

	if($color = $params['color']) {
		$css_style_icon_1 = 'color: '.$color.';';
		if(($color_2 = $params['color_2']) && $params['style']) {
			$css_style_icon_2 = 'color: '.$color_2.';';
		} else {
			$css_style_icon_2 = 'color: '.$color.';';
		}

		if ($params['gradient_color_angle'] == 'cusotom_deg') {
			$gradient_color_angle = $params['gradient_color_cusotom_deg'].'deg';
		}

		if( $params['gradient_color_style'] == 'linear') {
			$css_style_icon_3 .= 'background: linear-gradient( '.$params['gradient_color_angle'].', '.$color.', '.$color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
		if ($params['gradient_color_style'] == 'radial') {
			$css_style_icon_3 .= 'background: radial-gradient( '.$params['gradient_radial_color_position'].', '.$color.', '.$color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
	}

	if($hover_color = $params['hover_color']) {
		$css_style_icon_1_hover = 'color: '.$hover_color.' !important;';
		if(($hover_color_2 = $params['hover_color_2']) && $params['style']) {
			$css_style_icon_2_hover = 'color: '.$hover_color_2.' !important;';
		} else {
			$css_style_icon_2_hover = 'color: '.$hover_color.' !important;';
		}
		if($params['gradient_color_style'] == 'linear') {
			$css_style_icon_3_hover .= 'background: linear-gradient( '.$params['gradient_color_angle'].', '.$hover_color.', '.$hover_color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
		if ($params['gradient_color_style'] == 'radial') {
			$css_style_icon_3_hover .= 'background: radial-gradient( '.$params['gradient_radial_color_position'].', '.$hover_color.', '.$hover_color_2.'); -webkit-text-fill-color: transparent; -webkit-background-clip: text;';
		}
	}

	if (!empty($icon)) {
		if ($params['style'] != 'gradient') {
			$output = '<span class="gem-icon-half-1"><span class="back-angle">&#x' . $icon . ';</span></span>'.
				'<span class="gem-icon-half-2"><span class="back-angle">&#x' . $icon . ';</span></span>';
		} else {
			$output = '<span class="gem-icon-style-gradient"><span class="back-angle">&#x' . $icon . ';</span></span>';
		}
	}

	if ($params['icon_image'] == 'image' && !empty($params['image'])) {
		$image_src = thegem_attachment_url($params['image']);
		$output = '<img class="img-responsive" src="'.$image_src.'">';
	}

	if ($params['icon_image'] == 'icon' && !empty($params['pack'])) {
		$class .= ' gem-icon-pack-'.$params['pack'];
	}
	if(!empty($params['size'])) {
		$class .= ' gem-icon-size-'.$params['size'];
	}
	if(!empty($params['style'])) {
		$class .= ' '.$params['style'];
	}
	if($params['shape'] != 'simple') {
		$class .= ' gem-icon-shape-'.$params['shape'];
	}

	// Text general customize
	$el_id = $el_class = $el_width = $link = $el_link = $el_link_target = $el_link_title = $el_link_rel = '';
	if (!empty($params['element_id'])){ $el_id = $params['element_id']; }
	if (!empty($params['element_class'])){ $el_class = $params['element_class']; }
	if (!empty($params['element_width'])){ $el_width = $params['element_width']; }

	// Dynamic link options
	if (!empty($params['link']) && $params['link'] == 'custom') {
		$link = !empty($params['element_link']) ? vc_build_link($params['element_link']) : null;

		if (!empty($link)) {
			$el_link = !empty($link['url']) ? $link['url'] : '';
			$el_link_target = !empty($link['target']) ? $link['target'] : '_self';
			$el_link_title = !empty($link['title']) ? $link['title'] : '';
			$el_link_rel = !empty($link['rel']) ? $link['rel'] : '';
		}
	} elseif (!empty($params['link']) && $params['link'] == 'dynamic') {
		$dynamic_link = [
			'target' => !empty($params['link_target']) ? '_blank' : '_self',
			'rel' => !empty($params['link_nofollow']) ? 'nofollow' : '',
		];

		switch ($params['link_dynamic']) {
			case 'custom_fields':
				$dynamic_link['url'] = get_post_meta($post_id, $params['custom_fields_link_select'], true);
				break;
			case 'project_details':
				$dynamic_link['url'] = get_post_meta($post_id, $params['project_details_link_select'], true);
				break;
			default:
				$acf_link = get_post_meta($post_id, $params[$params['link_dynamic'].'_link_select'], true);

				if(is_array($acf_link)){
					$dynamic_link = [
						'url' => !empty($acf_link['url']) ? $acf_link['url'] : null,
						'target' => !empty($acf_link['target']) ? $acf_link['target'] : $dynamic_link['target'],
						'rel' => !empty($acf_link['rel']) ? $acf_link['rel'] : $dynamic_link['rel'],
					];
				} else{
					$dynamic_link['url'] = $acf_link;
				}
				break;
		}

		if (!empty($dynamic_link)) {
			$el_link = !empty($dynamic_link['url']) ? $dynamic_link['url'] : '';
			$el_link_target = !empty($dynamic_link['target']) ? $dynamic_link['target'] : '_self';
			$el_link_title = !empty($dynamic_link['title']) ? $dynamic_link['title'] : '';
			$el_link_rel = !empty($dynamic_link['rel']) ? $dynamic_link['rel'] : '';
		}
	}

	// Text default class
	$title_text_class = $subtitle_text_class = $description_text_class = '';
	$title_text_class .= !empty($params['title_text_style']) ? $params['title_text_style'] : '';
	$title_text_class .= !empty($params['title_font_weight']) ? ' '.$params['title_font_weight'] : '';
	$subtitle_text_class .= !empty($params['subtitle_text_style']) ? $params['subtitle_text_style'] : '';
	$subtitle_text_class .=  !empty($params['subtitle_font_weight']) ? ' '.$params['subtitle_font_weight'] : '';
	$description_text_class .= !empty($params['description_text_style']) ? $params['description_text_style'] : '';
	$description_text_class .= !empty($params['description_font_weight']) ? ' '.$params['description_font_weight'] : '';

	// Text default style
	$title_text_style = $subtitle_text_style = $description_text_style = '';
	$title_text_style .= !empty($params['title_font_style']) ? 'font-style:'.$params['title_font_style'].'; ' : '';
	$title_text_style .= !empty($params['title_text_align']) ? 'text-align:'.$params['title_text_align'].';' : '';
	$title_text_style .= !empty($params['title_width']) ? 'max-width:'.$params['title_width'].'px;' : '';
	$subtitle_text_style .= !empty($params['subtitle_font_style']) ? 'font-style:'.$params['subtitle_font_style'].'; ' : '';
	$subtitle_text_style .= !empty($params['subtitle_text_align']) ? 'text-align:'.$params['subtitle_text_align'].';' : '';
	$subtitle_text_style .= !empty($params['subtitle_width']) ? 'max-width:'.$params['subtitle_width'].'px;' : '';
	$description_text_style .= !empty($params['description_font_style']) ? 'font-style:'.$params['description_font_style'].'; ' : '';
	$description_text_style .= !empty($params['description_text_align']) ? 'text-align:'.$params['description_text_align'].';' : '';
	$description_text_style .= !empty($params['description_width']) ? 'max-width:'.$params['description_width'].'px;' : '';

	if (!empty($atts['css'])) {
		$custom_css_class = vc_shortcode_custom_css_class($atts['css']);
		$el_class .= ' '.$custom_css_class;
		$el_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $el_class, 'gem_infobox', $atts );
	}

	$el_class .= ' alignment-'.$params['infobox_alignment'];

	// Init Infotext
	ob_start(); ?>

	<div <?php if ($el_id): ?>id="<?=esc_attr($el_id); ?>"<?php endif;?> class="gem-infotext <?= esc_attr($el_class); ?> <?= esc_attr($uniqid); ?>">

		<?php if (!empty($el_link)): ?>
		<a href="<?=esc_url($el_link); ?>" target="<?=esc_attr($el_link_target); ?>"
			<?php if (!empty($el_link_title)): ?>title="<?=esc_attr($el_link_title); ?>"<?php endif;?>
			<?php if (!empty($el_link_rel)): ?>rel="<?=esc_attr($el_link_rel); ?>"<?php endif;?>
			class="gem-infotext-wrap position--<?=$params['icon_position_to_text']?>
			<?php if ($params['icon_position_to_text'] == 'top' || $params['icon_position_to_text'] == 'bottom'): ?>horizonal--<?=$params['icon_horizontal_align']?><?php endif;?>
			<?php if ($params['icon_position_to_text'] == 'left' || $params['icon_position_to_text'] == 'right'): ?>vertical--<?=$params['icon_vertical_align']?><?php endif;?>"
			<?php if ($el_width): ?>style="max-width: <?=esc_attr($el_width); ?>px;"<?php endif;?>>
		<?php else: ?>
		<div class="gem-infotext-wrap position--<?=$params['icon_position_to_text']?>
			<?php if ($params['icon_position_to_text'] == 'top' || $params['icon_position_to_text'] == 'bottom'): ?>horizonal--<?=$params['icon_horizontal_align']?><?php endif;?>
			<?php if ($params['icon_position_to_text'] == 'left' || $params['icon_position_to_text'] == 'right'): ?>vertical--<?=$params['icon_vertical_align']?><?php endif;?>">
		<?php endif;?>

		<?php if (!empty($output)): ?>
			<div class="gem-infotext-icon">
				<div class="gem-icon <?= esc_attr($class); ?>">
					<div class="gem-icon-inner"><?= $output ?></div>
				</div>
			</div>
		<?php endif;?>

		<?php if (!empty($params['title']) || !empty($params['subtitle']) || !empty($params['description'])): ?>
			<div class="gem-infotext">
				<?php if (!empty($params['title'])): ?>
					<div class="gem-infotext__title">
						<div class="title-customize <?=esc_attr($title_text_class)?>" style="<?=esc_attr($title_text_style)?>">
							<?= do_shortcode( $params['title'] ); ?>
						</div>
					</div>
				<?php endif;?>

				<?php if (!empty($params['subtitle'])): ?>
					<div class="gem-infotext__subtitle">
						<div class="subtitle-customize <?=esc_attr($subtitle_text_class)?>" style="<?=esc_attr($subtitle_text_style)?>">
							<?= do_shortcode( $params['subtitle'] ); ?>
						</div>
					</div>
				<?php endif;?>

				<?php if (!empty($params['description'])): ?>
					<div class="gem-infotext__description">
						<div class="description-customize <?=esc_attr($description_text_class)?>" style="<?=esc_attr($description_text_style)?>">
							<?= do_shortcode( $params['description'] ); ?>
						</div>
					</div>
				<?php endif;?>
			</div>
		<?php endif;?>

		<?php if (!empty($el_link)): ?>
		</a>
		<?php else: ?>
		</div>
		<?php endif;?>

	</div>

	<?php

	// Icon Custom Styles
	if(!empty($css_style_icon_background)) {
		$custom_css .= '.'.$uniqid.' .gem-icon-inner {'.$css_style_icon_background.'}';
	}
	if(!empty($css_style_icon_1)) {
		$custom_css .= '.'.$uniqid.' .gem-icon-half-1 {'.$css_style_icon_1.'}';
	}
	if(!empty($css_style_icon_2)) {
		$custom_css .= '.'.$uniqid.' .gem-icon-half-2 {'.$css_style_icon_2.'}';
	}
	if(!empty($css_style_icon_3)) {
		$custom_css .= '.'.$uniqid.' .gem-icon-style-gradient .back-angle {'.$css_style_icon_3.'}';
	}
	if(!empty($css_style_icon)) {
		$custom_css .= '.'.$uniqid.' .gem-icon  {'.$css_style_icon.'}';
	}
	if($params['size'] == 'custom' && !empty($params['icon_size'])) {
		$custom_css .= '.'.$uniqid.' .gem-icon  {font-size: '.esc_attr($params['icon_size']).'px;}';
		$custom_css .= '.'.$uniqid.' .gem-icon:not(.gem-simple-icon) .gem-icon-inner {width: '. $params['icon_size'] * 1.5 .'px; height: '. $params['icon_size'] * 1.5 .'px; line-height: '. $params['icon_size'] * 1.5 .'px;}';
		$custom_css .= '.'.$uniqid.' .gem-icon.gem-simple-icon {width: '. $params['icon_size'] .'px; height: '. $params['icon_size'] .'px; line-height: '. $params['icon_size'] .'px;}';
	}
	if(!empty($css_style_icon_1_hover)) {
		$custom_css .= '.'.$uniqid.' a:hover .gem-infotext-icon .gem-icon-half-1 {'.$css_style_icon_1_hover.'}';
	}
	if(!empty($css_style_icon_2_hover)) {
		$custom_css .= '.'.$uniqid.' a:hover .gem-infotext-icon .gem-icon-half-2 {'.$css_style_icon_2_hover.'}';
	}
	if(!empty($css_style_icon_3_hover)) {
		$custom_css .= '.'.$uniqid.' a:hover .gem-infotext-icon .gem-icon-style-gradient .back-angle {'.$css_style_icon_3_hover.'}';
	}
	if(!empty($css_style_icon_background_hover)) {
		$custom_css .= '.'.$uniqid.' a:hover .gem-infotext-icon .gem-icon-inner {'.$css_style_icon_background_hover.'}';
	}
	if(!empty($css_style_icon_hover)) {
		$custom_css .= '.'.$uniqid.' a:hover .gem-infotext-icon .gem-icon  {'.$css_style_icon_hover.'}';
	}

	// Text Custom Styles
	$customize = '.gem-infotext.'.$uniqid;
	$elements = array('title', 'subtitle', 'description');
	$resolution = array('desktop', 'tablet', 'mobile');
	$gaps_dir = array('top', 'bottom', 'left', 'right');
	$gaps_vertical_dir = array('top', 'bottom');
	$gap = 'margin';
	$unit = 'px';

	foreach ($resolution as $res) {
		$width = ($res == 'tablet' ? 'max-width: 1023px' : 'max-width: 767px');

		foreach ($gaps_dir as $dir) {
			if (!empty($params['icon_'.$res.'_spacing_'.$dir]) || strcmp($params['icon_'.$res.'_spacing_'.$dir], '0') === 0) {
				$result = str_replace(' ', '', $params['icon_'.$res.'_spacing_'.$dir]);
				$last_result = substr($result, -1);
				if ($last_result == '%') {
					$result = str_replace('%', '', $result);
					$unit = $last_result;
				}
				if ($res == 'desktop') {
					$custom_css .= $customize.' '.'.gem-infotext-icon {'.$gap.'-'.$dir.':'.$result.$unit.' !important;}';
				} else {
					$custom_css .= '@media screen and ('.$width.') {'.$customize.' '.'.gem-infotext-icon {'.$gap.'-'.$dir.':'.$result.$unit.' !important;}'.'}';
				}
			}
		}
	}

	foreach ($elements as $item) {
		if (!empty($params[$item.'_text_color'])) {
			$custom_css .= $customize.' '.'.'.$item.'-customize {color:'.$params[$item.'_text_color'].' !important;}';
		}

		if (!empty($params[$item.'_text_color_hover'])) {
			$custom_css .= $customize.' a:hover .gem-infotext .'.$item.'-customize {color:'.$params[$item.'_text_color_hover'].' !important;}';
		}

		if (!empty($params[$item.'_custom_font_options'])) {
			if (!empty($params[$item.'_font_size'])) {
				$custom_css .= $customize.' '.'.'.$item.'-customize {font-size:'.$params[$item.'_font_size'].$unit.' !important;}';
			}
			if (!empty($params[$item.'_line_height'])) {
				$custom_css .= $customize.' '.'.'.$item.'-customize {line-height:'.$params[$item.'_line_height'].$unit.' !important;}';
			}
			if (isset($params[$item.'_letter_spacing'])) {
				$custom_css .= $customize.' '.'.'.$item.'-customize {letter-spacing:'.$params[$item.'_letter_spacing'].$unit.' !important;}';
			}
			if (!empty($params[$item.'_text_transform'])) {
				$custom_css .= $customize.' '.'.'.$item.'-customize {text-transform:'.$params[$item.'_text_transform'].' !important;}';
			}
		}

		if (!empty($params[$item.'_responsive_font_options'])) {
			foreach ($resolution as $res) {
				$width = ($res == 'tablet' ? 'max-width: 1023px' : 'max-width: 767px');

				if (!empty($params[$item.'_'.$res.'_font_size'])) {
					$custom_css .= '@media screen and ('.$width.') {'.$customize.' '.'.'.$item.'-customize {font-size:'.$params[$item.'_'.$res.'_font_size'].$unit.' !important;}'.'}';
				}
				if (!empty($params[$item.'_'.$res.'_line_height'])) {
					$custom_css .= '@media screen and ('.$width.') {'.$customize.' '.'.'.$item.'-customize {line-height:'.$params[$item.'_'.$res.'_line_height'].$unit.' !important;}'.'}';
				}
				if (isset($params[$item.'_'.$res.'_letter_spacing'])) {
					$custom_css .= '@media screen and ('.$width.') {'.$customize.' '.'.'.$item.'-customize {letter-spacing:'.$params[$item.'_'.$res.'_letter_spacing'].$unit.' !important;}'.'}';
				}
			}
		}

		if (!empty($params[$item.'_google_font_options'])) {
			if (!empty($params[$item.'_google_font'])) {
				$font = thegem_font_parse($params[$item.'_google_font']);
				$custom_css .= $customize.' '.'.'.$item.'-customize {'.esc_attr($font).'}';
			}
		}

		foreach ($resolution as $res) {
			$width = ($res == 'tablet' ? 'max-width: 1023px' : 'max-width: 767px');

			foreach ($gaps_vertical_dir as $dir) {
				if (!empty($params[$item.'_'.$res.'_spacing_'.$dir]) || strcmp($params[$item.'_'.$res.'_spacing_'.$dir], '0') === 0) {
					$result = str_replace(' ', '', $params[$item.'_'.$res.'_spacing_'.$dir]);
					$last_result = substr($result, -1);
					if ($last_result == '%') {
						$result = str_replace('%', '', $result);
						$unit = $last_result;
					}
					if ($res == 'desktop') {
						$custom_css .= $customize.' '.'.'.$item.'-customize {'.$gap.'-'.$dir.':'.$result.$unit.' !important;}';
					} else {
						$custom_css .= '@media screen and ('.$width.') {'.$customize.' '.'.'.$item.'-customize {'.$gap.'-'.$dir.':'.$result.$unit.' !important;}'.'}';
					}
				}
			}
		}
	}

	if (isset($atts['infotext_disable_desktop']) && !empty($atts['infotext_disable_desktop'])) {
		$custom_css .= '@media screen and (min-width: 1024px) {'.$customize.' {display: none;}}';
	}
	$tablet_display_css = '';
	if (isset($atts['infotext_disable_tablet']) && !empty($atts['infotext_disable_tablet'])) {
		$custom_css .= '@media screen and (max-width: 1023px) and (min-width: 768px) {'.$customize.' {display: none;}}';
	}
	$mobile_display_css = '';
	if (isset($atts['infotext_disable_mobile']) && !empty($atts['infotext_disable_mobile'])) {
		$custom_css .= '@media screen and (max-width: 767px) {'.$customize.' {display: none;}}';
	}

	$tablet_dimension_css = '';
	foreach (array('margin', 'padding') as $tablet_dimension_prop) {
		foreach (array('top', 'right', 'bottom', 'left') as $dir) {
			if(isset($atts['tablet_'.$tablet_dimension_prop.'_'.$dir])) {
				$value = $atts['tablet_'.$tablet_dimension_prop.'_'.$dir];
				if(intval($value) > 0 || $value === '0') {
					$tablet_dimension_css .= $tablet_dimension_prop.'-'.$dir.':'.$value.'px !important;';
				}
			}
		}
	}
	if(!empty($tablet_dimension_css)) {
		$custom_css .= '@media screen and (max-width: 1023px) {'.$customize.'{'.$tablet_dimension_css.'}}';
	}
	$mobile_dimension_css = '';
	foreach (array('margin', 'padding') as $mobile_dimension_prop) {
		foreach (array('top', 'right', 'bottom', 'left') as $dir) {
			if(isset($atts['mobile_'.$mobile_dimension_prop.'_'.$dir])) {
				$value = $atts['mobile_'.$mobile_dimension_prop.'_'.$dir];
				if(intval($value) > 0 || $value === '0') {
					$mobile_dimension_css .= $mobile_dimension_prop.'-'.$dir.':'.$value.'px !important;';
				}
			}
		}
	}
	if(!empty($mobile_dimension_css)) {
		$custom_css .= '@media screen and (max-width: 767px) {'.$customize.'{'.$mobile_dimension_css.'}}';
	}

	$return_html = trim(preg_replace('/\s\s+/', ' ', ob_get_clean()));


	// Print custom css
	$css_output = '';
	if(!empty($custom_css)) {
		$css_output = '<style>'.$custom_css.'</style>';
	}
	wp_enqueue_style('thegem-infotext');
	$return_html = $css_output.$return_html;
	return $return_html;
}

function thegem_infotext_shortcode_settings($shortcodes) {
	if(!thegem_is_template_post('header')) {
		function thegem_infotext_set_heading_options () {
			$heading_items = array('title', 'subtitle', 'description');
			$heading_options = array();

			$sources = [
				__('Custom Text', 'thegem') => 'custom_text',
				__('Custom Fields (TheGem)', 'thegem') => 'thegem_cf',
			];
			if (thegem_cf_get_edit_template_type() == 'thegem_pf_item') {
				$sources[__('Project Details (TheGem)', 'thegem')] = 'project_details';
			}
			if (!empty(thegem_cf_get_acf_plugin_groups())) {
				$sources = array_merge($sources, thegem_cf_get_acf_plugin_groups());
			}
			if (!empty(thegem_cf_get_toolset_plugin_groups())) {
				$sources = array_merge($sources, thegem_cf_get_toolset_plugin_groups());
			}

			foreach ($heading_items as $item) {
				// Text Style Default
				$text_style_default = '';
				if ($item == 'title') {
					$text_style_default = 'title-default';
				}
				if ($item == 'subtitle') {
					$text_style_default = 'styled-subtitle';
				}
				if ($item == 'description') {
					$text_style_default = 'text-body-tiny';
				}

				$heading_options[] = array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __($item, 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12 capitalize',
					'group' => __('Content', 'thegem')
				);

				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Source ', 'thegem'),
					'param_name' => $item.'_source',
					'value' => $sources,
					'std' => 'custom_text',
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'description' => __('Choose between Custom text,  TheGem`s custom fields, ACF field group or manual input of custom field name.', 'thegem'),
					'group' => __('Content', 'thegem')
				);

				// Custom Text Options
				$heading_options[] = array(
					'type' => 'textarea',
					'heading' => __('Text', 'thegem'),
					'param_name' => $item,
					'std' => $item === 'description' ? '+1 916-85-2235' : '',
					'dependency' => array(
						'element' => $item.'_source',
						'value' => 'custom_text'
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem')
				);

				// Custom Fields Options
				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Post Type', 'thegem'),
					'param_name' => $item.'_post_type',
					'value' => thegem_cf_get_post_types(),
					'std' => thegem_cf_get_edit_template_type(),
					'dependency' => array(
						'element' => $item.'_source',
						'value' => 'thegem_cf'
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem')
				);

				foreach (thegem_cf_get_post_types() as $pt) {
					if (!empty(thegem_cf_get_fields_by_post_type($pt))){
						$heading_options[] = array(
							'type' => 'dropdown',
							'heading' => __('Select Custom Field', 'thegem'),
							'param_name' => $item . '_' . $pt . '_select_field',
							'value' => thegem_cf_get_fields_by_post_type($pt),
							'std' => '',
							'dependency' => array(
								'element' => $item.'_post_type',
								'value' => $pt
							),
							'edit_field_class' => 'vc_column vc_col-sm-12',
							'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages" target="_blank">Theme Options -> Single Pages</a> to manage your custom fields.', 'thegem'),
							'group' => __('Content', 'thegem'),
						);
					}
				}

				// Project Details Options
				if (!empty(thegem_cf_get_project_details())) {
					$heading_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select Project Detail', 'thegem'),
						'param_name' => $item . '_project_details_select_field',
						'value' => thegem_cf_get_project_details(),
						'std' => '',
						'dependency' => array(
							'element' => $item.'_source',
							'value' => 'project_details'
						),
						'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=thegem-theme-options#/single-pages/portfolio" target="_blank">Theme Options -> Single Pages -> Portfolio</a> to manage your custom fields.', 'thegem'),
						'group' => __('Content', 'thegem'),
					);
				}

				/* Manual Input Options
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Specify Field`s Name', 'thegem'),
					'param_name' => $item . '_manual_input_select_field',
					'dependency' => array(
						'element' => $item . '_source',
						'value' => 'manual_input'
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'description' => __('Use field`s name / meta key as set in custom fields settings', 'thegem'),
					'group' => __('Content', 'thegem'),
				);
				*/

				// ACF Options
				if (thegem_is_plugin_active('advanced-custom-fields/acf.php') || thegem_is_plugin_active('advanced-custom-fields-pro/acf.php')) {
					foreach (thegem_cf_get_acf_plugin_groups() as $gr) {
						if (!empty(thegem_cf_get_acf_plugin_fields_by_group($gr))){
							$heading_options[] = array(
								'type' => 'dropdown',
								'heading' => __('Select ACF Field', 'thegem'),
								'param_name' => $item . '_' . $gr . '_select_field',
								'value' => thegem_cf_get_acf_plugin_fields_by_group($gr),
								'std' => '',
								'dependency' => array(
									'element' => $item.'_source',
									'value' => $gr
								),
								'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/edit.php?post_type=acf-field-group" target="_blank">ACF -> Field Groups</a> to manage your custom fields.', 'thegem'),
								'group' => __('Content', 'thegem'),
							);
						}
					}
				}

				// Toolset Group Fields Repeater
				if ((thegem_is_plugin_active('types/wpcf.php')) && !empty(thegem_cf_get_toolset_plugin_groups())) {
					foreach (thegem_cf_get_toolset_plugin_groups() as $gr) {
						if (!empty(thegem_cf_get_toolset_plugin_fields_by_group($gr))) {
							$heading_options[] = array(
								'type' => 'dropdown',
								'heading' => __('Select Toolset Field', 'thegem'),
								'param_name' => $item . '_' . $gr . '_select_field',
								'value' => thegem_cf_get_toolset_plugin_fields_by_group($gr),
								'std' => '',
								'dependency' => array(
									'element' => $item.'_source',
									'value' => $gr
								),
								'description' => __('Go to the <a href="' . get_site_url() . '/wp-admin/admin.php?page=types-custom-fields" target="_blank">Toolset -> Custom Fields</a> to manage your custom fields.', 'thegem'),
								'group' => __('Content', 'thegem'),
							);
						}
					}
				}

				$sources_dependency = [];
				foreach ($sources as $source) {
					if ($source != 'custom_text'){
						$sources_dependency[] = $source;
					}
				}

				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Output Data', 'thegem'),
					'param_name' => $item.'_output_data',
					'value' => array(
						__('All', 'thegem') => 'all',
						__('Value', 'thegem') => 'value',
						__('Label', 'thegem') => 'label',
					),
					'dependency' => array(
						'element' => $item.'_source',
						'value' => $sources_dependency,
					),
					'std' => 'value',
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem'),
				);

				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Field Type', 'thegem'),
					'param_name' => $item.'_field_type',
					'value' => array(
						__('Text', 'thegem') => 'text',
						__('Number', 'thegem') => 'number',
					),
					'dependency' => array(
						'element' => $item.'_source',
						'value' => $sources_dependency,
					),
					'std' => 'text',
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem'),
				);

				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Number Format', 'thegem'),
					'param_name' => $item.'_field_format',
					'value' => array(
						__('WP Locale', 'thegem') => 'wp_locale',
						__('Disabled', 'thegem') => '',
					),
					'std' => 'wp_locale',
					'dependency' => array(
						'element' => $item.'_field_type',
						'value' => 'number'
					),
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem'),
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Prefix', 'thegem'),
					'param_name' => $item.'_field_prefix',
					'value' => '',
					'dependency' => array(
						'element' => $item.'_field_type',
						'value' => 'number'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem'),
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Suffix', 'thegem'),
					'param_name' => $item.'_field_suffix',
					'value' => '',
					'dependency' => array(
						'element' => $item.'_field_type',
						'value' => 'number'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem'),
				);

				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Text Style', 'thegem'),
					'param_name' => $item.'_text_style',
					'value' => array(
						__('Default', 'thegem') => $text_style_default,
						__('Header Default', 'thegem') => 'title-default',
						__('Title H1', 'thegem') => 'title-h1',
						__('Title H2', 'thegem') => 'title-h2',
						__('Title H3', 'thegem') => 'title-h3',
						__('Title H4', 'thegem') => 'title-h4',
						__('Title H5', 'thegem') => 'title-h5',
						__('Title H6', 'thegem') => 'title-h6',
						__('Title xLarge', 'thegem') => 'title-xlarge',
						__('Styled Subtitle', 'thegem') => 'styled-subtitle',
						__('Body', 'thegem') => 'text-body',
						__('Tiny Body', 'thegem') => 'text-body-tiny',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem')
				);
				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Font weight', 'thegem'),
					'param_name' => $item.'_font_weight',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Thin', 'thegem') => 'light',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem')
				);
				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Font style', 'thegem'),
					'param_name' => $item.'_font_style',
					'value' => array(
						__('Default', 'thegem') => '',
						__('Italic', 'thegem') => 'italic',
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem')
				);
				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Text align', 'thegem'),
					'param_name' => $item.'_text_align',
					'value' => array(
						__('Left', 'thegem') => 'left',
						__('Right', 'thegem') => 'right',
						__('Center', 'thegem') => 'center',
						__('Justify', 'thegem') => 'justify'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __('Content', 'thegem')
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Max width', 'thegem'),
					'param_name' => $item.'_width',
					'edit_field_class' => 'vc_column vc_col-sm-12',
					'group' => __('Content', 'thegem')
				);
			}

			return $heading_options;
		}

		function thegem_infotext_set_heading_style_options () {
			$heading_items = array('title', 'subtitle', 'description');
			$text_resolution = array('tablet', 'mobile');
			$gaps_resolution = array('desktop', 'tablet', 'mobile');
			$heading_options = array();

			foreach ($heading_items as $item) {
				$group = ucfirst($item).' '.'Style';

				$heading_options[] = array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Styled Options', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'colorpicker',
					'heading' => __('Text color', 'thegem'),
					'param_name' => $item.'_text_color',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'colorpicker',
					'heading' => __('Text hover color', 'thegem'),
					'param_name' => $item.'_text_color_hover',
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'checkbox',
					'heading' => __('Use custom font size?', 'thegem'),
					'param_name' => $item.'_custom_font_options',
					'value' => array(__('Yes', 'thegem') => '1'),
					'std' => 0,
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Font size', 'thegem'),
					'param_name' => $item.'_font_size',
					'dependency' => array(
						'element' => $item.'_custom_font_options',
						'value' => '1'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Line height', 'thegem'),
					'param_name' => $item.'_line_height',
					'dependency' => array(
						'element' => $item.'_custom_font_options',
						'value' => '1'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'textfield',
					'heading' => __('Letter spacing', 'thegem'),
					'param_name' => $item.'_letter_spacing',
					'dependency' => array(
						'element' => $item.'_custom_font_options',
						'value' => '1'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'dropdown',
					'heading' => __('Text transform', 'thegem'),
					'param_name' => $item.'_text_transform',
					'value' => array(
						__('None', 'thegem') => 'none',
						__('Capitalize', 'thegem') => 'capitalize',
						__('Lowercase', 'thegem') => 'lowercase',
						__('Uppercase', 'thegem') => 'uppercase'
					),
					'std' => 'none',
					'dependency' => array(
						'element' => $item.'_custom_font_options',
						'value' => '1'
					),
					'edit_field_class' => 'vc_column vc_col-sm-6',
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'checkbox',
					'heading' => __('Responsive font size options', 'thegem'),
					'param_name' => $item.'_responsive_font_options',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __($group, 'thegem')
				);

				foreach ($text_resolution as $res) {
					$heading_options[] = array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __($res, 'thegem'),
						'param_name' => $item.'_font_options_sub_head_'.$res,
						'dependency' => array(
							'element' => $item.'_responsive_font_options',
							'value' => '1'
						),
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
						'group' => __($group, 'thegem')
					);
					$heading_options[] = array(
						'type' => 'textfield',
						'heading' => __('Font size', 'thegem'),
						'param_name' => $item.'_'.$res.'_font_size',
						'dependency' => array(
							'element' => $item.'_responsive_font_options',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __($group, 'thegem')
					);
					$heading_options[] = array(
						'type' => 'textfield',
						'heading' => __('Line height', 'thegem'),
						'param_name' => $item.'_'.$res.'_line_height',
						'dependency' => array(
							'element' => $item.'_responsive_font_options',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __($group, 'thegem')
					);
					$heading_options[] = array(
						'type' => 'textfield',
						'heading' => __('Letter spacing', 'thegem'),
						'param_name' => $item.'_'.$res.'_letter_spacing',
						'dependency' => array(
							'element' => $item.'_responsive_font_options',
							'value' => '1'
						),
						'edit_field_class' => 'vc_column vc_col-sm-4',
						'group' => __($group, 'thegem')
					);
				}

				$heading_options[] = array(
					'type' => 'checkbox',
					'heading' => __('Use Google fonts?', 'thegem'),
					'param_name' => $item.'_google_font_options',
					'value' => array(__('Yes', 'thegem') => '1'),
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'google_fonts',
					'param_name' => $item.'_google_font',
					'value' => '',
					'settings' => array(
						'fields' => array(
							'font_family_description' => esc_html__('Select font family.', 'thegem'),
							'font_style_description' => esc_html__('Select font styling.', 'thegem'),
						),
					),
					'dependency' => array(
						'element' => $item.'_google_font_options',
						'value' => '1'
					),
					'group' => __($group, 'thegem')
				);
				$heading_options[] = array(
					'type' => 'thegem_delimeter_heading',
					'heading' => __('Position Options', 'thegem'),
					'param_name' => 'layout_delim_head',
					'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
					'group' => __($group, 'thegem')
				);

				foreach ($gaps_resolution as $res) {
					$heading_options[] = array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __($res, 'thegem'),
						'param_name' => $item.'_spacing_sub_head_'.$res,
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
						'group' => __($group, 'thegem')
					);
					$heading_options[] = array(
						'type' => 'textfield',
						'heading' => __('Top Spacing', 'thegem'),
						'param_name' => $item.'_'.$res.'_spacing_top',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __($group, 'thegem')
					);
					$heading_options[] = array(
						'type' => 'textfield',
						'heading' => __('Bottom Spacing', 'thegem'),
						'param_name' => $item.'_'.$res.'_spacing_bottom',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => __($group, 'thegem')
					);
				}
			}

			return $heading_options;
		}

		function thegem_infotext_set_icon_gaps () {
			$icon_gaps = array('spacing');
			$gaps_resolution = array('desktop', 'tablet', 'mobile');
			$icon_gaps_dir = array('top', 'bottom', 'left', 'right');
			$icon_gaps_option = array();

			$icon_gaps_option[] = array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Position Options', 'thegem'),
				'param_name' => 'layout_delim_head',
				'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => __('Icon/Image Style', 'thegem')
			);
			foreach ($icon_gaps as $gap) {

				foreach ($gaps_resolution as $res) {
					$icon_gaps_option[] = array(
						'type' => 'thegem_delimeter_heading_two_level',
						'heading' => __($res, 'thegem'),
						'param_name' => 'icon_'.$gap.'_sub_head',
						'edit_field_class' => 'thegem-param-delimeter-heading-two-level vc_column vc_col-sm-12 capitalize',
						'group' => __('Icon/Image Style', 'thegem')
					);

					foreach ($icon_gaps_dir as $dir) {
						$icon_gaps_option[] = array(
							'type' => 'textfield',
							'heading' => __($dir.' Spacing', 'thegem'),
							'param_name' => 'icon_'.$res.'_'.$gap.'_'.$dir,
							'value' => '',
							'std' => ' ',
							'edit_field_class' => 'vc_column vc_col-sm-3 capitalize',
							'group' => __('Icon/Image Style', 'thegem')
						);
					}
				}
			}

			return $icon_gaps_option;
		}

		function thegem_infotext_set_links_options () {
			$link_options = array();
			$group = __('Content', 'thegem');
			$link_sources = array_merge(
				array(
					__('Custom Fields (TheGem)', 'thegem') => 'custom_fields',
					__('Project Details', 'thegem') => 'project_details',
				),
				thegem_cf_get_acf_plugin_groups(),
				thegem_cf_get_toolset_plugin_groups()
			);

			$link_options[] = array(
				'type' => 'thegem_delimeter_heading',
				'heading' => __('Link', 'thegem'),
				'param_name' => 'layout_delim_head_link',
				'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
				'group' => $group,
			);
			$link_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Link Type', 'thegem'),
				'param_name' => 'link',
				'value' => array(
					__('None', 'thegem') => '',
					__('Custom Link', 'thegem') => 'custom',
					__('Dynamic', 'thegem') => 'dynamic',
				),
				'std' => 'custom',
				'group' => $group,
			);
			$link_options[] = array(
				'type' => 'vc_link',
				'heading' => __('URL (Link)', 'thegem'),
				'param_name' => 'element_link',
				'dependency' => array(
					'element' => 'link',
					'value' => 'custom'
				),
				'group' => $group,
			);
			$link_options[] = array(
				'type' => 'dropdown',
				'heading' => __('Dynamic Link Source', 'thegem'),
				'param_name' => 'link_dynamic',
				'value' => $link_sources,
				'std' => '',
				'dependency' => array(
					'element' => 'link',
					'value' => 'dynamic',
				),
				'group' => $group,
			);
			foreach($link_sources as $source) {
				if (!empty(thegem_cf_get_fields_is_type_link($source))) {
					$link_options[] = array(
						'type' => 'dropdown',
						'heading' => __('Select Dynamic Link', 'thegem'),
						'param_name' => $source. '_link_select',
						'value' => thegem_cf_get_fields_is_type_link($source),
						'std' => '',
						'dependency' => array(
							'element' => 'link_dynamic',
							'value' => $source,
						),
						'group' => $group,
					);
				}
			}
			$link_options[] = array(
				'type' => 'checkbox',
				'heading' => __('Open link in a new tab', 'thegem'),
				'param_name' => 'link_target',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '0',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'dependency' => array(
					'element' => 'link',
					'value' => 'dynamic',
				),
				'group' => $group,
			);
			$link_options[] = array(
				'type' => 'checkbox',
				'heading' => __('Add nofollow option to link', 'thegem'),
				'param_name' => 'link_nofollow',
				'value' => array(__('Yes', 'thegem') => '1'),
				'std' => '0',
				'edit_field_class' => 'vc_column vc_col-sm-6',
				'dependency' => array(
					'element' => 'link',
					'value' => 'dynamic',
				),
				'group' => $group,
			);

			return $link_options;
		}

		$shortcodes['gem_infotext'] = array(
			'name' => __('Infotext', 'thegem'),
			'base' => 'gem_infotext',
			'icon' => 'thegem-icon-wpb-ui-infotext',
			'category' => __('TheGem', 'thegem'),
			'description' => __('Infotext with Icon', 'thegem'),
			'params' => array_merge(
				/* Content - Presets */
				array(
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Presets', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding top-margin vc_column vc_col-sm-12',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Preset', 'thegem'),
						'param_name' => 'preset',
						'value' => array_merge(array(
							__('Tiny', 'thegem') => 'tiny',
							__('Highlighted', 'thegem') => 'highlighted',
							__('Classic', 'thegem') => 'classic',
							__('Right Icon (Classic)', 'thegem') => 'right_icon_classic',
							__('Right Icon (Tiny)', 'thegem') => 'right_icon_tiny')
						),
						'std' => 'tiny',
						'dependency' => array(
							'callback' => 'thegem_templates_infotext_presets_callback'
						),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'group' => 'Content',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Alignment', 'thegem'),
						'param_name' => 'infobox_alignment',
						'value' => array(
							__('Left', 'thegem') => 'left',
							__('Centered', 'thegem') => 'center',
							__('Right', 'thegem') => 'right',
						),
						'std' => 'left',
						'group' => __('Content', 'thegem')
					),
				),

				/* Content - Icon */
				array(
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Icon / Image', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding margin-top vc_column vc_col-sm-12',
						'group' => __('Content', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon / Image', 'thegem'),
						'param_name' => 'icon_image',
						'value' => array(
							__('Icon', 'thegem') => 'icon',
							__('Image', 'thegem') => 'image',
							__('None', 'thegem') => 'none',
						),
						'std' => 'icon',
						'group' => 'Content',
					),
					array(
						'type' => 'attach_image',
						'heading' => esc_html__( 'Image', 'thegem' ),
						'param_name' => 'image',
						'value' => '',
						'description' => esc_html__( 'Select image from media library.', 'thegem' ),
						'dependency' => array(
							'element' => 'icon_image',
							'value' => array('image')
						),
						'group' => 'Content',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Icon pack', 'thegem'),
						'param_name' => 'pack',
						'value' => array_merge(array(
							__('Elegant', 'thegem') => 'elegant',
							__('Material Design', 'thegem') => 'material',
							__('FontAwesome', 'thegem') => 'fontawesome',
							__('Header Icons', 'thegem') => 'thegem-header',
							__('Additional', 'thegem') => 'thegemdemo',
						), thegem_userpack_to_dropdown()),
						'std' => 'thegem-header',
						'dependency' => array(
							'element' => 'icon_image',
							'value' => array('icon')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content',
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_elegant',
						'icon_pack' => 'elegant',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('elegant')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_material',
						'icon_pack' => 'material',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('material')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_fontawesome',
						'icon_pack' => 'fontawesome',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('fontawesome')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegem_header',
						'icon_pack' => 'thegem-header',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegem-header')
						),
						'std' => 'e622',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_thegemdemo',
						'icon_pack' => 'thegemdemo',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('thegemdemo')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Position to Text', 'thegem'),
						'param_name' => 'icon_position_to_text',
						'value' => array(
							__('Left', 'thegem') => 'left',
							__('Top', 'thegem') => 'top',
							__('Right', 'thegem') => 'right',
							__('Bottom', 'thegem') => 'bottom',
						),
						'std' => 'left',
						'group' => 'Content',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Vertical Align', 'thegem'),
						'param_name' => 'icon_vertical_align',
						'value' => array(
							__('Top', 'thegem') => 'top',
							__('Center', 'thegem') => 'center',
							__('Bottom', 'thegem') => 'bottom',
						),
						'dependency' => array(
							'element' => 'icon_position_to_text',
							'value' => array('left', 'right')
						),
						'std' => 'center',
						'group' => 'Content',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Horizontal Align', 'thegem'),
						'param_name' => 'icon_horizontal_align',
						'value' => array(
							__('Left', 'thegem') => 'left',
							__('Center', 'thegem') => 'center',
							__('Right', 'thegem') => 'right',
						),
						'std' => 'left',
						'dependency' => array(
							'element' => 'icon_position_to_text',
							'value' => array('top', 'bottom')
						),
						'group' => 'Content',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Size', 'thegem'),
						'param_name' => 'size',
						'value' => array(
							__('Tiny', 'thegem') => 'tiny',
							__('Small', 'thegem') => 'small',
							__('Medium', 'thegem') => 'medium',
							__('Large', 'thegem') => 'large',
							__('Extra Large', 'thegem') => 'xlarge',
							__('Custom', 'thegem') => 'custom'
						),
						'std' => 'custom',
						'dependency' => array(
							'element' => 'icon_image',
							'value' => array('icon', 'image')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
					array(
						'type' => 'textfield',
						'heading' => __('Custom size', 'thegem'),
						'param_name' => 'icon_size',
						'dependency' => array(
							'element' => 'size',
							'value' => array('custom')
						),
						'std' => '16',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Content'
					),
				),
				thegem_userpack_to_shortcode(array(
					array(
						'type' => 'thegem_icon',
						'heading' => __('Icon', 'thegem'),
						'param_name' => 'icon_userpack',
						'icon_pack' => 'userpack',
						'dependency' => array(
							'element' => 'pack',
							'value' => array('userpack')
						),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => 'Content'
					),
				)),

				/* Content -- Title Subtitle Description */
				thegem_infotext_set_heading_options(),

				/* General - Link */
				thegem_infotext_set_links_options(),

				/* General - Extra */
				thegem_set_elements_extra_options(false, 'Content'),

				/* Icon - Style */
				array(
					array(
						'type' => 'thegem_delimeter_heading',
						'heading' => __('Styled Options', 'thegem'),
						'param_name' => 'layout_delim_head',
						'edit_field_class' => 'thegem-param-delimeter-heading no-top-padding vc_column vc_col-sm-12',
						'group' => __('Icon/Image Style', 'thegem')
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Shape', 'thegem'),
						'param_name' => 'shape',
						'value' => array(
							__('Simple', 'thegem') => 'simple',
							__('Square', 'thegem') => 'square',
							__('Circle', 'thegem') => 'circle'
						),
						'group' => 'Icon/Image Style',
						'edit_field_class' => 'vc_column vc_col-sm-6',
					),
					array(
						'type' => 'dropdown',
						'heading' => __('Color Split', 'thegem'),
						'param_name' => 'style',
						'value' => array(
							__('Disabled', 'thegem') => '',
							__('Gradient', 'thegem') => 'gradient',
							__('45 degree Right', 'thegem') => 'angle-45deg-r',
							__('45 degree Left', 'thegem') => 'angle-45deg-l',
							__('90 degree', 'thegem') => 'angle-90deg'
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Style', 'thegem'),
						'param_name' => 'gradient_color_style',
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'style',
							'value' => array('gradient')
						),
						"edit_field_class" => "vc_col-sm-6 vc_column",
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'gradient_radial_color_position',
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",
						),
						'dependency' => array(
							'element' => 'gradient_color_style',
							'value' => array('radial')
						),
						"edit_field_class" => "vc_col-sm-6 vc_column",
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Angle', 'thegem'),
						'param_name' => 'gradient_color_angle',
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",
						) ,
						'dependency' => array(
							'element' => 'gradient_color_style',
							'value' => array('linear')
						),
						"edit_field_class" => "vc_col-sm-6 vc_column",
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "textfield",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'gradient_color_cusotom_deg',
						'dependency' => array(
							'element' => 'gradient_color_angle',
							'value' => array('cusotom_deg')
						),
						"edit_field_class" => "vc_col-sm-12 vc_col-sm-offset-6 vc_column",
						'description' => __('Set value in DG 0-360', 'thegem'),
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color', 'thegem'),
						'param_name' => 'color',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover color', 'thegem'),
						'param_name' => 'hover_color',
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Color 2', 'thegem'),
						'param_name' => 'color_2',
						'dependency' => array(
							'element' => 'style',
							'not_empty' => true
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover color 2', 'thegem'),
						'param_name' => 'hover_color_2',
						'dependency' => array(
							'element' => 'style',
							'not_empty' => true
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Background Color', 'thegem'),
						'param_name' => 'background_color',
						'dependency' => array(
							'element' => 'shape',
							'value' => array('square', 'circle')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style',
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover Background Color', 'thegem'),
						'param_name' => 'hover_background_color',
						'dependency' => array(
							'element' => 'shape',
							'value' => array('square', 'circle')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Border Color', 'thegem'),
						'param_name' => 'border_color',
						'dependency' => array(
							'element' => 'shape',
							'value' => array('square', 'circle')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('Hover Border Color', 'thegem'),
						'param_name' => 'hover_border_color',
						'dependency' => array(
							'element' => 'shape',
							'value' => array('square', 'circle')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Use Gradient Backgound', 'thegem'),
						'param_name' => 'gradient_backgound',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-12',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('From', 'thegem'),
						'param_name' => 'gradient_backgound_from',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						'type' => 'colorpicker',
						'heading' => __('To', 'thegem'),
						'param_name' => 'gradient_backgound_to',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Style', 'thegem'),
						'param_name' => 'gradient_backgound_style',
						"value" => array(
							__('Linear', "thegem") => "linear",
							__('Radial', "thegem") => "radial",
						) ,
						"std" => 'linear',
						'dependency' => array(
							'element' => 'gradient_backgound',
							'value' => array('1')
						),
						'edit_field_class' => 'vc_column vc_col-sm-6',
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Gradient Position', 'thegem'),
						'param_name' => 'gradient_radial_backgound_position',
						"value" => array(
							__('Top', "thegem") => "at top",
							__('Bottom', "thegem") => "at bottom",
							__('Right', "thegem") => "at right",
							__('Left', "thegem") => "at left",
							__('Center', "thegem") => "at center",

						) ,
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array('radial')
						),
						"edit_field_class" => "vc_col-sm-6 vc_column",
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "dropdown",
						'heading' => __('Angle', 'thegem'),
						'param_name' => 'gradient_backgound_angle',
						"value" => array(
							__('Vertical to bottom ↓', "thegem") => "to bottom",
							__('Vertical to top ↑', "thegem") => "to top",
							__('Horizontal to left  →', "thegem") => "to right",
							__('Horizontal to right ←', "thegem") => "to left",
							__('Diagonal from left to bottom ↘', "thegem") => "to bottom right",
							__('Diagonal from left to top ↗', "thegem") => "to top right",
							__('Diagonal from right to bottom ↙', "thegem") => "to bottom left",
							__('Diagonal from right to top ↖', "thegem") => "to top left",
							__('Custom', "thegem") => "cusotom_deg",
						) ,
						'dependency' => array(
							'element' => 'gradient_backgound_style',
							'value' => array('linear')
						),
						"edit_field_class" => "vc_col-sm-6 vc_column",
						'group' => 'Icon/Image Style'
					),
					array(
						"type" => "textfield",
						'heading' => __('Custom Angle', 'thegem'),
						'param_name' => 'gradient_backgound_cusotom_deg',
						'description' => __('Set value in DG 0-360', 'thegem'),
						'dependency' => array(
							'element' => 'gradient_backgound_angle',
							'value' => array('cusotom_deg')
						),
						"edit_field_class" => "vc_col-sm-12 vc_col-sm-offset-6 vc_column",
						'group' => 'Icon/Image Style'
					),
				),

				/* Icon - Gaps */
				thegem_infotext_set_icon_gaps(),

				/* Title Subtitle Description Style */
				thegem_infotext_set_heading_style_options(),

				array(
					array(
						'type' => 'css_editor',
						'heading' => __('CSS box', 'thegem'),
						'param_name' => 'css',
						'group' => __('Design Options', 'js_composer'),
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on desktop', 'thegem'),
						'param_name' => 'infotext_disable_desktop',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on tablet', 'thegem'),
						'param_name' => 'infotext_disable_tablet',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
					array(
						'type' => 'checkbox',
						'heading' => __('Hide on mobile', 'thegem'),
						'param_name' => 'infotext_disable_mobile',
						'value' => array(__('Yes', 'thegem') => '1'),
						'edit_field_class' => 'vc_column vc_col-sm-4 no-top-padding',
						'group' => __('Responsive Options', 'thegem')
					),
				),
				thegem_get_resp_padding_margin()

				/* Design Options */
				//thegem_set_elements_design_options()
		));
	}
	return $shortcodes;
}
add_filter('thegem_shortcodes_array', 'thegem_infotext_shortcode_settings');

function thegem_vc_add_element_categories_move_thegem($tabs) {
	$thegem_tab = false;
	$thegem_tab_key = -1;
	foreach($tabs as $key => $tab) {
		if($tab['name'] === __('TheGem', 'thegem')) {
			$thegem_tab = $tab;
			$thegem_tab_key = $key;
		}
	}
	if($thegem_tab_key > -1) {
		unset($tabs[$thegem_tab_key]);
		$new_tabs = array();
		foreach($tabs as $key => $tab) {
			$new_tabs[] = $tab;
			if($tab['filter'] == '*') {
				$new_tabs[] = $thegem_tab;
			}
		}
		$tabs = $new_tabs;
	}
	return $tabs;
}
add_filter('vc_add_element_categories', 'thegem_vc_add_element_categories_move_thegem');

// Fix wpb post types access
function thegem_vc_bc_access_rule_48_post_type_get_state( $state ) {
	if ( null === $state ) {
		$content_types = vc_settings()->get( 'content_types' );
		if ( empty( $content_types ) ) {
			$state = true;
		} else {
			$state = 'custom';
		}
	}

	return $state;
}

function thegem_vc_bc_access_rule_48_post_type_rule( $value, $role, $rule ) {
	if ( ! $role ) {
		return $value;
	}
	global $vc_bc_access_rule_48_editor_post_types;
	$part = vc_role_access()->who( $role->name )->part( 'post_types' );
	if ( ! isset( $part->getRole()->capabilities[ $part->getStateKey() ] ) ) {
		if ( is_null( $vc_bc_access_rule_48_editor_post_types ) ) {
			$pt_array = vc_settings()->get( 'content_types' );
			$vc_bc_access_rule_48_editor_post_types = $pt_array ? $pt_array : vc_default_editor_post_types();
		}

		return in_array( $rule, $vc_bc_access_rule_48_editor_post_types, true );
	}

	return $value;
}

function thegem_vc_bc_access_rule_48() {
	add_filter( 'vc_role_access_with_post_types_get_state', 'thegem_vc_bc_access_rule_48_post_type_get_state' );
	add_filter( 'vc_role_access_with_post_types_can', 'thegem_vc_bc_access_rule_48_post_type_rule', 10, 3 );
	vc_set_default_editor_post_types(array('post', 'page', 'product', 'thegem_news', 'thegem_pf_item', 'thegem_footer', 'thegem_title', 'thegem_templates'));
}
add_action( 'vc_before_init', 'thegem_vc_bc_access_rule_48' );

if (!function_exists('select_post_type_taxonomies')) {
	function select_post_type_taxonomies($post_type = false, $select = false, $add_authors = false) {
		$out = [];
		if ($select) {
			$out = [__('Select taxonomy', 'thegem') => ''];
		}
		if ($post_type && $post_type != 'any') {
			$taxonomies = get_object_taxonomies($post_type, 'objects');
		} else {
			$taxonomies = get_taxonomies(array(
				'public' => true,
			), 'objects');
			$out[__('Portfolio Categories', 'thegem')] = 'thegem_portfolios';
			if ($add_authors) {
				$out[__('Authors', 'thegem')] = 'authors';
			}
		}


		if (empty($taxonomies) || is_wp_error($taxonomies)) {
			return $out;
		}

		foreach ($taxonomies as $taxonomy) {
			if (!empty($taxonomy->name) && !in_array($taxonomy->name, ['product_shipping_class'])) {
				$out[$taxonomy->label] = $taxonomy->name;
			}
		}

		return $out;
	}
}

if (!function_exists('select_portfolio_details')) {
	function select_portfolio_details($select = false) {
		$out = [];
		if ($select) {
			$out = [__('Select field', 'thegem') => ''];
		}
		$details = thegem_get_option('portfolio_project_details');

		if (empty($details)) {
			return $out;
		}

		$details_data = json_decode(thegem_get_option('portfolio_project_details_data'), true);
		if (!empty($details_data)) {
			foreach ($details_data as $v) {
				$out[$v['title']] = '_thegem_cf_' . str_replace('-', '_', sanitize_title($v['title']));
			}
		}

		return $out;
	}
}

if (!function_exists('select_theme_options_custom_fields_all')) {
	function select_theme_options_custom_fields_all($select = false) {
		$out = [];

		if ($select) {
			$out = [__('Select field', 'thegem') => ''];
		}

		$post_types = get_post_types(array(
			'public' => true,
		), 'names');

		foreach ($post_types as $post_type) {
			$out = array_merge($out, select_theme_options_custom_fields($post_type));
		}

		return $out;
	}
}

if (!function_exists('select_theme_options_custom_fields')) {
	function select_theme_options_custom_fields($post_type, $select = false) {
		$out = [];

		if ($select) {
			$out = [__('Select field', 'thegem') => ''];
		}

		switch ($post_type) {
			case 'page':
				$post_type = 'default';
				break;
			case 'thegem_pf_item':
				$post_type = 'portfolio';
				break;
		}

		if (!function_exists('thegem_theme_options_get_page_settings')) return $out;

		$pt_data = thegem_theme_options_get_page_settings($post_type);
		$custom_fields = !empty($pt_data['custom_fields']) ? $pt_data['custom_fields'] : null;

		if (empty($custom_fields)) return $out;

		$custom_fields_data = !empty($pt_data['custom_fields_data']) ? json_decode($pt_data['custom_fields_data'], true) : null;
		if (!empty($custom_fields_data)) {
			foreach ($custom_fields_data as $field) {
				$out[$field['title']] = $field['key'];
			}
		}

		return $out;
	}
}

if (!function_exists('select_post_types')) {
	function select_post_types() {
		$out = [__('Pages', 'thegem') => 'page'];
		$post_types = get_post_types(array(
			'public' => true,
			'_builtin' => false
		), 'objects');

		if (empty($post_types) || is_wp_error($post_types)) {
			return $out;
		}

		foreach ($post_types as $post_type) {
			if (!empty($post_type->name) && !in_array($post_type->name, ['elementor_library', 'thegem_title', 'thegem_footer', 'thegem_templates'])) {
				$out[$post_type->label] = $post_type->name;
			}
		}

		return $out;
	}
}

if (!function_exists('get_thegem_select_taxonomy_terms')) {
	function get_thegem_select_taxonomy_terms($taxonomy, $show_all = false) {

		$out = $show_all ? [__('All', 'thegem') => '0'] : [];

		$terms = get_terms([
			'taxonomy' => $taxonomy,
			'hide_empty' => true,
		]);

		if (empty($terms) || is_wp_error($terms)) {
			return $out;
		}

		foreach ($terms as $term) {
			if (!empty($term->name)) {
				$out[$term->name] = $term->slug;
			}
		}

		return $out;
	}
}
