<?php

/**
 *
 * @copyright  2010-2016 izend.org
 * @version    13
 * @link       http://www.izend.org
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<?php echo $head; ?>
<?php global $googleanalyticsid; ?>
<?php if (!empty($googleanalyticsid)): ?>
<script type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '<?php echo $googleanalyticsid; ?>', '<?php echo $sitename; ?>');
  ga('send', 'pageview', '/<?php echo $request_path; ?>');
</script>
<?php endif; ?>
<?php global $pinteresetassets; ?>
<?php if ($pinteresetassets): ?>
<script type="text/javascript">
(function(d){
    var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
    p.type = 'text/javascript';
    p.async = true;
    p.src = '//assets.pinterest.com/js/pinit.js';
    f.parentNode.insertBefore(p, f);
}(document));
</script>
<?php endif; ?>
</head>
<body>
<?php if (!empty($trace)): ?>
<?php foreach ($trace as $s): ?>
<?php echo $s; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php global $facebookjssdk; ?>
<?php if ($facebookjssdk): ?>
<?php global $facebookid; ?>
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
	FB.init({
<?php if ($facebookid): ?>
		appId:		'<?php echo $facebookid; ?>',
<?php endif; ?>
		xfbml:		true,
		status:		false,
		version:	'v2.8',
});
};
(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) {return;}
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/<?php echo $facebookjssdk; ?>/sdk.js";
	fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<?php endif; ?>
<div id="standard">
<?php echo $banner; ?>
<div id="content">
<?php if (!empty($sharebar)): ?>
<?php echo $sharebar; ?>
<?php endif; ?>
<?php if (!empty($toolbar)): ?>
<?php echo $toolbar; ?>
<?php endif; ?>
<?php if (!empty($sidebar)): ?>
<?php echo $sidebar; ?>
<?php endif; ?>
<div id="body">
<?php echo $content; ?>
</div>
</div>
<?php if (!empty($footer)): ?>
<?php echo $footer; ?>
<?php endif; ?>
</div>
</body>
</html>
