<a class="exit-off-canvas"></a>
</div><!--End of inner-wrap-->
</div><!--End of off-canvas-->
-
+ <?php
+ global $post;
+ $properties = array(
+ 187 => "Stafford's Bay View Inn",
+ 188 => "Stafford's Crooked River Lodge",
+ 189 => "Stafford's Perry Hotel",
+ 190 => "Stafford's Pier Restaurant",
+ 191 => "Stafford's Weathervayne Restaurant",
+ 192 => "Stafford's Noggin Room Pub",
+ 230 => "Stafford's Pointer Boat",
+ 197 => "Stafford's Vacation Rentals",
+ 194 => "Stafford's Wedding Specials"
+ );
+ ?>
+ <script>
+ (function(){
+ window.glmData = {
+ location: '<?php echo isProperty($post->ID, $properties); ?>'
+ }
+ })()
+ </script>
<?php wp_footer();?>
<script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>
<script charset="utf-8" type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
}
return false;
}
+function isProperty($page_id, $props_array, $deep = false){
+ $post = get_post($page_id);
+ $is_property = false;
+
+ foreach($props_array as $id=>$property){
+ if( $deep ){
+ if( is_page($id) || $id == $post->post_parent || is_tree($id) ){
+ $is_property = true;
+ }
+ }else{
+ if( is_page($id) ){
+ $is_property = true;
+ }
+ }
+ }
+ return $is_property;
+}
function setReservationWidgetProperty($page_id, $props_array){
$post = get_post($page_id);
$property_name = '';
$("#res-tab-open").attr("id", "res-tab");
}
});
+ if(window.glmData.location){
+ console.log( $('a.toggle'))
+ $('a.toggle').trigger("click");
+ $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+ }
var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
$("#nightsOff").val( 1 )
stay = `stay_nights=1&`;
}
-
-
- // currentDate = $("#arriveOff").val();
- // currentDate = new Date(currentDate);
- // console.log(currentDate);
- // currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate());
- // currentDate.setDate(currentDate.getDate());
- // dd = currentDate.getDate() + 1;
- // if (dd <= 9) {
- // dd = '0' + dd;
- // }
- // d = currentDate.getDate();
- // if (d <= 9) {
- // d = '0' + d;
- // }
- // m = currentDate.getMonth() + 1;
- // if (m <= 9) {
- // m = '0' + m;
- // }
- // y = currentDate.getFullYear();
-
- // // this variable is for passing to booking site
- // start = "arrival_date=" + y + '-' + m + '-' + d + '&';
-
- // requiredDate = y + '-' + m + '-' + d;
- // minDays = y + '-' + m + '-' + dd;
- // console.log(minDays);
-
- // $("#departOff").attr("min", minDays).val(minDays);
- // if( !$("#departOff").val() <= 1 ){
- // $("#departOff").val(minDays);
- // }
- // if (requiredDate < $("#arriveOff").attr("min")) {
- // minDays = $("#arriveOff").attr("min");
- // $("#arriveOff").val(minDays);
- // }
- // $("#nightsOff").val( $("#departOff").val() - $("#arriveOff".val()))
-
- // if ($("#departOff").val() === "Departure Date" || $("#departOff").val() === "") {
- // $("#nightsOff").val("");
- // } else {
- // $("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
- // }
-
- // if ($("#nightsOff").val() <= 0) {
- // // $("#departOff").val("Minimum 1 Night");
- // $("#nightsOff").val("");
- // }
});
// // restrict departure date ///////////////////////////////
$(document).on('change', '#departOff', function () {
$("#res-tab-open").attr("id", "res-tab");
}
});
+ if(window.glmData.location){
+ console.log( $('a.toggle'))
+ $('a.toggle').trigger("click");
+ $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+ }
var extraDay,currentDate, currentDate2, requiredDate,minDays, departure, stay, d, dd, m, y, bayView = 'vD4ZpIFk4%2b7FyPsaBnkCqP1cBHWnJili9k5D83MqJq4%3d&',
crookedRiver = 'ZhWXD46i2%2fq319vcR%2fcw69rZvA2bz%2fttOOxO9t1%2fBJ0%3d&',
adults,
$("#nightsOff").val( 1 )
stay = `stay_nights=1&`;
}
-
-
- // currentDate = $("#arriveOff").val();
- // currentDate = new Date(currentDate);
- // console.log(currentDate);
- // currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate());
- // currentDate.setDate(currentDate.getDate());
- // dd = currentDate.getDate() + 1;
- // if (dd <= 9) {
- // dd = '0' + dd;
- // }
- // d = currentDate.getDate();
- // if (d <= 9) {
- // d = '0' + d;
- // }
- // m = currentDate.getMonth() + 1;
- // if (m <= 9) {
- // m = '0' + m;
- // }
- // y = currentDate.getFullYear();
-
- // // this variable is for passing to booking site
- // start = "arrival_date=" + y + '-' + m + '-' + d + '&';
-
- // requiredDate = y + '-' + m + '-' + d;
- // minDays = y + '-' + m + '-' + dd;
- // console.log(minDays);
-
- // $("#departOff").attr("min", minDays).val(minDays);
- // if( !$("#departOff").val() <= 1 ){
- // $("#departOff").val(minDays);
- // }
- // if (requiredDate < $("#arriveOff").attr("min")) {
- // minDays = $("#arriveOff").attr("min");
- // $("#arriveOff").val(minDays);
- // }
- // $("#nightsOff").val( $("#departOff").val() - $("#arriveOff".val()))
-
- // if ($("#departOff").val() === "Departure Date" || $("#departOff").val() === "") {
- // $("#nightsOff").val("");
- // } else {
- // $("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
- // }
-
- // if ($("#nightsOff").val() <= 0) {
- // // $("#departOff").val("Minimum 1 Night");
- // $("#nightsOff").val("");
- // }
});
// // restrict departure date ///////////////////////////////
$(document).on('change', '#departOff', function () {