<div class="section-site-branding">
	<div class="row">
		<div class="col-md-4">
			<?php
			echo '<div id="masthead" class="site-header" role="banner"  itemscope="itemscope" itemtype="http://schema.org/Brand">';
			if ( has_custom_logo() ) {
				if (function_exists('the_custom_logo')) {
					the_custom_logo();
				}
			} else {
				echo '<div class="site-branding">' . "\n";
					if (is_front_page()) {
						$header_title_before = '<h1 class="site-title"  itemprop="name">';
						$header_title_after = '</h1>' . "\n";
						$header_tagline_before = '<p class="site-description" itemprop="description">';
						$header_tagline_after = '</p>' . "\n";
					} else {
						$header_title_before = '<h2 class="site-title"  itemprop="name">';
						$header_title_after = '</h2>' . "\n";
						$header_tagline_before = '<p class="site-description"  itemprop="description">';
						$header_tagline_after = '</p>' . "\n";
					}
						if (get_bloginfo('name')) {
							echo wp_kses_post( $header_title_before ) . '<a href="'.  esc_url( home_url( '/' )) .'"  itemprop="url">'. esc_attr(get_bloginfo('name')) . '</a>'. wp_kses_post( $header_title_after );
						}
						if (get_bloginfo('description')) {
							echo wp_kses_post( $header_tagline_before ) . esc_attr(get_bloginfo('description')) . wp_kses_post( $header_tagline_after );
						}
					
				echo '</div>' . "\n";
				
			}
			echo '</div>' . "\n";
			?>
		</div>
		<div class="col-md-8">
			<div class="header-logo-ads">
			<?php
				$show = nysu_magazine_data('header_image_show','disable');
				if ($show == 'enable') {
					$header_image_src = nysu_magazine_data('header_image_src','');
					
					if ($header_image_src) {
						
					?>
						<div class="pull-right">
							<?php
								
								 $header_ads_html = sprintf('<a href="%1$s" class="logo-link dark" rel="home">%2$s</a>',
									esc_url(nysu_magazine_data('header_image_link','')),
									wp_get_attachment_image(absint($header_image_src), 'full', false, array(
										'class'    => 'header-ads-img'
									))
								);
								echo wp_kses_post($header_ads_html);
							?>
							
						</div>
						<div class="clearfix">
						</div>
					<?php
					}
				}  
				
				// Adsense Code using Custom HTML Widget
				if (is_active_sidebar('header-ads')) {
					dynamic_sidebar('header-ads');
				} 
				
			?>
			</div>
		</div>
	</div>
</div>