Sorry, this calendar requires javascript in order to work.
>>
';for (i = 0; i < months; i++) {anytime_markup += '
';}anytime_markup += '
';if (months > 1) {anytime_markup += '
<<
>>
';}anytime_markup += '
';anytime_markup += '
';jQuery(document).ready(function () {var powered_by_html = '
';jQuery('#atb_calendar_container').append(powered_by_html);var update_browser_notice = 'Important Notice We have detected that the browser that you are using pre-dates and does not support the technology that powers our calendar widget and in turn our booking system.
You will need to update your browser to a more recent version (Internet Explorer 9 or later, Safari, Google Chrome or Firefox).
Alternatively you can call us to check availability and book over the phone.';// Detect browser support for CORSvar no_support = '';if ('withCredentials' in new XMLHttpRequest()) {// supports cross-domain requestsno_support = 'CORS supported (XHR)';} else if (typeof XDomainRequest !== 'undefined') {// Use IE-specific "CORS" code with XDRno_support = 'CORS supported (XDR)';} else {// Time to retreat with a fallback or polyfillno_support = 'No CORS Support!';}jQuery.ajaxTransport("+*", function (options, originalOptions, jqXHR) {if (window.XDomainRequest) {var xdr;return {send: function (headers, completeCallback) {// Use Microsoft XDRxdr = new XDomainRequest();xdr.open('get', options.url);xdr.onload = function () {if (this.contentType.match(/\/xml/)) {var dom = new ActiveXObject('Microsoft.XMLDOM');dom.async = false;dom.loadXML(this.responseText);completeCallback(200, 'success', [dom]);} else {completeCallback(200, 'success', [this.responseText]);}};xdr.ontimeout = function () {completeCallback(408, 'error', ['The request timed out.']);};xdr.onerror = function () {completeCallback(404, 'error', ['The requested resource could not be found.']);};xdr.onprogress = function () {};xdr.send();},abort: function () {if (xdr)xdr.abort();}};}});jQuery.ajaxSetup({cache: false});jQuery('#atb_anytime').find('.no-js').remove();if (no_support == 'No CORS Support!') {jQuery('#atb_anytime').append(update_browser_notice);} else {jQuery('#atb_anytime').append(anytime_markup);jQuery('#atb_category_selection').off('change');jQuery('#atb_category_selection').on('change', function () {jQuery.ajax({dataType: 'text',url: url1 + jQuery('#atb_anytime').data('url') + url3 + '/unit/unitsInCategory/' + parseInt(jQuery('#atb_category_selection').val(), 10) + '/false/',success: function (data) {var json_data = jQuery.parseJSON(data);jQuery('#atb_unit_selection').children().remove();jQuery.each(json_data, function (key, value) {jQuery('#atb_unit_selection').append('
');});var new_date = new Date();new_date.setDate(new_date.getDate());var day = new_date.getDate();var month = parseInt(new_date.getMonth(), 10) + 1;if (month < 10) {month = '0' + month;}var year = new_date.getFullYear();var display_unit = parseInt(jQuery('#atb_anytime').data('unit'), 10);if (display_unit > 0) {jQuery('#atb_unit_selection').hide();jQuery('#atb_unit_selection').val(display_unit);} else {jQuery('#atb_unit_selection').show();}get_calendar(year + '-' + month + '-' + day);}});});jQuery.ajax({dataType: 'text',url: url1 + jQuery('#atb_anytime').data('url') + url3 + '/category/listAllActive/1/' + site + '/',success: function (data) {var json_data = jQuery.parseJSON(data);jQuery.each(json_data, function (key, value) {jQuery('#atb_category_selection').append('
');});var chosen_category = parseInt(jQuery('#atb_anytime').data('category'), 10);jQuery('#atb_category_selection').val(chosen_category);jQuery('#atb_category_selection').trigger('change');if (jQuery('#atb_anytime').attr('data-categories')) {jQuery('#atb_category_selection').show();}}});jQuery('#atb_unit_selection').off('change');jQuery('#atb_unit_selection').on('change', function () {reset();var new_date = new Date();new_date.setDate(new_date.getDate());var day = new_date.getDate();var month = parseInt(new_date.getMonth(), 10) + 1;if (month < 10) {month = '0' + month;}var year = new_date.getFullYear();get_calendar(year + '-' + month + '-' + day);});jQuery('#atb_booknow').off('click');jQuery('#atb_booknow').on('click', function () {book_clicked();});}});function book_clicked() {var category = parseInt(jQuery('#atb_anytime').data('category'), 10);var unit = parseInt(jQuery('#atb_unit_selection').val(), 10);var booking_url = url1 + jQuery('#atb_anytime').data('url') + url3;var arrival_date = jQuery('#atb_booknow').data('date');var period = jQuery('#atb_booknow').data('period');var availability_type = parseInt(jQuery('#atb_unit_selection').find(':selected').data('availability_type'), 10);var enquiry_form = parseInt(jQuery('#atb_unit_selection').find(':selected').data('enquiry_form'), 10);if (enquiry_form == 1) {booking_url += '/enquiry/placeEnquiry/' + category + '/' + unit + '/' + arrival_date + '/' + period + '/';} else {if (availability_type == 4)booking_url += '/place_booking/preset3/' + category + '/' + unit + '/' + arrival_date + '/';elsebooking_url += '/place_booking/preset/' + category + '/' + unit + '/' + arrival_date + '/' + period + '/';}// Start Google Analytics Linkervar gobj = window[window.GoogleAnalyticsObject];var tracker;if (gobj) {tracker = gobj.getAll()[0];var linkerParam = tracker.get('linkerParam');booking_url = booking_url + '?' + linkerParam;}// End Google Analytics Linkerwindow.open(booking_url, '_blank');}function day_clicked(date, period) {jQuery('#atb_loading').html('
Loading...
').show();jQuery('#atb_booknow').data('date', date);jQuery('#atb_booknow').data('period', period);jQuery('#atb_reset-selection').hide();jQuery('#atb_booknow').hide();var unit = parseInt(jQuery('#atb_unit_selection').val(), 10);jQuery.ajax({url: url1 + jQuery('#atb_anytime').data('url') + url3 + '/calendar/prices/',data: {date: date,unit: unit,los: period,all_los: true},success: function (data) {var json_data = jQuery.parseJSON(data);var message = '';if (json_data.good) {jQuery('#atb_booknow').data('period', json_data.period);message += '
You have selected ' + json_data.dates + '';if (parseInt(json_data.prices.length, 10) > 1) {jQuery.each(json_data.prices, function (i, item) {if (parseInt(item.price_unformatted, 10) > 0) {message += '
' + item.price + ' for ' + item.party_size + ' people';}});} else {if (parseInt(json_data.prices[0].price_unformatted, 10) > 0) {message += ', price ' + json_data.prices[0].price + '';}}message += '
';jQuery('#atb_loading').html(message).show();jQuery('#atb_reset-selection').show();jQuery('#atb_booknow').show();} else {message += '
There was an unexpected problem.
';jQuery('#atb_loading').html(message).show();jQuery('#atb_reset-selection').hide();jQuery('#atb_booknow').hide();}}});}function prev_month() {reset();if (jQuery('#atb_prev').data('month')) {clear_selection();get_calendar(jQuery('#atb_prev').data('month'));} else {alert('Please refresh this page');}}function next_month() {reset();if (jQuery('#atb_next').data('month')) {clear_selection();get_calendar(jQuery('#atb_next').data('month'));} else {alert('Please refresh this page');}}function get_rates(id, this_los, running_cost) {jQuery('#cal_' + id).data('mycost', this_los + ' nights £' + running_cost);if (jQuery('#cal_' + id).data('rates')) {var costs = jQuery('#cal_' + id).data('rates');var all_costs = costs.toString().split(',');var los = jQuery('#cal_' + id).data('los');var all_los = los.toString().split(',');jQuery.each(all_los, function (i, item) {if (item == 7) {los_allowed.push(this_los + 7);running_cost = (running_cost - 0) + (all_costs[i] - 0);if (this_los <= 28) {get_rates(id + 7, this_los + 7, running_cost);}}});}}function setup_first_click() {jQuery('.start').off('click');jQuery('.start').on('click', function () {if (!jQuery('#atb_anytime').attr('data-read_only')) {var availability_type = parseInt(jQuery('#atb_unit_selection').find(':selected').data('availability_type'), 10);var enquiry_form = parseInt(jQuery('#atb_unit_selection').find(':selected').data('enquiry_form'), 10);var category = 0;var unit = 0;var url = '';var arrival_date = '';var booking_url = '';var enquiry_url = '';if (availability_type == 4) {jQuery('.cell').removeClass('selection');jQuery(this).addClass('selection');unit = parseInt(jQuery('#atb_unit_selection').val(), 10);url = url1 + jQuery('#atb_anytime').data('url') + url3;arrival_date = jQuery(this).data('date');jQuery.ajax({url: url + '/place_booking/timeSlotTypes/' + unit + '/',async: false,dataType: 'json',success: function (timeslot_type_data) {jQuery('#atb_loading').children().remove();if (parseInt(timeslot_type_data.length, 10) > 0) {jQuery.each(timeslot_type_data, function (i, item) {jQuery('#atb_loading').append('
' + item.name + '
');jQuery.ajax({url: url + '/place_booking/timeSlots/' + unit + '/' + arrival_date + '/' + item.id + '/',async: false,dataType: 'json',success: function (timeslot_data) {jQuery.each(timeslot_data, function (j, timeslot_item) {jQuery('#atb_loading').append('
' + timeslot_item.short_time + ' to ' + timeslot_item.short_time2 + ' - ' + timeslot_item.level + ' spaces
');});jQuery('#atb_booknow').data('date', arrival_date);jQuery('#atb_loading').show();jQuery('#atb_reset-selection').hide();jQuery('#atb_booknow').show();}});});} else {jQuery.ajax({url: url + '/place_booking/timeSlots/' + unit + '/' + arrival_date + '/',async: false,dataType: 'json',success: function (timeslot_data) {jQuery.each(timeslot_data, function (i, item) {jQuery('#atb_loading').append('
' + item.short_time + ' to ' + item.short_time2 + ' - ' + item.level + ' spaces
');});jQuery('#atb_booknow').data('date', arrival_date);jQuery('#atb_loading').show();jQuery('#atb_reset-selection').hide();jQuery('#atb_booknow').show();}});}}});} else if (months == 1 && availability_type < 4) {jQuery('.cell').removeClass('selection');jQuery(this).addClass('selection');var url = url1 + jQuery('#atb_anytime').data('url') + url3;if (enquiry_form == 1) {category = parseInt(jQuery('#atb_anytime').data('category'), 10);unit = parseInt(jQuery('#atb_unit_selection').val(), 10);arrival_date = jQuery(this).data('date');period = 0;enquiry_url = url + '/enquiry/placeEnquiry/' + category + '/' + unit + '/' + arrival_date + '/' + period + '/';// Start Google Analytics Linkervar gobj = window[window.GoogleAnalyticsObject];var tracker;if (gobj) {tracker = gobj.getAll()[0];var linkerParam = tracker.get('linkerParam');enquiry_url = enquiry_url + '?' + linkerParam;}// End Google Analytics Linkerwindow.open(enquiry_url, '_blank');} else {category = parseInt(jQuery('#atb_anytime').data('category'), 10);unit = parseInt(jQuery('#atb_unit_selection').val(), 10);url = url1 + jQuery('#atb_anytime').data('url') + url3;arrival_date = jQuery(this).data('date');booking_url = url + '/place_booking/preset/' + category + '/' + unit + '/' + arrival_date + '/';// Start Google Analytics Linkervar gobj = window[window.GoogleAnalyticsObject];var tracker;if (gobj) {tracker = gobj.getAll()[0];var linkerParam = tracker.get('linkerParam');booking_url = booking_url + '?' + linkerParam;}// End Google Analytics Linkerwindow.open(booking_url, '_blank');}} else {jQuery(this).addClass('selection');if (start_select == -1) {jQuery('.start').addClass('was_start');jQuery('.start').removeClass('start');jQuery('.start').off();start_select = jQuery(this).prop('id').substr(4) - 0;var max = 29;for (var n = 1; n <= max; n++) {if (jQuery('#cal_' + (start_select + n)).hasClass('first_cell') && max == 29) {max = n;}}var los_allowed = [];if (isNaN(jQuery(this).data('los'))) {los_allowed = jQuery(this).data('los').toString().split(',');} else {los_allowed[0] = parseInt(jQuery(this).data('los'), 10);}var last_los = 28;for (var i = 0; i < los_allowed.length; i++) {if (los_allowed[i] !== '') {if (parseInt(los_allowed[i], 10) < last_los)min_los = los_allowed[i];}last_los = los_allowed[i];}jQuery('#atb_loading').html('Now click on your departure date 00. There is a minimum stay of ' + min_los + ' nights.').show();var costs = [];if (isNaN(jQuery(this).data('rates'))) {costs = jQuery(this).data('rates').toString().split(',');} else {costs[0] = parseInt(jQuery(this).data('rates'), 10);}var has_week = false;var week_cost = 0;jQuery.each(los_allowed, function (i, item) {if (item > 0) {if (item == 7) {has_week = true;week_cost = costs[i];}jQuery('#cal_' + (start_select + (item - 0))).data('mycost', item + ' nights £' + costs[i]);}});if (has_week) {get_rates((start_select + 7), 7, week_cost);}jQuery.each(los_allowed, function (i, item) {if (item > 0 && item < max) {jQuery('#cal_' + (start_select + (item - 0))).addClass('good_los');}});jQuery('.good_los').each(function () {jQuery(this).addClass('start');});setup_second_click();}}} else {alert('Please contact us to book.');}});}function setup_second_click() {jQuery('.good_los').each(function () {jQuery(this).off('mouseover');jQuery(this).on('mouseover', function () {last_mouseover = jQuery(this).prop('id').substr(4) - 0;for (var n = start_select; n <= last_mouseover; n++) {jQuery('#cal_' + n).addClass('selection');}});jQuery(this).off('mouseout');jQuery(this).on('mouseout', function () {if (last_mouseover != -1) {for (var n = start_select + 1; n <= last_mouseover; n++) {jQuery('#cal_' + n).removeClass('selection');}}});jQuery(this).off('click');jQuery(this).on('click', function () {var this_date = jQuery('#cal_' + start_select).data('date');var this_los = (last_mouseover - start_select);day_clicked(this_date, this_los);jQuery('.good_los').each(function () {jQuery(this).off();jQuery(this).removeClass('good_los start');});});});}function reset() {start_select = -1;jQuery('.good_los').each(function () {jQuery(this).removeClass('good_los');jQuery(this).data('mycost', '');jQuery(this).off();});jQuery('.was_start').each(function () {jQuery(this).removeClass('was_start');jQuery(this).addClass('start');});for (var n = start_select; n <= last_mouseover; n++) {jQuery('#cal_' + n).removeClass('selection');}setup_first_click();jQuery('#atb_loading').hide();jQuery('#atb_reset-selection').hide();jQuery('#atb_booknow').hide();clear_selection();}function clear_selection() {if (document.selection) {document.selection.empty();} else if (window.getSelection) {window.getSelection().removeAllRanges();}jQuery('#atb_loading').html('Click on an arrival date highlighted in bold to begin your booking.').show();}function get_calendar(date) {jQuery('#atb_loading').html('
Loading...
').show();jQuery('#atb_booknow').hide();var show_diagonals = 1;if (jQuery('#atb_anytime').attr('data-hide_diagonals')) {show_diagonals = 0;}var show_provisionals = 0;if (jQuery('#atb_anytime').attr('data-show_provisionals')) {show_provisionals = 1;}var unit = parseInt(jQuery('#atb_unit_selection').val(), 10);var availability_type = parseInt(jQuery('#atb_unit_selection').find(':selected').data('availability_type'), 10);var enquiry_form = parseInt(jQuery('#atb_unit_selection').find(':selected').data('enquiry_form'), 10);if (enquiry_form == 1) {jQuery('#atb_booknow').html('Enquire');} else {jQuery('#atb_booknow').html('Book Now');}jQuery.ajax({url: url1 + jQuery('#atb_anytime').data('url') + url3 + '/calendar/cal/',data: {date: date,dow: 0,unit: unit,months: months},success: function (data) {var json_data = jQuery.parseJSON(data);var calendar_count = 0;var cell_number = 0;var counter = 1;var sub_counter = 0;var week_counter = 0;var last_type = '';var last_discounted = 0;var last = 1;if (json_data.good) {var calendar_string = '';jQuery('#atb_prev').data('month', json_data.prev);jQuery('#atb_next').data('month', json_data.next);var sub_calendar = 1;jQuery.each(json_data.cal, function (i, item) {if (item[0] == 'som') {var month_name = JSON.stringify(item[1]).toLowerCase();month_name = month_name.charAt(1).toUpperCase() + month_name.slice(2, -1);jQuery('#monthname' + sub_calendar).html(month_name);calendar_string += '
';calendar_string += '
S
M
T
W
T
F
S
';calendar_string += '
';}if (item[0] == 'sow') {calendar_string += '
';}if (item[0] == 'eow') {calendar_string += '
';}if (item[0] == 'f') {calendar_string += '
';}if (item[0] == 'p') {calendar_string += '
' + item[1] + '
';last = 0;}if (item[0] == 'c') {if (last == 1 && availability_type < 4) {calendar_string += '
' + item[1] + '
';cell_number++;} else {calendar_string += '
' + item[1] + '
';}last = 0;}if (item[0] == 'b') {if (availability_type < 4) {if (last == 1) {calendar_string += '
' + item[1] + '
';} else {if (show_provisionals == 1) {if (show_provisionals == 1 && parseInt(item[7], 10) > 0 && availability_type == 1) {calendar_string += '
' + item[1] + '
';last_type = 'provisional';} else {calendar_string += '
' + item[1] + '
';last_type = 'booked';}} else {calendar_string += '
' + item[1] + '
';last_type = 'booked';}}cell_number++;} else {calendar_string += '
' + item[1] + '
';last_type = 'booked';}last = 0;}if (item[0] == 'a') {calendar_string += '
' + item[1] + '
';last = 1;cell_number++;}if (item[0] == 's') {calendar_rates = '';calendar_los = '';jQuery.each(item[3], function (ii, los_item) {//if (parseInt(los_item.rate, 10) > 0) {if (parseInt(calendar_rates.length, 10) > 0) {calendar_rates += ',';}calendar_rates += los_item.rate;//}});var tooltip = '';jQuery.each(item[3], function (ii, los_item) {//if (parseInt(los_item.rate, 10) > 0) {tooltip += los_item.duration + ' nights £' + los_item.rate + "\n";if (parseInt(calendar_los.length, 10) > 0) {calendar_los += ',';}calendar_los += los_item.duration;//}});calendar_string += '
';calendar_string += '
' + item[1] + '
';last = 1;cell_number++;}if (item[0] == 'eom') {jQuery('#calender_content' + sub_calendar).children().remove();jQuery('#calender_content' + sub_calendar).html(calendar_string);calendar_string = '';calendar_count++;sub_calendar++;}last_discounted = parseInt(item[8], 10);});jQuery('#atb_loading').hide();jQuery('#atb_loading').html('To start your booking click on an arrival date 00').show();if (availability_type == 4) {jQuery('#atb_reset-selection').hide();}setup_first_click();// move on if no availabilityif (typeof jQuery('#atb_anytime').data('calendar_month_count') === 'undefined') {if (availability_type == 4) {jQuery('#atb_anytime').data('calendar_availability_found', 1);} else {jQuery('#atb_anytime').data('calendar_availability_found', 0);}jQuery('#atb_anytime').data('calendar_month_count', 0);}if (parseInt(jQuery('.atb_calendar_content:first').find('.start').length, 10) === 0) {if (parseInt(jQuery('#atb_anytime').data('calendar_availability_found'), 10) === 0) {var calendar_month_count = parseInt(jQuery('#atb_anytime').data('calendar_month_count'), 10) + 1;jQuery('#atb_anytime').data('calendar_month_count', calendar_month_count);if (calendar_month_count <= 12) {next_month();}}} else {jQuery('#atb_anytime').data('calendar_availability_found', 1);}} else {alert('Refresh this page');}}});}