<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" /> 
<meta name="token" content="<?php echo csrf_token(); ?>"> 
<title><?php echo Config::get('backoffice.title'); ?></title>

<!-- FAVICON -->
<link href="<?php echo Config::get('backoffice.favicon'); ?>" rel="shortcut icon">
<!-- For third-generation iPad with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo Config::get('path.backoffice.images_path'); ?>/apple-touch-icon-144x144-precomposed.png">
<!-- For iPhone with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo Config::get('path.backoffice.images_path'); ?>/apple-touch-icon-114x114-precomposed.png">
<!-- For first- and second-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo Config::get('path.backoffice.images_path'); ?>/apple-touch-icon-72x72-precomposed.png">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="<?php echo Config::get('path.backoffice.images_path'); ?>/apple-touch-icon-precomposed.png">

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,300,600,700' rel='stylesheet' type='text/css'>

<!--<link href="<?php echo Config::get('path.common.css_path'); ?>/redmond/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" type="text/css" media="screen" >

<link href="<?php echo Config::get('path.common.css_path'); ?>/jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" media="screen" >
--><!--<link href="<?php echo Config::get('path.backoffice.js_path'); ?>/jqGrid/css/ui.jqgrid.css" rel="stylesheet" type="text/css" media="screen" >-->
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/bootstrap-datetimepicker.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/jquery.bootgrid.min.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/redactor.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/bootstrap-select.min.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/bootstrap-colorpicker.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.common.css_path'); ?>/font-awesome.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/typeaheadjs.css" rel="stylesheet" type="text/css" media="screen" >
<link href="<?php echo Config::get('path.backoffice.css_path'); ?>/style.css" rel="stylesheet" type="text/css" media="screen" >

<?php foreach($styles as $style): ?>
<link href="<?php echo $style; ?>" rel="stylesheet" type="text/css" media="screen">
<?php endforeach; ?>

<script>
    /**
    * JAVASCRIPT GLOBAL ENVIRONMENT SETUP
    */
    window.Eae = {Config: {}, View: {}, Model: {}};
    window.Eae.Config = {
        url : "<?php echo lang_url('/'); ?>",
        base_url: "<?php echo url('/'); ?>",
        defaultLang : "<?php echo LaravelLocalization::getDefaultLocale(); ?>",
        debug: "<?php echo Config::get('app.debug') ? 'true': 'false'; ?>"
    };
</script>

<script src="<?php echo Config::get('path.common.js_path'); ?>/jquery-2.1.4.min.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/moment-with-locales.min.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/bootstrap.min.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/bootstrap-datetimepicker.min.js"></script>  
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/jquery.nestable.js"></script>  
<script src="<?php echo Config::get('path.common.js_path'); ?>/jquery.sortable.min.js"></script>  
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/bootbox.min.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/jquery.bootgrid.min.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/select/bootstrap-select.min.js"></script>
<script src="<?php echo Config::get('path.common.js_path'); ?>/typeahead.bundle.js"></script>
  
<script src="<?php echo Config::get('path.common.js_path'); ?>/underscore-min.js"></script> 
<script src="<?php echo Config::get('path.common.js_path'); ?>/backbone-min.js"></script>
<script src="<?php echo Config::get('path.common.js_path'); ?>/jquery.lazyload.min.js"></script> 
<script src="<?php echo Config::get('path.common.js_path'); ?>/utils.js"></script> 
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/redactor.min.js"></script> 
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/redactor-plugins.js"></script> 
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/view/backend-all-pages.js"></script>
<script src="<?php echo Config::get('path.backoffice.js_path'); ?>/view/media-manager.js"></script>

<?php foreach($scripts as $script): ?>
<script src="<?php echo $script; ?>"></script>
<?php endforeach; ?>

<script>
    var baseUrl = '<?php echo url(); ?>';
    var imageUrl ='<?php echo Config::get("path.frontend.images_path"); ?>';
    var websiteLanguages = <?php echo json_encode(getAvailableLanguages()); ?>;
    
    $(function() {
        $.ajaxSetup({
            headers: {
                'X-CSRF-Token': $('meta[name="token"]').attr('content'),
                'X-Requested-With': 'XMLHttpRequest'
            }
        });
    });
</script>