/*
 * "Main function" for Wolgan Valley booking engine.
 *
 * $Id: main.js 2943 2009-10-22 03:03:47Z jeffery.to@wwwins.com $
 */

if (!ibe.constants.canInit) {
	location.replace(ibe.constants.replacementUrl);
}

ibe.Booking.flashDetails.swf = '/media_v2/wolgan-valley/galleryIbe.swf';

ibe.BookingController.HOTEL = '8';

ibe.BookingController.INITIAL_PREFERRED_CURRENCY = 'AUD';

ibe.BookingController.MIN_NUM_DAYS_FROM_TODAY = 2;

ibe.Omniture.PAGE_NAME_PREFIX = 'ekhr::wolganvalley:reservations:';

ibe.Error.DEFAULT_PROFILE.message = [
	'<p>', _('Dear Guest,'), '</p>',
	'<p>', _('Our booking engine is currently offline for maintenance. We apologise for the inconvenience.'), '</p>',
	'<p>',
		_('Please contact our Reservations Team on'), '<br />',
		'<br />',
		_('Tel: +61 2 6350 1800'), '<br />',
		_('Fax: +61 2 6350 1801 '), '<br />',
		'<br />',
		_('Email:'), ' <a href="mailto:reservations@wolganvalley.com">reservations@wolganvalley.com</a>',
	'</p>'
].join('');

ibe.Error.PROFILES[ibe.Error.CODE_WBE_RESERVATION_NUMBER_INVALID].message = _('This reservation has not been made online.') + ' ' + _('If you have booked directly with Emirates Hotels &amp; Resorts, please contact our reservations team on tel: +61 2 6350 1800 for cancellations.');

ibe.Error.PROFILES[ibe.Error.CODE_WBE_RESERVATION_ALREADY_CANCELLED].message = _('Your reservation has already been cancelled.') + ' ' + _('For assistance, please contact our reservations team on tel: +61 2 6350 1800.');

ibe.Error.PROFILES[ibe.Error.CODE_WBE_ARRIVAL_TOO_CLOSE].message =
	_('Please note that bookings within 48 hours of arrival date cannot be made online. Please contact reservations on tel: +61 2 9290 9733.');



jlib.contrib.Events.add(jlib.contrib.Onload, 'DOMContentLoaded',
	ibe.Booking.init);
if (!(jlib.contrib.BrowserDetect.browser == 'Netscape' &&
		jlib.contrib.BrowserDetect.version < 8)) {
	// avoid https://bugzilla.mozilla.org/show_bug.cgi?id=261998
	// this may mean temporary reservations won't be properly cancelled
	// what i really need is a way to detect gecko versions...
	jlib.contrib.Events.add(window, 'beforeunload', ibe.Booking.uninit);
}
jlib.contrib.Events.add(window, 'unload', ibe.Booking.uninit);

