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

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

			// Global Color Setting

			if ( id === 'gym_nutrition_shop_global_color' || id === 'gym_nutrition_shop_heading_color' || id === 'gym_nutrition_shop_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-gym_nutrition_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Single Post Comment Setting

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

			// General Setting

			if ( id === 'gym_nutrition_shop_scroll_hide' || id === 'gym_nutrition_shop_preloader_hide' || id === 'gym_nutrition_shop_sticky_header' || id === 'gym_nutrition_shop_products_per_row' || id === 'gym_nutrition_shop_scroll_top_position' || id === 'gym_nutrition_shop_products_per_row' || id === 'gym_nutrition_shop_width_option' || id === 'gym_nutrition_shop_nav_menu_text_transform'|| id === 'gym_nutrition_shop_woo_product_border_radius')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-gym_nutrition_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Woocommerce product sale Setting

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

			// Colors

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

			// Social Icon

			if ( id === 'gym_nutrition_shop_facebook_icon' || id === 'gym_nutrition_shop_twitter_icon' || id === 'gym_nutrition_shop_intagram_icon'|| id === 'gym_nutrition_shop_linkedin_icon'|| id === 'gym_nutrition_shop_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-gym_nutrition_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header
			
			if ( id === 'gym_nutrition_shop_top_header_picking_url' || id === 'gym_nutrition_shop_top_header_sale_head_text' || id === 'gym_nutrition_shop_topbar_phone_number' || id === 'gym_nutrition_shop_topbar1_wishlist_url' || id === 'gym_nutrition_shop_top_header_delivery_url' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-gym_nutrition_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Products

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_global_color', 'Global Color' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_heading_color', 'Heading Typography' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_paragraph_color', 'Paragraph Typography' );

		// General Setting
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_preloader_hide', 'Preloader' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_sticky_header', 'Sticky Header' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_scroll_hide', 'Scroll To Top' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_scroll_top_position', 'Scroll to top Position' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_products_per_row', 'woocommerce Setting' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_width_option', 'Site Width Layouts' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_woocommerce_product_sale', 'Woocommerce Product Sale' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_nav_menu_text_transform', 'Nav Menus Text Transform' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_woocommerce_related_product_show_hide', 'Woocommerce Related Products' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_woo_product_border_radius', 'Woocommerce Product Border Radius' );

		// Colors
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_theme_color', 'Theme Color' );
		gym_nutrition_shop_customizer_label( 'background_color', 'Colors' );
		gym_nutrition_shop_customizer_label( 'background_image', 'Image' );

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

		// Social Icon
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_facebook_icon', 'Facebook' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_twitter_icon', 'Twitter' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_intagram_icon', 'Intagram' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_linkedin_icon', 'Linkedin' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_pintrest_icon', 'Pintrest' );

		// Header 
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_top_header_picking_url', 'Picking Up URL' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_top_header_sale_head_text', 'Sale Text' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_topbar_phone_number', 'Phone Number' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_top_header_delivery_url', 'Delivery & Estimate URL' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_topbar1_wishlist_url', 'Wishlist Url' );

		//Slider
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_slider_section_setting', 'Slider' );

		//Products
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_activities_section_setting', 'Products' );

		//Footer
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_footer_widget_content_alignment', 'Footer' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_show_hide_copyright', 'Copyright' );

		//Post setting
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_post_page_title', 'Post Settings' );

		//Single post setting
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_single_post_page_content', 'Single Post Settings' );
		gym_nutrition_shop_customizer_label( 'gym_nutrition_shop_single_post_comment_title', 'Single Post Comment' );
	

	});

})( jQuery );
