<?php

/**
 *
 * @copyright  2010-2016 izend.org
 * @version    12
 * @link       http://www.izend.org
 */
?>
<?php switch ($mode): ?>
<?php case 'lite': ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($base_url . '/' . $request_path); ?>" target="_blank" title="Share on Facebook"><span>Facebook</span></a>
<?php break; ?>
<?php case 'awesome': ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($base_url . '/' . $request_path); ?>" target="_blank" title="Share on Facebook"><i class="fa fa-facebook"></i></a>
<?php break; ?>
<?php default: ?>
<?php $id = uniqid('id'); ?>
<div id="<?php echo $id; ?>"></div>
<script type="text/javascript">
//<![CDATA[
<?php switch ($mode): ?>
<?php case 'bar': ?>
$('#<?php echo $id; ?>').replaceWith('<div class="fb-like" data-href="<?php echo $base_url; ?>/<?php echo $request_path; ?>" data-send="true" data-layout="box_count" data-width="70" data-show-faces="false" data-font="arial" data-colorscheme="light"></div>');
<?php break; ?>
<?php case 'inline': ?>
<?php default: ?>
var w=$('body').width();
var datalayout=w < 320 ? 'button_count' : 'standard';
var datawidth=datalayout == 'standard' ? (w > 480 ? '450' : '300') : '100';
$('#<?php echo $id; ?>').replaceWith('<div class="fb-like" data-href="<?php echo $base_url; ?>/<?php echo $request_path; ?>" data-send="true" data-layout="' + datalayout + '" data-width="' + datawidth + '" data-show-faces="false" data-font="arial" data-colorscheme="light"></div>');
<?php break; ?>
<?php endswitch; ?>
//]]>
</script>
<?php global $facebookjssdk; $facebookjssdk='en_US'; ?>
<?php break; ?>
<?php endswitch; ?>
