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

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

			// General Setting

			if ( id === 'kindergarten_playschool_scroll_hide' || id === 'kindergarten_playschool_preloader_hide' || id === 'kindergarten_playschool_sticky_header' || id === 'kindergarten_playschool_products_per_row')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-kindergarten_playschool_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			//  Header

			if ( id === 'kindergarten_playschool_email' || id === 'kindergarten_playschool_location' || id === 'kindergarten_playschool_phone_number' || id === 'kindergarten_playschool_header_search_setting' || id === 'kindergarten_playschool_topbar1_wishlist_url' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-kindergarten_playschool_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}


			// Slider

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

			// Services

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

			// Footer

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

			// Post Settings

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

			// Single Post Settings

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

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

		// General Setting
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_preloader_hide', 'Preloader' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_sticky_header', 'Sticky Header' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_scroll_hide', 'Scroll To Top' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_products_per_row', 'woocommerce Setting' );

		// Colors
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_first_color', 'Global Color' );
		kindergarten_playschool_customizer_label( 'background_color', 'Colors' );
		kindergarten_playschool_customizer_label( 'background_image', 'Image' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_heading_color', 'Heading Typography' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_paragraph_color', 'Paragraph Typography' );

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

		kindergarten_playschool_customizer_label( 'kindergarten_playschool_post_layout', 'Post Layouts Settings' );

		kindergarten_playschool_customizer_label( 'kindergarten_playschool_404_page_main_heading', '404 Page Settings' );

		// Social Icon
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_facebook_icon', 'Facebook' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_twitter_icon', 'Twitter' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_intagram_icon', 'Intagram' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_linkedin_icon', 'Linkedin' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_pintrest_icon', 'Pintrest' );

		// Header
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_location', 'Location' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_phone_number', 'Phone Number' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_email', 'Email' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_header_search_setting', 'Search Header' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_topbar1_wishlist_url', 'Wishlist' );

		//Slider
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_slider_section_setting', 'Slider' );

		//Services
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_services_heading', 'Services' );

		//Footer
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_footer_widget_content_alignment', 'Footer' );
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_show_hide_copyright', 'Copyright' );

		//Post setting
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_post_page_title', 'Post Settings' );

		//Single post setting
		kindergarten_playschool_customizer_label( 'kindergarten_playschool_single_post_thumb', 'Single Post Settings' );
	

	});

})( jQuery );
