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

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

			// Global Color Setting

			if ( id === 'watch_store_shop_first_color' || id === 'watch_store_shop_heading_color' || id === 'watch_store_shop_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-watch_store_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'watch_store_shop_scroll_hide' || id === 'watch_store_shop_preloader_hide' || id === 'watch_store_shop_sticky_header' || id === 'watch_store_shop_products_per_row' || id === 'watch_store_shop_scroll_top_position' || id === 'watch_store_shop_products_per_row' || id === 'watch_store_shop_width_option' || id === 'watch_store_shop_nav_menu_text_transform')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-watch_store_shop_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

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


			// Banner

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

			// Products

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		watch_store_shop_customizer_label( 'watch_store_shop_first_color', 'Global Color' );
		watch_store_shop_customizer_label( 'watch_store_shop_heading_color', 'Heading Typography' );
		watch_store_shop_customizer_label( 'watch_store_shop_paragraph_color', 'Paragraph Typography' );

		// General Setting
		watch_store_shop_customizer_label( 'watch_store_shop_preloader_hide', 'Preloader' );
		watch_store_shop_customizer_label( 'watch_store_shop_sticky_header', 'Sticky Header' );
		watch_store_shop_customizer_label( 'watch_store_shop_scroll_hide', 'Scroll To Top' );
		watch_store_shop_customizer_label( 'watch_store_shop_scroll_top_position', 'Scroll to top Position' );
		watch_store_shop_customizer_label( 'watch_store_shop_products_per_row', 'woocommerce Setting' );
		watch_store_shop_customizer_label( 'watch_store_shop_width_option', 'Site Width Layouts' );
		watch_store_shop_customizer_label( 'watch_store_shop_nav_menu_text_transform', 'Nav Menus Text Transform' );

		// Colors
		watch_store_shop_customizer_label( 'watch_store_shop_theme_color', 'Theme Color' );
		watch_store_shop_customizer_label( 'background_color', 'Colors' );
		watch_store_shop_customizer_label( 'background_image', 'Image' );

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

		// Header 
		watch_store_shop_customizer_label( 'watch_store_shop_header_search_setting', 'Search' );
		watch_store_shop_customizer_label( 'watch_store_shop_header_btn_text', 'Header Button' );

		//Slider
		watch_store_shop_customizer_label( 'watch_store_shop_banner_section_setting', 'Banner' );
		watch_store_shop_customizer_label( 'watch_store_shop_banner_review_head', 'Client Review' );

		//Products
		watch_store_shop_customizer_label( 'watch_store_shop_service_section', 'Service Section' );

		//Footer
		watch_store_shop_customizer_label( 'watch_store_shop_footer_widget_content_alignment', 'Footer' );
		watch_store_shop_customizer_label( 'watch_store_shop_show_hide_copyright', 'Copyright' );

		//Post setting
		watch_store_shop_customizer_label( 'watch_store_shop_post_page_title', 'Post Settings' );

		//Single post setting
		watch_store_shop_customizer_label( 'watch_store_shop_single_post_page_content', 'Single Post Settings' );
	

	});

})( jQuery );
