<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

require_once SCC_DIR . '/wp-google-fonts/google-fonts.php';
global $scc_googlefonts_var;

class SCC_Item_Handler {

	public static function init() {
		add_shortcode('scc_stylish_item', array( __CLASS__, 'handle_stylish_item' ));
		add_shortcode('scc_calculator', array( __CLASS__, 'create_stylish_calculator' ));
	}
	function getBaseURL() {
		$isHttps = ((array_key_exists('HTTPS', $_SERVER) 
			&& $_SERVER['HTTPS']) ||
		(array_key_exists('HTTP_X_FORWARDED_PROTO', $_SERVER) 
			&& $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
	);
		return 'http' . ($isHttps ? 's' : '') .'://' . $_SERVER['SERVER_NAME'];
	}
	private static function setDetailView($formid, $result_2, $result)
	{
		$formstored = json_decode(stripslashes(stripslashes($result->formstored)));
		?>
		<div class="scc-cstm-desktop-view">
			<?php
			if(!defined('SCC_DIR')) {
				define('SCC_DIR', dirname(__FILE__));
			}
			require SCC_DIR . '/core/front-end-summary-view.php';
			?>
		</div>
		<?php
	}
	public static function create_stylish_calculator($atts, $content) {
		ob_start();
		// wp_enqueue_script('scc-ie-solver-js');
		wp_enqueue_script('scc-bootstrap-min');
		wp_enqueue_style('scc-bootstrap-min');
		wp_enqueue_script('scc-bootstrapslider-js');
		wp_enqueue_style('scc-bootstrapslider-css');
		wp_enqueue_style('scc-bootstrap-min');
		wp_enqueue_style('scc-bootstrapslider-css');
		wp_enqueue_style('scc-admin-style');
		wp_enqueue_style('scc-checkbox1');
		wp_enqueue_style('scc-checkbox2');
		wp_enqueue_style('scc-font-awesome');
		wp_enqueue_style('scc-checkbox3');
		//	wp_enqueue_style('scc-dropbox');
		// wp_enqueue_style('gf-admin-style');
		wp_enqueue_style('pretty-checkbx');
		wp_enqueue_script('scc-bootstrap-min');

		// wp_register_script('scc-translate-min', SCC_URL . 'assets/js/scc_jQuery.translate.js', array('jquery'), STYLISH_COST_CALCULATOR_VERSION, false);
		// wp_enqueue_script('scc-translate-min');

		// wp_register_script('scc-jquery-ui-js', SCC_URL . 'assets/js/jquery-ui.js', array('jquery'), '1.1', false);
		// wp_enqueue_script('scc-jquery-ui-js');
		
		// wp_register_script('scc-bootstrapslider-js', SCC_URL . 'assets/lib/bootstrap-slider/js/bootstrap-slider.js', array('jquery'), STYLISH_COST_CALCULATOR_VERSION, false);
		// wp_enqueue_script('scc-bootstrapslider-js');
		wp_enqueue_script('scc-js-js');
		wp_register_style('scc-checkbox1', SCC_URL  . 'styles/checkboxes/checkboxes.css', array(), STYLISH_COST_CALCULATOR_VERSION);
		wp_enqueue_style('scc-checkbox1');

		// wp_register_script('js-base64', SCC_URL . 'assets/js/base64.min.js');
		// wp_enqueue_script('js-base64');
		
		$translation_array = array( 'rt_adminurl' => admin_url(), 'rt_url' => get_site_url(), 'rt_urlajax' =>  (get_site_url() . '/wp-admin/admin-ajax.php') , 'a_value' => '10' );
		// wp_enqueue_script( 'ajax-script', SCC_URL . 'assets/js/scc_scripts.php', array('jquery') );
		wp_localize_script( 'jquery', 'rt_vars',$translation_array);

		
		// wp_register_script('scc-js-js_2', SCC_URL . 'assets/js/jquery.dd.min.js', array('jquery'), STYLISH_COST_CALCULATOR_VERSION, false);
		// wp_enqueue_script('scc-js-js_2');
		extract(shortcode_atts(array( 'idvalue' => '' ), $atts, 'bt_cc_item'));
		if (!is_numeric($idvalue)) {
			echo "ERROR - id does not exist";
			die();
		}
		global $wpdb;
		global $scc_googlefonts_var;
		$q = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}scc_forms WHERE id = %d", $idvalue);
		$result = $wpdb->get_row($q);
		$q = $wpdb->prepare("SELECT parameters FROM {$wpdb->prefix}scc_form_parameters WHERE form_id = %d", $idvalue);
		$result_2 = $wpdb->get_row($q);
		$result_2 = json_decode(stripslashes($result_2->parameters));
		$allfonts = json_decode($scc_googlefonts_var->gf_get_local_fonts());
		$allfonts = $allfonts->items;
		if(isset($result_2) && isset($result_2->fontType)  && isset($allfonts) && is_array($allfonts) && is_numeric($result_2->fontType) && sizeof($allfonts) > $result_2->fontType){
			$fontUsed = $allfonts[$result_2->fontType];
			if(isset($fontUsed->kind)){
				$fonts[0]['kind'] = $fontUsed->kind;
			}
			if(isset($fontUsed->family)){
				$fonts[0]['family'] = $fontUsed->family;
			}
			if(isset($fontUsed->variants)){
				$fonts[0]['variants'] = $fontUsed->variants;
			}
			if(isset($fontUsed->subsets)){
				$fonts[0]['subsets'] = $fontUsed->subsets;
			}
		}
		if(isset($result_2) && isset($result_2->titleFontType) && isset($allfonts) && is_array($allfonts) && is_numeric($result_2->titleFontType && sizeof($allfonts) > $result_2->titleFontType) ){
			$fontUsed2 = $allfonts[$result_2->titleFontType];
			if(isset($fontUsed2->kind)){
				$fonts[1]['kind'] = $fontUsed2->kind;
			}
			if(isset($fontUsed2->family)){
				$fonts[1]['family'] = $fontUsed2->family;
			}
			if(isset($fontUsed2->variants)){
				$fonts[1]['variants'] = $fontUsed2->variants;
			}
			if(isset($fontUsed2->subsets)){
				$fonts[1]['subsets'] = $fontUsed2->subsets;
			}
		}
		if(isset($fonts)){
			$scc_googlefonts_var->style_late($fonts);//load google fonts css
		}

		
		// script shortcode START

		$table_name = "scc_shortcodes";
		$table = $wpdb->prefix . $table_name;
		include_once ABSPATH . 'wp-admin/includes/upgrade.php';	

		if($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table)) != $table) {
			$scctables = "CREATE TABLE IF NOT EXISTS `{$table}` (
			`id` int(11) NOT NULL AUTO_INCREMENT,
			`scc_id` int(11) NOT NULL,
			`url` text NOT NULL,
			`visits` int(11) NOT NULL,
			PRIMARY KEY (`id`)
		) ENGINE=InnoDB  DEFAULT  CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;";
		dbDelta( $scctables);
	} else {
		$url = get_site_url() .  $_SERVER['REQUEST_URI'];
		
		if(strpos($url, 'wp-admin') == false && strpos($url, 'preview') == false) {
			$shortcode = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}scc_shortcodes WHERE %s LIKE url", array($url)));
			
			if(!empty($shortcode)){
				foreach ($shortcode as $sc) { 
					$data_update = array('visits' => $sc->visits + 1 );
					$data_where = array('scc_id' => $idvalue, 'url' => $url);
					$wpdb->update($table , $data_update, $data_where);
				}
			}else{
				
				$data = array('scc_id' => $idvalue, 'url' => $url, 'visits' => 1);
				$format = array('%d','%s','%d');
				$wpdb->insert($table,$data,$format);
			}	
			
		}
	}

		// script shortcode END	



	//ob_start(); ?>
	<style>
		/* Loading animation code for initial calculator script loading */
		
		@-moz-keyframes load-spinner {
			0% {
				-moz-transform: rotate(0deg);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
			}

			100% {
				-moz-transform: rotate(360deg);
				-webkit-transform: rotate(360deg);
				-ms-transform: rotate(360deg);
				transform: rotate(360deg);
			}
		}

		@-webkit-keyframes load-spinner {
			0% {
				-moz-transform: rotate(0deg);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
			}

			100% {
				-moz-transform: rotate(360deg);
				-webkit-transform: rotate(360deg);
				-ms-transform: rotate(360deg);
				transform: rotate(360deg);
			}
		}

		@-ms-keyframes load-spinner {
			0% {
				-moz-transform: rotate(0deg);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
			}

			100% {
				-moz-transform: rotate(360deg);
				-webkit-transform: rotate(360deg);
				-ms-transform: rotate(360deg);
				transform: rotate(360deg);
			}
		}

		@keyframes load-spinner {
			0% {
				-moz-transform: rotate(0deg);
				-webkit-transform: rotate(0deg);
				-ms-transform: rotate(0deg);
				transform: rotate(0deg);
			}

			100% {
				-moz-transform: rotate(360deg);
				-webkit-transform: rotate(360deg);
				-ms-transform: rotate(360deg);
				transform: rotate(360deg);
			}
		}

		.scc-preloader *, .scc-preloader *:before, .scc-preloader *:after {
			-moz-animation: none !important;
			-webkit-animation: none !important;
			-ms-animation: none !important;
			animation: none !important;
			-moz-transition: none !important;
			-webkit-transition: none !important;
			-ms-transition: none !important;
			transition: none !important;
		}

		.scc-preloader > .form-group {
			-moz-transform: translateX(2rem);
			-webkit-transform: translateX(2rem);
			-ms-transform: translateX(2rem);
			transform: translateX(2rem);
			opacity: 0;
		}
		.scc-preloader.scc_wrapper:before {
			-moz-transition: opacity 1s ease;
			-webkit-transition: opacity 1s ease;
			-ms-transition: opacity 1s ease;
			transition: opacity 1s ease;
			-moz-transition-delay: 0.75s;
			-webkit-transition-delay: 0.75s;
			-ms-transition-delay: 0.75s;
			transition-delay: 0.75s;
			opacity: 1;
		}


		.scc_wrapper:before {
			-moz-animation: load-spinner 1s infinite linear;
			-webkit-animation: load-spinner 1s infinite linear;
			-ms-animation: load-spinner 1s infinite linear;
			animation: load-spinner 1s infinite linear;
			-moz-transition: opacity 0.25s ease;
			-webkit-transition: opacity 0.25s ease;
			-ms-transition: opacity 0.25s ease;
			transition: opacity 0.25s ease;
			-moz-transition-delay: 0s;
			-webkit-transition-delay: 0s;
			-ms-transition-delay: 0s;
			transition-delay: 0s;
			pointer-events: none;
			content: '';
			display: block;
			position: absolute;
			left: 50%;
			width: 4rem;
			height: 4rem;
			margin: 3rem 0 0 -2rem;
			background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='loader-1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='40px' height='40px' viewBox='0 0 40 40' enable-background='new 0 0 40 40' xml:space='preserve'%3E%3Cpath opacity='0.2' fill='%23314af3' d='M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z'/%3E%3Cpath fill='%23314af3' d='M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z'%3E%3C/path%3E%3C/svg%3E");
			background-position: center;
			background-repeat: no-repeat;
			background-size: 4rem;
			opacity: 0;
		}

		/* Numberbox Border */
		.number_box_text{
			border: #F0F0F0 2px solid;
			width: 90px;
		}
		
		/* accordion */
		.scc-accordion {
			font-size: 1.7rem !important;
			padding: 10px 10px 10px 20px !important;
			border-radius: 10px;
			margin-top:20px;
			position: relative;
			color: white;
			text-decoration: none;
			display: block;
			background-color: <?php echo $result_2->objectColorPicker; ?>;
			/*	transition: 0.4s; */
		}

		.scc-accordion:not(.scc-accordion_active):after {
			position: absolute;
			content: "";
			border-top: 10px white solid;
			border-left: 6px solid transparent;
			border-right: 6px solid transparent;
			right: 22px;
			top: 45%;
			/*	transform: translatey(-6px); */
		}
		.scc-accordion_active {
			font-size: 1.7rem !important;
			padding: 10px 10px 10px 20px !important;
			border-radius: 10px;
			font-weight: 500;
			margin-top:20px;
			position: relative;
			color: white;
			text-decoration: none;
			display: block;
			background-color: <?php echo $result_2->objectColorPicker; ?>;
			/*	transition: 0.4s; */
			cursor: pointer;
		}
		.scc-accordion_active:not(.scc-accordion):after {
			position: absolute;
			content: "";
			border-bottom: 12px white solid;
			border-left: 7px solid transparent;
			border-right: 7px solid transparent;
			right: 22px;
			top: 40%;
			/*	transform: translatey(-6px); */
		}
		.scc-accordion:not(.scc-accordion_active):hover {
			opacity: .8;
			color: #fff;
			background: #B8B8B8;
			cursor:pointer;
		}
		.scc-accordion:not(.scc-accordion_active):hover:after {
			border-top: 12px #ffffff solid;
		}

		.scc-accordion-panel {

			max-height:0;
			transition: max-height 0.6s ease-in-out;
			margin-left: 10px;
			overflow: hidden;
		}
		.scc-accordion-panel-hidden {
			margin: 0px !important;
			padding: 0px !important;
			
		}
		.scc-accordion-panel-hidden > div > input {
			display: none !important;
		}
		/* accordion END */
		/* The Modal (background) */
		.modalvideosSCC {
			display: none; /* Hidden by default */
			position: fixed; /* Stay in place */
			z-index: 1; /* Sit on top */
			padding-top: 105px; /* Location of the box */
			left: 0;
			top: 0;
			width: 100%; /* Full width */
			height: 100%; /* Full height */
			overflow: auto; /* Enable scroll if needed */
			background-color: rgb(0,0,0); /* Fallback color */
			background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
		}
		.modalsupportSCC {
			display: none; /* Hidden by default */
			position: fixed; /* Stay in place */
			z-index: 1; /* Sit on top */
			padding-top: 105px; /* Location of the box */
			left: 0;
			top: 0;
			width: 100%; /* Full width */
			height: 100%; /* Full height */
			overflow: auto; /* Enable scroll if needed */
			background-color: rgb(0,0,0); /* Fallback color */
			background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
		}
		/* Modal Content */
		.scc-modal-content-2020-videosSCC {
			background-color: rgba(245, 245, 245, 0.95);
			margin: auto;
			padding: 20px;
			border: 1px solid #888;
			width: 100%;
			max-width: 1200px;
		}
		.scc-modal-content-2020-supportSCC {
			background-color: rgba(245, 245, 245, 0.95);
			margin: auto;
			padding: 20px;
			border: 1px solid #888;
			width: 100%;
			max-width: 1000px;
		}

		.modal-open {
			overflow: hidden;
		}
		.scc-modal-2020 {
			position: fixed;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			z-index: 1050;
			display: none;
			overflow: hidden;
			-webkit-overflow-scrolling: touch;
			outline: 0;
		}
		.modal.fade .scc-modal-dialog-2020 {
			-webkit-transform: translate(0, -25%);
			-ms-transform: translate(0, -25%);
			-o-transform: translate(0, -25%);
			transform: translate(0, -25%);
			-webkit-transition: -webkit-transform 0.3s ease-out;
			-o-transition: -o-transform 0.3s ease-out;
			transition: -webkit-transform 0.3s ease-out;
			transition: transform 0.3s ease-out;
			transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out, -o-transform 0.3s ease-out;
		}
		.modal.in .scc-modal-dialog-2020 {
			-webkit-transform: translate(0, 0);
			-ms-transform: translate(0, 0);
			-o-transform: translate(0, 0);
			transform: translate(0, 0);
		}
		.modal-open .scc-modal-2020 {
			overflow-x: hidden;
			overflow-y: auto;
		}
		.scc-modal-dialog-2020 {
			position: relative;
			width: auto;
			margin: 10px;
		}
		.scc-modal-content-2020 {
			position: relative;
			background-color: #fff;
			background-clip: padding-box;
			border: 1px solid #999;
			border: 1px solid rgba(0, 0, 0, 0.2);
			border-radius: 6px;
			-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
			box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
			outline: 0;
		}
		.modal-backdrop {
			position: fixed;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			z-index: 1040;
			background-color: #000;
		}
		.modal-backdrop.fade {
			filter: alpha(opacity=0);
			opacity: 0;
		}
		.modal-backdrop.in {
			filter: alpha(opacity=50);
			opacity: 0.5;
		}
		.scc-modal-header-2020 {
			padding: 15px;
			border-bottom: 1px solid #e5e5e5;
		}
		.scc-modal-header-2020 .close {
			margin-top: -2px;
		}
		.scc-modal-title-2020 {
			margin: 0;
			line-height: 1.42857143;
		}
		.scc-modal-body-2020 {
			position: relative;
			padding: 15px;
		}
		.modal-footer {
			padding: 15px;
			text-align: right;
			border-top: 1px solid #e5e5e5;
		}
		.modal-footer .btn + .btn {
			margin-bottom: 0;
			margin-left: 5px;
		}
		.modal-footer .btn-group .btn + .btn {
			margin-left: -1px;
		}
		.modal-footer .btn-block + .btn-block {
			margin-left: 0;
		}
		.modal-scrollbar-measure {
			position: absolute;
			top: -9999px;
			width: 50px;
			height: 50px;
			overflow: scroll;
		}
		@media (min-width: 768px) {
			.scc-modal-dialog-2020 {
				width: 600px;
				margin: 30px auto;
			}
			.scc-modal-content-2020 {
				-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
				box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
			}
			.modal-sm {
				width: 300px;
			}
		}
		@media (min-width: 992px) {
			.modal-lg {
				width: 900px;
			}
		}
		.scc-modal-header-2020:before,
		.scc-modal-header-2020:after,
		.modal-footer:before,
		.modal-footer:after {
			display: table;
			content: " ";
		}
		.scc-modal-header-2020:after,
		.modal-footer:after {
			clear: both;
		}

		/* paypal button  starts */
		.btPayPalButtonCustom {
			display: flex;
			margin: 0;
			background: transparent;
			border: <?php echo $result_2->objectColorPicker; ?> 2px solid;
			border-radius: 50px;
			/*	margin-right: -100%;*/
			width: 140px;
			width: 140px;
			height: 51px;
			cursor: pointer;
			-webkit-transition: box-shadow 380ms ease;
			transition: box-shadow 380ms ease;
			background-position: center center;
			background-size: 70%;
			background-repeat: no-repeat;
			flex: 0 0 130px;
			margin-left: 6px;
		}
		.rtl .btPayPalButtonCustom {
			margin-left: 0;
			margin-right: 30px;
		}
		.btPayPalButtonCustom:hover {
			/* box-shadow: 0 0 0 <?php echo $result_2->objectColorPicker; ?> inset, 0 1px 5px rgba(0,0,0,0.2); */
			box-shadow: 2px 2px 3px 1px <?php echo $result_2->objectColorPicker; ?>;
		}
		/* paypal button  ends */
		/*
		CHECKBOX BUTTON  Start
		*/
		.label-cbx input:checked + .checkbox {
			border-color: <?php echo $result_2->objectColorPicker; ?>;
		}
		.label-cbx input:checked + .checkbox svg path {
			fill: <?php echo $result_2->objectColorPicker; ?>;
		}
		.label-cbx .checkbox svg path {
			fill: none;
			stroke: <?php echo $result_2->objectColorPicker; ?>;
			stroke-width: 2;
			stroke-linecap: round;
			stroke-linejoin: round;
			stroke-dasharray: 71px;
			stroke-dashoffset: 71px;
			transition: all 0.6s ease;
		}
		/*
		CHECKBOX BUTTON  Start
		*/
		/*
		RADIO BUTTON NORMAL Start
		*/
		.itemCreated input[type="radio"] + label:after {
			box-shadow: inset 0 0 0 1px #666565, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}
		.itemCreated input[type="radio"] + label:hover {
			color: <?php echo $result_2->objectColorPicker; ?>!important;
		}
		.itemCreated input[type="radio"] + label:hover:after {
			animation-duration: .5s;
			animation-name: change-size;
			animation-iteration-count: infinite;
			animation-direction: alternate;
			box-shadow: inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}
		.itemCreated input[type="radio"]:checked + label:after {
			animation-duration: .2s;
			animation-name: select-radio;
			animation-iteration-count: 1;
			animation-direction: Normal;
			box-shadow: inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 3px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}

		.scc_customradio_style_1 {
			display: initial !important;
			width:100% !important;
		}


		.scc_customradio input[type="radio"] + label:after {
			box-shadow: inset 0 0 0 1px #666565, inset 0 0 0 16px #f6f6f6 , inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}
		.scc_customradio input[type="radio"] + label:hover {
			color: <?php echo $result_2->objectColorPicker; ?>!important;
		}
		.scc_customradio input[type="radio"] + label:hover:after {
			animation-duration: .5s;
			animation-name: change-size;
			animation-iteration-count: infinite;
			animation-direction: alternate;
			box-shadow: inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}
		.scc_customradio input[type="radio"]:checked + label:after {
			animation-duration: .2s;
			animation-name: select-radio;
			animation-iteration-count: 1;
			animation-direction: Normal;
			box-shadow: inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 3px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
		}
		@keyframes change-size {
			from {
				box-shadow: 0 0 0 0 <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
			}
			to {
				box-shadow: 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
			}
		}
		@keyframes select-radio {
			0% {
				box-shadow: 0 0 0 0 <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 2px #FFFFFF, inset 0 0 0 3px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 16px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
			}
			90% {
				box-shadow: 0 0 0 10px #E8FFF0, inset 0 0 0 0 #FFFFFF, inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 2px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
			}
			100% {
				box-shadow: 0 0 0 12px #E8FFF0, inset 0 0 0 0 #FFFFFF, inset 0 0 0 1px <?php echo $result_2->objectColorPicker; ?>, inset 0 0 0 3px #FFFFFF, inset 0 0 0 16px <?php echo $result_2->objectColorPicker; ?>;
			}
		}
		/*
		RADIO BUTTON NORMAL End
		*/

		/*
		RADIO BUTTON ANIMATED Start
		*/
		.btn-radio svg path {
			stroke: <?php echo $result_2->objectColorPicker; ?>;
		}
		/*
		RADIO BUTTON ANIMATED End
		*/

		span.scc_cuurency {
			background: <?php echo $result_2->objectColorPicker; ?>;
			padding: 13px;
			border-radius: 36px;
			position: relative;
			left: -2px;
			top: 1px;
		}
		.scc_header_dash_<?php echo $idvalue; ?>{
			content: ' ';
			clear: both;
			width: 100%;
			display: block;
			margin-bottom: 10px;
			margin-top:5px;
			border: 1px solid #f9f9fe ;
		}
		.dd-scc .ddTitle .ddTitleText img
		{
			-webkit-box-shadow: 5px 0 0 <?php echo $result_2->objectColorPicker; ?> inset, 0 2px 10px rgba(0,0,0,.2);
		}
		.scc_font_<?php echo $idvalue; ?>{
			font-family: <?php echo isset($fontUsed) && isset($fontUsed->family) ? $fontUsed->family .'!important' : '' ?> ;
			color: <?php echo $result_2->colorPicker; ?> !important;
			font-size: <?php echo $result_2->servicepricefontsize; ?> !important;
			font-weight: normal;
			max-width: <?php echo (boolean) strpos($url, 'edit_sccbyid') ? 'unset' : '850px'; ?>;
			text-align: left;
		}
		.scc_fonttitle_<?php echo $idvalue; ?>{
			font-family: <?php echo isset($fontUsed2) && isset($fontUsed2->family) ? $fontUsed2->family .'!important' : '' ?> ;
			color: <?php echo $result_2->titleColorPicker; ?> !important;
			font-size: <?php echo $result_2->titleServicepricefontsize; ?> !important;
			padding-top:40px;
		}
		.scc_fontDesc_<?php echo $idvalue; ?>{
			font-family: <?php echo isset($fontUsed2) && isset($fontUsed2->family) ? $fontUsed2->family .'!important' : '' ?> ;
			color: <?php echo $result_2->titleColorPicker; ?> !important;
			padding-bottom:20px;
		}
		/* .can-toggle.demo-rebrand-2 label .can-toggle__switch_<?php echo $idvalue; ?> {
		height: <?php echo (int)$result_2->objectServicepricefontsize -1; ?>px !important;
		flex: 0 0 120px;
		border-radius: 60px;
		}
		.can-toggle.demo-rebrand-2 label .can-toggle__switch_<?php echo $idvalue; ?>:after {
		top: 1px;
		left: 2px;
		border-radius: 30px;
		width: 58px;
		line-height: <?php echo (int)$result_2->objectServicepricefontsize - 3; ?>px !important;
		font-size: 13px;
		}
		.can-toggle.demo-rebrand-2 label .can-toggle__switch_<?php echo $idvalue; ?>:before {
		left: 60px;
		font-size: 13px;
		line-height: <?php echo (int)$result_2->objectServicepricefontsize -3; ?>px !important;
		width: 60px;
		padding: 3px 12px;
		} */
		/***********************************************************************/
		/* .can-toggle label .can-toggle__switch_<?php echo $idvalue; ?> {
		height: <?php echo (int)$result_2->objectServicepricefontsize -2; ?>px !important;
		flex: 0 0 134px;
		border-radius: 4px;
		}
		.can-toggle label .can-toggle__switch_<?php echo $idvalue; ?>:before {
		left: 67px;
		font-size: 12px;
		line-height: <?php echo (int)$result_2->objectServicepricefontsize -4; ?>px !important;
		width: 67px;
		padding: 3px 12px;
		}
		.can-toggle label .can-toggle__switch_<?php echo $idvalue; ?>:after {
		top: 2px;
		left: 2px;
		border-radius: 2px;
		width: 65px;
		line-height: <?php echo (int)$result_2->objectServicepricefontsize -4; ?>px !important;
		font-size: 12px;
		} */
		.slider-handle_<?php echo $idvalue; ?>{
			background: <?php echo $result_2->objectColorPicker; ?>;
		/* height: <?php echo $result_2->objectServicepricefontsize; ?>;
		width: <?php echo $result_2->objectServicepricefontsize; ?>;
		/* top: -<?php echo (int)$result_2->objectServicepricefontsize * 0.3; ?>px;
		height: 30px;
		width: 30px; */
		margin-top: 2px;
	}
	#myPREVIEW .totalPrice_<?php echo $idvalue; ?> p{
		/*margin-top: -45px;*/
		font-family: <?php echo isset($fontUsed2) && isset($fontUsed2->family) ? $fontUsed2->family .'!important' : '' ?> ;
		color: <?php echo $result_2->titleColorPicker; ?> !important;
		font-size:  <?php echo (int)$result_2->titleServicepricefontsize +5; ?>px !important;
		margin-bottom: 20px;
		font-size: 18px;
		text-align: center;
		display: flex;
		justify-content: center;
		align-items: center;
		display:block;
		text-align:right;
		height: 100%;
		/*padding-left: 10px!important;*/
		padding: 10px;
		/*box-shadow: 3px 2px 3px 0px #d8d8d2;*/
	}
	.totalPrice_<?php echo $idvalue; ?>{
		/*margin-top: -45px;*/
		font-family: <?php echo isset($fontUsed2) && isset($fontUsed2->family) ? $fontUsed2->family .'!important' : '' ?> ;
		color: <?php echo $result_2->titleColorPicker; ?> !important;
		font-size:  <?php echo (int)$result_2->titleServicepricefontsize +5; ?>px !important;
		margin-bottom: 20px;
		font-size: 18px;
		text-align: center;
		display: flex;
		justify-content: center;
		align-items: center;
		display:block;
		text-align:right;
		height: 100%;
		/*padding-left: 10px!important;*/
		padding: 10px;
		/*box-shadow: 3px 2px 3px 0px #d8d8d2;*/
	}
	.printTable{
		background: <?php echo $result_2->objectColorPicker; ?> !important;
		color: #fff;
		border-radius: 80px;
		font-size: 14px;
		text-align: center;
		display: flex;
		justify-content: center;
		align-items: center;
		width:auto;
		padding: 10px;
		margin: 1px 5px 5px 5px;
		/* box-shadow: 3px 2px 3px 0px #d8d8d2; */
	}
	.pretty input:checked~.state.p-success label:after, .pretty.p-toggle .state.p-success label:after{
		background-color: <?php echo $result_2->objectColorPicker; ?> !important;
	}
	.slider .tooltip-inner {
		padding: 10px 2px;
		color: white; /*<?php echo $result_2->objectColorPicker; ?>; */
		/* //line-height: <?php echo (int)$result_2->objectServicepricefontsize -4; ?>px !important; */
		margin-top: 29px;
		margin-right: -22px;
		background-color: transparent;
	}
	.slider-selection {
		position: absolute;
		background-image: -webkit-linear-gradient(top, #f9f9fe 0%, #f5f5f5 100%);
		background-image: -o-linear-gradient(top, #f9f9fe 0%, #f5f5f5 100%);
		background-image: linear-gradient(to bottom, <?php echo $result_2->objectColorPicker; ?> 0%, #f5f5f5 100%);
		background-color: <?php echo $result_2->objectColorPicker; ?> !important;
	}
	.slider.slider-horizontal .slider-track {
		height: 8px;
		width: 100%;
		margin-top: -1px;
		top: 50%;
		left: 0;
	}
	.scc_wrapper .tooltip-arrow {
		position: absolute;
		width: 0;
		height: 0;
		border-color: transparent;
		border-style: none;
	}
	.container_scccheck_<?php echo $idvalue; ?> input:checked ~ .checkmark {
		background-color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.container_sccradio_<?php echo $idvalue; ?> input:checked ~ .checkmark {
		background-color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.scchidenmodal {
		position: fixed;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.5);
		opacity: 0;
		visibility: hidden;
		transform: scale(1.1);
		transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
	}
	.scc-modal-content-2020 {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		background-color: white;
		padding: 1rem 1.5rem;
		width: 24rem;
		border-radius: 0.5rem;
	}
	.close-button {
		float: right;
		width: 1.5rem;
		line-height: 1.5rem;
		text-align: center;
		cursor: pointer;
		border-radius: 0.25rem;
		background-color: lightgray;
	}
	.close-button:hover {
		background-color: darkgray;
	}
	.sccshowmodal {
		opacity: 1;
		visibility: visible;
		transform: scale(1.0);
		transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
	}
	.checkbox-inline {
		color: <?php echo $result_2->objectColorPicker; ?> !important;
	}
	/* Start dynamic color for checkboxes */
	.can-toggle label .can-toggle__switch:after {
		color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.can-toggle input[type="checkbox"]:checked ~ label .can-toggle__switch:after {
		color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.can-toggle input[type="checkbox"]:focus ~ label .can-toggle__switch, .can-toggle input[type="checkbox"]:hover ~ label .can-toggle__switch {
		background-color: <?php echo $result_2->objectColorPicker; ?> !important;
	}
	.can-toggle label .can-toggle__switch {
		transition: background-color 0.3s cubic-bezier(0, 1, 0.5, 1);
		background: <?php echo $result_2->objectColorPicker; ?>;
		background-color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.can-toggle__switch.can-toggle__switch_<?php echo $idvalue; ?>{
		border: 0px solid <?php echo $result_2->objectColorPicker; ?> !important;
	}
	.can-toggle input[type="checkbox"]:checked ~ label .can-toggle__switch{
		color: <?php echo $result_2->objectColorPicker; ?>;
		background-color: <?php echo $result_2->objectColorPicker; ?>;
	}
	.can-toggle input[type="checkbox"]:checked:focus ~ label .can-toggle__switch, .can-toggle input[type="checkbox"]:checked:hover ~ label .can-toggle__switch {
		background-color: <?php echo $result_2->objectColorPicker; ?>;
	}
	/* End dynamic color for checkboxes */
	.checkbox-inline.btn-selected {
		background: <?php echo $result_2->objectColorPicker; ?> !important;
	}
	.scc_sentemail_quotes {
		max-width: 850px;
	}
	<?php
	if($result_2->objectColorPicker != ''){
		$qt_color = $result_2->objectColorPicker;
	}else{
		$qt_color = '#000000';
	}
	?>

	/* popup for email quote testing without bootstrap */
	/* Outer */
	.scc-email-popup {
	width:100%;
	height:100%;
	display:none;
	position:fixed;
	top:0px;
	left:0px;
	background:rgba(0,0,0,0.75);
	z-index: 100;
}
/* Inner */
.scc-email-popup-inner {
max-width: 650px;
width: 100%;
border: 5px solid <?php echo $qt_color; ?>;
padding:40px;
position:absolute;
top:50%;
left:50%;
-webkit-transform:translate(-50%, -50%);
transform:translate(-50%, -50%);
box-shadow:0px 2px 6px rgba(0,0,0,1);
border-radius:6px;
background:#fff;
}
/* Close Button */
.scc-email-popup-close {
width:30px;
height:30px;
padding-top:4px;
display:inline-block;
position:absolute;
top:0px;
right:0px;
font-size:25px;
text-align:center;
line-height:100%;
color:#000;
}
.scc-email-popup-close:hover {
text-decoration: none;
}
.trn.scc-quote-head {
width: 100%;
border-bottom: 1px solid #dedede;
display: block;
padding: 0px 0px 10px 0px;
}
#sccidsent {
padding: 20px 0px 0px 0px;
}
.scc_wrapper .input-number-decrement, .scc_wrapper .input-number-increment {
background: #f9f9fe;
border: #f9f9fe 0px solid !important;
color: <?php echo esc_html($result_2->colorPicker); ?>!important;
}
/* popup for email quote testing without bootstrap */
</style>
<?php
$dictionary_new = isset($result) && isset($result->formtranslate) ? json_decode(stripslashes(stripslashes($result->formtranslate))) : NULL;
if (is_array($dictionary_new) || is_object($dictionary_new)){
	foreach ($dictionary_new as $dic_new) {
		if(is_array($dic_new) || is_object($dic_new)){
			$arr_new[$dic_new->key]= array($dic_new->lang=>$dic_new->translation);
		}
	}
}
?>
<script>
	if (!window.hasOwnProperty('scc_jQuery')) {
		scc_jQuery = window.jQuery;
	}
		// INITIALIZING GLOBAL COUPON VARIABLE
		coupon = null

		// DISPLAYING SSC VERSION
		<?php
		if ( is_admin() ) {
			$plugin_data = get_plugin_data(SCC_DIR. '/stylish-cost-calculator.php');
		}
		?>
		var scc_version = "<?php echo isset($plugin_data) && $plugin_data ? $plugin_data['Version'] : 'You are not admin' ?>"
		console.log('-------------------------------------------------')
		console.log('|                                               |')
		console.log('|              SCC VER: ' + scc_version + '                   |')
		console.log('|                                               |')
		console.log('-------------------------------------------------')
		var modal = document.querySelector("#css_modal");
		var trigger = document.querySelector(".trigger");
		var closeButton = document.querySelector(".close-button");
		function toggleModal() {
		scc_jQuery(modal).attr("class", "sccshowmodal");
	}
	function CloseModal() {
	scc_jQuery(modal).attr("class", "scchidenmodal");
}
function SCCOpenModal(){

var scc_mandatory = '';
// check if mandatory dropdowns are empty
scc_jQuery('.mandatory_yes').each(function(){
if(scc_jQuery(this).val() ==''){
scc_jQuery(this).parent().parent().find('.alert-danger').html('<span class="trn">Please choose an option</span> !');
scc_jQuery(this).parent().parent().find('.alert-danger').css('display','block');
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(this).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
checkIfParentIsAccordionAndOpenIt(this)
}
});
// check if mandatory checkbox/button/switches are checked
scc_jQuery('[data-mandatory=yes]').each((i,e) => {
isNoneChecked = !(scc_jQuery('input', e).map((i,ee) => {return jQuery(ee).is(':checked')}).get().some(eee => eee == true))
if (isNoneChecked) {
scc_jQuery(e).find('.alert-danger').html('<span class="trn">Please choose an option</span> !').css('display','block');
scc_jQuery(e).parent().find('.scc-accordion').click();
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(e).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
} else {
scc_jQuery(e).find('.alert-danger').hide();
// scc_mandatory == '';
}
});

if(scc_mandatory == ''){

scc_jQuery('.alert-danger').html('');
scc_jQuery('.alert-danger').css('display','none');

scc_jQuery('html, body').animate({
scrollTop: scc_jQuery("#sccidsent").offset().top
}, 1000)
scc_jQuery('#sccidsent').toggle();
//   scc_jQuery('#sccidsent').css('display','block');
//   scc_jQuery('.hover_bkgr_fricctableprice').show();
scc_jQuery('#sccprinterid').attr('style','display:none !important');
scc_jQuery('#sccemailid').show();
//   scc_jQuery('#sccidsent').show();
}
}
function ClosePopup_scc2(){
scc_jQuery('.hover_bkgr_fricctableprice').hide();
scc_jQuery('#sccidsent').show();
scc_jQuery('#sccemailid').show();
scc_jQuery('body').css({
overflow: 'visible'
});
// restore header and footer's initial display property value
scc_jQuery('header').each(function () {
var initialState = jQuery(this).data('scc-headerState');
scc_jQuery(this).css({display: initialState});
});
scc_jQuery('footer').each(function () {
var initialState = jQuery(this).data('scc-footerState');
scc_jQuery(this).css({display: initialState});
});
}
function SCCPrintModal(){
var scc_mandatory = '';
// saving current display properties of the headers and footers to data for use when modal is closed
scc_jQuery('header').each(function () {
var headerState = scc_jQuery(this).css('display');
jQuery(this)
.data('scc-headerState', headerState)
.css({
display: 'none'
});
});
scc_jQuery('footer').each(function () {
var footerState = scc_jQuery(this).css('display');
jQuery(this)
.data('scc-footerState', footerState)
.css({
display: 'none'
});
});
scc_jQuery('.mandatory_yes').each(function(){
if(scc_jQuery(this).val() ==''){
scc_jQuery(this).parent().parent().find('.alert-danger').html('<span class="trn">Please choose an option</span> !');
scc_jQuery(this).parent().parent().find('.alert-danger').css('display','block');
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(this).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
checkIfParentIsAccordionAndOpenIt(this)
}
});
// check if mandatory checkbox/button/switches are checked
scc_jQuery('[data-mandatory=yes]').each((i,e) => {
isNoneChecked = !(scc_jQuery('input', e).map((i,ee) => {return jQuery(ee).is(':checked')}).get().some(eee => eee == true))
if (isNoneChecked) {
scc_jQuery(e).find('.alert-danger').html('<span class="trn">Please choose an option</span> !').css('display','block');
scc_jQuery(e).parent().find('.scc-accordion').click();
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(e).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
} else {
scc_jQuery(e).find('.alert-danger').hide();
// scc_mandatory == '';
}
})
if (scc_mandatory == '') {
scc_jQuery('.alert-danger').html('');
scc_jQuery('.alert-danger').css('display','none');
scc_jQuery('.hover_bkgr_fricctableprice').show();
scc_jQuery('#sccTale_price').attr('data-simplebar', 'init')
scc_jQuery('#sccprinterid').show();
scc_jQuery('#sccidsent').hide();
scc_jQuery('#sccemailid').hide();
}

}
function ClosePrintPopup(){
scc_jQuery('.hover_bkgr_friccprintprice').hide();
// restore header and footer's initial display property value
scc_jQuery('header').each(function () {
var initialState = jQuery(this).data('scc-headerState');
scc_jQuery(this).css({display: initialState});
});
scc_jQuery('footer').each(function () {
var initialState = jQuery(this).data('scc-footerState');
scc_jQuery(this).css({display: initialState});
});
scc_jQuery('body').css({
overflow: 'visible'
});
}
</script>
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> -->
<div style="clear: both;"></div>
<div id="scc_sending_email_progress_container"></div>
<?php
global $form_field_style;
global $toggle_boxshadow_style2;
$form_field_style = isset( $result_2->form_field_style ) ? $result_2->form_field_style : 'style_1';
$toggle_boxshadow_style2 = isset( $result_2->toggle_boxshadow_style2 ) ? $result_2->toggle_boxshadow_style2 : '';

?>
<div id='scc_form_<?php echo isset($result) && isset($result->id) ? $result->id : 0 ;?>' class='scc_wrapper scc_font_<?php echo $idvalue; ?>'>
	<div class="scc-instance form-group scc_font_<?php echo $idvalue; ?> form_fields_<?php echo $form_field_style; ?>" style="padding: 15px;border: 0px outset;">
		<?php
		echo (isset($result->description) && $result->description != '') ? "<div><p>".str_replace('///accordion:yes///', "", str_replace('[{accordion:yes}]', "", stripslashes($result->description)))."</p></div>" : '';
		$formstored = isset($result) && isset($result->formstored) ? json_decode(stripslashes(stripslashes($result->formstored))) : null;
				// more settings details

				$objectsendquote = isset($result_2->objectsendquote) ? $result_2->objectsendquote : ''; //$result_2->objectsendquote;
				$objectdetailedlist = isset($result_2->objectdetailedlist) ? $result_2->objectdetailedlist : ''; //$result_2->objectdetailedlist;
				$objecttotalword = isset($result_2) && isset($result_2->objecttotalword) ? $result_2->objecttotalword : ''; //$result_2->objecttotalword;
				$objectdetailedlistword = isset($result_2->objectdetailedlistword) ? $result_2->objectdetailedlistword : ''; //$result_2->objectdetailedlistword;


				$objectsendquoteword = isset($result_2->objectsendquoteword) ? $result_2->objectsendquoteword : ''; // isset($result_2->objectsendquoteword) ? $result_2->objectsendquoteword : '';
				$objectscccurrencylabel = isset($result_2->objectscccurrencylabel) ? $result_2->objectscccurrencylabel : ''; //$result_2->objectscccurrencylabel;
				$objectscctotalprice = isset($result_2->objectscctotalprice) ? $result_2->objectscctotalprice : ''; //$result_2->objectscctotalprice;
				$objecttotalpricestyle = isset($result_2->objecttotalpricestyle) ? $result_2->objecttotalpricestyle : ''; // $result_2->objecttotalpricestyle;

				$objectscctotalpricefloat = isset($result_2->objectscctotalpricefloat) ? $result_2->objectscctotalpricefloat : '';

				$classes = get_body_class();
				$scc_total_price_cls = "";
				if(($objectscctotalpricefloat == "turn_on_total_price_float") && (in_array('page',$classes))){
					$scc_total_price_cls = "scc_total_price_float";
				}else {
					$scc_total_price_cls = "";
				}			

				self::createItem($idvalue, $formstored, isset($result) && isset($result->id) ? $result->id : 0,$objectscccurrencylabel);//let's create the items now, like dropdown, switch, etc
				echo "<hr style='margin: 15px 0 15px 0;border: 1px solid #F0F0F0;'\>";
				echo "<div class='row scc-btn-hndle' style='padding: 5px; min-height: 60px'>";
				
				
				
				
				if($objectsendquote == ""){
					// 		echo "<div class='scc-col-md-4 scc-col-lg-3 scc-col-xs-12' style='max-width:175px;'><div class='printTable'><a class='trigger' href='#sccquoteModal' data-toggle='modal' data-target='#sccquoteModal' style='color: white;'><span class='trn'>". (($objectsendquoteword) ? $objectsendquoteword : "Email Quote") . "</span></a></div></div>";
					echo "<div class='scc-col-md-4 scc-col-lg-3 scc-col-xs-12' style='min-width: 150px;max-width: max-content;padding:0px;margin:0px;margin-right:10px'><a class='trigger' href='javascript:void(0)' onClick='SCCOpenPopUpEmail()'  style='color: white;'><div class='scc-usr-act-btns printTable'><span class='trn'>". (($objectsendquoteword) ? $objectsendquoteword : "Email Quote") . "</span></div></a></div>";
				}
				// echo "<div class='scc-col-md-3 scc-col-lg-3 scc-col-xs-7 printTable'><a class='trigger' href='javascript:void(0)' onClick='SCCOpenModal()' style='color: white;'>Send quote by email</a></div>";
				if($objectdetailedlist == ""){
					echo "<div class='scc-col-md-4 scc-col-lg-3 scc-col-xs-12' style='min-width: 150px;max-width: max-content;padding:0px;margin:0px;margin-right:10px'><a class='trigger' href='javascript:void(0)' onClick='SCCPrintModal()' style='color: white;'><div class='scc-usr-act-btns printTable'><span class='trn'>". (($objectdetailedlistword) ? $objectdetailedlistword : "Detailed List") . "</span></div></a></div>";
				}

				

				
        //DISCOUNT COUPON BUTTON (NO MESSAGE CONTAINER)
				if(isset($result_2->objectscccoupon) && $result_2->objectscccoupon != '') {
            //no display button
				}else{
					
					echo "<div class='scc-col-md-4 scc-col-lg-3 scc-col-xs-12' style='min-width: 150px;max-width: max-content;padding:0px;margin:0px;margin-right:10px' id='coupon_button'><a class='trigger' href='javascript:void(0)' onClick='addCouponCodeModal()' style='color: white;'><div class='scc-usr-act-btns printTable'><span class='trn'>Coupon Code</span></div></a></div>";
					echo '<div id="coupon_code_modal_container"></div>';
				}


				
        // paypal button starts
				if(isset($result_2) && isset($result_2->paypal_checked) && $result_2->paypal_checked  && $result_2->paypal_checked == true && strlen($result_2->paypal_email) > 4) {
					echo '<div class="scc-col-md-4 scc-col-lg-3 scc-col-xs-12" style="min-width: 150px;max-width: max-content;padding:0px;margin:0px;"><form id="paypal_form"  action="https://www.paypal.com/cgi-bin/webscr" method="post" style="">';
					echo '  <input type="hidden" name="cmd" value="_cart">';
					echo '  <input type="hidden" name="upload" value="1">';
					echo '  <input type="hidden" name="business" value="' .trim($result_2->paypal_email). '">';
					echo '  <input type="hidden" name="item_name" value="' .$result_2->paypal_shopping_cart_name. '">';
					echo '  <input type="hidden" name="currency_code" value="' .$result_2->paypal_currency. '">';
            //echo '  <input type="image" style="display:none"  src="/assets/images/paypal.png" name="submit" alt="PayPal">';
            //echo '  <input type="hidden" name="item_name_1" value="name of item 1" class="btPayPalItem">
            //echo '  <input type="hidden" name="amount_1" value="12.00" class="btPayPalItem">
					echo '   <div id="paypal_form_add_items"></div>';
            //echo '<button type="submit">Go</button>';

					echo '<button class="ssc-col-xs-12" type="submit" style="margin:0px;padding:0px;background-color: transparent;border:0px"><div class="btPayPalButtonCustom" style="background-image:url('. plugin_dir_url('/stylish-cost-calculator/assets/images/paypal.png') .'paypal.png)"></div></button>';

					echo  '</form></div>';
				}
				
				
        //COUPON MESSAGE CONTAINER
				if(isset($result_2->objectscccoupon) && $result_2->objectscccoupon != '') {
            //no display button
				}else{
					
					echo '<div class="scc-col-md-12 scc-col-xs-12" id="coupon_info_container" style="display: none; text-align:right;">';

					echo         '<div id="coupon_info_message" style="color:green"></div>';
					echo         '<div id="coupon_info_discount_percentage"></div>';
					echo         '<div id="coupon_info_discount_value"></div>';
					echo         '<div id="coupon_info_spend_range"></div>';

					echo '</div>';
					

				}
				// else{
				// echo "<div class='scc-col-md-4 scc-col-lg-3 scc-col-xs-12 style='display:none;'><div class='printTable'><a class='trigger' href='javascript:void(0)' onClick='SCCPrintModal()' style='color: white;'><span class='trn'>". (($objectdetailedlistword) ? $objectdetailedlistword : "View detailed list") . "</span></a></div></div>";
				// }
				// echo "<div class='scc-col-md-3 scc-col-lg-3 scc-col-xs-7 printTable'><a class='trigger' href='javascript:void(0)' onClick='SCCPrintModal()' style='color: white;'>View detailed list</a></div>";
				echo "<div class='scc-col-md-3 scc-col-lg-4 scc-col-xs-4'><div style='display: none;'><input type='button' value='Submit' id='scc_submit_".((isset($result) && isset($result->id) )? $result->id : 0)."' class='submitPrices' /></div></div></div>";
				echo "<div class='row' style='height: 60px;padding: 5px 0px 0 5px;'>";
				echo "<div class='scc-col-md-7 scc-col-lg-7 scc-col-xs-7' style=''>&nbsp;</div>";


				echo "<div class='scc-col-md-12 scc-col-lg-12 scc-col-xs-12' style='padding:0px'>";
				if($objecttotalpricestyle == 'scc_tp_style1'){
					if($objectscctotalprice != "scc_turn_off_total_price_view"){

						if($objectscccurrencylabel === "scc_remove_currency_label"){
							echo "<div style='padding:0;' class='".$scc_total_price_cls." totalPrice totalPrice_".$idvalue."'><div style='background: ".$result_2->objectColorPicker." !important;color: #fff!important;padding: 1.5% 1% 1.5%;margin-top:10px'><span style='' class='trn Total scc_first'>Total </span>&nbsp;<span id='totalvalue'>0</span></div></div></div>";
						}else{
							echo "<div style='padding:0;' class='".$scc_total_price_cls." totalPrice totalPrice_".$idvalue."'><div style='background: ".$result_2->objectColorPicker." !important;color: #fff!important;padding: 1.5% 2% 1.5%;margin-top:1px;'><span style='' class='trn Total scc_first' id='total_price_with_label'>Total </span>&nbsp<span id='totalprice_prefix_currency_label'></span>&nbsp; <span id='totalvalue'>0</span>&nbsp;<span id='totalprice_sufix_currency_label' style='font-size:70%;'></span></div></div></div>";
						}
					}
					else {
						//echo "<div style='padding:0;' class='".$scc_total_price_cls." totalPrice totalPrice_".$idvalue."'><div style='background: ".$result_2->objectColorPicker." !important;color: #fff!important;padding: 1.5% 2% 1.5%;margin-top:1px;'><span style='' class='trn Total scc_first' id='total_price_with_label'>Total </span>&nbsp<span class='totalprice_prefix_currency_label'></span>&nbsp; <span id='totalvalue'>0</span>&nbsp;<span class='totalprice_sufix_currency_label' style='font-size:70%;'></span></div></div></div>";
					}
				}elseif($objecttotalpricestyle == 'scc_tp_style4'){
					if($objectscctotalprice != "scc_turn_off_total_price_view"){
						if($objectscccurrencylabel === "scc_remove_currency_label"){
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span><span style='font-size:80%!important;font-weight:300' class='trn Total'>Total</span> <span id='totalvalue'>0</span></p></div></div>";
						}else{
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span><span style='font-size:80%!important;font-weight:300' class='trn Total' id='total_price_with_label'>Total</span>  <span id='totalprice_prefix_currency_label' class-'scc-style-4'></span>&nbsp;<span id='totalvalue'>0</span> <span id='totalprice_sufix_currency_label'></span></span></div></div>";
						}
					}
				} elseif($objecttotalpricestyle == 'scc_tp_style3'){
					if($objectscctotalprice != "scc_turn_off_total_price_view"){
						if($objectscccurrencylabel === "scc_remove_currency_label"){
							// Currency word after price.
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span style='margin-bottom:-10px;max-width: 175px; float: right;'><span style='font-size:70%!important;float:right;padding-bottom:5px;display: block;color:#DDDDDD; line-height: 50px;' class='trn Total'>Total</span> <span id='totalvalue' style='    display: block;'>0</span></span></div></div>";
						}else{
							// Currency symbol before. No letters after.
							echo "<div style='font-size:110%;padding:0px;' class='totalPrice totalPrice_".$idvalue."'><span style='margin-bottom:-10px;max-width: 375px; float: right;width: 100%;'><span style='font-size:60%!important;float:right;margin-bottom:-10px;display: block;color:#DDDDDD;font-weight:normal; line-height: 50px;' class='trn Total'>Total</span> <div class='scc_tp_style_3' style='display: block;clear:both;' id='total_price_with_label'> <span id='totalprice_prefix_currency_label' style='font-size:110%!important;'></span><span id='totalvalue' style='font-size:110%!important;'>0</span> <span id='totalprice_sufix_currency_label'></span></div></span></div></div>";
						}
					} else {
						//echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span><span style='font-size:80%!important;font-weight:300' class='trn Total' id='total_price_with_label'>Total</span>  <span  class-'scc-style-4 totalprice_prefix_currency_label'></span>&nbsp;<span id='totalvalue'>0</span><span class='totalprice_sufix_currency_label'></span></span></div></div>";
					}
				}elseif($objecttotalpricestyle == 'scc_tp_style2'){
					if($objectscctotalprice != "scc_turn_off_total_price_view"){
						if($objectscccurrencylabel === "scc_remove_currency_label"){
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><div style='background-color: ".$result_2->objectColorPicker."E6;color: #fff;padding: 5px;border-radius: 10px;padding: 1.5% 1% 1%'><span style='color:#FFF;font-weight:300;font-size:80%' class='trn Total' >Total</span> <span id='totalvalue' style='background: ".$result_2->objectColorPicker." !important; padding: 6px 15px; border-radius: 10px;margin-right: -5px;'>0</span></div></div></div>";
						}else{
							// Currency symbol before. No letters after.
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><div  style='background-color: ".$result_2->objectColorPicker."E6;color: #fff;border-radius: 10px;padding: 1.5% 1% 1%'><span style='color:#FFF;font-weight:300;font-size:80%' class='trn Total' id='total_price_with_label'>Total</span><span style='background: ".$result_2->objectColorPicker." !important;  padding: 6px 15px;  border-radius: 10px;margin-right: -5px;' ><span id='totalprice_prefix_currency_label'></span> <span id='totalvalue'>0</span> <span id='totalprice_sufix_currency_label'></span></div></div></div>";
						}
					}else {
						//echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span><span style='font-size:80%!important;font-weight:300' class='trn Total' id='total_price_with_label'>Total</span>  <span  class-'scc-style-4 totalprice_prefix_currency_label'></span>&nbsp;<span id='totalvalue'>0</span><span class='totalprice_sufix_currency_label'></span></span></div></div>";
					}
				}else{
					if($objectscctotalprice != "scc_turn_off_total_price_view"){
						if($objectscccurrencylabel === "scc_remove_currency_label"){
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><div><span style='' class='trn Total'>Total</span> <span id='totalvalue'>0</span></div></div></div>";
						}else{
							// Currency symbol before. No letters after.
							echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><div><span style='' class='trn Total' id='total_price_with_label'>Total</span>  <span id='totalprice_prefix_currency_label'></span> <span id='totalvalue'>1</span><span id='totalprice_sufix_currency_label'></span></div></div></div>";
						}
					}else {
						//echo "<div style='padding:0;' class='totalPrice totalPrice_".$idvalue."'><span><span style='font-size:80%!important;font-weight:300' class='trn Total' id='total_price_with_label'>Total</span>  <span  class-'scc-style-4 totalprice_prefix_currency_label'></span>&nbsp;<span id='totalvalue'>0</span><span class='totalprice_sufix_currency_label'></span></span></div></div>";
					}
				}


				echo "</div></div></div>";

				// echo "<div class='scc-col-md-12 scc-col-lg-12 scc-col-xs-12 totalPrice totalPrice_".$idvalue."'><p>Total: 0 ".get_option('scc_currency', 'USD')."</p></div></div></div>";
				echo "<div style='padding-top:10px;padding-bottom:10px;' id='statusMsg'></div>";


				// Email Quote
				$licens = get_option('scc_licensed');
				if($licens == 0) $licens_enable ="disabled"; else $licens_enable ="";
				// echo $licens_enable;

				echo "<div id='sccquoteModal' class='scc-email-popup' data-popup='popup-1'  style='max-width:100% !important;'>";
				echo "<div class='scc-email-popup-inner'>";
				echo "<span class='trn scc-quote-head' style='font-weight:500;font-size:20px; color: $result_2->objectColorPicker;'>Email Quote Form</span>";
				echo "<p>";
				echo "<div id='sccidsent' class='sscfull-height position-relative scc_sentemail_quotes' style=''>";
				echo "<div class='row scc-email-quts sscfull-width position-relative scccontrol' id='sccemailid' style='height: 7%; justify-content: center; align-items: center;margin:0 auto;'>";
				echo "<div class='scc-col-md-12 scc-col-xs-12 sscfull-height' style='display: flex; justify-content: center; align-items: center;padding: 0.5%;'> <div class='trn scc-col-md-4 scc-col-xs-12'>Your Name</div><br>  <input id='sscuserAddress' class='trn scc-col-md-8 scc-col-xs-12 performance-facts__summary4' type='text'placeholder='' style='color:#666;border: 1px solid #dad7d7;'/></div><br><br>";
				echo "<div class='scc-col-md-12 scc-col-xs-12 sscfull-height' style='display: flex; justify-content: center; align-items: center;padding: 0.5%;'> <div class='trn scc-col-md-4 scc-col-xs-12'>Your Email</div><br> <input id='sscemailAddress' class='trn scc-col-md-8 scc-col-xs-12 performance-facts__summary4' type='email' placeholder='' style='color:#666;border: 1px solid #dad7d7;'/></div><br><div style='color:red; margin-left:30px' id='email-error'></div><br>";
				echo "<div class='scc-col-md-12 scc-col-xs-12 sscfull-height' style='display: flex; justify-content: center; align-items: center;padding: 0.5%;'> <div class='trn scc-col-md-4 scc-col-xs-12'>Your Phone (Optional)</div><br> <input id='sscuserPhone' class='trn scc-col-md-8 scc-col-xs-12 performance-facts__summary4' type='text' placeholder='' style='color:#666;border: 1px solid #dad7d7;'/></div><br><br><br>";
				echo "<div class='scc-col-md-12 scc-col-xs-12 sscfull-height' style='margin-top:20px;padding-top:20px;display: flex; justify-content: center; align-items: center;padding: 0.5%;'><button  class='scc_button_table performance-facts__summary2' style='' onclick='javascript:sendemail($licens);' id='sendemail'><span class='trn SEND'>SEND</span></button></div>";
				echo "</div>";
				echo "</div>";
				echo "</p>";
				echo "<a class='scc-email-popup-close' data-popup-close='popup-1' href='#'>&times;</a>";
				echo "</div>";
				echo "</div>";

				?>
			</div>
			<!-- necessary div before inline script --><div>
				<?php
				if(is_admin()) {
					$formid = $idvalue;
					?> 
					<div class="scc-cstm-desktop-view">

						<?php
						if(!defined('SCC_DIR')) {
							define('SCC_DIR', dirname( __FILE__ ));
						}
						include SCC_DIR . '/core/front-end-summary-view.php';
						?>
					</div>
					<?php
				} else {
					add_action('wp_footer', function() use ( $idvalue, $result_2, $result, $fontUsed, $arr_new ) { 
						$formid = $idvalue;
						self::setDetailView( $formid, $result_2, $result, $fontUsed, $arr_new ); }, 900);
				}
				static::addJavascript($result);
				$data = ob_get_contents();
				ob_end_clean();
				return $data;
			}
			public static function GermanCharactersInverse($text) {
				if(is_string($text)){
			//echo "<script>console.log('before ".$text."')</script>";
					$text = str_replace("[a]","ä",$text);
					$text = str_replace("[o]","ö",$text);
					$text = str_replace("[u]","ü",$text);
					$text = str_replace("[b]","ß",$text);
					$text = str_replace("[A]","Ä",$text);
					$text = str_replace("[O]","Ö",$text);
					$text = str_replace("[U]","Ü",$text);
					$text = str_replace("[B]","ẞ",$text);
			//echo "<script>console.log('after ".$text."')</script>";
				}
				
				return $text;
			}
			public static function createItem($idvalue, $formstored, $id,$displaycurrencylabel)
			{
				$a = 0;
				global $wpdb;
				$colorPicker_description = '#000000';
				if(isset($result_2) && isset($result_2->colorPicker)){
					$colorPicker_description = $result_2->colorPicker;
				}

				$q = $wpdb->prepare("SELECT parameters FROM {$wpdb->prefix}scc_form_parameters WHERE form_id = %d", $id);
				$result_2 = $wpdb->get_row($q);
				$params = json_decode($result_2->parameters);

				if (is_array($formstored)) {
					$index = -1;
					foreach ($formstored as $opt) {
						$index++;
						if (!empty($opt->value)) {
							$opt->desc = str_replace("[{accordion:yes}]","///accordion:yes///",$opt->desc);
							$accordion = strpos(str_replace('"','\"',str_replace("'","\'",$opt->desc)), '///accordion:yes///');
							if($accordion !== false){
								echo "<div class='scc-accordion' id='section_".$index."' style='color:white !important; font-size:25px;'>".self::GermanCharactersInverse( $opt->name)."</div>";

							}else{
								echo "<div class='scc-h2 scc_fonttitle_{$idvalue}'>".self::GermanCharactersInverse( $opt->name)."</div>";
								echo "<div class='scc_header_dash_{$idvalue}'></div>";
							}
							if($accordion !== false){
								echo ($opt->desc != '') ? "<div class='scc_font_{$idvalue} scc-accordion-panel scc-accordion-panel-hidden section_".$index."' style='color:". $colorPicker_description .";margin-top:20px;margin-bottom: 20px'>".(str_replace('///accordion:yes///', "", stripslashes($opt->desc )))."</div>" : '';
							}else{
								echo ($opt->desc != '') ? "<div class='scc_font_{$idvalue} ' style='color:". $colorPicker_description .";margin-bottom:20px;'>".(str_replace('///accordion:yes///', "", stripslashes($opt->desc )))."</div>" : '';
							}

							foreach ($opt->value as $key) {
								foreach ($key->Nooptions as $x) {
									$d=  str_replace('"', '', json_encode($x->type));
									switch ($d) {
										case 'titledescdiv':
										self::createTitleDesc($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), self::GermanCharactersInverse($opt->description), $a, $opt->type, $id, $params, $accordion, $index);
										break;

										case 'selectoption':
										self::createDropdownForm($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), $opt->section, self::GermanCharactersInverse($x->element), $id, $key->subsection,$displaycurrencylabel, $accordion, $index);
										break;

										case 'switchoption':
										$is_mandatory = isset($x->mandatory) ? $x->mandatory : false;
										self::switchForm($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), $opt->section, $x->type, $id, $params, self::GermanCharactersInverse($x->element), $key->subsection,$displaycurrencylabel, $accordion, $index, $is_mandatory);
										break;

										case 'AsliderOption':
										self::sliderForm($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), self::GermanCharactersInverse($opt->description), $a, $opt->type, $id, $params, $accordion, $index, isset($key->isSlidingScale) ? $key->isSlidingScale : false);
										break;

										case 'comment_option':
										self::createCommentBox($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), $opt->section, self::GermanCharactersInverse($x->element), $id, $key->subsection,$displaycurrencylabel, $accordion, $index);
										break;

										case 'number_option':
										self::createNumberBox($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse( $opt->name), $opt->section, self::GermanCharactersInverse($x->element), $id, $key->subsection,$displaycurrencylabel, $accordion, $index);
										break;
									}
								}

								if (!empty($key->minmax)) {
									self::sliderForm($idvalue, $key, $opt->name, $opt->section, $id, $params, $accordion, $index, isset($key->isSlidingScale) ? $key->isSlidingScale : false);
								}
						/*
							START - ADDING CUSTOM MATH AT THE END OF THE SUBSECTION
						*/
							foreach ($key->Nooptions as $x) {
								$d=  str_replace('"', '', json_encode($x->type));
								
								switch ($d) {
									case "'scc_custom_math'":
									self::createCustomMath($idvalue, self::GermanCharactersInverse($x->value), self::GermanCharactersInverse($opt->name), $opt->section, self::GermanCharactersInverse($x->element), $id, $key->subsection,$displaycurrencylabel, $accordion, isset($title_column_desktop) ?? $title_column_desktop, isset($title_column_mobile) ?? $title_column_mobile, isset($element_column_desktop) ?? $element_column_desktop, isset($element_column_mobile) ?? $element_column_mobile, $index, isset($opt->title) ?? $opt->title);
									break;
								}
							}
						/*
								END - ADDING CUSTOM MATH AT THE END OF THE SUBSECTION
						*/
								++$a;
							}
							?>
							<?php if (isset($opt->showSectionTotal) && $opt->showSectionTotal): ?> 
								<div class="scc-multiple-total-<?php echo $idvalue; ?> scc-section-total" <?php echo "data-section='$index'"; ?>><span class="scc-multiple-total"><?php echo $opt->name; ?> <span class="trn">Total</span>: <span class="scc-multiple-total-text">0</span></span></div>
							<?php endif; ?>
							<?php
						}
					}
				}
			}

			public static function TaxForm($idvalue, $id, $params){
		//unused code block action commented on line no:483
				?>
				<div class="scc-col-md-12 scc-col-lg-12 scc_font_<?php echo $idvalue; ?>" style="margin-top: 10px;">
					<label class="scc-col-md-4 scc-col-xs-12 control-label scc_font_<?php echo $idvalue; ?>">Tax</label>
					<div class="scc-col-md-8 scc-col-xs-12">
						<h5 id="taxRate"> %<?php echo (($params->objecttaxrate) ? $params->objecttaxrate : 0); ?></h5>
						<input type="hidden" value="<?php echo (($params->objecttaxrate) ? $params->objecttaxrate : 0); ?>" name="scc_taxrate" />
					</div>
				</div>
				<?php
			}

			public static function createCustomMath($idvalue, $formstored, $name, $a, $id, $idd, $pr,$displaycurrencylabel, $accordion, $title_column_desktop, $title_column_mobile, $element_column_desktop, $element_column_mobile, $section_index, $title){
				if (!is_array($formstored)) {
					return;
					$No = $formstored->No;
				}

				global $form_field_style;
				global $toggle_boxshadow_style2;
				$field_class_name = 'form_field_item_' . $form_field_style;
				
				
				if($field_class_name == 'form_field_item_style_1'){
					
					?>
					<!---Custom Math with Frontend Style 1-->
					<div <?php echo isset($formstored[0]->column_mobl) && $formstored[0]->column_mobl == true ? 'data-show-detailed-list="true"' : ''?>  <?php echo isset($formstored[0]->column_dskp) && $formstored[0]->column_dskp == true ? '' : 'style="display:none"'?> class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
						<div class="control-label scc-col-md-<?php echo isset($scc_num_col_dskp) ?? $scc_num_col_dskp; ?> scc-col-lg-<?php echo isset($scc_num_col_dskp) ?? $scc_num_col_dskp; ?> scc-col-xs-<?php echo isset($scc_num_col_mobl) ?? $scc_num_col_mobl ; ?> scc_select_opt scc-form-field-item-control" style="padding: 10px;border: solid 1px #E8E8E8;border-radius: 10px;">
							
							<label style="font-weight: 300" data-name='<?php echo $formstored[0]->title ?>'  id='itemcreateds_<?php echo $a."_".$pr."_".$id ?>'class='itemCreated' data-inputtype='scc_custom_math' data-math-type='<?php echo $formstored[0]->name ?>' data-value='<?php echo $formstored[0]->value2 ?>' >
								<?php echo  $formstored[0]->title . ': ' . $formstored[0]->name . ' <span class="scc_custom_math_value_front_end">'. $formstored[0]->value2 . '</span>' ?>
							</label>
						</div>
						<div style="clear: both;"></div>
						<div class="alert alert-danger" role="alert" style="display:none;"></div>
					</div>
				<?php }else{ ?>
					<!---Custom Math with Frontend Style 2-->
					<div <?php echo isset($formstored[0]->column_mobl) && $formstored[0]->column_mobl == true ? 'data-show-detailed-list="true"' : ''?>  <?php echo isset($formstored[0]->column_dskp) && $formstored[0]->column_dskp == true ? '' : 'style="display:none"'?>  <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?>  class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
						<div class="control-label scc-col-md-12 scc-col-lg-12 scc-col-xs-12 scc_select_opt scc-form-field-item-control" style="padding: 10px;border: solid 1px #E8E8E8;border-radius: 10px;">
							<label style="font-weight: 300" data-name='<?php echo $formstored[0]->title ?>' id='itemcreateds_<?php echo $a."_".$pr."_".$id ?>'class='itemCreated' data-inputtype='scc_custom_math' data-math-type='<?php echo $formstored[0]->name ?>' data-value='<?php echo $formstored[0]->value2 ?>' >
								<?php echo  $formstored[0]->title . ': ' . $formstored[0]->name . ' <span class="scc_custom_math_value_front_end">'. $formstored[0]->value2 . '</span>' ?>
							</label>
						</div>
						<div style="clear: both;"></div>
						<div class="alert alert-danger" role="alert" style="display:none;"></div>
					</div>		
				<?php } ?>
				<div style="clear: both;"></div>
				<script>
					document.addEventListener('DOMContentLoaded', (event) => {
						scc_jQuery(document).ready(function(e) {
							function initMsdropdown<?php echo ($a.'_'.$pr.'_'.$id.'_'.$idvalue); ?>() {
								scc_jQuery("#selectbasic_<?php echo ($a.'_'.$pr.'_'.$id.'_'.$idvalue); ?>").msDropdown({roundedBorder:false});
							}
							try {
								initMsdropdown<?php echo ($a.'_'.$pr.'_'.$id.'_'.$idvalue); ?>();
							} catch (error) {
								console.log('msdropdown loaded asyncronusly');
								var msDropdownScript = document.getElementById('scc-js-js-js');
								msDropdownScript.onload = function () {
									initMsdropdown<?php echo ($a.'_'.$pr.'_'.$id.'_'.$idvalue); ?>();
								}
							}
						});
					});
				</script>
				<?php
			}

			public static function sliderForm($idvalue, $val, $name, $a, $id, $params, $accordion, $section_index, $isSlidingScale)
			{
				$w = $val->subsection;
				$fval = $val->minmax;
				
				global $form_field_style;
				global $toggle_boxshadow_style2;
				$field_class_name = 'form_field_item_' . $form_field_style;
				if(($field_class_name == 'form_field_item_style_1') && (isset($fval[0]->column_dskp) != '') && (isset($fval[0]->column_mobl) != '') ){
					$scc_slider_col_dskp = 12 - $fval[0]->column_dskp;
					$scc_slider_col_mobl = 12 - $fval[0]->column_mobl;
					if($fval[0]->column_dskp == 12){
						$scc_slider_col_dskp = 12;
					}
					if($fval[0]->column_mobl == 12){
						$scc_slider_col_mobl = 12;
					}
					?>
					<div class="scc-form-field-item <?php echo $field_class_name; ?> slider_in_mobile <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?> scc_font_<?php echo $idvalue; ?>"  <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
						<label class="scc-col-md-<?php echo $fval[0]->column_dskp; ?> scc-col-xs-<?php echo $fval[0]->column_mobl; ?> control-label scc_font_<?php echo $idvalue; ?> scc-form-field-item-label"><?php echo self::GermanCharactersInverse($fval[0]->title) ?></label>
						<div class="scc-col-md-<?php echo $scc_slider_col_dskp; ?> scc-col-xs-<?php echo $scc_slider_col_mobl; ?> scc_sld_cntrl scc-form-field-item-control" style="padding:0px;">
							<div class="scc-form-slider-field">
								<?php
								$aa = "";
								for ($i = 0; $i < count($fval); $i++) {
									if($i < count($fval)-1){
										$aa .= self::GermanCharactersInverse($fval[$i]->name).','.self::GermanCharactersInverse($fval[$i]->value1).','.self::GermanCharactersInverse($fval[$i]->value2).',';
									}
									else {
										$aa .= self::GermanCharactersInverse($fval[$i]->name).','.self::GermanCharactersInverse($fval[$i]->value1).','.self::GermanCharactersInverse($fval[$i]->value2);
									}
								}
						//        $aa= str_replace(', ', '', $aa);
								echo "<input  id='itemcreateds_".$a."_".$w."' style='display: none !important' data-inputtype='sliderinput' type='text' data-slider-tooltip='always' data-slider-tooltipstep='1'  data-slider-step='".$val->step."' class='slider itemCreated' data-slider-value='".$val->defaultValue."' data-slider-handlebackground='".$idvalue."' data-slider-multiplier='1' data-slider-min='".($fval[0]->name)."' data-slider-max='".($fval[count($fval)-1]->value1)."' data-is-sliding-scale='".((isset($isSlidingScale) && $isSlidingScale) ? 'true' : 'false')."' data_range='".$aa." '/>"; ?>
							</div>
						</div>
						<div style="clear: both;"></div>
					</div>
				<?php }else{ ?>
					<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item <?php echo $field_class_name; ?> slider_in_mobile <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?> scc_font_<?php echo $idvalue; ?>">
						<label class="scc-col-md-4 scc-col-xs-12 control-label scc_font_<?php echo $idvalue; ?> scc-form-field-item-label"><?php echo self::GermanCharactersInverse($fval[0]->title) ?></label>
						<div class="scc-col-md-8 scc-col-xs-12 scc_sld_cntrl scc-form-field-item-control" style="padding:0px;">
							<div class="scc-form-slider-field">
								<?php
								$aa = "";
								for ($i = 0; $i < count($fval); $i++) {
									if($i < count($fval)-1){
										$aa .= self::GermanCharactersInverse($fval[$i]->name).','.self::GermanCharactersInverse($fval[$i]->value1).','.self::GermanCharactersInverse($fval[$i]->value2).',';
									}
									else {
										$aa .= self::GermanCharactersInverse($fval[$i]->name).','.self::GermanCharactersInverse($fval[$i]->value1).','.self::GermanCharactersInverse($fval[$i]->value2);
									}
								}
						//        $aa= str_replace(', ', '', $aa);
								echo "<input  id='itemcreateds_".$a."_".$w."' style='display: none !important' data-inputtype='sliderinput' type='text' data-slider-tooltip='always' data-slider-tooltipstep='1'  data-slider-step='".$val->step."' class='slider itemCreated' data-slider-value='".$val->defaultValue."' data-slider-handlebackground='".$idvalue."' data-slider-multiplier='1' data-slider-min='".($fval[0]->name)."' data-slider-max='".($fval[count($fval)-1]->value1)."' data-is-sliding-scale='".((isset($isSlidingScale) && $isSlidingScale) ? 'true' : 'false')."' data_range='".$aa." '/>"; ?>
							</div>
						</div>
						<div style="clear: both;"></div>
					</div>		
				<?php } ?>
				<div style="clear: both;"></div>
				<script>
					document.addEventListener('DOMContentLoaded', (event) => {
						if(scc_jQuery('.scc-instance').length > 1) {
							scc_jQuery('.scc-instance').each(function(i,e) {
								scc_jQuery(e).html('<h3>Stylish Cost Calculator</h3><p>Multiple Calculators feature is not available in the free version. Please upgrade to premium</p>');
							});
						}
						scc_jQuery( document ).ready(function() {
							if(scc_jQuery( window ).width() < 580){
								scc_jQuery('.slider_in_mobile').each(function (index, ob){
									scc_jQuery(ob).css('marginBottom', 64)
								})
							}
							<?php
							if(is_rtl()){
								echo 'console.log("is rtl !");';

								echo "setTimeout(function(){";
								echo "scc_jQuery('.slider').each(function (index, ob){";
								echo "	scc_jQuery(ob).find('.tooltip-inner').each(function (ind, ob2){";
								echo "		scc_jQuery(ob2).css('margin-right', 22);";
								echo"})";
								echo "})";
								echo "}, 2000);";
							}{
								echo 'console.log("is NOT rlt");';
							}
							?>
							scc_jQuery('.sccmodalclose').click(function(){
							scc_jQuery('#sccquoteModal').removeClass('in');
							scc_jQuery(' .modal-backdrop.fade.in ').css('display','none');
							scc_jQuery('#sccquoteModal').css('display','none');
						});
					});
				});
			</script>
			<script>
				document.addEventListener('DOMContentLoaded', (event) => {
					scc_jQuery(function() {
					//----- OPEN
					scc_jQuery('[data-popup-open]').on('click', function(e) {
						var targeted_popup_class = scc_jQuery(this).attr('data-popup-open');
						scc_jQuery('[data-popup="' + targeted_popup_class + '"]').fadeIn(350);

						e.preventDefault();
					});

					//----- CLOSE
					scc_jQuery('[data-popup-close]').on('click', function(e) {
						var targeted_popup_class = scc_jQuery(this).attr('data-popup-close');
						scc_jQuery('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);

						e.preventDefault();
					});
				});
				});
			</script>
			<script>
				document.addEventListener('DOMContentLoaded', (event) => {
				scc_jQuery( document ).ready(function() {   // Without JQuery
					triggerSubmit(<?php echo $id; ?>, "#itemcreateds_<?php echo $a."_".$w; ?>");
				});

				function initSlider<?php echo $a."_".$w; ?>() {
					var slider = new Slider("#itemcreateds_<?php echo $a."_".$w; ?>");
					slider.on("change", function(sliderValue) {triggerSubmit(<?php echo $id; ?>, "#itemcreateds_<?php echo $a."_".$w; ?>");});
					triggerSubmit(<?php echo $id; ?>, "#itemcreateds_<?php echo $a."_".$w; ?>");
				}
				try {
					initSlider<?php echo $a."_".$w; ?>();
				} catch (error) {
					var sliderScript = document.getElementById('scc-js-js-js');
					sliderScript.onload = function () {
						console.log('slider loaded asyncronusly');
						initSlider<?php echo $a."_".$w; ?>();
					};
				}
			});
		</script>
		<?php
	}

	public static function switchForm($idvalue, $values, $name, $a, $type, $id, $params, $idd, $idx,$displaycurrencylabel, $accordion, $section_index, $is_mandatory)
	{
		$b = 1;
		$colorPicker = isset($params) && isset($params->objectColorPicker) ? $params->objectColorPicker : '';
		$servicepricefontsize = isset($params) && isset($params->servicepricefontsize) ? $params->servicepricefontsize : '';
		$theStyle = "style='border: 1px solid $colorPicker; color: $colorPicker; font-size: $servicepricefontsize'";
		$theStyle2 = "style='border: 1px solid $colorPicker; background: $colorPicker; font-size: $servicepricefontsize'";
		$theStyle3 = "style='margin-left:15px; border: 1px solid $colorPicker; background: $colorPicker; font-size: $servicepricefontsize';";
		$thebuttonStyle = "style='cursor:pointer;border: 1px solid $colorPicker; background: $colorPicker;font-size: $servicepricefontsize'";

		global $form_field_style;
		global $toggle_boxshadow_style2;
		$field_class_name = 'form_field_item_' . $form_field_style;
		?>
		<!-- Start Checkbox/button/toggle -->
		<span class="scc-chkbx-container" data-mandatory="<?php echo $is_mandatory ? 'yes' : 'no' ?>">
			<?php
			foreach ($values as $val) {
				$typeFormat = $val->value2;
				$No = $val->No; 
				if ($typeFormat == 1) {
					if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
						$scc_chkbx_col_dskp = 12 - $val->column_dskp;
						$scc_chkbx_col_mobl = 12 - $val->column_mobl;
						if($val->column_dskp == 12){
							$scc_chkbx_col_dskp = 12;
						}
						if($val->column_mobl == 12){
							$scc_chkbx_col_mobl = 12;
						}
						/* Checkbox Circle (Animated 1) */ ?>
						<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>"  <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
							<div class="scc-circle-checkbox-field-wrapper" <?php echo $form_field_style == 'style_1'? '' : 'style=""'?>>
								<div class="scc_customradio <?php echo $form_field_style == 'style_1'? 'scc_customradio_style_1' : ''?>"  >
									<div class="scc-circle-checkbox-field-label scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-md-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> " <?php echo $form_field_style == 'style_1'? 'style="display: initial !important;padding:0px;margin:0px;"' : ''?>><?php echo  self::GermanCharactersInverse($val->name); ?> </div>
									<input type="radio"  onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo  self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked data-preselected="true"' : null ?>>
									<label for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" class="ssc-circle-checkbox-label" style="float:left !important;"></label>
								</div>
							</div>
							</div> <?php }else{ ?>
								<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
									<div class="scc-circle-checkbox-field-wrapper" <?php echo $form_field_style == 'style_1'? '' : 'style="width:100%"'?>>
										
										<div class="scc_customradio <?php echo $form_field_style == 'style_1'? 'scc_customradio_style_1' : ''?>"  >
											<div class="scc-circle-checkbox-field-label scc-col-md-4 scc-col-xs-10 " <?php echo $form_field_style == 'style_1'? 'style="display: initial !important;padding:0px;margin:0px;"' : 'style="padding-left:15px;width: 100%;float: right"'?>><?php echo  self::GermanCharactersInverse($val->name); ?> </div>
											<input type="radio"  onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo  self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked data-preselected="true"' : null ?>>
											<label for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" class="ssc-circle-checkbox-label" style="float:left !important;"></label>
										</div>

									</div>
								</div>			
							<?php } ?>
							<div style="clear: both;"></div>
						<?php } elseif ($typeFormat == 2) {       
							if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
								$scc_chkbx_col_dskp = 12 - $val->column_dskp;
								$scc_chkbx_col_mobl = 12 - $val->column_mobl;			
								if($val->column_dskp == 12){
									$scc_chkbx_col_dskp = 12;
								}
								if($val->column_mobl == 12){
									$scc_chkbx_col_mobl = 12;
								}
								/* Checkbox (Animated)*/ ?>

								<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>" <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
									<label for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" class="label-cbx scc-square-checkbox-field-wrapper" style="font-weight:400 !important; width:100%; padding:3px; <?php echo $form_field_style == 'style_1' ? ' ' : 'padding-top:0px;' ?>">
										
										<span class="scc-col-md-4 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?>"  style="padding:0px;float:left"><?php echo self::GermanCharactersInverse($val->name); ?></span>
										<input type="checkbox" style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)"
										name="<?php echo self::GermanCharactersInverse($val->name); ?>" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"
										data-inputtype="<?php echo $type; ?>" class="itemCreated invisible" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" 
										<?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>
										>
										<div class="checkbox <?php echo $form_field_style == 'style_1' ? 'scc-checkbox-type2-div' : '' ?>" style=" <?php echo $form_field_style == 'style_1' ? 'display:inline; ' : 'padding:0px;margin-top:-35px' ?>">
											<svg width="20px" height="20px" viewBox="0 0 20 20">
												<path d="M3,1 L17,1 L17,1 C18.1045695,1 19,1.8954305 19,3 L19,17 L19,17 C19,18.1045695 18.1045695,19 17,19 L3,19 L3,19 C1.8954305,19 1,18.1045695 1,17 L1,3 L1,3 C1,1.8954305 1.8954305,1 3,1 Z"></path>
												<polyline points="4 11 8 15 16 6"></polyline>
											</svg>
										</div>
										
										<div style="clear: both;"></div>
									</label>
								</div>
							<?php }else{ ?>
								<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
									<label for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" class="label-cbx scc-square-checkbox-field-wrapper" style="font-weight:400 !important; width:100%; padding:0px; <?php echo $form_field_style == 'style_1' ? ' ' : 'padding-top:0px;' ?>">
										
										<span <?php echo $form_field_style == 'style_1' ? 'class="scc-col-md-4 scc-col-xs-10"' : ' class="scc-col-md-4 scc-col-xs-10" style="padding:0px;float:left"' ?> ><?php echo self::GermanCharactersInverse($val->name); ?></span>
										<input type="checkbox" style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)"
										name="<?php echo self::GermanCharactersInverse($val->name); ?>" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"
										data-inputtype="<?php echo $type; ?>" class="itemCreated invisible" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" 
										<?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>
										>
										<div class="checkbox <?php echo $form_field_style == 'style_1' ? 'scc-checkbox-type2-div' : '' ?>" style=" <?php echo $form_field_style == 'style_1' ? 'display:inline; ' : 'padding:0px;margin-top:0px;margin-left: 0px !important' ?>">
											<svg width="20px" height="20px" viewBox="0 0 20 20">
												<path d="M3,1 L17,1 L17,1 C18.1045695,1 19,1.8954305 19,3 L19,17 L19,17 C19,18.1045695 18.1045695,19 17,19 L3,19 L3,19 C1.8954305,19 1,18.1045695 1,17 L1,3 L1,3 C1,1.8954305 1.8954305,1 3,1 Z"></path>
												<polyline points="4 11 8 15 16 6"></polyline>
											</svg>
										</div>
										
										<div style="clear: both;"></div>
									</label>
								</div>			
							<?php } ?>
							<div style="clear: both;"></div>
							<?php
						} elseif ($typeFormat == 3) {     
							if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
								$scc_chkbx_col_dskp = 12 - $val->column_dskp;
								$scc_chkbx_col_mobl = 12 - $val->column_mobl;			
								if($val->column_dskp == 12){
									$scc_chkbx_col_dskp = 12;
								}
								if($val->column_mobl == 12){
									$scc_chkbx_col_mobl = 12;
								}
								/* Toggle Switch (Rectangle)*/ ?>
								<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>" <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
									<div class="can-toggle">
										<input type="checkbox" data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
										<label style="padding:0px;" class="scc-col-md-4 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> scc-form-field-item-label scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
										<label class="scc-form-field-can-toggle-control" for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>">
											<div class="trn can-toggle__switch can-toggle__switch_<?php echo $idvalue; ?>" data-checked="YES" data-unchecked="NO" <?php echo $theStyle2; ?>>
											</div>
										</label>
									</div>
									</div><?php }else{ ?>
										<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
											<div class="can-toggle">
												<input type="checkbox" data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
												<label style="padding:0px;" class="scc-col-md-4 scc-col-xs-10 scc-form-field-item-label scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
												<label class="scc-form-field-can-toggle-control" for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>">
													<div class="trn can-toggle__switch can-toggle__switch_<?php echo $idvalue; ?>" data-checked="YES" data-unchecked="NO" <?php echo $theStyle2; ?>>
													</div>
												</label>
											</div>
										</div>			
									<?php } ?>
									<div style="clear: both;"></div>
									<?php
								} elseif ($typeFormat == 4) {
									if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
										$scc_num_col_dskp = 12 - $val->column_dskp;
										$scc_num_col_mobl = 12 - $val->column_mobl;			
										if($val->column_dskp == 12){
											$scc_num_col_dskp = 12;
										}
										if($val->column_mobl == 12){
											$scc_num_col_mobl = 12;
										}
										/* Toggle Switch (Circular)*/ ?>
										<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>" <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
											<div class="can-toggle demo-rebrand-2">
												<input type="checkbox" data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"  data-inputtype="<?php echo $type; ?>" class="itemCreated"  name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
												<label style="padding:0px;" class="scc-col-md-4 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> scc-form-field-item-label control-label scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
												<label class="scc-form-field-can-toggle-control" for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>">
													<div class="can-toggle__switch can-toggle__switch_<?php echo $idvalue; ?> scc-col-md-8 scc-col-lg-8 scc-col-xs-6 trn" data-checked="YES" data-unchecked="NO" <?php echo $theStyle3; ?>>
													</div>
												</label>
												<div style="clear: both;"></div>
											</div>
											<div style="clear: both;"></div>
										</div>
										<?php
									}else{ ?>
										<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
											<div class="can-toggle demo-rebrand-2">
												<input type="checkbox" data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"  data-inputtype="<?php echo $type; ?>" class="itemCreated"  name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
												<label style="padding:0px;" class="scc-col-md-4 scc-col-xs-10 scc-form-field-item-label control-label scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
												<label class="scc-form-field-can-toggle-control" for="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>">
													<div class="can-toggle__switch can-toggle__switch_<?php echo $idvalue; ?> scc-col-md-8 scc-col-lg-8 scc-col-xs-6 trn" data-checked="YES" data-unchecked="NO" <?php echo $theStyle3; ?>>
													</div>
												</label>
												<div style="clear: both;"></div>
											</div>
											<div style="clear: both;"></div>
										</div>			
										<?php
									}
								} elseif ($typeFormat == 5) {  
									if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
										$scc_num_col_dskp = 12 - $val->column_dskp;
										$scc_num_col_mobl = 12 - $val->column_mobl;		
										if($val->column_dskp == 12){
											$scc_num_col_dskp = 12;
										}
										if($val->column_mobl == 12){
											$scc_num_col_mobl = 12;
										}	
										/* Radio Button (Animated 2)*/ ?>
										<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>"  <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
											<label  class="btn-radio" style="font-weight: 400; width:100%">
												<span class="scc-col-md-4 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> scc-form-left-radio-label" style="padding:0px;marign:0px;">  <?php echo self::GermanCharactersInverse($val->name); ?></span>
												<input type="radio"  style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked data-preselected="true"' : null ?>>
												<svg width="20px" height="20px" viewBox="0 0 20 20" class="btn-radio-span"  <?php echo $form_field_style == 'style_1'? 'style="margin-left:-5px;"' : ''?>>
													<circle cx="10" cy="10" r="9"></circle>
													<path d="M10,7 C8.34314575,7 7,8.34314575 7,10 C7,11.6568542 8.34314575,13 10,13 C11.6568542,13 13,11.6568542 13,10 C13,8.34314575 11.6568542,7 10,7 Z" class="inner"></path>
													<path d="M10,1 L10,1 L10,1 C14.9705627,1 19,5.02943725 19,10 L19,10 L19,10 C19,14.9705627 14.9705627,19 10,19 L10,19 L10,19 C5.02943725,19 1,14.9705627 1,10 L1,10 L1,10 C1,5.02943725 5.02943725,1 10,1 L10,1 Z" class="outer"></path>
												</svg>
												
											</label>
											<div style="clear: both;"></div>
											</div><?php }else{ ?>
												<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
													<label  class="btn-radio" style="font-weight: 400; width:100%">
														<span class="scc-col-md-4 scc-col-xs-10 scc-form-left-radio-label" style="margin:0px;padding:0px;margin-top:0px; <?php echo $form_field_style == 'style_2'? 'width:100%;' : ''?>>">  <?php echo self::GermanCharactersInverse($val->name); ?></span>
														<input type="radio"  style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked data-preselected="true"' : null ?>>
														<svg width="20px" height="20px" viewBox="0 0 20 20" class="btn-radio-span"  <?php echo $form_field_style == 'style_1'? 'style="margin-left:-5px;"' : ''?>>
															<circle cx="10" cy="10" r="9"></circle>
															<path d="M10,7 C8.34314575,7 7,8.34314575 7,10 C7,11.6568542 8.34314575,13 10,13 C11.6568542,13 13,11.6568542 13,10 C13,8.34314575 11.6568542,7 10,7 Z" class="inner"></path>
															<path d="M10,1 L10,1 L10,1 C14.9705627,1 19,5.02943725 19,10 L19,10 L19,10 C19,14.9705627 14.9705627,19 10,19 L10,19 L10,19 C5.02943725,19 1,14.9705627 1,10 L1,10 L1,10 C1,5.02943725 5.02943725,1 10,1 L10,1 Z" class="outer"></path>
														</svg>
														
													</label>
													<div style="clear: both;"></div>
												</div>			
											<?php } ?>
											<div style="clear: both;"></div>

										<?php } else if ( $typeFormat == 6 ) {  ?>
											<!--SIMPLE BUTTONS-->
											<div class="simple_button control-label scc_add_btn_secn <?php echo $field_class_name; ?>_button <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
												<label class="checkbox-inline <?php echo (isset($val->opt_default) && $val->opt_default) ? 'btn-selected' : null ?>" <?php echo $thebuttonStyle; ?> style="cursor: pointer;">
													<?php if ( $displaycurrencylabel === "scc_remove_currency_label" ) : ?>
														<input type="checkbox" class="itemCreated scc_button_section" id="itemcreated_<?= $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" onClick="triggerSubmit(<?= $id; ?>, this)" data-inputtype="switchoption" datainputprice="<?= self::GermanCharactersInverse($val->value1); ?>" name="<?= self::GermanCharactersInverse($val->name); ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>> <?=  self::GermanCharactersInverse($val->name) ?>
														<?php else : ?>
															<input type="checkbox" class="itemCreated scc_button_section" id="itemcreated_<?= $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" onClick="triggerSubmit(<?= $id; ?>, this)" data-inputtype="switchoption" datainputprice="<?= self::GermanCharactersInverse($val->value1); ?>" name="<?= self::GermanCharactersInverse($val->name); ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>> <?=  self::GermanCharactersInverse($val->name) ?>
														<?php endif; ?>
													</label>
												</div>

												<!--</div>-->
											<?php } elseif ($typeFormat == 7) {  
												if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
													$scc_num_col_dskp = 12 - $val->column_dskp;
													$scc_num_col_mobl = 12 - $val->column_mobl;		
													if($val->column_dskp == 12){
														$scc_num_col_dskp = 12;
													}
													if($val->column_mobl == 12){
														$scc_num_col_mobl = 12;
													}	
													/* Single Choice Radio Button*/ ?>
													<div class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>"  <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
														<label  class="btn-radio" style="font-weight: 400; width:100%">
															<span class="scc-col-md-4 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> scc-form-left-radio-label" style="padding:0px;marign:0px;">  <?php echo self::GermanCharactersInverse($val->name); ?></span>
															<input type="radio" data-radio-type="single" style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
															<svg width="20px" height="20px" viewBox="0 0 20 20" class="btn-radio-span"  <?php echo $form_field_style == 'style_1'? 'style="margin-left:-5px;"' : ''?>>
																<circle cx="10" cy="10" r="9"></circle>
																<path d="M10,7 C8.34314575,7 7,8.34314575 7,10 C7,11.6568542 8.34314575,13 10,13 C11.6568542,13 13,11.6568542 13,10 C13,8.34314575 11.6568542,7 10,7 Z" class="inner"></path>
																<path d="M10,1 L10,1 L10,1 C14.9705627,1 19,5.02943725 19,10 L19,10 L19,10 C19,14.9705627 14.9705627,19 10,19 L10,19 L10,19 C5.02943725,19 1,14.9705627 1,10 L1,10 L1,10 C1,5.02943725 5.02943725,1 10,1 L10,1 Z" class="outer"></path>
															</svg>
															
														</label>
														<div style="clear: both;"></div>
														</div><?php }else{ ?>
															<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item df-scc-checkbox <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
																<label  class="btn-radio" style="font-weight: 400; width:100%">
																	<span class="scc-col-md-4 scc-col-xs-10 scc-form-left-radio-label" style="margin:0px;padding:0px;margin-top:0px; <?php echo $form_field_style == 'style_2'? 'width:100%;' : ''?>>">  <?php echo self::GermanCharactersInverse($val->name); ?></span>
																	<input type="radio" data-radio-type="single" style="border: 0px solid !important;" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>" data-inputtype="<?php echo $type; ?>" class="itemCreated"   name="<?php echo self::GermanCharactersInverse($val->name); ?>" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
																	<svg width="20px" height="20px" viewBox="0 0 20 20" class="btn-radio-span"  <?php echo $form_field_style == 'style_1'? 'style="margin-left:-5px;"' : ''?>>
																		<circle cx="10" cy="10" r="9"></circle>
																		<path d="M10,7 C8.34314575,7 7,8.34314575 7,10 C7,11.6568542 8.34314575,13 10,13 C11.6568542,13 13,11.6568542 13,10 C13,8.34314575 11.6568542,7 10,7 Z" class="inner"></path>
																		<path d="M10,1 L10,1 L10,1 C14.9705627,1 19,5.02943725 19,10 L19,10 L19,10 C19,14.9705627 14.9705627,19 10,19 L10,19 L10,19 C5.02943725,19 1,14.9705627 1,10 L1,10 L1,10 C1,5.02943725 5.02943725,1 10,1 L10,1 Z" class="outer"></path>
																	</svg>
																	
																</label>
																<div style="clear: both;"></div>
															</div>			
														<?php } ?>
														<div style="clear: both;"></div>

													<?php } else { 
														if(($field_class_name == 'form_field_item_style_1') && (isset($val->column_dskp)) && (isset($val->column_mobl)) ){
															$scc_num_col_dskp = 12 - $val->column_dskp;
															$scc_num_col_mobl = 12 - $val->column_mobl;			
															if($val->column_dskp == 12){
																$scc_num_col_dskp = 12;
															}
															if($val->column_mobl == 12){
																$scc_num_col_mobl = 12;
															}
															?>
															<div class="scc-col-md-12 scc-col-lg-<?php echo $val->column_dskp; ?> scc-col-xs-<?php echo $val->column_mobl; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>" style="margin-top: 30px; ">
																<label style="padding-left:0px;max-width:220px" class="scc-col-md-4 scc-col-xs-6 scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
																<label class="switch scc_font_<?php echo $idvalue; ?>" style="float: right;">
																	<input type="checkbox"  data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"  data-inputtype="<?php echo $type; ?>" class="itemCreated" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
																	<span class="slider_switch round"></span>
																</label>
															</div>
														<?php }else{ ?>
															<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-col-md-12 scc-col-lg-12 scc-col-xs-12 <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>" style="margin-top: 30px; ">
																<label style="padding-left:0px;max-width:220px" class="scc-col-md-4 scc-col-xs-6 scc_font_<?php echo $idvalue; ?>"><?php echo self::GermanCharactersInverse($val->name); ?></label>
																<label class="switch scc_font_<?php echo $idvalue; ?>" style="float: right;">
																	<input type="checkbox"  data-toggle="toggle" onClick="triggerSubmit(<?php echo $id; ?>, this)" datainputprice="<?php echo self::GermanCharactersInverse($val->value1); ?>"  data-inputtype="<?php echo $type; ?>" class="itemCreated" id="itemcreated_<?php echo $a.'_'.$idx.'_'.$idd.'_'.$No; ?>" <?php echo (isset($val->opt_default) && $val->opt_default) ? 'checked' : null ?>>
																	<span class="slider_switch round"></span>
																</label>
															</div>			
														<?php } ?>
														<div style="clear: both;"></div>
														<?php
													}
													$b++;
												}
												?>
												<div class="alert alert-danger" role="alert" style="display: none;"><span class="trn" data-trn-key="Please choose an option">Please choose an option</span> !</div>
											</span>
											<!-- Checkbox/button/toggle end -->
											<?php
										}

										public static function createDropdownForm($idvalue, $formstored, $name, $a, $id, $idd, $pr,$displaycurrencylabel, $accordion, $section_index)
										{
											if (!is_array($formstored)) {
												return;
												$No = $formstored->No;
											}

											if(!isset($dd_css_loaded)) {
												$dd_css_loaded = true;
												wp_enqueue_style('scc-dropbox');
											}

											global $form_field_style;
											global $toggle_boxshadow_style2;
											$field_class_name = 'form_field_item_' . $form_field_style;
											?>
											<!---START OF DROPDOWN-->
											<?php if(($field_class_name == 'form_field_item_style_1') && (isset($formstored[0]->column_dskp) != '') && (isset($formstored[0]->column_mobl) != '') ){
												$scc_scnd_col = 12 - $formstored[0]->column_dskp;
												$scc_scnd_col_mob = 12 - $formstored[0]->column_mobl;
												if($formstored[0]->column_dskp == 12){
													$scc_scnd_col = 12;
												}
												if($formstored[0]->column_mobl == 12){
													$scc_scnd_col_mob = 12;
												}
												?>
												<div class="scc-form-field-item sdsdsds <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?> <?php  echo $field_class_name; ?>" <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
													<label class="scc-col-md-<?php echo $formstored[0]->column_dskp; ?> scc-col-sm-<?php echo $formstored[0]->column_mobl; ?> scc-col-lg-<?php echo $formstored[0]->column_dskp; ?> scc_font_<?php echo $idvalue; ?> scc-form-field-item-label" for="selectbasic"><?php echo self::GermanCharactersInverse( $formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-<?php echo $scc_scnd_col; ?> scc-col-sm-<?php echo $scc_scnd_col_mob; ?> scc-col-lg-<?php echo $scc_scnd_col; ?> scc_select_opt scc-form-field-item-control" style="padding:0px;margin:0px;">
														<select  id="selectbasic_<?php echo $a.'_'.$pr.'_'.$id.'_'.$idvalue; ?>"   name="selectbasic" data-dropdownmult=1 data-inputtype='dropdowninput' class="makeItDropDown sccSel sccoptionval form-control itemCreated mandatory_<?php echo (isset($formstored[0]->mandatory) ? $formstored[0]->mandatory : '') ?>" onChange="selectChange(<?php echo $idd; ?>, this)">
															<option value='' data-description=" " class="trn" style="font-size:12px;">Choose an option...</option>
															<?php
															foreach ($formstored as $s) {

																if($displaycurrencylabel === "scc_remove_currency_label"){
																	echo "<option value='".self::GermanCharactersInverse( $s->value1)."' data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>". self::GermanCharactersInverse($s->name) ." </option>";
																}elseif (isset($s->opt_default) && ($s->opt_default)){
																	echo "<option value='".self::GermanCharactersInverse($s->value1)."'"." selected=\"selected\""." data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>".self::GermanCharactersInverse($s->name)." </option>";
																}
																else{
																	echo "<option value='".self::GermanCharactersInverse($s->value1)."' data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>".self::GermanCharactersInverse($s->name)." </option>";
																}
															} ?>
														</select>
														<div class="alert alert-danger" role="alert" style="display:none;"></div>
													</div>
													<div style="clear: both;"></div>
												</div>		
											<?php }else{ ?>
												<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?> <?php echo $field_class_name; ?>">
													<label class="scc-col-md-4 scc-col-lg-4 scc_font_<?php echo $idvalue; ?> scc-form-field-item-label" for="selectbasic"><?php echo self::GermanCharactersInverse($formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-8 scc-col-lg-8 scc_select_opt scc-form-field-item-control" style="padding:0px;margin:0px;">
														<select  id="selectbasic_<?php echo $a.'_'.$pr.'_'.$id.'_'.$idvalue; ?>"   name="selectbasic" data-dropdownmult=1 data-inputtype='dropdowninput' class="makeItDropDown sccSel sccoptionval form-control itemCreated mandatory_<?php echo (isset($formstored[0]->mandatory) ? $formstored[0]->mandatory : '') ?>" onChange="selectChange(<?php echo $idd; ?>, this)">
															<option value='' data-description=" " class="trn" style="font-size:12px;">Choose an option...</option>
															<?php
															foreach ($formstored as $s) {

																if($displaycurrencylabel === "scc_remove_currency_label"){
																	echo "<option value='".self::GermanCharactersInverse( $s->value1)."' data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>". self::GermanCharactersInverse($s->name) ." </option>";
																}elseif (isset($s->opt_default) && ($s->opt_default)){
																	echo "<option value='".self::GermanCharactersInverse($s->value1)."'"." selected=\"selected\""." data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>".self::GermanCharactersInverse($s->name)." </option>";
																}
																else{
																	echo "<option value='".self::GermanCharactersInverse($s->value1)."' data-description='".self::GermanCharactersInverse(str_replace("'", "&#39;", str_replace("\"", "&#34;", $s->value2)))."'>".self::GermanCharactersInverse($s->name)." </option>";
																}
															} ?>
														</select>
														<div class="alert alert-danger" role="alert" style="display:none;"></div>
													</div>
													<div style="clear: both;"></div>
												</div>
											<?php } ?>
											<div style="clear: both;"></div>
											<script>
												document.addEventListener('DOMContentLoaded', (event) => {
													scc_jQuery(document).ready(function(e) {
														function initMsdropdown<?php echo $a.'_'.$pr.'_'.$id.'_'.$idvalue; ?>() {
															scc_jQuery("#selectbasic_<?php echo ($a.'_'.$pr.'_'.$id.'_'.$idvalue); ?>").msDropdown({roundedBorder:false});
														}
														try {
															initMsdropdown<?php echo $a.'_'.$pr.'_'.$id.'_'.$idvalue; ?>();
														} catch (error) {
															console.log('msdropdown loaded asyncronusly');
															var msDropdownScript = document.getElementById('scc-js-js-js');
															msDropdownScript.onload = function () {
																initMsdropdown<?php echo $a.'_'.$pr.'_'.$id.'_'.$idvalue; ?>();
															}
														}
													});
												});
											</script>
											<?php
										}

										public static function createCommentBox($idvalue, $formstored, $name, $a, $id, $idd, $pr,$displaycurrencylabel, $accordion, $section_index){
											if (!is_array($formstored)) {
												return;
												$No = $formstored->No;
											}

											global $form_field_style;
											global $toggle_boxshadow_style2;
											$field_class_name = 'form_field_item_' . $form_field_style;
											
											if(($field_class_name == 'form_field_item_style_1') && (isset($formstored[0]->column_dskp) != '') && (isset($formstored[0]->column_mobl) != '') ){
												$scc_cmnt_col_dskp = 12 - $formstored[0]->column_dskp;
												$scc_cmnt_col_mobl = 12 - $formstored[0]->column_mobl;
												if($formstored[0]->column_dskp == 12){
													$scc_cmnt_col_dskp = 12;
												}
												if($formstored[0]->column_mobl == 12){
													$scc_cmnt_col_mobl = 12;
												}
												?>
												<div class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? ('scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index) : '') ?>"  <?php echo ($formstored[0]->column_mobl >= 6) ? 'style="display: block"' : ''; ?>>
													<label class="scc-col-md-4 scc-col-lg-<?php echo $formstored[0]->column_dskp; ?> scc-col-xs-<?php echo $formstored[0]->column_mobl; ?> scc_font_<?php echo $idvalue; ?> scc-form-field-item-label" for="selectbasic"><?php echo self::GermanCharactersInverse($formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-8 scc-col-lg-<?php echo $scc_cmnt_col_dskp; ?> scc-col-xs-<?php echo $scc_cmnt_col_mobl; ?> scc_select_opt scc-form-field-item-control" style="padding:0px">
														<?php
														foreach ($formstored as $s) {
															if($s->value1 == 1){
																echo "<input id='itemcreateds_".$a."_".$pr."_".$id."'  class='comment_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' data-inputtype='comment_input'  onchange='onchangeComments()' style='width:100%;border-radius:20px; border: #F0F0F0 2px solid!important; padding:12px' placeholder='".self::GermanCharactersInverse($s->value2)."' />";
															}else{
																echo "<textarea id='itemcreateds_".$a."_".$pr."_".$id."'  class='comment_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' data-inputtype='comment_input'  onchange='onchangeComments()' style='width:100%;border-radius:20px; border: #F0F0F0 2px solid!important; padding:12px' placeholder='".self::GermanCharactersInverse($s->value2)."'    rows='".self::GermanCharactersInverse($s->value1)."'></textarea>";
															}
														}
														?>
													</div>
													<div style="clear: both;"></div>
													<div class="alert alert-danger" role="alert" style="display:none;"></div>
												</div>
												<?php
											}else{
												?>
												<div  <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? ('scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index) : '') ?>">
													<label class="scc-col-md-4 scc-col-lg-4 scc-col-xs-6 scc_font_<?php echo $idvalue; ?> scc-form-field-item-label" for="selectbasic"><?php echo self::GermanCharactersInverse($formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-8 scc-col-lg-8 scc-col-xs-6 scc_select_opt scc-form-field-item-control" style="padding:0px">
														<?php
														foreach ($formstored as $s) {
															if($s->value1 == 1){
																echo "<input id='itemcreateds_".$a."_".$pr."_".$id."'  class='comment_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' data-inputtype='comment_input'  onchange='onchangeComments()' style='width:100%;border-radius:18px;border: #F0F0F0 2px solid!important; padding:12px' placeholder='".self::GermanCharactersInverse($s->value2)."' />";
															}else{
																echo "<textarea id='itemcreateds_".$a."_".$pr."_".$id."'  class='comment_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' data-inputtype='comment_input'  onchange='onchangeComments()' style='width:100%;border-radius:18px;border: #F0F0F0 2px solid!important; padding:12px' placeholder='".self::GermanCharactersInverse($s->value2)."'    rows='".self::GermanCharactersInverse($s->value1)."'></textarea>";
															}
														}
														?>
													</div>
													<div style="clear: both;"></div>
													<div class="alert alert-danger" role="alert" style="display:none;"></div>
												</div>
											<?php } ?>
											<div style="clear: both;"></div>

											<!-- CREATE Number Input Box -->
											<?php
										}

										public static function createNumberBox($idvalue, $formstored, $name, $a, $id, $idd, $pr,$displaycurrencylabel, $accordion, $section_index){
											if (!is_array($formstored)) {
												return;
												$No = $formstored->No;
											}

											global $form_field_style;
											global $toggle_boxshadow_style2;
											$field_class_name = 'form_field_item_' . $form_field_style;
											
											if(($field_class_name == 'form_field_item_style_1') && (isset($formstored[0]->column_dskp) != '') && (isset($formstored[0]->column_mobl) != '') ){
												$scc_num_col_dskp = 12 - $formstored[0]->column_dskp;
												$scc_num_col_mobl = 12 - $formstored[0]->column_mobl;
												if($formstored[0]->column_dskp == 12){
													$scc_num_col_dskp = 12;
												}
												if($formstored[0]->column_mobl == 12){
													$scc_num_col_mobl = 12;
												}
												?>
												<div class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
													<label class="scc-col-md-4 scc-col-lg-<?php echo $formstored[0]->column_dskp; ?> scc-col-xs-<?php echo $formstored[0]->column_mobl; ?> scc-form-field-item-label scc_font_<?php echo $idvalue; ?>" for="selectbasic"><?php echo self::GermanCharactersInverse($formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-8 scc-col-lg-<?php echo $scc_num_col_dskp; ?> scc-col-xs-<?php echo $scc_num_col_mobl; ?> scc_select_opt scc-form-field-item-control" style="padding:0px;">
														<?php
														global $wpdb;
														$q = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}scc_forms WHERE id = %d", $idvalue);
														$result = $wpdb->get_row($q);
														$q = $wpdb->prepare("SELECT parameters FROM {$wpdb->prefix}scc_form_parameters WHERE form_id = %d", $idvalue);
														$result_2 = $wpdb->get_row($q);
														$result_2 = json_decode(stripslashes($result_2->parameters));
														
														foreach ($formstored as $s) {
															echo "<span class=\"input-number-decrement\">–</span><input id='itemcreateds_".$a."_".$pr."_".$id."' onchange='onchangeNumberBox()' class='number_box_2_text number_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' data-inputtype='number_input' type='number' data-value='".$s->value1."' min='0'/><span class=\"input-number-increment\">+</span>";
														}
														?>
													</div>
													<div style="clear: both;"></div>
													<div class="alert alert-danger" role="alert" style="display:none;"></div>
												</div>
												<?php
											}else{
												?>
												<div <?php echo $toggle_boxshadow_style2 != '' ?  '' : 'style="border: 0px;"'?> class="scc-form-field-item <?php echo $field_class_name; ?> <?php echo (($accordion !== false) ? 'scc-accordion-panel scc-accordion-panel-hidden section_'.$section_index : '') ?>">
													<label style="padding-top:3px" class="scc-col-md-4 scc-col-lg-4 scc-col-xs-6 scc-form-field-item-label scc_font_<?php echo $idvalue; ?>" for="selectbasic"><?php echo self::GermanCharactersInverse($formstored[0]->title); ?></label>
													<div class="control-label scc-col-md-8 scc-col-lg-8 scc-col-xs-6 scc_select_opt scc-form-field-item-control" style="padding:0px;">
														<?php
														global $wpdb;
														$q = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}scc_forms WHERE id = %d", $idvalue);
														$result = $wpdb->get_row($q);
														$q = $wpdb->prepare("SELECT parameters FROM {$wpdb->prefix}scc_form_parameters WHERE form_id = %d", $idvalue);
														$result_2 = $wpdb->get_row($q);
														$result_2 = json_decode(stripslashes($result_2->parameters));
														
														foreach ($formstored as $s) {
															if (isset($s->inputBoxVariant) && $s->inputBoxVariant === "compact") {
							// With left and right things
																echo "<span class=\"input-number-decrement\">–</span><input id='itemcreateds_".$a."_".$pr."_".$id."' onchange='onchangeNumberBox()' class='number_box_2_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."'  data-inputtype='number_input' type='number' data-value='".$s->value1."' min='0'/><span class=\"input-number-increment\">+</span>";
															} else {
							// Orginal
																echo "<input id='itemcreateds_".$a."_".$pr."_".$id."' onchange='onchangeNumberBox()' class='number_box_text itemCreated mandatory_".(isset($s->mandatory) ? $s->mandatory : '')."' style='width:90px;height:50px;border-radius:10px;padding-left:5px;text-align:center;padding-right: 5px;' data-inputtype='number_input' type='number' data-value='".$s->value1."' min='0'/>";
															}
														}
														?>
													</div>
													<div style="clear: both;"></div>
													<div class="alert alert-danger" role="alert" style="display:none;"></div>
													</div><?php } ?>
													<div style="clear: both;"></div>
													<?php
												}

												public static function addJavascript($result) {
													if(isset($result)){
														global $wpdb;
														$formid = $result->id;
														$q = $wpdb->prepare("SELECT parameters FROM {$wpdb->prefix}scc_form_parameters WHERE form_id = %d", $formid);
														$result_2 = $wpdb->get_row($q);
														$result_2 = json_decode(stripslashes($result_2->parameters));
													}
													?>
													<script>
														<?php

														if(isset($result) && isset($result->formtranslate) ) {
															$dictionary = json_decode(stripslashes(stripslashes($result->formtranslate)));
															if (is_array($dictionary) || is_object($dictionary)){
																foreach ($dictionary as $dic) {
																	$arr[$dic->key]= array($dic->lang=>$dic->translation);
																}
															}
														}

														?>
														document.addEventListener('DOMContentLoaded', (event) => {
														// window.sccRadioInput = function(element) {
														// 	element.on('change', function() {
														// 		selectedButtonParent = jQuery(this).attr('id').split('_').slice(0,4).join('_');
														// 		sibilingButtons = element.filter((i, e) => {return jQuery(e).attr('id').split('_').slice(0,4).join('_') == selectedButtonParent && e != this;})
														// 		if (jQuery(this).prop('checked')) sibilingButtons.prop('checked', false);
														// 	})
														// }
														// sccRadioInput(scc_jQuery('[data-radio-type]'));
														if (!window.hasOwnProperty('initTranslationScriptSCC')) {
														window.initTranslationScriptSCC = function (tag, options) {
														try {
														scc_jQuery(tag).translate(options); 
													} catch (error) {
													var translationScript = document.getElementById('scc-js-js-js');
													translationScript.onload = function () {
													console.log('translation script loaded asyncronusly');
													scc_jQuery(tag).translate(options);
												};  
											}
										}
									}
									scc_jQuery(document).ready(function() {
									/* accordion JS */
									setTimeout(function () {
									scc_jQuery('.submitPrices').click();
									scc_jQuery('.scc-preloader').each((i,e) => {scc_jQuery(e).removeClass('scc-preloader')});
									var acc = document.getElementsByClassName("scc-accordion");
									var i;

									for (i = 0; i < acc.length; i++) {
									acc[i].addEventListener("click", function() {

									//	this.classList.toggle("active");
									if(scc_jQuery(this).hasClass('scc-accordion_active')){
									scc_jQuery(this).removeClass('scc-accordion_active')
									scc_jQuery(this).addClass('scc-accordion')
								}else{
								scc_jQuery(this).removeClass('scc-accordion')
								scc_jQuery(this).addClass('scc-accordion_active')
							}
							scc_jQuery('.' + scc_jQuery(this).attr('id')).each(function(index, ob){
							if (scc_jQuery(ob).css('maxHeight') === '0px') {
							if(scc_jQuery(ob).hasClass('simple_button')){
							scc_jQuery(ob).css('display', 'inline-block')
							scc_jQuery(ob).css('paddingLeft', 10)
						}else{
						scc_jQuery(ob).css('display', 'block')
					}
					
					
					setTimeout(function(){
					scc_jQuery(ob).css('maxHeight', 400)
					scc_jQuery(ob).removeClass('scc-accordion-panel-hidden')
					scc_jQuery(ob).css('overflow', 'visible')
				}, 200)
			} else {
			scc_jQuery(ob).css('maxHeight', 0)
			scc_jQuery(ob).css('overflow', 'hidden')
			//		scc_jQuery(ob).css('display', 'none')
			setTimeout(function(){
			scc_jQuery(ob).addClass('scc-accordion-panel-hidden')
			scc_jQuery(ob).css('display', 'none')
		}, 600)
	}
})

});
}

for (i = 0; i < acc.length; i++) {
scc_jQuery('.' + scc_jQuery(scc_jQuery(acc[i])).attr('id')).each(function(index, ob){
scc_jQuery(ob).css("display","none")
})
}
}, 500)


/* accordion JS END */
<?php	if(isset($arr)){
	?>
	translatorJson = <?php echo json_encode($arr) ?>;
	initTranslationScriptSCC('body', {lang: "en", t: translatorJson});

<?php } ?>

});
});
// var triggerRadio = false;
function selectChange(id, $this){
console.log(scc_jQuery($this).parent())
triggerSubmit(id, $this);
}
function triggerSubmit_2(id, select_id, value, $this){
scc_jQuery('#' + select_id).attr('data-dropdownmult', value);
}
function onchangeComments(){
scc_jQuery('.submitPrices').click();
}
function onchangeNumberBox(){
scc_jQuery('.submitPrices').click();
}
function triggerSubmit(id, $this){
if (scc_jQuery($this).is(':radio') && scc_jQuery($this).data('radioType') != 'single'){
scc_jQuery($this).attr('data-preselected') ? scc_jQuery($this).prop('checked', false).removeAttr('data-preselected') : radioBtnSwitch();
function radioBtnSwitch() {
scc_jQuery($this).attr('data-selected') && !scc_jQuery($this).attr('data-preselected') ? scc_jQuery($this).prop('checked', false).removeAttr('data-selected') : scc_jQuery($this).attr('data-selected', 'true');
}
}

if (scc_jQuery($this).is(':radio') && scc_jQuery($this).data('radioType') == 'single' && scc_jQuery($this).is(':checked')) {
selectedButtonParent = jQuery($this).attr('id').split('_').slice(0,4).join('_');
sibilingButtons = scc_jQuery('[data-radio-type]').filter((i, e) => {return jQuery(e).attr('id').split('_').slice(0,4).join('_') == selectedButtonParent && e != $this;})
if (jQuery($this).prop('checked')) {
// sibilingButtons.prop('checked', false).trigger('change');
sibilingButtons.each(function (i,e) {
jQuery(e).prop('checked', false).trigger('change');
});
}
}

sccsubmi =  '#scc_submit_' + id;
scc_jQuery(sccsubmi).trigger('click');
}
document.addEventListener('DOMContentLoaded', (event) => {
scc_jQuery('.customComboBox li').click(function(){
scc_jQuery(this).html();
scc_jQuery(this).parent().find('li').removeClass('activated');
scc_jQuery(this).addClass('activated')
});
});
document.addEventListener('DOMContentLoaded', (event) => {
scc_jQuery('.submitPrices').click(function(){



var parent_id = "#" + scc_jQuery(this).attr('id').replace('submit', 'form');
var xprice = [];
var dropprice2 = 0;
var price = 0;
var hmm = [];
var lo = 0;
//hmm =[];
var sliderNames = []
var dropprice1 = 0;
var dropdownMult =0;
var dropdownMult1 =0;
var multislider = [];
var totalnumber = 0;
var sec;
var sectionName =[];
var parts=[];
var comments = []
var paypalItemsArray = []
scc_jQuery(parent_id + ' .itemCreated').each(function(){
var totalnumber1=[];
var sld = 1;
var _sec = parseInt((scc_jQuery(this).attr('id')).split("_")[1]);
var sub = parseInt((scc_jQuery(this).attr('id')).split("_")[2]);
if(sec != _sec){
sec=_sec;
multislider[sec] = [];
hmm[sec] = [];
sliderNames[sec] = []
}
if(isNaN(hmm[sec][sub])) {hmm[sec][sub]= 0; sliderNames[sec][sub] = 0}
if ('switchoption' == scc_jQuery(this).attr('data-inputtype') ){

if (scc_jQuery(this).is(':checked')){

hmm[sec][sub] += parseFloat(scc_jQuery(this).attr('datainputprice'));
const switched={name: "<span class='span2'>"+scc_jQuery(this).attr('name')+"</span>",
value:parseFloat(scc_jQuery(this).attr('datainputprice')),
unit:1,
section: sec,
subsection: sub,
paypal_name: scc_jQuery(this).attr('name')};
parts.push(switched);

}
}
else if ('dropdowninput' == scc_jQuery(this).attr('data-inputtype')) {
hmm[sec][sub] += parseFloat(getDropDownValue(this));// * parseInt(dropdownMult);
// console.log(hmm, scc_jQuery(this).find("option:selected").text(), "dropdown", scc_jQuery(this).find("option:selected").val(),sec,sub);
var title = scc_jQuery(scc_jQuery(this).find("option:selected")[0]).text()

if(scc_jQuery(this).parent().parent().find('.ddlabel:first') && scc_jQuery(this).parent().parent().find('.ddlabel:first')[0]){
if(title != 'Choose an option...'){
scc_jQuery(scc_jQuery(this).parent().parent().find('.ddlabel:first')[0]).text(title)
}
}
if(scc_jQuery(this).find("option:selected").val() != ""){
const switched={
name: "<div class='row-fluid Product-Titles-Summary-Window' style=''><div class='span2'>"+scc_jQuery(this).find("option:selected").text()+"</div> <div class='product-desc-summary-scc'>"+scc_jQuery(this).find("option:selected").attr('data-description')+"</div></div>",
value:parseFloat(getDropDownValue(this)),
unit: 1,
section: sec,
subsection: sub,
paypal_name: scc_jQuery(this).find("option:selected").text()
};
parts.push(switched);
}
}
else if ('sliderinput' == scc_jQuery(this).attr('data-inputtype')){
totalnumber1 =scc_jQuery(this).attr('data_range').split(",");
var isSlidingScale = Boolean(scc_jQuery(this).attr('data-is-sliding-scale') == 'true');
var sliderunitprc  = totalnumber1 [totalnumber1.length-1];
var slide_value = parseFloat(scc_jQuery(this).attr('data-value'));

var unitprice = sliderunitprc*slide_value;
multislider[sec][sub]=slide_value;

for (k=0;k<totalnumber1.length;k +=3){
if ((parseInt(slide_value) <= parseInt(totalnumber1[k+1]))){
hmm[sec][sub] += parseFloat(totalnumber1[k+2]);
sliderNames[sec][sub] = ' '

const switched={name: "<div class='row-fluid Product-Titles-Summary-Window' style=''><div class='span2'>"+scc_jQuery(this).parent().parent().parent().find('label:last').text()+" </div></div>",
unit:slide_value,
value: parseFloat(totalnumber1[k+2]),
section: sec,
subsection: sub,
sliderInsubsection: true,
isSlidingScale: isSlidingScale,
paypal_name: scc_jQuery(this).parent().parent().find('label:last').text()};
parts.push(switched);
//price +=  multislider[j]*(xprice[j]+hmm[j]);
break;
}
}
}
else if ('comment_input' == scc_jQuery(this).attr('data-inputtype')){
if(scc_jQuery(this) && scc_jQuery(this).val() && scc_jQuery(this).val().length > 0){
const comment = {
name: "<div class='row-fluid Product-Titles-Summary-Window' style=''><div class='span2' style='margin-left:5px'>"+scc_jQuery(this).parent().parent().find('label:last').text()+" </div></div>",
text: scc_jQuery(this).val(),
section: sec,
subsection: sub,
unit: 1,
value: 0,
comment: true,
paypal_title: scc_jQuery(this).parent().parent().find('label:last').text(),
paypal_text: scc_jQuery(this).val()
}

parts.push(comment);
//comments.push(comment);
}

}
else if ('number_input' == scc_jQuery(this).attr('data-inputtype')){
var unitValue =scc_jQuery(this).attr('data-value');
const switched={name: "<div class='row-fluid Product-Titles-Summary-Window' style=''><div class='span2'>"+scc_jQuery(this).parent().parent().find('label:last').text()+" </div></div>",
unit:scc_jQuery(this).val(),
value: unitValue,
section: sec,
subsection: sub,
numberInput: true,
paypal_name: scc_jQuery(this).parent().parent().find('label:last').text()};
parts.push(switched);
hmm[sec][sub] = unitValue * scc_jQuery(this).val()

}else if('scc_custom_math' == scc_jQuery(this).attr('data-inputtype')) {

const switched={
name: scc_jQuery(this).attr('data-name'),
unit: 1,
value: scc_jQuery(this).attr('data-value'),
section: sec,
subsection: sub,
numberInput: true,
paypal_name: '',
custom_math: true,
custom_math_type: scc_jQuery(this).attr('data-math-type'),
show_detailed_list: scc_jQuery(this).parent().parent().attr('data-show-detailed-list') ? scc_jQuery(this).parent().parent().attr('data-show-detailed-list') : false
};
parts.push(switched);
hmm[sec][sub] = unitValue * scc_jQuery(this).val()
} else {
var sld = parseFloat(scc_jQuery(this).val());
}
});
var _unit =1;
var _section =9999999;
var _usection =9999999;

for (var j = parts.length; j--;){
if(parts[j].section != _section || parts[j].subsection != _usection){
if(!parts[j].sliderInsubsection){
_section = parts[j].section;
_usection = parts[j].subsection;
if(parts[j].numberInput){

if(!isNaN(parseFloat(scc_jQuery('#itemcreateds_'+_section+'_'+_usection).attr('data-value')))){
parts[j].unit = parts[j].unit * parseFloat(scc_jQuery('#itemcreateds_'+_section+'_'+_usection).attr('data-value'));
_unit = parseFloat(scc_jQuery('#itemcreateds_'+_section+'_'+_usection).attr('data-value'))
}else{
_unit = 1
}

}else{
parts[j].unit =parseFloat(scc_jQuery('#itemcreateds_'+_section+'_'+_usection).attr('data-value'));
_unit = parts[j].unit;
}
}

}else {
var secn = parts[j].section;
var subsecn = parts[j].subsection;
//parts[j].unit = _unit;
//_unit = parseFloat(scc_jQuery('#itemcreateds_'+secn+'_'+subsecn).attr('data-value'));
if(parts[j].numberInput){

if(!isNaN(parseFloat(scc_jQuery('#itemcreateds_'+secn+'_'+subsecn).attr('data-value')))){
parts[j].unit = parts[j].unit * parseFloat(scc_jQuery('#itemcreateds_'+secn+'_'+subsecn).attr('data-value'));
_unit = parseFloat(scc_jQuery('#itemcreateds_'+secn+'_'+subsecn).attr('data-value'))
}else{
_unit = 1
}

}else{
parts[j].unit = parseFloat(scc_jQuery('#itemcreateds_'+secn+'_'+subsecn).attr('data-value'))
_unit = parts[j].unit;
}
}
}

price = CreateTable(parts, comments);
/*for(i =0; i<hmm.length;i++){
if(hmm[i]){
for(j=0; j<hmm[i].length; j++){
if(multislider[i][j] === undefined || multislider[i] === 0){
price += hmm[i][j];
}else {
price += hmm[i][j]*multislider[i][j];
}
}
}
} */




var totalPrice_tax_included = 0;
var subTotalPrice = 0;
subTotalPrice = price;
var sccPriceCurr = (price).toFixed(2) + " " + scc_jQuery('#sccCurrencyUSD').html();
var objecttotalword = '<?php echo (isset($result_2->objecttotalword) ? $result_2->objecttotalword : "Total"); ?>';
//Tax cal
const TAX_RATE_ON = "TAX_RATE_ON";
var taxRate =<?php echo ((isset($result_2) && isset($result_2->objecttaxrate)  && $result_2->objecttaxrate ? $result_2->objecttaxrate : 0)) ?>;
var onTax = '<?php echo isset($result_2) && isset($result_2->objecttaxrate) && $result_2->objecttaxrate ? $result_2->objecttaxrate : 'TAX_RATE_ON'; ?>';
var displayTax = taxRate;
if(taxRate !=0){
if(taxRate !=''){
var tax = (price * taxRate)/100;
totalPrice_tax_included = price + tax;
}else{
totalPrice_tax_included = price;
}
}else{
totalPrice_tax_included = price;
}
addItemsToPayPalForm(parts, tax, comments)
// currency style prefix and/or sufix
if(scc_jQuery('.total_price_with_label')){
if(currencyStyleOption === 0){
scc_jQuery('#totalprice_prefix_currency_label').html(currencySymbol(currencyLabel));
scc_jQuery('.currency-prefix').each(function(i, obj){
scc_jQuery(obj).html(currencySymbol(currencyLabel));
})
}else if(currencyStyleOption === 1){
scc_jQuery('#totalprice_sufix_currency_label').html(currencyLabel)
scc_jQuery('.currency-sufix').each(function(i, obj){
scc_jQuery(obj).html(currencyLabel)
})


}
}



if(currencyStyleOption === 0){
if(tax){
scc_jQuery('#tax_price_with_currency_label').html(currencySymbol(currencyLabel)  + ' ' + priceCommaStyler(tax.toFixed(2)) )
}else{
scc_jQuery('#tax_price_with_currency_label').html(currencySymbol(currencyLabel)  + ' 0' )
}
if(totalPrice_tax_included){
scc_jQuery('#total_price_with_currency_label').html(currencySymbol(currencyLabel)  + ' ' + priceCommaStyler(totalPrice_tax_included.toFixed(2)))
}
if(subTotalPrice){
scc_jQuery('#subtotal_price_with_currency_label').html(currencySymbol(currencyLabel)  + ' ' + priceCommaStyler(subTotalPrice.toFixed(2)))
}
if(coupon){
if(Number(coupon.discountpercentage) != -1){
scc_jQuery('#coupon_discount_with_currency_label').html(currencySymbol(currencyLabel)  + ' ' + priceCommaStyler(coupon.discount_value_total.toFixed(2)))
}
if(Number(coupon.discountvalue) != -1){
scc_jQuery('#coupon_discount_with_currency_label').html(currencySymbol(currencyLabel)  + ' ' + priceCommaStyler(coupon.discount_value_total.toFixed(2)))
}
}
}else if(currencyStyleOption === 1){
if(tax){
scc_jQuery('#tax_price_with_currency_label').html( priceCommaStyler(tax.toFixed(2)) + ' ' + currencyLabel)
}else{
scc_jQuery('#tax_price_with_currency_label').html( '0 ' + currencyLabel)
}
if(totalPrice_tax_included){
scc_jQuery('#total_price_with_currency_label').html(priceCommaStyler(totalPrice_tax_included.toFixed(2)) + ' ' + currencyLabel)
}
if(subTotalPrice){
scc_jQuery('#subtotal_price_with_currency_label').html(priceCommaStyler(subTotalPrice.toFixed(2)) + ' ' + currencyLabel)
}
if(coupon){
if(Number(coupon.discountpercentage) != -1){
scc_jQuery('#coupon_discount_with_currency_label').html(priceCommaStyler(coupon.discount_value_total.toFixed(2)) + ' ' + currencyLabel)
}
if(Number(coupon.discountvalue) != -1){
scc_jQuery('#coupon_discount_with_currency_label').html(priceCommaStyler(coupon.discount_value_total.toFixed(2)) + ' ' + currencyLabel)
}
}
}
scc_jQuery(parent_id + ' .totalPrice').find("#totalvalue").text((priceCommaStyler(totalPrice_tax_included.toFixed(2))));

});
});
// paypal starts
function addItemsToPayPalForm(items, tax, comments){
total = 0
var itemsToAddPaypalForm = ""
var itemsAdded = 0

for(var i=0; i < items.length; i++){
var item_value = (items[i].unit === null ? items[i].value : (items[i].value * items[i].unit))
var item_name  = ((items[i].unit === null  || items[i].unit === 1) ? items[i].paypal_name : ( items[i].unit + ' units: ' + items[i].paypal_name ))
//	if(item_value > 0){
itemsToAddPaypalForm += '  <input type="hidden" name="item_name_'+ (itemsAdded+1) + '" value="' + item_name + '" class="btPayPalItem">'
itemsToAddPaypalForm += '  <input type="hidden" name="amount_'+ (itemsAdded+1) + '" value="' + item_value.toFixed(2) + '" class="btPayPalItem">'
itemsAdded++
//	}
total += (items[i].unit === null ? items[i].value : (items[i].value * items[i].unit))
}
/*
if(tax && tax > 0){
console.log('tax included!')
itemsToAddPaypalForm += '  <input type="hidden" name="item_name_'+ (items.length+1) + '" value="taxs" class="btPayPalItem">'
itemsToAddPaypalForm += '  <input type="hidden" name="amount_'+ (items.length+1) + '" value="' + tax.toFixed(2) + '" class="btPayPalItem">'
total += tax
}
*/
scc_jQuery('#paypal_form_add_items').html(itemsToAddPaypalForm)
}
//paypal ends
// currency Style function starts
var currencyStyleOption = <?php echo isset($result_2) && isset($result_2->currency_style) && $result_2->currency_style && is_numeric($result_2->currency_style)  ? $result_2->currency_style : 0 ?>;
var currencyLabel = '<?php echo(get_option('scc_currency', 'USD')) ?>';

function currencyStyle(number){
switch (currencyStyleOption){
case 0:
number  = currencySymbol(currencyLabel) + number
case 1:
number  = number + ' ' +  currencyLabel
break
}
return number
}
function currencySymbol(currency){
var currencySymbolLabel =  '$'
switch(currency){
case 'ANG':
currencySymbolLabel = 'ƒ'
break
case 'ILS':
currencySymbolLabel = '₪'
break
case 'USD':
currencySymbolLabel = '$'
break
case 'CAD':
currencySymbolLabel = '$'
break
case 'EUR':
currencySymbolLabel = '€'
break
case 'NOK':
currencySymbolLabel = 'kr'
break
case 'JPY':
currencySymbolLabel = '¥'
break
case 'RUB':
currencySymbolLabel = '₽'
break
case 'TRY':
currencySymbolLabel = '₺'
break
case 'CHF':
currencySymbolLabel = 'Fr.'
break
case 'SEK':
currencySymbolLabel = 'kr'
break
case 'BRL':
currencySymbolLabel = 'R$'
break
case 'CNY':
currencySymbolLabel = '¥'
break
case 'AUD':
currencySymbolLabel = 'A$'
break
case 'DKK':
currencySymbolLabel = 'Kr.'
break
case 'HKD':
currencySymbolLabel = 'HK$'
break
case 'GBP':
currencySymbolLabel = '£'
break
case 'ZAR':
currencySymbolLabel = 'R'
break
case 'ZMW':
currencySymbolLabel = 'K'
break
case 'RON':
currencySymbolLabel = 'RON'
break
case '‎PKR':
currencySymbolLabel = 'Rs'
break
case 'KRW':
currencySymbolLabel = '₩'
break
case 'CFA':
currencySymbolLabel = 'FCFA'
break
case 'PLN':
currencySymbolLabel = 'zł'
break
case 'IDR':
currencySymbolLabel = 'Rp'
break
default:
currencySymbolLabel = currency || '$'
}
return currencySymbolLabel
}
// currency Style function ends

// check If mandatory options are choosen
document.addEventListener('DOMContentLoaded', (event) => {
scc_jQuery('.btPayPalButtonCustom').click(function(e){
e.preventDefault();
var scc_mandatory = '';

scc_jQuery('.mandatory_yes').each(function(){
scc_jQuery(this).addClass('hehehehehehehe');
if(scc_jQuery(this).val() ==''){
scc_jQuery(this).parent().parent().find('.alert-danger').html('<span class="trn">Please choose an option</span> !');
scc_jQuery(this).parent().parent().find('.alert-danger').css('display','block');
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(this).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
checkIfParentIsAccordionAndOpenIt(this)

}
});
// check if mandatory checkbox/button/switches are checked
scc_jQuery('[data-mandatory=yes]').each((i,e) => {
isNoneChecked = !(scc_jQuery('input', e).map((i,ee) => {return jQuery(ee).is(':checked')}).get().some(eee => eee == true))
if (isNoneChecked) {
scc_jQuery(e).find('.alert-danger').html('<span class="trn">Please choose an option</span> !').css('display','block');
scc_jQuery(e).parent().find('.scc-accordion').click();
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(e).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
} else {
scc_jQuery(e).find('.alert-danger').hide();
// scc_mandatory == '';
}
})

if (scc_mandatory == '') {
if(Number(total) && Number(total) > 0){
scc_jQuery("#paypal_form").submit();
scc_jQuery("#paypal_form")[0].submit();
}
}

});
});

function getDropDownValue($this){
price = scc_jQuery($this).val();
if (! price) {   return 0; }
else return price;
}
function SCCOpenPopUpEmail(){
scc_jQuery.getScript('<?php echo plugin_dir_url(__DIR__) . 'assets/lib/bootstrap-3.3.5/dist/js/bootstrap.min.js' ?>', function(data) {
var scc_mandatory = '';

scc_jQuery('.mandatory_yes').each(function(){
if(scc_jQuery(this).val() ==''){
scc_jQuery(this).parent().parent().find('.alert-danger').html('<span class="trn">Please choose an option</span> !');
scc_jQuery(this).parent().parent().find('.alert-danger').css('display','block');
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(this).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
checkIfParentIsAccordionAndOpenIt(this)
}
});
// check if mandatory checkbox/button/switches are checked
scc_jQuery('[data-mandatory=yes]').each((i,e) => {
isNoneChecked = !(scc_jQuery('input', e).map((i,ee) => {return jQuery(ee).is(':checked')}).get().some(eee => eee == true))
if (isNoneChecked) {
scc_jQuery(e).find('.alert-danger').html('<span class="trn">Please choose an option</span> !').css('display','block');
scc_jQuery(e).parent().find('.scc-accordion').click();
scc_jQuery('html, body').animate({
scrollTop: scc_jQuery(e).offset().top
}, 1000);
scc_mandatory = 'scc_remains';
} else {
scc_jQuery(e).find('.alert-danger').hide();
// scc_mandatory == '';
}
})
if (scc_mandatory == '') {
scc_jQuery('#sccquoteModal').modal('show')
scc_jQuery('.modal-backdrop').each(function(){
scc_jQuery(this).remove()
})
}
})
}
document.addEventListener('DOMContentLoaded', (event) => {
scc_jQuery('.scc-email-popup-close').click(function(e){
e.preventDefault();
scc_jQuery('#sccquoteModal').modal('hide')
scc_jQuery('.scc-email-popup').removeClass('in');
})
});

function addCouponCodeModal(){
if(!coupon){
var minWidth = "500px"
var titleFontSize = "35px"
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)){
minWidth = "250px"
titleFontSize = "15px"
console.log('Im mobile')
}

var code=""

code += '<div id="coupon_code_modal" class="scc-modal-2020 fade"  role="dialog">';
	code += '	<div class="scc-modal-dialog-2020">';
		code += '		<div class="scc-modal-content-2020" style="margin-top:200px; min-width: ' + minWidth + '">';
			code += '		<div class="scc-modal-header-2020">';
				code += '			<button type="button" class="close" data-dismiss="modal">&times;</button>';
				code += '            <h3 class="scc-modal-title-2020" style="font-size:20px;"><span class="trn">Enter your coupon code</span></h3>';
			code += '		</div>';
			code += '		<div class="scc-modal-body-2020" >';
				code += '        <input class="form-control" id="coupon_code" placeholder="">';
				code += '        <div id="coupon_code_error" style="color:red"></div>'
				code += '       <button type="button" class="btn btn-danger" onClick="checkCouponCode()" id="button_check_coupon"><span class="trn">Submit</span></button>';
				code += '       <button type="button" class="btn btn-default" data-dismiss="modal">X</button>';
			code += '		</div>';
		code += '		</div>';
	code += '	</div>';
code += '</div>';

scc_jQuery('#coupon_code_modal_container').html(code)
scc_jQuery('#coupon_code_modal').modal('show')

if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}

scc_jQuery('.modal-backdrop, fade, in:first').each(function(index, ob){
scc_jQuery(ob).css('display', 'none')
})
}

}

function checkCouponCode(){
scc_jQuery('#button_check_coupon').html('<i class="fa fa-circle-o-notch fa-spin"></i> Checking...')
scc_jQuery.ajax( {
url: rt_vars.rt_urlajax,
type: 'GET',
data: {
action: 'sscCheckCoupon',
coupon_code: scc_jQuery('#coupon_code').val()
},
success: function( data ){
if(typeof data === 'object'){
if(data.data){


if(data.data === false || data.data === 'false'){
scc_jQuery('#coupon_code_error').html('<span class="trn">This code is not valid</span>')
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
}else if(typeof data.data === 'object'){
coupon = data.data[0]
scc_jQuery('#coupon_code_modal').modal('hide')
applyCouponDiscount(coupon)
}
}
}else if(typeof data === 'string'){
if(data.length > 0){
var responseTemp = data.split('{"success":true,"data":')[data.split('{"success":true,"data":').length -1]


if(responseTemp.indexOf('false') == -1){
responseTemp = responseTemp.substring(1,responseTemp.length - 2)
coupon = JSON.parse(responseTemp)

scc_jQuery('#coupon_code_modal').modal('hide')
applyCouponDiscount(coupon)
}else{
scc_jQuery('#coupon_code_error').html('<span class="trn">This code is not valid</span>.')
if(window.hasOwnProperty("translatorJson")){
initTranslationScriptSCC('body', {lang: "en", t: translatorJson});
}
}

}
}else if(!data){

}
scc_jQuery('#button_check_coupon').html('Check Coupon Code')
},
error: function(errorThrown){
console.log(errorThrown);
scc_jQuery('#button_check_coupon').html('Check Coupon Code');
}
})
}
function applyCouponDiscount(coupon){
scc_jQuery('.submitPrices').click();
}

function displayCouponDiscountInFrontEnd(price){
// substracting discount coupon
if(!price || typeof price === 'undefined') {
price = 0
}
if(coupon){
var canDoDiscount = false
if(Number(coupon.minspend) === -1 && Number(coupon.maxspend) === -1){
canDoDiscount = true
}else{
if(Number(coupon.minspend) === -1 && Number(coupon.maxspend) != -1){
if(price <= coupon.maxspend){
canDoDiscount = true
}
}else if(Number(coupon.minspend) != -1 && Number(coupon.maxspend) === -1){
if(price >= coupon.minspend){
canDoDiscount = true
}
}else if(Number(coupon.minspend) != -1 && Number(coupon.minspend) != -1 ){
if(price >= Number(coupon.minspend) && price <= Number(coupon.maxspend)){
canDoDiscount = true
}
}
}
if(canDoDiscount){

if(Number(coupon.discountpercentage) != -1){
coupon.price_without_discount = price.toFixed(2)
price = price.toFixed(2) - (price.toFixed(2) * (Number(coupon.discountpercentage)/100).toFixed(2))
coupon.discount_value_total = coupon.price_without_discount - price.toFixed(2)
coupon.discount_value_total = Number(coupon.discount_value_total.toFixed(2))
}
if(Number(coupon.discountvalue) != -1){
coupon.price_without_discount = price
price = price < Number(coupon.discountvalue) ? 0 : price - Number(coupon.discountvalue)
coupon.discount_value_total = Number(coupon.discountvalue)
coupon.discount_value_total = Number(coupon.discount_value_total.toFixed(2))
}
}else {
coupon.price_without_discount = price
coupon.discount_value_total = 0
}
}
//Applying Coupon Discount
if(coupon){

scc_jQuery('#coupon_info_container').css('display', 'block')
if(canDoDiscount){

scc_jQuery('#coupon_button').css('display', 'none')

if(coupon.discountpercentage != -1.00){
scc_jQuery('#coupon_info_discount_percentage').html('<span class="trn">Discount percentage</span>: ' + coupon.discountpercentage + '%')
}
if(coupon.discountvalue != -1.00){
if(currencyStyleOption === 0){
scc_jQuery('#coupon_info_discount_value').html(currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.discountvalue))

}else{
scc_jQuery('#coupon_info_discount_value').html(priceCommaStyler(coupon.discountvalue) + ' ' + currencyLabel)
}
}
}

if(Number(coupon.minspend) === -1.00 && Number(coupon.maxspend) === -1.00){
if(currencyStyleOption === 0){
scc_jQuery('#coupon_info_spend_range').html('<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.discount_value_total) + ' </p>')
}else{
scc_jQuery('#coupon_info_spend_range').html('<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + ' ' + priceCommaStyler(coupon.discount_value_total) + currencyLabel + ' </p>')
}
}else{
if(Number(coupon.minspend) != -1.00 && Number(coupon.maxspend) != -1.00){

if(currencyStyleOption === 0){
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.price_without_discount) >= Number(coupon.minspend) && Number(coupon.maxspend) >= Number(coupon.price_without_discount) ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.discount_value_total) + ' </p>': '<p style="color:red"><span class="trn">Your discount has not been applied because the total price has to be between</span> ' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.minspend) + ' <span class="trn">and</span> ' + currencySymbol(currencyLabel)  + priceCommaStyler(coupon.maxspend) + ' </p>')
}else{
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.price_without_discount) >= Number(coupon.minspend) && Number(coupon.maxspend) >= Number(coupon.price_without_discount) ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + ' ' + priceCommaStyler(coupon.discount_value_total) + currencyLabel + ' </p>': '<p style="color:red"> <span class="trn">Your discount has not been applied because the total price has to be between</span> ' + priceCommaStyler(coupon.minspend) + ' ' + currencyLabel + ' <span class="trn">and</span> ' + priceCommaStyler(coupon.maxspend) + ' ' + currencyLabel + ' </p>')
}
}else if(Number(coupon.minspend) != -1.00 && Number(coupon.maxspend) === -1.00){
if(currencyStyleOption === 0){
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.price_without_discount) >= Number(coupon.minspend)  ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.discount_value_total) + ' </p>': '<p style="color:red"> <span class="trn">Your discount has not been applied because the total price has to be higher than</span> ' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.minspend) + currencySymbol(currencyLabel) + ' </p>')
}else{
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.price_without_discount) >= Number(coupon.minspend)  ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + ' ' + priceCommaStyler(coupon.discount_value_total) + currencyLabel + ' </p>': '<p style="color:red"> <span class="trn">Your discount has not been applied because the total price has to be higher than</span> ' + priceCommaStyler(coupon.minspend) + ' ' + currencyLabel + ' </p>')
}
}else if(Number(coupon.minspend) === -1.00 && Number(coupon.maxspend) != -1.00){
if(currencyStyleOption === 0){
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.maxspend) >= Number(coupon.price_without_discount) ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + currencySymbol(currencyLabel) + ' ' + priceCommaStyler(coupon.discountvalue) + ' </p>': '<p style="color:red"> <span class="trn">Your discount has not been applied because the total price has to be lower than</span> ' + currencySymbol(currencyLabel) + priceCommaStyler(coupon.maxspend) + ' </p>')
}else{
scc_jQuery('#coupon_info_spend_range').html(Number(coupon.maxspend) >= Number(coupon.price_without_discount) ? '<p style="color:green"> <span class="trn">Your discount has been applied correctly</span>. -' + ' ' + priceCommaStyler(coupon.discountvalue) + currencyLabel + ' </p>': '<p style="color:red"> <span class="trn">Your discount has not been applied because the total price has to be lower than</span> ' + priceCommaStyler(coupon.maxspend) + ' ' + currencyLabel + ' </p>')
}
}
}
}

return price
}
</script>
<?php
}

}

SCC_Item_Handler::init();
