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

		var optPrefix = '#customize-control-pest_control_services_options-';
		
		// Label
		function pest_control_services_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-pest_control_services_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Global Color Setting

			if ( id === 'pest_control_services_global_color' || id === 'pest_control_services_heading_color' || id === 'pest_control_services_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pest_control_services_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'pest_control_services_scroll_hide' || id === 'pest_control_services_preloader_hide' || id === 'pest_control_services_sticky_header' || id === 'pest_control_services_products_per_row' || id === 'pest_control_services_width_option' || id === 'pest_control_services_nav_menu_text_transform')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pest_control_services_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			// Social Icon

			if ( id === 'pest_control_services_facebook_icon' || id === 'pest_control_services_twitter_icon' || id === 'pest_control_services_intagram_icon'|| id === 'pest_control_services_linkedin_icon'|| id === 'pest_control_services_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pest_control_services_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header

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

			// Slider

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

			// About Us

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

			// Footer

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

			// Post Setting

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

			// Single Post Setting

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

		// Social Icon
		pest_control_services_customizer_label( 'pest_control_services_facebook_icon', 'Facebook' );
		pest_control_services_customizer_label( 'pest_control_services_twitter_icon', 'Twitter' );
		pest_control_services_customizer_label( 'pest_control_services_intagram_icon', 'Intagram' );
		pest_control_services_customizer_label( 'pest_control_services_linkedin_icon', 'Linkedin' );
		pest_control_services_customizer_label( 'pest_control_services_pintrest_icon', 'Pintrest' );

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

		// Global Color Setting
		pest_control_services_customizer_label( 'pest_control_services_global_color', 'Global Color' );
		pest_control_services_customizer_label( 'pest_control_services_heading_color', 'Heading Typography' );
		pest_control_services_customizer_label( 'pest_control_services_paragraph_color', 'Paragraph Typography' );

		// General Setting
		pest_control_services_customizer_label( 'pest_control_services_preloader_hide', 'Preloader' );
		pest_control_services_customizer_label( 'pest_control_services_sticky_header', 'Sticky Header' );
		pest_control_services_customizer_label( 'pest_control_services_scroll_hide', 'Scroll To Top' );
		pest_control_services_customizer_label( 'pest_control_services_products_per_row', 'woocommerce Setting' );
		pest_control_services_customizer_label( 'pest_control_services_width_option', 'Site Width Layouts' );
		pest_control_services_customizer_label( 'pest_control_services_nav_menu_text_transform', 'Nav Menus Text Transform' );

		// Colors
		pest_control_services_customizer_label( 'pest_control_services_theme_color', 'Theme Color' );
		pest_control_services_customizer_label( 'background_color', 'Colors' );
		pest_control_services_customizer_label( 'background_image', 'Image' );

		//Header Image
		pest_control_services_customizer_label( 'header_image', 'Header Image' );
		pest_control_services_customizer_label( 'pest_control_services_post_layout', 'Post Layouts Settings' );

		pest_control_services_customizer_label( 'pest_control_services_404_page_main_heading', '404 Page Settings' );

		// Header
		pest_control_services_customizer_label( 'pest_control_services_header_button_text', 'Header Button' );
		pest_control_services_customizer_label( 'pest_control_services_header_search_setting', 'Header Search' );

		//Slider
		pest_control_services_customizer_label( 'pest_control_services_top_slider_page1', 'Slider' );

		//About Us
		pest_control_services_customizer_label( 'pest_control_services_about_us_main_heading', 'About Us' );

		//Footer
		pest_control_services_customizer_label( 'pest_control_services_footer_bg_image', 'Footer' );
	
		// Post Setting
		pest_control_services_customizer_label( 'pest_control_services_post_page_title', 'Post Setting' );

		//Single Post Setting
		pest_control_services_customizer_label( 'pest_control_services_single_post_thumb', 'Single Post Setting' );

	});

})( jQuery );
