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

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

			// Global Color Setting

			if ( id === 'eauto_repair_global_color' || id === 'eauto_repair_heading_color' || id === 'eauto_repair_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-eauto_repair_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'eauto_repair_scroll_hide' || id === 'eauto_repair_sticky_header' || id === 'eauto_repair_preloader_hide' || id === 'eauto_repair_sticky_header' || id === 'eauto_repair_products_per_row' || id === 'eauto_repair_scroll_top_position' || id === 'eauto_repair_products_per_row' || id === 'eauto_repair_width_option' || id === 'eauto_repair_nav_menu_text_transform')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-eauto_repair_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			// Social Icon

			if ( id === 'eauto_repair_facebook_icon' || id === 'eauto_repair_twitter_icon' || id === 'eauto_repair_intagram_icon'|| id === 'eauto_repair_linkedin_icon'|| id === 'eauto_repair_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-eauto_repair_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header
			
			if ( id === 'eauto_repair_phone_text' || id === 'eauto_repair_quote_btn_text') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-eauto_repair_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

			if ( id === 'eauto_repair_banner_section_setting' || id === 'eauto_repair_counter_number0' || id === 'EAUTO_REPAIR_REVIEW_image' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-eauto_repair_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Products

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		eauto_repair_customizer_label( 'eauto_repair_global_color', 'Global Color' );
		eauto_repair_customizer_label( 'eauto_repair_heading_color', 'Heading Typography' );
		eauto_repair_customizer_label( 'eauto_repair_paragraph_color', 'Paragraph Typography' );

		// General Setting
		eauto_repair_customizer_label( 'eauto_repair_preloader_hide', 'Preloader' );
		eauto_repair_customizer_label( 'eauto_repair_scroll_hide', 'Scroll To Top' );
		eauto_repair_customizer_label( 'eauto_repair_sticky_header', 'Sticky Header' );
		eauto_repair_customizer_label( 'eauto_repair_scroll_top_position', 'Scroll to top Position' );
		eauto_repair_customizer_label( 'eauto_repair_products_per_row', 'woocommerce Setting' );
		eauto_repair_customizer_label( 'eauto_repair_width_option', 'Site Width Layouts' );
		eauto_repair_customizer_label( 'eauto_repair_nav_menu_text_transform', 'Nav Menus Text Transform' );

		// Colors
		eauto_repair_customizer_label( 'eauto_repair_theme_color', 'Theme Color' );
		eauto_repair_customizer_label( 'background_color', 'Colors' );
		eauto_repair_customizer_label( 'background_image', 'Image' );

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

		eauto_repair_customizer_label( 'eauto_repair_post_layout', 'Post Layouts Settings' );

		eauto_repair_customizer_label( 'eauto_repair_404_page_main_heading', '404 Page Settings' );

		// Social Icon
		eauto_repair_customizer_label( 'eauto_repair_facebook_icon', 'Facebook' );
		eauto_repair_customizer_label( 'eauto_repair_twitter_icon', 'Twitter' );
		eauto_repair_customizer_label( 'eauto_repair_intagram_icon', 'Intagram' );
		eauto_repair_customizer_label( 'eauto_repair_linkedin_icon', 'Linkedin' );
		eauto_repair_customizer_label( 'eauto_repair_pintrest_icon', 'Pintrest' );

		// Header 
		eauto_repair_customizer_label( 'eauto_repair_phone_text', 'Phone Number' );
		eauto_repair_customizer_label( 'eauto_repair_quote_btn_text', 'Header Button' );

		//Slider
		eauto_repair_customizer_label( 'eauto_repair_banner_section_setting', 'Banner' );
		eauto_repair_customizer_label( 'eauto_repair_counter_number0', 'Counter' );
		eauto_repair_customizer_label( 'EAUTO_REPAIR_REVIEW_image', 'Review' );

		//Products
		eauto_repair_customizer_label( 'eauto_repair_service_section_setting', 'Our Service Section' );

		//Footer
		eauto_repair_customizer_label( 'eauto_repair_footer_widget_content_alignment', 'Footer' );
		eauto_repair_customizer_label( 'eauto_repair_show_hide_copyright', 'Copyright' );

		//Post setting
		eauto_repair_customizer_label( 'eauto_repair_post_page_title', 'Post Settings' );

		//Single post setting
		eauto_repair_customizer_label( 'eauto_repair_single_post_page_content', 'Single Post Settings' );
	

	});

})( jQuery );
