var shown = 'reddeer'
var timeout = null;

var fadeLocations = function(){
	clearTimeout(timeout);
	
	if(shown === 'saskatoon') {
		jQuery('#location-image-reddeer').fadeIn();
		jQuery('#location-image-saskatoon').fadeOut();

		jQuery('.location-saskatoon').removeClass('current');
		jQuery('.location-reddeer').addClass('current');

		shown = 'reddeer';
	} else {
		jQuery('#location-image-saskatoon').fadeIn();
		jQuery('#location-image-reddeer').fadeOut();

		jQuery('.location-reddeer').removeClass('current');
		jQuery('.location-saskatoon').addClass('current');

		shown = 'saskatoon';
	}
	timeout = setTimeout('fadeLocations()',10000);
}


jQuery(document).ready(function(){
	if(jQuery('#locations-images').length > 0) {
		fadeLocations();
	}
})
