<?php
/*
 *
 * TTG Core Elements - "PHPlugins" User Hook interface
 * designed by john bishop images (http://johnbishopimages.com)
 * for Matthew Campagna of The Turning Gate (http://theturninggate.net)
 *
 */

// Begin hook processing

define( 'TTG_ROOT', __FILE__ );

define( 'TTG_HOOK', './phplugins' );

define( 'TTG_COMP', 'TTG CE4-Pages-home 4.0' );

if (file_exists( TTG_HOOK . '/phplugins.php')) {
	require_once TTG_HOOK . '/phplugins.php';
}

if (function_exists('ttg_user_load')) {
	$void = ttg_user_load( TTG_COMP, TTG_ROOT );
}

?><?php
	if (!function_exists('currentPageURL')) {
		// Gets current page URL
		function currentPageURL() {
			$pageURL = 'http';

			if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {$pageURL .= "s";}
			$pageURL .= "://";

			if ($_SERVER["SERVER_PORT"] != "80") {
				$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
			} else {
				$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
			}

			return $pageURL;
		}
	}

	if (!function_exists('currentPageLocation')) {
		// Gets current page parent location
		function currentPageLocation() {

			$currentPageURL = currentPageURL();
			$returnURL = '';

			$finalSlash = strrpos(currentPageURL(), '/');
			if (strrpos($currentPageURL, '.') > strrpos($currentPageURL, '/')) // has a file after the final slash, e.g. http://url/directory/index.php
				$returnURL = substr($currentPageURL, 0, $finalSlash);
			else if (strrpos($currentPageURL, '?') > strrpos($currentPageURL, '/')) // has a ? after the final slash, e.g. http://url/directory/index.php
				$returnURL = substr($currentPageURL, 0, $finalSlash);
			else if ($finalSlash == strlen($currentPageURL)-1) // final character is a slash, e.g. http://url/directory/
				$returnURL = substr($currentPageURL, 0, $finalSlash);
			else // final character is not a slash, e.g. http://url/directory
				$returnURL = $currentPageURL;

			return $returnURL;
		}
	}

	if (!function_exists('currentPageName')) {
		// Gets current page name.
		function currentPageName() {
			return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
		}
	}

	if (!function_exists('truncate')) {
		// Truncates string to length.
		function truncate($str, $len=70) {
			if (strlen($str) > $len) {
				return substr($str, 0, $len-2) . '&#133';
			} else {
				return $str;
			}
		}
	}

	// Set constants for use in PHPlugins
	define("PAGEIMAGE", "./lib/images/identityplate.png");
	define("CURRENTPAGEURL", currentPageURL());
	define("CURRENTPAGELOCATION", currentPageLocation());
	define("CURRENTPAGENAME", currentPageName());
	define("ALBUMTITLE", 'Accueil');
	if (!defined('TTG_SITE')) {
		define("TTG_SITE", "http://www.carlito.eu/MZ17/");
	}
?><!DOCTYPE html>
<!--[if lt IE 7]><html class="ce4 no-js lt-ie9 lt-ie8 lt-ie7" dir="ltr" lang="fr" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
<!--[if IE 7]><html class="ce4 no-js lt-ie9 lt-ie8" dir="ltr" lang="fr" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
<!--[if IE 8]><html class="ce4 no-js lt-ie9" dir="ltr" lang="fr" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><![endif]-->
<!--[if gt IE 8]><!--><html class="ce4 no-js gt-ie8" dir="ltr" lang="fr" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"><!--<![endif]-->

<head>
	<meta charset="utf-8" />
	<!--[if IE]><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><![endif]-->
	<meta name="robots" content="noarchive, noindex, nofollow" />
 
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

 
	<meta name="title" content="Accueil - Carlito Event Photography" />
 
	<meta name="generator" content="CE4 Pages 7.0.14, 0 published images" />
 

	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="HandheldFriendly" content="True" />
	<meta name="MobileOptimized" content="320" />
	<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" />

	<title>Accueil - Carlito Event Photography</title>

 
	<link rel="apple-touch-icon-precomposed" href="./lib/images/apple-touch-icon.png" />
 
	<link rel="icon" type="image/x-icon" href="./lib/images/favicon.ico" />
 


	<link rel="stylesheet" type="text/css" media="all" href="./lib/css/scaffolding.min.css" />	
	<link rel="stylesheet" type="text/css" media="all" href="./lib/css/font-awesome.min.css" />	
	<link rel="stylesheet" type="text/css" media="all" href="./lib/css/style-common.css" />
	<link rel="stylesheet" type="text/css" media="all" href="./lib/css/style-component.css" />
