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

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

			// General Setting

			if ( id === 'beauty_cosmetic_store_scroll_hide' || id === 'beauty_cosmetic_store_preloader_hide' || id === 'beauty_cosmetic_store_sticky_header' || id === 'beauty_cosmetic_store_products_per_row')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-beauty_cosmetic_store_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Social Icon

			if ( id === 'beauty_cosmetic_store_facebook_icon' || id === 'beauty_cosmetic_store_twitter_icon' || id === 'beauty_cosmetic_store_intagram_icon'|| id === 'beauty_cosmetic_store_linkedin_icon'|| id === 'beauty_cosmetic_store_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-beauty_cosmetic_store_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

			if ( id === 'beauty_cosmetic_store_theme_color' || id === 'background_color' || id === 'background_image' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-beauty_cosmetic_store_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-beauty_cosmetic_store_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header

			if ( id === 'beauty_cosmetic_store_email' || id === 'beauty_cosmetic_store_topbar_timming' || id === 'beauty_cosmetic_store_top_header_text' || id === 'beauty_cosmetic_store_header_search_setting' || id === 'beauty_cosmetic_store_header_button' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-beauty_cosmetic_store_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Courses

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// General Setting
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_preloader_hide', 'Preloader' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_scroll_hide', 'Scroll To Top' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_products_per_row', 'woocommerce Setting' );

		// Colors
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_theme_color', 'Theme Color' );
		beauty_cosmetic_store_customizer_label( 'background_color', 'Colors' );
		beauty_cosmetic_store_customizer_label( 'background_image', 'Image' );

		// Social Icon
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_facebook_icon', 'Facebook' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_twitter_icon', 'Twitter' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_intagram_icon', 'Intagram' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_linkedin_icon', 'Linkedin' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_pintrest_icon', 'Pintrest' );

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

		// Header
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_topbar_timming', 'Timing' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_top_header_text', 'Topbar Text' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_email', 'Email' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_header_search_setting', 'Search Header' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_header_button', 'Header Button' );

		//Slider
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_slider_section_setting', 'Slider' );

		//Courses
		beauty_cosmetic_store_customizer_label( 'beauty_store_services_content', 'Courses' );

		//Footer
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_footer_widget_content_alignment', 'Footer' );
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_show_hide_copyright', 'Copyright' );

		//Post setting
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_post_page_title', 'Post Settings' );

		//Single post setting
		beauty_cosmetic_store_customizer_label( 'beauty_cosmetic_store_single_post_page_content', 'Single Post Settings' );
	});

})( jQuery );
