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

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

			// General Setting

			if ( id === 'pet_care_zone_scroll_hide' || id === 'pet_care_zone_preloader_hide' || id === 'pet_care_zone_sticky_header' || id === 'pet_care_zone_products_per_row')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pet_care_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Social Icon

			if ( id === 'pet_care_zone_facebook_icon' || id === 'pet_care_zone_twitter_icon' || id === 'pet_care_zone_intagram_icon'|| id === 'pet_care_zone_linkedin_icon'|| id === 'pet_care_zone_pintrest_icon' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pet_care_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			//  Header

			if ( id === 'pet_care_zone_email' || id === 'pet_care_zone_topbar_timming' || id === 'pet_care_zone_top_header_text' || id === 'pet_care_zone_header_search_setting' || id === 'pet_care_zone_header_button' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-pet_care_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Courses

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// General Setting
		pet_care_zone_customizer_label( 'pet_care_zone_preloader_hide', 'Preloader' );
		pet_care_zone_customizer_label( 'pet_care_zone_scroll_hide', 'Scroll To Top' );
		pet_care_zone_customizer_label( 'pet_care_zone_products_per_row', 'woocommerce Setting' );

		// Colors
		pet_care_zone_customizer_label( 'pet_care_zone_theme_color', 'Theme Color' );
		pet_care_zone_customizer_label( 'background_color', 'Colors' );
		pet_care_zone_customizer_label( 'background_image', 'Image' );

		// Social Icon
		pet_care_zone_customizer_label( 'pet_care_zone_facebook_icon', 'Facebook' );
		pet_care_zone_customizer_label( 'pet_care_zone_twitter_icon', 'Twitter' );
		pet_care_zone_customizer_label( 'pet_care_zone_intagram_icon', 'Intagram' );
		pet_care_zone_customizer_label( 'pet_care_zone_linkedin_icon', 'Linkedin' );
		pet_care_zone_customizer_label( 'pet_care_zone_pintrest_icon', 'Pintrest' );

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

		// Header
		pet_care_zone_customizer_label( 'pet_care_zone_topbar_timming', 'Timing' );
		pet_care_zone_customizer_label( 'pet_care_zone_top_header_text', 'Topbar Text' );
		pet_care_zone_customizer_label( 'pet_care_zone_email', 'Email' );
		pet_care_zone_customizer_label( 'pet_care_zone_header_search_setting', 'Search Header' );
		pet_care_zone_customizer_label( 'pet_care_zone_header_button', 'Header Button' );

		//Slider
		pet_care_zone_customizer_label( 'pet_care_zone_slider_section_setting', 'Slider' );

		//Courses
		pet_care_zone_customizer_label( 'cat_walking_services_content', 'Courses' );

		//Footer
		pet_care_zone_customizer_label( 'pet_care_zone_footer_widget_content_alignment', 'Footer' );
		pet_care_zone_customizer_label( 'pet_care_zone_show_hide_copyright', 'Copyright' );

		//Post setting
		pet_care_zone_customizer_label( 'pet_care_zone_post_page_title', 'Post Settings' );

		//Single post setting
		pet_care_zone_customizer_label( 'pet_care_zone_single_post_page_content', 'Single Post Settings' );
	});

})( jQuery );
