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

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

			// Global Color Setting

			if ( id === 'store_eshop_first_color' || id === 'store_eshop_heading_color' || id === 'store_eshop_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-store_eshop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'store_eshop_scroll_hide' || id === 'store_eshop_preloader_hide' || id === 'store_eshop_sticky_header' || id === 'store_eshop_products_per_row' || id === 'store_eshop_scroll_top_position' || id === 'store_eshop_products_per_row' || id === 'store_eshop_width_option' || id === 'store_eshop_nav_menu_text_transform')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-store_eshop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			// Social Icon

			if ( id === 'store_eshop_facebook_icon' || id === 'store_eshop_twitter_icon' || id === 'store_eshop_intagram_icon'|| id === 'store_eshop_linkedin_icon'|| id === 'store_eshop_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-store_eshop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header
			
			if ( id === 'store_eshop_top_header_about_us_button_text' || id === 'store_eshop_topbar_text' || id === 'store_eshop_topbar_phone_number' || id === 'store_eshop_topbar1_wishlist_url' || id === 'store_eshop_topbar_location' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-store_eshop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Products

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		store_eshop_customizer_label( 'store_eshop_first_color', 'Global Color' );
		store_eshop_customizer_label( 'store_eshop_heading_color', 'Heading Typography' );
		store_eshop_customizer_label( 'store_eshop_paragraph_color', 'Paragraph Typography' );

		// General Setting
		store_eshop_customizer_label( 'store_eshop_preloader_hide', 'Preloader' );
		store_eshop_customizer_label( 'store_eshop_scroll_hide', 'Scroll To Top' );
		store_eshop_customizer_label( 'store_eshop_sticky_header', 'Sticky Header' );
		store_eshop_customizer_label( 'store_eshop_scroll_top_position', 'Scroll to top Position' );
		store_eshop_customizer_label( 'store_eshop_products_per_row', 'woocommerce Setting' );
		store_eshop_customizer_label( 'store_eshop_width_option', 'Site Width Layouts' );
		store_eshop_customizer_label( 'store_eshop_nav_menu_text_transform', 'Nav Menus Text Transform' );

		// Colors
		store_eshop_customizer_label( 'store_eshop_theme_color', 'Theme Color' );
		store_eshop_customizer_label( 'background_color', 'Colors' );
		store_eshop_customizer_label( 'background_image', 'Image' );

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

		store_eshop_customizer_label( 'store_eshop_post_layout', 'Post Layouts Settings' );

		store_eshop_customizer_label( 'store_eshop_404_page_main_heading', '404 Page Settings' );

		// Social Icon
		store_eshop_customizer_label( 'store_eshop_facebook_icon', 'Facebook' );
		store_eshop_customizer_label( 'store_eshop_twitter_icon', 'Twitter' );
		store_eshop_customizer_label( 'store_eshop_intagram_icon', 'Intagram' );
		store_eshop_customizer_label( 'store_eshop_linkedin_icon', 'Linkedin' );
		store_eshop_customizer_label( 'store_eshop_pintrest_icon', 'Pintrest' );

		// Header 
		store_eshop_customizer_label( 'store_eshop_top_header_about_us_button_text', 'Topbar Buttons' );
		store_eshop_customizer_label( 'store_eshop_topbar_text', 'Topbar Text' );
		store_eshop_customizer_label( 'store_eshop_topbar_phone_number', 'Phone Number' );
		store_eshop_customizer_label( 'store_eshop_topbar_location', 'Location' );
		store_eshop_customizer_label( 'store_eshop_topbar1_wishlist_url', 'Wishlist Url' );

		//Slider
		store_eshop_customizer_label( 'store_eshop_slider_section_setting', 'Slider' );

		//Products
		store_eshop_customizer_label( 'store_eshop_activities_section_setting', 'Products' );

		//Footer
		store_eshop_customizer_label( 'store_eshop_footer_widget_content_alignment', 'Footer' );
		store_eshop_customizer_label( 'store_eshop_show_hide_copyright', 'Copyright' );

		//Post setting
		store_eshop_customizer_label( 'store_eshop_post_page_title', 'Post Settings' );

		//Single post setting
		store_eshop_customizer_label( 'store_eshop_single_post_page_content', 'Single Post Settings' );
	

	});

})( jQuery );
