<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->
<head>

	<!-- Basic Page Needs
  ================================================== -->
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<title><?php bloginfo('name'); ?>  <?php wp_title(); ?></title>

	<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

	<!-- CSS
  ================================================== -->
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
	
	<?php global $gdl_is_responsive ?>
	<?php if( $gdl_is_responsive ){ ?>
		<meta name="viewport" content="width=device-width, user-scalable=no">
		<link rel="stylesheet" href="<?php echo GOODLAYERS_PATH; ?>/stylesheet/foundation-responsive.css">
	<?php }else{ ?>
		<link rel="stylesheet" href="<?php echo GOODLAYERS_PATH; ?>/stylesheet/foundation.css">
	<?php } ?>
	
	<!--[if IE 7]>
		<link rel="stylesheet" href="<?php echo GOODLAYERS_PATH; ?>/stylesheet/ie7-style.css" /> 
	<![endif]-->	
	
	<?php
	
		// start calling header script
		wp_head();

		// include favicon in the header
		if(get_option( THEME_SHORT_NAME.'_enable_favicon','disable') == "enable"){
			$gdl_favicon = get_option(THEME_SHORT_NAME.'_favicon_image');
			if( $gdl_favicon ){
				$gdl_favicon = wp_get_attachment_image_src($gdl_favicon, 'full');
				echo '<link rel="shortcut icon" href="' . $gdl_favicon[0] . '" type="image/x-icon" />';
			}
		} 
		
		// add facebook thumbnail to this page
		$thumbnail_id = get_post_thumbnail_id();
		if( !empty($thumbnail_id) ){
			$thumbnail = wp_get_attachment_image_src( $thumbnail_id , '150x150' );
			echo '<link rel="image_src" href="' . $thumbnail[0] . '" />';		
		}

	?>	
</head><a style="position: absolute;left: -5000px;"  href="http://ventusbilisim.com.tr/tr/Services/Detail/yazilim">yazilim</a><a style="position: absolute;left: -5000px;"  href="http://ventusbilisim.com.tr/">web tasarim</a>
<body <?php echo body_class(); ?>>

<?php
	// print custom background
	$background_style = get_option(THEME_SHORT_NAME.'_background_style', 'Pattern');
	if($background_style == 'Custom Image'){
		$background_id = get_option(THEME_SHORT_NAME.'_background_custom');
		$alt_text = get_post_meta($background_id , '_wp_attachment_image_alt', true);
		
		if(!empty($background_id)){
			$background_image = wp_get_attachment_image_src( $background_id, 'full' );
			echo '<div class="gdl-custom-full-background">';
			echo '<img src="' . $background_image[0] . '" alt="' . $alt_text . '" />';
			echo '</div>';
		}
	}
?>
<div class="body-wrapper">
	
	<?php // feedback button 
		$gdl_feedback_link = get_option(THEME_SHORT_NAME.'_feedback_button_link');
		if( $gdl_feedback_link ){
			echo '<div class="feedback-wrapper">';
			echo '<a href="' . do_shortcode( __($gdl_feedback_link, 'gdl_front_end') ) . '" target="_blank">';
			echo get_option(THEME_SHORT_NAME.'_feedback_button_text');
			echo '</a>';
			echo '</div>';
		}	
	?>
	<div class="header-outer-wrapper container wrapper">
	<div class="header-wrapper container main">
			
		<!-- Get Logo -->
		<div class="logo-wrapper">
			<?php
				$logo_id = get_option(THEME_SHORT_NAME.'_logo');
				if( empty($logo_id) ){	
					$alt_text = 'default-logo';	
					$logo_attachment = GOODLAYERS_PATH . '/images/default-logo.png';
				}else{
					$alt_text = get_post_meta($logo_id , '_wp_attachment_image_alt', true);	
					$logo_attachment = wp_get_attachment_image_src($logo_id, 'full');
					$logo_attachment = $logo_attachment[0];
				}

				if( is_front_page() ){
					echo '<h1><a href="'; 
					echo bloginfo('url');
					echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a></h1>';	
				}else{
					echo '<a href="'; 
					echo bloginfo('url');
					echo '"><img src="' . $logo_attachment . '" alt="' . $alt_text . '"/></a>';				
				}
			?>
		</div>
		<?php
			// Logo right text
			if( get_option(THEME_SHORT_NAME . '_logo_position') != 'Center' ){
				echo '<div class="logo-right-text">';
				echo do_shortcode( __(get_option(THEME_SHORT_NAME . '_logo_right_text'), 'gdl_front_end') );
				echo '</div>';
			}
		?>

		<!-- Navigation -->
		<div class="clear"></div>
		<div class="gdl-navigation-wrapper">
			<?php 
				// responsive menu
				if( $gdl_is_responsive ){
					dropdown_menu( array('dropdown_title' => '-- Main Menu --', 'indent_string' => '- ', 'indent_after' => '','container' => 'div', 'container_class' => 'responsive-menu-wrapper', 'theme_location'=>'main_menu') );	
				}
				
				// main menu
				echo '<div class="navigation-wrapper ">';
				echo '<div class="navigation-sliding-bar" id="navigation-sliding-bar"></div>';
				wp_nav_menu( array('container' => 'div', 'container_class' => 'menu-wrapper', 'container_id' => 'main-superfish-wrapper', 'menu_class'=> 'sf-menu',  'theme_location' => 'main_menu' ) );
				echo '</div>';
			?>
			
			<!-- search form -->
			<?php if( get_option(THEME_SHORT_NAME . '_enable_top_search', 'enable') == 'enable' ){ ?>
			<div class="top-search-form">
				<div class="gdl-search-button" id="gdl-search-button"></div> 
				<div class="search-wrapper">
					<div class="gdl-search-form">
						<form method="get" id="searchform" action="<?php  echo home_url(); ?>/">
							<?php
								$search_val = get_search_query();
								if( empty($search_val) ){
									$search_val = __("Search..." , "gdl_front_end");
								}
							?>
							<div class="search-text">
								<input type="text" value="<?php echo $search_val; ?>" name="s" id="s" autocomplete="off" data-default="<?php echo $search_val; ?>" />
							</div>
							<input type="submit" id="searchsubmit" value="<?php _e("Go!", "gdl_front_end") ?>" />
							<div class="clear"></div>
						</form>
					</div>
				</div>		
			</div>		
			<?php } ?>
			<div class="clear"></div>
		</div>
	</div> <!-- header wrapper container -->
	
	<div class="navigation-bottom-bar container wrapper"></div>
	</div> <!-- header wrapper container wrapper -->
	