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

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

			// Global Color Setting

			if ( id === 'wooden_furniture_first_color' || id === 'wooden_furniture_heading_color' || id === 'wooden_furniture_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-wooden_furniture_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'wooden_furniture_scroll_hide' || id === 'wooden_furniture_preloader_hide' || id === 'wooden_furniture_sticky_header' || id === 'wooden_furniture_products_per_row' || id === 'wooden_furniture_width_option' )  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-wooden_furniture_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			// Social Icon

			if ( id === 'wooden_furniture_facebook_icon' || id === 'wooden_furniture_twitter_icon' || id === 'wooden_furniture_intagram_icon'|| id === 'wooden_furniture_linkedin_icon'|| id === 'wooden_furniture_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-wooden_furniture_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			//  Header

			if ( id === 'wooden_furniture_topbar_phone_text' || id === 'wooden_furniture_topbar_mail_text' || id === 'wooden_furniture_header_button_text' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-wooden_furniture_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Contact

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

			// Services

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		wooden_furniture_customizer_label( 'wooden_furniture_first_color', 'Global Color' );
		wooden_furniture_customizer_label( 'wooden_furniture_heading_color', 'Heading Typography' );
		wooden_furniture_customizer_label( 'wooden_furniture_paragraph_color', 'Paragraph Typography' );

		// General Setting
		wooden_furniture_customizer_label( 'wooden_furniture_preloader_hide', 'Preloader' );
		wooden_furniture_customizer_label( 'wooden_furniture_sticky_header', 'Sticky Header' );
		wooden_furniture_customizer_label( 'wooden_furniture_scroll_hide', 'Scroll To Top' );
		wooden_furniture_customizer_label( 'wooden_furniture_scroll_top_position', 'Scroll to top Position' );
		wooden_furniture_customizer_label( 'wooden_furniture_products_per_row', 'woocommerce Setting' );
		wooden_furniture_customizer_label( 'wooden_furniture_width_option', 'Site Width Layouts' );

		// Colors
		wooden_furniture_customizer_label( 'wooden_furniture_theme_color', 'Theme Color' );
		wooden_furniture_customizer_label( 'background_color', 'Colors' );
		wooden_furniture_customizer_label( 'background_image', 'Image' );

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

		wooden_furniture_customizer_label( 'wooden_furniture_post_layout', 'Post Layouts Settings' );

		wooden_furniture_customizer_label( 'wooden_furniture_404_page_main_heading', '404 Page Settings' );

		// Social Icon
		wooden_furniture_customizer_label( 'wooden_furniture_facebook_icon', 'Facebook' );
		wooden_furniture_customizer_label( 'wooden_furniture_twitter_icon', 'Twitter' );
		wooden_furniture_customizer_label( 'wooden_furniture_intagram_icon', 'Intagram' );
		wooden_furniture_customizer_label( 'wooden_furniture_linkedin_icon', 'Linkedin' );
		wooden_furniture_customizer_label( 'wooden_furniture_pintrest_icon', 'Pintrest' );

		// Header
		wooden_furniture_customizer_label( 'wooden_furniture_topbar_phone_text', 'Phone Number' );
		wooden_furniture_customizer_label( 'wooden_furniture_topbar_mail_text', 'Email Address' );
		wooden_furniture_customizer_label( 'wooden_furniture_header_button_text', 'Header Button' );

		//Slider
		wooden_furniture_customizer_label( 'wooden_furniture_top_slider_page1', 'Slider' );

		//Contact
		wooden_furniture_customizer_label( 'wooden_furniture_services_heading', 'Contact' );

		//Services
		wooden_furniture_customizer_label( 'wooden_furniture_services_sec_category', 'Services' );

		//Footer
		wooden_furniture_customizer_label( 'wooden_furniture_footer_text_setting', 'Footer' );

		//Footer
		wooden_furniture_customizer_label( 'wooden_furniture_footer_widget_content_alignment', 'Footer' );
		wooden_furniture_customizer_label( 'wooden_furniture_show_hide_copyright', 'Copyright' );

		//Post setting
		wooden_furniture_customizer_label( 'wooden_furniture_post_page_title', 'Post Settings' );

		//Single post setting
		wooden_furniture_customizer_label( 'wooden_furniture_single_post_thumb', 'Single Post Settings' );
	
	});

})( jQuery );