<?php
$add_mode = true;
if ( function_exists('ttg_style_navigation') ) {
	if ( !(ttg_style_navigation( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?>	<link rel="stylesheet" type="text/css" media="screen" href="./lib/css/navigation.css" />	
<?php } ?> 

	<link rel="stylesheet" type="text/css" media="print" href="./lib/css/print.css" />	

	<script src="./lib/js/modernizr.custom.79601.js"></script>
	<script src="./lib/js/jquery-1.11.3.min.js"></script>
	<script src="./lib/js/jquery.ba-throttle-debounce.min.js"></script>
	<script src="./lib/js/init.head.min.js"></script>


<script>
	var options = { 
		cart_url: 'http://www.carlito.eu/MZ17/ttg-be/cart/',			  
		pricing_scheme: 'default',
		local_js_path: './lib/js/',
		button_html: '',
		gallery_selector: '#page-body',
		cart_button_selector: '.add-to-cart',
	};

	// Do not edit below this line
	options['cart_url'] += (options['cart_url'][options['cart_url'].length-1])!='/'?'/':'';
	$(function() {
		jQuery.getScript(options['cart_url'] + 'lib/js/jquery.ttgcart-ce4.js', function() {
			if (!("TTGCart" in window)) {
				return;
			}
			$('body').ttgcart(options);

			options['cart_button_selector'] = '.add-package-to-cart';
			
			$('body').ttgpackage(options);
		});
	});
</script>


	<!--[if (gte IE 6)&(lte IE 8)]>
	<script src="./lib/js/respond.min.js"></script>
	<![endif]-->
	<!--[if (lte IE 10)]>

	<![endif]-->

<?php
if ( function_exists('ttg_head_end') ) {
	$void = ttg_head_end( TTG_COMP, TTG_ROOT );
} ?> 

</head> 

<body id="home-page" class="home-page clearfix">

<?php
if ( function_exists('ttg_body_top') ) {
	$void = ttg_body_top( TTG_COMP, TTG_ROOT );
} ?> 

<div id="body-mantle" class="body-mantle clearfix">
<div id="body-core" class="body-core clearfix">

<div id="body-core-outer" class="body-core-outer clearfix">

<?php
$add_mode = true;
if ( function_exists('ttg_header_masthead') ) {
	if ( !(ttg_header_masthead( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?> 

	<div id="masthead" class="block-id masthead clearfix">
	<div class="mantle clearfix">
		<div class="core clearfix">

 
		<h1><a href="http://www.carlito.eu/MZ17/"><span>Carlito Event Photography</span></a></h1>
 
		<h2><a href="http://www.carlito.eu/MZ17/"><img alt="Carlito Event Photography" src="./lib/images/identityplate.png" width="250" height="130" /></a></h2>
 
 

		</div>
	</div>

 

	</div> <!-- #masthead -->

 

<?php } ?>  
 

 

 

</div> <!-- #body-core-outer -->
 

<div id="body-core-inner" class="body-core-inner clearfix">

<section>
<div id="page-body" class="page-body page-home concrete-shoes cart clearfix">

 

<?php
$add_mode = true;
if ( function_exists('ttg_header_navigation') ) {
	if ( !(ttg_header_navigation( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?> 

<div id="navigation-container" class="navigation-container clearfix">

 

	<div id="navigation" class="block-id navigation clearfix">
	<div class="mantle clearfix">
		<div class="core clearfix">
		<div id="navigation-background">

		<div id="r2d2-menu" class="clearfix">
		<ul id="pull">

			<li><span>&nbsp;</span></li>
			<li><span>&nbsp;</span></li>
			<li><span>&nbsp;</span></li>
			<li><span>&nbsp;</span></li>
			<li id="open-nav"><a href="#r2d2-menu"><i class="fa fa-reorder"></i></a></li>
			<li id="close-nav"><a href="#"><i class="fa fa-times"></i></a></li>
		</ul><!-- #pull -->


		<p id="nav">

		<span><a href="<?php echo TTG_SITE; ?>index.php">Accueil</a></span>
 
		<span><a href="<?php echo TTG_SITE; ?>galleries.php">Galeries</a></span>
 
		<span><a href="<?php echo TTG_SITE; ?>contact.php">Contact</a></span>
 
 
 
 
 
 
 
 

		</p><!-- #nav -->

 




		</div><!-- #r2d2-menu -->

		</div><!-- #navigation-background -->
		</div>
	</div>
	</div> <!-- #navigation -->

 

</div> <!-- #navigation-container -->
<?php } ?> 

<div id="status-bar" class="block-id status-bar clearfix" style="display:none;">
<div class="mantle clearfix">
	<div class="core clearfix">

	<ul id="cart-status" class="status-buttons clearfix"></ul>

	</div>
</div>
</div><!-- #status -->
 
 

 

<div id="page-content" class="page-content clearfix">

 

<?php
if ( function_exists('ttg_canvas_top') ) {
	$void = ttg_canvas_top( TTG_COMP, TTG_ROOT );
} ?> 

 



	<div id="the-block" class="block-id the-block clearfix">
	<div class="mantle clearfix">
		<div class="core clearfix">

<?php
$add_mode = true;
if ( function_exists('ttg_block_top') ) {
	if ( !(ttg_block_top( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?> 

		<div class="container_12 collapse clearfix">



<!-- primary content -->
<div id="primary-content" class="grid_12 collapse clearfix">



<?php

	// GET PHP PARSEDOWN/MARKDOWN
	include_once 'lib/php/Parsedown.php';

	// SETUP FRAGMENTS
	function includeFragment($fragmentName, $markdown=true) {
		$Parsedown = new Parsedown();
		$fullPath = 'fragments/'.$fragmentName.'.html';
		if (file_exists($fullPath)) {
			$contents = file_get_contents($fullPath);
			if ($markdown)
			echo $Parsedown->text($contents);
		}
	}
	// GET FRAGMENT
	includefragment('home-main');

?>

 

</div>
<!-- /primary content -->

 

		</div><!-- #container_12 -->

<?php
} // end ttg_block_top
if ( function_exists('ttg_block_bottom') ) {
	$void = ttg_block_bottom( TTG_COMP, TTG_ROOT );
} ?> 

		</div>
	</div>
	</div> <!-- #the-block -->
 



<?php
if ( function_exists('ttg_canvas_bottom') ) {
	$void = ttg_canvas_bottom( TTG_COMP, TTG_ROOT );
} ?> 

</div> <!-- #page-content -->
</div> <!-- #page-body -->
</section>


<section>
<div id="page-foot" class="page-foot clearfix">

 
 

	<div id="footer" class="block-id footer clearfix">
	<div class="mantle clearfix">
		<div class="core clearfix">
		<div class="container_12">


<?php
$add_mode = true;
if ( function_exists('ttg_footer_top') ) {
	if ( !(ttg_footer_top( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?> 

		<div class="collapse clearfix">

		<div id="attribution" class="collapse">
		
<p>All rights reserved &copy; Carlito Event Photography 2017 (and beyond).</p>
		</div>
		
 		
		<p id="back-to-top" class="back-to-top"><a href="#body-mantle"><i class="fa fa-caret-up"></i> Back to Top</a></p>

		</div>

<?php
} // end ttg_footer_top
if ( function_exists('ttg_footer_bottom') ) {
	$void = ttg_footer_bottom( TTG_COMP, TTG_ROOT );
} ?> 

		</div>
		</div>
	</div>
	</div> <!-- #footer -->
 

</div> <!-- #page-foot -->
</section>

</div> <!-- #body-core-inner -->
</div> <!-- #body-core -->
</div> <!-- #body-mantle -->

<!--  Scripts **************************************** -->


	<script src="./lib/js/init.tail.min.js"></script>

<?php
$add_mode = true;
if ( function_exists('ttg_scripts_navigation') ) {
	if ( !(ttg_scripts_navigation( TTG_COMP, TTG_ROOT )) ) {
		$add_mode = false;
	}
}
if ( $add_mode ) { ?>	<script src="./lib/js/jquery.r2d2menu.min.js"></script>
	<script>
	$(document).ready(function(){

		// start R2-D2
		if($('html').hasClass('js')){
			$('#r2d2-menu').r2d2({
				breakpoint: 784,
				touch: false			});
		}

	});
	</script>
<?php } ?>
	<script type="text/javascript">
		function downloadJSAtOnload() {
			var element = document.createElement("script");
			element.src = "./lib/js/init.defer.min.js";
			document.body.appendChild(element);
		}
		if (window.addEventListener)
			window.addEventListener("load", downloadJSAtOnload, false);
		else if (window.attachEvent)
			window.attachEvent("onload", downloadJSAtOnload);
		else window.onload = downloadJSAtOnload;
	</script>

<!-- /Scripts **************************************** --> 
 
 
 

<?php
if ( function_exists('ttg_body_bottom') ) {
	$void = ttg_body_bottom( TTG_COMP, TTG_ROOT );
} ?> 

</body>
</html>

