(function( $ ) {
	wp.customize.bind( 'ready', function() {

		var optPrefix = '#customize-control-ambulance_paramedics_options-';
		
		// Label
		function ambulance_paramedics_customizer_label( id, title ) {

			// Site Identity

			if ( id === 'custom_logo' || id === 'site_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Global Color Setting

			if ( id === 'ambulance_paramedics_global_color' || id === 'ambulance_paramedics_heading_color' || id === 'ambulance_paramedics_post_layout' || id === 'ambulance_paramedics_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'ambulance_paramedics_scroll_hide' || id === 'ambulance_paramedics_preloader_hide' || id === 'ambulance_paramedics_sticky_header' || id === 'ambulance_paramedics_products_per_row' || id === 'ambulance_paramedics_scroll_top_position' || id === 'ambulance_paramedics_products_per_row' || id === 'ambulance_paramedics_width_option' || id === 'ambulance_paramedics_nav_menu_text_transform' || id === 'ambulance_paramedics_404_page_main_heading')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

			if ( id === 'ambulance_paramedics_theme_color' || id === 'background_color' || id === 'background_image' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Header Image

			if ( id === 'header_image' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Social Icon

			if ( id === 'ambulance_paramedics_facebook_icon' || id === 'ambulance_paramedics_twitter_icon' || id === 'ambulance_paramedics_intagram_icon'|| id === 'ambulance_paramedics_linkedin_icon'|| id === 'ambulance_paramedics_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header
			
			if ( id === 'ambulance_paramedics_phone_number' || id === 'ambulance_paramedics_email_address' || id === 'ambulance_paramedics_location' || id === 'ambulance_paramedics_search_enable') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

			if ( id === 'ambulance_paramedics_banner_section_setting' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Products

			if ( id === 'ambulance_paramedics_service_section_setting' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Footer

			if ( id === 'ambulance_paramedics_footer_widget_content_alignment' || id === 'ambulance_paramedics_show_hide_copyright') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Post Settings

			if ( id === 'ambulance_paramedics_post_page_title' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Single Post Settings

			if ( id === 'ambulance_paramedics_single_post_thumb' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-ambulance_paramedics_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}
			
		}

	    // Site Identity
		ambulance_paramedics_customizer_label( 'custom_logo', 'Logo Setup' );
		ambulance_paramedics_customizer_label( 'site_icon', 'Favicon' );

		// Global Color Setting
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_global_color', 'Global Color' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_heading_color', 'Heading Typography' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_post_layout', 'Post Layouts Settings' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_paragraph_color', 'Paragraph Typography' );

		// General Setting
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_preloader_hide', 'Preloader' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_scroll_hide', 'Scroll To Top' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_scroll_top_position', 'Scroll to top Position' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_products_per_row', 'woocommerce Setting' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_width_option', 'Site Width Layouts' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_nav_menu_text_transform', 'Nav Menus Text Transform' );

		ambulance_paramedics_customizer_label( 'ambulance_paramedics_404_page_main_heading', '404 Page Settings' );

		// Colors
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_theme_color', 'Theme Color' );
		ambulance_paramedics_customizer_label( 'background_color', 'Colors' );
		ambulance_paramedics_customizer_label( 'background_image', 'Image' );

		//Header Image
		ambulance_paramedics_customizer_label( 'header_image', 'Header Image' );

		// Social Icon
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_facebook_icon', 'Facebook' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_twitter_icon', 'Twitter' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_intagram_icon', 'Intagram' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_linkedin_icon', 'Linkedin' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_pintrest_icon', 'Pintrest' );

		// Header 
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_phone_number', 'Phone Number' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_email_address', 'Email Address' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_location', 'Location' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_search_enable', 'Header Search' );

		//Slider
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_banner_section_setting', 'Banner' );

		//Products
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_service_section_setting', 'Service Section' );

		//Footer
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_footer_widget_content_alignment', 'Footer' );
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_show_hide_copyright', 'Copyright' );

		//Post setting
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_post_page_title', 'Post Settings' );

		//Single post setting
		ambulance_paramedics_customizer_label( 'ambulance_paramedics_single_post_thumb', 'Single Post Settings' );
	

	});

})( jQuery );
