FC.vars = {
	selectors : {
		EXTRA_TEXT : '.extraText',
		EXTRA_REASONS : '.extraReasons',
		TEXT_LINK : '.textLink a',
		REASONS_LINK : '.reasonsLink a',
		SCROLL_LOC : '.scrollLoc',
		LINK_LIST : '.link-list',
		INFO_LIST : '.info-list',
		LOC_INFO : '.location-info .padding',
		FILTER_LETTER : '.alpha-list li a',
		FILTER_POPULAR : '.filter-popular',
		FILTER_ALL : '.filter-all',
		FILTER_AIRPORT : '.filter-airport',
		MAP_POINT : '#map-content div'
	},
	map : {
		markers : [],
		filterValue : '',
		expandLocations : false
	},
	weather : {
		mapCentreLat : '',
		mapCentreLng : ''
	}
}

FC.gMapInit = function (setts) {
	var __g, __map, __nodes,
		__points = setts.points,
		__pageType = setts.pageType,
		__gdiv = document.getElementById(setts.gdiv),
		__bounds = new GLatLngBounds();
		
	function collectNodes () {
		for (__j in __points) if(__points.hasOwnProperty(__j)){
			__element = document.getElementById(setts.gid + __j);
			
			__element.className = ''; // there are divs in the page with ids 'point_a', 'point_b', etc...
			__points[__j].node = __element.cloneNode(true); // creates a new attribute on the current __points child
			__points[__j].ident = 'ident_' + __j;
			__points[__j].title = $(__element).find('h3').html();
			__points[__j].filter = $(__element).find('h3').html().substr(0,1);
			// __points[__j].popular = $(__element).find('h3').hasClass('popular');
			(__j.substr(3,1) == 'T') || (__j.substr(3,1) == 'O') ? __points[__j].airport = true : __points[__j].airport = false;
			//__points[__j].href = $(__element).find('a').attr('href');
		}
	}
	
	function insertMap (ll) {
		__gdiv.className = "gmap";
		__gdiv.style.display = 'block';
		__gdiv.style.padding = '0';
		__mapTypes = G_DEFAULT_MAP_TYPES;
		for(var i = 0; i < __mapTypes.length; i++){
			__mapTypes[i].getMaximumResolution = function(latlng){ return setts.maximumResolution;};
			__mapTypes[i].getMinimumResolution = function(latlng){ return setts.minimumResolution;};
		}
		__map = new __g.Map2(__gdiv, {mapTypes: __mapTypes});
		
		if (setts.locale) {
			__map.setCenter(new __g.LatLng(setts.locale.a, setts.locale.b), setts.locale.c);
		} else {
			__map.setCenter(new __g.LatLng(0, 0), 0);
		}
		__map.addControl(new GMapTypeControl());
	}

	function addPoints () {
		var __o, __marker, __icon = new GIcon(), __iconAir = new GIcon(),__ll;      
		
		__icon.shadow = setts.markerShadow;
		__icon.iconSize = new GSize(19, 34);
		__icon.shadowSize = new GSize(37, 34);
		__icon.iconAnchor = new GPoint(9, 34);
		__icon.infoWindowAnchor = new GPoint(9, 2);
		__icon.infoShadowAnchor = new GPoint(18, 25);
		__icon.image = setts.marker;
		__icon.imageOn = setts.markerOn;
		
		__iconAir.shadow = setts.markerShadow;
		__iconAir.iconSize = new GSize(19, 34);
		__iconAir.shadowSize = new GSize(37, 34);
		__iconAir.iconAnchor = new GPoint(9, 34);
		__iconAir.infoWindowAnchor = new GPoint(9, 2);
		__iconAir.infoShadowAnchor = new GPoint(18, 25);
		__iconAir.image = setts.markerAir;
		__iconAir.imageOn = setts.markerOnAir;
		
		
		function createMarker(__o) {
			var __iconType;
			
		  	__ll = new __g.LatLng(__o.lat, __o.lng)
			if(__o.airport){
				__iconType = __iconAir;
			}else{
				__iconType = __icon;
			}
			__bounds.extend(__ll)
			
			FC.vars.map.markers['ident_' + __j] = __marker = new __g.Marker(__ll, {icon : __iconType});
			__g.Event.addListener(__marker, "infowindowclose", function() {
				this.setImage(__iconType.image);
				deselectLeftColumnElements();
				
			});	
			__g.Event.addListener(__marker, "infowindowopen", function() {
				this.setImage(__iconType.imageOn);
				selectLeftColumnElement(__o.ident);
			});
			__g.Event.addListener(__marker, "mouseover", function() {
				this.setImage(__iconType.imageOn);
			});
			__g.Event.addListener(__marker, "mouseout", function() {
				this.setImage(__iconType.image);
			});
			
		  return __marker;
		}

		if (__pageType !== 'locat'){
			for (__j in __points) if (__points.hasOwnProperty(__j)) {
				__o = __points[__j];
				if(__o.filter == FC.vars.map.filterValue){
					__map.addOverlay(createMarker(__o));
					if (__pageType !== 'location') __marker.bindInfoWindow(__o.node, {maxWidth : setts.infoWindowMaxWidth});
				} else if(FC.vars.map.filterValue == ''){
					__map.addOverlay(createMarker(__o));
					if (__pageType !== 'location') __marker.bindInfoWindow(__o.node, {maxWidth : setts.infoWindowMaxWidth});
				}	
			}
		}
		__map.setUIToDefault();
		__map.enableScrollWheelZoom();
		__map.setZoom(__map.getBoundsZoomLevel(__bounds));
		__map.setCenter(__bounds.getCenter());

		FC.vars.weather.mapCentreLat = __bounds.getCenter().lat();
		FC.vars.weather.mapCentreLng = __bounds.getCenter().lng();
	}
	
	function expandLocations(){
		$('.expandLocations').bind('change click', function(){
			if($(this).find('input#expandLocations_false').attr('checked')){
				FC.vars.map.expandLocations = false;
				$('.info-list').accordion({
					header: 'h4',
					event: 'mouseover'
				});
			} else{				
				FC.vars.map.expandLocations = true;
				$('.info-list').accordion('destroy');
			}
		});		
	}
	
	function countryListSimple (filterValue) {
		
		$(FC.vars.selectors.FILTER_LETTER).unbind();
		$(FC.vars.selectors.FILTER_ALL).unbind();
		
		$(FC.vars.selectors.FILTER_LETTER).each(function(){
			$(this).addClass('span').removeAttr('href');
			
			__filterLetter = $(this).html();
			__searchFilter = false;
			
			$('.link-list a').each(function(){
				if($(this).html().substr(0,1) == __filterLetter){
					__searchFilter = true;
				}
			
			});
			
			//alert('letter: ' + $(this).html() + ' and search: ' + __searchFilter);
			
			if(($(this).html() != filterValue) && (__searchFilter == true)){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 hideCountries($(this).text());
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});
		
		$(FC.vars.selectors.FILTER_ALL).each(function(){
			$(this).addClass('span').removeAttr('href');
			if(filterValue != ''){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 hideCountries('');
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});
		
	};
	
	function hideCountries(filter){
		FC.vars.map.filterValue = filter;
		__infoWindow = __map.getInfoWindow();
		__infoWindow.hide();
		$('.link-list a').each(function(){
				if(($(this).html().substr(0,1) == filter) || (filter == '')){
					$(this).parents('li').css('display', 'block');
				} else {
					$(this).parents('li').css('display', 'none');
				}
			
			});
		
			countryListSimple(filter);
		
	};
	
	function countryListInit (filterValue) {
		if (!($(FC.vars.selectors.LINK_LIST).length)) {
			$('<ul></ul>').addClass("link-list").appendTo($(FC.vars.selectors.SCROLL_LOC))
		}
		countryListPopulate();
		$(FC.vars.selectors.FILTER_LETTER).unbind();
		//$(FC.vars.selectors.FILTER_POPULAR).unbind();
		$(FC.vars.selectors.FILTER_ALL).unbind();
		
		$(FC.vars.selectors.FILTER_LETTER).each(function(){
			$(this).addClass('span').removeAttr('href');
			
			__filterLetter = $(this).html();
			__searchFilter = false;
			
			//$('.link-list a').each(function(){
//				if($(this).html().substr(0,1) == __filterLetter){
//					__searchFilter = true;
//				}
//			
//			});
			
			for (__j in __points) if (__points.hasOwnProperty(__j)) {
				__o = __points[__j];
				if(__o.filter == __filterLetter){
					__searchFilter = true;
				}
			}
			
			//alert('letter: ' + $(this).html() + ' and search: ' + __searchFilter);
			
			if(($(this).html() != filterValue) && (__searchFilter == true)){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 filterResults($(this).text());
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});
		/*$(FC.vars.selectors.FILTER_POPULAR).each(function(){
			$(this).addClass('span').removeAttr('href');
			if(filterValue != 'POPULAR'){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 filterResults('POPULAR');
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});*/
		$(FC.vars.selectors.FILTER_ALL).each(function(){
			$(this).addClass('span').removeAttr('href');
			if(filterValue != ''){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 filterResults('');
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});
	}
	
	function cityListInit (filterValue) {
		if (!($(FC.vars.selectors.INFO_LIST).length)) {
			$('<div></div>').addClass("info-list").appendTo($(FC.vars.selectors.SCROLL_LOC))
		}
		cityListPopulate();
		expandLocations();
		
		$(FC.vars.selectors.FILTER_AIRPORT).unbind();
		$(FC.vars.selectors.FILTER_ALL).unbind();
		
		$(FC.vars.selectors.FILTER_AIRPORT).each(function(){
			$(this).addClass('span').removeAttr('href');
			if(filterValue != 'AIRPORT'){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 $('.info-list').accordion('destroy');
					 filterResults('AIRPORT');
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});		
		
		$(FC.vars.selectors.FILTER_ALL).each(function(){
			$(this).addClass('span').removeAttr('href');
			if(filterValue != ''){
				$(this).bind('focus click', function () {
					 $(this).unbind().addClass('span').removeAttr('href');
					 $('.info-list').accordion('destroy');
					 filterResults('');
					 return false;
				});
				$(this).removeClass('span').attr('href', '#');
			}
		});
	}
	
	function countryListPopulate(){
		for (__j in __points) if (__points.hasOwnProperty(__j)) {
			__o = __points[__j];
			if((FC.vars.map.filterValue == '') || (FC.vars.map.filterValue == __o.filter) || ((FC.vars.map.filterValue == 'POPULAR') && (__o.popular == true))){
				$('<li></li>').attr('id', 'ident_' + __j).html(__o.title).bind('focus click', function(){
					__g.Event.trigger(FC.vars.map.markers[$(this).attr('id')], "click");
					return false;
				}).hover(
					function () {
				        $(this).addClass("hover");
      				}, 
      				function () {
        				$(this).removeClass("hover");
      				}).appendTo($(FC.vars.selectors.LINK_LIST));
				}
			}
		}
	
	function cityListPopulate(){
		for (__j in __points) if (__points.hasOwnProperty(__j)) {
			__o = __points[__j];
			if((FC.vars.map.filterValue == '') || ((FC.vars.map.filterValue == 'AIRPORT') && (__o.airport == true))){
				if(__o.airport){
					$('<h4></h4>').html(__o.title).attr('id', 'ent_' + __j).addClass('h5').addClass('airport').bind('mouseenter', function(){
						$(this).addClass("hover");
						$(this).next("div").addClass("hover");
						__g.Event.trigger(FC.vars.map.markers['id' + $(this).attr('id')], "mouseover");
						return false;
					}).bind('mouseleave', function(){
						$(this).removeClass("hover");
						$(this).next("div").removeClass("hover");
						__g.Event.trigger(FC.vars.map.markers['id' +$(this).attr('id')], "mouseout");
						return false;
					}).appendTo($(FC.vars.selectors.INFO_LIST));
					
				} else {
					$('<h4></h4>').html(__o.title).attr('id', 'ent_' + __j).addClass('h5').bind('mouseenter', function(){
						$(this).addClass("hover");
						$(this).next("div").addClass("hover");
						__g.Event.trigger(FC.vars.map.markers['id' +$(this).attr('id')], "mouseover");
						return false;
					}).bind('mouseleave', function(){
						$(this).removeClass("hover");
						$(this).next("div").removeClass("hover");
						__g.Event.trigger(FC.vars.map.markers['id' +$(this).attr('id')], "mouseout");
						return false;
					}).appendTo($(FC.vars.selectors.INFO_LIST));
				};
				$('<div></div>').attr('id', 'ident_' + __j).addClass('clear').html(__o.node.innerHTML).bind('mouseenter', function(){
					$(this).addClass("hover");
					$(this).prev("h4").addClass("hover");
					__g.Event.trigger(FC.vars.map.markers[$(this).attr('id')], "mouseover");
					return false;
				}).bind('mouseleave', function(){
					$(this).removeClass("hover");
					$(this).prev("h4").removeClass("hover");
					__g.Event.trigger(FC.vars.map.markers[$(this).attr('id')], "mouseout");
					return false;
				}).appendTo($(FC.vars.selectors.INFO_LIST));
				
				$('#ident_' + __j).find('h3').remove();
				$('#ident_' + __j).find('input')[0].src = 'seo-images/but-book.gif';
				
				$('<a></a>').addClass('zoom').html('zoom to location').insertAfter('#ident_' + __j + ' input.bookButton').bind('click', function(){																																												
						__map.setCenter(FC.vars.map.markers[$(this).parents('div').attr('id')].getLatLng());	
						__map.setZoom(13);
				});

			}
		}
		if(FC.vars.map.expandLocations == false){
			$('.info-list').accordion({
				header: 'h4',
				event: 'mouseover'
			});
		}
	}
	
	function locationListPopulate () {
		for (__j in __points) if (__points.hasOwnProperty(__j)) {
			__o = __points[__j];
			if((FC.vars.map.filterValue == '') || (FC.vars.map.filterValue == __o.filter) || ((FC.vars.map.filterValue == 'POPULAR') && (__o.popular == true))){
				$('<div></div>').attr('class', 'ident_' + __j).html(__o.node.innerHTML).appendTo($(FC.vars.selectors.LOC_INFO));
				//$(FC.vars.selectors.LOC_INFO).find('input').attr('src', 'seo-images/but-book.gif');
				$(FC.vars.selectors.LOC_INFO).find('input')[0].src = 'seo-images/but-book.gif';
				//__g.Event.trigger(FC.vars.map.markers['ident_' + __j], "click");
			}
		}
	}
	
	function filterResults(filter){
		FC.vars.map.filterValue = filter;
		__infoWindow = __map.getInfoWindow();
		__infoWindow.hide();
		for (__j in __points) if (__points.hasOwnProperty(__j)) {
			__g.Event.trigger(FC.vars.map.markers['ident_' + __j], 'infowindowclose');
			__o = __points[__j];
			FC.vars.map.markers['ident_' + __j].show();
			if ((filter != 'AIRPORT') && (filter != 'POPULAR') && (filter != '') && (__o.filter != filter)){
				FC.vars.map.markers['ident_' + __j].hide();
			} else if ((filter == 'POPULAR') && (__o.popular != true)){
				FC.vars.map.markers['ident_' + __j].hide();
			} else if ((filter == 'AIRPORT') && (__o.airport != true)){
				FC.vars.map.markers['ident_' + __j].hide();
			}
		}
		
		
		if(__pageType == 'country'){
			$(FC.vars.selectors.LINK_LIST).empty();
			countryListInit(filter);
		} else if (__pageType == 'city'){
			$(FC.vars.selectors.INFO_LIST).empty();
			cityListInit(filter);
		}
		
	}
	
	function selectLeftColumnElement(point){
		$('.scrollLoc li').each(function(e){
			$(this).removeClass('hlt');
		});
		_point = '.scrollLoc li#' + point;
		$(_point).addClass('hlt');
	}
	
	function deselectLeftColumnElements(){
			$('.scrollLoc li').each(function(e){
				$(this).removeClass('hlt');
			});
		
	}
	
	var init = function() { 
		$(window).bind('unload', __g.Unload);
		
		collectNodes();
		insertMap();//calculateSetCentre()
		addPoints();
		if(__pageType == 'country'){
			//countryListInit(FC.vars.map.filterValue);
			countryListSimple(FC.vars.map.filterValue);
		} else if (__pageType == 'city'){
			cityListInit(FC.vars.map.filterValue);
		} else if (__pageType == 'location'){
			locationListPopulate();
		}
	}
	
	if (__gdiv) {
		__g = google.maps;
		
		if (__g.BrowserIsCompatible()) {init()}	
	} 
	
	init = insertMap = addPoints = collectNodes = null;
};

FC.panelInit = function(){
	var __$extraText = $(FC.vars.selectors.EXTRA_TEXT),
		__$extraReasons = $(FC.vars.selectors.EXTRA_REASONS),
		_onClickHandler; 
	
	if(__$extraText.length && __$extraReasons.length){
		//add some links and make them clickable
		__$extraText
			.css('display', 'none')
			.after('<div class="textLink"><a href="#" class="closed">' + FC.vars.inpage.strings.extraText + '</a></div>');
		__$extraReasons
			.css('display', 'none')
			.after('<div class="reasonsLink"><a href="#" class="closed">' + FC.vars.inpage.strings.extraReasons + '</a></div>');
		
		_onClickHandler = function () {
			if($(this).attr('class') == 'closed'){
				$(FC.vars.selectors.EXTRA_REASONS+','+FC.vars.selectors.EXTRA_TEXT).slideDown('slow');
				$(FC.vars.selectors.TEXT_LINK+','+FC.vars.selectors.REASONS_LINK).removeClass('closed').addClass('open').text('Show less text');
			} else {
				$(FC.vars.selectors.EXTRA_REASONS+','+FC.vars.selectors.EXTRA_TEXT).slideUp('slow');
				$(FC.vars.selectors.REASONS_LINK).removeClass('open').addClass('closed').text(FC.vars.inpage.strings.extraReasons);
				$(FC.vars.selectors.TEXT_LINK).removeClass('open').addClass('closed').text(FC.vars.inpage.strings.extraText);
			}
			return false;
		}
		
		$(FC.vars.selectors.TEXT_LINK+','+FC.vars.selectors.REASONS_LINK).click(_onClickHandler);
	}
};

FC.namespaceInpageVars = function () {
	this.setJS();
	
	// push inpage variables into the FC Object.
	if (inpage) {
		FC.vars.inpage = new Object(inpage);
		delete inpage;
	}
};

FC.pageInit = function () {
	
	this.setJS();
	this.pngFix();
	this.namespaceInpageVars();
};

FC.tidyVariables = function () {
	
	//alert(FC.vars.inpage.gmapSettings.points.length)
}
/* calendar booking pod specific ===starting point=== */
var ACL = {
	
	hideCalendar : function (e, cal) {
		var __returnFalse = false;
		
		if (e.target.className == 'cal-input'){ // if the target is the input field
			__returnFalse = true;
		}
		
		if ($(e.target).parents(".cal-popup").length) { // if the target is a child of the pop-up
			__returnFalse = true;
		}
		
		if ($(e.target)[0].tagName == 'A' && $(e.target).text().indexOf('Month') != -1) { // // if the target is one of the 'Month' buttons on the popup
			__returnFalse = true;
		}
		
		if ($(e.target)[0].className) { // if the target is the 'close-cal' div
			if ($(e.target)[0].className.indexOf("close-cal") != -1) {
				__returnFalse = false;
			}
		}
		
		if ($(e.target).parents(".close-cal").length) { // if the target is a child of the 'close-cal' div
			__returnFalse = false;
		}

		if (__returnFalse) {
			return false;
		}
		
		$('body').unbind("click", function () {ACL.hideCalendar()});		
		/*@cc_on @*/ 
			/*@if (@_jscript_version <= 5.7) 
				$('.cal-popup', cal).bgiframe().hide();  
			@else @*/ 
				$('.cal-popup', cal).hide(); 
		/*@end @*/
		return false;
	},
	calendar: function(){
		$.getScript("seo-javascript/jquery-ui-personalized-1.5.3.packed.js", function(){
			/*@cc_on
				@if (@_jscript_version <= 5.7) 
					$.getScript('seo-javascript/jquery.bgiframe.min.js'); 
				@end 
			@*/
			
			$('.content.calendar').each(function(){
				var theCal = $(this)[0];
				
				function setDates (input) {}
				
				$(".cal-content", theCal).datepicker({ 
					changeMonth: false,
					changeYear: false,
					closeAtTop: false, 
					closeText: 'close',
					dateFormat: "dd/mm/yy",
					dayNamesMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
					duration: "", 
					firstDay: 1,
					minDate: '0d',
					maxDate: '+2y',
					mandatory: true,
   					nextText: "Next Month",
					numberOfMonths: 2, 
					onSelect: function(date) { 
						$('.cal-input', theCal).val(date);
						$('.cal-popup',theCal).toggle();
    				},
					prevText: "Previous Month", 
					rangeSelect: false
				}).children("div").css({ width : "390px",position:"absolute"});
				
				$('.choose-date').show();
				$('.choose-date',this).css({display:'inline-block',verticalAlign:"middle"});
				$(".choose-date", this).bind("click", function (e) {
					$('body').bind("click", function (e) {ACL.hideCalendar(e, theCal)});

					/*@cc_on @*/ 
						/*@if (@_jscript_version <= 5.7) 
							$('.cal-popup', theCal).bgiframe().show();  
						@else @*/ 
							$('.cal-popup', theCal).show(); 
					/*@end @*/	
					
					
					// look for the empty row and set a boolean if the row is completely empt
					// difficult to find a way to discern an empty row
					/*
					$('.ui-datepicker-days-row', theCal).each(function () {
						var __isEmpty = true;
						$('td', this).each(function () {
							if (this.firstChild.nodeValue.search(/[0-9]/) != -1) {
								__isEmpty = false;
							}
						});
						//alert(__isEmpty);
					});
					*/
					
					
					return false; // to stop bubbling
				});
				$(".cal-input", this).bind("focus", function(){
					$('body').bind("click", function (e) {ACL.hideCalendar(e, theCal)});
					/*@cc_on @*/ 
						/*@if (@_jscript_version <= 5.7) 
							$('.cal-popup', theCal).bgiframe().toggle();  
						@else @*/ 
						$('.cal-popup', theCal).show(); 
					/*@end @*/	
					return false;
				});
			});
		});
		$('head > link').filter(':first').after('<link rel="stylesheet" type="text/css" href="seo-css/ui.datepicker.css" media="screen" />');
	}
}
/* calendar booking pod specific ===ending point=== */



FC.weatherInit = function () {
	$.ajax({
		type: "get",
		url: 'http://ws.geonames.org/findNearByWeatherJSON?lat=' + FC.vars.weather.mapCentreLat + '&lng=' + FC.vars.weather.mapCentreLng,
		dataType: "jsonp",
		success: function(locationData){
			//alert(locationData.weatherObservation.stationName);
			var __cond = 'na';
			var __clouds = 'na';
			if(locationData.weatherObservation)	__cond = locationData.weatherObservation.weatherCondition;
			__cond = __cond.replace("/","");
			__cond = __cond.replace(" ","");
			if(locationData.weatherObservation)	__clouds = locationData.weatherObservation.clouds
			__clouds = __clouds.replace("/","");
			__clouds = __clouds.replace(" ","");
			$('.weather-panel').addClass('box-5-top');
			$('.weather-panel').after($('<div></div>').addClass('box-5-bottom'));
			$('.weather-panel').append($('<div></div>').addClass('box-5-middle').append($('<div></div>').addClass('padding')));
			$('.weather-panel .padding').append($('<h2></h2>').html('Weather in ' + FC.vars.inpage.weatherSettings.mapCentreLoc));
			
			if(__cond !== 'na'){
				__show = __cond;
				__showFull = locationData.weatherObservation.weatherCondition;
			} else if (__clouds !== 'na'){
				__show = __clouds;
				__showFull = locationData.weatherObservation.clouds;
			} else {
				__show = 'clearsky';
				__showFull = 'clear sky';
			}
			$('.weather-panel .padding').append($('<div></div>').addClass('weather').addClass('clear').append($('<img></img>').attr('src', 'seo-images/weather/weather-' + __show + '.gif').attr('alt', __showFull)).append($('<p></p>').addClass('temp').html(locationData.weatherObservation.temperature + '&deg;C')));
			//$('.weather-panel .padding').append($('<div></div>').addClass('clear').append($('<img></img>').attr('src', 'seo-images/weather/wind-' + locationData.weatherObservation.windDirection + '.gif').attr('alt', locationData.weatherObservation.windDirection)).append($('<p></p>').addClass('wind').html(locationData.weatherObservation.windDirection + ' mph')));
			$('.weather-panel .padding').append($('<em></em>').addClass('station').html('Location: ' + locationData.weatherObservation.stationName));
												
												
		},
		complete: function (e){
			
		}
	});
	
}


$(function() {
	FC.pageInit();
	FC.tidyVariables(); //this function will tidy the comma from the end of the location variables
    FC.panelInit();
	FC.gMapInit(FC.vars.inpage.gmapSettings);
	//the following line has been added to manage the booking pod's calendar
	if($(".calendar").length){ACL.calendar();}
	if($('.weather-panel').length){FC.weatherInit();}
});
