

<? if ($this->restaurant->id_restaurant) : ?>
	<meta property="og:title" content="<?=$this->restaurant->name?> on Crunchbutton">
	<meta property="og:description" content="One click food ordering from <?=$this->restaurant->name?>. We find the best restaurants <?=$this->community->prep?> <?=$this->community->name?> and make ordering your favorite dishes as easy as one click.">
	<? if ($this->restaurant->image()) : ?>
		<?php if( $this->restaurant->facebook() ) { ?>
			<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/cache/images/<?=$this->restaurant->facebook()->getFileName()?>">
		<?php } ?>
	<? else : ?>
		<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/facebook-like.png">
	<? endif ; ?>

<? elseif ($this->community->id_community) : ?>
	<meta property="og:title" content="Crunchbutton - One click food ordering from <?=$this->community->name?>">
	<meta property="og:description" content="Your favorite restaurants <?=$this->community->prep?> <?=$this->community->name?> delivered. Get food delivered from places that don't deliver. Place an order, and we save it for next time, along with your delivery and payment info. Order your favorite dishes with a click of one button from your computer or phone.">
	<? foreach ($this->community->restaurants() as $restaurant) : ?>
		<? if ($restaurant->image() && $restaurant->facebook() ) : ?>
			<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/cache/images/<?=$restaurant->facebook()->getFileName()?>">
		<? else : ?>
			<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/facebook-like.png">
		<? endif ; ?>

		<? break;?>
	<? endforeach; ?>

<? else : ?>
	<meta property="og:title" content="Crunchbutton - One click food ordering">
	<meta property="og:description" content="Your favorite restaurants, delivered. Get food delivered from places that don't deliver. Place an order, and we save it for next time, along with your delivery and payment info. Come back and reorder your favorites with just one click.">
	<meta property="og:image" content="http://<?=$_SERVER['HTTP_HOST']?>/assets/images/facebook-like.png">
<? endif ; ?>

<meta property="og:type" content="company">
<meta property="og:url" content="https://<?=$_SERVER['HTTP_HOST']?><?=$_SERVER['REQUEST_URI']?>">
<meta property="og:site_name" content="Crunchbutton">
<meta property="fb:app_id" content="411729638889643">

<? if ($_SERVER['__HTTP_HOST'] == 'crunchbutton.com') : ?>
	<script>
		(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','https://www.google-analytics.com/analytics.js','ga');
		ga('create', 'UA-36135548-1', 'crunchbutton.com');
		ga('require', 'ecommerce', 'ecommerce.js');
		ga('require', 'displayfeatures');
		ga('send', 'pageview');
	</script>
<? endif ; ?>
