@if (!Auth::user()->isSuperuser() || Auth::user()->isSuperuser())
	{{ Debugbar::disable() }}
@endif
<!DOCTYPE html>
<html lang="ru">
	<head>
		<meta charset="utf-8">
		<!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->

		<title>
			@section('title')
			@show
			:: {{ Config::get('app.title') }}
		</title>
		<meta name="description" content="">
		<meta name="author" content="">

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<!-- Basic Styles -->
		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/bootstrap.min.css') }}">
		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/font-awesome.min.css') }}">

		<!-- SmartAdmin Styles : Please note (smartadmin-production.css) was created using LESS variables -->
		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/smartadmin-production-plugins.min.css') }}">
		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/smartadmin-production.min.css') }}">
		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/smartadmin-skins.min.css') }}">

		<link rel="stylesheet" href="{{ asset('js/dist/ladda-themeless.min.css') }}">

		<!-- SmartAdmin RTL Support is under construction
			 This RTL CSS will be released in version 1.5
		<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-rtl.min.css"> -->

		<link rel="stylesheet" type="text/css" media="screen" href="{{ asset('css/main.css') }}">

		@yield('css')

		<!-- FAVICONS -->
		<link rel="shortcut icon" href="{{ asset('img/favicon/favicon.ico') }}" type="image/x-icon">
		<link rel="icon" href="{{ asset('img/favicon/favicon.ico') }}" type="image/x-icon">

		<!-- GOOGLE FONT -->
		<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,300,400,700&subset=latin,cyrillic,cyrillic-ext">

		<!-- Specifying a Webpage Icon for Web Clip
			 Ref: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html -->
		<link rel="apple-touch-icon" href="{{ asset('img/splash/sptouch-icon-iphone.png') }}">
		<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('img/splash/touch-icon-ipad.png') }}">
		<link rel="apple-touch-icon" sizes="120x120" href="{{ asset('img/splash/touch-icon-iphone-retina.png') }}">
		<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('img/splash/touch-icon-ipad-retina.png') }}">

		<!-- iOS web-app metas : hides Safari UI Components and Changes Status Bar Appearance -->
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!-- Startup image for web apps -->
		<link rel="apple-touch-startup-image" href="{{ asset('img/splash/ipad-landscape.png') }}" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
		<link rel="apple-touch-startup-image" href="{{ asset('img/splash/ipad-portrait.png') }}" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
		<link rel="apple-touch-startup-image" href="{{ asset('img/splash/iphone.png') }}" media="screen and (max-device-width: 320px)">
	</head>

	<body class="">
		<!-- possible classes: minified, fixed-ribbon, fixed-header, fixed-width-->

		<!-- HEADER -->
		<header id="header">
			<div id="logo-group">
				<!-- PLACE YOUR LOGO HERE -->
				@include('layouts/common/logo')
				<!-- END LOGO PLACEHOLDER -->

				{{--
				<!-- Note: The activity badge color changes when clicked and resets the number to 0
				Suggestion: You may want to set a flag when this happens to tick off all checked messages / notifications -->
				<span id="activity" class="activity-dropdown"> <i class="fa fa-user"></i> <b class="badge"> 21 </b> </span>

				@include('layouts/common/notifications')
				--}}
			</div>

			@include('layouts/common/projects')

			<!-- pulled right: nav area -->
			<div class="pull-right">

				<!-- collapse menu button -->
				<div id="hide-menu" class="btn-header pull-right">
					<span> <a href="javascript:void(0);" data-action="toggleMenu" title="Скрыть/показать боковое меню"><i class="fa fa-reorder"></i></a> </span>
				</div>
				<!-- end collapse menu -->

				<!-- logout button -->
				<div id="logout" class="btn-header transparent pull-right">
					<span> <a href="{{ action('UserController@logout') }}" title="Выйти" data-action="userLogout" data-logout-msg="Вы уверены что хотите завершить работу?"><i class="fa fa-sign-out"></i></a> </span>
				</div>
				<!-- end logout button -->

				<!-- search mobile button (this is hidden till mobile view port) -->
				<div id="search-mobile" class="btn-header transparent pull-right">
					<span> <a href="javascript:void(0)" title="Поиск"><i class="fa fa-search"></i></a> </span>
				</div>
				<!-- end search mobile button -->

				@include('layouts/common/search')

				<!-- fullscreen button -->
				<div id="fullscreen" class="btn-header transparent pull-right">
					<span> <a href="javascript:void(0);" data-action="launchFullscreen" title="На полный экран"><i class="fa fa-arrows-alt"></i></a> </span>
				</div>
				<!-- end fullscreen button -->

				{{--
				<!-- #Voice Command: Start Speech -->
				<div id="speech-btn" class="btn-header transparent pull-right hidden-sm hidden-xs">
					<div>
						<a href="javascript:void(0)" title="Голосовое управление" data-action="voiceCommand"><i class="fa fa-microphone"></i></a>
						<div class="popover bottom"><div class="arrow"></div>
							<div class="popover-content">
								<h4 class="vc-title">Голосовое управление активировано <br><small>Пожалуйста говорити прямо в микрофон</small></h4>
								<h4 class="vc-title-error text-center">
									<i class="fa fa-microphone-slash"></i> Голосовое управление недоступно
									<br><small class="txt-color-red">Обязательно <strong>"Разрешите"</strong> использование микрофона</small>
									<br><small class="txt-color-red">Необходимо <strong>соединение с интернетом</strong></small>
								</h4>
								<a href="javascript:void(0);" class="btn btn-success" onclick="commands.help()">Команды</a>
								<a href="javascript:void(0);" class="btn bg-color-purple txt-color-white" onclick="$('#speech-btn .popover').fadeOut(50);">Закрыть окно</a>
							</div>
						</div>
					</div>
				</div>
				<!-- end voice command -->
				--}}

			</div>
			<!-- end pulled right: nav area -->

		</header>
		<!-- END HEADER -->

		<!-- Left panel : Navigation area -->
		<!-- Note: This width of the aside area can be adjusted through LESS variables -->
		<aside id="left-panel">

			<!-- User info -->
			<div class="login-info">
				<span class="dropdown"> <!-- User image size is adjusted inside CSS, it should stay as it -->

					<a href="javascript:void(0)" id="show-shortcut" class="dropdown-toggle" data-toggle="dropdown">
						<img src="/img/avatars/male.png" alt="me" class="online" />
						<span data-user-id="{{ Auth::user()->id }}">
							{{ Auth::user()->first_name }} {{ Auth::user()->last_name }}
						</span>
						<i class="fa fa-angle-down"></i>
					</a>
					<ul class="dropdown-menu">
						<li>
							<a data-toggle="tab">
                              <b>Мой SIP-номер:</b> <?=( (Auth::user()->sip_number)? Auth::user()->sip_number : ' не задан' ); ?>
                            </a>
						</li>
					</ul>

				</span>
			</div>
			<!-- end user info -->

			@include('layouts/common/navigation')

		</aside>
		<!-- END NAVIGATION -->

		<!-- MAIN PANEL -->
		<div id="main" role="main">

			@include('layouts/common/ribbon')

			<!-- MAIN CONTENT -->
			<div id="content">
				@yield('content')
			</div>
			<!-- END MAIN CONTENT -->

		</div>
		<!-- END MAIN PANEL -->

		<!-- PAGE FOOTER -->
		<div class="page-footer">
			<div class="row">
				<div class="col-xs-12 col-sm-6">
					<span class="txt-color-white">Leadstat.ru © 2014 - {{ date('Y') }}</span>
					<span class="txt-color-white">{{ date('H:i:s') }}</span>
				</div>

				{{--
				<div class="col-xs-6 col-sm-6 text-right hidden-xs">
					<div class="txt-color-white inline-block">
						<i class="txt-color-blueLight hidden-mobile">Последняя активность пользователя <i class="fa fa-clock-o"></i> <strong>52 mins ago &nbsp;</strong> </i>
					</div>
				</div>
				--}}
			</div>
		</div>
		<!-- END PAGE FOOTER -->

		@yield('modals')

		<!--================================================== -->

		<!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)-->
		<script data-pace-options='{ "restartOnRequestAfter": true }' src="{{ asset('js/plugin/pace/pace.min.js') }}"></script>

		<!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
		<script>
			if (!window.jQuery) {
				document.write('<script src="{{ asset('js/libs/jquery-2.0.2.min.js') }}"><\/script>');
			}
		</script>

		<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
		<script>
			if (!window.jQuery.ui) {
				document.write('<script src="{{ asset('js/libs/jquery-ui-1.10.3.min.js') }}"><\/script>');
			}

			jQuery(function($){
							$.datepicker.regional['ru'] = {
											closeText: 'Закрыть',
											prevText: '<<',
											nextText: '>>',
											currentText: 'Сегодня',
											monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
											'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
											monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
											'Июл','Авг','Сен','Окт','Ноя','Дек'],
											dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
											dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
											dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
											weekHeader: 'Не',
											dateFormat: 'dd.mm.yy',
											firstDay: 1,
											isRTL: false,
											showMonthAfterYear: false,
											yearSuffix: ''};
							$.datepicker.setDefaults($.datepicker.regional['ru']);
			});
		</script>

		<script src="{{ asset('js/dist/spin.min.js') }}"></script>
		<script src="{{ asset('js/dist/ladda.min.js') }}"></script>

		<!-- IMPORTANT: APP CONFIG -->
		<script src="{{ asset('js/app.config.js') }}"></script>

		<!-- JS TOUCH : include this plugin for mobile drag / drop touch events-->
		<script src="{{ asset('js/plugin/jquery-touch/jquery.ui.touch-punch.min.js') }}"></script>

		<!-- BOOTSTRAP JS -->
		<script src="{{ asset('js/bootstrap/bootstrap.min.js') }}"></script>

		<!-- CUSTOM NOTIFICATION -->
		<script src="{{ asset('js/notification/SmartNotification.min.js') }}"></script>

		<!-- JARVIS WIDGETS -->
		<script src="{{ asset('js/smartwidgets/jarvis.widget.min.js') }}"></script>

		<!-- EASY PIE CHARTS -->
		<script src="{{ asset('js/plugin/easy-pie-chart/jquery.easy-pie-chart.min.js') }}"></script>

		<!-- SPARKLINES -->
		<script src="{{ asset('js/plugin/sparkline/jquery.sparkline.min.js') }}"></script>

		<!-- JQUERY VALIDATE -->
		<script src="{{ asset('js/plugin/jquery-validate/jquery.validate.min.js') }}"></script>

		<!-- JQUERY MASKED INPUT -->
		<script src="{{ asset('js/plugin/masked-input/jquery.maskedinput.min.js') }}"></script>

		<!-- JQUERY SELECT2 INPUT -->
		<script src="{{ asset('js/plugin/select2/select2.min.js') }}"></script>

		<!-- JQUERY UI + Bootstrap Slider -->
		<script src="{{ asset('js/plugin/bootstrap-slider/bootstrap-slider.min.js') }}"></script>

		<!-- browser msie issue fix -->
		<script src="{{ asset('js/plugin/msie-fix/jquery.mb.browser.min.js') }}"></script>

		<!-- FastClick: For mobile devices -->
		<script src="{{ asset('js/plugin/fastclick/fastclick.min.js') }}"></script>

		<!--[if IE 8]>

		<h1>Ваш браузер устарел, пожалуйста обновите его www.microsoft.com/download</h1>

		<![endif]-->

		<!-- MAIN APP JS FILE -->
		<script src="{{ asset('js/app.min.js') }}"></script>

		<!-- ENHANCEMENT PLUGINS : NOT A REQUIREMENT -->
		<!-- Voice command : plugin -->
		<script src="{{ asset('js/speech/voicecommand.min.js') }}"></script>

		<!-- Flot Chart Plugin: Flot Engine, Flot Resizer, Flot Tooltip -->
		<script src="{{ asset('js/plugin/flot/jquery.flot.cust.min.js') }}"></script>
		<script src="{{ asset('js/plugin/flot/jquery.flot.resize.min.js') }}"></script>
		<script src="{{ asset('js/plugin/flot/jquery.flot.tooltip.min.js') }}"></script>

		<!-- Vector Maps Plugin: Vectormap engine, Vectormap language -->
		<script src="{{ asset('js/plugin/vectormap/jquery-jvectormap-1.2.2.min.js') }}"></script>
		<script src="{{ asset('js/plugin/vectormap/jquery-jvectormap-world-mill-en.js') }}"></script>

		<script src="{{ asset('js/plugin/momentjs/moment-with-langs.min.js') }}"></script>
		<!-- Full Calendar -->
		<script src="{{ asset('js/plugin/fullcalendar/jquery.fullcalendar.min.js') }}"></script>

		<!-- Мои файлы -->
		<!--[if IE]><script src="{{ asset('js/soundmanager/script/excanvas.js') }}"></script><![endif]-->
		<script src="{{ asset('js/soundmanager/script/berniecode-animator.js') }}"></script>
		<script src="{{ asset('js/soundmanager/script/soundmanager2-nodebug-jsmin.js') }}"></script>
		<script src="{{ asset('js/soundmanager/360player.js') }}"></script>
		<script src="{{ asset('js/common.js') }}"></script>

		@yield('js')

		<script>
			$(document).ready(function() {

				// DO NOT REMOVE : GLOBAL FUNCTIONS!
				pageSetUp();

			});

		</script>

		<div style="position:fixed; right:0.1%; bottom:0.1%;"><script type="text/javascript">$(document).ready(function(){
		$(window).scroll(function () {if ($(this).scrollTop() > 300) {$('#scroller').fadeIn();} else {$('#scroller').fadeOut();}});
		$('#scroller').click(function () {$('body,html').animate({scrollTop: 0}, 500); return false;});
		});</script>
		<div id="scroller" style="display: none;"><span><p><img src="/img/up.png" pict="css/up.png" _moz_resizing="true" style="cursor:pointer; max-width: 130px; max-height: 175px; display: block; margin-left: auto; margin-right: auto;" /></p></span></div></div>

	</body>

</html>