?>
	<script type="text/javascript">
		$(document).ready(function() {
				$(".oembed").oembed(null, {
					embedMethod: "replace", 
					maxWidth: 600,
					maxHeight: 362,
					vimeo: {autoplay: true, maxWidth: 600, maxHeight: 362}
			});
		});
	</script>

<?php 
}
if ($a["is_venue"] || $a['showadd'] == '1') {
    show_googlemap(array($a), 0, 11);
}
echo '<p>', $a['desc'], '</p>';
if ($a['offe']) {
    echo '<div id="special_offer">';
    echo '<h2>Special Offer</h2>';
    echo '<p>', $a['offe'], '</p>';
    echo '</div>';
}
//if ($_SERVER['REMOTE_ADDR'] == '76.17.3.14' || $_SERVER['REMOTE_ADDR'] == '74.232.88.164') { // Heather: 74.232.88.164
echo '<div id="special_offer">';
echo '<h2>Customer Reviews</h2>';
$comments = new Pod('comments');
$comments->findRecords('id', -1, "t.vendor = '{$a['id']}'");
$total_comments = $comments->getTotalRows();
if ($total_comments > 0) {
         $sqlwhere .= " AND ((type1 = '{$sub_cat}') " . "OR (type2 = '{$sub_cat}') " . "OR (type3 = '{$sub_cat}') " . ")";
     }
 }
 $vp = new Pod('vendor_profiles');
 $vp->findRecords('id', -1, $sqlwhere);
 $total_vps = $vp->getTotalRows();
 $avp = array();
 if ($total_vps > 0) {
     while ($vp->fetchRecord()) {
         // get our fields from the POD
         $avp[$vp->get_field('id')] = get_vendorfields($vp);
         //pod_query("UPDATE wp_pod_tbl_vendor_profiles SET list_views = list_views + 1 WHERE id = " . $vp->get_field('id'));
     }
 }
 if (in_array($cur_cat, array('venues', 'dining', 'search'))) {
     show_googlemap($avp);
 }
 shuffle($avp);
 foreach ($avp as $vid => $fields) {
     // format our address, if at all
     $addr = '';
     if ($fields["is_venue"]) {
         $addr = "{$fields['mapaddr']}{$fields['city']}, {$fields['stat']} {$fields['zipc']}";
     }
     // create our rating box
     $rating_data = get_ratingbox($fields["rati"]);
     echo <<<HEREDOC
t\t\t\t\t\t<div class="guidelist_wrap">
t\t\t\t\t\t\t<div class="guidelist_image"><a href="/profile/{$fields["slug"]}"><img src="{$fields["imag"]}" title="{$fields["summ"]}" alt="{$fields["summ"]}"/></a></div>
t\t\t\t\t\t\t<div class="guidelist_content">
t\t\t\t\t\t\t\t{$rating_data}<h2 class="guidelist_name"><a href="/profile/{$fields["slug"]}">{$fields["name"]}</a></h2>