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

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

			// Global Color Setting

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

			// General Setting

			if ( id === 'indoor_sports_zone_scroll_hide' || id === 'indoor_sports_zone_preloader_hide' || id === 'indoor_sports_zone_sticky_header' || id === 'indoor_sports_zone_products_per_row' || id === 'indoor_sports_zone_width_option' || id === 'indoor_sports_zone_nav_menu_text_transform')  {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-indoor_sports_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Colors

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

			// Header Image

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

			//  Header

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

			// Slider

			if ( id === 'indoor_sports_zone_slider_number' || id=== 'indoor_sports_zone_slide_image1' || id=== 'indoor_sports_zone_slide_image2' || id=== 'indoor_sports_zone_slide_image3 ' || id=== 'indoor_sports_zone_slide_image4 ' || id=== 'indoor_sports_zone_slide_image5' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-indoor_sports_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Services

			if ( id === 'indoor_sports_zone_services_short_heading' || id === 'indoor_sports_zone_about_us_counter_icon' || id === 'indoor_sports_zone_about_us_counter_icon_1' || id === 'indoor_sports_zone_about_us_counter_icon_2' ) {
				$( '#customize-control-'+ id ).before('<li class="tab-title customize-control">'+ title  +'</li>');
			} else {
				$( '#customize-control-indoor_sports_zone_options-'+ id ).before('<li class="tab-title customize-control">'+ title +'</li>');
			}

			// Footer

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

			// Post Setting

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

			// Single Post Setting

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

		// Social Icon
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_facebook_icon', 'Facebook' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_twitter_icon', 'Twitter' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_intagram_icon', 'Intagram' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_linkedin_icon', 'Linkedin' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_pintrest_icon', 'Pintrest' );

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

		// Global Color Setting
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_global_color', 'Global Color' );

		// General Setting
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_preloader_hide', 'Preloader' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_sticky_header', 'Sticky Header' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_scroll_hide', 'Scroll To Top' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_products_per_row', 'woocommerce Setting' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_width_option', 'Site Width Layouts' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_nav_menu_text_transform', 'Nav Menus Text Transform' );

		// Colors
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_theme_color', 'Theme Color' );
		indoor_sports_zone_customizer_label( 'background_color', 'Colors' );
		indoor_sports_zone_customizer_label( 'background_image', 'Image' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_heading_color', 'Heading Typography' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_paragraph_color', 'Paragraph Typography' );

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

		indoor_sports_zone_customizer_label( 'indoor_sports_zone_post_layout', 'Post Layouts Settings' );

		indoor_sports_zone_customizer_label( 'indoor_sports_zone_404_page_main_heading', '404 Page Settings' );

		// Header
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_header_button_text', 'Header Button' );

		//Slider
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slider_number', 'Slider' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slide_image1', 'Slide 1' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slide_image2', 'Slide 2' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slide_image3', 'Slide 3' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slide_image4', 'Slide 4' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_slide_image5', 'Slide 5' );

		//Services
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_services_short_heading', 'Services' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_about_us_counter_icon', 'Counter Box 1' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_about_us_counter_icon_1', 'Counter Box 2' );
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_about_us_counter_icon_2', 'Counter Box 3' );

		//Footer
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_footer_bg_image', 'Footer' );

		// Post Setting
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_post_page_title', 'Post Setting' );

		//Single Post Setting
		indoor_sports_zone_customizer_label( 'indoor_sports_zone_single_post_thumb', 'Single Post Setting' );

	});

})( jQuery );
