<?php
/**
 * The template for displaying the header
 *
 * Displays all of the head element and everything up until the "site-content" div.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */
$currentlang = pll_current_language();
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<base href="<?php echo esc_url( get_template_directory_uri() ); ?>/">
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="style.css"/>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
	<?php wp_head(); ?>
</head>
<body>
	<div class="wrapper">
		<div class="top con">
			<a href="<?=str_replace('index.php', '', $_SERVER['SCRIPT_NAME'])?>"><img class="logo" src="img/logo.png" alt="Amrop logo"/></a>
			<button class="ham"></button>
			<div class="resp-drop">
				<ul class="social">
					<li><a href="https://www.facebook.com/amropeesti" target="_blank"><img src="img/fb.png" alt="Facebook"></a></li>
					<li><a href="https://twitter.com/amrop" target="_blank"><img src="img/tw.png" alt="Twitter"></a></li>
					<li><a href="https://plus.google.com/+amrop" target="_blank"><img src="img/gp.png" alt="GooglePlus"></a></li>
					<li><a href="https://www.linkedin.com/company/amrop-estonia" target="_blank"><img src="img/in.png" alt="LinkedIn"></a></li>
				</ul>
				<ul class="lang">
					<?
					$langArr = pll_the_languages(array('raw'=>1));
					foreach($langArr AS $idx=>$langz){?>
						<li <?=$langz['current_lang']==true?'class="active"':''?>><a href="<?=$langz['url']?>"><?=strtoupper($langz['slug'])?></a></li>
					<?}?>
				</ul>
				<form action="<?=home_url()?>">
					<input type="search" placeholder="<?=($currentlang=='eng'?'Search':'Otsi')?>" name="s"/>
					<input type="submit" value=" "/>
				</form>
				<?php
				$defaults = array(
					'theme_location'  => 'header-menu',
					'menu_class'      => 'menu',
					'echo'            => true,
					'depth'           => 2
				);

				wp_nav_menu( $defaults ); ?>
			</div>
		</div>