<?php if( ! defined( 'ABSPATH' ) ) exit;

	function baw_social_section () { ?>
		
			<div <?php if(get_theme_mod( 'social_media_activate' )){ ?> style="float: none;"<?php } ?> class="fa-icons">
			
				<?php if (get_theme_mod( 'baw_facebook' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' )) == "_blank"){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_facebook' )); ?>"><i class="fa fa-facebook-f"></i></a>
				<?php endif; ?>
							
				<?php if (get_theme_mod( 'baw_twitter' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_twitter' )) ?>"><i class="fa fa-twitter"></i></a>
				<?php endif; ?>
											
				<?php if (get_theme_mod( 'baw_google' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_google' )); ?>"><i class="fa fa-google-plus"></i></a>
				<?php endif; ?>
															
				<?php if (get_theme_mod( 'baw_youtube' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_youtube' )); ?>"><i class="fa fa-youtube"></i></a>
				<?php endif; ?>
																			
				<?php if (get_theme_mod( 'baw_vimeo' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_vimeo' )); ?>"><i class="fa fa-vimeo"></i></a>
				<?php endif; ?>
																			
				<?php if (get_theme_mod( 'baw_pinterest' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_pinterest' )); ?>"><i class="fa fa-pinterest"></i></a>
				<?php endif; ?>	
				
				<?php if (get_theme_mod( 'baw_instagram' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_instagram' )); ?>"><i class="fa fa-instagram" aria-hidden="true"></i></a>
				<?php endif; ?>
																			
				<?php if (get_theme_mod( 'baw_linkedin' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_linkedin' )); ?>"><i class="fa fa-linkedin"></i></a>
				<?php endif; ?>
																			
				<?php if (get_theme_mod( 'baw_rss' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_rss' )); ?>"><i class="fa fa-rss"></i></a>
				<?php endif; ?>
																			
				<?php if (get_theme_mod( 'baw_stumbleupon' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_stumbleupon' )); ?>"><i class="fa fa-stumbleupon"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_flickr' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_flickr' )); ?>"><i class="fa fa-flickr" aria-hidden="true"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_dribbble' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_dribbble' )); ?>"><i class="fa fa-dribbble"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_digg' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_digg' )); ?>"><i class="fa fa-digg"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_skype' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_skype' )); ?>"><i class="fa fa-skype"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_deviantart' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_deviantart' )); ?>"><i class="fa fa-deviantart"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_yahoo' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_yahoo' )); ?>"><i class="fa fa-yahoo"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_reddit_alien' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_reddit_alien' )); ?>"><i class="fa fa-reddit-alien"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_paypal' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_paypal' )); ?>"><i class="fa fa-paypal"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_dropbox' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_dropbox' )); ?>"><i class="fa fa-dropbox"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_soundcloud' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_soundcloud' )); ?>"><i class="fa fa-soundcloud"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_vk' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_vk' )); ?>"><i class="fa fa-vk"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_envelope' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_envelope' )); ?>"><i class="fa fa-envelope"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_book' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_book' )); ?>"><i class="fa fa-address-book" aria-hidden="true"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_apple' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_apple' )); ?>"><i class="fa fa-apple"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_amazon' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_amazon' )); ?>"><i class="fa fa-amazon"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_slack' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_slack' )); ?>"><i class="fa fa-slack"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_slideshare' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_slideshare' )); ?>"><i class="fa fa-slideshare"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_wikipedia' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_wikipedia' )); ?>"><i class="fa fa-wikipedia-w"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_wordpress' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_wordpress' )); ?>"><i class="fa fa-wordpress"></i></a>
				<?php endif; ?>
																							
				<?php if (get_theme_mod( 'baw_address_odnoklassniki' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_odnoklassniki' )); ?>"><i class="fa fa-odnoklassniki"></i></a>
				<?php endif; ?>
																											
				<?php if (get_theme_mod( 'baw_address_tumblr' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_tumblr' )); ?>"><i class="fa fa-tumblr"></i></a>
				<?php endif; ?>

				<?php if (get_theme_mod( 'baw_address_github' )) : ?>
					<a target="<?php if(esc_attr(get_theme_mod( 'baw_social_link_type' ))){echo esc_attr(get_theme_mod( 'baw_social_link_type' )); } else {echo "_self"; } ?>" href="<?php echo esc_url(get_theme_mod( 'baw_address_github' )); ?>"><i class="fa fa-github-alt" aria-hidden="true"></i></a>
				<?php endif; ?>	
				
			</div>
		
<?php } 

	function sanitize_social( $input ) {
		$valid = array(
				'' => esc_attr__( ' ', 'baw' ),
				'_self' => esc_attr__( 'Self', 'baw' ),
				'_blank' => esc_attr__( 'Blank', 'baw' ),
			);
		
		if ( array_key_exists( $input, $valid ) ) {
			return $input;
		} else {
			return '';
		}
	}
	
function baw_customize_register_social( $wp_customize ) {
 
		$wp_customize->add_section( 'baw_social_section' , array(
			'title'       => __( 'Social Media', 'baw' ),
			'description' => __( 'Social media buttons', 'baw' ),	
			'priority'       => 64,
		) );
		
 		$wp_customize->add_setting( 'social_media_activate', array (
            'default' => '',		
			'sanitize_callback' => 'baw_sanitize_checkbox',
		) );
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_media_activate', array(
			'label'    => __( 'Activate Social Icons in Footer', 'baw' ),
			'section'  => 'baw_social_section',
			'type' => 'checkbox',
		) ) );
		
 		$wp_customize->add_setting( 'baw_social_link_type', array (
			'sanitize_callback' => 'sanitize_social',
			'default'     => 'no',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_social_link_type', array(
			'label'    => __( 'Link Type', 'baw' ),
			'section'  => 'baw_social_section',
			'type'     =>  'select',
			'priority'    => 10,			
            'choices'  => array(
				'' => esc_attr__( ' ', 'baw' ),
				'_self' => esc_attr__( 'Self', 'baw' ),
				'_blank' => esc_attr__( 'Blank', 'baw' ),
            ),
		) ) );

   	    $wp_customize->add_setting( 'social_media_color', array (
			'sanitize_callback' => 'sanitize_hex_color',
		) );
 		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'social_media_color', array(
			'label'    => __( 'Social Icons Color', 'baw' ),
			'section'  => 'baw_social_section',
		) ) );
		
   	    $wp_customize->add_setting( 'social_media_hover_color', array (
			'sanitize_callback' => 'sanitize_hex_color',
		) );
 		$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'social_media_hover_color', array(
			'label'    => __( 'Social Icons Hover Color', 'baw' ),
			'section'  => 'baw_social_section',
		) ) );


		$wp_customize->add_setting( 'baw_facebook', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_facebook', array(
			'label'    => __( 'Enter Facebook url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_twitter', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_twitter', array(
			'label'    => __( 'Enter Twitter url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_linkedin', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_linkedin', array(
			'label'    => __( 'Enter Linkedin url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_rss', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_rss', array(
			'label'    => __( 'Enter RSS url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_pinterest', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_pinterest', array(
			'label'    => __( 'Enter Pinterest url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_youtube', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_youtube', array(
			'label'    => __( 'Enter Youtube url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_vimeo', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_vimeo', array(
			'label'    => __( 'Enter Vimeo url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_instagram', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_instagram', array(
			'label'    => __( 'Enter Ynstagram url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_stumbleupon', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_stumbleupon', array(
			'label'    => __( 'Enter Stumbleupon url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_flickr', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_flickr', array(
			'label'    => __( 'Enter Flickr url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_dribbble', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_dribbble', array(
			'label'    => __( 'Enter Dribbble url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_digg', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_digg', array(
			'label'    => __( 'Enter Digg url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_skype', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_skype', array(
			'label'    => __( 'Enter Skype url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_deviantart', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_deviantart', array(
			'label'    => __( 'Enter Deviantart url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_yahoo', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_yahoo', array(
			'label'    => __( 'Enter Yahoo url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_reddit_alien', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_reddit_alien', array(
			'label'    => __( 'Enter Reddit Alien url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_paypal', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_paypal', array(
			'label'    => __( 'Enter Paypal url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_dropbox', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_dropbox', array(
			'label'    => __( 'Enter Dropbox url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'Soundcloud', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'Soundcloud', array(
			'label'    => __( 'Enter Soundcloud url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_vk', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_vk', array(
			'label'    => __( 'Enter VK url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_envelope', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_envelope', array(
			'label'    => __( 'Enter Envelope url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_address_book', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_book', array(
			'label'    => __( 'Enter Address Book url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_address_apple', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_apple', array(
			'label'    => __( 'Enter Apple url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_address_amazon', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_amazon', array(
			'label'    => __( 'Enter Amazon url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_address_slack', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_slack', array(
			'label'    => __( 'Enter Slack url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_address_slideshare', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_slideshare', array(
			'label'    => __( 'Enter Slideshare url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_address_wikipedia', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_wikipedia', array(
			'label'    => __( 'Enter Wikipedia url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );

		$wp_customize->add_setting( 'baw_address_wordpress', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_wordpress', array(
			'label'    => __( 'Enter WordPress url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_address_odnoklassniki', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_odnoklassniki', array(
			'label'    => __( 'Enter Odnoklassniki url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
				
		$wp_customize->add_setting( 'baw_address_tumblr', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_tumblr', array(
			'label'    => __( 'Enter Tumblr url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
		
		$wp_customize->add_setting( 'baw_address_github', array (
			'sanitize_callback' => 'esc_url_raw',
		) );
		
		$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'baw_address_github', array(
			'label'    => __( 'Enter GitHub url', 'baw' ),		
			'section'  => 'baw_social_section',
		) ) );
	
}
add_action( 'customize_register', 'baw_customize_register_social' );

/********************************************
* Social styles
*********************************************/ 	

function baw_social_method() {

        $social_media_color_mod = get_theme_mod( 'social_media_color' );
        $social_media_hover_color_mod = get_theme_mod( 'social_media_hover_color' );

		if($social_media_color_mod) { $social_media_color = ".social .fa-icons i, .social-top .fa {color: {$social_media_color_mod} !important;}";} else {$social_media_color ="";}
		if($social_media_hover_color_mod) { $social_media_hover_color = ".social .fa-icons i:hover, .social-top a:hover .fa {color: {$social_media_hover_color_mod} !important;}";} else {$social_media_hover_color ="";}

        wp_add_inline_style( 'black-and-white-style', 
		$social_media_color.$social_media_hover_color);
}
add_action( 'wp_enqueue_scripts', 'baw_social_method' );				
		