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

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

			// Global Color Setting

			if ( id === 'house_roofing_global_color' || id === 'house_roofing_heading_color' || id === 'house_roofing_paragraph_color') {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-house_roofing_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// General Setting

			if ( id === 'house_roofing_scroll_hide' || id === 'house_roofing_preloader_hide' || id === 'house_roofing_sticky_header' || id === 'house_roofing_products_per_row' || id === 'house_roofing_scroll_top_position' || id === 'house_roofing_products_per_row' || id === 'house_roofing_width_option' )  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-house_roofing_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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


			//  Header

			if ( id === 'house_roofing_header_button_text' || id === 'house_roofing_topbar_email_address' || id === 'house_roofing_topbar_timings' || id === 'house_roofing_topbar_locations' || id === 'house_roofing_topbar_phone_number' || id === 'house_roofing_topbar1_wishlist_url' || id === 'house_roofing_header_search_setting' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-house_roofing_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

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

			// Slider

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

			// Our Services

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// Global Color Setting
		house_roofing_customizer_label( 'house_roofing_global_color', 'Global Color' );
		house_roofing_customizer_label( 'house_roofing_heading_color', 'Heading Typography' );
		house_roofing_customizer_label( 'house_roofing_paragraph_color', 'Paragraph Typography' );

		// General Setting
		house_roofing_customizer_label( 'house_roofing_preloader_hide', 'Preloader' );
		house_roofing_customizer_label( 'house_roofing_scroll_hide', 'Scroll To Top' );
		house_roofing_customizer_label( 'house_roofing_scroll_top_position', 'Scroll to top Position' );
		house_roofing_customizer_label( 'house_roofing_products_per_row', 'woocommerce Setting' );
		house_roofing_customizer_label( 'house_roofing_width_option', 'Site Width Layouts' );

		// Colors
		house_roofing_customizer_label( 'house_roofing_theme_color', 'Theme Color' );
		house_roofing_customizer_label( 'background_color', 'Colors' );
		house_roofing_customizer_label( 'background_image', 'Image' );

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

		// Social Icon
		house_roofing_customizer_label( 'house_roofing_facebook_icon', 'Facebook' );
		house_roofing_customizer_label( 'house_roofing_twitter_icon', 'Twitter' );
		house_roofing_customizer_label( 'house_roofing_intagram_icon', 'Intagram' );
		house_roofing_customizer_label( 'house_roofing_linkedin_icon', 'Linkedin' );
		house_roofing_customizer_label( 'house_roofing_pintrest_icon', 'Pintrest' );

		// Header
		house_roofing_customizer_label( 'house_roofing_header_button_text', 'Header Button' );
		house_roofing_customizer_label( 'house_roofing_topbar_email_address', 'Email' );
		house_roofing_customizer_label( 'house_roofing_topbar_phone_number', 'Phone Number' );
		house_roofing_customizer_label( 'house_roofing_topbar_timings', 'Timing' );
		house_roofing_customizer_label( 'house_roofing_topbar_locations', 'Location' );

		// Header 
		house_roofing_customizer_label( 'house_roofing_header_search_setting', 'Search' );
		house_roofing_customizer_label( 'house_roofing_header_btn_text', 'Header Button' );

		//Slider
		house_roofing_customizer_label( 'house_roofing_slider_section_setting', 'Slider' );

		//Our Services
		house_roofing_customizer_label( 'house_roofing_activities_section_setting', 'Our Services' );

		//Footer
		house_roofing_customizer_label( 'house_roofing_footer_widget_content_alignment', 'Footer' );
		house_roofing_customizer_label( 'house_roofing_show_hide_copyright', 'Copyright' );

		//Post setting
		house_roofing_customizer_label( 'house_roofing_post_page_title', 'Post Settings' );

		//Single post setting
		house_roofing_customizer_label( 'house_roofing_single_post_page_content', 'Single Post Settings' );
	

	});

})( jQuery );
