<?php
/**
 * negocio-business: Customizer
 *
 * @subpackage negocio-business
 * @since 1.0
 */

function negocio_business_customize_register( $wp_customize ) {

	$wp_customize->add_setting('negocio_business_logo_size',array(
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_logo_size',array(
		'type' => 'range',
		'label' => __('Logo Size','negocio-business'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('negocio_business_logo_padding',array(
		'sanitize_callback'	=> 'esc_html'
	));
	$wp_customize->add_control('negocio_business_logo_padding',array(
		'label' => __('Logo Padding','negocio-business'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('negocio_business_logo_top_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_logo_top_padding',array(
		'type' => 'number',
		'description' => __('Top','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('negocio_business_logo_bottom_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_logo_bottom_padding',array(
		'type' => 'number',
		'description' => __('Bottom','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('negocio_business_logo_left_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_logo_left_padding',array(
		'type' => 'number',
		'description' => __('Left','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('negocio_business_logo_right_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_logo_right_padding',array(
		'type' => 'number',
		'description' => __('Right','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting('negocio_business_show_site_title',array(
		'default' => true,
		'sanitize_callback'	=> 'negocio_business_sanitize_checkbox'
	));
	$wp_customize->add_control('negocio_business_show_site_title',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Title','negocio-business'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('negocio_business_site_title_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_site_title_font_size',array(
		'type' => 'number',
		'label' => __('Site Title Font Size','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting( 'negocio_business_site_title_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_site_title_color', array(
		'label' => 'Title Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_setting('negocio_business_show_tagline',array(
		'default' => true,
		'sanitize_callback'	=> 'negocio_business_sanitize_checkbox'
	));
	$wp_customize->add_control('negocio_business_show_tagline',array(
		'type' => 'checkbox',
		'label' => __('Show / Hide Site Tagline','negocio-business'),
		'section' => 'title_tagline'
	));

	$wp_customize->add_setting('negocio_business_site_tagline_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_site_tagline_font_size',array(
		'type' => 'number',
		'label' => __('Site Tagline Font Size','negocio-business'),
		'section' => 'title_tagline',
	));

	$wp_customize->add_setting( 'negocio_business_site_tagline_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_site_tagline_color', array(
		'label' => 'Tagline Color',
		'section' => 'title_tagline',
	)));

	$wp_customize->add_panel( 'negocio_business_panel_id', array(
		'priority' => 10,
		'capability' => 'edit_theme_options',
		'theme_supports' => '',
		'title' => __( 'Theme Settings', 'negocio-business' ),
		'description' => __( 'Description of what this panel does.', 'negocio-business' ),
	) );

	$wp_customize->add_section( 'negocio_business_theme_options_section', array(
    	'title'      => __( 'General Settings', 'negocio-business' ),
		'priority'   => 30,
		'panel' => 'negocio_business_panel_id'
	) );

	// Add Settings and Controls for Layout
	$wp_customize->add_setting('negocio_business_theme_options',array(
		'default' => 'Right Sidebar',
		'sanitize_callback' => 'negocio_business_sanitize_choices'
	));

	$wp_customize->add_control('negocio_business_theme_options',array(
		'type' => 'radio',
		'label' => __('Do you want this section','negocio-business'),
		'section' => 'negocio_business_theme_options_section',
		'choices' => array(
		   'Left Sidebar' => __('Left Sidebar','negocio-business'),
		   'Right Sidebar' => __('Right Sidebar','negocio-business'),
		   'One Column' => __('One Column','negocio-business'),
		   'Three Columns' => __('Three Columns','negocio-business'),
		   'Four Columns' => __('Four Columns','negocio-business'),
		   'Grid Layout' => __('Grid Layout','negocio-business')
		),
	));

	$wp_customize->add_setting( 'negocio_business_boxfull_width', array(
		'default'           => '',
		'sanitize_callback' => 'negocio_business_sanitize_choices'
	));
	
	$wp_customize->add_control( 'negocio_business_boxfull_width', array(
		'label'    => __( 'Section Width', 'negocio-business' ),
		'section'  => 'negocio_business_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'container'  => __('Box Width', 'negocio-business'),
			'container-fluid' => __('Full Width', 'negocio-business'),
			'none' => __('None', 'negocio-business')
		),
	));

	$wp_customize->add_setting( 'negocio_business_dropdown_anim', array(
		'default'           => 'None',
		'sanitize_callback' => 'negocio_business_sanitize_choices'
	));
	$wp_customize->add_control( 'negocio_business_dropdown_anim', array(
		'label'    => __( 'Menu Dropdown Animations', 'negocio-business' ),
		'section'  => 'negocio_business_theme_options_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInUp'  => __('bounceInUp', 'negocio-business'),
			'fadeInUp' => __('fadeInUp', 'negocio-business'),
			'zoomIn'    => __('zoomIn', 'negocio-business'),
			'None'    => __('None', 'negocio-business')
		),
	));

	// Top Bar
	$wp_customize->add_section( 'negocio_business_contact_details', array(
    	'title'      => __( 'Top Bar', 'negocio-business' ),
		'priority'   => null,
		'panel' => 'negocio_business_panel_id'
	) );

	$wp_customize->add_setting('negocio_business_hide_show_topbar',array(
    	'default' => false,
    	'sanitize_callback'	=> 'negocio_business_sanitize_checkbox'
	));
	$wp_customize->add_control('negocio_business_hide_show_topbar',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Topbar','negocio-business'),
   	'section' => 'negocio_business_contact_details',
	));

	$wp_customize->add_setting('negocio_business_welcome',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_welcome',array(
		'label'	=> __('Welcome Text','negocio-business'),
		'section'=> 'negocio_business_contact_details',
		'setting'=> 'negocio_business_welcome',
		'type'=> 'text'
	));
	
	$wp_customize->add_setting('negocio_business_call',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_call',array(
		'label'	=> __('Phone Text','negocio-business'),
		'section'=> 'negocio_business_contact_details',
		'setting'=> 'negocio_business_call',
		'type'=> 'text'
	));

	$wp_customize->add_setting('negocio_business_call1',array(
		'default'=> '',
		'sanitize_callback'	=> 'negocio_business_sanitize_phone_number'
	));	
	$wp_customize->add_control('negocio_business_call1',array(
		'label'	=> __('Phone Number','negocio-business'),
		'section'=> 'negocio_business_contact_details',
		'setting'=> 'negocio_business_call1',
		'type'=> 'text'
	));

	$wp_customize->add_setting('negocio_business_email',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_email',array(
		'label'	=> __('Email Text','negocio-business'),
		'section'=> 'negocio_business_contact_details',
		'setting'=> 'negocio_business_email',
		'type'=> 'text'
	));

	$wp_customize->add_setting('negocio_business_email1',array(
		'default'=> '',
		'sanitize_callback'	=> 'sanitize_email'
	));	
	$wp_customize->add_control('negocio_business_email1',array(
		'label'	=> __('Email Address','negocio-business'),
		'section'=> 'negocio_business_contact_details',
		'setting'=> 'negocio_business_email1',
		'type'=> 'text'
	));

	$wp_customize->add_setting('negocio_business_btn_text',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_btn_text',array(
		'label'	=> __('Add Button Text','negocio-business'),
		'section'	=> 'negocio_business_contact_details',
		'setting'	=> 'negocio_business_btn_text',
		'type'	=> 'text'
	));

	$wp_customize->add_setting('negocio_business_btn_link',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('negocio_business_btn_link',array(
		'label'	=> __('Add Button Link','negocio-business'),
		'section'	=> 'negocio_business_contact_details',
		'setting'	=> 'negocio_business_btn_link',
		'type'	=> 'url'
	));

	$wp_customize->add_setting( 'negocio_business_hdrtext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrtext_color', array(
		'label' => 'Text Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdricon_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdricon_color', array(
		'label' => 'Icon Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdriconbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdriconbg_color', array(
		'label' => 'Icon Bg Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrtopbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrtopbg_color', array(
		'label' => 'Top Bg Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrmiddlebg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrmiddlebg_color', array(
		'label' => 'Middle Bg Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrmenu_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrmenu_color', array(
		'label' => 'Menu Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrbtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrbtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrbtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'negocio_business_contact_details',
	)));

	$wp_customize->add_setting( 'negocio_business_hdrbottombg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_hdrbottombg_color', array(
		'label' => 'Bottom Bg Color',
		'section' => 'negocio_business_contact_details',
	)));

	//social icons
	$wp_customize->add_section( 'negocio_business_social', array(
    	'title'      => __( 'Social Icons', 'negocio-business' ),
		'priority'   => null,
		'panel' => 'negocio_business_panel_id'
	) );

	$wp_customize->add_setting('negocio_business_facebook_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('negocio_business_facebook_url',array(
		'label'	=> __('Add Facebook link','negocio-business'),
		'section'	=> 'negocio_business_social',
		'setting'	=> 'negocio_business_facebook_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('negocio_business_twitter_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('negocio_business_twitter_url',array(
		'label'	=> __('Add Twitter link','negocio-business'),
		'section'	=> 'negocio_business_social',
		'setting'	=> 'negocio_business_twitter_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('negocio_business_insta_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));	
	$wp_customize->add_control('negocio_business_insta_url',array(
		'label'	=> __('Add Instagram link','negocio-business'),
		'section'	=> 'negocio_business_social',
		'setting'	=> 'negocio_business_insta_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting('negocio_business_linkedin_url',array(
		'default'	=> '',
		'sanitize_callback'	=> 'esc_url_raw'
	));
	$wp_customize->add_control('negocio_business_linkedin_url',array(
		'label'	=> __('Add Linkedin link','negocio-business'),
		'section'	=> 'negocio_business_social',
		'setting'	=> 'negocio_business_linkedin_url',
		'type'	=> 'url'
	));

	$wp_customize->add_setting( 'negocio_business_social_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_social_color', array(
		'label' => 'Icon Color',
		'section' => 'negocio_business_social',
	)));

	$wp_customize->add_setting( 'negocio_business_socialbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_socialbg_color', array(
		'label' => 'Icon Bg Color',
		'section' => 'negocio_business_social',
	)));
	
	//home page slider
	$wp_customize->add_section( 'negocio_business_slider_section' , array(
    	'title'      => __( 'Slider Settings', 'negocio-business' ),
		'priority'   => null,
		'panel' => 'negocio_business_panel_id'
	) );

	$wp_customize->add_setting('negocio_business_slider_hide_show',array(
    	'default' => false,
    	'sanitize_callback'	=> 'negocio_business_sanitize_checkbox'
	));
	$wp_customize->add_control('negocio_business_slider_hide_show',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide slider','negocio-business'),
   	'description' => __('Image Size ( 1600px x 582px )','negocio-business'),
   	'section' => 'negocio_business_slider_section',
	));

	$wp_customize->add_setting( 'negocio_business_slider_effect', array(
		'default'           => '',
		'sanitize_callback' => 'negocio_business_sanitize_choices'
	));
	$wp_customize->add_control( 'negocio_business_slider_effect', array(
		'label'    => __( 'Onload Transactions Effects', 'negocio-business' ),
		'section'  => 'negocio_business_slider_section',
		'type'     => 'select',
		'choices'  => array(
			'bounceInLeft'  => __('bounceInLeft', 'negocio-business'),
			'bounceInRight' => __('bounceInRight', 'negocio-business'),
			'bounceInUp'    => __('bounceInUp', 'negocio-business'),
			'bounceInDown'    => __('bounceInDown', 'negocio-business'),
			'zoomIn'  => __('zoomIn', 'negocio-business'),
			'zoomOut' => __('zoomOut', 'negocio-business'),
			'fadeInDown'    => __('fadeInDown', 'negocio-business'),
			'fadeInUp'    => __('fadeInUp', 'negocio-business'),
			'fadeInLeft'  => __('fadeInLeft', 'negocio-business'),
			'fadeInRight' => __('fadeInRight', 'negocio-business'),
			'flip-up'    => __('flip-up', 'negocio-business'),
			'none'    => __('none', 'negocio-business')
		),
	));

	for ( $count = 1; $count <= 4; $count++ ) {
		$wp_customize->add_setting( 'negocio_business_slider' . $count, array(
			'default'           => '',
			'sanitize_callback' => 'negocio_business_sanitize_dropdown_pages'
		) );
		$wp_customize->add_control( 'negocio_business_slider' . $count, array(
			'label'    => __( 'Select Slide Image Page', 'negocio-business' ),
			'section'  => 'negocio_business_slider_section',
			'type'     => 'dropdown-pages'
		) );
	}
	
	$wp_customize->add_setting('negocio_business_slider_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_slider_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','negocio-business'),
		'section' => 'negocio_business_slider_section',
	));

	$wp_customize->add_setting( 'negocio_business_slider_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_slider_color', array(
		'label' => 'Title Color',
		'section' => 'negocio_business_slider_section',
	)));

	$wp_customize->add_setting( 'negocio_business_sliderbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_sliderbg_color', array(
		'label' => 'Title Bg Color',
		'section' => 'negocio_business_slider_section',
	)));

	$wp_customize->add_setting( 'negocio_business_sliderbdr_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_sliderbdr_color', array(
		'label' => 'Title Border Color',
		'section' => 'negocio_business_slider_section',
	)));

	$wp_customize->add_setting( 'negocio_business_sliderbtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_sliderbtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'negocio_business_slider_section',
	)));

	$wp_customize->add_setting( 'negocio_business_sliderbtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_sliderbtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'negocio_business_slider_section',
	)));

	$wp_customize->add_setting( 'negocio_business_slidernp_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_slidernp_color', array(
		'label' => 'Next/Pre Arrow Color',
		'section' => 'negocio_business_slider_section',
	)));

	//about section
	$wp_customize->add_section('negocio_business_about',array(
		'title'	=> __('About','negocio-business'),
		'description'	=> __('<b>Note :</b> This section will appear below the slider.','negocio-business'),
		'panel' => 'negocio_business_panel_id',
	));

	$wp_customize->add_setting( 'negocio_business_about_page', array(
		'default'           => '',
		'sanitize_callback' => 'negocio_business_sanitize_dropdown_pages'
	) );
	$wp_customize->add_control( 'negocio_business_about_page', array(
		'label'    => __( 'Select About Page', 'negocio-business' ),
		'section'  => 'negocio_business_about',
		'type'     => 'dropdown-pages'
	) );

	$wp_customize->add_setting('negocio_business_about_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_about_font_size',array(
		'type' => 'number',
		'label' => __('Title Font Size','negocio-business'),
		'section' => 'negocio_business_about',
	));

	$wp_customize->add_setting('negocio_business_about_text_font_size',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_about_text_font_size',array(
		'type' => 'number',
		'label' => __('Text Font Size','negocio-business'),
		'section' => 'negocio_business_about',
	));

	$wp_customize->add_setting( 'negocio_business_abouttitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_abouttitle_color', array(
		'label' => 'Title Color',
		'section' => 'negocio_business_about',
	)));

	$wp_customize->add_setting( 'negocio_business_abouttext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_abouttext_color', array(
		'label' => 'Text Color',
		'section' => 'negocio_business_about',
	)));

	//	Our Services
	$wp_customize->add_section('negocio_business_service',array(
		'title'	=> __('Our Services','negocio-business'),
		'description'=> __('<b>Note :</b> This section will appear below the about.','negocio-business'),
		'panel' => 'negocio_business_panel_id',
	));
	
	$wp_customize->add_setting('negocio_business_title',array(
		'default'	=> '',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_title',array(
		'label'	=> __('Section Title','negocio-business'),
		'section'	=> 'negocio_business_service',
		'setting'	=> 'negocio_business_title',
		'type'		=> 'text'
	));

	$categories = get_categories();
	$cats = array();
	$i = 0;
	$cat_pst[]= 'select';
	foreach($categories as $category){
		if($i==0){
			$default = $category->slug;
			$i++;
		}
		$cat_pst[$category->slug] = $category->name;
	}

	$wp_customize->add_setting('negocio_business_cat',array(
		'default'	=> 'select',
		'sanitize_callback' => 'negocio_business_sanitize_choices',
	));
	$wp_customize->add_control('negocio_business_cat',array(
		'type'    => 'select',
		'choices' => $cat_pst,
		'label' => __('Select Category to display Post','negocio-business'),
		'section' => 'negocio_business_service',
	));

	$wp_customize->add_setting('negocio_business_img_hight',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
	));
	$wp_customize->add_control('negocio_business_img_hight',array(
		'type' => 'number',
		'label' => __('Image Hight','negocio-business'),
		'section' => 'negocio_business_service',
	));

	$wp_customize->add_setting('negocio_business_service_section_padding',array(
       'default' => '',
       'sanitize_callback'	=> 'negocio_business_sanitize_float'
    ));
    $wp_customize->add_control('negocio_business_service_section_padding',array(
       'type' => 'number',
       'label' => __('Section Top Bottom Padding','negocio-business'),
       'section' => 'negocio_business_service',
    ));

	$wp_customize->add_setting( 'negocio_business_serviceheading_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_serviceheading_color', array(
		'label' => 'Heading Color',
		'section' => 'negocio_business_service',
	)));

	$wp_customize->add_setting( 'negocio_business_servicetitle_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_servicetitle_color', array(
		'label' => 'Title Color',
		'section' => 'negocio_business_service',
	)));

	$wp_customize->add_setting( 'negocio_business_servicetext_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_servicetext_color', array(
		'label' => 'Text Color',
		'section' => 'negocio_business_service',
	)));

	$wp_customize->add_setting( 'negocio_business_servicebtn_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_servicebtn_color', array(
		'label' => 'Button Text Color',
		'section' => 'negocio_business_service',
	)));

	$wp_customize->add_setting( 'negocio_business_servicebtnbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_servicebtnbg_color', array(
		'label' => 'Button Bg Color',
		'section' => 'negocio_business_service',
	)));

	//Footer
    $wp_customize->add_section( 'negocio_business_footer', array(
    	'title'      => __( 'Footer Setting', 'negocio-business' ),
		'priority'   => null,
		'panel' => 'negocio_business_panel_id'
	) );

	$wp_customize->add_setting('negocio_business_show_back_totop',array(
 		'default' => true,
   	'sanitize_callback'	=> 'negocio_business_sanitize_checkbox'
	));
	$wp_customize->add_control('negocio_business_show_back_totop',array(
   	'type' => 'checkbox',
   	'label' => __('Show / Hide Back to Top','negocio-business'),
   	'section' => 'negocio_business_footer'
	));

 	$wp_customize->add_setting('negocio_business_footer_copy',array(
		'default'	=> 'Business WordPress Theme By Luzuk',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_footer_copy',array(
		'label'	=> __('Copyright Text','negocio-business'),
		'section'	=> 'negocio_business_footer',
		'setting'	=> 'negocio_business_footer_copy',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('negocio_business_footer_copylink',array(
		'default'	=> 'https://www.luzuk.com/products/free-wordpress-business-theme/',
		'sanitize_callback'	=> 'sanitize_text_field'
	));	
	$wp_customize->add_control('negocio_business_footer_copylink',array(
		'label'	=> __('Copyright Link','negocio-business'),
		'section'	=> 'negocio_business_footer',
		'setting'	=> 'negocio_business_footer_copylink',
		'type'		=> 'text'
	));

	$wp_customize->add_setting('negocio_business_copyright_padding',array(
		'default' => '',
		'sanitize_callback'	=> 'negocio_business_sanitize_float'
 	));
 	$wp_customize->add_control('negocio_business_copyright_padding',array(
		'type' => 'number',
		'label' => __('Copyright Top Bottom Padding','negocio-business'),
		'section' => 'negocio_business_footer',
	));

	$wp_customize->add_setting( 'negocio_business_footer_widgets_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_footer_widgets_color', array(
		'label' => 'Footer Widgets Color',
		'section' => 'negocio_business_footer',
	)));

	$wp_customize->add_setting( 'negocio_business_footer_widgets_menus_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_footer_widgets_menus_color', array(
		'label' => 'Footer Menus Color',
		'section' => 'negocio_business_footer',
	)));

	$wp_customize->add_setting( 'negocio_business_copyright_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_copyright_color', array(
		'label' => 'Copyright Text Color',
		'section' => 'negocio_business_footer',
	)));

	$wp_customize->add_setting( 'negocio_business_copyrightbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_copyrightbg_color', array(
		'label' => 'Copyright Background Color',
		'section' => 'negocio_business_footer',
	)));

	$wp_customize->add_setting( 'negocio_business_footerbg_color', array(
		'default' => '',
		'sanitize_callback' => 'sanitize_hex_color'
	));
	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'negocio_business_footerbg_color', array(
		'label' => 'Footer Overlay Color',
		'section' => 'negocio_business_footer',
	)));

	$wp_customize->get_setting( 'blogname' )->transport          = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';

	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => 'negocio_business_customize_partial_blogname',
	) );
	$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
		'selector' => '.site-description',
		'render_callback' => 'negocio_business_customize_partial_blogdescription',
	) );
}
add_action( 'customize_register', 'negocio_business_customize_register' );

function negocio_business_customize_partial_blogname() {
	bloginfo( 'name' );
}

function negocio_business_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

function negocio_business_is_static_front_page() {
	return ( is_front_page() && ! is_home() );
}

function negocio_business_is_view_with_layout_option() {
	// This option is available on all pages. It's also available on archives when there isn't a sidebar.
	return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
}

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Negocio_Business_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $instance = null;

		if ( is_null( $instance ) ) {
			$instance = new self;
			$instance->setup_actions();
		}

		return $instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $manager
	 * @return void
	 */
	public function sections( $manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );

		// Register custom section types.
		$manager->register_section_type( 'Negocio_Business_Customize_Section_Pro' );

		// Register sections.
		$manager->add_section(
			new Negocio_Business_Customize_Section_Pro(
				$manager,
				'negocio_business_example_1',
				array(
					'priority' => 9,
					'title'    => esc_html__( 'Business Pro Theme', 'negocio-business' ),
					'pro_text' => esc_html__( 'Go Pro','negocio-business' ),
					'pro_url'  => esc_url( 'https://www.luzuk.com/products/wordpress-business-theme/' ),
				)
			)
		);
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'negocio-business-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'negocio-business-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
Negocio_Business_Customize::get_instance();